convert manpages to -mandoc macros

This commit is contained in:
jtc 1993-06-10 19:15:08 +00:00
parent 4b780a9d57
commit 1a9c05a062
2 changed files with 221 additions and 258 deletions

View File

@ -1,175 +1,155 @@
.\" @(#)rpcgen.1 2.2 88/08/02 4.0 RPCSRC
.TH RPCGEN 1 "18 January 1988"
.SH NAME
rpcgen \- an RPC protocol compiler
.SH SYNOPSIS
.BI rpcgen " infile"
.br
.B rpcgen
.BR \-c \|| \|\-h \|| \|\-l \||\fB\|\-m
[
.BI \-o " outfile"
]
[
.I infile
]
.br
.B rpcgen \-s
.I transport
[
.BI \-o " outfile"
]
[
.I infile
]
.br
.SH DESCRIPTION
.IX "compilers" rpcgen "" "\fLrpcgen\fR \(em generate RPC protocols, C header files"
.IX rpcgen "" "\fLrpcgen\fR \(em generate RPC protocol, C header files, and server skeleton"
.IX RPC "generate protocols \(em \fLrpcgen\fR"
.B rpcgen
is a tool that generates C
code to implement an
.SM RPC
.\" converted to -mdoc macros by J.T. Conklin <jtc@wimsey.com>
.Dd January 18, 1988
.Dt RPCGEN 1
.Os
.Sh NAME
.Nm rpcgen
.Nd RPC protocol compiler
.Sh SYNOPSIS
.Nm rpcgen
.Ar infile
.Nm rpcgen
.Fl c Li |
.Fl h Li |
.Fl l Li |
.Fl m
.Op Fl o Ar outfile
.Op Ar infile
.Nm rpcgen
.Fl s Ar transport
.Op Fl o Ar outfile
.Op Ar infile
.Sh DESCRIPTION
.Nm rpcgen
is a tool that generates C code to implement an
.Tn RPC
protocol. The input to
.B rpcgen
is a language similar to C
known as
.SM RPC
Language (Remote Procedure Call Language). Information
about the syntax of
.SM RPC
.Nm rpcgen
is a language similar to C known as
.Tn RPC
Language (Remote Procedure Call Language). Information about the
syntax of
.Tn RPC
Language is available in the
.RI ` rpcgen ' " Programming Guide."
.LP
.B rpcgen
.Rs
.%T "rpcgen Programming Guide"
.Re
.Pp
.Nm rpcgen
is normally used as in the first synopsis where it takes an input file
and generates four output files. If the
.I infile
.Ar infile
is named
.BR proto.x ,
.Pa proto.x ,
then
.B rpcgen
.Nm rpcgen
will generate a header file in
.BR proto.h ,
.SM XDR
.Pa proto.h ,
.Tn XDR
routines in
.BR proto_xdr.c ,
.Pa proto_xdr.c ,
server-side stubs in
.BR proto_svc.c ,
.Pa proto_svc.c ,
and client-side stubs in
.BR proto_clnt.c .
.LP
.Pa proto_clnt.c .
.Pp
The other synopses shown above are used when one does not want to
generate all the output files, but only a particular one. Their
usage is described in the
.SM USAGE
section below.
.LP
generate all the output files, but only a particular one.
.\" Their usage is described in the
.\" .Sx USAGE
.\" section below.
.Pp
The C-preprocessor,
.BR cpp (1),
.Xr cpp 1 ,
is run on all input files before they are actually
interpreted by
.BR rpcgen ,
.Nm rpcgen ,
so all the
.B cpp
.Xr cpp
directives are legal within an
.B rpcgen
.Nm rpcgen
input file. For each type of output file,
.B rpcgen
.Nm rpcgen
defines a special
.B cpp
.Xr cpp
symbol for use by the
.B rpcgen
.Nm rpcgen
programmer:
.PP
.PD 0
.TP 12
.SM RPC_HDR
.Pp
.Bl -tag -width RPC_CLNT -compact
.It Dv RPC_HDR
defined when compiling into header files
.TP
.SM RPC_XDR
.It Dv RPC_XDR
defined when compiling into
.SM XDR
.Tn XDR
routines
.TP
.SM RPC_SVC
.It Dv RPC_SVC
defined when compiling into server-side stubs
.TP
.SM RPC_CLNT
.It Dv RPC_CLNT
defined when compiling into client-side stubs
.PD
.LP
.El
.Pp
In addition,
.B rpcgen
does a little preprocessing of its own.
Any line beginning with
.RB ` % '
.Nm rpcgen
does a little preprocessing of its own. Any line beginning with
.Sq %
is passed directly into the output file, uninterpreted by
.BR rpcgen .
.LP
.Nm rpcgen .
.Pp
You can customize some of your
.SM XDR
routines by leaving those data
types undefined. For every data type that is undefined,
.B rpcgen
.Tn XDR
routines by leaving those data types undefined. For every data type
that is undefined,
.Nm rpcgen
will assume that there exists a routine with the name
.B xdr_
.Tn xdr_
prepended to the name of the undefined type.
.SH OPTIONS
.TP
.B \-c
.Sh OPTIONS
.Bl -tag -width indent
.It Fl c
Compile into
.SM XDR
.Tn XDR
routines.
.TP
.B \-h
Compile into
.B C
data-definitions (a header file)
.TP
.B \-l
.It Fl h
Compile into C data-definitions (a header file).
.It Fl l
Compile into client-side stubs.
.TP
.B \-m
Compile into server-side stubs, but do not generate a ``main'' routine.
This option is useful for doing callback-routines and for people who
need to write their own ``main'' routine to do initialization.
.TP
.BI \-o " outfile"
Specify the name of the output file.
If none is specified, standard output is used
.RB ( \-c ,
.BR \-h ,
.B \-l
.It Fl m
Compile into server-side stubs, but do not generate a
.Fn main
routine. This option is useful for doing callback-routines and for
people who need to write their own
.Fn main
routine to do initialization.
.It Fl o Ar outfile
Specify the name of the output file. If none is specified, standard
output is used (
.Fl c ,
.Fl h ,
.Fl l
and
.B \-s
.Fl s
modes only).
.TP
.BI \-s " transport"
.It Fl s Ar transport
Compile into server-side stubs, using the the given transport. The
supported transports
are
.B udp
supported transports are
.Tn udp
and
.BR tcp .
This option may be invoked more than once
so as to compile a server that serves multiple transports.
.br
.ne 5
.SH "SEE ALSO"
.BR cpp (1)
.LP
.RI ` rpcgen ' " Programming Guide."
.br
.ne 4
.SH BUGS
.LP
Nesting is not supported.
As a work-around, structures can be declared at
top-level, and their name used inside other structures in order to achieve
the same effect.
.LP
Name clashes can occur when using program definitions, since the apparent
scoping does not really apply. Most of these can be avoided by giving
unique names for programs, versions, procedures and types.
.Tn tcp .
This option may be invoked more than once so as to compile a server
that serves multiple transports.
.El
.Sh SEE ALSO
.Xr cpp 1
.Rs
.%T "rpcgen Programming Guide"
.Re
.Sh BUGS
Nesting is not supported. As a work-around, structures can be
declared at top-level, and their name used inside other structures in
order to achieve the same effect.
.Pp
Name clashes can occur when using program definitions, since the
apparent scoping does not really apply. Most of these can be avoided
by giving unique names for programs, versions, procedures and types.

View File

@ -1,183 +1,166 @@
.\" @(#)rpcinfo.8c 2.2 88/08/03 4.0 RPCSRC; from 1.24 88/02/25 SMI
.TH RPCINFO 8C "17 December 1987"
.SH NAME
rpcinfo \- report RPC information
.SH SYNOPSIS
.B "rpcinfo \-p"
[
.I host
]
.LP
.B "rpcinfo"
[
.B \-n
.I portnum
]
.B \-u
.I host
.I program
[
.I version
]
.LP
.B "rpcinfo"
[
.B \-n
.I portnum
]
.B \-t
.I host
.I program
[
.I version
]
.LP
.B "rpcinfo \-b"
.I program
.I version
.LP
.B "rpcinfo \-d"
.I program
.I version
.SH DESCRIPTION
.B rpcinfo
.\" converted to -mdoc macros by J.T. Conklin <jtc@wimsey.com>
.\"
.Dd December 17, 1987
.Dt RPCINFO 8
.Os
.Sh NAME
.Nm rpcinfo
.Nd report RPC information
.Sh SYNOPSIS
.Nm rpcinfo
.Fl p
.Op Ar host
.Nm rpcinfo
.Op Fl n Ar portnum
.Fl u Ar host
.Ar program
.Op Ar version
.Nm rpcinfo
.Op Fl n Ar portnum
.Fl t Ar host
.Ar program
.Op Ar version
.Nm rpcinfo
.Fl b
.Ar program version
.Nm rpcinfo
.Fl d
.Ar program version
.Sh DESCRIPTION
.Nm rpcinfo
makes an
.SM RPC
.Tn RPC
call to an
.SM RPC
.Tn RPC
server and reports what it finds.
.SH OPTIONS
.TP
.B \-p
.Sh OPTIONS
.Bl -tag -width indent
.It Fl p
Probe the portmapper on
.IR host ,
.Ar host ,
and print a list of all registered
.SM RPC
.Tn RPC
programs. If
.I host
.Ar host
is not specified, it defaults to the value returned by
.BR hostname (1).
.TP
.B \-u
.Xr hostname 1 .
.It Fl u
Make an
.SM RPC
.Tn RPC
call to procedure 0 of
.I program
.Ar program
on the specified
.I host
.Ar host
using
.SM UDP\s0,
.Tn UDP ,
and report whether a response was received.
.TP
.B \-t
.It Fl t
Make an
.SM RPC
.Tn RPC
call to procedure 0 of
.I program
.Ar program
on the specified
.I host
.Ar host
using
.SM TCP\s0,
.Tn TCP ,
and report whether a response was received.
.TP
.B \-n
.It Fl n
Use
.I portnum
.Ar portnum
as the port number for the
.I \-t
.Fl t
and
.I \-u
.Fl u
options instead of the port number given by the portmapper.
.TP
.B \-b
.It Fl b
Make an
.SM RPC
.Tn RPC
broadcast to procedure 0 of the specified
.I program
.Ar program
and
.I version
.Ar version
using
.SM UDP
.Tn UDP
and report all hosts that respond.
.TP
.B \-d
.It Fl d
Delete registration for the
.SM RPC
.Tn RPC
service of the specified
.I program
.Ar program
and
.IR version .
.Ar version .
This option can be exercised only by the super-user.
.LP
.El
.Pp
The
.I program
.Ar program
argument can be either a name or a number.
.LP
.Pp
If a
.I version
.Ar version
is specified,
.B rpcinfo
.Nm rpcinfo
attempts to call that version of the specified
.IR program .
.Ar program .
Otherwise,
.B rpcinfo
.Nm rpcinfo
attempts to find all the registered version
numbers for the specified
.I program
.Ar program
by calling version 0 (which is presumed not
to exist; if it does exist,
.B rpcinfo
.Ar rpcinfo
attempts to obtain this information by calling
an extremely high version
number instead) and attempts to call each registered version.
Note: the version number is required for
.B \-b
.Fl b
and
.B \-d
.Fl d
options.
.SH EXAMPLES
.Sh EXAMPLES
To show all of the
.SM RPC
.Tn RPC
services registered on the local machine use:
.IP
.B example% rpcinfo -p
.LP
.Pp
.Dl example% rpcinfo -p
.Pp
To show all of the
.SM RPC
.Tn RPC
services registered on the machine named
.B klaxon
.Ar klaxon
use:
.IP
.B example% rpcinfo -p klaxon
.LP
.Pp
.Dl example% rpcinfo -p klaxon
.Pp
To show all machines on the local net that are running the Yellow Pages
service use:
.IP
.B "example% rpcinfo -b ypserv 'version' | uniq"
.LP
.Pp
.Dl example% rpcinfo -b ypserv 'version' | uniq
.Pp
where 'version' is the current Yellow Pages version obtained from the
results of the
.B \-p
.Fl p
switch above.
.LP
.Pp
To delete the registration for version 1 of the
.B walld
.Nm walld
service use:
.IP
.B example% rpcinfo -d walld 1
.SH "SEE ALSO"
.BR rpc (5),
.BR portmap (8C)
.LP
.I "\s-1RPC\s0 Programming Guide"
.SH BUGS
In releases prior to Sun\s-1OS\s0
3.0, the Network File System (\s-1NFS\s0) did not
register itself with the
portmapper;
.B rpcinfo
.Pp
.Dl example% rpcinfo -d walld 1
.Sh SEE ALSO
.Xr rpc 5 ,
.Xr portmap 8
.Rs
.%T "RPC Programming Guide"
.Re
.Sh BUGS
In releases prior to SunOS 3.0, the Network File System (NFS) did not
register itself with the portmapper;
.Nm rpcinfo
cannot be used to make
.SM RPC
.Tn RPC
calls to the
.SM NFS
.Tn NFS
server on hosts running such releases.