Name

rpcgen

Synopsis

rpcgen [options] file

Parse file, which should be written in the RPC (Remote Procedural Call) language, and produce a program written in C that implements the RPC code. Place header code generated from file.x in file.h, XDR routines in file_xdr.c, server code in file_svc.c, and client code in file_clnt.c. Lines preceded by % are not parsed. By default, rpcgen produces Sun OS 4.1-compatible code.

-a

Produce all files (client and server).

-b

Produce SunOS 4.1-compatible code. This is the default.

−5

Produce SVR4-compatible code.

-c

Create XDR routines. Cannot be used with other options.

-C

Produce ANSI C code (the default).

-k

Produce K&R C code.

-Dname[=value]

Define the symbol name, and set it equal to value or 1.

-h

Produce a header file. With -T, make the file support RPC dispatch tables. Cannot be used with other options.

-I

Produce an inetd-compatible server.

-K secs

Specify amount of time that the server should wait after replying to a request and before exiting. Default is 120. Setting secs to −1 prevents the program from ever exiting.

-l

Produce client code. Cannot be used with other options.

-m

Produce server code only, suppressing creation of a “main” routine. Cannot be used with other options.

-N

New style. Allow multiple arguments for procedures. Not necessarily backward-compatible.

-o [file]

Print output to file or standard output.

-Sc

Print sample client code to standard output.

-Ss

Create skeleton server code only.

-t

Create RPC dispatch table. Cannot be used with other options.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.