X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Finclude%2Frpcmisc.h;h=b806227ecc50acd633ae4d375f6edd1bda6994fc;hp=f551a8577acf3850d2e5a7d88b89659f94fd76d4;hb=HEAD;hpb=27a49079b03316eebcbc74197b73988b01b58ecc diff --git a/support/include/rpcmisc.h b/support/include/rpcmisc.h index f551a85..b806227 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,13 +41,19 @@ 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); void rpc_dispatch(struct svc_req *rq, SVCXPRT *xprt, struct rpc_dtable *dtable, int nvers, void *argp, void *resp); +int getservport(u_long number, const char *proto); extern int _rpcpmstart; extern int _rpcfdtype; @@ -55,12 +61,12 @@ extern int _rpcsvcdirty; static inline struct sockaddr_in *nfs_getrpccaller_in(SVCXPRT *xprt) { - return (struct sockaddr_in *)svc_getcaller(xprt); + return (struct sockaddr_in *)(char *)svc_getcaller(xprt); } static inline struct sockaddr *nfs_getrpccaller(SVCXPRT *xprt) { - return (struct sockaddr *)svc_getcaller(xprt); + return (struct sockaddr *)(char *)svc_getcaller(xprt); } #endif /* RPCMISC_H */