RPC_CLNT_CREATE(3) | Library Functions Manual | RPC_CLNT_CREATE(3) |
bool_t
clnt_control(CLIENT *clnt, const u_int req, char *info);
CLIENT *
clnt_create(const char * host, const rpcprog_t prognum, const rpcvers_t versnum, const char *nettype);
CLIENT *
clnt_create_vers(const char * host, const rpcprog_t prognum, rpcvers_t *vers_outp, const rpcvers_t vers_low, const rpcvers_t vers_high, char *nettype);
void
clnt_destroy(CLIENT * clnt);
CLIENT *
clnt_dg_create(const int fildes, const struct netbuf *svcaddr, const rpcprog_t prognum, const rpcvers_t versnum, const u_int sendsz, const u_int recvsz);
void
clnt_pcreateerror(const char *s);
char *
clnt_spcreateerror(const char *s);
CLIENT *
clnt_raw_create(const rpcprog_t prognum, const rpcvers_t versnum);
CLIENT *
clnt_tli_create(const int fildes, const struct netconfig *netconf, const struct netbuf *svcaddr, const rpcprog_t prognum, const rpcvers_t versnum, const u_int sendsz, const u_int recvsz);
CLIENT *
clnt_tp_create(const char * host, const rpcprog_t prognum, const rpcvers_t versnum, const struct netconfig *netconf);
CLIENT *
clnt_vc_create(const int fildes, const struct netbuf *svcaddr, const rpcprog_t prognum, const rpcvers_t versnum, const u_int sendsz, const u_int recvsz);
CLSET_TIMEOUT | struct timeval * | set total timeout |
CLGET_TIMEOUT | struct timeval * | get total timeout |
Note: if you set the timeout using clnt_control(), the timeout argument passed by clnt_call() is ignored in all subsequent calls.
Note: If you set the timeout value to 0 clnt_control() immediately returns an error (RPC_TIMEDOUT). Set the timeout parameter to 0 for batching calls.
CLGET_SVC_ADDR | struct netbuf * | get servers address |
CLGET_FD | int * | get fd from handle |
CLSET_FD_CLOSE | void | close fd on destroy |
CLSET_FD_NCLOSE | void | don't close fd on destroy |
CLGET_VERS | unsigned long * | get RPC program version |
CLSET_VERS | unsigned long * | set RPC program version |
CLGET_XID | unsigned long * | get XID of previous call |
CLSET_XID | unsigned long * | set XID of next call |
The following operations are valid for connectionless transports only:
CLSET_RETRY_TIMEOUT | struct timeval * | set the retry timeout |
CLGET_RETRY_TIMEOUT | struct timeval * | get the retry timeout |
The retry timeout is the time that RPC waits for the server to reply before retransmitting the request. clnt_control() returns TRUE on success and FALSE on failure.
Note: clnt_create() returns a valid client handle even if the particular version number supplied to clnt_create() is not registered with the rpcbind(8) service. This mismatch will be discovered by a clnt_call() later (see rpc_clnt_calls(3)).
May 23, 2009 | NetBSD 6.1 |