2 * rpcmisc Support for RPC startup, dispatching and logging.
4 * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
11 #include <rpc/pmap_clnt.h>
14 # define CONCAT(a,b) a##b
17 # define CONCAT(a,b) a/**/b
18 # define STRING(a) "a"
21 typedef bool_t (*rpcsvc_fn_t)(struct svc_req *, void *argp, void *resp);
26 xdrproc_t xdr_arg_fn; /* argument XDR */
28 xdrproc_t xdr_res_fn; /* result XDR */
33 struct rpc_dentry *entries;
37 #define dtable_ent(func, vers, arg_type, res_type) \
39 (rpcsvc_fn_t)func##_##vers##_svc, \
40 (xdrproc_t)xdr_##arg_type, sizeof(arg_type), \
41 (xdrproc_t)xdr_##res_type, sizeof(res_type), \
45 int makesock(int port, int proto);
46 void rpc_init(char *name, int prog, int vers,
47 void (*dispatch)(struct svc_req *, SVCXPRT *),
49 void rpc_svcrun(void);
50 void rpc_dispatch(struct svc_req *rq, SVCXPRT *xprt,
51 struct rpc_dtable *dtable, int nvers,
52 void *argp, void *resp);
53 void rpc_logcall(struct svc_req *, char *xname, char *args);
55 extern int _rpcpmstart;
56 extern int _rpcfdtype;
57 extern int _rpcsvcdirty;
60 #endif /* RPCMISC_H */