Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-nfsacl.c
bloba876029c9049799098bc205362e815f405cd58d5
1 /* packet-nfsacl.c
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 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
14 #include "config.h"
16 #include <epan/packet.h>
17 #include <epan/tfs.h>
18 #include <wsutil/array.h>
19 #include "packet-nfs.h"
21 void proto_register_nfsacl(void);
22 void proto_reg_handoff_nfsacl(void);
24 static int proto_nfsacl;
25 static int hf_nfsacl_mask;
26 static int hf_nfsacl_mask_acl_entry;
27 static int hf_nfsacl_mask_acl_count;
28 static int hf_nfsacl_mask_default_acl_entry;
29 static int hf_nfsacl_mask_default_acl_count;
30 static int hf_nfsacl_procedure_v1;
31 static int hf_nfsacl_procedure_v2;
32 static int hf_nfsacl_procedure_v3;
33 static int hf_nfsacl_entry;
34 static int hf_nfsacl_aclcnt;
35 static int hf_nfsacl_dfaclcnt;
36 static int hf_nfsacl_aclent;
37 static int hf_nfsacl_aclent_type;
38 static int hf_nfsacl_aclent_uid;
39 static int hf_nfsacl_aclent_perm;
40 static int hf_nfsacl_aclent_perm_read;
41 static int hf_nfsacl_aclent_perm_write;
42 static int hf_nfsacl_aclent_perm_exec;
43 static int hf_nfsacl_create;
45 static int ett_nfsacl;
46 static int ett_nfsacl_mask;
47 static int ett_nfsacl_entry;
48 static int ett_nfsacl_aclent;
49 static int ett_nfsacl_aclent_perm;
50 static int ett_nfsacl_aclent_entries;
52 #define NFSACL_PROGRAM 100227
54 #define NFSACLPROC_NULL 0
56 #define NFSACLPROC2_GETACL 1
57 #define NFSACLPROC2_SETACL 2
58 #define NFSACLPROC2_GETATTR 3
59 #define NFSACLPROC2_ACCESS 4
60 #define NFSACLPROC2_GETXATTRDIR 5
62 #define NFSACLPROC3_GETACL 1
63 #define NFSACLPROC3_SETACL 2
64 #define NFSACLPROC3_GETXATTRDIR 3
66 #define ACL2_OK 0
67 #define ACL3_OK 0
69 static int
70 dissect_nfsacl_mask(tvbuff_t *tvb, int offset, proto_tree *tree)
72 proto_item *mask_item;
73 proto_tree *mask_tree;
75 if (tree)
77 mask_item = proto_tree_add_item(tree, hf_nfsacl_mask, tvb, offset, 4, ENC_BIG_ENDIAN);
78 mask_tree = proto_item_add_subtree(mask_item, ett_nfsacl_mask);
80 proto_tree_add_item(mask_tree, hf_nfsacl_mask_acl_entry, tvb, offset, 4, ENC_BIG_ENDIAN);
81 proto_tree_add_item(mask_tree, hf_nfsacl_mask_acl_count, tvb, offset, 4, ENC_BIG_ENDIAN);
82 proto_tree_add_item(mask_tree, hf_nfsacl_mask_default_acl_entry, tvb, offset, 4, ENC_BIG_ENDIAN);
83 proto_tree_add_item(mask_tree, hf_nfsacl_mask_default_acl_count, tvb, offset, 4, ENC_BIG_ENDIAN);
86 offset += 4;
87 return offset;
90 #define NA_READ 0x4
91 #define NA_WRITE 0x2
92 #define NA_EXEC 0x1
94 static const value_string names_nfsacl_aclent_type[] = {
95 #define NA_USER_OBJ 0x1
96 { NA_USER_OBJ, "NA_USER_OBJ" },
97 #define NA_USER 0x2
98 { NA_USER, "NA_USER" },
99 #define NA_GROUP_OBJ 0x4
100 { NA_GROUP_OBJ, "NA_GROUP_OBJ" },
101 #define NA_GROUP 0x8
102 { NA_GROUP, "NA_GROUP" },
103 #define NA_CLASS_OBJ 0x10
104 { NA_CLASS_OBJ, "NA_CLASS_OBJ" },
105 #define NA_OTHER_OBJ 0x20
106 { NA_OTHER_OBJ, "NA_OTHER_OBJ" },
107 #define NA_ACL_DEFAULT 0x1000
108 { NA_ACL_DEFAULT, "NA_ACL_DEFAULT" },
109 { NA_ACL_DEFAULT | NA_USER_OBJ, "Default NA_USER_OBJ" },
110 { NA_ACL_DEFAULT | NA_USER, "Default NA_USER" },
111 { NA_ACL_DEFAULT | NA_GROUP_OBJ, "Default NA_GROUP_OBJ" },
112 { NA_ACL_DEFAULT | NA_GROUP, "Default NA_GROUP" },
113 { NA_ACL_DEFAULT | NA_CLASS_OBJ, "Default NA_CLASS_OBJ" },
114 { NA_ACL_DEFAULT | NA_OTHER_OBJ, "Default NA_OTHER_OBJ" },
115 { 0, NULL },
118 static int
119 dissect_nfsacl_aclent(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
120 proto_tree* tree)
122 proto_item *entry_item = NULL;
123 proto_tree *entry_tree = NULL;
124 proto_item *perm_item = NULL;
125 proto_tree *perm_tree = NULL;
127 if (tree)
129 entry_item = proto_tree_add_item(tree, hf_nfsacl_aclent, tvb,
130 offset + 0, -1, ENC_NA);
131 entry_tree = proto_item_add_subtree(entry_item, ett_nfsacl_aclent);
134 offset = dissect_rpc_uint32(tvb, entry_tree, hf_nfsacl_aclent_type, offset);
135 offset = dissect_rpc_uint32(tvb, entry_tree, hf_nfsacl_aclent_uid, offset);
137 perm_item = proto_tree_add_item(entry_tree, hf_nfsacl_aclent_perm,
138 tvb, offset, 4, ENC_BIG_ENDIAN);
139 perm_tree = proto_item_add_subtree(perm_item, ett_nfsacl_aclent_perm);
140 proto_tree_add_item(perm_tree, hf_nfsacl_aclent_perm_read, tvb, offset, 4, ENC_BIG_ENDIAN);
141 proto_tree_add_item(perm_tree, hf_nfsacl_aclent_perm_write, tvb, offset, 4, ENC_BIG_ENDIAN);
142 proto_tree_add_item(perm_tree, hf_nfsacl_aclent_perm_exec, tvb, offset, 4, ENC_BIG_ENDIAN);
143 offset += 4;
145 return offset;
149 static int
150 dissect_nfsacl_secattr(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
151 proto_tree *tree)
153 uint32_t aclcnt, dfaclcnt;
154 uint32_t i;
155 proto_tree *entry_tree;
157 offset = dissect_nfsacl_mask(tvb, offset, tree);
158 offset = dissect_rpc_uint32(tvb, tree, hf_nfsacl_aclcnt, offset);
160 aclcnt = tvb_get_ntohl(tvb, offset);
162 entry_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4,
163 ett_nfsacl_aclent_entries, NULL, "Total ACL entries: %d", aclcnt);
165 offset += 4;
167 if (aclcnt > 0)
169 for (i = 0; i < aclcnt; i++)
170 offset = dissect_nfsacl_aclent(tvb, offset, pinfo, entry_tree);
173 /* */
175 offset = dissect_rpc_uint32(tvb, tree, hf_nfsacl_dfaclcnt, offset);
177 dfaclcnt = tvb_get_ntohl(tvb, offset);
179 entry_tree = proto_tree_add_subtree_format(tree, tvb, offset, 4,
180 ett_nfsacl_aclent_entries, NULL, "Total default ACL entries: %d", dfaclcnt);
182 offset += 4;
184 if (dfaclcnt > 0)
186 for (i = 0; i < dfaclcnt; i++)
187 offset = dissect_nfsacl_aclent(tvb, offset, pinfo, entry_tree);
190 return offset;
193 /* proc number, "proc name", dissect_request, dissect_reply */
194 static const vsff nfsacl1_proc[] = {
195 { NFSACLPROC_NULL, "NULL",
196 dissect_rpc_void, dissect_rpc_void },
197 { 0, NULL, NULL, NULL }
199 static const value_string nfsacl1_proc_vals[] = {
200 { NFSACLPROC_NULL, "NULL" },
201 { 0, NULL }
204 static int
205 dissect_nfsacl2_getacl_call(tvbuff_t *tvb, packet_info *pinfo _U_,
206 proto_tree *tree, void* data)
208 int offset = 0;
209 offset = dissect_fhandle(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
210 offset = dissect_nfsacl_mask(tvb, offset, tree);
211 return offset;
214 static int
215 dissect_nfsacl2_getacl_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
216 proto_tree *tree, void* data _U_)
218 uint32_t status;
219 int offset = 0;
221 proto_tree_add_item_ret_uint(tree, hf_nfs_status, tvb, offset, 4, ENC_BIG_ENDIAN, &status);
223 offset += 4;
225 if (status == ACL2_OK)
227 offset = dissect_nfs2_fattr(tvb, offset, tree, "attr");
228 offset = dissect_nfsacl_secattr(tvb, offset, pinfo, tree);
231 return offset;
234 static int
235 dissect_nfsacl2_setacl_call(tvbuff_t *tvb, packet_info *pinfo _U_,
236 proto_tree *tree, void* data)
238 int offset = 0;
239 offset = dissect_fhandle(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
240 offset = dissect_nfsacl_secattr(tvb, offset, pinfo, tree);
242 return offset;
245 static int
246 dissect_nfsacl2_setacl_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
247 proto_tree *tree, void* data _U_)
249 uint32_t status;
250 int offset = 0;
252 proto_tree_add_item_ret_uint(tree, hf_nfs_status, tvb, offset + 0, 4, ENC_BIG_ENDIAN, &status);
254 offset += 4;
256 if (status == ACL2_OK)
257 offset = dissect_nfs2_fattr(tvb, offset, tree, "attr");
259 return offset;
262 static int
263 dissect_nfsacl2_getattr_call(tvbuff_t *tvb, packet_info *pinfo _U_,
264 proto_tree *tree, void* data)
266 return dissect_fhandle(tvb, 0, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
269 static int
270 dissect_nfsacl2_getattr_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
271 proto_tree *tree, void* data _U_)
273 return dissect_nfs2_fattr(tvb, 0, tree, "attr");
276 static int
277 dissect_nfsacl2_access_call(tvbuff_t *tvb, packet_info *pinfo _U_,
278 proto_tree *tree, void* data)
280 uint32_t *acc_request, amask;
281 rpc_call_info_value *civ = (rpc_call_info_value*)data;
282 int offset = 0;
284 offset = dissect_fhandle(tvb, offset, pinfo, tree, "fhandle", NULL, civ);
286 /* Get access mask to check and save it for comparison to the access reply. */
287 amask = tvb_get_ntohl(tvb, offset);
288 acc_request = (uint32_t *)wmem_memdup(wmem_file_scope(), &amask, sizeof(uint32_t));
289 civ->private_data = acc_request;
291 display_access_items(tvb, offset, pinfo, tree, amask, 'C', 3, NULL, "Check") ;
293 offset+=4;
294 return offset;
297 static int
298 dissect_nfsacl2_access_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
299 proto_tree *tree, void* data)
301 uint32_t status;
302 int offset = 0;
304 status = tvb_get_ntohl(tvb, offset + 0);
306 proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4, status);
308 offset += 4;
310 if (status == ACL2_OK)
312 offset = dissect_nfs2_fattr(tvb, offset, tree, "attr");
313 offset = dissect_access_reply(tvb, offset, pinfo, tree, 3, NULL, (rpc_call_info_value*)data);
316 return offset;
319 static int
320 dissect_nfsacl2_getxattrdir_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data)
322 int offset = 0;
323 offset = dissect_fhandle(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
324 offset = dissect_rpc_bool(tvb, tree, hf_nfsacl_create, offset);
326 return offset;
329 static int
330 dissect_nfsacl2_getxattrdir_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data)
332 uint32_t status;
333 int offset = 0;
335 status = tvb_get_ntohl(tvb, offset + 0);
337 proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4, status);
339 offset += 4;
341 if (status == ACL2_OK)
343 offset = dissect_fhandle(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
344 offset = dissect_nfs2_fattr(tvb, offset, tree, "attr");
347 return offset;
350 static const vsff nfsacl2_proc[] = {
351 { NFSACLPROC_NULL, "NULL",
352 dissect_rpc_void, dissect_rpc_void },
353 { NFSACLPROC2_GETACL, "GETACL",
354 dissect_nfsacl2_getacl_call, dissect_nfsacl2_getacl_reply },
355 { NFSACLPROC2_SETACL, "SETACL",
356 dissect_nfsacl2_setacl_call, dissect_nfsacl2_setacl_reply },
357 { NFSACLPROC2_GETATTR, "GETATTR",
358 dissect_nfsacl2_getattr_call, dissect_nfsacl2_getattr_reply },
359 { NFSACLPROC2_ACCESS, "ACCESS",
360 dissect_nfsacl2_access_call, dissect_nfsacl2_access_reply },
361 { NFSACLPROC2_GETXATTRDIR, "GETXATTRDIR",
362 dissect_nfsacl2_getxattrdir_call, dissect_nfsacl2_getxattrdir_reply },
363 { 0, NULL, NULL, NULL }
365 static const value_string nfsacl2_proc_vals[] = {
366 { NFSACLPROC_NULL, "NULL" },
367 { NFSACLPROC2_GETACL, "GETACL" },
368 { NFSACLPROC2_SETACL, "SETACL" },
369 { NFSACLPROC2_GETATTR, "GETATTR" },
370 { NFSACLPROC2_ACCESS, "ACCESS" },
371 { NFSACLPROC2_GETXATTRDIR, "GETXATTRDIR" },
372 { 0, NULL }
375 static int
376 dissect_nfsacl3_getacl_call(tvbuff_t *tvb, packet_info *pinfo _U_,
377 proto_tree *tree, void* data)
379 int offset = 0;
380 offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
381 offset = dissect_nfsacl_mask(tvb, offset, tree);
383 return offset;
386 static int
387 dissect_nfsacl3_getacl_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
388 proto_tree *tree, void* data _U_)
390 uint32_t status;
391 proto_item *entry_item;
392 proto_tree *entry_tree;
393 int offset = 0;
395 proto_tree_add_item_ret_uint(tree, hf_nfs_status, tvb, offset, 4, ENC_BIG_ENDIAN, &status);
397 offset += 4;
399 entry_item = proto_tree_add_item(tree, hf_nfsacl_entry, tvb,
400 offset + 0, -1, ENC_NA);
401 entry_tree = proto_item_add_subtree(entry_item, ett_nfsacl_entry);
403 offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, entry_tree, "attr");
405 if (status != ACL3_OK)
406 return offset;
408 offset = dissect_nfsacl_secattr(tvb, offset, pinfo, entry_tree);
410 return offset;
413 static int
414 dissect_nfsacl3_setacl_call(tvbuff_t *tvb, packet_info *pinfo _U_,
415 proto_tree *tree, void* data)
418 proto_item *acl_item;
419 proto_tree *acl_tree;
420 int offset = 0;
422 offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
424 acl_item = proto_tree_add_item(tree, hf_nfsacl_entry, tvb, offset + 0,
425 -1, ENC_NA);
426 acl_tree = proto_item_add_subtree(acl_item, ett_nfsacl_entry);
428 offset = dissect_nfsacl_secattr(tvb, offset, pinfo, acl_tree);
430 return offset;
433 static int
434 dissect_nfsacl3_setacl_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
435 proto_tree *tree, void* data _U_)
437 uint32_t status;
438 int offset = 0;
440 proto_tree_add_item_ret_uint(tree, hf_nfs_status, tvb, offset, 4, ENC_BIG_ENDIAN, &status);
441 offset += 4;
443 offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree, "attr");
445 return offset;
448 static int
449 dissect_nfsacl3_getxattrdir_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data)
452 int offset = 0;
454 offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
455 offset = dissect_rpc_bool(tvb, tree, hf_nfsacl_create, offset);
457 return offset;
460 static int
461 dissect_nfsacl3_getxattrdir_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data)
463 uint32_t status;
464 int offset = 0;
466 proto_tree_add_item_ret_uint(tree, hf_nfs_status, tvb, offset, 4, ENC_BIG_ENDIAN, &status);
467 offset += 4;
469 if (status == ACL3_OK)
471 offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
472 offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree, "attr");
475 return offset;
478 static const vsff nfsacl3_proc[] = {
479 { NFSACLPROC_NULL, "NULL",
480 dissect_rpc_void, dissect_rpc_void },
481 { NFSACLPROC3_GETACL, "GETACL",
482 dissect_nfsacl3_getacl_call, dissect_nfsacl3_getacl_reply },
483 { NFSACLPROC3_SETACL, "SETACL",
484 dissect_nfsacl3_setacl_call, dissect_nfsacl3_setacl_reply },
485 { NFSACLPROC3_GETXATTRDIR, "GETXATTRDIR",
486 dissect_nfsacl3_getxattrdir_call, dissect_nfsacl3_getxattrdir_reply },
487 { 0, NULL, NULL, NULL }
489 static const value_string nfsacl3_proc_vals[] = {
490 { NFSACLPROC_NULL, "NULL" },
491 { NFSACLPROC3_GETACL, "GETACL" },
492 { NFSACLPROC3_SETACL, "SETACL" },
493 { NFSACLPROC3_GETXATTRDIR, "GETXATTRDIR" },
494 { 0, NULL }
497 static const rpc_prog_vers_info nfsacl_vers_info[] = {
498 { 1, nfsacl1_proc, &hf_nfsacl_procedure_v1 },
499 { 2, nfsacl2_proc, &hf_nfsacl_procedure_v2 },
500 { 3, nfsacl3_proc, &hf_nfsacl_procedure_v3 },
503 void
504 proto_register_nfsacl(void)
506 static hf_register_info hf[] = {
507 { &hf_nfsacl_mask, {
508 "Mask", "nfsacl.mask", FT_UINT32, BASE_HEX,
509 NULL, 0, NULL, HFILL }},
510 { &hf_nfsacl_mask_acl_entry, {
511 "ACL entry", "nfsacl.mask.acl_entry", FT_BOOLEAN, 32,
512 TFS(&tfs_yes_no), 0x00000001, NULL, HFILL }},
513 { &hf_nfsacl_mask_acl_count, {
514 "ACL count", "nfsacl.mask.acl_count", FT_BOOLEAN, 32,
515 TFS(&tfs_yes_no), 0x00000002, NULL, HFILL }},
516 { &hf_nfsacl_mask_default_acl_entry, {
517 "Default ACL entry", "nfsacl.mask.default_acl_entry", FT_BOOLEAN, 32,
518 TFS(&tfs_yes_no), 0x00000004, NULL, HFILL }},
519 { &hf_nfsacl_mask_default_acl_count, {
520 "Default ACL count", "nfsacl.mask.default_acl_count", FT_BOOLEAN, 32,
521 TFS(&tfs_yes_no), 0x00000008, NULL, HFILL }},
522 { &hf_nfsacl_procedure_v1, {
523 "V1 Procedure", "nfsacl.procedure_v1", FT_UINT32, BASE_DEC,
524 VALS(nfsacl1_proc_vals), 0, NULL, HFILL }},
525 { &hf_nfsacl_procedure_v2, {
526 "V2 Procedure", "nfsacl.procedure_v2", FT_UINT32, BASE_DEC,
527 VALS(nfsacl2_proc_vals), 0, NULL, HFILL }},
528 { &hf_nfsacl_procedure_v3, {
529 "V3 Procedure", "nfsacl.procedure_v3", FT_UINT32, BASE_DEC,
530 VALS(nfsacl3_proc_vals), 0, NULL, HFILL }},
531 /* generic */
532 { &hf_nfsacl_entry, {
533 "ACL", "nfsacl.acl", FT_NONE, BASE_NONE,
534 NULL, 0, NULL, HFILL }},
535 { &hf_nfsacl_aclcnt, {
536 "ACL count", "nfsacl.aclcnt", FT_UINT32, BASE_DEC,
537 NULL, 0, NULL, HFILL }},
538 { &hf_nfsacl_dfaclcnt, {
539 "Default ACL count", "nfsacl.dfaclcnt", FT_UINT32, BASE_DEC,
540 NULL, 0, NULL, HFILL }},
541 { &hf_nfsacl_aclent, {
542 "ACL Entry", "nfsacl.aclent", FT_NONE, BASE_NONE,
543 NULL, 0, NULL, HFILL }},
544 { &hf_nfsacl_aclent_type, {
545 "Type", "nfsacl.aclent.type", FT_UINT32, BASE_DEC,
546 VALS(names_nfsacl_aclent_type), 0, NULL, HFILL }},
547 { &hf_nfsacl_aclent_uid, {
548 "UID", "nfsacl.aclent.uid", FT_UINT32, BASE_DEC,
549 NULL, 0, NULL, HFILL }},
550 { &hf_nfsacl_aclent_perm, {
551 "Permissions", "nfsacl.aclent.perm", FT_UINT32, BASE_DEC,
552 NULL, 0, NULL, HFILL }},
553 { &hf_nfsacl_aclent_perm_read, {
554 "READ", "nfsacl.aclent.perm.read", FT_BOOLEAN, 32,
555 TFS(&tfs_yes_no), NA_READ, NULL, HFILL }},
556 { &hf_nfsacl_aclent_perm_write, {
557 "WRITE", "nfsacl.aclent.perm.write", FT_BOOLEAN, 32,
558 TFS(&tfs_yes_no), NA_WRITE, NULL, HFILL }},
559 { &hf_nfsacl_aclent_perm_exec, {
560 "EXEC", "nfsacl.aclent.perm.exec", FT_BOOLEAN, 32,
561 TFS(&tfs_yes_no), NA_EXEC, NULL, HFILL }},
562 /* V2 */
563 { &hf_nfsacl_create, {
564 "create", "nfsacl.create", FT_BOOLEAN, BASE_NONE,
565 TFS(&tfs_yes_no), 0x0, "Create?", HFILL }},
568 static int *ett[] = {
569 &ett_nfsacl,
570 &ett_nfsacl_mask,
571 &ett_nfsacl_entry,
572 &ett_nfsacl_aclent,
573 &ett_nfsacl_aclent_perm,
574 &ett_nfsacl_aclent_entries
577 proto_nfsacl = proto_register_protocol("NFSACL", "NFSACL", "nfsacl");
578 proto_register_field_array(proto_nfsacl, hf, array_length(hf));
579 proto_register_subtree_array(ett, array_length(ett));
582 void
583 proto_reg_handoff_nfsacl(void)
585 /* Register the protocol as RPC */
586 rpc_init_prog(proto_nfsacl, NFSACL_PROGRAM, ett_nfsacl,
587 G_N_ELEMENTS(nfsacl_vers_info), nfsacl_vers_info);
591 * Editor modelines - https://www.wireshark.org/tools/modelines.html
593 * Local variables:
594 * c-basic-offset: 8
595 * tab-width: 8
596 * indent-tabs-mode: t
597 * End:
599 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
600 * :indentSize=8:tabSize=8:noTabs=false: