Format
#include <rpc.h>
CLIENT *
clntudp_create(addr, prognum, versnum, wait, sockp)
struct sockaddr_in *addr;
u_long prognum;
u_long versnum;
struct timeval wait;
int *sockp;
Parameters
- addr
- Indicates
the pointer to the Internet address of the remote program. If addr points
to a port number of 0, addr is set to the
port on which the remote program is receiving. The remote portmap
service is used for this.
- prognum
- Specifies
the remote program number.
- versnum
- Specifies
the version number of the remote program.
- wait
- Indicates
that UDP resends the call request at intervals of wait time,
until either a response is received or the call times out. The timeout
length is set using the clnt_call() procedure.
- sockp
- Specifies
the pointer to the socket. If *sockp is
RPC_ANYSOCK, this routine opens a new socket and sets *sockp.
Requirement: If you use this handle to send
the PMAPPROC_SET, PMAPPROC_UNSET, RPCBPROC_SET, or RPCBPROC_UNSET
RPC to rpcbind, the following requirements apply:
- Your registration request must originate from an IP address on
the local host.
- If the SAF profile EZB.RPCBIND.sysname.rpcbindname.REGISTRY
is defined in the SERVAUTH class, your application user ID must be
granted at least READ access to the profile.
Usage
The clntudp_create() call creates
a client transport handle for the remote program (
prognum)
with version (
versnum). UDP is used as the
transport layer.
Note: This procedure should not be used with procedures
that use large arguments or return large results. While UDP packet
size is configurable to a maximum of 64 - 1 kilobytes, the default
UDP packet size is only 8 kilobytes.
Return codes
NULL indicates failure.
Context
- call_rpc()
- clnt_call()
- clnt_control()
- clnt_create()
- clnt_destroy()
- clnt_freeres()
- clnt_geterr()
- clnt_pcreateerror()
- clnt_perror()
- clnt_spcreateerror()
- clnt_sperror()
- clntraw_create()
- clnttcp_create()