NETCONFIG(5) | File Formats and Configurations | NETCONFIG(5) |
netconfig - network configuration database
/etc/netconfig
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
network ID
semantics
tpi_clts
tpi_cots
tpi_cots_ord
flag
v
protocol family
loopback
inet
inet6
implink
pup
chaos
ns
nbs
ecma
datakit
ccitt
sna
decnet
dli
lat
hylink
appletalk
nit
ieee802
osi
x25
osinet
gosip
protocol name
tcp
udp
icmp
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:
char *nc_netid
unsigned long nc_semantics
unsigned long nc_flag
char *nc_protofmly
char *nc_proto
char *nc_device
unsigned long nc_nlookups
char **nc_lookups
unsigned long nc_unused[9]
The nc_semantics field takes the following values,
corresponding to the semantics identified above:
NC_TPI_CLTS
NC_TPI_COTS
NC_TPI_COTS_ORD
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.
NC_VISIBLE
Example 1 A Sample netconfig File
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
<netconfig.h>
dlopen(3C), getnetconfig(3NSL), getnetpath(3NSL), nsswitch.conf(5)
System Administration Guide: IP Services
November 18, 2003 | OmniOS |