~ubuntu-branches/debian/experimental/nfs-utils/experimental

« back to all changes in this revision

Viewing changes to support/include/rpcdispatch.h

  • Committer: Bazaar Package Importer
  • Author(s): Anibal Monsalve Salazar
  • Date: 2006-07-08 14:26:40 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060708142640-r171kjj2a13gy2kz
Tags: 1:1.0.9-1
* Updated co-mantainer mail address.
* New upstream release.
  - Added 'mount.nfs' utility which can be used as a mount helper
    to mount nfs filesystems. It does not yet support 'user' mounts.
  - Makefile/autoconf tidyups
  - No compiles with no warnings
  - deleted debian/* at request of debian maintainer
  - deleted assorted other unused files
  - mountd can be run multi-threaded for configurations with many hundreds
    of clients (mountd -t 20).  Default is single-threaded
  - Support for selection NFS version to be exported, and protocol to
    use.  This requires kernel patches that should be in linux 2.6.19.
  - Use 65534 rather than -2 for default anon.  This makes no difference in many
    cases, but is important in some.
  - New utility 'rpcdebug' for controlled kernel 'debug' options for nfs and nfsd.
  - nfsstat reports NFSv4 operation statistics that should be available in
    linux 2.6.18.
  - assorted other fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *      nlm_dispatch    This is a generic RPC call dispatcher.
3
 
 *                      It is loosely based on the dispatch mechanism I
4
 
 *                      first encountered in the UNFSD source.
5
 
 *
6
 
 *      Cyopright (C) 1995, Olaf Kirch <okir@monad.swb.de>
7
 
 *
8
 
 *      24.05.95        okir
9
 
 *
10
 
 */
11
 
 
12
 
#ifndef RPCDISPATCH_H
13
 
#define RPCDISPATCH_H
14
 
 
15
 
#include <rpc/rpc.h>
16
 
 
17
 
#ifdef __STDC__
18
 
#   define CONCAT(a,b)          a##b
19
 
#   define CONCAT3(a,b,c)       a##b##c
20
 
#   define STRING(a)            #a
21
 
#else
22
 
#   define CONCAT(a,b)          a/**/b
23
 
#   define CONCAT3(a,b,c)       a/**/b/**/c
24
 
#   define STRING(a)            "a"
25
 
#endif
26
 
 
27
 
#ifdef __STDC__
28
 
typedef bool_t  (*rpcsvc_fn_t)(struct svc_req *, void *argp, void *resp);
29
 
#else
30
 
typedef bool_t  (*rpcsvc_fn_t)();
31
 
#endif
32
 
 
33
 
#define table_ent(func, vers, arg_type, res_type) \
34
 
        {       STRING(func), \
35
 
                (rpcsvc_fn_t)CONCAT(func,_svc), vers,\
36
 
                (xdrproc_t)CONCAT(xdr_, arg_type), sizeof(arg_type), \
37
 
                (xdrproc_t)CONCAT(xdr_, res_type), sizeof(res_type), \
38
 
        }
39
 
#define nlm_undef_svc   NULL
40
 
#define xdr_nlm_void    xdr_void
41
 
 
42
 
struct dispatch_entry {
43
 
        const char      *name;
44
 
        rpcsvc_fn_t     func;
45
 
        unsigned int    versions;               /* bitmap of versions */
46
 
        xdrproc_t       xdr_arg_fn;             /* argument XDR */
47
 
        size_t          xdr_arg_size;
48
 
        xdrproc_t       xdr_res_fn;             /* result XDR */
49
 
        size_t          xdr_res_size;
50
 
};
51
 
 
52
 
void    rpc_dispatch(struct svc_req *rq, SVCXPRT *tp,
53
 
                        struct dispatch_entry *dtable, int nproc,
54
 
                        void *argp, void *resp);
55
 
void    rpc_svcrun(void);
56
 
 
57
 
#endif /* RPCDISPATCH_H */