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.2 2002/05/16 08:57:12 sahlberg 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.
33 #ifdef HAVE_SYS_TYPES_H
34 #include <sys/types.h>
38 #include "packet-rpc.h"
40 static int proto_nfsacl = -1;
42 static gint ett_nfsacl = -1;
44 #define NFSACL_PROGRAM 100227
46 #define NFSACLPROC_NULL 0
48 #define NFSACLPROC2_GETACL 1
49 #define NFSACLPROC2_SETACL 2
50 #define NFSACLPROC2_GETATTR 3
51 #define NFSACLPROC2_ACCESS 4
53 #define NFSACLPROC3_GETACL 1
54 #define NFSACLPROC3_SETACL 2
56 /* proc number, "proc name", dissect_request, dissect_reply */
57 /* NULL as function pointer means: type of arguments is "void". */
58 static const vsff nfsacl1_proc[] = {
59 { NFSACLPROC_NULL, "NULL",
61 { 0, NULL, NULL, NULL }
64 static const vsff nfsacl2_proc[] = {
65 { NFSACLPROC_NULL, "NULL",
67 { NFSACLPROC2_GETACL, "GETACL",
69 { NFSACLPROC2_SETACL, "SETACL",
71 { NFSACLPROC2_GETATTR, "GETATTR",
73 { NFSACLPROC2_ACCESS, "ACCESS",
75 { 0, NULL, NULL, NULL }
78 static const vsff nfsacl3_proc[] = {
79 { NFSACLPROC_NULL, "NULL",
81 { NFSACLPROC3_GETACL, "GETACL",
83 { NFSACLPROC3_SETACL, "SETACL",
85 { 0, NULL, NULL, NULL }
89 proto_register_nfsacl(void)
92 static hf_register_info hf[] = {
96 static gint *ett[] = {
100 proto_nfsacl = proto_register_protocol("NFSACL", "NFSACL", "nfsacl");
102 proto_register_field_array(proto_nfsacl, hf, array_length(hf));
104 proto_register_subtree_array(ett, array_length(ett));
108 proto_reg_handoff_nfsacl(void)
110 /* Register the protocol as RPC */
111 rpc_init_prog(proto_nfsacl, NFSACL_PROGRAM, ett_nfsacl);
112 /* Register the procedure tables */
113 rpc_init_proc_table(NFSACL_PROGRAM, 1, nfsacl1_proc);
114 rpc_init_proc_table(NFSACL_PROGRAM, 2, nfsacl2_proc);
115 rpc_init_proc_table(NFSACL_PROGRAM, 3, nfsacl3_proc);