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