Hi all!
Is there any function to get the name from a computer by the IP adresse?
Thank you in advance!
Greetings Mario
Hi all!
Is there any function to get the name from a computer by the IP adresse?
Thank you in advance!
Greetings Mario
Got it: gethostbyaddr
Greetings!
The gethostbyaddr subroutine returns a pointer to a structure of type hostent. Its members specify data obtained from either the local /etc/hosts file or one of the files distributed by DNS. To determine which file or files to search, and in which order, the system uses the switches as defined.
As the routine reads /etc/hosts file we should use endhostent() routine to close the /etc/hosts file.