Database routines

Updated: April 19, 2023

The database routines listed below have been modified to better suit embedded systems.

/etc/resolv.conf
You can use configuration strings (via the confstr() function) to override the data usually contained in the /etc/resolv.conf file. You can also use the RESCONF environment variable to do this. Either method lets you use a nameserver without /etc/resolv.conf. This affects gethostbyname() and other resolver routines.
/etc/protocols
The getprotobyname() and getprotobynumber() functions have been modified to contain a small number of builtin protocols, including IP, ICNP, UDP, and TCP. For many applications, this means that the /etc/protocols file doesn't need to exist.
/etc/services
The getservbyname() function has been modified to contain a small number of builtin services, including ftp, telnet, smtp, domain, nntp, netbios-ns, netbios-ssn, sunrpc, and nfsd. For many applications, this means that the /etc/services file doesn't need to exist.