| Function | Purpose |
endhostent | Closes the HOSTS database file (\ETC\HOSTS). |
gethostbyname(name) | Translates a hostname to a corresponding address (and other names) by returning the entry that matches the hostname. |
gethostbyaddr(addr, addrtype) | Translates a network address to a corresponding name (and alternate addresses) by returning the entry that matches the address addr and address addrtype. |
gethostent | Returns the next entry in the HOSTS file (\ETC\HOSTS). |
sethostent(stayopen) | Opens and rewinds the HOSTS file (\ETC\HOSTS). If stayopen is true, the file is not closed after each call to gethostbyname and gethostbyaddr. |
endnetent | Closes the NETWORKS file (\ETC\NETWORKS). |
getnetbyaddr(addr, addrtype) | Translates a network address to a corresponding network name or names by returning the entry that matches the network address addr and address type addrtype. |
getnetbyname(name) | Translates a network name to a corresponding network address by returning the entry that matches the network name. |
getnetent | Returns the next entry in the NETWORKS file (\ETC\NETWORKS). |
setnetent(stayopen) | Opens and rewinds the NETWORKS file (\ETC\NETWORKS). If stayopen is true, the file is not closed after each call to getnetbyname and getnetbyaddr. |
endservent | Closes the SERVICES file (\ETC\SERVICES). |
getservbyname(name, proto) | Translates a service (port) name to a corresponding port number by returning the entry that matches the service name name and protocol proto. Proto is a protocol name such as "tcp." |
getservbyport(number, proto) | Translates a service (port) number to a corresponding name by returning the entry that matches the service number number. |
getservent | Returns the next entry in the file. |
setservent(stayopen) | Opens and rewinds the SERVICES file (\ETC\SERVICES). If stayopen is true, the file is not closed after each call to getservbyname and getservbyport. |
endprotoent | Closes the PROTOCOLS file (\ETC\PROTOCOLS). |
getprotobyname(name) | Translates a protocol name to a corresponding number by returning the entry that matches the protocol name name. |
getprotobynumber(number) | Translates a protocol number to a corresponding name by returning the entry that matches the protocol number number. |
getprotoent | Returns the next entry in the PROTOCOLS file (\ETC\PROTOCOLS). |
setprotoent(stayopen) | Opens and rewinds the PROTOCOLS file (\ETC\PROTOCOLS). If stayopen is true, the file is not closed after each call to getprotobyname and getprotobynumber. |