NetBSD/share/man/man4/netconfig.4

90 lines
2.2 KiB
Groff

.\" $NetBSD: netconfig.4,v 1.1 2000/06/02 23:18:31 fvdl Exp $
.Dd June 2, 2000
.Dt NETCONFIG 4
.Sh NAME
.Nm netconfig
.Nd network configuration data base
.Sh SYNOPSIS
.Fa /etc/netconfig
.Sh DESCRIPTION
The
.Nm
file defines a list of ``transport names'', describing their semantics
and protocol. In NetBSD, this file is only used by the RPC library code.
Entries consist of the following fields:
.Pp
.Bl -tag -width indent
.It network_id
The name of the transport described.
.It semantics
Describes the semantics of the transport. This can be one of:
.Bl -tag -width ident
.It Nm tpi_clts
Connectionless transport.
.It Nm tpi_cots
Connection-oriented transport
.It Nm tpi_cots_ord
Connection-oriented, ordered transport.
.It Nm tpi_raw
A raw connection.
.El
.It flags
This field is either blank (``-''), or contains a ``v'', meaning visible
to the
.Xr getnetconfig 3
function.
.It protofamily
The protocol family of the transport. This is currently one of:
.Bl -tag -width indent
.It Nm inet6
The IPv6 (
.Dv PF_INET6 )
family of protocols.
.It Nm inet
The IPv4 (
.Dv PF_INET )
family of protocols.
.It Nm loopback
The
.Dv PF_LOCAL
protocol family.
.El
.It protoname
The name of the protocol used for this transport. Can currently be either
.Nm udp ,
.Nm tcp
or empty.
.It device
This field is always empty in NetBSD.
.It nametoaddr_libs
This field is always empty in NetBSD.
.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
.Bd -literal
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
.Xr rpc 3
) will make the code first try
.Nm udp6 ,
and then
.Nm udp .
.Sh SEE ALSO
.Xr getnetconfig 3 ,
.Xr getnetpath 3
.Sh FILES
.Nm /etc/netconfig