aboutsummaryrefslogtreecommitdiff
path: root/include/rpc/clnt.h
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>2001-03-27 21:27:33 +0000
committerBill Paul <wpaul@FreeBSD.org>2001-03-27 21:27:33 +0000
commit65d3c627a5fcc1bd1a27d9ef2a2092f8d42f3058 (patch)
tree0309d47a4c1cffbbf9314e09c0bd56c721c4e0ce /include/rpc/clnt.h
parent6dcd3d86f57b8f8e82b9bb3963fa6d3602adc878 (diff)
downloadsrc-65d3c627a5fcc1bd1a27d9ef2a2092f8d42f3058.tar.gz
src-65d3c627a5fcc1bd1a27d9ef2a2092f8d42f3058.zip
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.
Notes
Notes: svn path=/head/; revision=74879
Diffstat (limited to 'include/rpc/clnt.h')
-rw-r--r--include/rpc/clnt.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h
index 2b0587b169ef..f845e8e346b5 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