|NETCONFIG(5)||File Formats and Configurations||NETCONFIG(5)|
The network configuration database, /etc/netconfig, is a system file used to store information about networks that are connected to the system. The netconfig database and the routines that access it (see getnetconfig(3NSL)) are part of the Network Selection component. The Network Selection component also includes getnetpath(3NSL) routines to provide application-specific network search paths. These routines access the netconfig database based on the environment variable NETPATH. See environ(7).
netconfig contains an entry for each network available on the system. Entries are separated by newlines. Fields are separated by whitespace and occur in the order in which they are described below. Whitespace can be embedded as ``\blank'' or ``\tab''. Backslashes may be embedded as ``\\''. Lines in /etc/netconfig that begin with a # (hash) in column 1 are treated as comments.
Each of the valid lines in the netconfig database correspond to an available transport. Each entry is of the form:
network ID semantics flag protocol-family \ protocol-name network-device translation-libraries
Each field corresponds to an element in the struct netconfig structure. struct netconfig and the identifiers described on this manual page are defined in <netconfig.h>. This structure includes the following members:
unsigned long nc_semantics
unsigned long nc_flag
unsigned long nc_nlookups
unsigned long nc_unused
The nc_semantics field takes the following values,
corresponding to the semantics identified above:
The nc_flag field is a bitfield. The following bit, corresponding to the attribute identified above, is currently recognized. NC_NOFLAG indicates the absence of any attributes.
Below is a sample netconfig file:
# # The "Network Configuration" File. # # Each entry is of the form: # # <networkid> <semantics> <flags> <protofamily> <protoname> <device> # <nametoaddrlibs> # # The "-" in <nametoaddrlibs> for inet family transports indicates # redirection to the name service switch policies for "hosts" and # "services". The "-" may be replaced by nametoaddr libraries that # comply with the SVr4 specs, in which case the name service switch # will not be used for netdir_getbyname, netdir_getbyaddr, # gethostbyname, gethostbyaddr, getservbyname, and getservbyport. # There are no nametoaddr_libs for the inet family in Solaris anymore. # udp6 tpi_clts v inet6 udp /dev/udp6 - tcp6 tpi_cots_ord v inet6 tcp /dev/tcp6 - udp tpi_clts v inet udp /dev/udp - tcp tpi_cots_ord v inet tcp /dev/tcp - rawip tpi_raw - inet - /dev/rawip - ticlts tpi_clts v loopback - /dev/ticlts straddr.so ticotsord tpi_cots_ord v loopback - /dev/ticotsord straddr.so ticots tpi_cots v loopback - /dev/ticots straddr.so
System Administration Guide: IP Services
|November 18, 2003||OmniOS|