'\"macro stdmacro
.if n .pH g4.netconfig @(#)netconfig	40.18 of 1/29/90
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} netconfig 4 "Networking Services Architecture" "\&"
.if \nX=1 .ds x} netconfig 4 "Networking Services Architecture"
.if \nX=2 .ds x} netconfig 4 "" "\&"
.if \nX=3 .ds x} netconfig "" "" "\&"
.TH \*(x}
.SH NAME
\f4netconfig\f1 \- network configuration database
.SH SYNOPSIS
\f4#include <netconfig.h>\f1
.SH "DESCRIPTION"
The network configuration database, \f4/etc/netconfig\f1,
is a system file used to store information about networks
connected to the system and available for use.
The \f4netconfig\f1 database and the routines that access it
[see \f4getnetconfig\f1(3N)]
are part of the
.SM UNIX
System V Network Selection component.
The Network Selection component also includes the environment variable
\f4NETPATH\f1
and a group of routines that access 
the \f4netconfig\f1 database using 
\f4NETPATH\f1
components as links to the \f4netconfig\f1 entries.
\f4NETPATH\f1
is described in \f4sh\f1(1); the 
\f4NETPATH\f1
access routines are discussed in \f4getnetpath\f1(3N).
.P
\f4netconfig\f1 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
``\f4\e\f1\f2blank\f1'' or ``\f4\e\f1\f2tab\f1''.
Backslashes may be embedded as ``\f4\e\e\f1''.
.\".sp .5
.\".nf
.\".in +.5i
.\"network ID (sometimes called a ``token'')
.\"semantics
.\"flag
.\"protocol family
.\"protocol name
.\"network device
.\"comma-separated list of directory lookup libraries
.\".in -.5i
.\".fi
.\".P
Each field corresponds to an element in the
\f4struct netconfig\f1
structure.
\f4struct netconfig\f1
and the identifiers
described on this manual page are defined in
\f4/usr/include/netconfig.h\f1.
.TP 6
\f2network ID\f1
A string used to uniquely identify a network.
\f2network ID\f1 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.
All \f2network ID\f1s on a system must be unique.
.TP
\f2semantics\f1
The \f2semantics\f1 field is a string identifing the ``semantics''
of the network, i.e., the set of services it supports, by
identifying the service interface it provides.
The \f2semantics\f1 field is mandatory.
The following semantics are recognized.
.RS 10
.TP 12
\f4tpi_clts\f1
Transport Provider Interface, connectionless
.TP
\f4tpi_cots\f1
Transport Provider Interface, connection oriented
.TP
\f4tpi_cots_ord\f1
Transport Provider Interface, connection oriented, supports 
orderly release.
.RE
.TP 6
\f2flag\f1
The \f2flag\f1 field records certain two-valued
(``true'' and ``false'') attributes of networks.
\f2flag\f1 is 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.''
``\f4-\f1'' indicates that none of the attributes is present.
Only one character is currently recognized:
.RS 10
.TP 12
\f4v\f1
Visible (``default'') network.
Used when the environment variable \f4NETPATH\fP is unset.
.RE
.TP 6
\f2protocol family\f1
The \f2protocol family\f1 and \f2protocol name\f1 fields
are provided for protocol-specific applications.
.sp .5
The \f2protocol family\f1 field contains a string that identifies
a protocol family.
The \f2protocol family\f1 identifier follows the same rules as those for
\f2network ID\f1s, that is,
the string consists of non-null characters; it has a length
of at least \f41\f1; and there is no maximum length specified.
A ``\f4\-\f1'' in the \f2protocol family\f1 field indicates that no
protocol family identifier applies,
that is, the network is experimental.
The following
are examples:
.RS 10
.TP 12
\f4loopback\f1
Loopback (local to host).
.PD 0 
.TP
\f4inet\f1
Internetwork: UDP, TCP, etc.
.TP
\f4implink\f1
ARPANET imp addresses
.TP
\f4pup\f1
PUP protocols: e.g. BSP
.TP
\f4chaos\f1
MIT CHAOS protocols
.TP
\f4ns\f1
XEROX NS protocols
.TP
\f4nbs\f1
NBS protocols
.TP
\f4ecma\f1
European Computer Manufacturers Association
.TP
\f4datakit\f1
DATAKIT protocols
.TP
\f4ccitt\f1
CCITT protocols, X.25, etc.
.TP
\f4sna\f1
IBM SNA
.TP
\f4decnet\f1
DECNET
.TP
\f4dli\f1
Direct data link interface
.TP
\f4lat\f1
LAT
.TP
\f4hylink\f1
NSC Hyperchannel
.TP
\f4appletalk\f1
Apple Talk
.TP
\f4nit\f1
Network Interface Tap
.TP
\f4ieee802\f1
IEEE 802.2; also ISO 8802
.TP
\f4osi\f1
Umbrella for all families used by OSI (e.g., protosw lookup)
.TP
\f4x25\f1
CCITT X.25 in particular
.TP
\f4osinet\f1
AFI = 47, IDI = 4
.TP
\f4gosip\f1
U.S. Government OSI
.PD
.RE
.TP 6
\f2protocol name\f1
The \f2protocol name\f1 field contains a string that identifies a protocol.
The \f2protocol name\f1 identifier follows the same rules as those for
\f2network ID\f1s, that is,
the string consists of non-\s-1NULL\s+1 characters; it has a length
of at least \f41\f1; and there is no maximum length specified.
The following
protocol names are recognized.
A ``\f4-\f1'' indicates that none of
the names listed applies.
.RS 10
.TP 8
\f4tcp\f1
Transmission Control Protocol
.TP
\f4udp\f1
User Datagram Protocol
.TP
\f4icmp\f1
Internet Control Message Protocol
.RE
.TP 6
\f2network device\f1
The \f2network device\f1 is the full pathname of the device
used to connect to the transport provider.
Typically, this device will be in the \f4/dev\f1 directory.
The \f2network device\f1  must be specified.
.TP
\f2directory lookup libraries\f1
.br
The \f2directory lookup libraries\f1 support a
``directory service'' (a name-to-address mapping service) for the network.
This service is implemented by the
.SM UNIX
System V Name-to-Address Mapping feature.
If a network is not provided with such a library,
the \f2netdir\f1 feature will not work.
A ``\f4\-\f1'' in this field indicates the
absence of any lookup libraries, in which case name-to-address
mapping for the network is non-functional.
The directory lookup library field consists
of a comma-separated list of full pathnames to dynamically linked
libraries.
Commas may be embedded as ``\f4\e,\f1''; 
backslashs as ``\f4\e\e\f1''.
.P
Lines in \f4/etc/netconfig\f1 that begin with a sharp sign (\f4#\f1)
in column 1 are treated as comments.
.P
The \f4struct netconfig\f1 structure includes the following members
corresponding to the fields in in the \f4netconfig\f1 database entries:
.TP 33
\f4char * nc_netid\f1
Network ID, including \s-1NULL\s+1 terminator
.TP
\f4unsigned long nc_semantics\f1
Semantics
.TP
\f4unsigned long nc_flag\f1
Flags
.TP
\f4char * nc_protofmly\f1
Protocol family
.TP
\f4char * nc_proto\f1
Protocol name
.TP
\f4char * nc_device\f1
Full pathname of the network device 
.TP
\f4unsigned long nc_nlookups\f1
Number of directory lookup libraries
.TP
\f4char ** nc_lookups\f1
Full pathnames of the directory lookup libraries themselves
.TP
\f4unsigned long nc_unused[9]\f1
Reserved for future expansion
(not advertised
to user level)
.P
The \f4nc_semantics\f1 field takes the following values,
corresponding to the semantics identified above:
.P
.RS 6
\f4NC_TPI_CLTS\f1
.br
\f4NC_TPI_COTS\f1
.br
\f4NC_TPI_COTS_ORD
.RE
.P
.\"[\(rh  Should \f4NC_TPI_RAW\fP be mentioned? \(lh]
.P
The \f4nc_flag\f1 field is a bitfield.
The following bit, corresponding to the attribute identified above, is
currently recognized. 
\f4NC_NOFLAG\f1 indicates the absence of any attributes.
.P
.RS 6
\f4NC_VISIBLE\f1
.RE
.SH "FILES"
.nf
.ft 4
/etc/netconfig
/usr/include/netconfig.h
.ft 1
.fi
.P
.\"[\(rh  Mike: should there be a description of the \f4NCONF_HANDLE\fP
.\"structure?  Nancy Yeager says applications need to know about it.
.\"Can you supply it and where does it go? \(lh]
.NE 1i
.SH "SEE ALSO"
\f4netdir_getbyname\fP(3N), \f4getnetconfig\fP(3N), \f4getnetpath\fP(3N), \f4netconfig\fP(4)
.br
\f2Network Programmer's Guide\f1
.br
\f2System Administrator's Guide\f1
