Creates a User Datagram Protocol/Internet Protocol (UDP/IP) client transport handle.
#include <rpc/rpc.h>
CLIENT *clntudp_create (addr, prognum, versnum, wait, sockp) struct sockaddr_in *addr; u_long prognum, versnum; struct timeval wait; int *sockp;
The clntudp_create subroutine creates a Remote Procedure Call (RPC) client transport handle for a remote program. The client uses UDP as the transport to pass messages to the service.
RPC messages transported by UDP/IP can hold up to 8KB of encoded data. Use this subroutine for procedures that take arguments or return results of less than 8KB.
addr | Points to the Internet address of the remote program. If the port number for this Internet address (addr->sin_port) is 0, then the value of the addr parameter is set to the port that the remote program is listening on. The clntudp_create subroutine consults the remote portmap daemon for this information. |
prognum | Specifies the program number of the remote program. |
versnum | Specifies the version number of the remote program. |
wait | Sets the amount of time that the UDP/IP transport waits to receive a response before the transport sends another remote procedure call or the remote procedure call times out. The total time for the call to time out is set by the clnt_call macro. |
sockp | Specifies a pointer to a socket. If the value of the sockp parameter is RPC_ANYSOCK, the clntudp_create subroutine opens a new socket and sets the sockp pointer to that new socket. |
Upon successful completion, this subroutine returns a valid UDP client handle. If unsuccessful, it returns a value of null.
This subroutine is part of Base Operating System (BOS) Runtime.
The callrpc subroutine, clnt_pcreateerror subroutine, clnttcp_create subroutine, svcudp_create subroutine.
The portmap daemon.
The clnt_call macro.
List of RPC Programming References.
Remote Procedure Call (RPC) Overview for Programming and Sockets Overview in AIX Version 4.3 Communications Programming Concepts.