⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rpcgen.1

📁 早期freebsd实现
💻 1
字号:
.\" Copyright 1991 The Regents of the University of California..\" All rights reserved..\".\" Derived from Sun Microsystems rpcgen.1        2.2 88/08/02 4.0 RPCSRC.\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"	@(#)rpcgen.1	5.4 (Berkeley) 12/30/93.\".Dd December 30, 1993.Dt RPCGEN 1.Sh NAME.Nm rpcgen.Nd an.Tn RPCprotocol compiler.Sh SYNOPSIS.Nm rpcgen Ar infile.Nm rpcgen.Fl c | Fl h | Fl l |.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 rpcgenis a tool that generates.Tn \&Ccode to implement an.Tn RPCprotocol.  The input to.Nm rpcgenis a language similar to Cknown as.Tn RPCLanguage (Remote Procedure Call Language).  Informationabout the syntax of.Tn RPCLanguage is available in the.Rs.%T "Rpcgen Programming Guide".Re.PpAvailable options:.Bl -tag -width indent.It Fl cCompile into.Dv XDRroutines..It Fl hCompile into.Tn \&Cdata-definitions (a header file).It Fl lCompile into client-side stubs..It Fl mCompile into server-side stubs, but do not generate a.Em mainroutine.This option is useful for doing callback-routines and for people whoneed to write their own.Em mainroutine to do initialization..It Fl o Ar outfileSpecify the name of the output file.If none is specified, standard output is used.Pf ( Fl c ,.Fl h ,.Fl land.Fl smodes only)..It Fl s Ar transportCompile into server-side stubs, using the given transport.  Thesupported transportsare.Tn UDPand.Tn TCP .This option may be invoked more than onceso as to compile a server that serves multiple transports..El.Pp.Nm rpcgenis normally used as in the first synopsis where it takes an input fileand generates four output files. If the.Ar infileis named.Pa proto.x ,then.Nm rpcgenwill generate a header file in.Pa proto.h ,.Dv XDRroutines in.Pa proto_xdr.c ,server-side stubs in.Pa proto_svc.c ,and client-side stubs in.Pa proto_clnt.c ..PpThe other synopses shown above are used when one does not want togenerate all the output files, but only a particular one.  Theirusage is described in the.Sx USAGEsection below..PpThe C-preprocessor,.Xr cpp 1 ,is run on all input files before they are actuallyinterpreted by.Nm rpcgen ,so all the.Xr cppdirectives are legal within an.Nm rpcgeninput file.  For each type of output file,.Nm rpcgendefines a special.Xr cppsymbol for use by the.Nm rpcgenprogrammer:.Pp.Bl -tag -width "RPC_CLNT".It Dv RPC_HDRdefined when compiling into header files.It Dv RPC_XDRdefined when compiling into.Dv XDRroutines.It Dv RPC_SVCdefined when compiling into server-side stubs.It Dv RPC_CLNTdefined when compiling into client-side stubs.El.PpIn addition,.Nm rpcgendoes a little preprocessing of its own.Any line beginning with.Ql \&%is passed directly into the output file, uninterpreted by.Nm rpcgen ..PpYou can customize some of your.Dv XDRroutines by leaving those datatypes undefined.  For every data type that is undefined,.Nm rpcgenwill assume that there exists a routine with the name.Em xdr_prepended to the name of the undefined type..Sh SEE ALSO.Xr cpp 1.Rs.%T "Rpcgen Programming Guide".%I "Sun Microsystems".Re.Sh BUGS.PpNesting is not supported.As a work-around, structures can be declared attop-level, and their name used inside other structures in order to achievethe same effect..PpName clashes can occur when using program definitions, since the apparentscoping does not really apply. Most of these can be avoided by givingunique names for programs, versions, procedures and types.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -