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