From 65d3c627a5fcc1bd1a27d9ef2a2092f8d42f3058 Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Tue, 27 Mar 2001 21:27:33 +0000 Subject: Add a CLSET_ASYNC command, which allows us to (ab)use the clnt_dg transport to make asynchronous RPCs. This is needed to help fix ypbind, which can no longer override the clnt_dg_call() method (formerly the clntudp_call() method) due to all the internal descriptor locking code in TI-RPC. Turning on this flag allows us to send an RPC request, then return immediately, and handle a reply later, rather than being forced to do the request and reply in a single function call. Also fix a byte ordering bug: when clnt_dg_call() increments the XID prior to transmitting a request, it uses the raw value, which is wrong. The XID is stored in network byte order, i.e. big-endian. The CLSET_XID and CLGET_XID commands in clnt_dg_control() use ntohl()/htonl() to get the byte ordering right, but because clnt_dg_call() does not do this, using CLSET_XID/CLGET_XID doesn't actually work, unless you're on a big endian host, which we aren't (yet). Fix clnt_dg_call() to byte swap properly when doing the increment. --- include/rpc/clnt.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h index 2b0587b169ef6..f845e8e346b57 100644 --- a/include/rpc/clnt.h +++ b/include/rpc/clnt.h @@ -228,6 +228,7 @@ struct rpc_timers { */ #define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */ #define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */ +#define CLSET_ASYNC 19 /* * void -- cgit v1.3