COHERENT manpages
This page displays the COHERENT manpage for gethostbyaddr() [Retrieve host information by address].
List of available manpages
Index
gethostbyaddr() -- Sockets Function (libsocket) Retrieve host information by address #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <sys/socket.h> struct hostent *gethostbyaddr(addr, len, type) char *host; int len, type; Function gethostbyaddr() interrogates file /etc/hosts and returns information about a given host on a network. addr gives the address at which the host's Internet address resides in memory. length gives the number of characters in its name. type gives the type of address this is. If it is anything other than type AF_INET, gethostbyaddr() returns NULL. If it could find information about the host in question, gethostbyaddr() returns the address in a instance of structure hostent, which is defined in header file <netdb.h>. If it could not, it returns NULL. See Also endhostent(), gethostbyname(), libsocket, sethostent() Page 2