The transport selection component is built around:
A network configuration database (the /etc/netconfig file), which contains an entry for each network on the system
The NETPATH
variable is set by the user; it contains an ordered list of transport identifiers. The transport identifiers match the netconfig network ID field and are links to records in the netconfig file. The netconfig file is described in "/etc/netconfig File". The network selection interface is a set of access routines for the network-configuration database.
One set of library routines accesses only the /etc/netconfig entries identified by the NETPATH
environment variable:
setnetpath() | Initializes the search of NETPATH |
getnetpath() | Returns a pointer to the netconfig entry that corresponds to the next component of the NETPATH variable |
endnetpath() | Releases the database pointer to elements in the NETPATH variable when processing is complete |
These routines are described in "NETPATH
Access to netconfig Data" and in getnetpath(3N). They let the user influence the selection of transports used by the application.
To avoid user influence on transport selection, use the routines that access the netconfig database directly. These routines are described in "Accessing netconfig" and in getnetconfig(3N):
setnetconfig() | Initializes the record pointer to the first index in the database |
getnetconfig() | Returns a pointer to the current record in the netconfig database and increments the pointer to the next record |
endnetconfig() | Releases the database pointer when processing is complete |
The following two routines manipulate netconfig entries and the data structures they represent. These routines are described in "Accessing netconfig":
getnetconfigent() | Returns a pointer to the struct netconfig structure corresponding to netid |
freenetconfigent() | Frees the structure returned by getnetconfigent() |