X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Finclude%2Frpcmisc.h;h=1b8f411ea8cc847c8bd2c23c1d576a5fbd487790;hp=d999ab9346518d716e3d62e91f28613cb0a96d7a;hb=7dd134204d88c22b414a4ecfcd986efb57fedebf;hpb=0bdb8d4f216cafb4fef03c9a1fc1f87508eed2d3 diff --git a/support/include/rpcmisc.h b/support/include/rpcmisc.h index d999ab9..1b8f411 100644 --- a/support/include/rpcmisc.h +++ b/support/include/rpcmisc.h @@ -41,18 +41,31 @@ 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_svcrun(void); void rpc_dispatch(struct svc_req *rq, SVCXPRT *xprt, struct rpc_dtable *dtable, int nvers, void *argp, void *resp); -void rpc_logcall(struct svc_req *, char *xname, char *args); extern int _rpcpmstart; extern int _rpcfdtype; extern int _rpcsvcdirty; +static inline struct sockaddr_in *nfs_getrpccaller_in(SVCXPRT *xprt) +{ + return (struct sockaddr_in *)svc_getcaller(xprt); +} + +static inline struct sockaddr *nfs_getrpccaller(SVCXPRT *xprt) +{ + return (struct sockaddr *)svc_getcaller(xprt); +} #endif /* RPCMISC_H */