DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Administering name-to-address mapping

The straddr.so library

The routines in this dynamic library create addresses from files that have the same format as the tcpip.so file described previously. The straddr.so files are /etc/net/transport/hosts and /etc/net/transport/services. transport is the local name of the transport provider that accepts string addresses (specified in the network_id field of the /etc/netconfig file). For example, the host file for ticlts would be /etc/net/ticlts/hosts, and the service file for ticlts would be /etc/net/ticlts/services. For ticots, the files would be /etc/net/ticots/hosts and /etc/net/ticots/services.

Even though most string addresses do not distinguish between host and service, separating the string into a host part and a service part provides consistency with other transport providers. The /etc/net/transport/hosts file will therefore contain a string that is considered to be the machine address, followed by the machine name. For example:

   #machine addr  machine name
   #
   bilboaddr      bilbo
   elvisaddr      elvis
   frodoaddr      frodo

Sample /etc/net/transport/hosts File

The /etc/net/transport/services file contains a service name followed by a string identifying the service port. For example:

   #service name  service port
   #
   rpcbind        rpc
   kerserv        kerserv
   listen         serve
   statd          statd
   lockd          lockd
   nfsd           nfsd
   reportscheme   reportscheme

Sample /etc/net/transport/services File

The routines create the full string address by combining the host address and the service port, separating the two with a dot (.). For example, the address of the listen service on bilbo would be ``bilboaddr.serve'' and the address of the rpcbind service on bilbo would be ``bilboaddr.rpc''.

When an application requests the address of a service on a particular host on a transport provider that uses this library, the host name must appear in /etc/net/transport/hosts and the service name must appear in /etc/net/transport/services. If one or the other does not appear, the name-to-address mapping routines return an error.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004