- u_long inet_addr ( char * addr );
- addr -- Internet address in dotted
decimal notation
returns -- Internet address in network byte
order
- char * inet_ntoa ( struct in_addr in );
- in -- Internet address in network
byte order
returns -- Internet address in dotted decimal
notation
- struct hostent * gethostbyaddr
( char * addr , int len , int
domain );
- addr -- pointer to address in network
byte order. typically held in an in_addr structure
len -- length of structure in bytes
domain -- domain type, typically
AF_INET
returns -- hostent structure with requested
information
- struct hostent * gethostbyname
( char * hostname );
- hostname -- hostname such as
www.hethmon.com
returns -- hostent structure with requested
information
- int getpeername ( int socket ,
struct sockaddr * addr , int
len );
- socket -- socket number currently
connected to client. typically from an accept call.
addr -- pointer to a struct sockaddr_in
structure which holds the return information about the client. must be cast in call
len -- length of structure in bytes
returns -- zero on success