2 .\" Copyright 1989 AT&T
3 .\" Copyright (C) 1999, Sun Microsystems, Inc. All Rights Reserved
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH NETCONFIG 4 "Nov 18, 2003"
9 netconfig \- network configuration database
19 The network configuration database, \fB/etc/netconfig\fR, is a system file used
20 to store information about networks that are connected to the system. The
21 \fBnetconfig\fR database and the routines that access it (see
22 \fBgetnetconfig\fR(3NSL)) are part of the Network Selection component. The
23 Network Selection component also includes \fBgetnetpath\fR(3NSL) routines to
24 provide application-specific network search paths. These routines access the
25 \fBnetconfig\fR database based on the environment variable \fBNETPATH\fR. See
29 \fBnetconfig\fR contains an entry for each network available on the system.
30 Entries are separated by newlines. Fields are separated by whitespace and occur
31 in the order in which they are described below. Whitespace can be embedded as
32 ``\fB\e\fR\fIblank\fR'' or ``\fB\e\fR\fItab\fR''. Backslashes may be embedded
33 as ``\fB\e\e\fR\&''. Lines in \fB/etc/netconfig\fR that begin with a \fB#\fR
34 (hash) in column 1 are treated as comments.
37 Each of the valid lines in the \fBnetconfig\fR database correspond to an
38 available transport. Each entry is of the form:
42 network ID semantics flag protocol-family \e
43 protocol-name network-device translation-libraries
50 \fB\fInetwork ID\fR\fR
53 A string used to uniquely identify a network. \fInetwork ID\fR consists of
54 non-null characters, and has a length of at least 1. No maximum length is
55 specified. This namespace is locally significant and the local system
56 administrator is the naming authority. All \fInetwork ID\fRs on a system must
66 The \fIsemantics\fR field is a string identifying the ``semantics'' of the
67 network, that is, the set of services it supports, by identifying the service
68 interface it provides. The \fIsemantics\fR field is mandatory. The following
69 semantics are recognized.
76 Transport Provider Interface, connectionless
85 Transport Provider Interface, connection oriented
91 \fB\fBtpi_cots_ord\fR\fR
94 Transport Provider Interface, connection oriented, supports orderly release.
105 The \fIflag\fR field records certain two-valued (``true'' and ``false'')
106 attributes of networks. \fIflag\fR is a string composed of a combination of
107 characters, each of which indicates the value of the corresponding attribute.
108 If the character is present, the attribute is ``true.'' If the character is
109 absent, the attribute is ``false.'' ``\fB-\fR'' indicates that none of the
110 attributes are present. Only one character is currently recognized:
117 Visible (``default'') network. Used when the environment variable \fBNETPATH\fR
126 \fB\fIprotocol family\fR\fR
129 The \fIprotocol family\fR and \fIprotocol name\fR fields are provided for
130 protocol-specific applications. The \fIprotocol family\fR field contains a
131 string that identifies a protocol family. The \fIprotocol family\fR identifier
132 follows the same rules as those for \fInetwork ID\fRs; the string consists of
133 non-null characters, it has a length of at least \fB1\fR, and there is no
134 maximum length specified. A ``\fB\(mi\fR\&'' in the \fIprotocol family\fR field
135 indicates that no protocol family identifier applies (the network is
136 experimental). The following are examples:
143 Loopback (local to host).
152 Internetwork: UDP, TCP, and the like.
161 Internetwork over IPv6: UDP, TCP, and the like.
170 ARPANET imp addresses
179 PUP protocols: for example, BSP
215 European Computer Manufacturers Association
233 CCITT protocols, X.25, and the like.
260 Direct data link interface
284 \fB\fBappletalk\fR\fR
296 Network Interface Tap
305 IEEE 802.2; also ISO 8802
314 Umbrella for all families used by OSI (for example, protosw lookup)
323 CCITT X.25 in particular
349 \fB\fIprotocol name\fR\fR
352 The \fIprotocol name\fR field contains a string that identifies a protocol. The
353 \fIprotocol name\fR identifier follows the same rules as those for \fInetwork
354 ID\fRs; that is, the string consists of non-NULL characters, it has a length of
355 at least \fB1\fR, and there is no maximum length specified. A ``\fB\(mi\fR\&''
356 indicates that none of the names listed apply. The following protocol names are
364 Transmission Control Protocol
373 User Datagram Protocol
382 Internet Control Message Protocol
390 \fB\fInetwork device\fR\fR
393 The \fInetwork device\fR is the full pathname of the device used to connect to
394 the transport provider. Typically, this device will be in the \fB/dev\fR
395 directory. The \fInetwork device\fR must be specified.
401 \fB\fItranslation libraries\fR\fR
404 The \fIname-to-address translation libraries\fR support a ``directory service''
405 (a name-to-address mapping service) for the network. A ``\fB\(mi\fR\&'' in this
406 field indicates the absence of any \fItranslation libraries\fR. This has a
407 special meaning for networks of the protocol family \fBinet :\fR its
408 name-to-address mapping is provided by the name service switch based on the
409 entries for \fBhosts\fR and \fBservices\fR in \fBnsswitch.conf\fR(4). For
410 networks of other families, a ``\fB\(mi\fR\&'' indicates non-functional
411 name-to-address mapping. Otherwise, this field consists of a comma-separated
412 list of pathnames to dynamically linked libraries. The pathname of the library
413 can be either absolute or relative. See \fBdlopen\fR(3C).
418 Each field corresponds to an element in the \fBstruct netconfig\fR structure.
419 \fBstruct netconfig\fR and the identifiers described on this manual page are
420 defined in <\fBnetconfig.h\fR>. This structure includes the following members:
424 \fB\fBchar *\fR\fInc_netid\fR\fR
427 Network ID, including \fBNULL\fR terminator.
433 \fB\fBunsigned long\fR \fInc_semantics\fR\fR
442 \fB\fBunsigned long\fR \fInc_flag\fR\fR
451 \fB\fBchar *\fR\fInc_protofmly\fR\fR
460 \fB\fBchar *\fR\fInc_proto\fR\fR
469 \fB\fBchar *\fR\fInc_device\fR\fR
472 Full pathname of the network device.
478 \fB\fBunsigned long\fR \fInc_nlookups\fR\fR
481 Number of directory lookup libraries.
487 \fB\fBchar **\fR\fInc_lookups\fR\fR
490 Names of the name-to-address translation libraries.
496 \fB\fBunsigned long\fR \fInc_unused[9]\fR\fR
499 Reserved for future expansion.
504 The \fInc_semantics\fR field takes the following values, corresponding to the
505 semantics identified above:
516 \fBNC_TPI_COTS_ORD\fR
520 The \fInc_flag\fR field is a bitfield. The following bit, corresponding to the
521 attribute identified above, is currently recognized. \fBNC_NOFLAG\fR indicates
522 the absence of any attributes.
532 \fBExample 1 \fRA Sample \fBnetconfig\fR File
535 Below is a sample \fBnetconfig\fR file:
541 # The "Network Configuration" File.
543 # Each entry is of the form:
545 # <networkid> <semantics> <flags> <protofamily> <protoname> <device>
548 # The "-" in <nametoaddrlibs> for inet family transports indicates
549 # redirection to the name service switch policies for "hosts" and
550 # "services". The "-" may be replaced by nametoaddr libraries that
551 # comply with the SVr4 specs, in which case the name service switch
552 # will not be used for netdir_getbyname, netdir_getbyaddr,
553 # gethostbyname, gethostbyaddr, getservbyname, and getservbyport.
554 # There are no nametoaddr_libs for the inet family in Solaris anymore.
556 udp6 tpi_clts v inet6 udp /dev/udp6 -
557 tcp6 tpi_cots_ord v inet6 tcp /dev/tcp6 -
558 udp tpi_clts v inet udp /dev/udp -
559 tcp tpi_cots_ord v inet tcp /dev/tcp -
560 rawip tpi_raw - inet - /dev/rawip -
561 ticlts tpi_clts v loopback - /dev/ticlts straddr.so
562 ticotsord tpi_cots_ord v loopback - /dev/ticotsord straddr.so
563 ticots tpi_cots v loopback - /dev/ticots straddr.so
571 \fB<\fBnetconfig.h\fR>\fR
580 \fBdlopen\fR(3C), \fBgetnetconfig\fR(3NSL), \fBgetnetpath\fR(3NSL),
581 \fBnsswitch.conf\fR(4)
584 \fISystem Administration Guide: IP Services\fR