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

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
r
rpc_soc(3N) rpc_soc(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 procedures 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 routine
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 processs 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 over-
heads, 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
addrsin_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 descrip-
tor, 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 parame-
ters 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.Ifaddrsin_port is
0, it is set to port on which 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. The UDP transport resends the call message in
intervals of wait time until a response is received or until the call times out. The total time for
the call to time out is specified by clnt_call() (see rpc_clnt_calls(3N)). If successful it
returns a client handle, otherwise it returns NULL. The error can be printed using the
HP-UX Release 11i: December 2000 3 Section 3799
___
___