HP-UX Reference (11i v2 04/09) - 1 User Commands N-Z (vol 2)
r
rpcgen(1) rpcgen(1)
must be provided. Providing an undefined data type allows customization of XDR routines.
Options
-a Generate all files, including sample files.
-b Backward compatibility mode. Generate transport specific RPC code for older versions of
the operating system.
-c Compile into XDR routines.
-C Generate header and stub files which can be used with ANSI C compilers. Headers gen-
erated with this option can also be used with C++ programs.
-Dname[=value]
Define a symbol name. Equivalent to the
#define directive in the source. If no value is
given, value is defined as
1. This option may be specified more than once.
-h Compile into C data-definitions (a header).
-T option can be used in conjunction to pro-
duce a header which supports RPC dispatch tables.
-i size Size at which to start generating inline code. This option is useful for optimization. The
default size is 5.
-I Compile support for inetd(1M) in the server side stubs. Such servers can be self-started
or can be started by inetd. When the server is self-started, it backgrounds itself by
default. A special define symbol RPC_SVC_FG can be used to run the server process in
foreground, or the user may simply compile without the -I option.
If there are no pending client requests, the
inetd servers exit after 120 seconds
(default). The default can be changed with the -K option. All of the error messages for
inetd servers are always logged with syslog(3C).
Note: This option is supported for backward compatibility only. It should always be used
in conjunction with the
-b option which generates backward compatibility code. By
default (i.e., when -b is not specified), rpcgen generates servers that can be invoked
through portmonitors.
-K seconds By default, services created using rpcgen and invoked through port monitors wait 120
seconds after servicing a request before exiting. That interval can be changed using the
-K option. To create a server that exits immediately upon servicing a request, use -K 0
.
To create a server that never exits, the appropriate argument is
-K -1
.
When monitoring for a server, some portmonitors, like
listen, always spawn a new
process in response to a service request. If it is known that a server will be used with
such a monitor, the server should exit immediately on completion. For such servers,
rpcgen should be used with -K 0.
-l Compile into client-side stubs.
-L When the servers are started in foreground, use syslog(3C) to log the server errors
instead of printing them on standard error.
-m Compile into server-side stubs, but do not generate a main routine. This option is useful
for doing callback-routines and for users who need to write their own main routine to do
initialization.
-M Generate multithread-safe stubs for passing arguments and results between rpcgen gen-
erated code and user written code. This option is useful for users who want to use
threads in their code.
-N This option allows procedures to have multiple arguments. 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 can pass the argument
itself. This behavior is different from the old style of rpcgen generated code. To main-
tain backward compatibility, this option is not the default.
-n netid Compile into server-side stubs for the transport specified by netid. There should be an
entry for netid in the netconfig database. This option may be specified more than
once, so as to compile a server that serves multiple transports.
Section 1−−812 Hewlett-Packard Company − 2 − HP-UX 11i Version 2: September 2004