Naming services in the ChorusOS operating system are provided by DNS and NIS.
The Domain Name System (DNS) commands provide a standard, stable and robust architecture used for the naming architecture on the Internet Protocol. DNS is used widely on the Internet.
Name resolution is ensured by DNS servers (named), one of which is the primary server. This server reads the name records stored in a database on disk (this database file is managed by the administrator). The other servers are secondary, which means that they acquire the name records from the primary server, and do not read them from the main database file. However, these secondary servers may store records in a cache file on disk to improve restart performances. These cache files are not intended to be edited manually. The user program performs the name resolution by sending queries to DNS name servers. Generally, each host is configured such that it knows the addresses of all name servers (primary and secondary).
The ChorusOS operating system can also be bound to a Network Information Service (NIS) database.
The naming service API is summarized in the following table:
Command |
Description |
---|---|
named |
DNS server |
named-xfer |
Perform an inbound zone transfer |
gethostbyname |
Convert name into IP address |
gethostbyaddress |
Convert IP address into name |
gethostbyname2 |
Perform lookups in address families other than AF_INET |
gethostbyaddr |
Get network host entry from IP address |
gethostent |
Reads /etc/hosts, and opens file if necessary |
sethostent |
Opens and/or rewinds /etc/hosts |
endhostent |
Closes the file |
herror |
Print an error message describing a failure |
hstrerror |
Returns a string which is the message text corresponding to the value of the err parameter |
getaddrinfo |
Protocol-independent nodename-to-address translation |
freeaddrinfo |
Frees structure pointed to by the ai argument |
gai_strerror |
Returns a pointer to a string describing a given error code |
getnetent |
Get network entry |
getnetbyaddr |
Search for net name by address |
getnetbyname |
Search for net address by name |
setnetent |
Opens and rewinds the file |
endnetent |
Closes the file |