The network functions and the Berkeley Resolver routines supported by the
sockets APIs are:
_getlong() (Get Long Byte Quantities) is used to retrieve an unsigned long byte quantity.
_getshort() (Get Short Byte Quantities) is used to retrieve an unsigned short byte quantity.
_putlong() (Put Long Byte Quantities) is used to put an unsigned long byte quantity into a byte stream.
_putshort() (Put Short Byte Quantities) is used to put an unsigned short byte quantity into a byte stream.
dn_comp() (Compress Domain Name) is used to compress an expanded domain name.
dn_comp_ts64() (Compress Domain Name) is used to compress an expanded domain name.
dn_expand() (Expand Domain Name) is used to expand a compressed domain name.
dn_find() (Search for Compressed Domain Name) is used to search for an expanded domain name in a list of compressed domain names.
dn_find_ts64() (Search for Compressed Domain Name) is used to search for an expanded domain name in a list of compressed domain names.
dn_skipname() (Skip over Compressed Domain Name) is used to skip over a compressed domain name in a DNS packet.
endhostent() (Close Local Host Table) is used to close the host database file.
endhostent_r() (Close Local Host Table) is used to close the host database file.
endnetent() (Close Network Database) is used to close the network database file.
endnetent_r() (Close Network Database) is used to close the network database file.
endprotoent() (Close Protocol Database) is used to close the protocols database file.
endprotoent_r() (Close Protocol Database) is used to close the protocol database file.
endservent() (Close Service Database) is used to close the services database file.
endservent_r() (Close Service Database) is used to close the service database file.
freeaddrinfo() (Free Address Information) frees one or more addrinfo structures returned by getaddrinfo(), along with any additional storage associated with those structures.
freeifaddrs() (Free Dynamic Memory Allocated by getifaddrs()) frees the dynamic memory that was allocated by the getifaddrs() function.
gai_strerror() (Retrieve Address Information Runtime Error Message) retrieves a text string that describes a return value received from calling the getaddrinfo() or getnameinfo() API.
getaddrinfo() (Get Address Information) translates the name of a service location or a service name and returns a set of socket addresses and associated information to be used in creating a socket with which to address the specified service.
getaddrinfo_ts64() (Get Address Information) translates the name of a service location or a service name and returns a set of socket addresses and associated information to be used in creating a socket with which to address the specified service. getaddrinfo_ts64() differs from getaddrinfo() in that getaddrinfo_ts64() accepts 8-byte teraspace pointers.
gethostbyaddr() (Get Host Information for IP Address) is used to retrieve information about a host.
gethostbyaddr_r() (Get Host Information for IP Address) is used to retrieve information about a host.
gethostbyname() (Get Host Information for Host Name) is used to retrieve information about a host.
gethostbyname_r() (Get Host Information for Host Name) is used to retrieve information about a host.
gethostent() (Get Next Entry from Local Host Table) is used to retrieve information from the host database file.
gethostent_r() (Get Next Entry from Local Host Table) is used to retrieve information from the host database file.
getifaddrs() (Return All Interface Addresses) stores a reference to a linked list of ifaddrs structures, one structure per interface.
getifaddrs_ts64() (Return All Interface Addresses) stores a reference to a linked list of ifaddrs structures, one structure per interface. getifaddrs_ts64() differs from getifaddrs() in that getifaddrs_ts64() accepts 8-byte teraspace pointers.
getnameinfo() (Get Name Information for Socket Address) translates a socket address to a node name and service location.
getnetbyaddr() (Get Network Information for IP Address) is used to retrieve information about a network.
getnetbyaddr_r() (Get Network Information for IP Address) is used to retrieve information about a network.
getnetbyname() (Get Network Information for Domain Name) is used to retrieve information about a network.
getnetbyname_r() (Get Network Information for Domain Name) is used to retrieve information about a network.
getnetent() (Get Next Entry from Network Database) is used to retrieve network information from the network database file.
getnetent_r() (Get Next Entry from Network Database) is used to retrieve network information from the network database file.
getprotobyname() (Get Protocol Information for Protocol Name) is used to retrieve information about a protocol.
getprotobyname_r() (Get Protocol Information for Protocol Name) is used to retrieve information about a protocol.
getprotobynumber() (Get Protocol Information for Protocol Number) is used to retrieve information about a protocol.
getprotobynumber_r() (Get Protocol Information for Protocol Number) is used to retrieve information about a protocol.
getprotoent() (Get Next Entry from Protocol Database) is used to retrieve protocol information from the protocol database file.
getprotoent_r() (Get Next Entry from Protocol Database) is used to retrieve protocol information from the protocol database file.
getservbyname() (Get Port Number for Service Name) is used to retrieve information about services (the protocol being used by the service and the port number assigned for the service).
getservbyname_r() (Get Port Number for Service Name) is used to retrieve information about services: the protocol being used by the service and the port number assigned for the service.
getservbyport() (Get Service Name for Port Number) is used to retrieve information about a service assigned to a port number.
getservbyport_r() (Get Service Name for Port Number) is used to retrieve information about a service assigned to a port number.
getservent() (Get Next Entry from Service Database) is used to retrieve information about services (the protocol being used by the service and the port number assigned for the service).
getservent_r() (Get Next Entry from Service Database) is used to retrieve information about services: the protocol being used by the service and the port number assigned for the service.
hstrerror() (Retrieve Resolver Error Message) is used to retrieve the text string that describes a resolver h_errno value.
htonl() (Convert Long Integer to Network Byte Order) is used to convert a long (4-byte) integer from the local host byte order to standard network byte order.
htons() (Convert Short Integer to Network Byte Order) is used to convert a short (2-byte) integer from the local host byte order to standard network byte order.
inet_addr() (Translate Full Address to 32-bit IP Address) is used to translate an Internet address from dotted decimal format to a 32-bit IP address.
inet_lnaof() (Separate Local Portion of IP Address) is used to extract the local host portion of an IP address.
inet_makeaddr() (Combine Network Portion and Host Portion to Make IP Address) is used to generate a 32-bit IP address from the 32-bit network IP address and the local address of the host.
inet_netof() (Separate Network Portion of IP Address) is used to extract the network portion of an IP address.
inet_network() (Translate Network Portion of Address to 32-bit IP Address) is used to translate an Internet address from dotted decimal format to a 32-bit network IP address, in which the host part of the IP address is set to zeros.
inet_ntoa() (Translate IP Address to Dotted Decimal Format) is used to translate an Internet address from a 32-bit IP address to dotted decimal format.
inet_ntoa_r() (Translate IP Address to Dotted Decimal Format) is used to translate an Internet address from a 32-bit IP address to dotted decimal format.
inet_ntop() (Convert IPv4 and IPv6 Addresses Between Binary and Text Form) converts a numeric address into a text string suitable for presentation.
inet_pton() (Convert IPv4 and IPv6 Addresses Between Text and Binary Form) converts an address in its standard text presentation form into its numeric binary form.
ns_addr() (Translate Network Services Address to 12-byte Address) is used to translate a network services address from human readable format to a 12-byte hexadecimal address.
ns_ntoa() (Translate Network Services Address from 12-byte Address) is used to translate a network services address from a 12-byte address to a human readable format.
ns_ntoa_r() (Translate Network Services Address from 12-byte Address) is used to translate a network services address from a 12-byte address to a human readable format.
ntohl() (Convert Long Integer to Host Byte Order) is used to convert a long (4-byte) integer from the standard network byte order to the local host byte order.
ntohs() (Convert Short Integer to Host Byte Order) is used to convert a short (2-byte) integer from the standard network byte order to the local host byte order.
res_close() (Close Socket and Reset _res Structure) is used to reset the _res structure to the beginning defaults and close a socket that is opened as a result of the RES_STAYOPEN flag.
res_findzonecut() (Find the Enclosing Zone and Servers) queries name servers until it finds the enclosing zone and its master name servers for the specified domain name.
res_findzonecut2() (Find the Enclosing Zone and Servers) queries name servers until it finds the enclosing zone and its master name servers for the specified domain name. res_findzonecut2() differs from res_findzonecut() in that res_findzonecut2() can return IPv6 master name server addresses in the res_sockaddr_union.
res_getservers() (Get Name Server Addresses) gets the list of name server addresses that will be used on resolver or network APIs that use the state structure.
res_hostalias() (Retrieve Host Alias) looks up the specified name in the host aliases file specified by the environment variable HOSTALIASES.
res_init() (Initialize _res Structure) is used to initialize the _res structure for name resolution.
res_mkquery() (Place Domain Query in Buffer) is used to make standard query messages (DNS packets) for name servers.
res_nclose() (Close Socket and Reset _res Structure) is used to reset the _res structure to the beginning defaults and close a socket that is opened as a result of the RES_STAYOPEN flag.
res_ninit() (Initialize _res Structure) is used to initialize the _res structure for name resolution.
res_nisourserver() (Check Server Address) looks up the specified server address in the ns_addr_list[] of the specified res structure.
res_nmkquery() (Place Domain Query in Buffer) is used to make standard query messages (DNS packets) for name servers.
res_nmkupdate() (Construct an Update Packet) builds a dynamic update packet from the linked list of update records.
res_nquery() (Send Domain Query) is used to interface to the server query mechanism.
res_nquerydomain() (Send 2-String Domain Query) is used to interface to the server query mechanism.
res_nsearch() (Search for Domain Name) is used to make a query message and wait for a response.
res_nsend() (Send Buffered Domain Query or Update) is used to send a query or update message to a name server and retrieve a response.
res_nsendsigned() (Send Authenticated Domain Query or Update) is similar to res_nsend() but it uses the specified key to create a transaction signature (TSIG) to sign the query or update packet and to authenticate the response.
res_nupdate() (Build and Send Dynamic Updates) separates the linked list of update records into groups so that all records in a group will belong to a single zone on the nameserver.
res_query() (Send Domain Query) is used to interface to the server query mechanism.
res_search() (Search for Domain Name) is used to make a query message and wait for a response.
res_send() (Send Buffered Domain Query or Update) is used to send a query or update message to a name server and retrieve a response.
res_setservers() (Set Name Server Addresses) sets the list of name server addresses that will be used on resolver or network APIs that use the state structure.
res_xlate() (Translate DNS Packets) is used to translate a standard DNS packet between ASCII and EBCDIC.
sethostent() (Open Local Host Table) is used to prepare for sequential access to the host database file. sethostent() opens the file and repositions the file marker to the beginning of the file.
sethostent_r() (Open Local Host Table) is used in preparation for sequential access to the host database file.
setnetent() (Open Network Database) is used to prepare for sequential access to the network database file.
setnetent_r() (Open Network Database) is used in preparation for sequential access to the network database file.
setprotoent() (Open Protocol Database) is used to prepare for sequential access to the protocol database file.
setprotoent_r() (Open Protocol Database) is used in preparation for sequential access to the protocol database file.
setservent() (Open Service Database) is used to prepare for sequential access to the service database file.
setservent_r() (Open Service Database) is used in preparation for sequential access to the service database file.
1 IBM® addition to the Berkeley Resolver
Routines
Note: These functions use header (include) files from the
library QSYSINC, which is optionally installable. Make sure QSYSINC is
installed on your system before using any of the functions.