X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Finclude%2Fnfsrpc.h;h=d50fe94c8870017f30112af272671cefe62ecdc9;hp=dff6af75159ca48e3729c5f81dccb8875b24d87f;hb=a77ca5c6a79486dc8c5a4c327fe5310f5d497766;hpb=5600327322a78a3a803368c0fe4f923cf14a4cf7 diff --git a/support/include/nfsrpc.h b/support/include/nfsrpc.h index dff6af7..d50fe94 100644 --- a/support/include/nfsrpc.h +++ b/support/include/nfsrpc.h @@ -26,6 +26,12 @@ #include #include +/* + * IANA does not define an IP protocol number for RDMA transports. + * Choose an arbitrary value we can use locally. + */ +#define NFSPROTO_RDMA (3939) + /* * Conventional RPC program numbers */ @@ -58,16 +64,6 @@ static inline void nfs_clear_rpc_createerr(void) memset(&rpc_createerr, 0, sizeof(rpc_createerr)); } -/* - * Extract port value from a socket address - */ -extern uint16_t nfs_get_port(const struct sockaddr *); - -/* - * Set port value in a socket address - */ -extern void nfs_set_port(struct sockaddr *, const uint16_t); - /* * Look up an RPC program name in /etc/rpc */ @@ -89,6 +85,18 @@ extern CLIENT *nfs_get_priv_rpcclient( const struct sockaddr *, const rpcprog_t, const rpcvers_t, 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 */ @@ -158,4 +166,7 @@ extern int nfs_rpc_ping(const struct sockaddr *sap, const unsigned short protocol, const struct timeval *timeout); -#endif /* __NFS_UTILS_NFSRPC_H */ +/* create AUTH_SYS handle with no supplemental groups */ +extern AUTH * nfs_authsys_create(void); + +#endif /* !__NFS_UTILS_NFSRPC_H */