Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get host name

Status
Not open for further replies.

jlynch1

Technical User
Dec 20, 2001
100
IE


is there any function in tcl to get the hostname of a machine given an ip address , like the c function gethostbyaddr.



 
Do not know about the remote hostname but you can get the local host name using:

[info hostname]
 
The tnm extension gives you the standard name resolution
facilities. There is a dns package available that can re-
solve names by tcp queries(My dns servers don't allow tcp
queries from non-trusted hosts so the worth of this is
debatable).
If you really need the functionality of gethostbyaddr
and can't use tnm, you could look at compiling a small
extension, or a standalone to do what you want.
If you haven't been to the wiki please check out the
resources there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top