2 * mount_dispatch This file contains the function dispatch table.
4 * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
13 * Procedures for MNTv1
15 static struct rpc_dentry mnt_1_dtable[] = {
16 dtable_ent(mount_null,1,void,void), /* NULL */
17 dtable_ent(mount_mnt,1,dirpath,fhstatus), /* MNT */
18 dtable_ent(mount_dump,1,void,mountlist), /* DUMP */
19 dtable_ent(mount_umnt,1,dirpath,void), /* UMNT */
20 dtable_ent(mount_umntall,1,void,void), /* UMNTALL */
21 dtable_ent(mount_export,1,void,exports), /* EXPORT */
22 dtable_ent(mount_exportall,1,void,exports), /* EXPORTALL */
26 * Procedures for MNTv2
28 static struct rpc_dentry mnt_2_dtable[] = {
29 dtable_ent(mount_null,1,void,void), /* NULL */
30 dtable_ent(mount_mnt,1,dirpath,fhstatus), /* MNT */
31 dtable_ent(mount_dump,1,void,mountlist), /* DUMP */
32 dtable_ent(mount_umnt,1,dirpath,void), /* UMNT */
33 dtable_ent(mount_umntall,1,void,void), /* UMNTALL */
34 dtable_ent(mount_export,1,void,exports), /* EXPORT */
35 dtable_ent(mount_exportall,1,void,exports), /* EXPORTALL */
36 dtable_ent(mount_pathconf,2,dirpath,ppathcnf), /* PATHCONF */
40 * Procedures for MNTv3
42 static struct rpc_dentry mnt_3_dtable[] = {
43 dtable_ent(mount_null,1,void,void), /* NULL */
44 dtable_ent(mount_mnt,3,dirpath,mountres3), /* MNT */
45 dtable_ent(mount_dump,1,void,mountlist), /* DUMP */
46 dtable_ent(mount_umnt,1,dirpath,void), /* UMNT */
47 dtable_ent(mount_umntall,1,void,void), /* UMNTALL */
48 dtable_ent(mount_export,1,void,exports), /* EXPORT */
51 #define number_of(x) (sizeof(x)/sizeof(x[0]))
53 static struct rpc_dtable dtable[] = {
54 { mnt_1_dtable, number_of(mnt_1_dtable) },
55 { mnt_2_dtable, number_of(mnt_2_dtable) },
56 { mnt_3_dtable, number_of(mnt_3_dtable) },
60 * The main dispatch routine.
63 mount_dispatch(struct svc_req *rqstp, SVCXPRT *transp)
65 union mountd_arguments argument;
66 union mountd_results result;
68 rpc_dispatch(rqstp, transp, dtable, number_of(dtable),