HP-UX Reference (11i v1 05/09) - 3 Library Functions N-Z (vol 7)
r
rpc_soc(3N) rpc_soc(3N)
Warning: this interface is obsoleted by
svc_fd_create()
(see rpc_svc_create(3N)).
SVCXPRT * svcraw_create(void);
This routine creates an internal, memory-based RPC service transport, to which it returns a
pointer. The transport is really a buffer within the process’s address space, so the corresponding
RPC client should live in the same address space; see
clntraw_create()
. This routine
allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without
any kernel interference. This routine returns NULL if it fails.
Warning: this routine exists for backward compatibility only, and has the same functionality of
svc_raw_create()
(see rpc_svc_create(3N)), which obsoletes it.
SVCXPRT * svctcp_create()
This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The
transport is associated with the file descriptor fd, which may be
RPC_ANYSOCK , in which case a
new file descriptor is created. If the file descriptor is not bound to a local TCP port, then this
routine binds it to an arbitrary port. Refer to the File Descriptor section for more information.
Upon completion, xprt→→xp_fd is the transport’s file descriptor, and xprt→→xp_port is the
transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses
buffered I/O, users may specify the size of buffers; values of
0
choose suitable defaults.
Warning: this routine exists for backward compatibility only.
svc_create() ,
svc_tli_create(),or
svc_vc_create() (see rpc_svc_create(3N)) should be used
instead.
SVCXPRT * svcudp_bufcreate()
This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The
transport is associated with the file descriptor fd.Iffd is RPC_ANYSOCK , then a new file
descriptor is created. If the file descriptor is not bound to a local UDP port, then this routine
binds it to an arbitrary port. Upon completion, xprt→→xp_fd is the transport’s file descriptor, and
xprt→→xp_port is the transport’s port number. Refer to the File Descriptor section for more infor-
mation. This routine returns NULL if it fails.
The user specifies the maximum packet size for sending and receiving UDP-based RPC messages
by using the sendsz and recvsz parameters.
Warning: this routine exists for backward compatibility only.
svc_tli_create(),or
svc_dg_create() (see rpc_svc_create(3N)) should be used instead.
SVCXPRT * svcudp_create()
This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The
transport is associated with the file descriptor fd, which may be RPC_ANYSOCK , in which case a
new file descriptor is created. If the file descriptor is not bound to a local UDP port, then this
routine binds it to an arbitrary port. Upon completion, xprt→→xp_fd is the transport’s file
descriptor, and xprt→→xp_port is the transport’s port number. This routine returns NULL if it
fails.
Warning: since UDP-based RPC messages can only hold up to 8 Kbytes of encoded data, this
transport cannot be used for procedures that take large arguments or return huge results.
Warning: this routine exists for backward compatibility only.
svc_create() ,
svc_tli_create(),orsvc_dg_create() (see rpc_svc_create(3N)) should be used
instead.
registerrpc()
Register program prognum, procedure procname, and version versnum with the RPC service
package. If a request arrives for program prognum, version versnum, and procedure procnum,
procname is called with a pointer to its parameter(s); procname should return a pointer to its
static result(s); inproc is used to decode the parameters while outproc is used to encode the
results. This routine returns 0 if the registration succeeded, -1 otherwise.
svc_run() must be called after all the services are registered.
Warning: this routine exists for backward compatibility only, and is obsoleted by rpc_reg()
(see rpc_svc_calls(3N)).
svc_register()
Associates prognum and versnum with the service dispatch procedure, dispatch.Ifprotocol is 0,
the service is not registered with the portmap service. If protocol is non-zero, then a mapping
HP-UX 11i Version 1: September 2005 − 6 − Hewlett-Packard Company Section 3−−835