DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Network services

The /etc/netconfig file

The netconfig file is the database that describes all networks on a given machine. It is maintained by the system administrator. Entries in the netconfig file contain the following fields:


``network ID''
A string used to identify a transport provider. Applications that require the name of a transport provider will obtain the name from this field. ``network ID'' consists of non-null characters, and has a length of at least 1. No maximum length is specified. This name space is locally significant, and the local system administrator is the naming authority responsible for ensuring that all network IDs on a system are unique.

``semantics''
A string that identifies the semantics of the transport provider, that is, the set of services it supports, by identifying the service interface it provides. This is closely related to, but not identical to, the Application Programming Interface (API) with which applications are supposed to access the network. Typically, an application will specify its API by pushing an appropriate STREAMS module (such as timod) and using an appropriate user-level library (such as the TLI library). The ``semantics'' field is mandatory. The following semantics are recognized:

tpi_clts
Transport Provider Interface, connectionless

tpi_cots
Transport Provider Interface, connection-oriented

tpi_cots_ord
Transport Provider Interface, connection-oriented and supports orderly release

tpi_raw
Transport Provider Interface, raw

Applications that require certain semantics, such as virtual circuit establishment, can use this field to determine if the transport provider has the required semantics.


``flag''
The ``flag'' field contains two-valued (true and false) attributes of transport providers. ``flag'' contains a string composed of a combination of characters, each of which specifies the value of the corresponding attribute. If the character is present, the attribute is true. If the character is absent, the attribute is false. A dash (-) indicates that no attributes are present. Only one character is currently recognized:

v
Visible network. Used to establish a default list of networks to search when the environment variable NETPATH is unset. See ``The NETPATH environment variable'' for a description of how the v flag is used.

``protocol family''
The protocol family name of the transport provider, for example, inet or osinet. See the netconfig(ADM) manual page.

``protocol name''
The protocol name of the transport provider. If the protocol family is inet, then the protocol name is tcp, udp or icmp. Otherwise, ``protocol name'' contains a dash (-). See the netconfig(ADM) manual page.

``network device''
The network device is the full pathname of the device used to connect to the remote machine via the transport provider. Typically, this device will be in the /dev directory. The network device must be specified.

``directory lookup libraries''
The directory lookup libraries support a directory service (that is, a name-to-address mapping service) for the network. This service is implemented by the UNIX System V name-to-address mapping feature. If a transport is not provided with such a library, (that is, if the ``directory lookup library'' field in the netconfig file contains only a dash) the network selection request will fail.

``directory lookup library''
This field consists of a comma-separated list of full pathnames to dynamically linked libraries.
Literal commas may be embedded as ``\,''; backslashes may be embedded as ``\\''.

Lines in /etc/netconfig that begin with a hash (#) are comments.

The fields correspond to elements of the netconfig structure. Pointers returned by network selection library routines are pointers to netconfig entries in struct netconfig format. The netconfig structure is shown below:

   struct	netconfig {
         	char           *nc_netid;       /* network identifier       */
       	unsigned long   nc_semantics;   /* semantics of protocol    */
         	unsigned long   nc_flag;        /* flags for the protocol   */
   	unsigned long   nc_protofmly;   /* family name              */
   	unsigned long   nc_proto;       /* proto specific if fmly inet */
   	char           *nc_device;      /* device name for network id */
   	unsigned long   nc_nlookups;    /* # of entries in nc_lookups */
   	char          **nc_lookups;     /* list of lookup directories */
   	unsigned long   nc_unused[8];
   };
Valid network IDs are defined by the system administrator, who is responsible for ensuring that network IDs are locally unique. If they are not, some network selection routines cannot operate in a well-defined manner. For example, it is not possible to know which network getnetconfigent("starlan") will use if there are two netconfig entries with the network ID ``starlan''.

The system administrator also determines the order of the entries in the netconfig database. Since the routines that retrieve entries from /etc/netconfig return entries in order, beginning at the top of the file, the order in which networks are entered in the file by the system administrator becomes the default network search path for applications choosing networks to connect to.

The netconfig file and the struct netconfig structure are described in greater detail on the netconfig(ADM) manual page.


© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005