]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/include/nfsrpc.h
support: Provide an API for creating a privileged RPC client
[nfs-utils.git] / support / include / nfsrpc.h
index 097debb873aed39d90f2afff63ed6857f3883927..543c35bc9fdc8901395c6ae378b46ec182ab8bc9 100644 (file)
@@ -24,6 +24,7 @@
 #define __NFS_UTILS_NFSRPC_H
 
 #include <rpc/types.h>
+#include <rpc/clnt.h>
 
 /*
  * Conventional RPC program numbers
 extern rpcprog_t       nfs_getrpcbyname(const rpcprog_t, const char *table[]);
 
 /*
- * Acquire an RPC CLIENT *
+ * Acquire an RPC CLIENT * with an ephemeral source port
  */
 extern CLIENT          *nfs_get_rpcclient(const struct sockaddr *,
                                const socklen_t, const unsigned short,
                                const rpcprog_t, const rpcvers_t,
                                struct timeval *);
 
+/*
+ * Acquire an RPC CLIENT * with a privileged source port
+ */
+extern CLIENT          *nfs_get_priv_rpcclient( const struct sockaddr *,
+                               const socklen_t, const unsigned short,
+                               const rpcprog_t, const rpcvers_t,
+                               struct timeval *);
+
 /*
  * Convert a socket address to a universal address
  */