Convert to mdoc format.

This commit is contained in:
Mike Pritchard 1996-12-21 22:56:48 +00:00
parent e9b074c385
commit 639460dc29
4 changed files with 122 additions and 178 deletions

View File

@ -1,27 +1,25 @@
.\" @(#)bindresvport.3n 2.2 88/08/02 4.0 RPCSRC; from 1.7 88/03/14 SMI
.TH BINDRESVPORT 3 "22 november 1987"
.SH NAME
bindresvport \- bind a socket to a privileged IP port
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <netinet/in.h>
.LP
.B int bindresvport(sd, sin)
.B int sd;
.B struct sockaddr_in \(**sin;
.fi
.SH DESCRIPTION
.LP
.B bindresvport(\|)
.Dd "22 november 1987"
.Dt BINDRESVPORT 3
.Os
.Sh NAME
.Nm bindresvport
.Ndbind a socket to a privileged IP port
.Sh SYNOPSIS
.Fd #include <sys/types.h>
.Fd #include <netinet/in.h>
.Ft int
.Fn bindresvport "int sd "struct sockaddr_in **sin"
.Sh DESCRIPTION
.Nm Bindresvport
is used to bind a socket descriptor to a privileged
.SM IP
.Em IP
port, that is, a
port number in the range 0-1023.
The routine returns 0 if it is successful,
otherwise \-1 is returned and
.B errno
otherwise -1 is returned and
.Va errno
set to reflect the cause of the error.
.LP
.Pp
Only root can bind to a privileged port; this call will fail for any
other users.

View File

@ -1,108 +1,93 @@
.\" @(#)getrpcent.3n 2.2 88/08/02 4.0 RPCSRC; from 1.11 88/03/14 SMI
.TH GETRPCENT 3 "14 December 1987"
.SH NAME
getrpcent, getrpcbyname, getrpcbynumber \- get RPC entry
.SH SYNOPSIS
.nf
.ft B
#include <netdb.h>
.LP
.ft B
struct rpcent *getrpcent(\|)
.LP
.ft B
struct rpcent *getrpcbyname(name)
char *name;
.LP
.ft B
struct rpcent *getrpcbynumber(number)
int number;
.LP
.ft B
setrpcent (stayopen)
int stayopen
.LP
.ft B
endrpcent (\|)
.fi
.SH DESCRIPTION
.LP
.BR getrpcent(\|) ,
.BR getrpcbyname(\|) ,
.Dd "December 14, 1987"
.Dt GETRPCENT 3
.Sh NAME
.Os
.Nm getrpcent ,
.Nm getrpcbyname ,
.Nm getrpcbynumber
.Nd get RPC entry
.Sh SYNOPSIS
.Fd #include <netdb.h>
.Ft struct rpcent *
.Fn getrpcent
.Ft struct rpcent *
.Fn getrpcbyname "char *name"
.Ft struct rpcent *
.Fn getrpcbynumber "int number"
.Ft void
.Fn setrpcent "int stayopen"
.Ft void
.Fn endrpcent
.Sh DESCRIPTION
The
.Fn getrpcent ,
.Fn getrpcbyname ,
and
.B getrpcbynumber(\|)
each return a pointer to an object with the
.Fn getrpcbynumber
functions each return a pointer to an object with the
following structure
containing the broken-out
fields of a line in the rpc program number data base,
.BR /etc/rpc .
.RS
.LP
.nf
.ft B
.Pa /etc/rpc .
.Bd -literal
struct rpcent {
char *r_name; /* name of server for this rpc program */
char **r_aliases; /* alias list */
long r_number; /* rpc program number */
};
.ft R
.fi
.RE
.LP
.Ed
.Pp
The members of this structure are:
.RS
.PD 0
.TP 20
.B r_name
.Bl -tag -width r_aliasesxxx
.It Fa r_name
The name of the server for this rpc program.
.TP 20
.B r_aliases
.It Fa r_aliases
A zero terminated list of alternate names for the rpc program.
.TP 20
.B r_number
.It Fa r_number
The rpc program number for this service.
.PD
.RE
.LP
.B getrpcent(\|)
reads the next line of the file, opening the file if necessary.
.LP
.B getrpcent(\|)
opens and rewinds the file. If the
.I stayopen
.El
.Pp
The
.Fn getrpcent
function reads the next line of the file, opening the file if necessary.
The
.Nm getrpcent
function opens and rewinds the file. If the
.Fa stayopen
flag is non-zero,
the net data base will not be closed after each call to
.B getrpcent(\|)
.Fn getrpcent
(either directly, or indirectly through one of
the other \*(lqgetrpc\*(rq calls).
.LP
.B endrpcent
the other
.Fn getrpcent
function family.
.Pp
.Fn endrpcent
closes the file.
.LP
.B getrpcbyname(\|)
.Pp
.Fn getrpcbyname
and
.B getrpcbynumber(\|)
.Fn getrpcbynumber
sequentially search from the beginning
of the file until a matching rpc program name or
program number is found, or until end-of-file is encountered.
.SH FILES
.PD 0
.TP 20
.B /etc/rpc
.PD
.SH "SEE ALSO"
.BR rpc (5),
.BR rpcinfo (8),
.BR ypserv (8)
.SH DIAGNOSTICS
.LP
.Sh FILES
.Bl -tag -width /etc/rpc -compact
.It Pa /etc/rpc
.El
.Sh "SEE ALSO"
.Xr rpc 5 ,
.Xr rpcinfo 8 ,
.Xr ypserv 8
.Sh DIAGNOSTICS
A
.SM NULL
.Dv NULL
pointer is returned on
.SM EOF
.Dv EOF
or error.
.SH BUGS
.LP
.Sh BUGS
All information
is contained in a static area
so it must be copied if it is

View File

@ -1,31 +1,29 @@
.\" @(#)getrpcport.3r 2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
.TH GETRPCPORT 3 "6 October 1987"
.SH NAME
getrpcport \- get RPC port number
.SH SYNOPSIS
.ft B
.nf
int getrpcport(host, prognum, versnum, proto)
char *host;
int prognum, versnum, proto;
.fi
.SH DESCRIPTION
.IX getrpcport "" "\fLgetrpcport\fR \(em get RPC port number"
.B getrpcport(\|)
.Dd "October 6, 1987"
.Dt GETRPCPORT 3
.Os
.Sh NAME
.Nm getrpcport
.Nd get RPC port number
.Sh SYNOPSIS
.Ft int
.Fn getrpcport "char *host" "int prognum" "int versnum" "int proto"
.Sh DESCRIPTION
.Fn getrpcport
returns the port number for version
.I versnum
.Fa versnum
of the RPC program
.I prognum
.Fa prognum
running on
.I host
.Fa host
and using protocol
.IR proto .
.Fa proto .
It returns 0 if it cannot contact the portmapper, or if
.I prognum
.Fa prognum
is not registered. If
.I prognum
.Fa prognum
is registered but not with version
.IR versnum ,
.Fa versnum ,
it will still return a port number (for some version of the program)
indicating that the program is indeed registered.
The version mismatch will be detected upon the first call to the service.

View File

@ -1,71 +1,34 @@
.\" @(#)rpc.5 2.2 88/08/03 4.0 RPCSRC; from 1.4 87/11/27 SMI;
.TH RPC 5 "26 September 1985"
.SH NAME
rpc \- rpc program number data base
.SH SYNOPSIS
.B /etc/rpc
.SH DESCRIPTION
.Dd "September 26, 1985"
.Dt RPC 5
.Sh NAME
.Nm rpc
.Nd rpc program number data base
.Sh SYNOPSIS
/etc/rpc
.Sh DESCRIPTION
The
.I rpc
.Pa /etc/rpc
file contains user readable names that
can be used in place of rpc program numbers.
Each line has the following information:
.HP 10
.Pp
.Bl -bullet -compact
.It
name of server for the rpc program
.br
.ns
.HP 10
.It
rpc program number
.br
.ns
.HP 10
.It
aliases
.LP
.El
.Pp
Items are separated by any number of blanks and/or
tab characters.
A ``#'' indicates the beginning of a comment; characters up to the end of
the line are not interpreted by routines which search the file.
.LP
Here is an example of the \fI/etc/rpc\fP file from the Sun RPC Source
distribution.
.nf
.ta 1.5i +0.5i +1.0i +1.0i
#
# rpc 88/08/01 4.0 RPCSRC; from 1.12 88/02/07 SMI
#
portmapper 100000 portmap sunrpc
rstatd 100001 rstat rstat_svc rup perfmeter
rusersd 100002 rusers
nfs 100003 nfsprog
ypserv 100004 ypprog
mountd 100005 mount showmount
ypbind 100007
walld 100008 rwall shutdown
yppasswdd 100009 yppasswd
etherstatd 100010 etherstat
rquotad 100011 rquotaprog quota rquota
sprayd 100012 spray
3270_mapper 100013
rje_mapper 100014
selection_svc 100015 selnsvc
database_svc 100016
rexd 100017 rex
alis 100018
sched 100019
llockmgr 100020
nlockmgr 100021
x25.inr 100022
statmon 100023
status 100024
bootparam 100026
ypupdated 100028 ypupdate
keyserv 100029 keyserver
tfsd 100037
nsed 100038
nsemntd 100039
.fi
.DT
.SH FILES
/etc/rpc
.SH "SEE ALSO"
getrpcent(3)
.Sh FILES
.Bl -tag -compact -width /etc/rpc
.Pa /etc/rpc
.El
.Sh "SEE ALSO"
.Xr getrpcent 3