X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=support%2Finclude%2Frpcmisc.h;h=0b06457bbb74d1d8386fd4c343fd825caa804be8;hb=9f660799d03e6235015ada0a1c22a87073ee6cc3;hp=5814a63a9ee17f772939b9d7d7c439d078d8f24f;hpb=7131fc33fa6928187b639fddac49769895064f7d;p=nfs-utils.git diff --git a/support/include/rpcmisc.h b/support/include/rpcmisc.h index 5814a63..0b06457 100644 --- a/support/include/rpcmisc.h +++ b/support/include/rpcmisc.h @@ -31,7 +31,7 @@ struct rpc_dentry { struct rpc_dtable { struct rpc_dentry *entries; - int nproc; + rpcproc_t nproc; }; #define dtable_ent(func, vers, arg_type, res_type) \ @@ -41,7 +41,12 @@ struct rpc_dtable { (xdrproc_t)xdr_##res_type, sizeof(res_type), \ } - +void nfs_svc_unregister(const rpcprog_t program, + const rpcvers_t version); +unsigned int nfs_svc_create(char *name, const rpcprog_t program, + const rpcvers_t version, + void (*dispatch)(struct svc_req *, SVCXPRT *), + const uint16_t port); void rpc_init(char *name, int prog, int vers, void (*dispatch)(struct svc_req *, SVCXPRT *), int defport); @@ -53,5 +58,14 @@ extern int _rpcpmstart; extern int _rpcfdtype; extern int _rpcsvcdirty; +static inline struct sockaddr_in *nfs_getrpccaller_in(SVCXPRT *xprt) +{ + return (struct sockaddr_in *)(char *)svc_getcaller(xprt); +} + +static inline struct sockaddr *nfs_getrpccaller(SVCXPRT *xprt) +{ + return (struct sockaddr *)(char *)svc_getcaller(xprt); +} #endif /* RPCMISC_H */