2 * Stubs for Sun's NFS ACL RPC service (runs on port 2049, and is presumably
3 * handled by the same kernel server code that handles NFS)
5 * Guy Harris <guy@alum.mit.edu>
7 * $Id: packet-nfsacl.c,v 1.4 2002/10/23 21:17:02 guy Exp $
9 * Ethereal - Network traffic analyzer
10 * By Gerald Combs <gerald@ethereal.com>
11 * Copyright 1998 Gerald Combs
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34 #include "packet-rpc.h"
36 static int proto_nfsacl = -1;
38 static gint ett_nfsacl = -1;
40 #define NFSACL_PROGRAM 100227
42 #define NFSACLPROC_NULL 0
44 #define NFSACLPROC2_GETACL 1
45 #define NFSACLPROC2_SETACL 2
46 #define NFSACLPROC2_GETATTR 3
47 #define NFSACLPROC2_ACCESS 4
49 #define NFSACLPROC3_GETACL 1
50 #define NFSACLPROC3_SETACL 2
52 /* proc number, "proc name", dissect_request, dissect_reply */
53 /* NULL as function pointer means: type of arguments is "void". */
54 static const vsff nfsacl1_proc[] = {
55 { NFSACLPROC_NULL, "NULL",
57 { 0, NULL, NULL, NULL }
60 static const vsff nfsacl2_proc[] = {
61 { NFSACLPROC_NULL, "NULL",
63 { NFSACLPROC2_GETACL, "GETACL",
65 { NFSACLPROC2_SETACL, "SETACL",
67 { NFSACLPROC2_GETATTR, "GETATTR",
69 { NFSACLPROC2_ACCESS, "ACCESS",
71 { 0, NULL, NULL, NULL }
74 static const vsff nfsacl3_proc[] = {
75 { NFSACLPROC_NULL, "NULL",
77 { NFSACLPROC3_GETACL, "GETACL",
79 { NFSACLPROC3_SETACL, "SETACL",
81 { 0, NULL, NULL, NULL }
85 proto_register_nfsacl(void)
88 static hf_register_info hf[] = {
92 static gint *ett[] = {
96 proto_nfsacl = proto_register_protocol("NFSACL", "NFSACL", "nfsacl");
98 proto_register_field_array(proto_nfsacl, hf, array_length(hf));
100 proto_register_subtree_array(ett, array_length(ett));
104 proto_reg_handoff_nfsacl(void)
106 /* Register the protocol as RPC */
107 rpc_init_prog(proto_nfsacl, NFSACL_PROGRAM, ett_nfsacl);
108 /* Register the procedure tables */
109 rpc_init_proc_table(NFSACL_PROGRAM, 1, nfsacl1_proc, -1);
110 rpc_init_proc_table(NFSACL_PROGRAM, 2, nfsacl2_proc, -1);
111 rpc_init_proc_table(NFSACL_PROGRAM, 3, nfsacl3_proc, -1);