1NETCONFIG(5) BSD File Formats Manual NETCONFIG(5)
2
4 netconfig — network configuration data base
5
7 /etc/netconfig
8
10 The netconfig file defines a list of “transport names”, describing their
11 semantics and protocol. In FreeBSD, this file is only used by the RPC
12 library code.
13
14 Entries have the following format:
15
16 network_id semantics flags family protoname device libraries
17
18 Entries consist of the following fields:
19
20 network_id The name of the transport described.
21
22 semantics Describes the semantics of the transport. This can be one
23 of:
24
25 tpi_clts Connectionless transport.
26
27 tpi_cots Connection-oriented transport
28
29 tpi_cots_ord Connection-oriented, ordered transport.
30
31 tpi_raw A raw connection.
32
33 flags This field is either blank (specified by “-”), or contains a
34 “v”, meaning visible to the getnetconfig(3) function.
35
36 family The protocol family of the transport. This is currently one
37 of:
38
39 inet6 The IPv6 (PF_INET6) family of protocols.
40
41 inet The IPv4 (PF_INET) family of protocols.
42
43 loopback The PF_LOCAL protocol family.
44
45 protoname The name of the protocol used for this transport. Can cur‐
46 rently be either udp, tcp or empty.
47
48 device This field is always empty in FreeBSD.
49
50 libraries This field is always empty in FreeBSD.
51
52 The order of entries in this file will determine which transport will be
53 preferred by the RPC library code, given a match on a specified network
54 type. For example, if a sample network config file would look like this:
55
56 udp6 tpi_clts v inet6 udp - -
57 tcp6 tpi_cots_ord v inet6 tcp - -
58 udp tpi_clts v inet udp - -
59 tcp tpi_cots_ord v inet tcp - -
60 rawip tpi_raw - inet - - -
61 local tpi_cots_ord - loopback - - -
62
63 then using the network type udp in calls to the RPC library function (see
64 rpc(3)) will make the code first try udp6, and then udp.
65
66 getnetconfig(3) and associated functions will parse this file and return
67 structures of the following format:
68
69 struct netconfig {
70 char *nc_netid; /* Network ID */
71 unsigned long nc_semantics; /* Semantics (see below) */
72 unsigned long nc_flag; /* Flags (see below) */
73 char *nc_protofmly; /* Protocol family */
74 char *nc_proto; /* Protocol name */
75 char *nc_device; /* Network device pathname (unused) */
76 unsigned long nc_nlookups; /* Number of lookup libs (unused) */
77 char **nc_lookups; /* Names of the libraries (unused) */
78 unsigned long nc_unused[9]; /* reserved */
79 };
80
82 /etc/netconfig
83
85 getnetconfig(3), getnetpath(3)
86
87BSD November 17, 2000 BSD