HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)
r
rpcgen(1) rpcgen(1)
-o outfile Specify the name of the output file. If none is specified, standard output is used (
-c
, -h,
-l, -m, -n
, -s, -Sc, -Sm, -Ss, and -t
modes only).
-s nettype Compile into server-side stubs for all the transports belonging to the class nettype. The
supported classes are
netpath, visible, circuit_n
, circuit_v, datagram_n ,
datagram_v , tcp, and udp (see rpc(3N) for the meanings associated with these classes).
This option may be specified more than once. Note: the transports are chosen at run time
and not at compile time.
-Sc Generate sample client code that uses remote procedure calls.
-Sm Generate a sample Makefile which can be used for compiling the application.
-Ss Generate sample server code that uses remote procedure calls.
-t Compile into RPC dispatch table.
-T Generate the code to support RPC dispatch tables.
The options -c, -h
, -l, -m, -s, -Sc, -Sm, -Ss
, and -t are used exclusively to generate
a particular type of file, while the options
-D and -T are global and can be used with the
other options.
-u When the server-side stub is produced, additional code to handle signals is generated. On
reception of a signal, this signal handler code unmaps the server program from the port
mapper before the server terminates. This code is added only if a
main() routine is pro-
duced in the server-side stub. The -u option must not be specified with the -c
, -h, -l, -
m
, -Sc, -Sm, -Ss options. The following signals are trapped: SIGHUP, SIGINT,
SIGQUIT, and SIGTERM.
-Y pathname Give the name of the directory where rpcgen will start looking for the C-preprocessor.
EXAMPLES
The following example:
example% rpcgen -T prot.x
generates all the five files: prot.h, prot_clnt.c , prot_svc.c , prot_xdr.c and prot_tbl.i
.
The following example sends the C data-definitions (header) to the standard output.
example% rpcgen -h prot.x
To send the test version of the -DTEST, server side stubs for all the transport belonging to the class
datagram_n to standard output, use:
example% rpcgen -s datagram_n -DTEST prot.x
To create the server side stubs for the transport indicated by netid tcp, use:
example% rpcgen -n tcp -o prot_svc.c prot.x
AUTHOR
rpcgen was developed by Sun Microsystems, Inc.
SEE ALSO
cc_bundled(1), inetd(1M), syslog(3C), rpc(3N), rpc_svc_calls(3N)
Section 1−−850 Hewlett-Packard Company − 3 − HP-UX 11i Version 1: September 2005