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

r
rpc_clnt_calls(3N) rpc_clnt_calls(3N)
Warning: returns pointer to a buffer that is overwritten on each call. In multithread applications, this
buffer is implemented as thread-specific data.
enum clnt_stat rpc_broadcast()
Like rpc_call() , except the call message is broadcast to all the connectionless transports specified
by nettype.Ifnettype is NULL, it defaults to
netpath. Each time it receives a response, this routine
calls
eachresult() , whose form is:
bool_t eachresult(caddr_t
out,const struct netbuf *addr
,
const struct netconfig *
netconf);
where out is the same as out passed to
rpc_broadcast()
, except that the remote procedure’s out-
put is decoded there; addr points to the address of the machine that sent the results, and netconf is
the netconfig structure of the transport on which the remote server responded. If
eachresult()
returns 0, rpc_broadcast()
waits for more replies; otherwise it returns with appropriate status.
Warning: broadcast file descriptors are limited in size to the maximum transfer size of that transport.
For Ethernet, this value is 1500 bytes.
rpc_broadcast() uses
AUTH_SYS credentials by default
(see rpc_clnt_auth(3N)).
enum clnt_stat rpc_broadcast_exp()
Like rpc_broadcast(), except that the initial timeout, inittime and the maximum timeout, wait-
time are specified in milliseconds.
inittime is the initial time that
rpc_broadcast_exp()
waits before resending the request. After
the first resend, the re-transmission interval increases exponentially until it exceeds waittime.
enum clnt_stat rpc_call()
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(s), and out is the address of where to
place the result(s). nettype can be any of the values listed on rpc(3N). This routine returns
RPC_SUCCESS if it succeeds, or an appropriate status is returned. Use the clnt_perrno()
rou-
tine to translate failure status into error messages.
Warning:
rpc_call() uses the first available transport belonging to the class nettype, on which it
can create a connection. You do not have control of timeouts or authentication using this routine.
MULTITHREAD USAGE
Thread Safe: Yes
Cancel Safe: Yes
Fork Safe: No
Async-cancel Safe: No
Async-signal Safe: No
These functions can be called safely in a multithreaded environment. They may be cancellation points in
that they call functions that are cancel points.
In a multithreaded environment, these functions are not safe to be called by a child process after
fork()
and before exec(). These functions should not be called by a multithreaded application that support
asynchronous cancellation or asynchronous signals.
SEE ALSO
printf(3S), rpc(3N), rpc_clnt_auth(3N), rpc_clnt_create(3N).
HP-UX 11i Version 2: December 2007 Update − 3 − Hewlett-Packard Company 337