netconfig(SFF)
netconfig --
network configuration database
Synopsis
#include <netconfig.h>
Description
The network configuration database system file, /etc/netconfig,
stores information about networks
that are connected to the system and that are available for use.
At system startup,
initsock(ADMN)
(invoked by init)
reads /etc/netconfig
to initialize the in-kernel socket system's mapping of
socket families, types and protocols to device files.
The netconfig database and the routines that access it
(see
getnetconfig(SLIB))
are part of the Network Selection component.
The Network Selection component also includes
the environment variable NETPATH
and a group of routines that access
the netconfig database using NETPATH
components as links to the netconfig entries.
NETPATH is described in
sh(C);
the
NETPATH access routines are discussed in
getnetpath(SLIB).
Files
/etc/netconfig-
/usr/include/netconfig.h-
Usage
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 by escaping an ASCII
space or tab with a backslash character (\).
Backslashes may be embedded as ``\\''.
Lines that begin with a hash sign (#)
are treated as comments and ignored.
netconfig database fields
Each field in the network configuration database
corresponds to an element in the netconfig structure.
netconfig and the identifiers
described on this manual page are defined in
/usr/include/netconfig.h.
``network ID''-
A string used to uniquely identify a network.
The string consists of non-null characters,
and has a length of at least 1.
No maximum length is specified.
This namespace is locally significant
and the local system administrator is the naming authority.
Note that all network IDs on a system must be unique.
``semantics''-
A string identifying the semantics
of the network (that is, the set of services it supports) by
identifying the service interface it provides.
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, supports
orderly release.
tpi_raw-
Transport Provider Interface, raw
``flag''-
This field records certain boolean attributes of networks.
``flag'' contains a string composed of a combination of characters,
each of which indicates 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 none of the attributes is present.
Two characters are currently recognized:
v-
Visible (default) network.
Used when the environment variable NETPATH is unset.
b-
Enable RPC broadcast.
The network will accept broadcasts.
If this flag is not set, then broadcasts will not be allowed on the network.
The flag must be set for UDP networks, otherwise some applications which
need to broadcast will fail.
Note that connection oriented transports do not support broadcasts.
``protocol family''-
The ``protocol family'' (see also the ``protocol name'' field below)
is provided for protocol-specific applications.
The ``protocol family'' field contains a string that identifies
a protocol family.
This string follows the same rules as those for the
``network ID'' field.
A dash in this field indicates that no
protocol family identifier applies:
that is, the network is experimental.
The following are examples:
loopback-
Loopback (local to host).
inet-
Internetwork: for example, UDP, TCP
implink-
ARPANET IMP addresses
pup-
PUP protocols: for example, BSP
chaos-
MIT CHAOS protocols
ns-
XEROX NS protocols
nbs-
NBS protocols
ecma-
European Computer Manufacturers Association
datakit-
DATAKIT protocols
ccitt-
CCITT protocols: for example, X.25
sna-
IBM SNA
decnet-
DECNET
dli-
Direct data link interface
lat-
LAT
hylink-
NSC Hyperchannel
appletalk-
Apple Talk
nit-
Network Interface Tap
ieee802-
IEEE 802.2; also ISO 8802
osi-
Umbrella for all families used by OSI (for example, protosw lookup)
x25-
CCITT X.25 in particular
osinet-
AFI = 47, IDI = 4
gosip-
U.S. Government OSI
``protocol name''-
The ``protocol name'' field contains a string that identifies a protocol.
This string follows the same rules as those for the
``network ID'' field.
The following
protocol names are recognized.
A dash indicates that none of
the names listed below applies:
tcp-
Transmission Control Protocol
udp-
User Datagram Protocol
icmp-
Internet Control Message Protocol
``network device''-
The ``network device'' is the full pathname of the device
used to connect to the transport provider.
Typically, this device will be in the /dev directory.
This field must have an entry.
``directory lookup libraries''-
These libraries support a
directory service (that is, a name-to-address mapping service) for the network.
This service is implemented by the
name-to-address mapping feature.
If a network is not provided with such a library,
the
netdir(SLIB)
feature will not work.
A dash in this field indicates the
absence of any lookup libraries, in which case name-to-address
mapping for the network is non-functional.
This field consists
of a comma-separated list of full pathnames to dynamically linked
libraries.
Commas may be embedded as ``\,'';
backslashes as ``\\''.
netconfig structure members
The netconfig structure includes the following members
corresponding to the fields in the netconfig database entries:
char * nc_netid
-
Network ID, including NULL terminator
unsigned long nc_semantics
-
Semantics
unsigned long nc_flag
-
Flags
char * nc_protofmly
-
Protocol family
char * nc_proto
-
Protocol name
char * nc_device
-
Full pathname of the network device
unsigned long nc_nlookups
-
Number of directory lookup libraries
char ** nc_lookups
-
Full pathnames of the directory lookup libraries
unsigned long nc_unused[9]
-
Reserved for future expansion
(not advertised
at user level)
The nc_semantics
variable takes the following values,
corresponding to the semantics identified above:
NC_TPI_CLTS-
NC_TPI_COTS-
NC_TPI_COTS_ORD-
NC_TPI_RAW-
The nc_flag
variable is a bitfield.
The NC_VISIBLE bit, corresponding to the attribute identified above, is
currently recognized.
NC_NOFLAG indicates the absence of any attributes.
References
getnetconfig(SLIB),
getnetpath(SLIB),
icmp(ADMP),
initsock(ADMN),
ip(ADMP),
netdir(SLIB)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005