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

The NETPATH environment variable

In most cases the user is not interested in which network is used for a network operation. Typically, an application uses the default network search path established by the system administrator to locate an available network. However, when a user wants to influence the choices made by an application, the application can modify the interface by using the shell variable NETPATH and the routines described in ``The network selection application programming interface''. These routines access only the networks specified in the NETPATH variable.

NETPATH is similar to the PATH variable. It consists of a colon-separated list of network IDs. Each network ID corresponds to the ``network ID'' field of a record in the netconfig database. A literal colon can be embedded as ``\:'' and a literal backslash as ``\\''. An empty component in NETPATH -- signified by either a beginning colon, an ending colon, or two successive colons -- is not a valid entry, since the empty string is not a valid network ID. NETPATH is described on the environ(M) manual page.

The NETPATH environment variable is not set in /etc/profile. It can, however, be set in the user's $HOME/.profile:

   NETPATH=starlan:tcp
Both users and system administrators should be aware that the set of default networks is different for the routines that access netconfig directly and the routines that access netconfig via the NETPATH environment variable. For the routines that access netconfig directly (see getnetconfig(NS)), the set of default networks is the entire netconfig file; the set of default networks for the routines that access netconfig via NETPATH is the visible networks in the netconfig file (see getnetpath(NS)). A network is visible if the system administrator has included a v flag in the flag field. If NETPATH is unset, these visible networks form the default search path for this second group of access routines.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005