2002-01-21 20:44:45 +03:00
|
|
|
.\" $NetBSD: netconfig.5,v 1.6 2002/01/21 17:44:45 wiz Exp $
|
2000-11-17 12:43:06 +03:00
|
|
|
.Dd November 17, 2000
|
2000-06-16 00:05:51 +04:00
|
|
|
.Dt NETCONFIG 5
|
2000-06-03 03:18:31 +04:00
|
|
|
.Sh NAME
|
|
|
|
.Nm netconfig
|
|
|
|
.Nd network configuration data base
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Fa /etc/netconfig
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
2000-11-08 16:18:28 +03:00
|
|
|
file defines a list of
|
|
|
|
.Dq transport names ,
|
|
|
|
describing their semantics and protocol. In
|
|
|
|
.Nx ,
|
|
|
|
this file is only used by the RPC library code.
|
|
|
|
.Pp
|
|
|
|
Entries have the following format:
|
|
|
|
.Dl network_id semantics flags family protoname device libraries
|
|
|
|
.Pp
|
2000-06-03 03:18:31 +04:00
|
|
|
Entries consist of the following fields:
|
|
|
|
.Pp
|
2000-11-08 16:18:28 +03:00
|
|
|
.Bl -tag -width network_id
|
2000-11-17 12:43:06 +03:00
|
|
|
.It Em network_id
|
2000-06-03 03:18:31 +04:00
|
|
|
The name of the transport described.
|
2000-11-17 12:43:06 +03:00
|
|
|
.It Em semantics
|
2000-06-03 03:18:31 +04:00
|
|
|
Describes the semantics of the transport. This can be one of:
|
2000-11-08 16:18:28 +03:00
|
|
|
.Bl -tag -width tpi_cots_ord -offset indent
|
|
|
|
.It Sy tpi_clts
|
2000-06-03 03:18:31 +04:00
|
|
|
Connectionless transport.
|
2000-11-08 16:18:28 +03:00
|
|
|
.It Sy tpi_cots
|
2000-06-03 03:18:31 +04:00
|
|
|
Connection-oriented transport
|
2000-11-08 16:18:28 +03:00
|
|
|
.It Sy tpi_cots_ord
|
2000-06-03 03:18:31 +04:00
|
|
|
Connection-oriented, ordered transport.
|
2000-11-08 16:18:28 +03:00
|
|
|
.It Sy tpi_raw
|
2000-06-03 03:18:31 +04:00
|
|
|
A raw connection.
|
|
|
|
.El
|
2000-11-17 12:43:06 +03:00
|
|
|
.It Em flags
|
2000-11-08 16:18:28 +03:00
|
|
|
This field is either blank (specified by
|
|
|
|
.Dq \&- ) ,
|
|
|
|
or contains a
|
|
|
|
.Dq v ,
|
|
|
|
meaning visible to the
|
2000-06-03 03:18:31 +04:00
|
|
|
.Xr getnetconfig 3
|
|
|
|
function.
|
2000-11-17 12:43:06 +03:00
|
|
|
.It Em family
|
2000-06-03 03:18:31 +04:00
|
|
|
The protocol family of the transport. This is currently one of:
|
2000-11-08 16:18:28 +03:00
|
|
|
.Bl -tag -width loopback -offset indent
|
|
|
|
.It Sy inet6
|
|
|
|
The IPv6
|
|
|
|
.Pq Dv PF_INET6
|
2000-06-03 03:18:31 +04:00
|
|
|
family of protocols.
|
2000-11-08 16:18:28 +03:00
|
|
|
.It Sy inet
|
|
|
|
The IPv4
|
|
|
|
.Pq Dv PF_INET
|
2000-06-03 03:18:31 +04:00
|
|
|
family of protocols.
|
2000-11-08 16:18:28 +03:00
|
|
|
.It Sy loopback
|
2000-06-03 03:18:31 +04:00
|
|
|
The
|
|
|
|
.Dv PF_LOCAL
|
|
|
|
protocol family.
|
|
|
|
.El
|
2000-11-17 12:43:06 +03:00
|
|
|
.It Em protoname
|
2000-06-03 03:18:31 +04:00
|
|
|
The name of the protocol used for this transport. Can currently be either
|
|
|
|
.Nm udp ,
|
2001-09-08 05:29:04 +04:00
|
|
|
.Nm tcp
|
2000-06-03 03:18:31 +04:00
|
|
|
or empty.
|
2000-11-17 12:43:06 +03:00
|
|
|
.It Em device
|
2000-11-08 16:18:28 +03:00
|
|
|
This field is always empty in
|
|
|
|
.Nx .
|
2000-11-17 12:43:06 +03:00
|
|
|
.It Em libraries
|
2000-11-08 16:18:28 +03:00
|
|
|
This field is always empty in
|
|
|
|
.Nx .
|
2000-06-03 03:18:31 +04:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The order of entries in this file will determine which transport will
|
|
|
|
be preferred by the RPC library code, given a match on a specified
|
|
|
|
network type. For example, if a sample network config file would
|
|
|
|
look like this:
|
|
|
|
.Pp
|
2000-11-08 16:18:28 +03:00
|
|
|
.Bd -literal -offset indent
|
2000-06-03 03:18:31 +04:00
|
|
|
udp6 tpi_clts v inet6 udp - -
|
|
|
|
tcp6 tpi_cots_ord v inet6 tcp - -
|
|
|
|
udp tpi_clts v inet udp - -
|
|
|
|
tcp tpi_cots_ord v inet tcp - -
|
|
|
|
rawip tpi_raw - inet - - -
|
|
|
|
local tpi_cots_ord - loopback - - -
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
then using the network type
|
|
|
|
.Nm udp
|
|
|
|
in calls to the RPC library function (see
|
2000-11-08 16:18:28 +03:00
|
|
|
.Xr rpc 3 )
|
|
|
|
will make the code first try
|
2000-06-03 03:18:31 +04:00
|
|
|
.Nm udp6 ,
|
|
|
|
and then
|
|
|
|
.Nm udp .
|
2000-06-16 00:05:51 +04:00
|
|
|
.Pp
|
|
|
|
.Xr getnetconfig 3
|
|
|
|
and associated functions will parse this file and return structures of
|
|
|
|
the following format:
|
|
|
|
.Bd -literal
|
|
|
|
struct netconfig {
|
|
|
|
char *nc_netid; /* Network ID */
|
|
|
|
unsigned long nc_semantics; /* Semantics (see below) */
|
|
|
|
unsigned long nc_flag; /* Flags (see below) */
|
|
|
|
char *nc_protofmly; /* Protocol family */
|
|
|
|
char *nc_proto; /* Protocol name */
|
|
|
|
char *nc_device; /* Network device pathname (unused) */
|
|
|
|
unsigned long nc_nlookups; /* Number of lookup libs (unused) */
|
|
|
|
char **nc_lookups; /* Names of the libraries (unused) */
|
|
|
|
unsigned long nc_unused[9]; /* reserved */
|
|
|
|
};
|
|
|
|
.Ed
|
2001-09-11 05:01:56 +04:00
|
|
|
.Sh FILES
|
|
|
|
.Nm /etc/netconfig
|
2000-06-03 03:18:31 +04:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr getnetconfig 3 ,
|
|
|
|
.Xr getnetpath 3
|