]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/include/rpcmisc.h
Cleaned up a warning in rpcdispatch.c
[nfs-utils.git] / support / include / rpcmisc.h
index d999ab9346518d716e3d62e91f28613cb0a96d7a..0b06457bbb74d1d8386fd4c343fd825caa804be8 100644 (file)
@@ -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,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 *)(char *)svc_getcaller(xprt);
+}
+
+static inline struct sockaddr *nfs_getrpccaller(SVCXPRT *xprt)
+{
+       return (struct sockaddr *)(char *)svc_getcaller(xprt);
+}
 
 #endif /* RPCMISC_H */