HP-UX Reference (11i v2 04/09) - 3 Library Functions N-Z (vol 7)

r
rpc_soc(3N) rpc_soc(3N)
Warning: this routine exists for backward compatibility only, and is obsoleted by
authsys_create()
(see rpc_clnt_auth(3N)).
AUTH * authunix_create_default(void)
Call authunix_create()
with the appropriate parameters.
Warning: this routine exists for backward compatibility only, and is obsoleted by
authsys_create_default()
(see rpc_clnt_auth(3N)).
callrpc()
Call the remote procedure associated with prognum, versnum, and procnum on the machine,
host. The parameter inproc is used to encode the procedure’s parameters, and outproc is used
to decode the procedure’s results; in is the address of the procedure’s argument, and out is the
address of where to place the result(s). This routine returns
0 if it succeeds, or the value of
enum clnt_stat cast to an integer if it fails. The routine
clnt_perrno()
(see
rpc_clnt_calls(3N)) is handy for translating failure statuses into messages.
Warning: you do not have control of timeouts or authentication using this routine. This rou-
tine exists for backward compatibility only, and is obsoleted by
rpc_call() (see
rpc_clnt_calls(3N)).
enum clnt_stat clnt_broadcast()
Like callrpc(), except the call message is broadcast to all locally connected broadcast nets.
Each time the caller receives a response, this routine calls eachresult(), whose form is:
eachresult(char *out
,struct sockaddr_in *addr);
where out is the same as out passed to clnt_broadcast()
, except that the remote
procedure’s output is decoded there; addr points to the address of the machine that sent the
results. If
eachresult() returns 0 clnt_broadcast()
waits for more replies; otherwise
it returns with appropriate status. If
eachresult() is NULL, clnt_broadcast()
returns without waiting for any replies.
Warning: broadcast packets are limited in size to the maximum transfer unit of the transports
involved. For Ethernet, the callers argument size is approximately 1500 bytes. Since the call
message is sent to all connected networks, it may potentially lead to broadcast storms.
clnt_broadcast() uses
AUTH_SYS credentials by default (see rpc_clnt_auth(3N)).
Warning: this routine exists for backward compatibility only, and is obsoleted by
rpc_broadcast() (see rpc_clnt_calls(3N)).
CLIENT * clntraw_create()
This routine creates an internal, memory-based RPC client for the remote program prognum,
version versnum. The transport used to pass messages to the service is actually a buffer
within the process’s address space, so the corresponding RPC server should live in the same
address space; see svcraw_create()
. This 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
as
clnt_raw_create() (see rpc_clnt_create(3N)), which obsoletes it.
CLIENT * clnttcp_create()
This routine creates an RPC client for the remote program prognum, version versnum; the
client uses TCP/IP as a transport. The remote program is located at Internet address addr.If
addr->sin_port is 0, then it is set to the actual port that the remote program is listening on
(the remote rpcbind service is consulted for this information). The parameter *fdp is a file
descriptor, which may be open and bound; if it is RPC_ANYSOCK, then this routine opens a
new one and sets *fdp. Refer to the File Descriptor section for more information. Since TCP-
based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with
the parameters sendsz and recvsz; values of 0 choose suitable defaults. This routine returns
NULL if it fails.
Warning: this routine exists for backward compatibility only.
clnt_create(),
clnt_tli_create(),orclnt_vc_create() (see rpc_clnt_create(3N)) should be used
instead.
CLIENT * clntudp_bufcreate()
Create a client handle for the remote program prognum,onversnum; the client uses UDP/IP
as the transport. The remote program is located at the Internet address addr.If
HP-UX 11i Version 2: September 2004 3 Hewlett-Packard Company Section 3913