1*39d81999Snjoly.\" $NetBSD: netconfig.5,v 1.9 2013/03/15 19:32:31 njoly Exp $ 2ff1595ffSlukem.Dd November 17, 2000 3fbe0b56aSfvdl.Dt NETCONFIG 5 410354fe2Sjoerg.Os 5fbe0b56aSfvdl.Sh NAME 6fbe0b56aSfvdl.Nm netconfig 7fbe0b56aSfvdl.Nd network configuration data base 8fbe0b56aSfvdl.Sh SYNOPSIS 9*39d81999Snjoly.Pa /etc/netconfig 10fbe0b56aSfvdl.Sh DESCRIPTION 11fbe0b56aSfvdlThe 12fbe0b56aSfvdl.Nm 137617fc31Slukemfile defines a list of 147617fc31Slukem.Dq transport names , 15088ed78aSwizdescribing their semantics and protocol. 16088ed78aSwizIn 177617fc31Slukem.Nx , 187617fc31Slukemthis file is only used by the RPC library code. 197617fc31Slukem.Pp 207617fc31SlukemEntries have the following format: 217617fc31Slukem.Dl network_id semantics flags family protoname device libraries 227617fc31Slukem.Pp 23fbe0b56aSfvdlEntries consist of the following fields: 24fbe0b56aSfvdl.Pp 257617fc31Slukem.Bl -tag -width network_id 26ff1595ffSlukem.It Em network_id 27fbe0b56aSfvdlThe name of the transport described. 28ff1595ffSlukem.It Em semantics 29fbe0b56aSfvdlDescribes the semantics of the transport. This can be one of: 307617fc31Slukem.Bl -tag -width tpi_cots_ord -offset indent 317617fc31Slukem.It Sy tpi_clts 32fbe0b56aSfvdlConnectionless transport. 337617fc31Slukem.It Sy tpi_cots 34fbe0b56aSfvdlConnection-oriented transport 357617fc31Slukem.It Sy tpi_cots_ord 36fbe0b56aSfvdlConnection-oriented, ordered transport. 377617fc31Slukem.It Sy tpi_raw 38fbe0b56aSfvdlA raw connection. 39fbe0b56aSfvdl.El 40ff1595ffSlukem.It Em flags 417617fc31SlukemThis field is either blank (specified by 427617fc31Slukem.Dq \&- ) , 437617fc31Slukemor contains a 447617fc31Slukem.Dq v , 457617fc31Slukemmeaning visible to the 46fbe0b56aSfvdl.Xr getnetconfig 3 47fbe0b56aSfvdlfunction. 48ff1595ffSlukem.It Em family 49088ed78aSwizThe protocol family of the transport. 50088ed78aSwizThis is currently one of: 517617fc31Slukem.Bl -tag -width loopback -offset indent 527617fc31Slukem.It Sy inet6 537617fc31SlukemThe IPv6 547617fc31Slukem.Pq Dv PF_INET6 55fbe0b56aSfvdlfamily of protocols. 567617fc31Slukem.It Sy inet 577617fc31SlukemThe IPv4 587617fc31Slukem.Pq Dv PF_INET 59fbe0b56aSfvdlfamily of protocols. 607617fc31Slukem.It Sy loopback 61fbe0b56aSfvdlThe 62fbe0b56aSfvdl.Dv PF_LOCAL 63fbe0b56aSfvdlprotocol family. 64fbe0b56aSfvdl.El 65ff1595ffSlukem.It Em protoname 66088ed78aSwizThe name of the protocol used for this transport. 67088ed78aSwizCan currently be either 68fbe0b56aSfvdl.Nm udp , 69088ed78aSwiz.Nm tcp , 70fbe0b56aSfvdlor empty. 71ff1595ffSlukem.It Em device 727617fc31SlukemThis field is always empty in 737617fc31Slukem.Nx . 74ff1595ffSlukem.It Em libraries 757617fc31SlukemThis field is always empty in 767617fc31Slukem.Nx . 77fbe0b56aSfvdl.El 78fbe0b56aSfvdl.Pp 79fbe0b56aSfvdlThe order of entries in this file will determine which transport will 80fbe0b56aSfvdlbe preferred by the RPC library code, given a match on a specified 81088ed78aSwiznetwork type. 82088ed78aSwizFor example, if a sample network config file would 83fbe0b56aSfvdllook like this: 84fbe0b56aSfvdl.Pp 857617fc31Slukem.Bd -literal -offset indent 86fbe0b56aSfvdludp6 tpi_clts v inet6 udp - - 87fbe0b56aSfvdltcp6 tpi_cots_ord v inet6 tcp - - 88fbe0b56aSfvdludp tpi_clts v inet udp - - 89fbe0b56aSfvdltcp tpi_cots_ord v inet tcp - - 90fbe0b56aSfvdlrawip tpi_raw - inet - - - 91fbe0b56aSfvdllocal tpi_cots_ord - loopback - - - 92fbe0b56aSfvdl.Ed 93fbe0b56aSfvdl.Pp 94fbe0b56aSfvdlthen using the network type 95fbe0b56aSfvdl.Nm udp 96fbe0b56aSfvdlin calls to the RPC library function (see 977617fc31Slukem.Xr rpc 3 ) 987617fc31Slukemwill make the code first try 99fbe0b56aSfvdl.Nm udp6 , 100fbe0b56aSfvdland then 101fbe0b56aSfvdl.Nm udp . 102fbe0b56aSfvdl.Pp 103fbe0b56aSfvdl.Xr getnetconfig 3 104fbe0b56aSfvdland associated functions will parse this file and return structures of 105fbe0b56aSfvdlthe following format: 106fbe0b56aSfvdl.Bd -literal 107fbe0b56aSfvdlstruct netconfig { 108fbe0b56aSfvdl char *nc_netid; /* Network ID */ 109fbe0b56aSfvdl unsigned long nc_semantics; /* Semantics (see below) */ 110fbe0b56aSfvdl unsigned long nc_flag; /* Flags (see below) */ 111fbe0b56aSfvdl char *nc_protofmly; /* Protocol family */ 112fbe0b56aSfvdl char *nc_proto; /* Protocol name */ 113fbe0b56aSfvdl char *nc_device; /* Network device pathname (unused) */ 114fbe0b56aSfvdl unsigned long nc_nlookups; /* Number of lookup libs (unused) */ 115fbe0b56aSfvdl char **nc_lookups; /* Names of the libraries (unused) */ 116fbe0b56aSfvdl unsigned long nc_unused[9]; /* reserved */ 117fbe0b56aSfvdl}; 118fbe0b56aSfvdl.Ed 11942704c41Swiz.Sh FILES 120*39d81999Snjoly.Pa /etc/netconfig 121fbe0b56aSfvdl.Sh SEE ALSO 122fbe0b56aSfvdl.Xr getnetconfig 3 , 123fbe0b56aSfvdl.Xr getnetpath 3 124