summaryrefslogtreecommitdiffstats
path: root/support/include
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2009-12-11 10:34:42 -0500
committerSteve Dickson <steved@redhat.com>2009-12-11 16:13:16 -0500
commit626010056efb7baa76b08b5e6572720e02e425b4 (patch)
treea12e006ac3ea9030723e2f1a430c09c60da86dba /support/include
parent26a14b65991b79d317638f78dc6b4e5ac1ef712e (diff)
downloadnfs-utils-626010056efb7baa76b08b5e6572720e02e425b4.tar.gz
nfs-utils-626010056efb7baa76b08b5e6572720e02e425b4.tar.xz
nfs-utils-626010056efb7baa76b08b5e6572720e02e425b4.zip
libnfs.a: Provide shared helpers for managing netids
Introduce a couple of shared functions that can convert netids to protocol numbers and families, and back. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/include')
-rw-r--r--support/include/nfsrpc.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/support/include/nfsrpc.h b/support/include/nfsrpc.h
index dff6af7..d6d4a1c 100644
--- a/support/include/nfsrpc.h
+++ b/support/include/nfsrpc.h
@@ -90,6 +90,18 @@ extern CLIENT *nfs_get_priv_rpcclient( const struct sockaddr *,
struct timeval *);
/*
+ * Convert a netid to a protocol number and protocol family
+ */
+extern int nfs_get_proto(const char *netid, sa_family_t *family,
+ unsigned long *protocol);
+
+/*
+ * Convert a protocol family and protocol name to a netid
+ */
+extern char *nfs_get_netid(const sa_family_t family,
+ const unsigned long protocol);
+
+/*
* Convert a socket address to a universal address
*/
extern char *nfs_sockaddr2universal(const struct sockaddr *);