1.\" $NetBSD: netconfig.5,v 1.9 2013/03/15 19:32:31 njoly Exp $ 2.Dd November 17, 2000 3.Dt NETCONFIG 5 4.Os 5.Sh NAME 6.Nm netconfig 7.Nd network configuration data base 8.Sh SYNOPSIS 9.Pa /etc/netconfig 10.Sh DESCRIPTION 11The 12.Nm 13file defines a list of 14.Dq transport names , 15describing their semantics and protocol. 16In 17.Nx , 18this file is only used by the RPC library code. 19.Pp 20Entries have the following format: 21.Dl network_id semantics flags family protoname device libraries 22.Pp 23Entries consist of the following fields: 24.Pp 25.Bl -tag -width network_id 26.It Em network_id 27The name of the transport described. 28.It Em semantics 29Describes the semantics of the transport. This 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 Em flags 41This field is either blank (specified by 42.Dq \&- ) , 43or contains a 44.Dq v , 45meaning visible to the 46.Xr getnetconfig 3 47function. 48.It Em 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 Em protoname 66The name of the protocol used for this transport. 67Can currently be either 68.Nm udp , 69.Nm tcp , 70or empty. 71.It Em device 72This field is always empty in 73.Nx . 74.It Em libraries 75This field is always empty in 76.Nx . 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 83look like this: 84.Pp 85.Bd -literal -offset indent 86udp6 tpi_clts v inet6 udp - - 87tcp6 tpi_cots_ord v inet6 tcp - - 88udp tpi_clts v inet udp - - 89tcp tpi_cots_ord v inet tcp - - 90rawip tpi_raw - inet - - - 91local tpi_cots_ord - loopback - - - 92.Ed 93.Pp 94then using the network type 95.Nm udp 96in calls to the RPC library function (see 97.Xr rpc 3 ) 98will make the code first try 99.Nm udp6 , 100and then 101.Nm udp . 102.Pp 103.Xr getnetconfig 3 104and associated functions will parse this file and return structures of 105the following format: 106.Bd -literal 107struct netconfig { 108 char *nc_netid; /* Network ID */ 109 unsigned long nc_semantics; /* Semantics (see below) */ 110 unsigned long nc_flag; /* Flags (see below) */ 111 char *nc_protofmly; /* Protocol family */ 112 char *nc_proto; /* Protocol name */ 113 char *nc_device; /* Network device pathname (unused) */ 114 unsigned long nc_nlookups; /* Number of lookup libs (unused) */ 115 char **nc_lookups; /* Names of the libraries (unused) */ 116 unsigned long nc_unused[9]; /* reserved */ 117}; 118.Ed 119.Sh FILES 120.Pa /etc/netconfig 121.Sh SEE ALSO 122.Xr getnetconfig 3 , 123.Xr getnetpath 3 124