'\" te .\" Copyright 1989 AT&T .\" Copyright (C) 1999, Sun Microsystems, Inc. All Rights Reserved .\" 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. .\" 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. .\" 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] .TH netconfig 4 "18 Nov 2003" "SunOS 5.11" "File Formats" .SH NAME netconfig \- network configuration database .SH SYNOPSIS .LP .nf \fB/etc/netconfig\fR .fi .SH DESCRIPTION .sp .LP The network configuration database, \fB/etc/netconfig\fR, is a system file used to store information about networks that are connected to the system. The \fBnetconfig\fR database and the routines that access it (see \fBgetnetconfig\fR(3NSL)) are part of the Network Selection component. The Network Selection component also includes \fBgetnetpath\fR(3NSL) routines to provide application-specific network search paths. These routines access the \fBnetconfig\fR database based on the environment variable \fBNETPATH\fR. See \fBenviron\fR(5). .sp .LP \fBnetconfig\fR 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 ``\fB\e\fR\fIblank\fR'' or ``\fB\e\fR\fItab\fR''. Backslashes may be embedded as ``\fB\e\e\fR\&''. Lines in \fB/etc/netconfig\fR that begin with a \fB#\fR (hash) in column 1 are treated as comments. .sp .LP Each of the valid lines in the \fBnetconfig\fR database correspond to an available transport. Each entry is of the form: .sp .in +2 .nf network ID semantics flag protocol-family \e protocol-name network-device translation-libraries .fi .in -2 .sp .ne 2 .mk .na \fB\fInetwork ID\fR\fR .ad .RS 25n .rt A string used to uniquely identify a network. \fInetwork ID\fR 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 \fInetwork ID\fRs on a system must be unique. .RE .sp .ne 2 .mk .na \fB\fIsemantics\fR\fR .ad .RS 25n .rt The \fIsemantics\fR field is a string identifying the ``semantics'' of the network, that is, the set of services it supports, by identifying the service interface it provides. The \fIsemantics\fR field is mandatory. The following semantics are recognized. .sp .ne 2 .mk .na \fB\fBtpi_clts\fR\fR .ad .RS 16n .rt Transport Provider Interface, connectionless .RE .sp .ne 2 .mk .na \fB\fBtpi_cots\fR\fR .ad .RS 16n .rt Transport Provider Interface, connection oriented .RE .sp .ne 2 .mk .na \fB\fBtpi_cots_ord\fR\fR .ad .RS 16n .rt Transport Provider Interface, connection oriented, supports orderly release. .RE .RE .sp .ne 2 .mk .na \fB\fIflag\fR\fR .ad .RS 25n .rt The \fIflag\fR field records certain two-valued (``true'' and ``false'') attributes of networks. \fIflag\fR 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.'' ``\fB-\fR'' indicates that none of the attributes are present. Only one character is currently recognized: .sp .ne 2 .mk .na \fB\fBv\fR\fR .ad .RS 5n .rt Visible (``default'') network. Used when the environment variable \fBNETPATH\fR is unset. .RE .RE .sp .ne 2 .mk .na \fB\fIprotocol family\fR\fR .ad .RS 25n .rt The \fIprotocol family\fR and \fIprotocol name\fR fields are provided for protocol-specific applications. The \fIprotocol family\fR field contains a string that identifies a protocol family. The \fIprotocol family\fR identifier follows the same rules as those for \fInetwork ID\fRs; the string consists of non-null characters, it has a length of at least \fB1\fR, and there is no maximum length specified. A ``\fB\(mi\fR\&'' in the \fIprotocol family\fR field indicates that no protocol family identifier applies (the network is experimental). The following are examples: .sp .ne 2 .mk .na \fB\fBloopback\fR\fR .ad .RS 13n .rt Loopback (local to host). .RE .sp .ne 2 .mk .na \fB\fBinet\fR\fR .ad .RS 13n .rt Internetwork: UDP, TCP, and the like. .RE .sp .ne 2 .mk .na \fB\fBinet6\fR\fR .ad .RS 13n .rt Internetwork over IPv6: UDP, TCP, and the like. .RE .sp .ne 2 .mk .na \fB\fBimplink\fR\fR .ad .RS 13n .rt ARPANET imp addresses .RE .sp .ne 2 .mk .na \fB\fBpup\fR\fR .ad .RS 13n .rt PUP protocols: for example, BSP .RE .sp .ne 2 .mk .na \fB\fBchaos\fR\fR .ad .RS 13n .rt MIT CHAOS protocols .RE .sp .ne 2 .mk .na \fB\fBns\fR\fR .ad .RS 13n .rt XEROX NS protocols .RE .sp .ne 2 .mk .na \fB\fBnbs\fR\fR .ad .RS 13n .rt NBS protocols .RE .sp .ne 2 .mk .na \fB\fBecma\fR\fR .ad .RS 13n .rt European Computer Manufacturers Association .RE .sp .ne 2 .mk .na \fB\fBdatakit\fR\fR .ad .RS 13n .rt DATAKIT protocols .RE .sp .ne 2 .mk .na \fB\fBccitt\fR\fR .ad .RS 13n .rt CCITT protocols, X.25, and the like. .RE .sp .ne 2 .mk .na \fB\fBsna\fR\fR .ad .RS 13n .rt IBM SNA .RE .sp .ne 2 .mk .na \fB\fBdecnet\fR\fR .ad .RS 13n .rt DECNET .RE .sp .ne 2 .mk .na \fB\fBdli\fR\fR .ad .RS 13n .rt Direct data link interface .RE .sp .ne 2 .mk .na \fB\fBlat\fR\fR .ad .RS 13n .rt LAT .RE .sp .ne 2 .mk .na \fB\fBhylink\fR\fR .ad .RS 13n .rt NSC Hyperchannel .RE .sp .ne 2 .mk .na \fB\fBappletalk\fR\fR .ad .RS 13n .rt Apple Talk .RE .sp .ne 2 .mk .na \fB\fBnit\fR\fR .ad .RS 13n .rt Network Interface Tap .RE .sp .ne 2 .mk .na \fB\fBieee802\fR\fR .ad .RS 13n .rt IEEE 802.2; also ISO 8802 .RE .sp .ne 2 .mk .na \fB\fBosi\fR\fR .ad .RS 13n .rt Umbrella for all families used by OSI (for example, protosw lookup) .RE .sp .ne 2 .mk .na \fB\fBx25\fR\fR .ad .RS 13n .rt CCITT X.25 in particular .RE .sp .ne 2 .mk .na \fB\fBosinet\fR\fR .ad .RS 13n .rt AFI = 47, IDI = 4 .RE .sp .ne 2 .mk .na \fB\fBgosip\fR\fR .ad .RS 13n .rt U.S. Government OSI .RE .RE .sp .ne 2 .mk .na \fB\fIprotocol name\fR\fR .ad .RS 25n .rt The \fIprotocol name\fR field contains a string that identifies a protocol. The \fIprotocol name\fR identifier follows the same rules as those for \fInetwork ID\fRs; that is, the string consists of non-NULL characters, it has a length of at least \fB1\fR, and there is no maximum length specified. A ``\fB\(mi\fR\&'' indicates that none of the names listed apply. The following protocol names are recognized. .sp .ne 2 .mk .na \fB\fBtcp\fR\fR .ad .RS 8n .rt Transmission Control Protocol .RE .sp .ne 2 .mk .na \fB\fBudp\fR\fR .ad .RS 8n .rt User Datagram Protocol .RE .sp .ne 2 .mk .na \fB\fBicmp\fR\fR .ad .RS 8n .rt Internet Control Message Protocol .RE .RE .sp .ne 2 .mk .na \fB\fInetwork device\fR\fR .ad .RS 25n .rt The \fInetwork device\fR is the full pathname of the device used to connect to the transport provider. Typically, this device will be in the \fB/dev\fR directory. The \fInetwork device\fR must be specified. .RE .sp .ne 2 .mk .na \fB\fItranslation libraries\fR\fR .ad .RS 25n .rt The \fIname-to-address translation libraries\fR support a ``directory service'' (a name-to-address mapping service) for the network. A ``\fB\(mi\fR\&'' in this field indicates the absence of any \fItranslation libraries\fR. This has a special meaning for networks of the protocol family \fBinet :\fR its name-to-address mapping is provided by the name service switch based on the entries for \fBhosts\fR and \fBservices\fR in \fBnsswitch.conf\fR(4). For networks of other families, a ``\fB\(mi\fR\&'' indicates non-functional name-to-address mapping. Otherwise, this field consists of a comma-separated list of pathnames to dynamically linked libraries. The pathname of the library can be either absolute or relative. See \fBdlopen\fR(3C). .RE .sp .LP Each field corresponds to an element in the \fBstruct netconfig\fR structure. \fBstruct netconfig\fR and the identifiers described on this manual page are defined in <\fBnetconfig.h\fR>. This structure includes the following members: .sp .ne 2 .mk .na \fB\fBchar *\fR\fInc_netid\fR\fR .ad .RS 30n .rt Network ID, including \fBNULL\fR terminator. .RE .sp .ne 2 .mk .na \fB\fBunsigned long\fR \fInc_semantics\fR\fR .ad .RS 30n .rt Semantics. .RE .sp .ne 2 .mk .na \fB\fBunsigned long\fR \fInc_flag\fR\fR .ad .RS 30n .rt Flags. .RE .sp .ne 2 .mk .na \fB\fBchar *\fR\fInc_protofmly\fR\fR .ad .RS 30n .rt Protocol family. .RE .sp .ne 2 .mk .na \fB\fBchar *\fR\fInc_proto\fR\fR .ad .RS 30n .rt Protocol name. .RE .sp .ne 2 .mk .na \fB\fBchar *\fR\fInc_device\fR\fR .ad .RS 30n .rt Full pathname of the network device. .RE .sp .ne 2 .mk .na \fB\fBunsigned long\fR \fInc_nlookups\fR\fR .ad .RS 30n .rt Number of directory lookup libraries. .RE .sp .ne 2 .mk .na \fB\fBchar **\fR\fInc_lookups\fR\fR .ad .RS 30n .rt Names of the name-to-address translation libraries. .RE .sp .ne 2 .mk .na \fB\fBunsigned long\fR \fInc_unused[9]\fR\fR .ad .RS 30n .rt Reserved for future expansion. .RE .sp .LP The \fInc_semantics\fR field takes the following values, corresponding to the semantics identified above: .br .in +2 \fBNC_TPI_CLTS\fR .in -2 .br .in +2 \fBNC_TPI_COTS\fR .in -2 .br .in +2 \fBNC_TPI_COTS_ORD\fR .in -2 .sp .LP The \fInc_flag\fR field is a bitfield. The following bit, corresponding to the attribute identified above, is currently recognized. \fBNC_NOFLAG\fR indicates the absence of any attributes. .sp .in +2 .nf \fBNC_VISIBLE\fR .fi .in -2 .SH EXAMPLES .LP \fBExample 1 \fRA Sample \fBnetconfig\fR File .sp .LP Below is a sample \fBnetconfig\fR file: .sp .in +2 .nf # # The "Network Configuration" File. # # Each entry is of the form: # # # # # The "-" in 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 .fi .in -2 .SH FILES .sp .ne 2 .mk .na \fB<\fBnetconfig.h\fR>\fR .ad .RS 17n .rt .RE .SH SEE ALSO .sp .LP \fBdlopen\fR(3C), \fBgetnetconfig\fR(3NSL), \fBgetnetpath\fR(3NSL), \fBnsswitch.conf\fR(4) .sp .LP \fISystem Administration Guide: IP Services\fR