=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rpcgen/rpcgen.1,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- src/usr.bin/rpcgen/rpcgen.1 1999/07/07 10:50:07 1.5 +++ src/usr.bin/rpcgen/rpcgen.1 2000/03/10 20:17:50 1.6 @@ -1,4 +1,4 @@ -.\" $OpenBSD: rpcgen.1,v 1.5 1999/07/07 10:50:07 aaron Exp $ +.\" $OpenBSD: rpcgen.1,v 1.6 2000/03/10 20:17:50 aaron Exp $ .\" $NetBSD: rpcgen.1,v 1.5.2.1 1995/12/05 02:51:02 jtc Exp $ .\" from: @(#)rpcgen.new.1 1.1 90/11/09 TIRPC 1.0; from 40.10 of 10/10/89 .\" Copyright (c) 1988,1990 Sun Microsystems, Inc. - All Rights Reserved. @@ -39,16 +39,14 @@ .Op Fl o Ar outfile .Op Ar infile .Sh DESCRIPTION -.Nm rpcgen +.Nm is a tool that generates C code to implement an .Tn RPC protocol. -The input to -.Nm -is a language similar to C known as +The input is a language similar to C known as .Tn RPC Language (Remote Procedure Call Language). -.Nm rpcgen +.Nm is normally used as in the first synopsis where it takes an input file and generates up to four output files. If the @@ -56,7 +54,7 @@ is named .Pa proto.x , then -.Nm rpcgen +.Nm will generate a header file in .Pa proto.h , .Tn XDR @@ -77,13 +75,15 @@ .Fl S\&c option, it will also generate sample code which would illustrate how to use the -remote procedures on the client side. This code would be created in +remote procedures on the client side. +This code would be created in .Pa proto_client.c . With the .Fl S\&s option, it will also generate a sample server code which would illustrate how to write -the remote procedures. This code would be created in +the remote procedures. +This code would be created in .Pa proto_server.c . .Pp The server created can be started both by the port monitors @@ -99,7 +99,7 @@ by setting up the environment variable .Ev PM_TRANSPORT . When the server generated by -.Nm rpcgen +.Nm is executed, it creates server handles for all the transports specified in @@ -150,10 +150,10 @@ one does not want to generate all the output files, but only a particular one. Some examples of their usage is described in the -EXAMPLE +.Sx EXAMPLES section below. When -.Nm rpcgen +.Nm is executed with the .Fl s option, @@ -167,7 +167,7 @@ If .Ar infile is not specified, -.Nm rpcgen +.Nm accepts the standard input. .Pp The C preprocessor, @@ -175,9 +175,9 @@ is run on the input file before it is actually interpreted by .Nm rpcgen . For each type of output file, -.Nm rpcgen +.Nm defines a special preprocessor symbol for use by the -.Nm rpcgen +.Nm programmer: .Pp .Bl -tag -width RPC_CLNT -compact @@ -205,7 +205,7 @@ .Pp For every data type referred to in .Ar infile -.Nm rpcgen +.Nm assumes that there exists a routine with the string .Dq xdr_ @@ -217,20 +217,23 @@ allows customization of .Tn XDR routines. -.Sh OPTIONS +.Pp +The options are as follows: .Bl -tag -width indent .It Fl a Generate all the files including sample code for client and server side. .It Fl b This generates code for the .Tn SunOS4.1 -style of RPC. This is the default. +style of RPC. +This is the default. .It Fl c Compile into .Tn XDR routines. .It Fl C -Generate code in ANSI C. This option also generates code that could be +Generate code in ANSI C. +This option also generates code that could be compiled with the C++ compiler. .It Fl D Ar name Ns Op Ar =value Define a symbol @@ -254,7 +257,7 @@ dispatch tables. .It Fl K Ar secs By default, services created using -.Nm rpcgen +.Nm wait 120 seconds after servicing a request before exiting. That interval can be changed using the @@ -276,7 +279,7 @@ If it is known that a server will be used with such a monitor, the server should exit immediately on completion. For such servers, -.Nm rpcgen +.Nm should be used with .Dq Fl K No -1 . .It Fl l @@ -304,12 +307,15 @@ Use the newstyle of .Nm rpcgen . This allows procedures to have multiple arguments. -It also uses the style of parameter passing that closely resembles C. So, when +It also uses the style of parameter passing that closely resembles C. +So, when passing an argument to a remote procedure you do not have to pass a pointer to -the argument but the argument itself. This behaviour is different from the oldstyle +the argument but the argument itself. +This behaviour is different from the oldstyle of -.Nm rpcgen -generated code. The newstyle is not the default case because of +.Nm +generated code. +The newstyle is not the default case because of backward compatibility. .It Fl o Ar outfile Specify the name of the output file. @@ -336,7 +342,8 @@ .Em udp [see .Xr rpc 3 -for the meanings associated with these classes. Note: +for the meanings associated with these classes. +Note: .Bx currently supports only the .Em tcp @@ -351,7 +358,8 @@ to the server before calling the client side stubs generated by .Nm rpcgen . .It Fl S\&s -Generate skeleton code for the remote procedures on the server side. You would need +Generate skeleton code for the remote procedures on the server side. +You would need to fill in the actual code for the remote procedures. .It Fl t Compile into @@ -398,7 +406,7 @@ option refers to the transport indicated by .Em netid and hence is very site specific. -.Sh EXAMPLE +.Sh EXAMPLES The command .Pp .Bd -literal -offset indent