HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)

r
rpc_soc(3N) rpc_soc(3N)
(OBSOLETE)
enum clnt_stat pmap_rmtcall()
Request that the portmap on the host at IP address *addr make an RPC on the behalf of the
caller to a procedure on that host. *portp is modified to the program’s port number if the pro-
cedure succeeds. The definitions of other parameters are discussed in
callrpc() and
clnt_call() (see rpc_clnt_calls(3N)).
This procedure is only available for the UDP transport.
If the requested remote procedure is not registered with the remote
portmap, then no error
response is returned and the call times out. Also, no authentication is done.
Warning: this routine exists for backward compatibility only, enhanced functionality is provided
by
rpcb_rmtcall()
(see rpcbind(3N)).
bool_t pmap_set()
A user interface to the portmap service, that establishes a mapping between the triple [prog-
num, versnum, protocol ] and port on the machine’s
portmap service. The value of protocol
may be
IPPROTO_UDP or IPPROTO_TCP . Formerly, the routine failed if the requested port
was found to be in use. Now, the routine only fails if it finds that port is still bound. If port is
not bound, the routine completes the requested registration. This routine returns
1 if it
succeeds,
0 otherwise. Automatically done by
svc_register().
Warning: this routine exists for backward compatibility only, enhanced functionality is provided
by
rpcb_set() (see rpcbind(3N)).
bool_t pmap_unset()
A user interface to the portmap service, which destroys all mapping between the triple [prog-
num, versnum, all-protocols] and port on the machine’s
portmap service. This routine returns
1 if it succeeds, 0 otherwise.
Warning: this routine exists for backward compatibility only, enhanced functionality is provided
by
rpcb_unset() (see rpcbind(3N)).
int svc_fds;
A global variable reflecting the RPC service sides read file descriptor bit mask; it is suitable as a
parameter to the select() call. This is only of interest if a service implementor does not call
svc_run(), but rather does his own asynchronous event processing. This variable is read-only
(do not pass its address to select()), yet it may change after calls to svc_getreq()
or any
creation routines. Similar to
svc_fdset, but limited to 32 descriptors.
Warning: this interface is made obsolete by svc_fdset (see rpc_svc_calls(3N)).
struct sockaddr_in *svc_getcaller()
This routine returns the network address, represented as a struct sockaddr_in , of the
caller of a procedure associated with the RPC service transport handle, xprt.
Warning: this routine exists for backward compatibility only, and is obsolete. The preferred
interface is
svc_getrpccaller()
(see rpc_svc_reg (3N)), which returns the address as a
struct netbuf.
void svc_getreq()
This routine is only of interest if a service implementor does not call svc_run(), but instead
implements custom asynchronous event processing. It is called when the select() call has
determined that an RPC request has arrived on some RPC file descriptors; rdfds is the resultant
read file descriptor bit mask. The routine returns when all file descriptors associated with the
value of rdfds have been serviced. This routine is similar to svc_getreqset() but is limited
to 32 descriptors.
Warning: this interface is made obsolete by svc_getreqset().
SVCXPRT *svcfd_create()
Create a service on top of any open and bound descriptor. Typically, this descriptor is a con-
nected file descriptor for a stream protocol. Refer to the File Descriptor section for more infor-
mation. sendsz and recvsz indicate sizes for the send and receive buffers. If they are 0, a rea-
sonable default is chosen.
Warning: this interface is made obsolete by svc_fd_create() (see rpc_svc_create(3N)).
SVCXPRT *svcraw_create();
This routine creates an internal, memory-based RPC service transport, to which it returns a
HP-UX 11i Version 3: February 2007 5 Hewlett-Packard Company 339