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