aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nfs.h
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2010-09-17 02:03:09 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2010-09-17 02:03:09 +0000
commit86914d52d897b32e0360e0e66db2b42b290b79ec (patch)
treeaae5d0e2a4619cbeb06414c3a81af14b7f2e248b /epan/dissectors/packet-nfs.h
parent064b0e8d15ea104c907f6eab62632edcead1bb77 (diff)
From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5197 :
The NFS dissector (all versions) show access types that have not been requested to be checked as "not allowed" in the call and reply. This is incorrect and misleading. At present one must manually compare what was requested in order to assess if access was actually denied for that type. When there are hundreds or thousands of these ACCESS requests in a capture, it is not possible or practical to manually check each one. The submitted patch does the following: * Passes the access mask in the call to the reply for comparison * Adds filterable fields for each supported (v4) and access type * Adds a pseudo field, nfs.access_denied * Lists the access types to be checked in the summary and tree * Separately lists the supported, denied, and allowed access types in the summary and tree The changes are applied to all NFS versions. From me: a couple of small changes to make it compile without warnings. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34141 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-nfs.h')
-rw-r--r--epan/dissectors/packet-nfs.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/epan/dissectors/packet-nfs.h b/epan/dissectors/packet-nfs.h
index e5ec818001..8d36b05121 100644
--- a/epan/dissectors/packet-nfs.h
+++ b/epan/dissectors/packet-nfs.h
@@ -160,6 +160,14 @@
#define EXCLUSIVE4 2
#define EXCLUSIVE4_1 3
+/* for access mask */
+#define NFS_ACCESS_MASK_READ 0x01
+#define NFS_ACCESS_MASK_LOOKUP 0x02
+#define NFS_ACCESS_MASK_MODIFY 0x04
+#define NFS_ACCESS_MASK_EXTEND 0x08
+#define NFS_ACCESS_MASK_DELETE 0x10
+#define NFS_ACCESS_MASK_EXECUTE 0x20
+
/* pNFS layout types */
#define LAYOUT4_NFSV4_1_FILES 1
#define LAYOUT4_OSD2_OBJECTS 2
@@ -192,8 +200,11 @@ typedef int (diss_p)(tvbuff_t *tvb, int offset, proto_tree *tree, int hf);
extern int dissect_fattr(tvbuff_t *tvb, int offset, proto_tree *tree,
const char* name);
-extern int dissect_access(tvbuff_t *tvb, int offset, proto_tree *tree,
- const char* name);
+extern proto_tree* display_access_items(tvbuff_t* tvb, int offset, packet_info* pinfo, proto_tree* tree,
+ guint32 amask, char mtype, int version, GString* optext, char* label);
+
+extern int dissect_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree,
+ int version, GString *optext);
extern gint default_nfs_fhandle_type;
extern gint hf_nfs_nfsstat;