xref: /netbsd-src/share/man/man5/netconfig.5 (revision 481fca6e59249d8ffcf24fef7cfbe7b131bfb080)
1.\"	$NetBSD: netconfig.5,v 1.1 2000/06/15 20:05:54 fvdl Exp $
2.Dd June 2, 2000
3.Dt NETCONFIG 5
4.Sh NAME
5.Nm netconfig
6.Nd network configuration data base
7.Sh SYNOPSIS
8.Fa /etc/netconfig
9.Sh DESCRIPTION
10The
11.Nm
12file defines a list of ``transport names'', describing their semantics
13and protocol. In NetBSD, this file is only used by the RPC library code.
14Entries consist of the following fields:
15.Pp
16.Bl -tag -width indent
17.It network_id
18The name of the transport described.
19.It semantics
20Describes the semantics of the transport. This can be one of:
21.Bl -tag -width ident
22.It Nm tpi_clts
23Connectionless transport.
24.It Nm tpi_cots
25Connection-oriented transport
26.It Nm tpi_cots_ord
27Connection-oriented, ordered transport.
28.It Nm tpi_raw
29A raw connection.
30.El
31.It flags
32This field is  either blank (``-''), or contains a ``v'', meaning visible
33to the
34.Xr getnetconfig 3
35function.
36.It protofamily
37The protocol family of the transport. This is currently one of:
38.Bl -tag -width indent
39.It Nm inet6
40The IPv6 (
41.Dv PF_INET6 )
42family of protocols.
43.It Nm inet
44The IPv4 (
45.Dv PF_INET )
46family of protocols.
47.It Nm loopback
48The
49.Dv PF_LOCAL
50protocol family.
51.El
52.It protoname
53The name of the protocol used for this transport. Can currently be either
54.Nm udp ,
55.Nm tcp
56or empty.
57.It device
58This field is always empty in NetBSD.
59.It nametoaddr_libs
60This field is always empty in NetBSD.
61.El
62.Pp
63The order of entries in this file will determine which transport will
64be preferred by the RPC library code, given a match on a specified
65network type. For example, if a sample network config file would
66look like this:
67.Pp
68.Bd -literal
69udp6       tpi_clts      v     inet6    udp     -       -
70tcp6       tpi_cots_ord  v     inet6    tcp     -       -
71udp        tpi_clts      v     inet     udp     -       -
72tcp        tpi_cots_ord  v     inet     tcp     -       -
73rawip      tpi_raw       -     inet      -      -       -
74local      tpi_cots_ord  -     loopback  -      -       -
75.Ed
76.Pp
77then using the network type
78.Nm udp
79in calls to the RPC library function (see
80.Xr rpc 3
81) will make the code first try
82.Nm udp6 ,
83and then
84.Nm udp .
85.Pp
86.Xr getnetconfig 3
87and associated functions will parse this file and return structures of
88the following format:
89.Bd -literal
90struct netconfig {
91    char *nc_netid;              /* Network ID */
92    unsigned long nc_semantics;  /* Semantics (see below) */
93    unsigned long nc_flag;       /* Flags (see below) */
94    char *nc_protofmly;          /* Protocol family */
95    char *nc_proto;              /* Protocol name */
96    char *nc_device;             /* Network device pathname (unused) */
97    unsigned long nc_nlookups;   /* Number of lookup libs (unused) */
98    char **nc_lookups;           /* Names of the libraries (unused) */
99    unsigned long nc_unused[9];  /* reserved */
100};
101.Ed
102.Sh SEE ALSO
103.Xr getnetconfig 3 ,
104.Xr getnetpath 3
105.Sh FILES
106.Nm /etc/netconfig
107