summaryrefslogtreecommitdiffstats
path: root/include/rpc
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2001-03-27 21:27:33 +0000
committerwpaul <wpaul@FreeBSD.org>2001-03-27 21:27:33 +0000
commit65391cf528d0eda145c8414f711ecebab6e329d3 (patch)
tree381386720d7f7fd784d0b86cd6c41a53b7050711 /include/rpc
parente4a7dd8e9fa211d3caee7318d1d73653bb1f447e (diff)
downloadFreeBSD-src-65391cf528d0eda145c8414f711ecebab6e329d3.zip
FreeBSD-src-65391cf528d0eda145c8414f711ecebab6e329d3.tar.gz
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.
Diffstat (limited to 'include/rpc')
-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 2b0587b..f845e8e 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
OpenPOWER on IntegriCloud