aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-04-19 18:16:50 +0000
committerEvan Huus <eapache@gmail.com>2013-04-19 18:16:50 +0000
commit7a173f9b0d779baae68380dacce57fb710710f3e (patch)
tree8e7abc98d3e27718dbf21364037028e0c1749521 /epan/dissectors
parent3978d46572be0e08a905cb021610fe8f2782c7c4 (diff)
From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8581
Major NFS dissector cleanup. Consistent naming, spacing, line wrapping, variable initialization, ... For full details see comment #18 of the bug. svn path=/trunk/; revision=48934
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-hclnfsd.c8
-rw-r--r--epan/dissectors/packet-klm.c2
-rw-r--r--epan/dissectors/packet-mount.c2
-rw-r--r--epan/dissectors/packet-nfs.c6774
-rw-r--r--epan/dissectors/packet-nfs.h42
-rw-r--r--epan/dissectors/packet-nfsacl.c38
-rw-r--r--epan/dissectors/packet-nlm.c4
7 files changed, 3501 insertions, 3369 deletions
diff --git a/epan/dissectors/packet-hclnfsd.c b/epan/dissectors/packet-hclnfsd.c
index 87b28b4f1c..63fecf11b1 100644
--- a/epan/dissectors/packet-hclnfsd.c
+++ b/epan/dissectors/packet-hclnfsd.c
@@ -117,7 +117,7 @@ dissect_hclnfsd_spool_inquire_call(tvbuff_t *tvb, int offset, packet_info *pinfo
{
offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "spool filehandle", NULL);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "spool filehandle", NULL);
return offset;
}
@@ -402,7 +402,7 @@ dissect_hclnfsd_share_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_
offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle", NULL);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "Filehandle", NULL);
offset = dissect_rpc_data(tvb, tree, hf_hclnfsd_unknown_data, offset);
@@ -460,7 +460,7 @@ dissect_hclnfsd_lock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t
offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle", NULL);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "Filehandle", NULL);
offset = dissect_rpc_data(tvb, tree, hf_hclnfsd_lockowner, offset);
@@ -512,7 +512,7 @@ dissect_hclnfsd_unlock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto
offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "Filehandle", NULL);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "Filehandle", NULL);
offset = dissect_rpc_data(tvb, tree, hf_hclnfsd_unknown_data, offset);
diff --git a/epan/dissectors/packet-klm.c b/epan/dissectors/packet-klm.c
index e0a7f93d22..48652f4342 100644
--- a/epan/dissectors/packet-klm.c
+++ b/epan/dissectors/packet-klm.c
@@ -99,7 +99,7 @@ dissect_lock(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset)
offset = dissect_rpc_string(tvb, lock_tree,
hf_klm_servername, offset, NULL);
- offset = dissect_nfs_fh3(tvb, offset, pinfo, lock_tree,"fh", NULL);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, lock_tree,"fh", NULL);
offset = dissect_rpc_uint32(tvb, lock_tree,
hf_klm_pid, offset);
diff --git a/epan/dissectors/packet-mount.c b/epan/dissectors/packet-mount.c
index e11f0d93dd..fa23916462 100644
--- a/epan/dissectors/packet-mount.c
+++ b/epan/dissectors/packet-mount.c
@@ -556,7 +556,7 @@ dissect_mount3_mnt_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
switch (status) {
case 0:
- offset = dissect_nfs_fh3(tvb,offset,pinfo,tree,"fhandle",NULL);
+ offset = dissect_nfs3_fh(tvb,offset,pinfo,tree,"fhandle",NULL);
auth_flavors = tvb_get_ntohl(tvb, offset);
proto_tree_add_uint(tree,hf_mount_flavors, tvb,
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
index dc6f05aac4..2c87823796 100644
--- a/epan/dissectors/packet-nfs.c
+++ b/epan/dissectors/packet-nfs.c
@@ -29,20 +29,18 @@
#include "config.h"
#include <stdio.h>
-
#include <glib.h>
-
#include "packet-rpc.h"
#include "packet-nfs.h"
#include <epan/prefs.h>
#include <epan/packet.h>
#include <epan/emem.h>
#include <epan/strutil.h>
+#include <wsutil/crc16.h>
#include <wsutil/crc32.h>
#include <epan/expert.h>
-#include <wsutil/crc16.h>
-
+/* NON-NFS-version-specific hf variables */
static int proto_nfs = -1;
static int hf_nfs_access_check = -1;
static int hf_nfs_access_supported = -1;
@@ -60,11 +58,7 @@ static int hf_nfs_access_extend = -1;
static int hf_nfs_access_delete = -1;
static int hf_nfs_access_execute = -1;
static int hf_nfs_access_denied = -1;
-static int hf_nfs_procedure_v2 = -1;
-static int hf_nfs_procedure_v3 = -1;
-static int hf_nfs_procedure_v4 = -1;
static int hf_nfs_fh_length = -1;
-/* static int hf_nfs_impl_id4_len = -1; */
static int hf_nfs_fh_hash = -1;
static int hf_nfs_fh_fhandle_data = -1;
static int hf_nfs_fh_mount_fileid = -1;
@@ -135,91 +129,12 @@ static int hf_nfs_fh_ex_inode = -1;
static int hf_nfs_fh_ex_gen = -1;
static int hf_nfs_fh_flag = -1;
static int hf_nfs_fh_endianness = -1;
-static int hf_gxfh3_utlfield = -1;
-static int hf_gxfh3_utlfield_tree_r = -1;
-static int hf_gxfh3_utlfield_tree_w = -1;
-static int hf_gxfh3_utlfield_jun = -1;
-static int hf_gxfh3_utlfield_jun_not = -1;
-static int hf_gxfh3_utlfield_ver = -1;
-static int hf_gxfh3_volcnt = -1;
-static int hf_gxfh3_epoch = -1;
-static int hf_gxfh3_ldsid = -1;
-static int hf_gxfh3_cid = -1;
-static int hf_gxfh3_resv = -1;
-static int hf_gxfh3_sfhflags = -1;
-static int hf_gxfh3_sfhflags_resv1 = -1;
-static int hf_gxfh3_sfhflags_resv2 = -1;
-static int hf_gxfh3_sfhflags_ontap7G = -1;
-static int hf_gxfh3_sfhflags_ontapGX = -1;
-static int hf_gxfh3_sfhflags_striped = -1;
-static int hf_gxfh3_sfhflags_empty = -1;
-static int hf_gxfh3_sfhflags_snapdirent = -1;
-static int hf_gxfh3_sfhflags_snapdir = -1;
-static int hf_gxfh3_sfhflags_streamdir = -1;
-static int hf_gxfh3_spinfid = -1;
-static int hf_gxfh3_spinfuid = -1;
-static int hf_gxfh3_exportptid = -1;
-static int hf_gxfh3_exportptuid = -1;
-
-static int hf_nfs_stat = -1;
static int hf_nfs_full_name = -1;
static int hf_nfs_name = -1;
-static int hf_nfs_readlink_data = -1;
-static int hf_nfs_read_offset = -1;
-static int hf_nfs_read_count = -1;
-static int hf_nfs_read_totalcount = -1;
static int hf_nfs_data = -1;
-static int hf_read_data_length = -1;
-static int hf_write_data_length = -1;
-static int hf_nfs_write_beginoffset = -1;
-static int hf_nfs_write_offset = -1;
-static int hf_nfs_write_totalcount = -1;
static int hf_nfs_symlink_to = -1;
-static int hf_nfs_readdir_cookie = -1;
-static int hf_nfs_readdir_count = -1;
-static int hf_nfs_readdir_entry = -1;
-static int hf_nfs_readdir_entry_fileid = -1;
-static int hf_nfs_readdir_entry_name = -1;
-static int hf_nfs_readdir_entry_cookie = -1;
-static int hf_nfs_readdir_entry3_fileid = -1;
-static int hf_nfs_readdir_entry3_name = -1;
-static int hf_nfs_readdir_entry3_cookie = -1;
-static int hf_nfs_readdirplus_entry_fileid = -1;
-static int hf_nfs_readdirplus_entry_name = -1;
-static int hf_nfs_readdirplus_entry_cookie = -1;
static int hf_nfs_readdir_eof = -1;
-static int hf_nfs_statfs_tsize = -1;
-static int hf_nfs_statfs_bsize = -1;
-static int hf_nfs_statfs_blocks = -1;
-static int hf_nfs_statfs_bfree = -1;
-static int hf_nfs_statfs_bavail = -1;
-static int hf_nfs_ftype3 = -1;
-static int hf_nfs_nfsstat3 = -1;
-static int hf_nfs_read_eof = -1;
-static int hf_nfs_write_stable = -1;
-static int hf_nfs_write_committed = -1;
-static int hf_nfs_createmode3 = -1;
-static int hf_nfs_fsstat_invarsec = -1;
-static int hf_nfs_fsinfo_rtmax = -1;
-static int hf_nfs_fsinfo_rtpref = -1;
-static int hf_nfs_fsinfo_rtmult = -1;
-static int hf_nfs_fsinfo_wtmax = -1;
-static int hf_nfs_fsinfo_wtpref = -1;
-static int hf_nfs_fsinfo_wtmult = -1;
-static int hf_nfs_fsinfo_dtpref = -1;
-static int hf_nfs_fsinfo_maxfilesize = -1;
-static int hf_nfs_fsinfo_properties = -1;
-static int hf_nfs_fsinfo_properties_setattr = -1;
-static int hf_nfs_fsinfo_properties_pathconf = -1;
-static int hf_nfs_fsinfo_properties_symlinks = -1;
-static int hf_nfs_fsinfo_properties_hardlinks = -1;
-static int hf_nfs_pathconf_linkmax = -1;
-static int hf_nfs_pathconf_name_max = -1;
-static int hf_nfs_pathconf_no_trunc = -1;
-static int hf_nfs_pathconf_chown_restricted = -1;
-static int hf_nfs_pathconf_case_insensitive = -1;
-static int hf_nfs_pathconf_case_preserving = -1;
-
+static int hf_nfs_readdir_entry = -1;
static int hf_nfs_atime = -1;
static int hf_nfs_atime_sec = -1;
static int hf_nfs_atime_nsec = -1;
@@ -236,312 +151,391 @@ static int hf_nfs_dtime = -1;
static int hf_nfs_dtime_sec = -1;
static int hf_nfs_dtime_nsec = -1;
-/* static int hf_nfs_fattr_type = -1; */
-static int hf_nfs_fattr_nlink = -1;
-static int hf_nfs_fattr_uid = -1;
-static int hf_nfs_fattr_gid = -1;
-static int hf_nfs_fattr_size = -1;
-static int hf_nfs_fattr_blocksize = -1;
-static int hf_nfs_fattr_rdev = -1;
-static int hf_nfs_fattr_blocks = -1;
-static int hf_nfs_fattr_fsid = -1;
-static int hf_nfs_fattr_fileid = -1;
-static int hf_nfs_fattr3_type = -1;
-static int hf_nfs_fattr3_nlink = -1;
-static int hf_nfs_fattr3_uid = -1;
-static int hf_nfs_fattr3_gid = -1;
-static int hf_nfs_fattr3_size = -1;
-static int hf_nfs_fattr3_used = -1;
-/* static int hf_nfs_fattr3_rdev = -1; */
-static int hf_nfs_fattr3_fsid = -1;
-static int hf_nfs_fattr3_fileid = -1;
-static int hf_nfs_wcc_attr_size = -1;
-static int hf_nfs_set_size3_size = -1;
-static int hf_nfs_cookie3 = -1;
-static int hf_nfs_fsstat3_resok_tbytes = -1;
-static int hf_nfs_fsstat3_resok_fbytes = -1;
-static int hf_nfs_fsstat3_resok_abytes = -1;
-static int hf_nfs_fsstat3_resok_tfiles = -1;
-static int hf_nfs_fsstat3_resok_ffiles = -1;
-static int hf_nfs_fsstat3_resok_afiles = -1;
-static int hf_nfs_uid3 = -1;
-static int hf_nfs_gid3 = -1;
-static int hf_nfs_offset3 = -1;
-static int hf_nfs_count3 = -1;
-static int hf_nfs_count3_maxcount = -1;
-static int hf_nfs_count3_dircount= -1;
-static int hf_nfs_mode3 = -1;
-static int hf_nfs_mode3_suid = -1;
-static int hf_nfs_mode3_sgid = -1;
-static int hf_nfs_mode3_sticky = -1;
-static int hf_nfs_mode3_rusr = -1;
-static int hf_nfs_mode3_wusr = -1;
-static int hf_nfs_mode3_xusr = -1;
-static int hf_nfs_mode3_rgrp = -1;
-static int hf_nfs_mode3_wgrp = -1;
-static int hf_nfs_mode3_xgrp = -1;
-static int hf_nfs_mode3_roth = -1;
-static int hf_nfs_mode3_woth = -1;
-static int hf_nfs_mode3_xoth = -1;
-static int hf_nfs_mode_name = -1;
-static int hf_nfs_mode_set_user_id = -1;
-static int hf_nfs_mode_set_group_id = -1;
-static int hf_nfs_mode_save_swap_text = -1;
-static int hf_nfs_mode_read_owner = -1;
-static int hf_nfs_mode_write_owner = -1;
-static int hf_nfs_mode_exec_owner = -1;
-static int hf_nfs_mode_read_group = -1;
-static int hf_nfs_mode_write_group = -1;
-static int hf_nfs_mode_exec_group = -1;
-static int hf_nfs_mode_read_other = -1;
-static int hf_nfs_mode_write_other = -1;
-static int hf_nfs_mode_exec_other = -1;
-
-/* NFSv4 */
-static int hf_nfs_nfsstat4 = -1;
-static int hf_nfs_op4 = -1;
-static int hf_nfs_main_opcode = -1;
-static int hf_nfs_linktext4 = -1;
-static int hf_nfs_tag4 = -1;
-static int hf_nfs_ops_count4 = -1;
-static int hf_nfs_component4 = -1;
-static int hf_nfs_clientid4 = -1;
-/* static int hf_nfs_ace4 = -1; */
-static int hf_nfs_recall = -1;
-static int hf_nfs_open_claim_type4 = -1;
-static int hf_nfs_opentype4 = -1;
-static int hf_nfs_state_protect_how4 = -1;
-static int hf_nfs_limit_by4 = -1;
-static int hf_nfs_open_delegation_type4 = -1;
-static int hf_nfs_why_no_delegation4 = -1;
-static int hf_nfs_ftype4 = -1;
-static int hf_nfs_change_info4_atomic = -1;
-static int hf_nfs_open4_share_access = -1;
-static int hf_nfs_open4_share_deny = -1;
-static int hf_nfs_want_flags = -1;
-static int hf_nfs_want_notify_flags = -1;
-static int hf_nfs_want_signal_deleg_when_resrc_avail = -1;
-static int hf_nfs_want_push_deleg_when_uncontended = -1;
-static int hf_nfs_seqid4 = -1;
-static int hf_nfs_lock_seqid4 = -1;
-static int hf_nfs_mand_attr = -1;
-static int hf_nfs_recc_attr = -1;
-static int hf_nfs_time_how4 = -1;
-static int hf_nfs_attrlist4 = -1;
-static int hf_nfs_fattr4_link_support = -1;
-static int hf_nfs_fattr4_symlink_support = -1;
-static int hf_nfs_fattr4_named_attr = -1;
-static int hf_nfs_fattr4_unique_handles = -1;
-static int hf_nfs_fattr4_archive = -1;
-static int hf_nfs_fattr4_cansettime = -1;
-static int hf_nfs_fattr4_case_insensitive = -1;
-static int hf_nfs_fattr4_case_preserving = -1;
-static int hf_nfs_fattr4_chown_restricted = -1;
-static int hf_nfs_fattr4_hidden = -1;
-static int hf_nfs_fattr4_homogeneous = -1;
-static int hf_nfs_fattr4_mimetype = -1;
-static int hf_nfs_fattr4_no_trunc = -1;
-static int hf_nfs_fattr4_system = -1;
-static int hf_nfs_fattr4_owner = -1;
-static int hf_nfs_fattr4_owner_group = -1;
-static int hf_nfs_fattr4_size = -1;
-static int hf_nfs_fattr4_aclsupport = -1;
-static int hf_nfs_fattr4_lease_time = -1;
-static int hf_nfs_fattr4_fileid = -1;
-static int hf_nfs_fattr4_files_avail = -1;
-static int hf_nfs_fattr4_files_free = -1;
-static int hf_nfs_fattr4_files_total = -1;
-static int hf_nfs_fattr4_maxfilesize = -1;
-static int hf_nfs_fattr4_maxlink = -1;
-static int hf_nfs_fattr4_maxname = -1;
-static int hf_nfs_fattr4_numlinks = -1;
-static int hf_nfs_fattr4_maxread = -1;
-static int hf_nfs_fattr4_maxwrite = -1;
-static int hf_nfs_fattr4_quota_hard = -1;
-static int hf_nfs_fattr4_quota_soft = -1;
-static int hf_nfs_fattr4_quota_used = -1;
-static int hf_nfs_fattr4_space_avail = -1;
-static int hf_nfs_fattr4_space_free = -1;
-static int hf_nfs_fattr4_space_total = -1;
-static int hf_nfs_fattr4_space_used = -1;
-static int hf_nfs_fattr4_mounted_on_fileid = -1;
-static int hf_nfs_fattr4_layout_blksize = -1;
-static int hf_nfs_fattr4_security_label_lfs = -1;
-static int hf_nfs_fattr4_security_label_pi = -1;
-static int hf_nfs_fattr4_security_label_context = -1;
-static int hf_nfs_who = -1;
-static int hf_nfs_server = -1;
-static int hf_nfs_fslocation4 = -1;
-static int hf_nfs_stable_how4 = -1;
-static int hf_nfs_dirlist4_eof = -1;
-/* static int hf_nfs_stateid4 = -1; */
-static int hf_nfs_offset4 = -1;
-static int hf_nfs_specdata1 = -1;
-static int hf_nfs_specdata2 = -1;
-static int hf_nfs_lock_type4 = -1;
-static int hf_nfs_open_rflags = -1;
-static int hf_nfs_open_rflags_mlock = -1;
-static int hf_nfs_open_rflags_confirm = -1;
-static int hf_nfs_reclaim4 = -1;
-static int hf_nfs_length4 = -1;
-static int hf_nfs_changeid4 = -1;
-static int hf_nfs_changeid4_before = -1;
-static int hf_nfs_changeid4_after = -1;
-static int hf_nfs_nfstime4_seconds = -1;
-static int hf_nfs_nfstime4_nseconds = -1;
-static int hf_nfs_fsid4_major = -1;
-static int hf_nfs_fsid4_minor = -1;
-static int hf_nfs_acetype4 = -1;
-/* static int hf_nfs_aceflag4 = -1; */
-/* static int hf_nfs_acemask4 = -1; */
-static int hf_nfs_delegate_type = -1;
-static int hf_nfs_secinfo_flavor = -1;
-static int hf_nfs_secinfo_arr4 = -1;
-static int hf_nfs_num_blocks = -1;
-static int hf_nfs_bytes_per_block = -1;
-static int hf_nfs_eof = -1;
-static int hf_nfs_verifier4 = -1;
-static int hf_nfs_cookie4 = -1;
-static int hf_nfs_cookieverf4 = -1;
-static int hf_nfs_cb_program = -1;
-/* static int hf_nfs_cb_location = -1; */
-static int hf_nfs_recall4 = -1;
-static int hf_nfs_filesize = -1;
-static int hf_nfs_count4 = -1;
-static int hf_nfs_count4_dircount = -1;
-static int hf_nfs_count4_maxcount = -1;
-static int hf_nfs_minorversion = -1;
-static int hf_nfs_open_owner4 = -1;
-/* static int hf_nfs_lock_owner4 = -1; */
-static int hf_nfs_new_lock_owner = -1;
-static int hf_nfs_sec_oid4 = -1;
-static int hf_nfs_qop4 = -1;
-static int hf_nfs_secinfo_rpcsec_gss_info_service = -1;
-static int hf_nfs_attrdircreate = -1;
-static int hf_nfs_client_id4_id = -1;
-static int hf_nfs_stateid4_other = -1;
-static int hf_nfs_stateid4_hash = -1;
-static int hf_nfs_lock4_reclaim = -1;
-static int hf_nfs_acl4 = -1;
-static int hf_nfs_callback_ident = -1;
-static int hf_nfs_r_netid = -1;
-static int hf_nfs_gsshandle4 = -1;
-static int hf_nfs_r_addr = -1;
-static int hf_nfs_createmode4 = -1;
-static int hf_nfs_op_mask = -1;
-
-/* NFSv4.1 */
-static int hf_nfs_length4_minlength = -1;
-static int hf_nfs_layouttype4 = -1;
-static int hf_nfs_layoutreturn_type4 = -1;
-static int hf_nfs_iomode4 = -1;
-/* static int hf_nfs_stripetype4 = -1; */
-/* static int hf_nfs_mdscommit4 = -1; */
-/* static int hf_nfs_stripeunit4 = -1; */
-static int hf_nfs_newtime4 = -1;
-static int hf_nfs_newoffset4 = -1;
-static int hf_nfs_layout_avail4 = -1;
-static int hf_nfs_newsize4 = -1;
-static int hf_nfs_layoutupdate4 = -1;
-static int hf_nfs_deviceid4 = -1;
-static int hf_nfs_devicenum4 = -1;
-static int hf_nfs_deviceidx4 = -1;
-static int hf_nfs_layout4 = -1;
-/* static int hf_nfs_stripedevs4 = -1; */
-/* static int hf_nfs_devaddr4 = -1; */
-static int hf_nfs_return_on_close4 = -1;
-static int hf_nfs_slotid4 = -1;
-static int hf_nfs_high_slotid4 = -1;
-static int hf_nfs_target_high_slotid4 = -1;
-static int hf_nfs_serverscope4 = -1;
-static int hf_nfs_minorid4 = -1;
-static int hf_nfs_majorid4 = -1;
-static int hf_nfs_padsize4 = -1;
-/* static int hf_nfs_cbrenforce4 = -1; */
-/* static int hf_nfs_hashalg4 = -1; */
-/* static int hf_nfs_ssvlen4 = -1; */
-static int hf_nfs_maxreqsize4 = -1;
-static int hf_nfs_maxrespsize4 = -1;
-static int hf_nfs_maxrespsizecached4 = -1;
-static int hf_nfs_maxops4 = -1;
-static int hf_nfs_maxreqs4 = -1;
-static int hf_nfs_rdmachanattrs4 = -1;
-static int hf_nfs_machinename4 = -1;
-static int hf_nfs_flavor4 = -1;
-static int hf_nfs_stamp4 = -1;
-static int hf_nfs_uid4 = -1;
-static int hf_nfs_gid4 = -1;
-static int hf_nfs_service4 = -1;
-static int hf_nfs_sessionid4 = -1;
-static int hf_nfs_exchid_call_flags = -1;
-static int hf_nfs_exchid_reply_flags = -1;
-static int hf_nfs_exchid_flags_moved_refer = -1;
-static int hf_nfs_exchid_flags_moved_migr = -1;
-static int hf_nfs_exchid_flags_bind_princ = -1;
-static int hf_nfs_exchid_flags_non_pnfs = -1;
-static int hf_nfs_exchid_flags_pnfs_mds = -1;
-static int hf_nfs_exchid_flags_pnfs_ds = -1;
-static int hf_nfs_exchid_flags_upd_conf_rec_a = -1;
-static int hf_nfs_exchid_flags_confirmed_r = -1;
-static int hf_nfs_state_protect_window = -1;
-static int hf_nfs_state_protect_num_gss_handles = -1;
-static int hf_nfs_prot_info4_spi_window = -1;
-static int hf_nfs_prot_info4_svv_length = -1;
-static int hf_nfs_prot_info4_encr_alg = -1;
-static int hf_nfs_prot_info4_hash_alg = -1;
-static int hf_nfs_nii_domain4 = -1;
-static int hf_nfs_nii_name4 = -1;
-static int hf_nfs_create_session_flags_csa = -1;
-static int hf_nfs_create_session_flags_csr = -1;
-static int hf_nfs_create_session_flags_persist = -1;
-static int hf_nfs_create_session_flags_conn_back_chan = -1;
-static int hf_nfs_create_session_flags_conn_rdma = -1;
-static int hf_nfs_cachethis4 = -1;
-/* static int hf_nfs_util4 = -1; */
-/* static int hf_nfs_first_stripe_idx4 = -1; */
-/* static int hf_nfs_layout_count = -1; */
-/* static int hf_nfs_pattern_offset = -1; */
-static int hf_nfs_notification_bitmap4 = -1;
-static int hf_nfs_lrs_present = -1;
-static int hf_nfs_nfl_util = -1;
-static int hf_nfs_nfl_first_stripe_index = -1;
-static int hf_nfs_lrf_body_content = -1;
-static int hf_nfs_reclaim_one_fs4 = -1;
-static int hf_nfs_bctsa_dir = -1;
-static int hf_nfs_bctsa_use_conn_in_rdma_mode = -1;
-static int hf_nfs_bctsr_dir = -1;
-static int hf_nfs_bctsr_use_conn_in_rdma_mode = -1;
-static int hf_nfs_sequence_status_flags = -1;
-static int hf_nfs_sequence_status_flags_cb_path_down = -1;
-static int hf_nfs_sequence_status_flags_cb_gss_contexts_expiring = -1;
-static int hf_nfs_sequence_status_flags_cb_gss_contexts_expired = -1;
-static int hf_nfs_sequence_status_flags_expired_all_state_revoked = -1;
-static int hf_nfs_sequence_status_flags_expired_some_state_revoked = -1;
-static int hf_nfs_sequence_status_flags_admin_state_revoked = -1;
-static int hf_nfs_sequence_status_flags_recallable_state_revoked = -1;
-static int hf_nfs_sequence_status_flags_lease_moved = -1;
-static int hf_nfs_sequence_status_flags_restart_reclaim_needed = -1;
-static int hf_nfs_sequence_status_flags_cb_path_down_session = -1;
-static int hf_nfs_sequence_status_flags_backchannel_fault = -1;
-static int hf_nfs_sequence_status_flags_devid_changed = -1;
-static int hf_nfs_sequence_status_flags_devid_deleted = -1;
-static int hf_nfs_secinfo_style4 = -1;
-static int hf_nfs_test_stateid_arg4 = -1;
-static int hf_nfs_test_stateid_res4 = -1;
-
-/* Hidden field for v2, v3, and v4 status */
-int hf_nfs_nfsstat = -1;
+/* Hidden field for v2, v3, and v4 status; also used in dissect-nfsacl.c */
+int hf_nfs_status = -1;
+
+/* NFSv2 RFC 1094 hf variables */
+static int hf_nfs2_procedure = -1;
+static int hf_nfs2_status = -1;
+static int hf_nfs2_readlink_data = -1;
+/* static int hf_nfs2_fattr_type = -1; */
+static int hf_nfs2_fattr_nlink = -1;
+static int hf_nfs2_fattr_uid = -1;
+static int hf_nfs2_fattr_gid = -1;
+static int hf_nfs2_fattr_size = -1;
+static int hf_nfs2_fattr_blocksize = -1;
+static int hf_nfs2_fattr_rdev = -1;
+static int hf_nfs2_fattr_blocks = -1;
+static int hf_nfs2_fattr_fsid = -1;
+static int hf_nfs2_fattr_fileid = -1;
+static int hf_nfs2_mode_name = -1;
+static int hf_nfs2_mode_set_user_id = -1;
+static int hf_nfs2_mode_set_group_id = -1;
+static int hf_nfs2_mode_save_swap_text = -1;
+static int hf_nfs2_mode_read_owner = -1;
+static int hf_nfs2_mode_write_owner = -1;
+static int hf_nfs2_mode_exec_owner = -1;
+static int hf_nfs2_mode_read_group = -1;
+static int hf_nfs2_mode_write_group = -1;
+static int hf_nfs2_mode_exec_group = -1;
+static int hf_nfs2_mode_read_other = -1;
+static int hf_nfs2_mode_write_other = -1;
+static int hf_nfs2_mode_exec_other = -1;
+static int hf_nfs2_read_offset = -1;
+static int hf_nfs2_read_count = -1;
+static int hf_nfs2_read_totalcount = -1;
+static int hf_nfs2_write_beginoffset = -1;
+static int hf_nfs2_write_offset = -1;
+static int hf_nfs2_write_totalcount = -1;
+static int hf_nfs2_readdir_cookie = -1;
+static int hf_nfs2_readdir_count = -1;
+static int hf_nfs2_readdir_entry_fileid = -1;
+static int hf_nfs2_readdir_entry_name = -1;
+static int hf_nfs2_readdir_entry_cookie = -1;
+static int hf_nfs2_statfs_tsize = -1;
+static int hf_nfs2_statfs_bsize = -1;
+static int hf_nfs2_statfs_blocks = -1;
+static int hf_nfs2_statfs_bfree = -1;
+static int hf_nfs2_statfs_bavail = -1;
+
+/* NFSv3 RFC 1813 header format variables */
+static int hf_nfs3_procedure = -1;
+static int hf_nfs3_fattr_type = -1;
+static int hf_nfs3_fattr_nlink = -1;
+static int hf_nfs3_fattr_uid = -1;
+static int hf_nfs3_fattr_gid = -1;
+static int hf_nfs3_fattr_size = -1;
+static int hf_nfs3_fattr_used = -1;
+/* static int hf_nfs3_fattr_rdev = -1; */
+static int hf_nfs3_fattr_fsid = -1;
+static int hf_nfs3_fattr_fileid = -1;
+static int hf_nfs3_wcc_attr_size = -1;
+static int hf_nfs3_set_size = -1;
+static int hf_nfs3_cookie = -1;
+static int hf_nfs3_fsstat_resok_tbytes = -1;
+static int hf_nfs3_fsstat_resok_fbytes = -1;
+static int hf_nfs3_fsstat_resok_abytes = -1;
+static int hf_nfs3_fsstat_resok_tfiles = -1;
+static int hf_nfs3_fsstat_resok_ffiles = -1;
+static int hf_nfs3_fsstat_resok_afiles = -1;
+static int hf_nfs3_uid = -1;
+static int hf_nfs3_gid = -1;
+static int hf_nfs3_offset = -1;
+static int hf_nfs3_count = -1;
+static int hf_nfs3_count_maxcount = -1;
+static int hf_nfs3_count_dircount= -1;
+static int hf_nfs3_mode = -1;
+static int hf_nfs3_mode_suid = -1;
+static int hf_nfs3_mode_sgid = -1;
+static int hf_nfs3_mode_sticky = -1;
+static int hf_nfs3_mode_rusr = -1;
+static int hf_nfs3_mode_wusr = -1;
+static int hf_nfs3_mode_xusr = -1;
+static int hf_nfs3_mode_rgrp = -1;
+static int hf_nfs3_mode_wgrp = -1;
+static int hf_nfs3_mode_xgrp = -1;
+static int hf_nfs3_mode_roth = -1;
+static int hf_nfs3_mode_woth = -1;
+static int hf_nfs3_mode_xoth = -1;
+static int hf_nfs3_readdir_entry_fileid = -1;
+static int hf_nfs3_readdir_entry_name = -1;
+static int hf_nfs3_readdir_entry_cookie = -1;
+static int hf_nfs3_readdirplus_entry_fileid = -1;
+static int hf_nfs3_readdirplus_entry_name = -1;
+static int hf_nfs3_readdirplus_entry_cookie = -1;
+static int hf_nfs3_ftype = -1;
+static int hf_nfs3_status = -1;
+static int hf_nfs3_read_eof = -1;
+static int hf_nfs3_write_stable = -1;
+static int hf_nfs3_write_committed = -1;
+static int hf_nfs3_createmode = -1;
+static int hf_nfs3_fsstat_invarsec = -1;
+static int hf_nfs3_fsinfo_rtmax = -1;
+static int hf_nfs3_fsinfo_rtpref = -1;
+static int hf_nfs3_fsinfo_rtmult = -1;
+static int hf_nfs3_fsinfo_wtmax = -1;
+static int hf_nfs3_fsinfo_wtpref = -1;
+static int hf_nfs3_fsinfo_wtmult = -1;
+static int hf_nfs3_fsinfo_dtpref = -1;
+static int hf_nfs3_fsinfo_maxfilesize = -1;
+static int hf_nfs3_fsinfo_properties = -1;
+static int hf_nfs3_fsinfo_properties_setattr = -1;
+static int hf_nfs3_fsinfo_properties_pathconf = -1;
+static int hf_nfs3_fsinfo_properties_symlinks = -1;
+static int hf_nfs3_fsinfo_properties_hardlinks = -1;
+static int hf_nfs3_pathconf_linkmax = -1;
+static int hf_nfs3_pathconf_name_max = -1;
+static int hf_nfs3_pathconf_no_trunc = -1;
+static int hf_nfs3_pathconf_chown_restricted = -1;
+static int hf_nfs3_pathconf_case_insensitive = -1;
+static int hf_nfs3_pathconf_case_preserving = -1;
+static int hf_nfs3_gxfh_utlfield = -1;
+static int hf_nfs3_gxfh_utlfield_tree_r = -1;
+static int hf_nfs3_gxfh_utlfield_tree_w = -1;
+static int hf_nfs3_gxfh_utlfield_jun = -1;
+static int hf_nfs3_gxfh_utlfield_jun_not = -1;
+static int hf_nfs3_gxfh_utlfield_ver = -1;
+static int hf_nfs3_gxfh_volcnt = -1;
+static int hf_nfs3_gxfh_epoch = -1;
+static int hf_nfs3_gxfh_ldsid = -1;
+static int hf_nfs3_gxfh_cid = -1;
+static int hf_mfs3_gxfh_resv = -1;
+static int hf_nfs3_gxfh_sfhflags = -1;
+static int hf_nfs3_gxfh_sfhflags_resv1 = -1;
+static int hf_nfs3_gxfh_sfhflags_resv2 = -1;
+static int hf_nfs3_gxfh_sfhflags_ontap7G = -1;
+static int hf_nfs3_gxfh_sfhflags_ontapGX = -1;
+static int hf_nfs3_gxfh_sfhflags_striped = -1;
+static int hf_nfs3_gxfh_sfhflags_empty = -1;
+static int hf_nfs3_gxfh_sfhflags_snapdirent = -1;
+static int hf_nfs3_gxfh_sfhflags_snapdir = -1;
+static int hf_nfs3_gxfh_sfhflags_streamdir = -1;
+static int hf_nfs3_gxfh_spinfid = -1;
+static int hf_nfs3_gxfh_spinfuid = -1;
+static int hf_nfs3_gxfh_exportptid = -1;
+static int hf_nfs3_gxfh_exportptuid = -1;
+
+
+/* NFSv4 RFC 5661 header format variables */
+static int hf_nfs4_procedure = -1;
+static int hf_nfs4_status = -1;
+static int hf_nfs4_op = -1;
+static int hf_nfs4_main_opcode = -1;
+static int hf_nfs4_linktext = -1;
+static int hf_nfs4_tag = -1;
+static int hf_nfs4_ops_count = -1;
+static int hf_nfs4_component = -1;
+static int hf_nfs4_clientid = -1;
+/* static int hf_nfs4_ace = -1; */
+static int hf_nfs4_recall = -1;
+static int hf_nfs4_open_claim_type = -1;
+static int hf_nfs4_opentype = -1;
+static int hf_nfs4_state_protect_how = -1;
+static int hf_nfs4_limit_by = -1;
+static int hf_nfs4_open_delegation_type = -1;
+static int hf_nfs4_why_no_delegation = -1;
+static int hf_nfs4_ftype = -1;
+static int hf_nfs4_change_info_atomic = -1;
+static int hf_nfs4_open_share_access = -1;
+static int hf_nfs4_open_share_deny = -1;
+static int hf_nfs4_want_flags = -1;
+static int hf_nfs4_want_notify_flags = -1;
+static int hf_nfs4_want_signal_deleg_when_resrc_avail = -1;
+static int hf_nfs4_want_push_deleg_when_uncontended = -1;
+static int hf_nfs4_seqid = -1;
+static int hf_nfs4_lock_seqid = -1;
+static int hf_nfs4_mand_attr = -1;
+static int hf_nfs4_recc_attr = -1;
+static int hf_nfs4_time_how = -1;
+static int hf_nfs4_attrlist = -1;
+static int hf_nfs4_fattr_link_support = -1;
+static int hf_nfs4_fattr_symlink_support = -1;
+static int hf_nfs4_fattr_named_attr = -1;
+static int hf_nfs4_fattr_unique_handles = -1;
+static int hf_nfs4_fattr_archive = -1;
+static int hf_nfs4_fattr_cansettime = -1;
+static int hf_nfs4_fattr_case_insensitive = -1;
+static int hf_nfs4_fattr_case_preserving = -1;
+static int hf_nfs4_fattr_chown_restricted = -1;
+static int hf_nfs4_fattr_hidden = -1;
+static int hf_nfs4_fattr_homogeneous = -1;
+static int hf_nfs4_fattr_mimetype = -1;
+static int hf_nfs4_fattr_no_trunc = -1;
+static int hf_nfs4_fattr_system = -1;
+static int hf_nfs4_fattr_owner = -1;
+static int hf_nfs4_fattr_owner_group = -1;
+static int hf_nfs4_fattr_size = -1;
+static int hf_nfs4_fattr_aclsupport = -1;
+static int hf_nfs4_fattr_lease_time = -1;
+static int hf_nfs4_fattr_fileid = -1;
+static int hf_nfs4_fattr_files_avail = -1;
+static int hf_nfs4_fattr_files_free = -1;
+static int hf_nfs4_fattr_files_total = -1;
+static int hf_nfs4_fattr_maxfilesize = -1;
+static int hf_nfs4_fattr_maxlink = -1;
+static int hf_nfs4_fattr_maxname = -1;
+static int hf_nfs4_fattr_numlinks = -1;
+static int hf_nfs4_fattr_maxread = -1;
+static int hf_nfs4_fattr_maxwrite = -1;
+static int hf_nfs4_fattr_quota_hard = -1;
+static int hf_nfs4_fattr_quota_soft = -1;
+static int hf_nfs4_fattr_quota_used = -1;
+static int hf_nfs4_fattr_space_avail = -1;
+static int hf_nfs4_fattr_space_free = -1;
+static int hf_nfs4_fattr_space_total = -1;
+static int hf_nfs4_fattr_space_used = -1;
+static int hf_nfs4_fattr_mounted_on_fileid = -1;
+static int hf_nfs4_fattr_layout_blksize = -1;
+static int hf_nfs4_fattr_security_label_lfs = -1;
+static int hf_nfs4_fattr_security_label_pi = -1;
+static int hf_nfs4_fattr_security_label_context = -1;
+static int hf_nfs4_who = -1;
+static int hf_nfs4_server = -1;
+static int hf_nfs4_fslocation = -1;
+static int hf_nfs4_stable_how = -1;
+static int hf_nfs4_dirlist_eof = -1;
+/* static int hf_nfs4_stateid = -1; */
+static int hf_nfs4_offset = -1;
+static int hf_nfs4_specdata1 = -1;
+static int hf_nfs4_specdata2 = -1;
+static int hf_nfs4_lock_type = -1;
+static int hf_nfs4_open_rflags = -1;
+static int hf_nfs4_open_rflags_mlock = -1;
+static int hf_nfs4_open_rflags_confirm = -1;
+static int hf_nfs4_reclaim = -1;
+static int hf_nfs4_length = -1;
+static int hf_nfs4_changeid = -1;
+static int hf_nfs4_changeid_before = -1;
+static int hf_nfs4_changeid_after = -1;
+static int hf_nfs4_time_seconds = -1;
+static int hf_nfs4_time_nseconds = -1;
+static int hf_nfs4_fsid_major = -1;
+static int hf_nfs4_fsid_minor = -1;
+static int hf_nfs4_acetype = -1;
+/* static int hf_nfs4_aceflag = -1; */
+/* static int hf_nfs4_acemask = -1; */
+static int hf_nfs4_delegate_type = -1;
+static int hf_nfs4_secinfo_flavor = -1;
+static int hf_nfs4_secinfo_arr = -1;
+static int hf_nfs4_num_blocks = -1;
+static int hf_nfs4_bytes_per_block = -1;
+static int hf_nfs4_eof = -1;
+static int hf_nfs4_verifier = -1;
+static int hf_nfs4_cookie = -1;
+static int hf_nfs4_cookie_verf = -1;
+static int hf_nfs4_cb_program = -1;
+/* static int hf_nfs4_cb_location = -1; */
+static int hf_nfs4_recall4 = -1;
+static int hf_nfs4_filesize = -1;
+static int hf_nfs4_count = -1;
+static int hf_nfs4_count_dircount = -1;
+static int hf_nfs4_count_maxcount = -1;
+static int hf_nfs4_minorversion = -1;
+static int hf_nfs4_open_owner = -1;
+/* static int hf_nfs4_lock_owner = -1; */
+static int hf_nfs4_new_lock_owner = -1;
+static int hf_nfs4_sec_oid = -1;
+static int hf_nfs4_qop = -1;
+static int hf_nfs4_secinfo_rpcsec_gss_info_service = -1;
+static int hf_nfs4_attr_dir_create = -1;
+static int hf_nfs4_client_id = -1;
+static int hf_nfs4_stateid_other = -1;
+static int hf_nfs4_stateid_hash = -1;
+static int hf_nfs4_lock_reclaim = -1;
+static int hf_nfs4_acl = -1;
+static int hf_nfs4_callback_ident = -1;
+static int hf_nfs4_r_netid = -1;
+static int hf_nfs4_gsshandle = -1;
+static int hf_nfs4_r_addr = -1;
+static int hf_nfs4_createmode = -1;
+static int hf_nfs4_op_mask = -1;
+static int hf_nfs4_read_data_length = -1;
+static int hf_nfs4_write_data_length = -1;
+static int hf_nfs4_length_minlength = -1;
+static int hf_nfs4_layout_type = -1;
+static int hf_nfs4_layout_return_type = -1;
+static int hf_nfs4_iomode = -1;
+/* static int hf_nfs4_stripetype = -1; */
+/* static int hf_nfs4_mdscommit = -1; */
+/* static int hf_nfs4_stripeunit = -1; */
+static int hf_nfs4_newtime = -1;
+static int hf_nfs4_newoffset = -1;
+static int hf_nfs4_layout_avail = -1;
+static int hf_nfs4_newsize = -1;
+static int hf_nfs4_layoutupdate = -1;
+static int hf_nfs4_deviceid = -1;
+static int hf_nfs4_devicenum = -1;
+static int hf_nfs4_deviceidx = -1;
+static int hf_nfs4_layout = -1;
+/* static int hf_nfs4_stripedevs = -1; */
+/* static int hf_nfs4_devaddr = -1; */
+static int hf_nfs4_return_on_close = -1;
+static int hf_nfs4_slotid = -1;
+static int hf_nfs4_high_slotid = -1;
+static int hf_nfs4_target_high_slotid = -1;
+static int hf_nfs4_serverscope4 = -1;
+static int hf_nfs4_minorid = -1;
+static int hf_nfs4_majorid = -1;
+static int hf_nfs4_padsize = -1;
+/* static int hf_nfs4_cbrenforce = -1; */
+/* static int hf_nfs4_hashalg = -1; */
+/* static int hf_nfs4_ssvlen = -1; */
+static int hf_nfs4_maxreqsize = -1;
+static int hf_nfs4_maxrespsize = -1;
+static int hf_nfs4_maxrespsizecached = -1;
+static int hf_nfs4_maxops = -1;
+static int hf_nfs4_maxreqs = -1;
+static int hf_nfs4_rdmachanattrs = -1;
+static int hf_nfs4_machinename = -1;
+static int hf_nfs4_flavor = -1;
+static int hf_nfs4_stamp = -1;
+static int hf_nfs4_uid = -1;
+static int hf_nfs4_gid = -1;
+static int hf_nfs4_service = -1;
+static int hf_nfs4_sessionid = -1;
+static int hf_nfs4_exchid_call_flags = -1;
+static int hf_nfs4_exchid_reply_flags = -1;
+static int hf_nfs4_exchid_flags_moved_refer = -1;
+static int hf_nfs4_exchid_flags_moved_migr = -1;
+static int hf_nfs4_exchid_flags_bind_princ = -1;
+static int hf_nfs4_exchid_flags_non_pnfs = -1;
+static int hf_nfs4_exchid_flags_pnfs_mds = -1;
+static int hf_nfs4_exchid_flags_pnfs_ds = -1;
+static int hf_nfs4_exchid_flags_upd_conf_rec_a = -1;
+static int hf_nfs4_exchid_flags_confirmed_r = -1;
+static int hf_nfs4_state_protect_window = -1;
+static int hf_nfs4_state_protect_num_gss_handles = -1;
+static int hf_nfs4_prot_info_spi_window = -1;
+static int hf_nfs4_prot_info_svv_length = -1;
+static int hf_nfs4_prot_info_encr_alg = -1;
+static int hf_nfs4_prot_info_hash_alg = -1;
+static int hf_nfs4_nii_domain = -1;
+static int hf_nfs4_nii_name = -1;
+static int hf_nfs4_create_session_flags_csa = -1;
+static int hf_nfs4_create_session_flags_csr = -1;
+static int hf_nfs4_create_session_flags_persist = -1;
+static int hf_nfs4_create_session_flags_conn_back_chan = -1;
+static int hf_nfs4_create_session_flags_conn_rdma = -1;
+static int hf_nfs4_cachethis = -1;
+/* static int hf_nfs4_util = -1; */
+/* static int hf_nfs4_first_stripe_idx = -1; */
+/* static int hf_nfs4_layout_count = -1; */
+/* static int hf_nfs4_pattern_offset = -1; */
+static int hf_nfs4_notification_bitmap = -1;
+static int hf_nfs4_lrs_present = -1;
+static int hf_nfs4_nfl_util = -1;
+static int hf_nfs4_nfl_first_stripe_index = -1;
+static int hf_nfs4_lrf_body_content = -1;
+static int hf_nfs4_reclaim_one_fs = -1;
+static int hf_nfs4_bctsa_dir = -1;
+static int hf_nfs4_bctsa_use_conn_in_rdma_mode = -1;
+static int hf_nfs4_bctsr_dir = -1;
+static int hf_nfs4_bctsr_use_conn_in_rdma_mode = -1;
+static int hf_nfs4_sequence_status_flags = -1;
+static int hf_nfs4_sequence_status_flags_cb_path_down = -1;
+static int hf_nfs4_sequence_status_flags_cb_gss_contexts_expiring = -1;
+static int hf_nfs4_sequence_status_flags_cb_gss_contexts_expired = -1;
+static int hf_nfs4_sequence_status_flags_expired_all_state_revoked = -1;
+static int hf_nfs4_sequence_status_flags_expired_some_state_revoked = -1;
+static int hf_nfs4_sequence_status_flags_admin_state_revoked = -1;
+static int hf_nfs4_sequence_status_flags_recallable_state_revoked = -1;
+static int hf_nfs4_sequence_status_flags_lease_moved = -1;
+static int hf_nfs4_sequence_status_flags_restart_reclaim_needed = -1;
+static int hf_nfs4_sequence_status_flags_cb_path_down_session = -1;
+static int hf_nfs4_sequence_status_flags_backchannel_fault = -1;
+static int hf_nfs4_sequence_status_flags_devid_changed = -1;
+static int hf_nfs4_sequence_status_flags_devid_deleted = -1;
+static int hf_nfs4_secinfo_style = -1;
+static int hf_nfs4_test_stateid_arg = -1;
+static int hf_nfs4_test_stateid_res = -1;
+/* static int hf_nfs4_impl_id_len = -1; */
+
static gint ett_nfs = -1;
static gint ett_nfs_fh_encoding = -1;
static gint ett_nfs_fh_mount = -1;
static gint ett_nfs_fh_file = -1;
static gint ett_nfs_fh_export = -1;
-static gint ett_nfsv4_fh_export = -1;
-static gint ett_nfsv4_fh_file = -1;
-static gint ett_nfsv4_fh_handle_type = -1;
-static gint ett_nfsv4_fh_export_snapgen = -1;
-static gint ett_nfsv4_fh_file_flags = -1;
static gint ett_nfs_fh_fsid = -1;
static gint ett_nfs_fh_xfsid = -1;
static gint ett_nfs_fh_fn = -1;
@@ -550,193 +544,193 @@ static gint ett_nfs_fh_hp = -1;
static gint ett_nfs_fh_auth = -1;
static gint ett_nfs_fhandle = -1;
static gint ett_nfs_timeval = -1;
-static gint ett_nfs_mode = -1;
static gint ett_nfs_fattr = -1;
-static gint ett_nfs_sattr = -1;
-static gint ett_nfs_diropargs = -1;
static gint ett_nfs_readdir_entry = -1;
-static gint ett_nfs_mode3 = -1;
-static gint ett_nfs_specdata3 = -1;
-static gint ett_nfs_fh3 = -1;
-static gint ett_nfs_nfstime3 = -1;
-static gint ett_nfs_fattr3 = -1;
-static gint ett_nfs_post_op_fh3 = -1;
-static gint ett_nfs_sattr3 = -1;
-static gint ett_nfs_diropargs3 = -1;
-static gint ett_nfs_sattrguard3 = -1;
-static gint ett_nfs_set_mode3 = -1;
-static gint ett_nfs_set_uid3 = -1;
-static gint ett_nfs_set_gid3 = -1;
-static gint ett_nfs_set_size3 = -1;
-static gint ett_nfs_set_atime = -1;
-static gint ett_nfs_set_mtime = -1;
-static gint ett_nfs_pre_op_attr = -1;
-static gint ett_nfs_post_op_attr = -1;
-static gint ett_nfs_wcc_attr = -1;
-static gint ett_nfs_wcc_data = -1;
-static gint ett_nfs_access3 = -1;
-static gint ett_nfs_fsinfo_properties = -1;
-static gint ett_nfs_gxfh3_utlfield = -1;
-static gint ett_nfs_gxfh3_sfhfield = -1;
-static gint ett_nfs_gxfh3_sfhflags = -1;
-
-/* NFSv4 */
-static gint ett_nfs_compound_call4 = -1;
+static gint ett_nfs_fh_obj = -1;
+static gint ett_nfs_fh_ex = -1;
static gint ett_nfs_utf8string = -1;
-static gint ett_nfs_argop4 = -1;
-static gint ett_nfs_resop4 = -1;
-static gint ett_nfs_access4 = -1;
-static gint ett_nfs_access_supp4 = -1;
-static gint ett_nfs_close4 = -1;
-static gint ett_nfs_commit4 = -1;
-static gint ett_nfs_create4 = -1;
-static gint ett_nfs_delegpurge4 = -1;
-static gint ett_nfs_delegreturn4 = -1;
-static gint ett_nfs_getattr4 = -1;
-static gint ett_nfs_getattr4_args = -1;
-static gint ett_nfs_getattr4_resp = -1;
+
+static gint ett_nfs2_mode = -1;
+static gint ett_nfs2_sattr = -1;
+static gint ett_nfs2_diropargs = -1;
+
+static gint ett_nfs3_mode = -1;
+static gint ett_nfs3_specdata = -1;
+static gint ett_nfs3_fh = -1;
+static gint ett_nfs3_nfstime = -1;
+static gint ett_nfs3_fattr = -1;
+static gint ett_nfs3_post_op_fh = -1;
+static gint ett_nfs3_sattr = -1;
+static gint ett_nfs3_diropargs = -1;
+static gint ett_nfs3_sattrguard = -1;
+static gint ett_nfs3_set_mode = -1;
+static gint ett_nfs3_set_uid = -1;
+static gint ett_nfs3_set_gid = -1;
+static gint ett_nfs3_set_size = -1;
+static gint ett_nfs3_set_atime = -1;
+static gint ett_nfs3_set_mtime = -1;
+static gint ett_nfs3_pre_op_attr = -1;
+static gint ett_nfs3_post_op_attr = -1;
+static gint ett_nfs3_wcc_attr = -1;
+static gint ett_nfs3_wcc_data = -1;
+static gint ett_nfs3_access = -1;
+static gint ett_nfs3_fsinfo_properties = -1;
+static gint ett_nfs3_gxfh_utlfield = -1;
+static gint ett_nfs3_gxfh_sfhfield = -1;
+static gint ett_nfs3_gxfh_sfhflags = -1;
+
+static gint ett_nfs4_compound_call = -1;
+static gint ett_nfs4_request_op = -1;
+static gint ett_nfs4_response_op = -1;
+static gint ett_nfs4_access = -1;
+static gint ett_nfs4_access_supp = -1;
+static gint ett_nfs4_close = -1;
+static gint ett_nfs4_commit = -1;
+static gint ett_nfs4_create = -1;
+static gint ett_nfs4_delegpurge = -1;
+static gint ett_nfs4_delegreturn = -1;
+static gint ett_nfs4_getattr = -1;
+static gint ett_nfs4_getattr_args = -1;
+static gint ett_nfs4_getattr_resp = -1;
static gint ett_nfs4_resok4 = -1;
static gint ett_nfs4_obj_attrs = -1;
-static gint ett_nfs4_fattr4_new_attr_vals = -1;
+static gint ett_nfs4_fattr_new_attr_vals = -1;
static gint ett_nfs4_fattr4_attrmask = -1;
static gint ett_nfs4_attribute = -1;
-static gint ett_nfs_getfh4 = -1;
-static gint ett_nfs_link4 = -1;
-static gint ett_nfs_lock4 = -1;
-static gint ett_nfs_lockt4 = -1;
-static gint ett_nfs_locku4 = -1;
-static gint ett_nfs_lookup4 = -1;
-static gint ett_nfs_lookupp4 = -1;
-static gint ett_nfs_nverify4 = -1;
-static gint ett_nfs_open4 = -1;
-static gint ett_nfs_openattr4 = -1;
-static gint ett_nfs_open_confirm4 = -1;
-static gint ett_nfs_open_downgrade4 = -1;
-static gint ett_nfs_putfh4 = -1;
-static gint ett_nfs_putpubfh4 = -1;
-static gint ett_nfs_putrootfh4 = -1;
-static gint ett_nfs_read4 = -1;
-static gint ett_nfs_readdir4 = -1;
-static gint ett_nfs_readlink4 = -1;
-static gint ett_nfs_remove4 = -1;
-static gint ett_nfs_rename4 = -1;
-static gint ett_nfs_renew4 = -1;
-static gint ett_nfs_restorefh4 = -1;
-static gint ett_nfs_savefh4 = -1;
-static gint ett_nfs_secinfo4 = -1;
-static gint ett_nfs_setattr4 = -1;
-static gint ett_nfs_setclientid4 = -1;
-static gint ett_nfs_setclientid_confirm4 = -1;
-static gint ett_nfs_verify4 = -1;
-static gint ett_nfs_write4 = -1;
-static gint ett_nfs_release_lockowner4 = -1;
-static gint ett_nfs_backchannel_ctl4 = -1;
-static gint ett_nfs_illegal4 = -1;
-static gint ett_nfs_verifier4 = -1;
-static gint ett_nfs_opaque = -1;
-static gint ett_nfs_dirlist4 = -1;
-static gint ett_nfs_pathname4 = -1;
-static gint ett_nfs_change_info4 = -1;
-static gint ett_nfs_open_delegation4 = -1;
-static gint ett_nfs_open_claim4 = -1;
-static gint ett_nfs_opentype4 = -1;
-static gint ett_nfs_lock_owner4 = -1;
-static gint ett_nfs_cb_client4 = -1;
-static gint ett_nfs_client_id4 = -1;
-static gint ett_nfs_clientowner4 = -1;
-static gint ett_exchangeid_call_flags = -1;
-static gint ett_exchangeid_reply_flags = -1;
-static gint ett_server_owner4 = -1;
-static gint ett_nfs_bitmap4 = -1;
-static gint ett_nfs_attr_request = -1;
-static gint ett_nfs_fattr4 = -1;
-static gint ett_nfs_fsid4 = -1;
-static gint ett_nfs_fs_locations4 = -1;
-static gint ett_nfs_fs_location4 = -1;
-static gint ett_nfs_open4_result_flags = -1;
-static gint ett_nfs_secinfo4_flavor_info = -1;
-static gint ett_nfs_stateid4 = -1;
-static gint ett_nfs_fattr4_fh_expire_type = -1;
-static gint ett_nfs_ace4 = -1;
-static gint ett_nfs_clientaddr4 = -1;
-static gint ett_nfs_aceflag4 = -1;
-static gint ett_nfs_acemask4 = -1;
-static gint ett_create_session_flags = -1;
-static gint ett_sequence_status_flags = -1;
-
-static gint ett_nfs_layoutget4 = -1;
-static gint ett_nfs_layoutcommit4 = -1;
-static gint ett_nfs_layoutreturn4 = -1;
-static gint ett_nfs_getdevinfo4 = -1;
-static gint ett_nfs_getdevlist4 = -1;
-static gint ett_nfs_bind_conn_to_session4 = -1;
-static gint ett_nfs_exchange_id4 = -1;
-static gint ett_nfs_create_session4 = -1;
-static gint ett_nfs_destroy_session4 = -1;
-static gint ett_nfs_free_stateid4 = -1;
-static gint ett_nfs_secinfo_no_name4 = -1;
-static gint ett_nfs_sequence4 = -1;
-static gint ett_nfs_slotid4 = -1;
-static gint ett_nfs_sr_status4 = -1;
-static gint ett_nfs_serverscope4 = -1;
-static gint ett_nfs_minorid4 = -1;
-static gint ett_nfs_majorid4 = -1;
-static gint ett_nfs_persist4 = -1;
-static gint ett_nfs_backchan4 = -1;
-static gint ett_nfs_rdmamode4 = -1;
-static gint ett_nfs_padsize4 = -1;
-static gint ett_nfs_cbrenforce4 = -1;
-static gint ett_nfs_hashalg4 = -1;
-static gint ett_nfs_ssvlen4 = -1;
-static gint ett_nfs_maxreqsize4 = -1;
-static gint ett_nfs_maxrespsize4 = -1;
-static gint ett_nfs_maxrespsizecached4 = -1;
-static gint ett_nfs_maxops4 = -1;
-static gint ett_nfs_maxreqs4 = -1;
-static gint ett_nfs_streamchanattrs4 = -1;
-static gint ett_nfs_rdmachanattrs4 = -1;
-static gint ett_nfs_machinename4 = -1;
-static gint ett_nfs_flavor4 = -1;
-static gint ett_nfs_stamp4 = -1;
-static gint ett_nfs_uid4 = -1;
-static gint ett_nfs_gid4 = -1;
-static gint ett_nfs_service4 = -1;
-static gint ett_nfs_sessionid4 = -1;
-static gint ett_nfs_layoutseg = -1;
-static gint ett_nfs_fh_obj = -1;
-static gint ett_nfs_fh_ex = -1;
-static gint ett_nfs_layoutseg_fh = -1;
-static gint ett_nfs_test_stateid4 = -1;
-static gint ett_nfs_destroy_clientid4 = -1;
-static gint ett_nfs_reclaim_complete4 = -1;
-static gint ett_nfs_chan_attrs = -1;
-static gint ett_nfs_want_notify_flags = -1;
-
-/* what type of fhandles should we dissect as */
+static gint ett_nfs4_getfh = -1;
+static gint ett_nfs4_link = -1;
+static gint ett_nfs4_lock = -1;
+static gint ett_nfs4_lockt = -1;
+static gint ett_nfs4_locku = -1;
+static gint ett_nfs4_lookup = -1;
+static gint ett_nfs4_lookupp = -1;
+static gint ett_nfs4_nverify = -1;
+static gint ett_nfs4_open = -1;
+static gint ett_nfs4_openattr = -1;
+static gint ett_nfs4_open_confirm = -1;
+static gint ett_nfs4_open_downgrade = -1;
+static gint ett_nfs4_putfh = -1;
+static gint ett_nfs4_putpubfh = -1;
+static gint ett_nfs4_putrootfh = -1;
+static gint ett_nfs4_read = -1;
+static gint ett_nfs4_readdir = -1;
+static gint ett_nfs4_readlink = -1;
+static gint ett_nfs4_remove = -1;
+static gint ett_nfs4_rename = -1;
+static gint ett_nfs4_renew = -1;
+static gint ett_nfs4_restorefh = -1;
+static gint ett_nfs4_savefh = -1;
+static gint ett_nfs4_secinfo = -1;
+static gint ett_nfs4_setattr = -1;
+static gint ett_nfs4_setclientid = -1;
+static gint ett_nfs4_setclientid_confirm = -1;
+static gint ett_nfs4_verify = -1;
+static gint ett_nfs4_write = -1;
+static gint ett_nfs4_release_lockowner = -1;
+static gint ett_nfs4_backchannel_ctl = -1;
+static gint ett_nfs4_illegal = -1;
+static gint ett_nfs4_verifier = -1;
+static gint ett_nfs4_dirlist = -1;
+static gint ett_nfs4_pathname = -1;
+static gint ett_nfs4_change_info = -1;
+static gint ett_nfs4_open_delegation = -1;
+static gint ett_nfs4_open_claim = -1;
+static gint ett_nfs4_opentype = -1;
+static gint ett_nfs4_lock_owner = -1;
+static gint ett_nfs4_cb_client = -1;
+static gint ett_nfs4_client_id = -1;
+static gint ett_nfs4_clientowner = -1;
+static gint ett_nfs4_exchangeid_call_flags = -1;
+static gint ett_nfs4_exchangeid_reply_flags = -1;
+static gint ett_nfs4_server_owner = -1;
+static gint ett_nfs4_bitmap = -1;
+static gint ett_nfs4_attr_request = -1;
+static gint ett_nfs4_fattr = -1;
+static gint ett_nfs4_fsid = -1;
+static gint ett_nfs4_fs_locations = -1;
+static gint ett_nfs4_fs_location = -1;
+static gint ett_nfs4_open_result_flags = -1;
+static gint ett_nfs4_secinfo_flavor_info = -1;
+static gint ett_nfs4_stateid = -1;
+static gint ett_nfs4_fattr_fh_expire_type = -1;
+static gint ett_nfs4_ace = -1;
+static gint ett_nfs4_clientaddr = -1;
+static gint ett_nfs4_aceflag = -1;
+static gint ett_nfs4_acemask = -1;
+static gint ett_nfs4_create_session_flags = -1;
+static gint ett_nfs4_sequence_status_flags = -1;
+static gint ett_nfs4_fh_file = -1;
+static gint ett_nfs4_fh_file_flags = -1;
+static gint ett_nfs4_fh_export = -1;
+static gint ett_nfs4_layoutget = -1;
+static gint ett_nfs4_layoutcommit = -1;
+static gint ett_nfs4_layoutreturn = -1;
+static gint ett_nfs4_getdevinfo = -1;
+static gint ett_nfs4_getdevlist = -1;
+static gint ett_nfs4_bind_conn_to_session = -1;
+static gint ett_nfs4_exchange_id = -1;
+static gint ett_nfs4_create_session = -1;
+static gint ett_nfs4_destroy_session = -1;
+static gint ett_nfs4_free_stateid = -1;
+static gint ett_nfs4_secinfo_no_name = -1;
+static gint ett_nfs4_sequence = -1;
+static gint ett_nfs4_slotid = -1;
+static gint ett_nfs4_sr_status = -1;
+static gint ett_nfs4_serverscope = -1;
+static gint ett_nfs4_minorid = -1;
+static gint ett_nfs4_majorid = -1;
+static gint ett_nfs4_persist = -1;
+static gint ett_nfs4_backchan = -1;
+static gint ett_nfs4_rdmamode = -1;
+static gint ett_nfs4_padsize = -1;
+static gint ett_nfs4_cbrenforce = -1;
+static gint ett_nfs4_hashalg = -1;
+static gint ett_nfs4_ssvlen = -1;
+static gint ett_nfs4_maxreqsize = -1;
+static gint ett_nfs4_maxrespsize = -1;
+static gint ett_nfs4_maxrespsizecached = -1;
+static gint ett_nfs4_maxops = -1;
+static gint ett_nfs4_maxreqs = -1;
+static gint ett_nfs4_streamchanattrs = -1;
+static gint ett_nfs4_rdmachanattrs = -1;
+static gint ett_nfs4_machinename = -1;
+static gint ett_nfs4_flavor = -1;
+static gint ett_nfs4_stamp = -1;
+static gint ett_nfs4_uid = -1;
+static gint ett_nfs4_gid = -1;
+static gint ett_nfs4_service = -1;
+static gint ett_nfs4_sessionid = -1;
+static gint ett_nfs4_layoutseg = -1;
+static gint ett_nfs4_layoutseg_fh = -1;
+static gint ett_nfs4_test_stateid = -1;
+static gint ett_nfs4_destroy_clientid = -1;
+static gint ett_nfs4_reclaim_complete = -1;
+static gint ett_nfs4_chan_attrs = -1;
+static gint ett_nfs4_want_notify_flags = -1;
+
+/* Types of fhandles we can dissect */
static dissector_table_t nfs_fhandle_table;
-
-#define FHT_UNKNOWN 0
-#define FHT_SVR4 1
-#define FHT_LINUX_KNFSD_LE 2
-#define FHT_LINUX_NFSD_LE 3
-#define FHT_LINUX_KNFSD_NEW 4
-#define FHT_NETAPP 5
-#define FHT_NETAPP_V4 6
-#define FHT_NETAPP_GX_V3 7
-#define FHT_CELERRA 8
-
+#define FHT_UNKNOWN 0
+#define FHT_SVR4 1
+#define FHT_LINUX_KNFSD_LE 2
+#define FHT_LINUX_NFSD_LE 3
+#define FHT_LINUX_KNFSD_NEW 4
+#define FHT_NETAPP 5
+#define FHT_NETAPP_V4 6
+#define FHT_NETAPP_GX_V3 7
+#define FHT_CELERRA 8
static const enum_val_t nfs_fhandle_types[] = {
- { "unknown", "Unknown", FHT_UNKNOWN },
- { "svr4", "SVR4", FHT_SVR4 },
- { "knfsd_le", "KNFSD_LE", FHT_LINUX_KNFSD_LE },
- { "nfsd_le", "NFSD_LE", FHT_LINUX_NFSD_LE },
- { "knfsd_new", "KNFSD_NEW", FHT_LINUX_KNFSD_NEW },
- { "ontap_v3", "ONTAP_V3", FHT_NETAPP },
- { "ontap_v4", "ONTAP_V4", FHT_NETAPP_V4},
- { "ontap_gx_v3","ONTAP_GX_V3", FHT_NETAPP_GX_V3},
- { "celerra", "CELERRA", FHT_CELERRA },
+ { "unknown", "Unknown", FHT_UNKNOWN },
+ { "svr4", "SVR4", FHT_SVR4 },
+ { "knfsd_le", "KNFSD_LE", FHT_LINUX_KNFSD_LE },
+ { "nfsd_le", "NFSD_LE", FHT_LINUX_NFSD_LE },
+ { "knfsd_new", "KNFSD_NEW", FHT_LINUX_KNFSD_NEW },
+ { "ontap_v3", "ONTAP_V3", FHT_NETAPP },
+ { "ontap_v4", "ONTAP_V4", FHT_NETAPP_V4},
+ { "ontap_gx_v3", "ONTAP_GX_V3", FHT_NETAPP_GX_V3},
+ { "celerra", "CELERRA", FHT_CELERRA },
{ NULL, NULL, 0 }
};
/* decode all nfs filehandles as this type */
@@ -760,88 +754,6 @@ typedef struct nfs_fhandle_data {
gboolean nfs_fhandle_reqrep_matching = FALSE;
static emem_tree_t *nfs_fhandle_frame_table = NULL;
-typedef struct _nfsv4_operation_summary {
- guint32 opcode;
- gboolean iserror;
- GString *optext;
-} nfsv4_operation_summary;
-
-
-/* To try to determine which NFSv4 operations are most important in a request, we categorize
- the operations into different "tiers".
- All operations falling into the highest tier (where 1 is highest, 5 is lowest) are considered
- to be the "most significant" operations. This information is useful for display purposes,
- filtering, and for response time calculations.
- For example, virtually all NFSv4 requests include a GETATTR. But in a request with
- PUTFH; CLOSE; GETATTR operations, CLOSE is the significant operation. In a request with
- PUTFH; GETATTR operations, GETATTR is the significant operation. CLOSE has higher tier than
- GETATTR, which is in a higher tier than PUTFH.
- In practice this seems to be a very reliable method of determining the most significant
- operation(s). */
-
-static int nfsv4_operation_tiers[] = {
- 1 /* 0 */ ,
- 1 /* 1 */ ,
- 1 /* 2 */ ,
- 2 /* 3, NFS4_OP_ACCESS */ ,
- 1 /* 4, NFS4_OP_CLOSE */,
- 1 /* 5, NFS4_OP_COMMIT */,
- 1 /* 6, NFS4_OP_CREATE */,
- 1 /* 7, NFS4_OP_DELEGPURGE */,
- 1 /* 8, NFS4_OP_DELEGRETURN */,
- 3 /* 9, NFS4_OP_GETATTR */,
- 4 /* 10, NFS4_OP_GETFH */,
- 1 /* 11, NFS4_OP_LINK */,
- 1 /* 12, NFS4_OP_LOCK */,
- 1 /* 13, NFS4_OP_LOCKT */,
- 1 /* 14, NFS4_OP_LOCKU */,
- 1 /* 15, NFS4_OP_LOOKUP */,
- 1 /* 16, NFS4_OP_LOOKUPP */,
- 2 /* 17, NFS4_OP_NVERIFY */,
- 1 /* 18, NFS4_OP_OPEN */,
- 1 /* 19, NFS4_OP_OPENATTR */,
- 1 /* 20, NFS4_OP_OPEN_CONFIRM */,
- 1 /* 21, NFS4_OP_OPEN_DOWNGRADE */,
- 4 /* 22, NFS4_OP_PUTFH */,
- 3 /* 23, NFS4_OP_PUTPUBFH */,
- 3 /* 24, NFS4_OP_PUTROOTFH */,
- 1 /* 25, NFS4_OP_READ */,
- 1 /* 26, NFS4_OP_READDIR */,
- 1 /* 27, NFS4_OP_READLINK */,
- 1 /* 28, NFS4_OP_REMOVE */,
- 1 /* 29, NFS4_OP_RENAME */,
- 1 /* 30, NFS4_OP_RENEW */,
- 4 /* 31, NFS4_OP_RESTOREFH */,
- 4 /* 32, NFS4_OP_SAVEFH */,
- 1 /* 33, NFS4_OP_SECINFO */,
- 1 /* 34, NFS4_OP_SETATTR */,
- 1 /* 35, NFS4_OP_SETCLIENTID */,
- 1 /* 36, NFS4_OP_SETCLIENTID_CONFIRM */,
- 1 /* 37, NFS4_OP_VERIFY */,
- 1 /* 38, NFS4_OP_WRITE */,
- 1 /* 39, NFS4_OP_RELEASE_LOCKOWNER */,
- /* Minor version 1 */
- 1 /* 40, NFS4_OP_BACKCHANNEL_CTL */,
- 1 /* 41, NFS4_OP_BIND_CONN_TO_SESSION */,
- 1 /* 42, NFS4_OP_EXCHANGE_ID */,
- 1 /* 43, NFS4_OP_CREATE_SESSION */,
- 1 /* 44, NFS4_OP_DESTROY_SESSION */,
- 1 /* 45, NFS4_OP_FREE_STATEID */,
- 1 /* 46, NFS4_OP_GET_DIR_DELEGATION */,
- 1 /* 47, NFS4_OP_GETDEVINFO */,
- 1 /* 48, NFS4_OP_GETDEVLIST */,
- 1 /* 49, NFS4_OP_LAYOUTCOMMIT */,
- 1 /* 50, NFS4_OP_LAYOUTGET */,
- 1 /* 51, NFS4_OP_LAYOUTRETURN */,
- 1 /* 52, NFS4_OP_SECINFO_NO_NAME */,
- 4 /* 53, NFS4_OP_SEQUENCE */,
- 1 /* 54, NFS4_OP_SET_SSV */,
- 1 /* 55, NFS4_OP_TEST_STATEID */,
- 1 /* 56, NFS4_OP_WANT_DELEGATION */,
- 1 /* 57, NFS4_OP_DESTROY_CLIENTID */,
- 1 /* 58, NFS4_OP_RECLAIM_COMPLETE */
-};
-
/* file name snooping */
gboolean nfs_file_name_snooping = FALSE;
@@ -871,9 +783,9 @@ static emem_tree_t *nfs_name_snoop_known = NULL;
static emem_tree_t *nfs_file_handles = NULL;
static gboolean nfs_display_v4_tag = TRUE;
-static gboolean display_major_nfsv4_ops = TRUE;
+static gboolean display_major_nfs4_ops = TRUE;
-static int dissect_nfs_stateid4(tvbuff_t *tvb, int offset, proto_tree *tree, guint16 *hash);
+static int dissect_nfs4_stateid(tvbuff_t *tvb, int offset, proto_tree *tree, guint16 *hash);
static void reg_callback(int cbprog);
@@ -929,6 +841,7 @@ store_nfs_file_handle(nfs_fhandle_data_t *nfs_fh)
return new_nfs_fh;
}
+
static gint
nfs_name_snoop_matched_equal(gconstpointer k1, gconstpointer k2)
{
@@ -939,6 +852,8 @@ nfs_name_snoop_matched_equal(gconstpointer k1, gconstpointer k2)
&&(key1->fh_length==key2->fh_length)
&&(!memcmp(key1->fh, key2->fh, key1->fh_length));
}
+
+
static guint
nfs_name_snoop_matched_hash(gconstpointer k)
{
@@ -952,6 +867,8 @@ nfs_name_snoop_matched_hash(gconstpointer k)
return hash;
}
+
+
static gint
nfs_name_snoop_unmatched_equal(gconstpointer k1, gconstpointer k2)
{
@@ -960,6 +877,8 @@ nfs_name_snoop_unmatched_equal(gconstpointer k1, gconstpointer k2)
return key1==key2;
}
+
+
static guint
nfs_name_snoop_unmatched_hash(gconstpointer k)
{
@@ -967,6 +886,8 @@ nfs_name_snoop_unmatched_hash(gconstpointer k)
return key;
}
+
+
static gboolean
nfs_name_snoop_unmatched_free_all(gpointer key_arg _U_, gpointer value, gpointer user_data _U_)
{
@@ -996,6 +917,7 @@ nfs_name_snoop_unmatched_free_all(gpointer key_arg _U_, gpointer value, gpointer
return TRUE;
}
+
static void
nfs_name_snoop_init(void)
{
@@ -1017,8 +939,10 @@ nfs_name_snoop_init(void)
}
}
+
void
-nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len, int parent_offset, int parent_len, const char *name)
+nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len, int parent_offset,
+ int parent_len, const char *name)
{
nfs_name_snoop_t *nns, *old_nns;
const char *ptr=NULL;
@@ -1087,6 +1011,7 @@ nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len, i
g_hash_table_insert(nfs_name_snoop_unmatched, GINT_TO_POINTER(xid), nns);
}
+
static void
nfs_name_snoop_add_fh(int xid, tvbuff_t *tvb, int fh_offset, int fh_length)
{
@@ -1127,6 +1052,7 @@ nfs_name_snoop_add_fh(int xid, tvbuff_t *tvb, int fh_offset, int fh_length)
g_hash_table_insert(nfs_name_snoop_matched, key, nns);
}
+
static void
nfs_full_name_snoop(nfs_name_snoop_t *nns, int *len, char **name, char **pos)
{
@@ -1160,7 +1086,8 @@ nfs_full_name_snoop(nfs_name_snoop_t *nns, int *len, char **name, char **pos)
nfs_full_name_snoop(parent_nns, len, name, pos);
if(*name){
/* make sure components are '/' separated */
- *pos += g_snprintf(*pos, (*len+1) - (gulong)(*pos-*name), "%s%s", ((*pos)[-1]!='/')?"/":"", nns->name);
+ *pos += g_snprintf(*pos, (*len+1) - (gulong)(*pos-*name), "%s%s",
+ ((*pos)[-1]!='/')?"/":"", nns->name);
DISSECTOR_ASSERT((*pos-*name) <= *len);
}
return;
@@ -1169,8 +1096,10 @@ nfs_full_name_snoop(nfs_name_snoop_t *nns, int *len, char **name, char **pos)
return;
}
+
static void
-nfs_name_snoop_fh(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int fh_offset, int fh_length, gboolean hidden)
+nfs_name_snoop_fh(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int fh_offset,
+ int fh_length, gboolean hidden)
{
nfs_name_snoop_key_t key;
nfs_name_snoop_t *nns = NULL;
@@ -1232,7 +1161,7 @@ nfs_name_snoop_fh(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int fh_of
/* if we know the mapping, print the filename */
if(nns){
- proto_item *fh_item;
+ proto_item *fh_item = NULL;
if(hidden){
fh_item=proto_tree_add_string(tree, hf_nfs_name, NULL,
@@ -1258,6 +1187,7 @@ nfs_name_snoop_fh(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int fh_of
}
}
+
/* file handle dissection */
static const value_string names_fhtype[] =
@@ -1279,7 +1209,6 @@ static value_string_ext names_fhtype_ext = VALUE_STRING_EXT_INIT(names_fhtype);
static const true_false_string tfs_endianness = { "Little Endian", "Big Endian" };
/* SVR4: checked with ReliantUNIX (5.43, 5.44, 5.45), OpenSolaris (build 101a) */
-
static void
dissect_fhandle_data_SVR4(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree *tree)
{
@@ -1337,11 +1266,9 @@ dissect_fhandle_data_SVR4(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree *tre
}
}
- if (tree) {
- proto_tree_add_boolean(tree, hf_nfs_fh_endianness, tvb,
- 0, fhlen, little_endian);
- }
-
+ if (tree)
+ proto_tree_add_boolean(tree, hf_nfs_fh_endianness, tvb, 0, fhlen, little_endian);
+
/* We are fairly sure, that when found==FALSE, the following code will
throw an exception. */
@@ -1361,9 +1288,10 @@ dissect_fhandle_data_SVR4(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree *tre
temp = tvb_get_ntohl(tvb, fsid_O);
fsid_major = ( temp>>18 ) & 0x3fff; /* 14 bits */
fsid_minor = ( temp ) & 0x3ffff; /* 18 bits */
+
if (tree) {
- proto_item* fsid_item;
- proto_tree* fsid_tree;
+ proto_item* fsid_item = NULL;
+ proto_tree* fsid_tree = NULL;
fsid_item = proto_tree_add_text(tree, tvb,
fsid_O, fsid_L,
@@ -1445,8 +1373,8 @@ dissect_fhandle_data_SVR4(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree *tre
gen = tvb_get_ntohl(tvb, fn_data_gen_O);
fn_L = fn_len_L + fn_len;
if (tree) {
- proto_item* fn_item;
- proto_tree* fn_tree;
+ proto_item* fn_item = NULL;
+ proto_tree* fn_tree = NULL;
fn_item = proto_tree_add_uint(tree, hf_nfs_fh_fn, tvb,
fn_O, fn_L, inode);
@@ -1499,8 +1427,8 @@ dissect_fhandle_data_SVR4(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree *tre
xgen = tvb_get_ntohl(tvb, xfn_data_gen_O);
xfn_L = xfn_len_L + xfn_len;
if (tree) {
- proto_item* xfn_item;
- proto_tree* xfn_tree;
+ proto_item* xfn_item = NULL;
+ proto_tree* xfn_tree = NULL;
xfn_item = proto_tree_add_uint(tree, hf_nfs_fh_xfn, tvb,
xfn_O, xfn_L, xinode);
@@ -1592,8 +1520,8 @@ dissect_fhandle_data_LINUX_KNFSD_LE(tvbuff_t* tvb, packet_info *pinfo _U_, proto
/* exported file system id (device) */
{
- proto_item* xfsid_item;
- proto_tree* xfsid_tree;
+ proto_item* xfsid_item = NULL;
+ proto_tree* xfsid_tree = NULL;
xfsid_item = proto_tree_add_text(tree, tvb,
offset+16, 4,
@@ -1637,8 +1565,8 @@ dissect_fhandle_data_LINUX_NFSD_LE(tvbuff_t* tvb, packet_info *pinfo _U_, proto_
hashlen = tvb_get_guint8(tvb, offset+4);
if (tree) {
- proto_item* hash_item;
- proto_tree* hash_tree;
+ proto_item* hash_item = NULL;
+ proto_tree* hash_tree = NULL;
hash_item = proto_tree_add_text(tree, tvb, offset+4,
hashlen + 1,
@@ -1675,8 +1603,8 @@ dissect_fhandle_data_NETAPP(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree *t
guint32 nfsexport = tvb_get_letohl(tvb, offset + 24);
guint32 export_snapgen = tvb_get_letohl(tvb, offset + 28);
- proto_item *item;
- proto_tree *subtree;
+ proto_item *item = NULL;
+ proto_tree *subtree = NULL;
char *flag_string;
const char *strings[] = { " MNT_PNT", " SNAPDIR", " SNAPDIR_ENT",
" EMPTY", " VBN_ACCESS", " MULTIVOLUME",
@@ -1812,19 +1740,19 @@ dissect_fhandle_data_NETAPP_V4(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree
}
}
item = proto_tree_add_text(tree, tvb, offset + 0, 8, "export (inode %u)", fileid);
- subtree = proto_item_add_subtree(item, ett_nfsv4_fh_export);
+ subtree = proto_item_add_subtree(item, ett_nfs4_fh_export);
proto_tree_add_uint(subtree, hf_nfs_fh_export_fileid,
tvb, offset + 0, 4, fileid);
proto_tree_add_uint(subtree, hf_nfs_fh_export_generation,
tvb, offset + 4, 4, snapgen);
item = proto_tree_add_text(tree, tvb, offset + 8, 16, "file (inode %u)", inum);
- subtree = proto_item_add_subtree(item, ett_nfsv4_fh_file);
+ subtree = proto_item_add_subtree(item, ett_nfs4_fh_file);
item = proto_tree_add_uint_format(subtree, hf_nfs_fh_flags,
tvb, offset + 8, 2, flags,
"Flags: %#02x%s", flags,
flag_string);
- flag_tree = proto_item_add_subtree(item, ett_nfsv4_fh_file_flags);
+ flag_tree = proto_item_add_subtree(item, ett_nfs4_fh_file_flags);
proto_tree_add_uint(flag_tree, hf_nfs_fh_file_flag_mntpoint, tvb, offset+8, 2, flags);
proto_tree_add_uint(flag_tree, hf_nfs_fh_file_flag_snapdir, tvb, offset+8, 2, flags);
proto_tree_add_uint(flag_tree, hf_nfs_fh_file_flag_snapdir_ent, tvb, offset+8, 2, flags);
@@ -1873,7 +1801,7 @@ dissect_fhandle_data_NETAPP_V4(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree
static void
dissect_fhandle_data_NETAPP_GX_v3(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree *tree)
{
- proto_tree *field_tree;
+ proto_tree *field_tree = NULL;
proto_item *tf;
guint16 cluster_id;
guint16 epoch;
@@ -1891,39 +1819,39 @@ dissect_fhandle_data_NETAPP_GX_v3(tvbuff_t* tvb, packet_info *pinfo _U_, proto_t
if (tree) {
/* = utility = */
utility = tvb_get_guint8(tvb, offset);
- tf = proto_tree_add_uint_format(tree, hf_gxfh3_utlfield, tvb,
+ tf = proto_tree_add_uint_format(tree, hf_nfs3_gxfh_utlfield, tvb,
offset, 1, utility,
" utility: 0x%02x",utility);
- field_tree = proto_item_add_subtree(tf, ett_nfs_gxfh3_utlfield);
+ field_tree = proto_item_add_subtree(tf, ett_nfs3_gxfh_utlfield);
if (utility & NFS3GX_FH_TREE_MASK) {
- proto_tree_add_uint(field_tree, hf_gxfh3_utlfield_tree_w, tvb,
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_utlfield_tree_w, tvb,
offset, 1, utility);
}
else {
- proto_tree_add_uint(field_tree, hf_gxfh3_utlfield_tree_r, tvb,
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_utlfield_tree_r, tvb,
offset, 1, utility);
}
if (utility & NFS3GX_FH_JUN_MASK) {
- proto_tree_add_uint(field_tree, hf_gxfh3_utlfield_jun, tvb,
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_utlfield_jun, tvb,
offset, 1, utility);
}
else {
- proto_tree_add_uint(field_tree, hf_gxfh3_utlfield_jun_not, tvb,
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_utlfield_jun_not, tvb,
offset, 1, utility);
}
- proto_tree_add_uint(field_tree, hf_gxfh3_utlfield_ver, tvb,
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_utlfield_ver, tvb,
offset, 1, utility);
/* = volume count== */
volcnt = tvb_get_guint8(tvb, offset+1);
- proto_tree_add_uint_format(tree, hf_gxfh3_volcnt, tvb,
+ proto_tree_add_uint_format(tree, hf_nfs3_gxfh_volcnt, tvb,
offset+1, 1, volcnt,
" volume count: 0x%02x (%d)", volcnt, volcnt);
/* = epoch = */
epoch = tvb_get_letohs(tvb, offset+2);
- proto_tree_add_uint_format(tree, hf_gxfh3_epoch, tvb,
+ proto_tree_add_uint_format(tree, hf_nfs3_gxfh_epoch, tvb,
offset+2, 2, epoch,
" epoch: 0x%04x (%u)", epoch, epoch);
/* = spin file handle = */
@@ -1936,50 +1864,50 @@ dissect_fhandle_data_NETAPP_GX_v3(tvbuff_t* tvb, packet_info *pinfo _U_, proto_t
tf = proto_tree_add_text(tree, tvb, offset+4, 16,
" spin file handle");
- field_tree = proto_item_add_subtree(tf, ett_nfs_gxfh3_sfhfield);
+ field_tree = proto_item_add_subtree(tf, ett_nfs3_gxfh_sfhfield);
- proto_tree_add_uint_format(field_tree, hf_gxfh3_ldsid, tvb,
+ proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_ldsid, tvb,
offset+4, 4, local_dsid,
" local dsid: 0x%08x (%u)", local_dsid, local_dsid);
- proto_tree_add_uint_format(field_tree, hf_gxfh3_cid, tvb,
+ proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_cid, tvb,
offset+8, 2, cluster_id,
" cluster id: 0x%04x (%u)", cluster_id, cluster_id);
- proto_tree_add_uint_format(field_tree, hf_gxfh3_resv, tvb,
+ proto_tree_add_uint_format(field_tree, hf_mfs3_gxfh_resv, tvb,
offset+10, 1, reserved,
" reserved: 0x%02x (%u)", reserved, reserved);
- tf = proto_tree_add_uint_format(field_tree, hf_gxfh3_sfhflags, tvb,
+ tf = proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_sfhflags, tvb,
offset+11, 1, utility,
" flags: 0x%02x", flags);
- field_tree = proto_item_add_subtree(tf, ett_nfs_gxfh3_sfhflags);
- proto_tree_add_uint(field_tree, hf_gxfh3_sfhflags_resv1, tvb,
+ field_tree = proto_item_add_subtree(tf, ett_nfs3_gxfh_sfhflags);
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_sfhflags_resv1, tvb,
offset+11, 1, flags);
- proto_tree_add_uint(field_tree, hf_gxfh3_sfhflags_resv2, tvb,
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_sfhflags_resv2, tvb,
offset+11, 1, flags);
if (flags & SPINNP_FH_FLAG_ONTAP_MASK) {
- proto_tree_add_uint(field_tree, hf_gxfh3_sfhflags_ontap7G, tvb,
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_sfhflags_ontap7G, tvb,
offset+11, 1, flags);
}
else {
- proto_tree_add_uint(field_tree, hf_gxfh3_sfhflags_ontapGX, tvb,
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_sfhflags_ontapGX, tvb,
offset+11, 1, flags);
}
- proto_tree_add_boolean(field_tree, hf_gxfh3_sfhflags_striped, tvb,
+ proto_tree_add_boolean(field_tree, hf_nfs3_gxfh_sfhflags_striped, tvb,
offset+11, 1, flags);
- proto_tree_add_boolean(field_tree, hf_gxfh3_sfhflags_empty, tvb,
+ proto_tree_add_boolean(field_tree, hf_nfs3_gxfh_sfhflags_empty, tvb,
offset+11, 1, flags);
- proto_tree_add_boolean(field_tree, hf_gxfh3_sfhflags_snapdirent, tvb,
+ proto_tree_add_boolean(field_tree, hf_nfs3_gxfh_sfhflags_snapdirent, tvb,
offset+11, 1, flags);
- proto_tree_add_boolean(field_tree, hf_gxfh3_sfhflags_snapdir, tvb,
+ proto_tree_add_boolean(field_tree, hf_nfs3_gxfh_sfhflags_snapdir, tvb,
offset+11, 1, flags);
- proto_tree_add_boolean(field_tree, hf_gxfh3_sfhflags_streamdir, tvb,
+ proto_tree_add_boolean(field_tree, hf_nfs3_gxfh_sfhflags_streamdir, tvb,
offset+11, 1, flags);
- proto_tree_add_uint_format(field_tree, hf_gxfh3_spinfid, tvb,
+ proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_spinfid, tvb,
offset+12, 4, spinfile_id,
"spin file id: 0x%08x (%u)", spinfile_id, spinfile_id);
- proto_tree_add_uint_format(field_tree, hf_gxfh3_spinfuid, tvb,
+ proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_spinfuid, tvb,
offset+16, 4, spinfile_id,
"spin file unique id: 0x%08x (%u)", spinfile_uid, spinfile_uid);
@@ -1993,60 +1921,60 @@ dissect_fhandle_data_NETAPP_GX_v3(tvbuff_t* tvb, packet_info *pinfo _U_, proto_t
tf = proto_tree_add_text(tree, tvb, offset+20, 16,
" spin (mount point) file handle");
- field_tree = proto_item_add_subtree(tf, ett_nfs_gxfh3_sfhfield);
+ field_tree = proto_item_add_subtree(tf, ett_nfs3_gxfh_sfhfield);
- proto_tree_add_uint_format(field_tree, hf_gxfh3_ldsid, tvb,
+ proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_ldsid, tvb,
offset+20, 4, local_dsid,
" local dsid: 0x%08x (%u)", local_dsid, local_dsid);
- proto_tree_add_uint_format(field_tree, hf_gxfh3_cid, tvb,
+ proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_cid, tvb,
offset+24, 2, cluster_id,
" cluster id: 0x%04x (%u)", cluster_id, cluster_id);
- proto_tree_add_uint_format(field_tree, hf_gxfh3_resv, tvb,
+ proto_tree_add_uint_format(field_tree, hf_mfs3_gxfh_resv, tvb,
offset+26, 1, reserved,
" reserved: 0x%02x (%u)", reserved, reserved);
- tf = proto_tree_add_uint_format(field_tree, hf_gxfh3_sfhflags, tvb,
+ tf = proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_sfhflags, tvb,
offset+27, 1, utility,
" flags: 0x%02x", flags);
- field_tree = proto_item_add_subtree(tf, ett_nfs_gxfh3_sfhflags);
- proto_tree_add_uint(field_tree, hf_gxfh3_sfhflags_resv1, tvb,
+ field_tree = proto_item_add_subtree(tf, ett_nfs3_gxfh_sfhflags);
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_sfhflags_resv1, tvb,
offset+27, 1, flags);
- proto_tree_add_uint(field_tree, hf_gxfh3_sfhflags_resv2, tvb,
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_sfhflags_resv2, tvb,
offset+27, 1, flags);
if (flags & SPINNP_FH_FLAG_ONTAP_MASK) {
- proto_tree_add_uint(field_tree, hf_gxfh3_sfhflags_ontap7G, tvb,
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_sfhflags_ontap7G, tvb,
offset+27, 1, flags);
}
else {
- proto_tree_add_uint(field_tree, hf_gxfh3_sfhflags_ontapGX, tvb,
+ proto_tree_add_uint(field_tree, hf_nfs3_gxfh_sfhflags_ontapGX, tvb,
offset+27, 1, flags);
}
- proto_tree_add_boolean(field_tree, hf_gxfh3_sfhflags_striped, tvb,
+ proto_tree_add_boolean(field_tree, hf_nfs3_gxfh_sfhflags_striped, tvb,
offset+27, 1, flags);
- proto_tree_add_boolean(field_tree, hf_gxfh3_sfhflags_empty, tvb,
+ proto_tree_add_boolean(field_tree, hf_nfs3_gxfh_sfhflags_empty, tvb,
offset+27, 1, flags);
- proto_tree_add_boolean(field_tree, hf_gxfh3_sfhflags_snapdirent, tvb,
+ proto_tree_add_boolean(field_tree, hf_nfs3_gxfh_sfhflags_snapdirent, tvb,
offset+27, 1, flags);
- proto_tree_add_boolean(field_tree, hf_gxfh3_sfhflags_snapdir, tvb,
+ proto_tree_add_boolean(field_tree, hf_nfs3_gxfh_sfhflags_snapdir, tvb,
offset+27, 1, flags);
- proto_tree_add_boolean(field_tree, hf_gxfh3_sfhflags_streamdir, tvb,
+ proto_tree_add_boolean(field_tree, hf_nfs3_gxfh_sfhflags_streamdir, tvb,
offset+27, 1, flags);
- proto_tree_add_uint_format(field_tree, hf_gxfh3_spinfid, tvb,
+ proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_spinfid, tvb,
offset+28, 4, spinfile_id,
"spin file id: 0x%08x (%u)", spinfile_id, spinfile_id);
- proto_tree_add_uint_format(field_tree, hf_gxfh3_spinfuid, tvb,
+ proto_tree_add_uint_format(field_tree, hf_nfs3_gxfh_spinfuid, tvb,
offset+32, 4, spinfile_id,
"spin file unique id: 0x%08x (%u)", spinfile_uid, spinfile_uid);
/* = export point id = */
export_id = tvb_get_letohl(tvb, offset+36);
- proto_tree_add_uint_format(tree, hf_gxfh3_exportptid, tvb,
+ proto_tree_add_uint_format(tree, hf_nfs3_gxfh_exportptid, tvb,
offset+36, 4, spinfile_id,
" export point id: 0x%08x (%u)", export_id, export_id);
/* = export point unique id = */
export_uid = tvb_get_letohl(tvb, offset+40);
- proto_tree_add_uint_format(tree, hf_gxfh3_exportptuid, tvb,
+ proto_tree_add_uint_format(tree, hf_nfs3_gxfh_exportptuid, tvb,
offset+40, 4, spinfile_id,
" export point unique id: 0x%08x (%u)", export_uid, export_uid);
@@ -2343,7 +2271,7 @@ dissect_fhandle_data_CELERRA(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree *
ex_gen = tvb_get_letohl(tvb, offset+20);
proto_tree_add_uint(ex_tree, hf_nfs_fh_ex_gen, tvb, offset+20, 4, ex_gen);
}
- /* Create a "File/Dir/Object" subtree (bytes 24 thru 39 of the 40-byte filehandle) */
+ /* Create a "File/Dir/Object" subtree (bytes 24 thru 39 of the 40-byte filehandle) */
{
proto_item* obj_item = NULL;
proto_tree* obj_tree = NULL;
@@ -2364,6 +2292,7 @@ dissect_fhandle_data_CELERRA(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tree *
}
}
+
static void
dissect_fhandle_data_unknown(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
@@ -2374,9 +2303,8 @@ dissect_fhandle_data_unknown(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
static void
-dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, unsigned int fhlen, gboolean hidden,
- guint32 *hash)
+dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+ unsigned int fhlen, gboolean hidden, guint32 *hash)
{
/* this is to set up fhandle display filters to find both packets
of an RPC call */
@@ -2406,7 +2334,7 @@ dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
guint32 fhhash;
guint8 *fh_array;
- proto_item *fh_item;
+ proto_item *fh_item = NULL;
fh_array = tvb_get_string(tvb, offset, fhlen);
fhhash = crc32_ccitt(fh_array, fhlen);
@@ -2433,21 +2361,20 @@ dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
tvbuff_t *fh_tvb;
int real_length;
- proto_tree_add_text(tree, tvb, offset, 0,
- "decode type as: %s", val_to_str_ext_const(default_nfs_fhandle_type, &names_fhtype_ext, "Unknown"));
-
+ proto_tree_add_text(tree, tvb, offset, 0, "decode type as: %s",
+ val_to_str_ext_const(default_nfs_fhandle_type, &names_fhtype_ext, "Unknown"));
real_length=fhlen;
- if(default_nfs_fhandle_type != FHT_UNKNOWN && real_length<tvb_length_remaining(tvb, offset)){
+ if(default_nfs_fhandle_type != FHT_UNKNOWN && real_length<tvb_length_remaining(tvb, offset))
real_length=tvb_length_remaining(tvb, offset);
- }
+
fh_tvb=tvb_new_subset(tvb, offset, real_length, fhlen);
- if(!dissector_try_uint(nfs_fhandle_table, default_nfs_fhandle_type, fh_tvb, pinfo, tree)){
+ if(!dissector_try_uint(nfs_fhandle_table, default_nfs_fhandle_type, fh_tvb, pinfo, tree))
dissect_fhandle_data_unknown(fh_tvb, pinfo, tree);
- }
}
}
+
void
dissect_fhandle_hidden(packet_info *pinfo, proto_tree *tree, int frame)
{
@@ -2470,217 +2397,218 @@ dissect_fhandle_hidden(packet_info *pinfo, proto_tree *tree, int frame)
/* NFS Version 2, RFC 1094 */
/***************************/
-
-/* RFC 1094, Page 12..14 */
-static const value_string names_nfs_stat[] =
+/* NFSv2 RFC 1094, Page 12..14 */
+static const value_string names_nfs2_stat[] =
{
{ 0, "NFS_OK" },
- { 1, "NFSERR_PERM" },
- { 2, "NFSERR_NOENT" },
- { 5, "NFSERR_IO" },
- { 6, "NFSERR_NXIO" },
- { 11, "NFSERR_EAGAIN" },
- { 13, "NFSERR_ACCES" },
- { 17, "NFSERR_EXIST" },
- { 18, "NFSERR_XDEV" }, /* not in spec, but can happen */
- { 19, "NFSERR_NODEV" },
- { 20, "NFSERR_NOTDIR" },
- { 21, "NFSERR_ISDIR" },
- { 22, "NFSERR_INVAL" }, /* not in spec, but I think it can happen */
- { 26, "NFSERR_TXTBSY" }, /* not in spec, but I think it can happen */
- { 27, "NFSERR_FBIG" },
- { 28, "NFSERR_NOSPC" },
- { 30, "NFSERR_ROFS" },
- { 31, "NFSERR_MLINK" }, /* not in spec, but can happen */
- { 45, "NFSERR_OPNOTSUPP" }, /* not in spec, but I think it can happen */
- { 63, "NFSERR_NAMETOOLONG" },
- { 66, "NFSERR_NOTEMPTY" },
- { 69, "NFSERR_DQUOT" },
- { 70, "NFSERR_STALE" },
- { 71, "NFSERR_REMOTE" },
- { 99, "NFSERR_WFLUSH" },
- { 10001, "NFSERR_BADHANDLE" },
- { 10002, "NFSERR_NOT_SYNC" },
- { 10003, "NFSERR_BAD_COOKIE" },
- { 10004, "NFSERR_NOTSUPP" },
- { 10005, "NFSERR_TOOSMALL" },
- { 10006, "NFSERR_SERVERFAULT" },
- { 10007, "NFSERR_BADTYPE" },
- { 10008, "NFSERR_JUKEBOX" },
- { 10009, "NFSERR_SAME" },
- { 10010, "NFSERR_DENIED" },
- { 10011, "NFSERR_EXPIRED" },
- { 10012, "NFSERR_LOCKED" },
- { 10013, "NFSERR_GRACE" },
- { 10014, "NFSERR_FHEXPIRED" },
- { 10015, "NFSERR_SHARE_DENIED" },
- { 10016, "NFSERR_WRONGSEC" },
- { 10017, "NFSERR_CLID_INUSE" },
- { 10018, "NFSERR_RESOURCE" },
- { 10019, "NFSERR_MOVED" },
- { 10020, "NFSERR_NOFILEHANDLE" },
- { 10021, "NFSERR_MINOR_VERS_MISMATCH" },
- { 10022, "NFSERR_STALE_CLIENTID" },
- { 10023, "NFSERR_STALE_STATEID" },
- { 10024, "NFSERR_OLD_STATEID" },
- { 10025, "NFSERR_BAD_STATEID" },
- { 10026, "NFSERR_BAD_SEQID" },
- { 10027, "NFSERR_NOT_SAME" },
- { 10028, "NFSERR_LOCK_RANGE" },
- { 10029, "NFSERR_SYMLINK" },
- { 10030, "NFSERR_RESTOREFH" },
- { 10031, "NFSERR_LEASE_MOVED" },
- { 10032, "NFSERR_ATTRNOTSUPP" },
- { 10033, "NFSERR_NO_GRACE" },
- { 10034, "NFSERR_RECLAIM_BAD" },
- { 10035, "NFSERR_RECLAIM_CONFLICT" },
- { 10036, "NFSERR_BAD_XDR" },
- { 10037, "NFSERR_LOCKS_HELD" },
- { 10038, "NFSERR_OPENMODE" },
- { 10039, "NFSERR_BADOWNER" },
- { 10040, "NFSERR_BADCHAR" },
- { 10041, "NFSERR_BADNAME" },
- { 10042, "NFSERR_BAD_RANGE" },
- { 10043, "NFSERR_LOCK_NOTSUPP" },
- { 10044, "NFSERR_OP_ILLEGAL" },
- { 10045, "NFSERR_DEADLOCK" },
- { 10046, "NFSERR_FILE_OPEN" },
- { 10047, "NFSERR_ADMIN_REVOKED" },
- { 10048, "NFSERR_CB_PATH_DOWN" },
- { 10049, "NFSERR_REPLAY_ME" },
+ { 1, "NFS2ERR_PERM" },
+ { 2, "NFS2ERR_NOENT" },
+ { 5, "NFS2ERR_IO" },
+ { 6, "NFS2ERR_NXIO" },
+ { 11, "NFS2ERR_EAGAIN" },
+ { 13, "NFS2ERR_ACCES" },
+ { 17, "NFS2ERR_EXIST" },
+ { 18, "NFS2ERR_XDEV" }, /* not in spec, but can happen */
+ { 19, "NFS2ERR_NODEV" },
+ { 20, "NFS2ERR_NOTDIR" },
+ { 21, "NFS2ERR_ISDIR" },
+ { 22, "NFS2ERR_INVAL" }, /* not in spec, but I think it can happen */
+ { 26, "NFS2ERR_TXTBSY" }, /* not in spec, but I think it can happen */
+ { 27, "NFS2ERR_FBIG" },
+ { 28, "NFS2ERR_NOSPC" },
+ { 30, "NFS2ERR_ROFS" },
+ { 31, "NFS2ERR_MLINK" }, /* not in spec, but can happen */
+ { 45, "NFS2ERR_OPNOTSUPP" }, /* not in spec, but I think it can happen */
+ { 63, "NFS2ERR_NAMETOOLONG" },
+ { 66, "NFS2ERR_NOTEMPTY" },
+ { 69, "NFS2ERR_DQUOT" },
+ { 70, "NFS2ERR_STALE" },
+ { 71, "NFS2ERR_REMOTE" },
+ { 99, "NFS2ERR_WFLUSH" },
+ { 10001, "NFS2ERR_BADHANDLE" },
+ { 10002, "NFS2ERR_NOT_SYNC" },
+ { 10003, "NFS2ERR_BAD_COOKIE" },
+ { 10004, "NFS2ERR_NOTSUPP" },
+ { 10005, "NFS2ERR_TOOSMALL" },
+ { 10006, "NFS2ERR_SERVERFAULT" },
+ { 10007, "NFS2ERR_BADTYPE" },
+ { 10008, "NFS2ERR_JUKEBOX" },
+ { 10009, "NFS2ERR_SAME" },
+ { 10010, "NFS2ERR_DENIED" },
+ { 10011, "NFS2ERR_EXPIRED" },
+ { 10012, "NFS2ERR_LOCKED" },
+ { 10013, "NFS2ERR_GRACE" },
+ { 10014, "NFS2ERR_FHEXPIRED" },
+ { 10015, "NFS2ERR_SHARE_DENIED" },
+ { 10016, "NFS2ERR_WRONGSEC" },
+ { 10017, "NFS2ERR_CLID_INUSE" },
+ { 10018, "NFS2ERR_RESOURCE" },
+ { 10019, "NFS2ERR_MOVED" },
+ { 10020, "NFS2ERR_NOFILEHANDLE" },
+ { 10021, "NFS2ERR_MINOR_VERS_MISMATCH" },
+ { 10022, "NFS2ERR_STALE_CLIENTID" },
+ { 10023, "NFS2ERR_STALE_STATEID" },
+ { 10024, "NFS2ERR_OLD_STATEID" },
+ { 10025, "NFS2ERR_BAD_STATEID" },
+ { 10026, "NFS2ERR_BAD_SEQID" },
+ { 10027, "NFS2ERR_NOT_SAME" },
+ { 10028, "NFS2ERR_LOCK_RANGE" },
+ { 10029, "NFS2ERR_SYMLINK" },
+ { 10030, "NFS2ERR_RESTOREFH" },
+ { 10031, "NFS2ERR_LEASE_MOVED" },
+ { 10032, "NFS2ERR_ATTRNOTSUPP" },
+ { 10033, "NFS2ERR_NO_GRACE" },
+ { 10034, "NFS2ERR_RECLAIM_BAD" },
+ { 10035, "NFS2ERR_RECLAIM_CONFLICT" },
+ { 10036, "NFS2ERR_BAD_XDR" },
+ { 10037, "NFS2ERR_LOCKS_HELD" },
+ { 10038, "NFS2ERR_OPENMODE" },
+ { 10039, "NFS2ERR_BADOWNER" },
+ { 10040, "NFS2ERR_BADCHAR" },
+ { 10041, "NFS2ERR_BADNAME" },
+ { 10042, "NFS2ERR_BAD_RANGE" },
+ { 10043, "NFS2ERR_LOCK_NOTSUPP" },
+ { 10044, "NFS2ERR_OP_ILLEGAL" },
+ { 10045, "NFS2ERR_DEADLOCK" },
+ { 10046, "NFS2ERR_FILE_OPEN" },
+ { 10047, "NFS2ERR_ADMIN_REVOKED" },
+ { 10048, "NFS2ERR_CB_PATH_DOWN" },
+ { 10049, "NFS2ERR_REPLAY_ME" },
{ 0, NULL }
};
-static value_string_ext names_nfs_stat_ext = VALUE_STRING_EXT_INIT(names_nfs_stat);
+static value_string_ext names_nfs2_stat_ext = VALUE_STRING_EXT_INIT(names_nfs2_stat);
-/* RFC 1094, Page 12..14 */
+/* NFSv2 RFC 1094, Page 12..14 */
static int
-dissect_stat(tvbuff_t *tvb, int offset, proto_tree *tree,
- guint32 *status)
+dissect_nfs2_status(tvbuff_t *tvb, int offset, proto_tree *tree, guint32 *status)
{
guint32 stat;
- proto_item *stat_item;
+ proto_item *stat_item = NULL;
stat = tvb_get_ntohl(tvb, offset+0);
if (tree) {
- proto_tree_add_uint(tree, hf_nfs_stat, tvb, offset+0, 4,
- stat);
- stat_item = proto_tree_add_uint(tree, hf_nfs_nfsstat, tvb,
- offset+0, 4, stat);
+ proto_tree_add_uint(tree, hf_nfs2_status, tvb, offset+0, 4, stat);
+ stat_item = proto_tree_add_uint(tree, hf_nfs_status, tvb, offset+0, 4, stat);
PROTO_ITEM_SET_HIDDEN(stat_item);
}
offset += 4;
- if (status) *status = stat;
+ if (status)
+ *status = stat;
return offset;
}
-/* RFC 1094, Page 12..14 */
+/* NFSv2 RFC 1094, Page 12..14 */
static int
dissect_nfs2_rmdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree* tree)
{
guint32 status;
const char *err;
- offset = dissect_stat(tvb, offset, tree, &status);
+ offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
case 0:
proto_item_append_text(tree, ", RMDIR Reply");
break;
default:
- err=val_to_str_ext(status, &names_nfs_stat_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", RMDIR Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs2_stat_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", RMDIR Reply Error: %s", err);
}
return offset;
}
+
static int
dissect_nfs2_symlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree* tree)
{
guint32 status;
const char *err;
- offset = dissect_stat(tvb, offset, tree, &status);
+ offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
case 0:
proto_item_append_text(tree, ", SYMLINK Reply");
break;
default:
- err=val_to_str_ext(status, &names_nfs_stat_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", SYMLINK Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs2_stat_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", SYMLINK Reply Error: %s", err);
}
return offset;
}
+
static int
dissect_nfs2_link_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree* tree)
{
guint32 status;
const char *err;
- offset = dissect_stat(tvb, offset, tree, &status);
+ offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
case 0:
proto_item_append_text(tree, ", LINK Reply");
break;
default:
- err=val_to_str_ext(status, &names_nfs_stat_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", LINK Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs2_stat_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", LINK Reply Error: %s", err);
}
return offset;
}
+
static int
dissect_nfs2_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree* tree)
{
guint32 status;
const char *err;
- offset = dissect_stat(tvb, offset, tree, &status);
+ offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
case 0:
proto_item_append_text(tree, ", RENAME Reply");
break;
default:
- err=val_to_str_ext(status, &names_nfs_stat_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", RENAME Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs2_stat_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", RENAME Reply Error: %s", err);
}
return offset;
}
+
static int
dissect_nfs2_remove_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree* tree)
{
guint32 status;
const char *err;
- offset = dissect_stat(tvb, offset, tree, &status);
+ offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
case 0:
proto_item_append_text(tree, ", REMOVE Reply");
break;
default:
- err=val_to_str_ext(status, &names_nfs_stat_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", REMOVE Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs2_stat_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", REMOVE Reply Error: %s", err);
}
return offset;
}
-/* RFC 1094, Page 15 */
+/* NFSv2 RFC 1094, Page 15 */
static const value_string nfs2_ftype[] =
{
{ 0, "Non-File" },
@@ -2694,7 +2622,7 @@ static const value_string nfs2_ftype[] =
static value_string_ext nfs2_ftype_ext = VALUE_STRING_EXT_INIT(nfs2_ftype);
static int
-dissect_ftype(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
+dissect_nfs2_ftype(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
guint32 ftype;
const char* ftype_name_p = NULL;
@@ -2713,12 +2641,12 @@ dissect_ftype(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1094, Page 15 */
+/* NFSv2 RFC 1094, Page 15 */
int
dissect_fhandle(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
const char *name, guint32 *hash)
{
- proto_item* fitem;
+ proto_item* fitem = NULL;
proto_tree* ftree = NULL;
if (tree) {
@@ -2759,7 +2687,8 @@ dissect_fhandle(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
return offset;
}
-/* RFC 1094, Page 15 */
+
+/* NFSv2 RFC 1094, Page 15 */
static int
dissect_nfs2_statfs_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
@@ -2767,12 +2696,13 @@ dissect_nfs2_statfs_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
offset = dissect_fhandle(tvb, offset, pinfo, tree, "object", &hash);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", STATFS Call FH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", STATFS Call FH: 0x%08x", hash);
return offset;
}
+
static int
dissect_nfs2_readlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
@@ -2780,12 +2710,13 @@ dissect_nfs2_readlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_
offset = dissect_fhandle(tvb, offset, pinfo, tree, "object", &hash);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", READLINK Call FH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", READLINK Call FH: 0x%08x", hash);
return offset;
}
+
static int
dissect_nfs2_getattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
@@ -2793,23 +2724,24 @@ dissect_nfs2_getattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t
offset = dissect_fhandle(tvb, offset, pinfo, tree, "object", &hash);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", GETATTR Call FH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", GETATTR Call FH: 0x%08x", hash);
return offset;
}
-/* RFC 1094, Page 15 */
+/* NFSv2 RFC 1094, Page 15 */
static int
-dissect_timeval(tvbuff_t *tvb, int offset, proto_tree *tree, int hf_time, int hf_time_sec, int hf_time_usec)
+dissect_timeval(tvbuff_t *tvb, int offset, proto_tree *tree, int hf_time, int hf_time_sec,
+ int hf_time_usec)
{
guint32 seconds;
guint32 useconds;
nstime_t ts;
- proto_item* time_item;
- proto_tree* time_tree;
+ proto_item* time_item = NULL;
+ proto_tree* time_tree = NULL;
seconds = tvb_get_ntohl(tvb, offset+0);
useconds = tvb_get_ntohl(tvb, offset+4);
@@ -2831,8 +2763,7 @@ dissect_timeval(tvbuff_t *tvb, int offset, proto_tree *tree, int hf_time, int hf
return offset;
}
-
-/* RFC 1094, Page 16 */
+/* NFSv2 RFC 1094, Page 16 */
static const value_string nfs2_mode_names[] = {
{ 0040000, "Directory" },
{ 0020000, "Character Special Device" },
@@ -2844,32 +2775,31 @@ static const value_string nfs2_mode_names[] = {
};
static int
-dissect_mode(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
+dissect_nfs2_mode(tvbuff_t *tvb, int offset, proto_tree *tree, const char* label)
{
guint32 mode;
- proto_item* mode_item;
- proto_tree* mode_tree;
+ proto_item* mode_item = NULL;
+ proto_tree* mode_tree = NULL;
mode = tvb_get_ntohl(tvb, offset+0);
if (tree) {
- mode_item = proto_tree_add_text(tree, tvb, offset, 4,
- "%s: 0%o", name, mode);
-
- mode_tree = proto_item_add_subtree(mode_item, ett_nfs_mode);
- proto_tree_add_item(mode_tree, hf_nfs_mode_name, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(mode_tree, hf_nfs_mode_set_user_id, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(mode_tree, hf_nfs_mode_set_group_id, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(mode_tree, hf_nfs_mode_save_swap_text, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(mode_tree, hf_nfs_mode_read_owner, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(mode_tree, hf_nfs_mode_write_owner, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(mode_tree, hf_nfs_mode_exec_owner, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(mode_tree, hf_nfs_mode_read_group, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(mode_tree, hf_nfs_mode_write_group, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(mode_tree, hf_nfs_mode_exec_group, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(mode_tree, hf_nfs_mode_read_other, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(mode_tree, hf_nfs_mode_write_other, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(mode_tree, hf_nfs_mode_exec_other, tvb, offset, 4, ENC_BIG_ENDIAN);
+ mode_item = proto_tree_add_text(tree, tvb, offset, 4, "%s: 0%o", label, mode);
+ mode_tree = proto_item_add_subtree(mode_item, ett_nfs2_mode);
+
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_name, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_set_user_id, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_set_group_id, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_save_swap_text, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_read_owner, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_write_owner, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_exec_owner, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_read_group, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_write_group, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_exec_group, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_read_other, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_write_other, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mode_tree, hf_nfs2_mode_exec_other, tvb, offset, 4, ENC_BIG_ENDIAN);
}
offset += 4;
@@ -2877,9 +2807,9 @@ dissect_mode(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1094, Page 15 */
+/* NFSv2 RFC 1094, Page 15 */
int
-dissect_fattr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
+dissect_nfs2_fattr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
proto_item* fattr_item = NULL;
proto_tree* fattr_tree = NULL;
@@ -2891,21 +2821,24 @@ dissect_fattr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
fattr_tree = proto_item_add_subtree(fattr_item, ett_nfs_fattr);
}
- offset = dissect_ftype(tvb, offset, fattr_tree, "type");
- offset = dissect_mode(tvb, offset, fattr_tree, "mode");
- offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs_fattr_nlink, offset);
- offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs_fattr_uid, offset);
- offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs_fattr_gid, offset);
- offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs_fattr_size, offset);
- offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs_fattr_blocksize, offset);
- offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs_fattr_rdev, offset);
- offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs_fattr_blocks, offset);
- offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs_fattr_fsid, offset);
- offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs_fattr_fileid, offset);
-
- offset = dissect_timeval(tvb, offset, fattr_tree, hf_nfs_atime, hf_nfs_atime_sec, hf_nfs_atime_usec);
- offset = dissect_timeval(tvb, offset, fattr_tree, hf_nfs_mtime, hf_nfs_mtime_sec, hf_nfs_mtime_usec);
- offset = dissect_timeval(tvb, offset, fattr_tree, hf_nfs_ctime, hf_nfs_ctime_sec, hf_nfs_ctime_usec);
+ offset = dissect_nfs2_ftype(tvb, offset, fattr_tree, "type");
+ offset = dissect_nfs2_mode(tvb, offset, fattr_tree, "mode");
+ offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs2_fattr_nlink, offset);
+ offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs2_fattr_uid, offset);
+ offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs2_fattr_gid, offset);
+ offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs2_fattr_size, offset);
+ offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs2_fattr_blocksize, offset);
+ offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs2_fattr_rdev, offset);
+ offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs2_fattr_blocks, offset);
+ offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs2_fattr_fsid, offset);
+ offset = dissect_rpc_uint32(tvb, fattr_tree, hf_nfs2_fattr_fileid, offset);
+
+ offset = dissect_timeval(tvb, offset, fattr_tree,
+ hf_nfs_atime, hf_nfs_atime_sec, hf_nfs_atime_usec);
+ offset = dissect_timeval(tvb, offset, fattr_tree,
+ hf_nfs_mtime, hf_nfs_mtime_sec, hf_nfs_mtime_usec);
+ offset = dissect_timeval(tvb, offset, fattr_tree,
+ hf_nfs_ctime, hf_nfs_ctime_sec, hf_nfs_ctime_usec);
/* now we know, that fattr is shorter */
if (fattr_item) {
@@ -2916,9 +2849,9 @@ dissect_fattr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1094, Page 17 */
+/* NFSv2 RFC 1094, Page 17 */
static int
-dissect_sattr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
+dissect_nfs2_sattr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
proto_item* sattr_item = NULL;
proto_tree* sattr_tree = NULL;
@@ -2927,18 +2860,18 @@ dissect_sattr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
if (tree) {
sattr_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s", name);
- sattr_tree = proto_item_add_subtree(sattr_item, ett_nfs_sattr);
+ sattr_tree = proto_item_add_subtree(sattr_item, ett_nfs2_sattr);
}
if (tvb_get_ntohl(tvb, offset+0) != 0xffffffff)
- offset = dissect_mode(tvb, offset, sattr_tree, "mode");
+ offset = dissect_nfs2_mode(tvb, offset, sattr_tree, "mode");
else {
proto_tree_add_text(sattr_tree, tvb, offset, 4, "mode: no value");
offset += 4;
}
if (tvb_get_ntohl(tvb, offset+0) != 0xffffffff)
- offset = dissect_rpc_uint32(tvb, sattr_tree, hf_nfs_fattr_uid,
+ offset = dissect_rpc_uint32(tvb, sattr_tree, hf_nfs2_fattr_uid,
offset);
else {
proto_tree_add_text(sattr_tree, tvb, offset, 4, "uid: no value");
@@ -2946,7 +2879,7 @@ dissect_sattr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
if (tvb_get_ntohl(tvb, offset+0) != 0xffffffff)
- offset = dissect_rpc_uint32(tvb, sattr_tree, hf_nfs_fattr_gid,
+ offset = dissect_rpc_uint32(tvb, sattr_tree, hf_nfs2_fattr_gid,
offset);
else {
proto_tree_add_text(sattr_tree, tvb, offset, 4, "gid: no value");
@@ -2954,7 +2887,7 @@ dissect_sattr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
if (tvb_get_ntohl(tvb, offset+0) != 0xffffffff)
- offset = dissect_rpc_uint32(tvb, sattr_tree, hf_nfs_fattr_size,
+ offset = dissect_rpc_uint32(tvb, sattr_tree, hf_nfs2_fattr_size,
offset);
else {
proto_tree_add_text(sattr_tree, tvb, offset, 4, "size: no value");
@@ -2962,14 +2895,16 @@ dissect_sattr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
if (tvb_get_ntohl(tvb, offset+0) != 0xffffffff) {
- offset = dissect_timeval(tvb, offset, sattr_tree, hf_nfs_atime, hf_nfs_atime_sec, hf_nfs_atime_usec);
+ offset = dissect_timeval(tvb, offset, sattr_tree,
+ hf_nfs_atime, hf_nfs_atime_sec, hf_nfs_atime_usec);
} else {
proto_tree_add_text(sattr_tree, tvb, offset, 8, "atime: no value");
offset += 8;
}
if (tvb_get_ntohl(tvb, offset+0) != 0xffffffff) {
- offset = dissect_timeval(tvb, offset, sattr_tree, hf_nfs_mtime, hf_nfs_mtime_sec, hf_nfs_mtime_usec);
+ offset = dissect_timeval(tvb, offset, sattr_tree,
+ hf_nfs_mtime, hf_nfs_mtime_sec, hf_nfs_mtime_usec);
} else {
proto_tree_add_text(sattr_tree, tvb, offset, 8, "mtime: no value");
offset += 8;
@@ -2984,7 +2919,7 @@ dissect_sattr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1094, Page 17 */
+/* NFSv2 RFC 1094, Page 17 */
static int
dissect_filename(tvbuff_t *tvb, int offset, proto_tree *tree, int hf, const char **string_ret)
{
@@ -2993,7 +2928,7 @@ dissect_filename(tvbuff_t *tvb, int offset, proto_tree *tree, int hf, const char
}
-/* RFC 1094, Page 17 */
+/* NFSv2 RFC 1094, Page 17 */
static int
dissect_path(tvbuff_t *tvb, int offset, proto_tree *tree, int hf, const char **name)
{
@@ -3002,23 +2937,23 @@ dissect_path(tvbuff_t *tvb, int offset, proto_tree *tree, int hf, const char **n
}
-/* RFC 1094, Page 17,18 */
+/* NFSv2 RFC 1094, Page 17,18 */
static int
dissect_attrstat(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo, const char *funcname)
{
guint32 status;
const char *err;
- offset = dissect_stat(tvb, offset, tree, &status);
+ offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_fattr(tvb, offset, tree, "attributes");
+ offset = dissect_nfs2_fattr(tvb, offset, tree, "attributes");
proto_item_append_text(tree, ", %s Reply", funcname);
break;
default:
- err=val_to_str_ext(status, &names_nfs_stat_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", %s Reply Error:%s", funcname, err);
+ err = val_to_str_ext(status, &names_nfs2_stat_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", %s Reply Error: %s", funcname, err);
break;
}
@@ -3026,7 +2961,7 @@ dissect_attrstat(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo
}
-/* RFC 1094, Page 17,18 */
+/* NFSv2 RFC 1094, Page 17,18 */
static int
dissect_nfs2_write_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree* tree)
{
@@ -3035,6 +2970,8 @@ dissect_nfs2_write_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, prot
return offset;
}
+
+/* NFSv2 RFC 1094, Page 18 */
static int
dissect_nfs2_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree* tree)
{
@@ -3043,6 +2980,8 @@ dissect_nfs2_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, pr
return offset;
}
+
+/* NFSv2 RFC 1094, Page 18 */
static int
dissect_nfs2_getattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree* tree)
{
@@ -3052,9 +2991,10 @@ dissect_nfs2_getattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, pr
}
-/* RFC 1094, Page 18 */
+/* NFSv2 RFC 1094, Page 18 */
static int
-dissect_diropargs(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, const char* label, guint32 *hash, const char **name)
+dissect_diropargs(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+ const char* label, guint32 *hash, const char **name)
{
proto_item* diropargs_item = NULL;
proto_tree* diropargs_tree = NULL;
@@ -3063,7 +3003,7 @@ dissect_diropargs(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
if (tree) {
diropargs_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s", label);
- diropargs_tree = proto_item_add_subtree(diropargs_item, ett_nfs_diropargs);
+ diropargs_tree = proto_item_add_subtree(diropargs_item, ett_nfs2_diropargs);
}
/* are we snooping fh to filenames ?*/
@@ -3094,7 +3034,7 @@ dissect_diropargs(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
}
-/* RFC 1094, Page 18 */
+/* NFSv2 RFC 1094, Page 18 */
static int
dissect_nfs2_rmdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
@@ -3103,12 +3043,14 @@ dissect_nfs2_rmdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tre
offset = dissect_diropargs(tvb, offset, pinfo, tree, "where", &hash, &name);
- col_append_fstr(pinfo->cinfo, COL_INFO,", DH:0x%08x/%s", hash, name);
- proto_item_append_text(tree, ", RMDIR Call DH:0x%08x/%s", hash, name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", DH: 0x%08x/%s", hash, name);
+ proto_item_append_text(tree, ", RMDIR Call DH: 0x%08x/%s", hash, name);
return offset;
}
+
+/* NFSv2 RFC 1094, Page 18 */
static int
dissect_nfs2_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
@@ -3117,12 +3059,14 @@ dissect_nfs2_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
offset = dissect_diropargs(tvb, offset, pinfo, tree, "where", &hash, &name);
- col_append_fstr(pinfo->cinfo, COL_INFO,", DH:0x%08x/%s", hash, name);
- proto_item_append_text(tree, ", REMOVE Call DH:0x%08x/%s", hash, name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", DH: 0x%08x/%s", hash, name);
+ proto_item_append_text(tree, ", REMOVE Call DH: 0x%08x/%s", hash, name);
return offset;
}
+
+/* NFSv2 RFC 1094, Page 18 */
static int
dissect_nfs2_lookup_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
@@ -3131,14 +3075,14 @@ dissect_nfs2_lookup_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
offset = dissect_diropargs(tvb, offset, pinfo, tree, "where", &hash, &name);
- col_append_fstr(pinfo->cinfo, COL_INFO,", DH:0x%08x/%s", hash, name);
- proto_item_append_text(tree, ", LOOKUP Call DH:0x%08x/%s", hash, name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", DH: 0x%08x/%s", hash, name);
+ proto_item_append_text(tree, ", LOOKUP Call DH: 0x%08x/%s", hash, name);
return offset;
}
-/* RFC 1094, Page 18 */
+/* NFSv2 RFC 1094, Page 18 */
static int
dissect_diropres(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, const char *funcname)
@@ -3147,18 +3091,18 @@ dissect_diropres(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 hash;
const char *err;
- offset = dissect_stat(tvb, offset, tree, &status);
+ offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
case 0:
offset = dissect_fhandle(tvb, offset, pinfo, tree, "file", &hash);
- offset = dissect_fattr (tvb, offset, tree, "attributes");
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", %s Reply FH:0x%08x", funcname, hash);
+ offset = dissect_nfs2_fattr (tvb, offset, tree, "attributes");
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", %s Reply FH: 0x%08x", funcname, hash);
break;
default:
- err=val_to_str_ext(status, &names_nfs_stat_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", %s Reply Error:%s", funcname, err);
+ err = val_to_str_ext(status, &names_nfs2_stat_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", %s Reply Error: %s", funcname, err);
break;
}
@@ -3175,7 +3119,7 @@ dissect_nfsdata(tvbuff_t *tvb, int offset, proto_tree *tree, int hf)
}
-/* RFC 1094, Page 18 */
+/* NFSv2 RFC 1094, Page 18 */
static int
dissect_nfs2_mkdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -3184,6 +3128,7 @@ dissect_nfs2_mkdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
return offset;
}
+
static int
dissect_nfs2_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -3192,6 +3137,7 @@ dissect_nfs2_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
return offset;
}
+
static int
dissect_nfs2_lookup_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -3209,15 +3155,15 @@ dissect_nfs2_setattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 hash;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "file", &hash);
- offset = dissect_sattr (tvb, offset, tree, "attributes");
+ offset = dissect_nfs2_sattr (tvb, offset, tree, "attributes");
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", SETATTR Call FH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", SETATTR Call FH: 0x%08x", hash);
return offset;
}
-/* RFC 1094, Page 6 */
+/* NFSv2 RFC 1094, Page 6 */
static int
dissect_nfs2_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
@@ -3226,17 +3172,17 @@ dissect_nfs2_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
const char *err;
const char *name=NULL;
- offset = dissect_stat(tvb, offset, tree, &status);
+ offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_path(tvb, offset, tree, hf_nfs_readlink_data, &name);
- col_append_fstr(pinfo->cinfo, COL_INFO," Path:%s", name);
- proto_item_append_text(tree, ", READLINK Reply Path:%s", name);
+ offset = dissect_path(tvb, offset, tree, hf_nfs2_readlink_data, &name);
+ col_append_fstr(pinfo->cinfo, COL_INFO," Path: %s", name);
+ proto_item_append_text(tree, ", READLINK Reply Path: %s", name);
break;
default:
- err=val_to_str_ext(status, &names_nfs_stat_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", READLINK Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs2_stat_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", READLINK Reply Error: %s", err);
break;
}
@@ -3244,7 +3190,7 @@ dissect_nfs2_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1094, Page 7 */
+/* NFSv2 RFC 1094, Page 7 */
static int
dissect_nfs2_read_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
@@ -3259,23 +3205,25 @@ dissect_nfs2_read_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
count = tvb_get_ntohl(tvb, offset+4);
totalcount = tvb_get_ntohl(tvb, offset+8);
if (tree) {
- proto_tree_add_uint(tree, hf_nfs_read_offset, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_read_offset, tvb,
offset+0, 4, offset_value);
- proto_tree_add_uint(tree, hf_nfs_read_count, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_read_count, tvb,
offset+4, 4, count);
- proto_tree_add_uint(tree, hf_nfs_read_totalcount, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_read_totalcount, tvb,
offset+8, 4, totalcount);
}
offset += 12;
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x Offset:%d Count:%d TotalCount:%d", hash, offset_value, count, totalcount);
- proto_item_append_text(tree, ", READ Call FH:0x%08x Offset:%d Count:%d TotalCount:%d", hash, offset_value, count, totalcount);
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", FH: 0x%08x Offset: %d Count: %d TotalCount: %d",
+ hash, offset_value, count, totalcount);
+ proto_item_append_text(tree, ", READ Call FH: 0x%08x Offset: %d Count: %d TotalCount: %d",
+ hash, offset_value, count, totalcount);
return offset;
}
-/* RFC 1094, Page 7 */
+/* NFSv2 RFC 1094, Page 7 */
static int
dissect_nfs2_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -3283,17 +3231,17 @@ dissect_nfs2_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 status;
const char *err;
- offset = dissect_stat(tvb, offset, tree, &status);
+ offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_fattr(tvb, offset, tree, "attributes");
+ offset = dissect_nfs2_fattr(tvb, offset, tree, "attributes");
proto_item_append_text(tree, ", READ Reply");
offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_data);
break;
default:
- err=val_to_str_ext(status, &names_nfs_stat_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", READ Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs2_stat_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", READ Reply Error: %s", err);
break;
}
@@ -3301,7 +3249,7 @@ dissect_nfs2_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1094, Page 8 */
+/* NFSv2 RFC 1094, Page 8 */
static int
dissect_nfs2_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
@@ -3316,17 +3264,19 @@ dissect_nfs2_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset_value = tvb_get_ntohl(tvb, offset+4);
totalcount = tvb_get_ntohl(tvb, offset+8);
if (tree) {
- proto_tree_add_uint(tree, hf_nfs_write_beginoffset, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_write_beginoffset, tvb,
offset+0, 4, beginoffset);
- proto_tree_add_uint(tree, hf_nfs_write_offset, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_write_offset, tvb,
offset+4, 4, offset_value);
- proto_tree_add_uint(tree, hf_nfs_write_totalcount, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_write_totalcount, tvb,
offset+8, 4, totalcount);
}
offset += 12;
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x BeginOffset:%d Offset:%d TotalCount:%d", hash, beginoffset, offset_value, totalcount);
- proto_item_append_text(tree, ", WRITE Call FH:0x%08x BeginOffset:%d Offset:%d TotalCount:%d", hash, beginoffset, offset_value, totalcount);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x BeginOffset: %d Offset: %d TotalCount: %d",
+ hash, beginoffset, offset_value, totalcount);
+ proto_item_append_text(tree, ", WRITE Call FH: 0x%08x BeginOffset: %d Offset: %d TotalCount: %d",
+ hash, beginoffset, offset_value, totalcount);
offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_data);
@@ -3334,7 +3284,7 @@ dissect_nfs2_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
-/* RFC 1094, Page 8 */
+/* NFSv2 RFC 1094, Page 8 */
static int
dissect_nfs2_mkdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
@@ -3343,10 +3293,10 @@ dissect_nfs2_mkdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
const char *name=NULL;
offset = dissect_diropargs(tvb, offset, pinfo, tree, "where", &hash, &name);
- offset = dissect_sattr (tvb, offset, tree, "attributes");
+ offset = dissect_nfs2_sattr (tvb, offset, tree, "attributes");
- col_append_fstr(pinfo->cinfo, COL_INFO,", DH:0x%08x/%s", hash, name);
- proto_item_append_text(tree, ", MKDIR Call DH:0x%08x/%s", hash, name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", DH: 0x%08x/%s", hash, name);
+ proto_item_append_text(tree, ", MKDIR Call DH: 0x%08x/%s", hash, name);
return offset;
}
@@ -3359,16 +3309,16 @@ dissect_nfs2_create_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
const char *name=NULL;
offset = dissect_diropargs(tvb, offset, pinfo, tree, "where", &hash, &name);
- offset = dissect_sattr (tvb, offset, tree, "attributes");
+ offset = dissect_nfs2_sattr (tvb, offset, tree, "attributes");
- col_append_fstr(pinfo->cinfo, COL_INFO,", DH:0x%08x/%s", hash, name);
- proto_item_append_text(tree, ", CREATE Call DH:0x%08x/%s", hash, name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", DH: 0x%08x/%s", hash, name);
+ proto_item_append_text(tree, ", CREATE Call DH: 0x%08x/%s", hash, name);
return offset;
}
-/* RFC 1094, Page 9 */
+/* NFSv2 RFC 1094, Page 9 */
static int
dissect_nfs2_rename_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
@@ -3381,14 +3331,16 @@ dissect_nfs2_rename_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_diropargs(tvb, offset, pinfo, tree, "from", &from_hash, &from_name);
offset = dissect_diropargs(tvb, offset, pinfo, tree, "to", &to_hash, &to_name);
- col_append_fstr(pinfo->cinfo, COL_INFO,", From DH:0x%08x/%s To DH:0x%08x/%s", from_hash, from_name, to_hash, to_name);
- proto_item_append_text(tree, ", RENAME Call From DH:0x%08x/%s To DH:0x%08x/%s", from_hash, from_name, to_hash, to_name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", From DH: 0x%08x/%s To DH: 0x%08x/%s",
+ from_hash, from_name, to_hash, to_name);
+ proto_item_append_text(tree, ", RENAME Call From DH: 0x%08x/%s To DH: 0x%08x/%s",
+ from_hash, from_name, to_hash, to_name);
return offset;
}
-/* RFC 1094, Page 9 */
+/* NFSv2 RFC 1094, Page 9 */
static int
dissect_nfs2_link_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
@@ -3400,14 +3352,16 @@ dissect_nfs2_link_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_fhandle(tvb, offset, pinfo, tree, "from", &from_hash);
offset = dissect_diropargs(tvb, offset, pinfo, tree, "to", &to_hash, &to_name);
- col_append_fstr(pinfo->cinfo, COL_INFO,", From DH:0x%08x To DH:0x%08x/%s", from_hash, to_hash, to_name);
- proto_item_append_text(tree, ", LINK Call From DH:0x%08x To DH:0x%08x/%s", from_hash, to_hash, to_name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", From DH: 0x%08x To DH: 0x%08x/%s",
+ from_hash, to_hash, to_name);
+ proto_item_append_text(tree, ", LINK Call From DH: 0x%08x To DH: 0x%08x/%s",
+ from_hash, to_hash, to_name);
return offset;
}
-/* RFC 1094, Page 10 */
+/* NFSv2 RFC 1094, Page 10 */
static int
dissect_nfs2_symlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
@@ -3418,16 +3372,18 @@ dissect_nfs2_symlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_diropargs(tvb, offset, pinfo, tree, "from", &from_hash, &from_name);
offset = dissect_path(tvb, offset, tree, hf_nfs_symlink_to, &to_name);
- offset = dissect_sattr(tvb, offset, tree, "attributes");
+ offset = dissect_nfs2_sattr(tvb, offset, tree, "attributes");
- col_append_fstr(pinfo->cinfo, COL_INFO,", From DH:0x%08x/%s To %s", from_hash, from_name, to_name);
- proto_item_append_text(tree, ", SYMLINK Call From DH:0x%08x/%s To %s", from_hash, from_name, to_name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", From DH: 0x%08x/%s To %s",
+ from_hash, from_name, to_name);
+ proto_item_append_text(tree, ", SYMLINK Call From DH: 0x%08x/%s To %s",
+ from_hash, from_name, to_name);
return offset;
}
-/* RFC 1094, Page 11 */
+/* NFSv2 RFC 1094, Page 11 */
static int
dissect_nfs2_readdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
@@ -3440,21 +3396,21 @@ dissect_nfs2_readdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
cookie = tvb_get_ntohl(tvb, offset+ 0);
count = tvb_get_ntohl(tvb, offset+ 4);
if (tree) {
- proto_tree_add_uint(tree, hf_nfs_readdir_cookie, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_readdir_cookie, tvb,
offset+ 0, 4, cookie);
- proto_tree_add_uint(tree, hf_nfs_readdir_count, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_readdir_count, tvb,
offset+ 4, 4, count);
}
offset += 8;
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", READDIR Call FH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", READDIR Call FH: 0x%08x", hash);
return offset;
}
-/* RFC 1094, Page 11 */
+/* NFSv2 RFC 1094, Page 11 */
static int
dissect_readdir_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -3474,19 +3430,19 @@ dissect_readdir_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
fileid = tvb_get_ntohl(tvb, offset + 0);
if (entry_tree)
- proto_tree_add_uint(entry_tree, hf_nfs_readdir_entry_fileid, tvb,
+ proto_tree_add_uint(entry_tree, hf_nfs2_readdir_entry_fileid, tvb,
offset+0, 4, fileid);
offset += 4;
offset = dissect_filename(tvb, offset, entry_tree,
- hf_nfs_readdir_entry_name, &name);
+ hf_nfs2_readdir_entry_name, &name);
if (entry_item)
proto_item_set_text(entry_item, "Entry: file ID %u, name %s",
fileid, name);
cookie = tvb_get_ntohl(tvb, offset + 0);
if (entry_tree)
- proto_tree_add_uint(entry_tree, hf_nfs_readdir_entry_cookie, tvb,
+ proto_tree_add_uint(entry_tree, hf_nfs2_readdir_entry_cookie, tvb,
offset+0, 4, cookie);
offset += 4;
@@ -3498,7 +3454,8 @@ dissect_readdir_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
return offset;
}
-/* RFC 1094, Page 11 */
+
+/* NFSv2 RFC 1094, Page 11 */
static int
dissect_nfs2_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -3507,7 +3464,7 @@ dissect_nfs2_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 eof_value;
const char *err;
- offset = dissect_stat(tvb, offset, tree, &status);
+ offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
case 0:
proto_item_append_text(tree, ", READDIR Reply");
@@ -3521,9 +3478,9 @@ dissect_nfs2_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset += 4;
break;
default:
- err=val_to_str_ext(status, &names_nfs_stat_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", READDIR Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs2_stat_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", READDIR Reply Error: %s", err);
break;
}
@@ -3531,7 +3488,7 @@ dissect_nfs2_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
-/* RFC 1094, Page 12 */
+/* NFSv2 RFC 1094, Page 12 */
static int
dissect_nfs2_statfs_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -3544,7 +3501,7 @@ dissect_nfs2_statfs_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 bavail;
const char *err;
- offset = dissect_stat(tvb, offset, tree, &status);
+ offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
case 0:
tsize = tvb_get_ntohl(tvb, offset+ 0);
@@ -3553,24 +3510,24 @@ dissect_nfs2_statfs_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
bfree = tvb_get_ntohl(tvb, offset+12);
bavail = tvb_get_ntohl(tvb, offset+16);
if (tree) {
- proto_tree_add_uint(tree, hf_nfs_statfs_tsize, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_statfs_tsize, tvb,
offset+ 0, 4, tsize);
- proto_tree_add_uint(tree, hf_nfs_statfs_bsize, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_statfs_bsize, tvb,
offset+ 4, 4, bsize);
- proto_tree_add_uint(tree, hf_nfs_statfs_blocks, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_statfs_blocks, tvb,
offset+ 8, 4, blocks);
- proto_tree_add_uint(tree, hf_nfs_statfs_bfree, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_statfs_bfree, tvb,
offset+12, 4, bfree);
- proto_tree_add_uint(tree, hf_nfs_statfs_bavail, tvb,
+ proto_tree_add_uint(tree, hf_nfs2_statfs_bavail, tvb,
offset+16, 4, bavail);
}
offset += 20;
proto_item_append_text(tree, ", STATFS Reply");
break;
default:
- err=val_to_str_ext(status, &names_nfs_stat_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", STATFS Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs2_stat_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", STATFS Reply Error: %s", err);
break;
}
@@ -3620,7 +3577,7 @@ static const vsff nfs2_proc[] = {
{ 0, NULL, NULL, NULL }
};
-static const value_string nfsv2_proc_vals[] = {
+static const value_string nfs2_proc_vals[] = {
{ 0, "NULL" },
{ 1, "GETATTR" },
{ 2, "SETATTR" },
@@ -3649,27 +3606,27 @@ static const value_string nfsv2_proc_vals[] = {
/* NFS Version 3, RFC 1813 */
/***************************/
-
-/* RFC 1813, Page 15 */
+/* NFSv3 RFC 1813, Page 15 */
static int
-dissect_filename3(tvbuff_t *tvb, int offset, proto_tree *tree, int hf, const char **string_ret)
+dissect_nfs3_filename(tvbuff_t *tvb, int offset, proto_tree *tree, int hf, const char **string_ret)
{
offset = dissect_rpc_string(tvb, tree, hf, offset, string_ret);
return offset;
}
-/* RFC 1813, Page 15 */
+/* NFSv3 RFC 1813, Page 15 */
static int
-dissect_nfspath3(tvbuff_t *tvb, int offset, proto_tree *tree, int hf, const char **name)
+dissect_nfs3_path(tvbuff_t *tvb, int offset, proto_tree *tree, int hf, const char **name)
{
offset = dissect_rpc_string(tvb, tree, hf, offset, name);
return offset;
}
-/* RFC 1813, Page 15 */
+
+/* NFSv3 RFC 1813, Page 15 */
static int
-dissect_cookieverf3(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs3_cookie_verf(tvbuff_t *tvb, int offset, proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, NFS3_COOKIEVERFSIZE,
"Verifier: Opaque Data");
@@ -3678,9 +3635,9 @@ dissect_cookieverf3(tvbuff_t *tvb, int offset, proto_tree *tree)
}
-/* RFC 1813, Page 16 */
+/* NFSv3 RFC 1813, Page 16 */
static int
-dissect_createverf3(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs3_create_verf(tvbuff_t *tvb, int offset, proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, NFS3_CREATEVERFSIZE,
"Verifier: Opaque Data");
@@ -3689,9 +3646,9 @@ dissect_createverf3(tvbuff_t *tvb, int offset, proto_tree *tree)
}
-/* RFC 1813, Page 16 */
+/* NFSv3 RFC 1813, Page 16 */
static int
-dissect_writeverf3(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs3_write_verf(tvbuff_t *tvb, int offset, proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, NFS3_WRITEVERFSIZE,
"Verifier: Opaque Data");
@@ -3699,23 +3656,24 @@ dissect_writeverf3(tvbuff_t *tvb, int offset, proto_tree *tree)
return offset;
}
+
/* RFC 1813, Page 16 */
static int
-dissect_mode3(tvbuff_t *tvb, int offset, proto_tree *tree, guint32 *mode)
+dissect_nfs3_mode(tvbuff_t *tvb, int offset, proto_tree *tree, guint32 *mode)
{
static const int *mode_bits[] = {
- &hf_nfs_mode3_suid,
- &hf_nfs_mode3_sgid,
- &hf_nfs_mode3_sticky,
- &hf_nfs_mode3_rusr,
- &hf_nfs_mode3_wusr,
- &hf_nfs_mode3_xusr,
- &hf_nfs_mode3_rgrp,
- &hf_nfs_mode3_wgrp,
- &hf_nfs_mode3_xgrp,
- &hf_nfs_mode3_roth,
- &hf_nfs_mode3_woth,
- &hf_nfs_mode3_xoth,
+ &hf_nfs3_mode_suid,
+ &hf_nfs3_mode_sgid,
+ &hf_nfs3_mode_sticky,
+ &hf_nfs3_mode_rusr,
+ &hf_nfs3_mode_wusr,
+ &hf_nfs3_mode_xusr,
+ &hf_nfs3_mode_rgrp,
+ &hf_nfs3_mode_wgrp,
+ &hf_nfs3_mode_xgrp,
+ &hf_nfs3_mode_roth,
+ &hf_nfs3_mode_woth,
+ &hf_nfs3_mode_xoth,
NULL
};
@@ -3724,13 +3682,14 @@ dissect_mode3(tvbuff_t *tvb, int offset, proto_tree *tree, guint32 *mode)
*mode=tvb_get_ntohl(tvb, offset+0);
}
- proto_tree_add_bitmask(tree, tvb, offset, hf_nfs_mode3, ett_nfs_mode3, mode_bits, ENC_BIG_ENDIAN);
+ proto_tree_add_bitmask(tree, tvb, offset, hf_nfs3_mode, ett_nfs3_mode, mode_bits, ENC_BIG_ENDIAN);
offset += 4;
return offset;
}
-/* RFC 1813, Page 16,17 */
+
+/* NFSv3 RFC 1813, Page 16,17 */
static const value_string names_nfs_nfsstat3[] =
{
{ 0, "NFS3_OK" },
@@ -3764,23 +3723,20 @@ static const value_string names_nfs_nfsstat3[] =
{ 10008, "NFS3ERR_JUKEBOX" },
{ 0, NULL }
};
-static value_string_ext names_nfs_nfsstat3_ext = VALUE_STRING_EXT_INIT(names_nfs_nfsstat3);
-
+static value_string_ext names_nfs3_status_ext = VALUE_STRING_EXT_INIT(names_nfs_nfsstat3);
-/* RFC 1813, Page 16 */
+/* NFSv3 RFC 1813, Page 16 */
static int
-dissect_nfsstat3(tvbuff_t *tvb, int offset, proto_tree *tree,guint32 *status)
+dissect_nfs3_status(tvbuff_t *tvb, int offset, proto_tree *tree,guint32 *status)
{
guint32 nfsstat3;
- proto_item *stat_item;
+ proto_item *stat_item = NULL;
nfsstat3 = tvb_get_ntohl(tvb, offset+0);
if (tree) {
- proto_tree_add_uint(tree, hf_nfs_nfsstat3, tvb,
- offset+0, 4, nfsstat3);
- stat_item = proto_tree_add_uint(tree, hf_nfs_nfsstat, tvb,
- offset+0, 4, nfsstat3);
+ proto_tree_add_uint(tree, hf_nfs3_status, tvb, offset+0, 4, nfsstat3);
+ stat_item = proto_tree_add_uint(tree, hf_nfs_status, tvb, offset+0, 4, nfsstat3);
PROTO_ITEM_SET_HIDDEN(stat_item);
}
@@ -3803,8 +3759,7 @@ static const value_string names_nfs_ftype3[] =
};
static value_string_ext names_nfs_ftype3_ext = VALUE_STRING_EXT_INIT(names_nfs_ftype3);
-
-/* RFC 1813, Page 20 */
+/* NFSv3 RFC 1813, Page 20 */
static int
dissect_ftype3(tvbuff_t *tvb, int offset, proto_tree *tree, int hf,
guint32* ftype3)
@@ -3823,15 +3778,15 @@ dissect_ftype3(tvbuff_t *tvb, int offset, proto_tree *tree, int hf,
}
-/* RFC 1813, Page 20 */
+/* NFSv3 RFC 1813, Page 20 */
static int
-dissect_specdata3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
+dissect_nfs3_specdata(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
guint32 specdata1;
guint32 specdata2;
- proto_item* specdata3_item;
- proto_tree* specdata3_tree;
+ proto_item* specdata3_item = NULL;
+ proto_tree* specdata3_tree = NULL;
specdata1 = tvb_get_ntohl(tvb, offset+0);
specdata2 = tvb_get_ntohl(tvb, offset+4);
@@ -3841,7 +3796,7 @@ dissect_specdata3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
"%s: %u,%u", name, specdata1, specdata2);
specdata3_tree = proto_item_add_subtree(specdata3_item,
- ett_nfs_specdata3);
+ ett_nfs3_specdata);
proto_tree_add_text(specdata3_tree, tvb,offset+0,4,
"specdata1: %u", specdata1);
@@ -3854,9 +3809,9 @@ dissect_specdata3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1813, Page 21 */
+/* NFSv3 RFC 1813, Page 21 */
int
-dissect_nfs_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+dissect_nfs3_fh(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
const char *name, guint32 *hash)
{
guint fh3_len;
@@ -3874,7 +3829,7 @@ dissect_nfs_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
fitem = proto_tree_add_text(tree, tvb, offset, 4+fh3_len_full,
"%s", name);
- ftree = proto_item_add_subtree(fitem, ett_nfs_fh3);
+ ftree = proto_item_add_subtree(fitem, ett_nfs3_fh);
}
/* are we snooping fh to filenames ?*/
@@ -3925,7 +3880,7 @@ dissect_nfs_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
}
-/* RFC 1813, Page 21 */
+/* NFSv3 RFC 1813, Page 21 */
static int
dissect_nfstime3(tvbuff_t *tvb, int offset, proto_tree *tree, int hf_time,
int hf_time_sec, int hf_time_nsec)
@@ -3934,8 +3889,8 @@ dissect_nfstime3(tvbuff_t *tvb, int offset, proto_tree *tree, int hf_time,
guint32 nseconds;
nstime_t ts;
- proto_item* time_item;
- proto_tree* time_tree;
+ proto_item* time_item = NULL;
+ proto_tree* time_tree = NULL;
seconds = tvb_get_ntohl(tvb, offset+0);
nseconds = tvb_get_ntohl(tvb, offset+4);
@@ -3946,7 +3901,7 @@ dissect_nfstime3(tvbuff_t *tvb, int offset, proto_tree *tree, int hf_time,
time_item = proto_tree_add_time(tree, hf_time, tvb, offset, 8,
&ts);
- time_tree = proto_item_add_subtree(time_item, ett_nfs_nfstime3);
+ time_tree = proto_item_add_subtree(time_item, ett_nfs3_nfstime);
proto_tree_add_uint(time_tree, hf_time_sec, tvb, offset, 4,
seconds);
@@ -3958,7 +3913,7 @@ dissect_nfstime3(tvbuff_t *tvb, int offset, proto_tree *tree, int hf_time,
}
-/* RFC 1813, Page 22
+/* NFSv3 RFC 1813, Page 22
* The levels parameter tells this helper how many levels up in the tree it
* should display useful info such as type,mode,uid,gid
* If level has the COL_INFO_LEVEL flag set it will also display
@@ -3976,46 +3931,46 @@ dissect_nfs_fattr3(packet_info *pinfo, tvbuff_t *tvb, int offset,
if (tree) {
fattr3_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s", name);
- fattr3_tree = proto_item_add_subtree(fattr3_item, ett_nfs_fattr3);
+ fattr3_tree = proto_item_add_subtree(fattr3_item, ett_nfs3_fattr);
}
/* ftype */
- offset = dissect_ftype3(tvb,offset,fattr3_tree,hf_nfs_fattr3_type,&type);
+ offset = dissect_ftype3(tvb,offset,fattr3_tree,hf_nfs3_fattr_type,&type);
/* mode */
- offset = dissect_mode3(tvb,offset,fattr3_tree,&mode);
+ offset = dissect_nfs3_mode(tvb,offset,fattr3_tree, &mode);
/* nlink */
- offset = dissect_rpc_uint32(tvb, fattr3_tree, hf_nfs_fattr3_nlink,
+ offset = dissect_rpc_uint32(tvb, fattr3_tree, hf_nfs3_fattr_nlink,
offset);
/* uid */
uid=tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, fattr3_tree, hf_nfs_fattr3_uid,
+ offset = dissect_rpc_uint32(tvb, fattr3_tree, hf_nfs3_fattr_uid,
offset);
/* gid */
gid=tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, fattr3_tree, hf_nfs_fattr3_gid,
+ offset = dissect_rpc_uint32(tvb, fattr3_tree, hf_nfs3_fattr_gid,
offset);
/* size*/
- offset = dissect_rpc_uint64(tvb, fattr3_tree, hf_nfs_fattr3_size,
+ offset = dissect_rpc_uint64(tvb, fattr3_tree, hf_nfs3_fattr_size,
offset);
/* used */
- offset = dissect_rpc_uint64(tvb, fattr3_tree, hf_nfs_fattr3_used,
+ offset = dissect_rpc_uint64(tvb, fattr3_tree, hf_nfs3_fattr_used,
offset);
/* rdev */
- offset = dissect_specdata3(tvb,offset,fattr3_tree,"rdev");
+ offset = dissect_nfs3_specdata(tvb,offset,fattr3_tree,"rdev");
/* fsid */
- offset = dissect_rpc_uint64(tvb, fattr3_tree, hf_nfs_fattr3_fsid,
+ offset = dissect_rpc_uint64(tvb, fattr3_tree, hf_nfs3_fattr_fsid,
offset);
/* fileid */
- offset = dissect_rpc_uint64(tvb, fattr3_tree, hf_nfs_fattr3_fileid,
+ offset = dissect_rpc_uint64(tvb, fattr3_tree, hf_nfs3_fattr_fileid,
offset);
/* atime */
@@ -4037,14 +3992,14 @@ dissect_nfs_fattr3(packet_info *pinfo, tvbuff_t *tvb, int offset,
if(levels&COL_INFO_LEVEL) {
levels&=(~COL_INFO_LEVEL);
col_append_fstr(pinfo->cinfo, COL_INFO,
- " %s mode:%04o uid:%d gid:%d",
- val_to_str_ext(type, &names_nfs_ftype3_ext,"Unknown Type:0x%x"),
+ " %s mode: %04o uid: %d gid: %d",
+ val_to_str_ext(type, &names_nfs_ftype3_ext,"Unknown Type: 0x%x"),
mode&0x0fff, uid, gid);
}
/* populate the expansion lines with some nice useable info */
while( fattr3_tree && levels-- ){
- proto_item_append_text(fattr3_tree, " %s mode:%04o uid:%d gid:%d",
- val_to_str_ext(type, &names_nfs_ftype3_ext,"Unknown Type:0x%x"),
+ proto_item_append_text(fattr3_tree, " %s mode: %04o uid: %d gid: %d",
+ val_to_str_ext(type, &names_nfs_ftype3_ext,"Unknown Type: 0x%x"),
mode&0x0fff, uid, gid);
fattr3_tree=fattr3_tree->parent;
}
@@ -4061,27 +4016,28 @@ static const value_string value_follows[] =
};
-/* RFC 1813, Page 23 */
+/* NFSv3 RFC 1813, Page 23 */
int
-dissect_nfs_post_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+dissect_nfs3_post_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
const char* name)
{
proto_item* post_op_attr_item = NULL;
proto_tree* post_op_attr_tree = NULL;
int old_offset = offset;
- guint32 attributes_follow;
+ guint32 attributes_follow = 0;
+ attributes_follow = tvb_get_ntohl(tvb, offset+0);
+
if (tree) {
post_op_attr_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s", name);
post_op_attr_tree = proto_item_add_subtree(post_op_attr_item,
- ett_nfs_post_op_attr);
- }
-
- attributes_follow = tvb_get_ntohl(tvb, offset+0);
- proto_tree_add_text(post_op_attr_tree, tvb, offset, 4,
- "attributes_follow: %s (%u)",
+ ett_nfs3_post_op_attr);
+
+ proto_tree_add_text(post_op_attr_tree, tvb, offset, 4,
+ "attributes_follow: %s (%u)",
val_to_str_const(attributes_follow,value_follows,"Unknown"), attributes_follow);
+ }
offset += 4;
switch (attributes_follow) {
case TRUE:
@@ -4095,7 +4051,7 @@ dissect_nfs_post_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
}
/* now we know, that post_op_attr_tree is shorter */
- if (post_op_attr_item) {
+ if (tree && post_op_attr_item) {
proto_item_set_len(post_op_attr_item, offset - old_offset);
}
@@ -4103,7 +4059,7 @@ dissect_nfs_post_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
}
-/* RFC 1813, Page 24 */
+/* NFSv3 RFC 1813, Page 24 */
static int
dissect_wcc_attr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
@@ -4115,13 +4071,15 @@ dissect_wcc_attr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
wcc_attr_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s", name);
wcc_attr_tree = proto_item_add_subtree(wcc_attr_item,
- ett_nfs_wcc_attr);
+ ett_nfs3_wcc_attr);
}
- offset = dissect_rpc_uint64(tvb, wcc_attr_tree, hf_nfs_wcc_attr_size,
+ offset = dissect_rpc_uint64(tvb, wcc_attr_tree, hf_nfs3_wcc_attr_size,
offset);
- offset = dissect_nfstime3(tvb, offset, wcc_attr_tree, hf_nfs_mtime, hf_nfs_mtime_sec, hf_nfs_mtime_nsec);
- offset = dissect_nfstime3(tvb, offset, wcc_attr_tree, hf_nfs_ctime, hf_nfs_ctime_sec, hf_nfs_ctime_nsec);
+ offset = dissect_nfstime3(tvb, offset, wcc_attr_tree, hf_nfs_mtime,
+ hf_nfs_mtime_sec, hf_nfs_mtime_nsec);
+ offset = dissect_nfstime3(tvb, offset, wcc_attr_tree, hf_nfs_ctime,
+ hf_nfs_ctime_sec, hf_nfs_ctime_nsec);
/* now we know, that wcc_attr_tree is shorter */
if (wcc_attr_item) {
proto_item_set_len(wcc_attr_item, offset - old_offset);
@@ -4131,7 +4089,7 @@ dissect_wcc_attr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1813, Page 24 */
+/* NFSv3 RFC 1813, Page 24 */
static int
dissect_pre_op_attr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
@@ -4144,7 +4102,7 @@ dissect_pre_op_attr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* nam
pre_op_attr_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s", name);
pre_op_attr_tree = proto_item_add_subtree(pre_op_attr_item,
- ett_nfs_pre_op_attr);
+ ett_nfs3_pre_op_attr);
}
attributes_follow = tvb_get_ntohl(tvb, offset+0);
@@ -4171,7 +4129,7 @@ dissect_pre_op_attr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* nam
}
-/* RFC 1813, Page 24 */
+/* NFSv3 RFC 1813, Page 24 */
static int
dissect_wcc_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, const char* name)
{
@@ -4183,11 +4141,11 @@ dissect_wcc_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
wcc_data_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s", name);
wcc_data_tree = proto_item_add_subtree(wcc_data_item,
- ett_nfs_wcc_data);
+ ett_nfs3_wcc_data);
}
offset = dissect_pre_op_attr (tvb, offset, wcc_data_tree, "before");
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, wcc_data_tree, "after" );
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, wcc_data_tree, "after" );
/* now we know, that wcc_data is shorter */
if (wcc_data_item) {
@@ -4198,9 +4156,9 @@ dissect_wcc_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
}
-/* RFC 1813, Page 25 */
+/* NFSv3 RFC 1813, Page 25 */
static int
-dissect_post_op_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs3_post_op_fh(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, const char* name)
{
proto_item* post_op_fh3_item = NULL;
@@ -4212,7 +4170,7 @@ dissect_post_op_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo,
post_op_fh3_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s", name);
post_op_fh3_tree = proto_item_add_subtree(post_op_fh3_item,
- ett_nfs_post_op_fh3);
+ ett_nfs3_post_op_fh);
}
handle_follows = tvb_get_ntohl(tvb, offset+0);
@@ -4222,7 +4180,7 @@ dissect_post_op_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset += 4;
switch (handle_follows) {
case TRUE:
- offset = dissect_nfs_fh3(tvb, offset, pinfo, post_op_fh3_tree,
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, post_op_fh3_tree,
"handle", NULL);
break;
case FALSE:
@@ -4239,7 +4197,7 @@ dissect_post_op_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
-/* RFC 1813, Page 25 */
+/* NFSv3 RFC 1813, Page 25 */
static int
dissect_set_mode3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
@@ -4257,7 +4215,7 @@ dissect_set_mode3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
set_mode3_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s: %s", name, set_it_name);
set_mode3_tree = proto_item_add_subtree(set_mode3_item,
- ett_nfs_set_mode3);
+ ett_nfs3_set_mode);
proto_tree_add_text(set_mode3_tree, tvb, offset, 4,
"set_it: %s (%u)", set_it_name, set_it);
@@ -4267,8 +4225,7 @@ dissect_set_mode3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
switch (set_it) {
case 1:
- offset = dissect_mode3(tvb, offset, set_mode3_tree,
- NULL);
+ offset = dissect_nfs3_mode(tvb, offset, set_mode3_tree, NULL);
break;
default:
/* void */
@@ -4284,7 +4241,7 @@ dissect_set_mode3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1813, Page 26 */
+/* NFSv3 RFC 1813, Page 26 */
static int
dissect_set_uid3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
@@ -4302,7 +4259,7 @@ dissect_set_uid3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
set_uid3_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s: %s", name, set_it_name);
set_uid3_tree = proto_item_add_subtree(set_uid3_item,
- ett_nfs_set_uid3);
+ ett_nfs3_set_uid);
proto_tree_add_text(set_uid3_tree, tvb, offset, 4,
"set_it: %s (%u)", set_it_name, set_it);
@@ -4312,7 +4269,7 @@ dissect_set_uid3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
switch (set_it) {
case 1:
offset = dissect_rpc_uint32(tvb, set_uid3_tree,
- hf_nfs_uid3, offset);
+ hf_nfs3_uid, offset);
break;
default:
/* void */
@@ -4328,7 +4285,7 @@ dissect_set_uid3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1813, Page 26 */
+/* NFSv3 RFC 1813, Page 26 */
static int
dissect_set_gid3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
@@ -4345,7 +4302,7 @@ dissect_set_gid3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
set_gid3_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s: %s", name, set_it_name);
set_gid3_tree = proto_item_add_subtree(set_gid3_item,
- ett_nfs_set_gid3);
+ ett_nfs3_set_gid);
proto_tree_add_text(set_gid3_tree, tvb, offset, 4,
"set_it: %s (%u)", set_it_name, set_it);
}
@@ -4355,7 +4312,7 @@ dissect_set_gid3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
switch (set_it) {
case 1:
offset = dissect_rpc_uint32(tvb, set_gid3_tree,
- hf_nfs_gid3, offset);
+ hf_nfs3_gid, offset);
break;
default:
/* void */
@@ -4371,7 +4328,7 @@ dissect_set_gid3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1813, Page 26 */
+/* NFSv3 RFC 1813, Page 26 */
static int
dissect_set_size3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
@@ -4389,7 +4346,7 @@ dissect_set_size3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
set_size3_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s: %s", name, set_it_name);
set_size3_tree = proto_item_add_subtree(set_size3_item,
- ett_nfs_set_size3);
+ ett_nfs3_set_size);
proto_tree_add_text(set_size3_tree, tvb, offset, 4,
"set_it: %s (%u)", set_it_name, set_it);
}
@@ -4399,7 +4356,7 @@ dissect_set_size3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
switch (set_it) {
case 1:
offset = dissect_rpc_uint64(tvb, set_size3_tree,
- hf_nfs_set_size3_size, offset);
+ hf_nfs3_set_size, offset);
break;
default:
/* void */
@@ -4415,7 +4372,7 @@ dissect_set_size3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1813, Page 25 */
+/* NFSv3 RFC 1813, Page 25 */
#define DONT_CHANGE 0
#define SET_TO_SERVER_TIME 1
#define SET_TO_CLIENT_TIME 2
@@ -4429,7 +4386,7 @@ static const value_string time_how[] =
};
-/* RFC 1813, Page 26 */
+/* NFSv3 RFC 1813, Page 26 */
static int
dissect_set_atime(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
@@ -4447,7 +4404,7 @@ dissect_set_atime(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
set_atime_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s: %s", name, set_it_name);
set_atime_tree = proto_item_add_subtree(set_atime_item,
- ett_nfs_set_atime);
+ ett_nfs3_set_atime);
proto_tree_add_text(set_atime_tree, tvb, offset, 4,
"set_it: %s (%u)", set_it_name, set_it);
@@ -4475,7 +4432,7 @@ dissect_set_atime(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1813, Page 26 */
+/* NFSv3 RFC 1813, Page 26 */
static int
dissect_set_mtime(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
@@ -4493,7 +4450,7 @@ dissect_set_mtime(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
set_mtime_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s: %s", name, set_it_name);
set_mtime_tree = proto_item_add_subtree(set_mtime_item,
- ett_nfs_set_mtime);
+ ett_nfs3_set_mtime);
proto_tree_add_text(set_mtime_tree, tvb, offset, 4,
"set_it: %s (%u)", set_it_name, set_it);
}
@@ -4521,9 +4478,9 @@ dissect_set_mtime(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1813, Page 25..27 */
+/* NFSv3 RFC 1813, Page 25..27 */
static int
-dissect_sattr3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
+dissect_nfs3_sattr(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
{
proto_item* sattr3_item = NULL;
proto_tree* sattr3_tree = NULL;
@@ -4532,7 +4489,7 @@ dissect_sattr3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
if (tree) {
sattr3_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s", name);
- sattr3_tree = proto_item_add_subtree(sattr3_item, ett_nfs_sattr3);
+ sattr3_tree = proto_item_add_subtree(sattr3_item, ett_nfs3_sattr);
}
offset = dissect_set_mode3(tvb, offset, sattr3_tree, "mode");
@@ -4551,11 +4508,10 @@ dissect_sattr3(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
}
-/* RFC 1813, Page 27 */
+/* NFSv3 RFC 1813, Page 27 */
static int
-dissect_diropargs3(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, const char* label, guint32 *hash,
- const char **name)
+dissect_diropargs3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+ const char* label, guint32 *hash, const char **name)
{
proto_item* diropargs3_item = NULL;
proto_tree* diropargs3_tree = NULL;
@@ -4567,15 +4523,15 @@ dissect_diropargs3(tvbuff_t *tvb, int offset, packet_info *pinfo,
diropargs3_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s", label);
diropargs3_tree = proto_item_add_subtree(diropargs3_item,
- ett_nfs_diropargs3);
+ ett_nfs3_diropargs);
}
parent_offset=offset+4;
parent_len=tvb_get_ntohl(tvb, offset);
- offset = dissect_nfs_fh3(tvb, offset, pinfo, diropargs3_tree, "dir", hash);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, diropargs3_tree, "dir", hash);
name_offset=offset+4;
name_len=tvb_get_ntohl(tvb, offset);
- offset = dissect_filename3(tvb, offset, diropargs3_tree,
+ offset = dissect_nfs3_filename(tvb, offset, diropargs3_tree,
hf_nfs_name, name);
/* are we snooping fh to filenames ?*/
@@ -4603,6 +4559,7 @@ dissect_diropargs3(tvbuff_t *tvb, int offset, packet_info *pinfo,
return offset;
}
+
static int
dissect_nfs3_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
@@ -4612,12 +4569,13 @@ dissect_nfs3_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "object", &hash, &name);
- col_append_fstr(pinfo->cinfo, COL_INFO,", DH:0x%08x/%s", hash, name);
- proto_item_append_text(tree, ", REMOVE Call DH:0x%08x/%s", hash, name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", DH: 0x%08x/%s", hash, name);
+ proto_item_append_text(tree, ", REMOVE Call DH: 0x%08x/%s", hash, name);
return offset;
}
+
static int
dissect_nfs3_null_call(tvbuff_t *tvb _U_, int offset, packet_info *pinfo _U_,
proto_tree *tree)
@@ -4627,6 +4585,7 @@ dissect_nfs3_null_call(tvbuff_t *tvb _U_, int offset, packet_info *pinfo _U_,
return offset;
}
+
static int
dissect_nfs3_null_reply(tvbuff_t *tvb _U_, int offset, packet_info *pinfo _U_,
proto_tree *tree)
@@ -4636,6 +4595,7 @@ dissect_nfs3_null_reply(tvbuff_t *tvb _U_, int offset, packet_info *pinfo _U_,
return offset;
}
+
static int
dissect_nfs3_rmdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
@@ -4645,31 +4605,30 @@ dissect_nfs3_rmdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "object", &hash, &name);
- col_append_fstr(pinfo->cinfo, COL_INFO,", DH:0x%08x/%s", hash, name);
- proto_item_append_text(tree, ", RMDIR Call DH:0x%08x/%s", hash, name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", DH: 0x%08x/%s", hash, name);
+ proto_item_append_text(tree, ", RMDIR Call DH: 0x%08x/%s", hash, name);
return offset;
}
-
-/* RFC 1813, Page 32,33 */
+/* NFSv3 RFC 1813, Page 32,33 */
static int
dissect_nfs3_getattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
{
guint32 hash = 0;
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "object", &hash);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "object", &hash);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", GETATTR Call FH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", GETATTR Call FH: 0x%08x", hash);
return offset;
}
-/* RFC 1813, Page 32,33 */
+/* NFSv3 RFC 1813, Page 32,33 */
static int
dissect_nfs3_getattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -4679,15 +4638,15 @@ dissect_nfs3_getattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_item_append_text(tree, ", GETATTR Reply");
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
offset = dissect_nfs_fattr3(pinfo, tvb, offset, tree, "obj_attributes",2|COL_INFO_LEVEL);
break;
default:
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, " Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, " Error: %s", err);
break;
}
@@ -4695,7 +4654,7 @@ dissect_nfs3_getattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1813, Page 33 */
+/* NFSv3 RFC 1813, Page 33 */
static int
dissect_sattrguard3(tvbuff_t *tvb, int offset, proto_tree* tree, const char *name)
{
@@ -4713,7 +4672,7 @@ dissect_sattrguard3(tvbuff_t *tvb, int offset, proto_tree* tree, const char *nam
sattrguard3_item = proto_tree_add_text(tree, tvb, offset, -1,
"%s: %s", name, check_name);
sattrguard3_tree = proto_item_add_subtree(sattrguard3_item,
- ett_nfs_sattrguard3);
+ ett_nfs3_sattrguard);
proto_tree_add_text(sattrguard3_tree, tvb, offset, 4,
"check: %s (%u)", check_name, check);
@@ -4741,25 +4700,25 @@ dissect_sattrguard3(tvbuff_t *tvb, int offset, proto_tree* tree, const char *nam
}
-/* RFC 1813, Page 33..36 */
+/* NFSv3 RFC 1813, Page 33..36 */
static int
dissect_nfs3_setattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
{
guint32 hash = 0;
- offset = dissect_nfs_fh3 (tvb, offset, pinfo, tree, "object", &hash);
- offset = dissect_sattr3 (tvb, offset, tree, "new_attributes");
+ offset = dissect_nfs3_fh (tvb, offset, pinfo, tree, "object", &hash);
+ offset = dissect_nfs3_sattr (tvb, offset, tree, "new_attributes");
offset = dissect_sattrguard3(tvb, offset, tree, "guard");
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", SETATTR Call FH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", SETATTR Call FH: 0x%08x", hash);
return offset;
}
-/* RFC 1813, Page 33..36 */
+/* NFSv3 RFC 1813, Page 33..36 */
static int
dissect_nfs3_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -4767,7 +4726,7 @@ dissect_nfs3_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 status;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "obj_wcc");
@@ -4776,9 +4735,9 @@ dissect_nfs3_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
default:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "obj_wcc");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", SETATTR Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", SETATTR Reply Error: %s", err);
break;
}
@@ -4786,7 +4745,7 @@ dissect_nfs3_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1813, Page 37..39 */
+/* NFSv3 RFC 1813, Page 37..39 */
static int
dissect_nfs3_lookup_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -4796,14 +4755,14 @@ dissect_nfs3_lookup_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_diropargs3 (tvb, offset, pinfo, tree, "what", &hash, &name);
- col_append_fstr(pinfo->cinfo, COL_INFO,", DH:0x%08x/%s", hash, name);
- proto_item_append_text(tree, ", LOOKUP Call DH:0x%08x/%s", hash, name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", DH: 0x%08x/%s", hash, name);
+ proto_item_append_text(tree, ", LOOKUP Call DH: 0x%08x/%s", hash, name);
return offset;
}
-/* RFC 1813, Page 37..39 */
+/* NFSv3 RFC 1813, Page 37..39 */
static int
dissect_nfs3_lookup_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -4812,25 +4771,25 @@ dissect_nfs3_lookup_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
const char *err;
guint32 hash = 0;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "object", &hash);
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "object", &hash);
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"obj_attributes");
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"dir_attributes");
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", LOOKUP Reply FH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", LOOKUP Reply FH: 0x%08x", hash);
break;
default:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"dir_attributes");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", LOOKUP Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", LOOKUP Reply Error: %s", err);
break;
}
@@ -4875,18 +4834,18 @@ display_access_items(tvbuff_t* tvb, int offset, packet_info* pinfo, proto_tree*
access_item = proto_tree_add_item(tree, hf_nfs_access_check, tvb,
offset, 4, ENC_BIG_ENDIAN);
access_subtree = proto_item_add_subtree(access_item,
- (nfsv3 ? ett_nfs_access3 : ett_nfs_access4));
+ (nfsv3 ? ett_nfs3_access : ett_nfs4_access));
break;
case 'S':
access_item = proto_tree_add_item(tree, hf_nfs_access_supported, tvb,
offset, 4, ENC_BIG_ENDIAN);
- access_subtree = proto_item_add_subtree(access_item, ett_nfs_access_supp4);
+ access_subtree = proto_item_add_subtree(access_item, ett_nfs4_access_supp);
break;
case 'R':
access_item = proto_tree_add_item(tree, hf_nfs_access_rights, tvb,
offset, 4, ENC_BIG_ENDIAN);
access_subtree = proto_item_add_subtree(access_item,
- (nfsv3 ? ett_nfs_access3 : ett_nfs_access4));
+ (nfsv3 ? ett_nfs3_access : ett_nfs4_access));
break;
}
/* Append label to the Info column and tree */
@@ -4956,11 +4915,11 @@ display_access_items(tvbuff_t* tvb, int offset, packet_info* pinfo, proto_tree*
}
proto_item_append_text(tree, "]");
}
- return access_subtree;
+ return access_subtree = NULL;
}
-/* RFC 1813, Page 40..43 */
-/* RFC 3530, Page 140..142 */
+/* NFSv3 RFC 1813, Page 40..43 */
+/* NFSv4 RFC 3530, Page 140..142 */
int
dissect_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree,
int version, GString *optext)
@@ -5027,14 +4986,15 @@ dissect_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree*
return offset+4;
}
-/* RFC 1813, Page 40..43 */
+
+/* NFSv3 RFC 1813, Page 40..43 */
static int
dissect_nfs3_access_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree)
{
guint32 fhhash = 0, *acc_request, amask;
rpc_call_info_value *civ;
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "object", &fhhash);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "object", &fhhash);
/* Get access mask to check and save it for comparison to the access reply. */
amask = tvb_get_ntohl(tvb, offset);
@@ -5043,8 +5003,8 @@ dissect_nfs3_access_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
civ->private_data = acc_request;
/* Append filehandle to Info column and main tree header */
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", fhhash);
- proto_item_append_text(tree, ", ACCESS Call, FH:0x%08x", fhhash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", fhhash);
+ proto_item_append_text(tree, ", ACCESS Call, FH: 0x%08x", fhhash);
display_access_items(tvb, offset, pinfo, tree, amask, 'C', 3, NULL, "Check") ;
@@ -5052,7 +5012,8 @@ dissect_nfs3_access_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
return offset;
}
-/* RFC 1813, Page 40..43 */
+
+/* NFSv3 RFC 1813, Page 40..43 */
static int
dissect_nfs3_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -5060,15 +5021,15 @@ dissect_nfs3_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 status;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"obj_attributes");
if (status==0) {
proto_item_append_text(tree, ", ACCESS Reply");
offset = dissect_access_reply(tvb, offset, pinfo, tree, 3, NULL);
} else {
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
proto_item_append_text(tree, ", ACCESS Reply Error: %s", err);
}
@@ -5076,20 +5037,22 @@ dissect_nfs3_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1813, Page 44,45 */
+/* NFSv3 RFC 1813, Page 44,45 */
static int
dissect_nfs3_readlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
{
guint32 hash = 0;
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "object", &hash);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "object", &hash);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", READLINK Call FH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", READLINK Call FH: 0x%08x", hash);
return offset;
}
+
+
static int
dissect_nfs3_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -5098,24 +5061,24 @@ dissect_nfs3_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
const char *err;
const char *name=NULL;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"symlink_attributes");
- offset = dissect_nfspath3(tvb, offset, tree,
- hf_nfs_readlink_data, &name);
+ offset = dissect_nfs3_path(tvb, offset, tree,
+ hf_nfs2_readlink_data, &name);
- col_append_fstr(pinfo->cinfo, COL_INFO," Path:%s", name);
- proto_item_append_text(tree, ", READLINK Reply Path:%s", name);
+ col_append_fstr(pinfo->cinfo, COL_INFO," Path: %s", name);
+ proto_item_append_text(tree, ", READLINK Reply Path: %s", name);
break;
default:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"symlink_attributes");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", READLINK Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", READLINK Reply Error: %s", err);
break;
}
@@ -5123,7 +5086,7 @@ dissect_nfs3_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1813, Page 46..48 */
+/* NFSv3 RFC 1813, Page 46..48 */
static int
dissect_nfs3_read_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5132,23 +5095,25 @@ dissect_nfs3_read_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 len;
guint32 hash = 0;
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "file", &hash);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "file", &hash);
off=tvb_get_ntoh64(tvb, offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_offset3, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_offset, offset);
len=tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs3_count, offset);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x Offset:%" G_GINT64_MODIFIER "u Len:%u", hash, off, len);
- proto_item_append_text(tree, ", READ Call FH:0x%08x Offset:%" G_GINT64_MODIFIER "u Len:%u", hash, off, len);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ ", FH: 0x%08x Offset: %" G_GINT64_MODIFIER "u Len: %u", hash, off, len);
+ proto_item_append_text(tree,
+ ", READ Call FH: 0x%08x Offset: %" G_GINT64_MODIFIER "u Len: %u", hash, off, len);
return offset;
}
-/* RFC 1813, Page 46..48 */
+/* NFSv3 RFC 1813, Page 46..48 */
static int
dissect_nfs3_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -5157,27 +5122,27 @@ dissect_nfs3_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 len;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"file_attributes");
len=tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3,
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs3_count,
offset);
- offset = dissect_rpc_bool(tvb, tree, hf_nfs_read_eof,
+ offset = dissect_rpc_bool(tvb, tree, hf_nfs3_read_eof,
offset);
- col_append_fstr(pinfo->cinfo, COL_INFO," Len:%d", len);
- proto_item_append_text(tree, ", READ Reply Len:%d", len);
+ col_append_fstr(pinfo->cinfo, COL_INFO," Len: %d", len);
+ proto_item_append_text(tree, ", READ Reply Len: %d", len);
offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_data);
break;
default:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"file_attributes");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", READ Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", READ Reply Error: %s", err);
break;
}
@@ -5185,7 +5150,7 @@ dissect_nfs3_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1813, Page 49 */
+/* NFSv3 RFC 1813, Page 49 */
static const value_string names_stable_how[] = {
{ UNSTABLE, "UNSTABLE" },
{ DATA_SYNC, "DATA_SYNC" },
@@ -5193,25 +5158,22 @@ static const value_string names_stable_how[] = {
{ 0, NULL }
};
-
-/* RFC 1813, Page 49 */
+/* NFSv3 RFC 1813, Page 49 */
static int
dissect_stable_how(tvbuff_t *tvb, int offset, proto_tree* tree, int hfindex)
{
guint32 stable_how;
stable_how = tvb_get_ntohl(tvb,offset+0);
- if (tree) {
- proto_tree_add_uint(tree, hfindex, tvb,
- offset, 4, stable_how);
- }
+ if (tree)
+ proto_tree_add_uint(tree, hfindex, tvb, offset, 4, stable_how);
offset += 4;
return offset;
}
-/* RFC 1813, Page 49..54 */
+/* NFSv3 RFC 1813, Page 49..54 */
static int
dissect_nfs3_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5221,19 +5183,21 @@ dissect_nfs3_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 stable;
guint32 hash = 0;
- offset = dissect_nfs_fh3 (tvb, offset, pinfo, tree, "file", &hash);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "file", &hash);
off=tvb_get_ntoh64(tvb, offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_offset3, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_offset, offset);
len=tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs3_count, offset);
stable=tvb_get_ntohl(tvb, offset);
- offset = dissect_stable_how(tvb, offset, tree, hf_nfs_write_stable);
+ offset = dissect_stable_how(tvb, offset, tree, hf_nfs3_write_stable);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x Offset:%" G_GINT64_MODIFIER "u Len:%u %s", hash, off, len, val_to_str(stable, names_stable_how, "Stable:%u"));
- proto_item_append_text(tree, ", WRITE Call FH:0x%08x Offset:%" G_GINT64_MODIFIER "u Len:%u %s", hash, off, len, val_to_str(stable, names_stable_how, "Stable:%u"));
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x Offset: %" G_GINT64_MODIFIER "u Len: %u %s",
+ hash, off, len, val_to_str(stable, names_stable_how, "Stable: %u"));
+ proto_item_append_text(tree, ", WRITE Call FH: 0x%08x Offset: %" G_GINT64_MODIFIER "u Len: %u %s",
+ hash, off, len, val_to_str(stable, names_stable_how, "Stable: %u"));
offset = dissect_nfsdata (tvb, offset, tree, hf_nfs_data);
@@ -5241,7 +5205,7 @@ dissect_nfs3_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
-/* RFC 1813, Page 49..54 */
+/* NFSv3 RFC 1813, Page 49..54 */
static int
dissect_nfs3_write_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -5251,27 +5215,29 @@ dissect_nfs3_write_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 stable;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "file_wcc");
len=tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3,
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs3_count,
offset);
stable=tvb_get_ntohl(tvb, offset);
offset = dissect_stable_how(tvb, offset, tree,
- hf_nfs_write_committed);
- offset = dissect_writeverf3(tvb, offset, tree);
+ hf_nfs3_write_committed);
+ offset = dissect_nfs3_write_verf(tvb, offset, tree);
- col_append_fstr(pinfo->cinfo, COL_INFO," Len:%d %s", len, val_to_str(stable, names_stable_how, "Stable:%u"));
- proto_item_append_text(tree, ", WRITE Reply Len:%d %s", len, val_to_str(stable, names_stable_how, "Stable:%u"));
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ " Len: %d %s", len, val_to_str(stable, names_stable_how, "Stable: %u"));
+ proto_item_append_text(tree, ", WRITE Reply Len: %d %s",
+ len, val_to_str(stable, names_stable_how, "Stable: %u"));
break;
default:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "file_wcc");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", WRITE Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", WRITE Reply Error: %s", err);
break;
}
@@ -5279,7 +5245,7 @@ dissect_nfs3_write_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1813, Page 54 */
+/* NFSv3 RFC 1813, Page 54 */
static const value_string names_createmode3[] = {
{ UNCHECKED, "UNCHECKED" },
{ GUARDED, "GUARDED" },
@@ -5287,18 +5253,15 @@ static const value_string names_createmode3[] = {
{ 0, NULL }
};
-
-/* RFC 1813, Page 54 */
+/* NFSv3 RFC 1813, Page 54 */
static int
dissect_createmode3(tvbuff_t *tvb, int offset, proto_tree* tree, guint32* mode)
{
guint32 mode_value;
mode_value = tvb_get_ntohl(tvb, offset + 0);
- if (tree) {
- proto_tree_add_uint(tree, hf_nfs_createmode3, tvb,
- offset+0, 4, mode_value);
- }
+ if (tree)
+ proto_tree_add_uint(tree, hf_nfs3_createmode, tvb, offset+0, 4, mode_value);
offset += 4;
*mode = mode_value;
@@ -5306,7 +5269,7 @@ dissect_createmode3(tvbuff_t *tvb, int offset, proto_tree* tree, guint32* mode)
}
-/* RFC 1813, Page 54..58 */
+/* NFSv3 RFC 1813, Page 54..58 */
static int
dissect_nfs3_create_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5320,21 +5283,23 @@ dissect_nfs3_create_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
switch (mode) {
case UNCHECKED:
case GUARDED:
- offset = dissect_sattr3(tvb, offset, tree, "obj_attributes");
+ offset = dissect_nfs3_sattr(tvb, offset, tree, "obj_attributes");
break;
case EXCLUSIVE:
- offset = dissect_createverf3(tvb, offset, tree);
+ offset = dissect_nfs3_create_verf(tvb, offset, tree);
break;
}
- col_append_fstr(pinfo->cinfo, COL_INFO,", DH:0x%08x/%s Mode:%s", hash, name, val_to_str(mode, names_createmode3, "Unknown Mode:%u"));
- proto_item_append_text(tree, ", CREATE Call DH:0x%08x/%s Mode:%s", hash, name, val_to_str(mode, names_createmode3, "Unknown Mode:%u"));
+ col_append_fstr(pinfo->cinfo, COL_INFO,", DH: 0x%08x/%s Mode: %s", hash, name,
+ val_to_str(mode, names_createmode3, "Unknown Mode: %u"));
+ proto_item_append_text(tree, ", CREATE Call DH: 0x%08x/%s Mode: %s", hash, name,
+ val_to_str(mode, names_createmode3, "Unknown Mode: %u"));
return offset;
}
-/* RFC 1813, Page 54..58 */
+/* NFSv3 RFC 1813, Page 54..58 */
static int
dissect_nfs3_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5342,11 +5307,11 @@ dissect_nfs3_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 status;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_post_op_fh3 (tvb, offset, pinfo, tree, "obj");
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_fh (tvb, offset, pinfo, tree, "obj");
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"obj_attributes");
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
proto_item_append_text(tree, ", CREATE Reply");
@@ -5354,9 +5319,9 @@ dissect_nfs3_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
default:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", CREATE Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", CREATE Reply Error: %s", err);
break;
}
@@ -5364,7 +5329,7 @@ dissect_nfs3_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
-/* RFC 1813, Page 58..60 */
+/* NFSv3 RFC 1813, Page 58..60 */
static int
dissect_nfs3_mkdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5373,14 +5338,15 @@ dissect_nfs3_mkdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
const char *name=NULL;
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "where", &hash, &name);
- offset = dissect_sattr3 (tvb, offset, tree, "attributes");
+ offset = dissect_nfs3_sattr (tvb, offset, tree, "attributes");
- col_append_fstr(pinfo->cinfo, COL_INFO,", DH:0x%08x/%s", hash, name);
- proto_item_append_text(tree, ", MKDIR Call DH:0x%08x/%s", hash, name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", DH: 0x%08x/%s", hash, name);
+ proto_item_append_text(tree, ", MKDIR Call DH: 0x%08x/%s", hash, name);
return offset;
}
+
static int
dissect_nfs3_mkdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5388,11 +5354,11 @@ dissect_nfs3_mkdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 status;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_post_op_fh3 (tvb, offset, pinfo, tree, "obj");
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_fh (tvb, offset, pinfo, tree, "obj");
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"obj_attributes");
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
proto_item_append_text(tree, ", MKDIR Reply");
@@ -5400,9 +5366,9 @@ dissect_nfs3_mkdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
default:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", MKDIR Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", MKDIR Reply Error: %s", err);
break;
}
@@ -5410,7 +5376,7 @@ dissect_nfs3_mkdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
-/* RFC 1813, Page 61..63 */
+/* NFSv3 RFC 1813, Page 61..63 */
static int
dissect_nfs3_symlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5420,14 +5386,18 @@ dissect_nfs3_symlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
const char *to_name=NULL;
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "where", &from_hash, &from_name);
- offset = dissect_sattr3 (tvb, offset, tree, "symlink_attributes");
- offset = dissect_nfspath3 (tvb, offset, tree, hf_nfs_symlink_to, &to_name);
+ offset = dissect_nfs3_sattr (tvb, offset, tree, "symlink_attributes");
+ offset = dissect_nfs3_path (tvb, offset, tree, hf_nfs_symlink_to, &to_name);
- col_append_fstr(pinfo->cinfo, COL_INFO,", From DH:0x%08x/%s To %s", from_hash, from_name, to_name);
- proto_item_append_text(tree, ", SYMLINK Call From DH:0x%08x/%s To %s", from_hash, from_name, to_name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", From DH: 0x%08x/%s To %s",
+ from_hash, from_name, to_name);
+ proto_item_append_text(tree, ", SYMLINK Call From DH: 0x%08x/%s To %s",
+ from_hash, from_name, to_name);
return offset;
}
+
+
static int
dissect_nfs3_symlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5435,11 +5405,11 @@ dissect_nfs3_symlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 status;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_post_op_fh3 (tvb, offset, pinfo, tree, "obj");
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_fh (tvb, offset, pinfo, tree, "obj");
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"obj_attributes");
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
proto_item_append_text(tree, ", SYMLINK Reply");
@@ -5447,9 +5417,9 @@ dissect_nfs3_symlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
default:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", SYMLINK Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", SYMLINK Reply Error: %s", err);
break;
}
@@ -5457,7 +5427,7 @@ dissect_nfs3_symlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
-/* RFC 1813, Page 63..66 */
+/* NFSv3 RFC 1813, Page 63..66 */
static int
dissect_nfs3_mknod_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5468,28 +5438,30 @@ dissect_nfs3_mknod_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
const char *type_str;
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "where", &hash, &name);
- offset = dissect_ftype3(tvb, offset, tree, hf_nfs_ftype3, &type);
+ offset = dissect_ftype3(tvb, offset, tree, hf_nfs3_ftype, &type);
switch (type) {
case NF3CHR:
case NF3BLK:
- offset = dissect_sattr3(tvb, offset, tree, "dev_attributes");
- offset = dissect_specdata3(tvb, offset, tree, "spec");
+ offset = dissect_nfs3_sattr(tvb, offset, tree, "dev_attributes");
+ offset = dissect_nfs3_specdata(tvb, offset, tree, "spec");
break;
case NF3SOCK:
case NF3FIFO:
- offset = dissect_sattr3(tvb, offset, tree, "pipe_attributes");
+ offset = dissect_nfs3_sattr(tvb, offset, tree, "pipe_attributes");
break;
default:
/* nothing to do */
break;
}
- type_str=val_to_str_ext(type, &names_nfs_ftype3_ext, "Unknown type:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x/%s %s", hash, name, type_str);
- proto_item_append_text(tree, ", MKNOD Call FH:0x%08x/%s %s", hash, name, type_str);
+ type_str=val_to_str_ext(type, &names_nfs_ftype3_ext, "Unknown type: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x/%s %s", hash, name, type_str);
+ proto_item_append_text(tree, ", MKNOD Call FH: 0x%08x/%s %s", hash, name, type_str);
return offset;
}
+
+
static int
dissect_nfs3_mknod_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5497,11 +5469,11 @@ dissect_nfs3_mknod_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 status;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_post_op_fh3 (tvb, offset, pinfo, tree, "obj");
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_fh (tvb, offset, pinfo, tree, "obj");
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"obj_attributes");
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
proto_item_append_text(tree, ", MKNOD Reply");
@@ -5509,9 +5481,9 @@ dissect_nfs3_mknod_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
default:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", MKNOD Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", MKNOD Reply Error: %s", err);
break;
}
@@ -5519,7 +5491,7 @@ dissect_nfs3_mknod_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
-/* RFC 1813, Page 67..69 */
+/* NFSv3 RFC 1813, Page 67..69 */
static int
dissect_nfs3_remove_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -5527,7 +5499,7 @@ dissect_nfs3_remove_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 status;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
@@ -5535,14 +5507,16 @@ dissect_nfs3_remove_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
break;
default:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", REMOVE Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", REMOVE Reply Error: %s", err);
break;
}
return offset;
}
+
+
static int
dissect_nfs3_rmdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -5550,7 +5524,7 @@ dissect_nfs3_rmdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 status;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
@@ -5558,9 +5532,9 @@ dissect_nfs3_rmdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
break;
default:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", RMDIR Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", RMDIR Reply Error: %s", err);
break;
}
@@ -5568,7 +5542,7 @@ dissect_nfs3_rmdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1813, Page 71..74 */
+/* NFSv3 RFC 1813, Page 71..74 */
static int
dissect_nfs3_rename_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5581,14 +5555,16 @@ dissect_nfs3_rename_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "from", &from_hash, &from_name);
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "to", &to_hash, &to_name);
- col_append_fstr(pinfo->cinfo, COL_INFO,", From DH:0x%08x/%s To DH:0x%08x/%s", from_hash, from_name, to_hash, to_name);
- proto_item_append_text(tree, ", RENAME Call From DH:0x%08x/%s To DH:0x%08x/%s", from_hash, from_name, to_hash, to_name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", From DH: 0x%08x/%s To DH: 0x%08x/%s",
+ from_hash, from_name, to_hash, to_name);
+ proto_item_append_text(tree, ", RENAME Call From DH: 0x%08x/%s To DH: 0x%08x/%s",
+ from_hash, from_name, to_hash, to_name);
return offset;
}
-/* RFC 1813, Page 71..74 */
+/* NFSv3 RFC 1813, Page 71..74 */
static int
dissect_nfs3_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -5596,7 +5572,7 @@ dissect_nfs3_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 status;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "fromdir_wcc");
@@ -5607,9 +5583,9 @@ dissect_nfs3_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "fromdir_wcc");
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "todir_wcc");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", RENAME Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", RENAME Reply Error: %s", err);
break;
}
@@ -5617,7 +5593,7 @@ dissect_nfs3_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1813, Page 74..76 */
+/* NFSv3 RFC 1813, Page 74..76 */
static int
dissect_nfs3_link_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5626,17 +5602,19 @@ dissect_nfs3_link_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 to_hash = 0;
const char *to_name=NULL;
- offset = dissect_nfs_fh3 (tvb, offset, pinfo, tree, "file", &from_hash);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "file", &from_hash);
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "link", &to_hash, &to_name);
- col_append_fstr(pinfo->cinfo, COL_INFO,", From DH:0x%08x To DH:0x%08x/%s", from_hash, to_hash, to_name);
- proto_item_append_text(tree, ", LINK Call From DH:0x%08x To DH:0x%08x/%s", from_hash, to_hash, to_name);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", From DH: 0x%08x To DH: 0x%08x/%s",
+ from_hash, to_hash, to_name);
+ proto_item_append_text(tree, ", LINK Call From DH: 0x%08x To DH: 0x%08x/%s",
+ from_hash, to_hash, to_name);
return offset;
}
-/* RFC 1813, Page 74..76 */
+/* NFSv3 RFC 1813, Page 74..76 */
static int
dissect_nfs3_link_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -5644,22 +5622,22 @@ dissect_nfs3_link_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 status;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"file_attributes");
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "linkdir_wcc");
proto_item_append_text(tree, ", LINK Reply");
break;
default:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"file_attributes");
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "linkdir_wcc");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", LINK Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", LINK Reply Error: %s", err);
break;
}
@@ -5667,26 +5645,26 @@ dissect_nfs3_link_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1813, Page 76..80 */
+/* NFSv3 RFC 1813, Page 76..80 */
static int
dissect_nfs3_readdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
{
guint32 hash = 0;
- offset = dissect_nfs_fh3 (tvb, offset, pinfo, tree, "dir", &hash);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_cookie3, offset);
- offset = dissect_cookieverf3(tvb, offset, tree);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3, offset);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "dir", &hash);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_cookie, offset);
+ offset = dissect_nfs3_cookie_verf(tvb, offset, tree);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs3_count, offset);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", READDIR Call FH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", READDIR Call FH: 0x%08x", hash);
return offset;
}
-/* RFC 1813, Page 76..80 */
+/* NFSv3 RFC 1813, Page 76..80 */
static int
dissect_entry3(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -5702,29 +5680,25 @@ dissect_entry3(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
}
- offset = dissect_rpc_uint64(tvb, entry_tree, hf_nfs_readdir_entry3_fileid,
- offset);
+ offset = dissect_rpc_uint64(tvb, entry_tree, hf_nfs3_readdir_entry_fileid, offset);
- offset = dissect_filename3(tvb, offset, entry_tree,
- hf_nfs_readdir_entry3_name, &name);
+ offset = dissect_nfs3_filename(tvb, offset, entry_tree, hf_nfs3_readdir_entry_name, &name);
if (entry_item)
proto_item_set_text(entry_item, "Entry: name %s", name);
col_append_fstr(pinfo->cinfo, COL_INFO," %s", name);
- offset = dissect_rpc_uint64(tvb, entry_tree, hf_nfs_readdir_entry3_cookie,
- offset);
+ offset = dissect_rpc_uint64(tvb, entry_tree, hf_nfs3_readdir_entry_cookie, offset);
/* now we know, that a readdir entry is shorter */
- if (entry_item) {
+ if (entry_item)
proto_item_set_len(entry_item, offset - old_offset);
- }
return offset;
}
-/* RFC 1813, Page 76..80 */
+/* NFSv3 RFC 1813, Page 76..80 */
static int
dissect_nfs3_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5733,14 +5707,14 @@ dissect_nfs3_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 eof_value;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
proto_item_append_text(tree, ", READDIR Reply");
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"dir_attributes");
- offset = dissect_cookieverf3(tvb, offset, tree);
+ offset = dissect_nfs3_cookie_verf(tvb, offset, tree);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
dissect_entry3);
eof_value = tvb_get_ntohl(tvb, offset+0);
@@ -5750,12 +5724,12 @@ dissect_nfs3_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset += 4;
break;
default:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"dir_attributes");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", READDIR Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", READDIR Reply Error: %s", err);
break;
}
@@ -5763,31 +5737,31 @@ dissect_nfs3_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
-/* RFC 1813, Page 80..83 */
+/* NFSv3 RFC 1813, Page 80..83 */
static int
dissect_nfs3_readdirplus_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
{
guint32 hash = 0;
- offset = dissect_nfs_fh3 (tvb, offset, pinfo, tree, "dir", &hash);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_cookie3, offset);
- offset = dissect_cookieverf3(tvb, offset, tree);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3_dircount,
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "dir", &hash);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_cookie, offset);
+ offset = dissect_nfs3_cookie_verf(tvb, offset, tree);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs3_count_dircount,
offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3_maxcount,
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs3_count_maxcount,
offset);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", READDIRPLUS Call FH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", READDIRPLUS Call FH: 0x%08x", hash);
return offset;
}
-/* RFC 1813, Page 80..83 */
+/* NFSv3 RFC 1813, Page 80..83 */
static int
-dissect_entryplus3(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs3_entryplus(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
{
proto_item* entry_item = NULL;
@@ -5801,11 +5775,9 @@ dissect_entryplus3(tvbuff_t *tvb, int offset, packet_info *pinfo,
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
}
- offset = dissect_rpc_uint64(tvb, entry_tree,
- hf_nfs_readdirplus_entry_fileid, offset);
+ offset = dissect_rpc_uint64(tvb, entry_tree, hf_nfs3_readdirplus_entry_fileid, offset);
- offset = dissect_filename3(tvb, offset, entry_tree,
- hf_nfs_readdirplus_entry_name, &name);
+ offset = dissect_nfs3_filename(tvb, offset, entry_tree, hf_nfs3_readdirplus_entry_name, &name);
/* are we snooping fh to filenames ?*/
if((!pinfo->fd->flags.visited) && nfs_file_name_snooping){
@@ -5827,24 +5799,22 @@ dissect_entryplus3(tvbuff_t *tvb, int offset, packet_info *pinfo,
col_append_fstr(pinfo->cinfo, COL_INFO," %s", name);
- offset = dissect_rpc_uint64(tvb, entry_tree, hf_nfs_readdirplus_entry_cookie,
+ offset = dissect_rpc_uint64(tvb, entry_tree, hf_nfs3_readdirplus_entry_cookie,
offset);
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, entry_tree,
- "name_attributes");
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, entry_tree, "name_attributes");
- offset = dissect_post_op_fh3(tvb, offset, pinfo, entry_tree, "name_handle");
+ offset = dissect_nfs3_post_op_fh(tvb, offset, pinfo, entry_tree, "name_handle");
/* now we know, that a readdirplus entry is shorter */
- if (entry_item) {
+ if (entry_item)
proto_item_set_len(entry_item, offset - old_offset);
- }
return offset;
}
-/* RFC 1813, Page 80..83 */
+/* NFSv3 RFC 1813, Page 80..83 */
static int
dissect_nfs3_readdirplus_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -5853,16 +5823,16 @@ dissect_nfs3_readdirplus_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 eof_value;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
proto_item_append_text(tree, ", READDIRPLUS Reply");
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"dir_attributes");
- offset = dissect_cookieverf3(tvb, offset, tree);
+ offset = dissect_nfs3_cookie_verf(tvb, offset, tree);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
- dissect_entryplus3);
+ dissect_nfs3_entryplus);
eof_value = tvb_get_ntohl(tvb, offset+0);
if (tree)
proto_tree_add_uint(tree, hf_nfs_readdir_eof, tvb,
@@ -5870,12 +5840,12 @@ dissect_nfs3_readdirplus_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset += 4;
break;
default:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"dir_attributes");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", READDIRPLUS Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", READDIRPLUS Reply Error: %s", err);
break;
}
@@ -5883,17 +5853,17 @@ dissect_nfs3_readdirplus_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
-/* RFC 1813, Page 84..86 */
+/* NFSv3 RFC 1813, Page 84..86 */
static int
dissect_nfs3_fsstat_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
{
guint32 hash = 0;
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "object", &hash);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "object", &hash);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", FSSTAT Call DH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", FSSTAT Call DH: 0x%08x", hash);
return offset;
}
@@ -5906,38 +5876,38 @@ dissect_nfs3_fsstat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 invarsec;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"obj_attributes");
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_fsstat3_resok_tbytes,
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_fsstat_resok_tbytes,
offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_fsstat3_resok_fbytes,
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_fsstat_resok_fbytes,
offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_fsstat3_resok_abytes,
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_fsstat_resok_abytes,
offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_fsstat3_resok_tfiles,
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_fsstat_resok_tfiles,
offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_fsstat3_resok_ffiles,
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_fsstat_resok_ffiles,
offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_fsstat3_resok_afiles,
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_fsstat_resok_afiles,
offset);
invarsec = tvb_get_ntohl(tvb, offset + 0);
if (tree)
- proto_tree_add_uint(tree, hf_nfs_fsstat_invarsec, tvb,
+ proto_tree_add_uint(tree, hf_nfs3_fsstat_invarsec, tvb,
offset+0, 4, invarsec);
offset += 4;
proto_item_append_text(tree, ", FSSTAT Reply");
break;
default:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"obj_attributes");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", FSSTAT Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", FSSTAT Reply Error: %s", err);
break;
}
@@ -5950,76 +5920,84 @@ dissect_nfs3_fsstat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
#define FSF3_HOMOGENEOUS 0x0008
#define FSF3_CANSETTIME 0x0010
-static const true_false_string tfs_nfs_pathconf = { "is valid for all files", "should be get for every single file" };
+static const true_false_string tfs_nfs_pathconf =
+ { "is valid for all files", "should be get for every single file" };
-/* RFC 1813, Page 86..90 */
+
+/* NFSv3 RFC 1813, Page 86..90 */
static int
dissect_nfs3_fsinfo_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
{
guint32 hash = 0;
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "object", &hash);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "object", &hash);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", FSINFO Call DH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", FSINFO Call DH: 0x%08x", hash);
return offset;
}
+
+
static int
dissect_nfs3_fsinfo_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
{
guint32 status;
- proto_item* properties_item;
- proto_tree* properties_tree;
+ proto_item* properties_item = NULL;
+ proto_tree* properties_tree = NULL;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"obj_attributes");
- proto_tree_add_item(tree, hf_nfs_fsinfo_rtmax, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nfs3_fsinfo_rtmax, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item(tree, hf_nfs_fsinfo_rtpref, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nfs3_fsinfo_rtpref, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item(tree, hf_nfs_fsinfo_rtmult, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nfs3_fsinfo_rtmult, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item(tree, hf_nfs_fsinfo_wtmax, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nfs3_fsinfo_wtmax, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item(tree, hf_nfs_fsinfo_wtpref, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nfs3_fsinfo_wtpref, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item(tree, hf_nfs_fsinfo_wtmult, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nfs3_fsinfo_wtmult, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item(tree, hf_nfs_fsinfo_dtpref, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nfs3_fsinfo_dtpref, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- offset = dissect_rpc_uint64(tvb, tree,
- hf_nfs_fsinfo_maxfilesize, offset);
- offset = dissect_nfstime3(tvb, offset, tree, hf_nfs_dtime, hf_nfs_dtime_sec, hf_nfs_dtime_nsec);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_fsinfo_maxfilesize, offset);
+ offset = dissect_nfstime3(tvb, offset, tree, hf_nfs_dtime, hf_nfs_dtime_sec,
+ hf_nfs_dtime_nsec);
+
if (tree) {
- properties_item = proto_tree_add_item(tree, hf_nfs_fsinfo_properties,
+ properties_item = proto_tree_add_item(tree, hf_nfs3_fsinfo_properties,
tvb, offset, 4, ENC_BIG_ENDIAN);
- properties_tree = proto_item_add_subtree(properties_item,
- ett_nfs_fsinfo_properties);
+ properties_tree = proto_item_add_subtree(properties_item, ett_nfs3_fsinfo_properties);
- proto_tree_add_item(properties_tree, hf_nfs_fsinfo_properties_setattr, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(properties_tree, hf_nfs_fsinfo_properties_pathconf, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(properties_tree, hf_nfs_fsinfo_properties_symlinks, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(properties_tree, hf_nfs_fsinfo_properties_hardlinks, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(properties_tree, hf_nfs3_fsinfo_properties_setattr, tvb,
+ offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(properties_tree, hf_nfs3_fsinfo_properties_pathconf, tvb,
+ offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(properties_tree, hf_nfs3_fsinfo_properties_symlinks, tvb,
+ offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(properties_tree, hf_nfs3_fsinfo_properties_hardlinks, tvb,
+ offset, 4, ENC_BIG_ENDIAN);
}
offset += 4;
proto_item_append_text(tree, ", FSINFO Reply");
break;
default:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"obj_attributes");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", FSINFO Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", FSINFO Reply Error: %s", err);
break;
}
@@ -6027,19 +6005,21 @@ dissect_nfs3_fsinfo_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1813, Page 90..92 */
+/* NFSv3 RFC 1813, Page 90..92 */
static int
dissect_nfs3_pathconf_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
{
guint32 hash = 0;
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "object", &hash);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "object", &hash);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", PATHCONF Call DH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", PATHCONF Call DH: 0x%08x", hash);
return offset;
}
+
+
static int
dissect_nfs3_pathconf_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -6049,39 +6029,39 @@ dissect_nfs3_pathconf_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 name_max;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"obj_attributes");
linkmax = tvb_get_ntohl(tvb, offset + 0);
if (tree)
- proto_tree_add_uint(tree, hf_nfs_pathconf_linkmax, tvb,
+ proto_tree_add_uint(tree, hf_nfs3_pathconf_linkmax, tvb,
offset+0, 4, linkmax);
offset += 4;
name_max = tvb_get_ntohl(tvb, offset + 0);
if (tree)
- proto_tree_add_uint(tree, hf_nfs_pathconf_name_max, tvb,
+ proto_tree_add_uint(tree, hf_nfs3_pathconf_name_max, tvb,
offset+0, 4, name_max);
offset += 4;
offset = dissect_rpc_bool(tvb, tree,
- hf_nfs_pathconf_no_trunc, offset);
+ hf_nfs3_pathconf_no_trunc, offset);
offset = dissect_rpc_bool(tvb, tree,
- hf_nfs_pathconf_chown_restricted, offset);
+ hf_nfs3_pathconf_chown_restricted, offset);
offset = dissect_rpc_bool(tvb, tree,
- hf_nfs_pathconf_case_insensitive, offset);
+ hf_nfs3_pathconf_case_insensitive, offset);
offset = dissect_rpc_bool(tvb, tree,
- hf_nfs_pathconf_case_preserving, offset);
+ hf_nfs3_pathconf_case_preserving, offset);
proto_item_append_text(tree, ", PATHCONF Reply");
break;
default:
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree,
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
"obj_attributes");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", PATHCONF Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", PATHCONF Reply Error: %s", err);
break;
}
@@ -6089,25 +6069,25 @@ dissect_nfs3_pathconf_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
-/* RFC 1813, Page 92..95 */
+/* NFSv3 RFC 1813, Page 92..95 */
static int
dissect_nfs3_commit_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
{
guint32 hash = 0;
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "file", &hash);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_offset3, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3, offset);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "file", &hash);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_offset, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs3_count, offset);
- col_append_fstr(pinfo->cinfo, COL_INFO,", FH:0x%08x", hash);
- proto_item_append_text(tree, ", COMMIT Call FH:0x%08x", hash);
+ col_append_fstr(pinfo->cinfo, COL_INFO,", FH: 0x%08x", hash);
+ proto_item_append_text(tree, ", COMMIT Call FH: 0x%08x", hash);
return offset;
}
-/* RFC 1813, Page 92..95 */
+/* NFSv3 RFC 1813, Page 92..95 */
static int
dissect_nfs3_commit_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree* tree)
@@ -6115,38 +6095,39 @@ dissect_nfs3_commit_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 status;
const char *err;
- offset = dissect_nfsstat3(tvb, offset, tree, &status);
+ offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
case 0:
offset = dissect_wcc_data (tvb, offset, pinfo, tree, "file_wcc");
- offset = dissect_writeverf3(tvb, offset, tree);
+ offset = dissect_nfs3_write_verf(tvb, offset, tree);
proto_item_append_text(tree, ", COMMIT Reply");
break;
default:
offset = dissect_wcc_data(tvb, offset, pinfo, tree, "file_wcc");
- err=val_to_str_ext(status, &names_nfs_nfsstat3_ext, "Unknown error:%u");
- col_append_fstr(pinfo->cinfo, COL_INFO," Error:%s", err);
- proto_item_append_text(tree, ", COMMIT Reply Error:%s", err);
+ err = val_to_str_ext(status, &names_nfs3_status_ext, "Unknown error: %u");
+ col_append_fstr(pinfo->cinfo, COL_INFO," Error: %s", err);
+ proto_item_append_text(tree, ", COMMIT Reply Error: %s", err);
break;
}
return offset;
}
-/**********************************************************/
-/* NFS Version 4, RFC 3010 with nfs4_prot.x 1.103 changes */
-/**********************************************************/
-
-/* NFSv4 Draft Specification, Page 198-199 */
-static const value_string names_nfs_nfsstat4[] = {
+/*************************************************************************************
+* NFS Version 4.1, RFC 5661. Note that error 19 NFS4ERR_NOTDIR defined in RFC 3010
+* was eliminated in RFC 3530 (NFSv4) which replaced RFC 3010 and remains so in
+* RFC 5661. Nevertheless, it has been included in this table in the event that some
+* RFC 3010 implementations still exist out there.
+**************************************************************************************/
+static const value_string names_nfs4_status[] = {
{ 0, "NFS4_OK" },
{ 1, "NFS4ERR_PERM" },
{ 2, "NFS4ERR_NOENT" },
{ 5, "NFS4ERR_IO" },
{ 6, "NFS4ERR_NXIO" },
- { 13, "NFS4ERR_ACCES" },
+ { 13, "NFS4ERR_ACCESS" },
{ 17, "NFS4ERR_EXIST" },
{ 18, "NFS4ERR_XDEV" },
{ 19, "NFS4ERR_DQUOT" },
@@ -6249,31 +6230,24 @@ static const value_string names_nfs_nfsstat4[] = {
{ 10087, "NFS4ERR_DELEG_REVOKED" },
{ 0, NULL }
};
-static value_string_ext names_nfs_nfsstat4_ext = VALUE_STRING_EXT_INIT(names_nfs_nfsstat4);
-
+static value_string_ext names_nfs4_status_ext = VALUE_STRING_EXT_INIT(names_nfs4_status);
static int
-dissect_nfs_nfsstat4(tvbuff_t *tvb, int offset,
- proto_tree *tree, guint32 *status)
+dissect_nfs4_status(tvbuff_t *tvb, int offset, proto_tree *tree, guint32 *status)
{
guint32 stat;
- proto_item *stat_item;
+ proto_item *stat_item = NULL;
stat = tvb_get_ntohl(tvb, offset+0);
- if (tree) {
- proto_tree_add_uint(tree, hf_nfs_nfsstat4, tvb, offset+0, 4,
- stat);
- stat_item = proto_tree_add_uint(tree, hf_nfs_nfsstat, tvb,
- offset+0, 4, stat);
- PROTO_ITEM_SET_HIDDEN(stat_item);
- }
-
- offset += 4;
+ proto_tree_add_uint(tree, hf_nfs4_status, tvb, offset+0, 4, stat);
+ stat_item = proto_tree_add_uint(tree, hf_nfs_status, tvb, offset+0, 4, stat);
+ PROTO_ITEM_SET_HIDDEN(stat_item);
- if (status) *status = stat;
+ if (status)
+ *status = stat;
- return offset;
+ return offset + 4;
}
@@ -6285,28 +6259,30 @@ dissect_nfs_utf8string(tvbuff_t *tvb, int offset,
return dissect_rpc_string(tvb, tree, hf, offset, string_ret);
}
+
static int
-dissect_nfs_deviceid4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_deviceid(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_nfs_deviceid4, tvb, offset, 16, ENC_NA);
+ proto_tree_add_item(tree, hf_nfs4_deviceid, tvb, offset, 16, ENC_NA);
offset += 16;
return offset;
}
+
static int
-dissect_nfs_sessionid4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_sessionid(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_nfs_sessionid4, tvb, offset, 16, ENC_NA);
+ proto_tree_add_item(tree, hf_nfs4_sessionid, tvb, offset, 16, ENC_NA);
offset += 16;
return offset;
}
+
static int
-dissect_nfs_specdata4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_specdata(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_specdata1, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_specdata2, offset);
-
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_specdata1, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_specdata2, offset);
return offset;
}
@@ -6323,24 +6299,24 @@ static const value_string names_ftype4[] = {
{ 0, NULL }
};
+
static int
-dissect_nfs_lock_owner4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_lock_owner(tvbuff_t *tvb, int offset, proto_tree *tree)
{
proto_tree *newftree = NULL;
proto_item *fitem = NULL;
fitem = proto_tree_add_text(tree, tvb, offset, 4, "Owner");
-
- newftree = proto_item_add_subtree(fitem, ett_nfs_lock_owner4);
-
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_clientid4, offset);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_lock_owner);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_clientid, offset);
offset = dissect_nfsdata(tvb, offset, newftree, hf_nfs_data);
return offset;
}
+
static int
-dissect_nfs_pathname4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_pathname(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint32 comp_count, i;
proto_item *fitem = NULL;
@@ -6351,22 +6327,24 @@ dissect_nfs_pathname4(tvbuff_t *tvb, int offset, proto_tree *tree)
"pathname components (%u)", comp_count);
offset += 4;
- newftree = proto_item_add_subtree(fitem, ett_nfs_pathname4);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_pathname);
for (i = 0; i < comp_count; i++)
- offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs_component4, NULL);
+ offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_component, NULL);
return offset;
}
+
static int
-dissect_nfs_nfstime4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_nfstime(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_nfstime4_seconds, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_nfstime4_nseconds, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_time_seconds, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_time_nseconds, offset);
return offset;
}
+
static const value_string names_time_how4[] = {
#define SET_TO_SERVER_TIME4 0
{ SET_TO_SERVER_TIME4, "SET_TO_SERVER_TIME4" },
@@ -6376,73 +6354,68 @@ static const value_string names_time_how4[] = {
};
static int
-dissect_nfs_settime4(tvbuff_t *tvb, int offset,
+dissect_nfs4_settime(tvbuff_t *tvb, int offset,
proto_tree *tree, const char *name _U_)
{
guint32 set_it;
set_it = tvb_get_ntohl(tvb, offset);
- proto_tree_add_uint(tree, hf_nfs_time_how4, tvb, offset+0,
- 4, set_it);
+ proto_tree_add_uint(tree, hf_nfs4_time_how, tvb, offset+0, 4, set_it);
offset += 4;
if (set_it == SET_TO_CLIENT_TIME4)
- offset = dissect_nfs_nfstime4(tvb, offset, tree);
+ offset = dissect_nfs4_nfstime(tvb, offset, tree);
return offset;
}
+
static int
-dissect_nfs_fsid4(tvbuff_t *tvb, int offset, proto_tree *tree, const char *name)
+dissect_nfs4_fsid(tvbuff_t *tvb, int offset, proto_tree *tree, const char *name)
{
proto_tree *newftree = NULL;
proto_item *fitem = NULL;
fitem = proto_tree_add_text(tree, tvb, offset, 0, "%s", name);
-
- newftree = proto_item_add_subtree(fitem, ett_nfs_fsid4);
-
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_fsid4_major,
- offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_fsid4_minor,
- offset);
-
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_fsid);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_fsid_major, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_fsid_minor, offset);
return offset;
}
static const value_string names_acetype4[] = {
-#define ACE4_ACCESS_ALLOWED_ACE_TYPE 0x00000000
+#define ACE4_ACCESS_ALLOWED_ACE_TYPE 0x00000000
{ ACE4_ACCESS_ALLOWED_ACE_TYPE, "ACE4_ACCESS_ALLOWED_ACE_TYPE" },
-#define ACE4_ACCESS_DENIED_ACE_TYPE 0x00000001
- { ACE4_ACCESS_DENIED_ACE_TYPE, "ACE4_ACCESS_DENIED_ACE_TYPE" },
-#define ACE4_SYSTEM_AUDIT_ACE_TYPE 0x00000002
- { ACE4_SYSTEM_AUDIT_ACE_TYPE, "ACE4_SYSTEM_AUDIT_ACE_TYPE" },
-#define ACE4_SYSTEM_ALARM_ACE_TYPE 0x00000003
- { ACE4_SYSTEM_ALARM_ACE_TYPE, "ACE4_SYSTEM_ALARM_ACE_TYPE" },
+#define ACE4_ACCESS_DENIED_ACE_TYPE 0x00000001
+ { ACE4_ACCESS_DENIED_ACE_TYPE, "ACE4_ACCESS_DENIED_ACE_TYPE" },
+#define ACE4_SYSTEM_AUDIT_ACE_TYPE 0x00000002
+ { ACE4_SYSTEM_AUDIT_ACE_TYPE, "ACE4_SYSTEM_AUDIT_ACE_TYPE" },
+#define ACE4_SYSTEM_ALARM_ACE_TYPE 0x00000003
+ { ACE4_SYSTEM_ALARM_ACE_TYPE, "ACE4_SYSTEM_ALARM_ACE_TYPE" },
{ 0, NULL }
};
/* ACE mask values */
-#define ACE4_READ_DATA 0x00000001
-#define ACE4_LIST_DIRECTORY 0x00000001
-#define ACE4_WRITE_DATA 0x00000002
-#define ACE4_ADD_FILE 0x00000002
-#define ACE4_APPEND_DATA 0x00000004
-#define ACE4_ADD_SUBDIRECTORY 0x00000004
-#define ACE4_READ_NAMED_ATTRS 0x00000008
-#define ACE4_WRITE_NAMED_ATTRS 0x00000010
-#define ACE4_EXECUTE 0x00000020
-#define ACE4_DELETE_CHILD 0x00000040
-#define ACE4_READ_ATTRIBUTES 0x00000080
-#define ACE4_WRITE_ATTRIBUTES 0x00000100
-#define ACE4_DELETE 0x00010000
-#define ACE4_READ_ACL 0x00020000
-#define ACE4_WRITE_ACL 0x00040000
-#define ACE4_WRITE_OWNER 0x00080000
-#define ACE4_SYNCHRONIZE 0x00100000
-
-static int
-dissect_nfs_acemask4(tvbuff_t *tvb, int offset, proto_tree *tree)
+#define ACE4_READ_DATA 0x00000001
+#define ACE4_LIST_DIRECTORY 0x00000001
+#define ACE4_WRITE_DATA 0x00000002
+#define ACE4_ADD_FILE 0x00000002
+#define ACE4_APPEND_DATA 0x00000004
+#define ACE4_ADD_SUBDIRECTORY 0x00000004
+#define ACE4_READ_NAMED_ATTRS 0x00000008
+#define ACE4_WRITE_NAMED_ATTRS 0x00000010
+#define ACE4_EXECUTE 0x00000020
+#define ACE4_DELETE_CHILD 0x00000040
+#define ACE4_READ_ATTRIBUTES 0x00000080
+#define ACE4_WRITE_ATTRIBUTES 0x00000100
+#define ACE4_DELETE 0x00010000
+#define ACE4_READ_ACL 0x00020000
+#define ACE4_WRITE_ACL 0x00040000
+#define ACE4_WRITE_OWNER 0x00080000
+#define ACE4_SYNCHRONIZE 0x00100000
+
+static int
+dissect_nfs4_acemask(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint32 acemask;
proto_item *acemask_item = NULL;
@@ -6454,7 +6427,7 @@ dissect_nfs_acemask4(tvbuff_t *tvb, int offset, proto_tree *tree)
"acemask: 0x%08x", acemask);
if (acemask_item)
- acemask_tree = proto_item_add_subtree(acemask_item, ett_nfs_acemask4);
+ acemask_tree = proto_item_add_subtree(acemask_item, ett_nfs4_acemask);
if (acemask_tree)
{
@@ -6535,18 +6508,17 @@ dissect_nfs_acemask4(tvbuff_t *tvb, int offset, proto_tree *tree)
}
/* ACE flag values */
-#define ACE4_FILE_INHERIT_ACE 0x00000001
-#define ACE4_DIRECTORY_INHERIT_ACE 0x00000002
-#define ACE4_NO_PROPAGATE_INHERIT_ACE 0x00000004
-#define ACE4_INHERIT_ONLY_ACE 0x00000008
-#define ACE4_SUCCESSFUL_ACCESS_ACE_FLAG 0x00000010
-#define ACE4_FAILED_ACCESS_ACE_FLAG 0x00000020
-#define ACE4_IDENTIFIER_GROUP 0x00000040
-#define ACE4_INHERITED_ACE 0x00000080
-
+#define ACE4_FILE_INHERIT_ACE 0x00000001
+#define ACE4_DIRECTORY_INHERIT_ACE 0x00000002
+#define ACE4_NO_PROPAGATE_INHERIT_ACE 0x00000004
+#define ACE4_INHERIT_ONLY_ACE 0x00000008
+#define ACE4_SUCCESSFUL_ACCESS_ACE_FLAG 0x00000010
+#define ACE4_FAILED_ACCESS_ACE_FLAG 0x00000020
+#define ACE4_IDENTIFIER_GROUP 0x00000040
+#define ACE4_INHERITED_ACE 0x00000080
static int
-dissect_nfs_ace4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs4_ace(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
proto_item* ace_item = NULL;
@@ -6559,10 +6531,10 @@ dissect_nfs_ace4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
ace_item = proto_tree_add_text(tree, tvb, offset, 4,
"ACE");
- ace_tree = proto_item_add_subtree(ace_item, ett_nfs_ace4);
+ ace_tree = proto_item_add_subtree(ace_item, ett_nfs4_ace);
}
- offset = dissect_rpc_uint32(tvb, ace_tree, hf_nfs_acetype4, offset);
+ offset = dissect_rpc_uint32(tvb, ace_tree, hf_nfs4_acetype, offset);
if (ace_tree) {
aceflag4 = tvb_get_ntohl(tvb, offset);
@@ -6572,7 +6544,7 @@ dissect_nfs_ace4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
if (aceflag_item)
{
- aceflag_tree = proto_item_add_subtree(aceflag_item, ett_nfs_aceflag4);
+ aceflag_tree = proto_item_add_subtree(aceflag_item, ett_nfs4_aceflag);
if (aceflag_tree)
{
@@ -6615,36 +6587,39 @@ dissect_nfs_ace4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
offset += 4;
- offset = dissect_nfs_acemask4(tvb, offset, ace_tree);
+ offset = dissect_nfs4_acemask(tvb, offset, ace_tree);
- offset = dissect_nfs_utf8string(tvb, offset, ace_tree, hf_nfs_who, NULL);
+ offset = dissect_nfs_utf8string(tvb, offset, ace_tree, hf_nfs4_who, NULL);
return offset;
}
+
static int
-dissect_nfs_fattr4_acl(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree)
+dissect_nfs4_fattr_acl(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- return dissect_rpc_array(tvb, pinfo, tree, offset, dissect_nfs_ace4,
- hf_nfs_acl4);
+ return dissect_rpc_array(tvb, pinfo, tree, offset, dissect_nfs4_ace,
+ hf_nfs4_acl);
}
+
static int
-dissect_nfs_fh4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs4_fh(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, const char *name, guint32 *hash)
{
- return dissect_nfs_fh3(tvb, offset, pinfo, tree, name, hash);
+ return dissect_nfs3_fh(tvb, offset, pinfo, tree, name, hash);
}
+
static int
-dissect_nfs_server4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
+dissect_nfs4_server(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
{
- return dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_server, NULL);
+ return dissect_nfs_utf8string(tvb, offset, tree, hf_nfs4_server, NULL);
}
+
static int
-dissect_nfs_fs_location4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs4_fs_location(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
proto_tree *newftree = NULL;
@@ -6652,40 +6627,42 @@ dissect_nfs_fs_location4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
fitem = proto_tree_add_text(tree, tvb, offset, 0, "fs_location4");
- newftree = proto_item_add_subtree(fitem, ett_nfs_fs_location4);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_fs_location);
- offset = dissect_rpc_array(tvb, pinfo, newftree, offset, dissect_nfs_server4, hf_nfs_server);
- offset = dissect_nfs_pathname4(tvb, offset, newftree);
+ offset = dissect_rpc_array(tvb, pinfo, newftree, offset, dissect_nfs4_server, hf_nfs4_server);
+ offset = dissect_nfs4_pathname(tvb, offset, newftree);
return offset;
}
+
static int
-dissect_nfs_fs_locations4(tvbuff_t *tvb, packet_info *pinfo, int offset,
+dissect_nfs4_fs_locations(tvbuff_t *tvb, packet_info *pinfo, int offset,
proto_tree *tree, const char *name)
{
proto_tree *newftree = NULL;
proto_item *fitem = NULL;
fitem = proto_tree_add_text(tree, tvb, offset, 0, "%s", name);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_fs_locations);
- newftree = proto_item_add_subtree(fitem, ett_nfs_fs_locations4);
-
- offset = dissect_nfs_pathname4(tvb, offset, newftree);
+ offset = dissect_nfs4_pathname(tvb, offset, newftree);
offset = dissect_rpc_array(tvb, pinfo, newftree, offset,
- dissect_nfs_fs_location4, hf_nfs_fslocation4);
+ dissect_nfs4_fs_location, hf_nfs4_fslocation);
return offset;
}
+
static int
-dissect_nfs_mode4(tvbuff_t *tvb, int offset,
+dissect_nfs4_mode(tvbuff_t *tvb, int offset,
proto_tree *tree, const char *name)
{
- return dissect_mode(tvb, offset, tree, name);
+ return dissect_nfs2_mode(tvb, offset, tree, name);
}
+
static const value_string nfs4_fattr4_fh_expire_type_names[] = {
#define FH4_PERSISTENT 0x00000000
{ FH4_PERSISTENT, "FH4_PERSISTENT" },
@@ -6702,7 +6679,7 @@ static const value_string nfs4_fattr4_fh_expire_type_names[] = {
static int
-dissect_nfs_fattr4_fh_expire_type(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_fattr_fh_expire_type(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint32 expire_type;
proto_item *expire_type_item = NULL;
@@ -6716,7 +6693,7 @@ dissect_nfs_fattr4_fh_expire_type(tvbuff_t *tvb, int offset, proto_tree *tree)
"fattr4_fh_expire_type: 0x%08x", expire_type);
expire_type_tree = proto_item_add_subtree(expire_type_item,
- ett_nfs_fattr4_fh_expire_type);
+ ett_nfs4_fattr_fh_expire_type);
}
if (expire_type_tree)
@@ -6760,6 +6737,7 @@ dissect_nfs_fattr4_fh_expire_type(tvbuff_t *tvb, int offset, proto_tree *tree)
return offset;
}
+
static int
dissect_nfs_fs_layout_type(tvbuff_t *tvb, proto_tree *tree, int offset)
{
@@ -6769,12 +6747,13 @@ dissect_nfs_fs_layout_type(tvbuff_t *tvb, proto_tree *tree, int offset)
offset +=4;
for (i = 0; i < count; i++) {
- offset += dissect_rpc_uint32(tvb, tree, hf_nfs_layouttype4, offset);
+ offset += dissect_rpc_uint32(tvb, tree, hf_nfs4_layout_type, offset);
}
return offset;
}
+
static const value_string names_fattr4[] = {
#define FATTR4_SUPPORTED_ATTRS 0
{ FATTR4_SUPPORTED_ATTRS, "FATTR4_SUPPORTED_ATTRS" },
@@ -6936,10 +6915,17 @@ static const value_string names_fattr4[] = {
};
#define FATTR4_BITMAP_ONLY 0
-#define FATTR4_FULL_DISSECT 1
-/* XXX - What's a good maximum? Linux appears to use 10.
- * FreeBSD appears to use 2. OpenSolaris appears to use 2. */
-#define MAX_BITMAP_LEN 10
+#define FATTR4_DISSECT_VALUES 1
+
+/* As of NFSv4.1 (RFC 5661) The maximum number of attribute bitmaps is 3 in that NFSv4.1 introduced
+* attribute numbers in excess of 63 (e.g., FATTR4_FS_CHARSET_CAP = 76):
+ *
+ * 1 2 3
+ * +-------------+----------+----------+----------+
+ * | num_bitmaps | 31 .. 0 | 63 .. 32 | 95 .. 64 |
+ * +-------------+----------+----------+----------+
+ */
+#define MAX_BITMAPS 3
static int
dissect_nfs4_bitmap4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree,
@@ -6959,20 +6945,22 @@ dissect_nfs4_bitmap4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tr
for(i = 0; i < bitmap_size; i++) {
current_bitmap = tvb_get_ntohl(tvb, offset);
(*bitmap)[i] = current_bitmap;
- bitmap_item = proto_tree_add_text(tree, tvb, offset, 4, "bitmap[%u] = 0x%08x", i, current_bitmap);
- bitmap_tree = proto_item_add_subtree(bitmap_item, ett_nfs_bitmap4);
+ bitmap_item = proto_tree_add_text(tree, tvb, offset, 4, "bitmap[%u] = 0x%08x",
+ i, current_bitmap);
+ bitmap_tree = proto_item_add_subtree(bitmap_item, ett_nfs4_bitmap);
for(count = 0; current_bitmap; current_bitmap >>= 1) {
count += current_bitmap & 1;
}
current_bitmap = (*bitmap)[i];
- proto_tree_add_text(bitmap_tree, tvb, offset, 4, "[%u attribute%s requested]", count, plurality(count, "", "s"));
+ proto_tree_add_text(bitmap_tree, tvb, offset, 4, "[%u attribute%s requested]",
+ count, plurality(count, "", "s"));
*attr_count += count;
bitmask = 0x00000001;
for(j = 0; j < 32; j++) {
attribute_number = 32*i + j;
if((current_bitmap & bitmask) == bitmask) {
proto_tree_add_uint(bitmap_tree,
- (attribute_number < FATTR4_ACL) ? hf_nfs_mand_attr : hf_nfs_recc_attr,
+ (attribute_number < FATTR4_ACL) ? hf_nfs4_mand_attr : hf_nfs4_recc_attr,
tvb, offset, 4, attribute_number);
}
bitmask <<= 1;
@@ -6983,8 +6971,10 @@ dissect_nfs4_bitmap4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tr
return offset;
}
+
static int
-dissect_nfs4_attr_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, guint8 flag)
+dissect_nfs4_attr_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree,
+ guint8 flag)
{
guint32 bitmap_size = 0;
guint32 *bitmap = NULL;
@@ -6994,31 +6984,35 @@ dissect_nfs4_attr_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, pro
proto_tree *ar_tree = NULL;
bitmap_size = tvb_get_ntohl(tvb, offset);
- if(bitmap_size > MAX_BITMAP_LEN) {
+ if(bitmap_size > MAX_BITMAPS) {
proto_tree_add_text(tree, tvb, offset, 4, "attr_request length is too big: %u", bitmap_size);
THROW(ReportedBoundsError);
}
tvb_ensure_bytes_exist(tvb, offset, 4 + bitmap_size * 4);
offset += 4;
- ar_item = proto_tree_add_text(tree, tvb, offset, bitmap_size * 4, "%s", flag?"attr_request":"attrmask");
- ar_tree = proto_item_add_subtree(ar_item, ett_nfs_attr_request);
+ ar_item = proto_tree_add_text(tree, tvb, offset, bitmap_size * 4, "%s",
+ flag?"attr_request":"attrmask");
+ ar_tree = proto_item_add_subtree(ar_item, ett_nfs4_attr_request);
offset = dissect_nfs4_bitmap4(tvb, offset, pinfo, ar_tree, bitmap_size, &bitmap, &attr_count);
return offset;
}
+
static int
dissect_nfs4_security_label(tvbuff_t *tvb, proto_tree *tree, int offset)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_fattr4_security_label_lfs, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_fattr4_security_label_pi, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_fattr_security_label_lfs, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_fattr_security_label_pi, offset);
offset = dissect_nfs_utf8string(tvb, offset, tree,
- hf_nfs_fattr4_security_label_context, NULL);
+ hf_nfs4_fattr_security_label_context, NULL);
return offset;
}
+
+
static int
dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, int type)
@@ -7036,7 +7030,7 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
int attr_vals_offset;
bitmap_len = tvb_get_ntohl(tvb, offset);
- if (bitmap_len > MAX_BITMAP_LEN) {
+ if (bitmap_len > MAX_BITMAPS) {
proto_tree_add_text(tree, tvb, offset, 4,
"Huge bitmap length: %u", bitmap_len);
THROW(ReportedBoundsError);
@@ -7046,7 +7040,7 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
"%s", "attrmask");
offset += 4;
- newftree = proto_item_add_subtree(fitem, ett_nfs_bitmap4);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_bitmap);
attr_vals_offset = offset + 4 + bitmap_len * 4;
@@ -7066,12 +7060,12 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
/* switch label if attribute is recommended vs. mandatory */
attr_fitem = proto_tree_add_uint(newftree,
- (fattr < FATTR4_ACL)? hf_nfs_mand_attr: hf_nfs_recc_attr,
+ (fattr < FATTR4_ACL)? hf_nfs4_mand_attr: hf_nfs4_recc_attr,
tvb, offset, 4, fattr);
- attr_newftree = proto_item_add_subtree(attr_fitem, ett_nfs_bitmap4);
+ attr_newftree = proto_item_add_subtree(attr_fitem, ett_nfs4_bitmap);
- if (type == FATTR4_FULL_DISSECT)
+ if (type == FATTR4_DISSECT_VALUES)
{
/* do a full decode of the arguments for the set flag */
switch(fattr)
@@ -7084,252 +7078,252 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
case FATTR4_TYPE:
attr_vals_offset = dissect_rpc_uint32(tvb,
- attr_newftree, hf_nfs_ftype4, attr_vals_offset);
+ attr_newftree, hf_nfs4_ftype, attr_vals_offset);
break;
case FATTR4_FH_EXPIRE_TYPE:
- attr_vals_offset = dissect_nfs_fattr4_fh_expire_type(tvb,
+ attr_vals_offset = dissect_nfs4_fattr_fh_expire_type(tvb,
attr_vals_offset, attr_newftree);
break;
case FATTR4_CHANGE:
attr_vals_offset = dissect_rpc_uint64(tvb, attr_newftree,
- hf_nfs_changeid4, attr_vals_offset);
+ hf_nfs4_changeid, attr_vals_offset);
break;
case FATTR4_SIZE:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_size, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_size, attr_vals_offset);
break;
case FATTR4_LINK_SUPPORT:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_link_support,
+ attr_newftree, hf_nfs4_fattr_link_support,
attr_vals_offset);
break;
case FATTR4_SYMLINK_SUPPORT:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_symlink_support,
+ attr_newftree, hf_nfs4_fattr_symlink_support,
attr_vals_offset);
break;
case FATTR4_NAMED_ATTR:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_named_attr, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_named_attr, attr_vals_offset);
break;
case FATTR4_FSID:
- attr_vals_offset = dissect_nfs_fsid4(tvb, attr_vals_offset,
+ attr_vals_offset = dissect_nfs4_fsid(tvb, attr_vals_offset,
attr_newftree, "fattr4_fsid");
break;
case FATTR4_UNIQUE_HANDLES:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_unique_handles,
+ attr_newftree, hf_nfs4_fattr_unique_handles,
attr_vals_offset);
break;
case FATTR4_LEASE_TIME:
attr_vals_offset = dissect_rpc_uint32(tvb,
- attr_newftree, hf_nfs_fattr4_lease_time,
+ attr_newftree, hf_nfs4_fattr_lease_time,
attr_vals_offset);
break;
case FATTR4_RDATTR_ERROR:
- attr_vals_offset = dissect_nfs_nfsstat4(tvb,
+ attr_vals_offset = dissect_nfs4_status(tvb,
attr_vals_offset, attr_newftree, NULL);
break;
case FATTR4_ACL:
- attr_vals_offset = dissect_nfs_fattr4_acl(tvb,
+ attr_vals_offset = dissect_nfs4_fattr_acl(tvb,
attr_vals_offset, pinfo, attr_newftree);
break;
case FATTR4_ACLSUPPORT:
attr_vals_offset = dissect_rpc_uint32(tvb,
- attr_newftree, hf_nfs_fattr4_aclsupport,
+ attr_newftree, hf_nfs4_fattr_aclsupport,
attr_vals_offset);
break;
case FATTR4_ARCHIVE:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_archive,
+ attr_newftree, hf_nfs4_fattr_archive,
attr_vals_offset);
break;
case FATTR4_CANSETTIME:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_cansettime, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_cansettime, attr_vals_offset);
break;
case FATTR4_CASE_INSENSITIVE:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_case_insensitive,
+ attr_newftree, hf_nfs4_fattr_case_insensitive,
attr_vals_offset);
break;
case FATTR4_CASE_PRESERVING:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_case_preserving,
+ attr_newftree, hf_nfs4_fattr_case_preserving,
attr_vals_offset);
break;
case FATTR4_CHOWN_RESTRICTED:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_chown_restricted,
+ attr_newftree, hf_nfs4_fattr_chown_restricted,
attr_vals_offset);
break;
case FATTR4_FILEID:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_fileid, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_fileid, attr_vals_offset);
break;
case FATTR4_FILES_AVAIL:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_files_avail,
+ attr_newftree, hf_nfs4_fattr_files_avail,
attr_vals_offset);
break;
case FATTR4_FILEHANDLE:
- attr_vals_offset = dissect_nfs_fh4(tvb, attr_vals_offset,
+ attr_vals_offset = dissect_nfs4_fh(tvb, attr_vals_offset,
pinfo, attr_newftree, "fattr4_filehandle", NULL);
break;
case FATTR4_FILES_FREE:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_files_free, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_files_free, attr_vals_offset);
break;
case FATTR4_FILES_TOTAL:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_files_total,
+ attr_newftree, hf_nfs4_fattr_files_total,
attr_vals_offset);
break;
case FATTR4_FS_LOCATIONS:
- attr_vals_offset = dissect_nfs_fs_locations4(tvb, pinfo,
+ attr_vals_offset = dissect_nfs4_fs_locations(tvb, pinfo,
attr_vals_offset, attr_newftree,
"fattr4_fs_locations");
break;
case FATTR4_HIDDEN:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_hidden, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_hidden, attr_vals_offset);
break;
case FATTR4_HOMOGENEOUS:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_homogeneous,
+ attr_newftree, hf_nfs4_fattr_homogeneous,
attr_vals_offset);
break;
case FATTR4_MAXFILESIZE:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_maxfilesize,
+ attr_newftree, hf_nfs4_fattr_maxfilesize,
attr_vals_offset);
break;
case FATTR4_MAXLINK:
attr_vals_offset = dissect_rpc_uint32(tvb,
- attr_newftree, hf_nfs_fattr4_maxlink, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_maxlink, attr_vals_offset);
break;
case FATTR4_MAXNAME:
attr_vals_offset = dissect_rpc_uint32(tvb,
- attr_newftree, hf_nfs_fattr4_maxname, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_maxname, attr_vals_offset);
break;
case FATTR4_MAXREAD:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_maxread, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_maxread, attr_vals_offset);
break;
case FATTR4_MAXWRITE:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_maxwrite, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_maxwrite, attr_vals_offset);
break;
case FATTR4_MIMETYPE:
attr_vals_offset = dissect_nfs_utf8string(tvb,
attr_vals_offset, attr_newftree,
- hf_nfs_fattr4_mimetype, NULL);
+ hf_nfs4_fattr_mimetype, NULL);
break;
case FATTR4_MODE:
- attr_vals_offset = dissect_nfs_mode4(tvb,
+ attr_vals_offset = dissect_nfs4_mode(tvb,
attr_vals_offset, attr_newftree, "fattr4_mode");
break;
case FATTR4_NO_TRUNC:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_no_trunc, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_no_trunc, attr_vals_offset);
break;
case FATTR4_NUMLINKS:
attr_vals_offset = dissect_rpc_uint32(tvb,
- attr_newftree, hf_nfs_fattr4_numlinks, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_numlinks, attr_vals_offset);
break;
case FATTR4_OWNER:
attr_vals_offset = dissect_nfs_utf8string(tvb,
attr_vals_offset, attr_newftree,
- hf_nfs_fattr4_owner,
+ hf_nfs4_fattr_owner,
NULL);
break;
case FATTR4_OWNER_GROUP:
attr_vals_offset = dissect_nfs_utf8string(tvb,
attr_vals_offset, attr_newftree,
- hf_nfs_fattr4_owner_group, NULL);
+ hf_nfs4_fattr_owner_group, NULL);
break;
case FATTR4_QUOTA_AVAIL_HARD:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_quota_hard, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_quota_hard, attr_vals_offset);
break;
case FATTR4_QUOTA_AVAIL_SOFT:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_quota_soft, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_quota_soft, attr_vals_offset);
break;
case FATTR4_QUOTA_USED:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_quota_used, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_quota_used, attr_vals_offset);
break;
case FATTR4_RAWDEV:
- attr_vals_offset = dissect_nfs_specdata4(tvb,
+ attr_vals_offset = dissect_nfs4_specdata(tvb,
attr_vals_offset, attr_newftree);
break;
case FATTR4_SPACE_AVAIL:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_space_avail,
+ attr_newftree, hf_nfs4_fattr_space_avail,
attr_vals_offset);
break;
case FATTR4_SPACE_FREE:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_space_free, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_space_free, attr_vals_offset);
break;
case FATTR4_SPACE_TOTAL:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_space_total,
+ attr_newftree, hf_nfs4_fattr_space_total,
attr_vals_offset);
break;
case FATTR4_SPACE_USED:
attr_vals_offset = dissect_rpc_uint64(tvb,
- attr_newftree, hf_nfs_fattr4_space_used, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_space_used, attr_vals_offset);
break;
case FATTR4_SYSTEM:
attr_vals_offset = dissect_rpc_bool(tvb,
- attr_newftree, hf_nfs_fattr4_system, attr_vals_offset);
+ attr_newftree, hf_nfs4_fattr_system, attr_vals_offset);
break;
case FATTR4_TIME_ACCESS:
@@ -7338,18 +7332,18 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
case FATTR4_TIME_DELTA:
case FATTR4_TIME_METADATA:
case FATTR4_TIME_MODIFY:
- attr_vals_offset = dissect_nfs_nfstime4(tvb, attr_vals_offset,
+ attr_vals_offset = dissect_nfs4_nfstime(tvb, attr_vals_offset,
attr_newftree);
break;
case FATTR4_TIME_ACCESS_SET:
case FATTR4_TIME_MODIFY_SET:
- attr_vals_offset = dissect_nfs_settime4(tvb,
+ attr_vals_offset = dissect_nfs4_settime(tvb,
attr_vals_offset, attr_newftree, "settime4");
break;
case FATTR4_MOUNTED_ON_FILEID:
attr_vals_offset = dissect_rpc_uint64(tvb, attr_newftree,
- hf_nfs_fattr4_mounted_on_fileid, attr_vals_offset);
+ hf_nfs4_fattr_mounted_on_fileid, attr_vals_offset);
break;
case FATTR4_FS_LAYOUT_TYPE:
attr_vals_offset = dissect_nfs_fs_layout_type(tvb, attr_newftree,
@@ -7357,7 +7351,7 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
break;
case FATTR4_LAYOUT_BLKSIZE:
attr_vals_offset = dissect_rpc_uint32(tvb, attr_newftree,
- hf_nfs_fattr4_layout_blksize, attr_vals_offset);
+ hf_nfs4_fattr_layout_blksize, attr_vals_offset);
break;
case FATTR4_SECURITY_LABEL:
@@ -7379,14 +7373,16 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
return offset;
}
+
static int
-dissect_nfs4_attribute(tvbuff_t *tvb, int offset, packet_info *pinfo , proto_tree *tree, guint32 attribute_number)
+dissect_nfs4_attribute(tvbuff_t *tvb, int offset, packet_info *pinfo , proto_tree *tree,
+ guint32 attribute_number)
{
- proto_item *attribute_item;
- proto_tree *attribute_tree;
+ proto_item *attribute_item = NULL;
+ proto_tree *attribute_tree = NULL;
attribute_item = proto_tree_add_uint(tree,
- (attribute_number < FATTR4_ACL) ? hf_nfs_mand_attr : hf_nfs_recc_attr,
+ (attribute_number < FATTR4_ACL) ? hf_nfs4_mand_attr : hf_nfs4_recc_attr,
tvb, offset, 0, attribute_number);
attribute_tree = proto_item_add_subtree(attribute_item, ett_nfs4_attribute);
@@ -7396,187 +7392,187 @@ dissect_nfs4_attribute(tvbuff_t *tvb, int offset, packet_info *pinfo , proto_tre
break;
case FATTR4_TYPE:
- offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs_ftype4, offset);
+ offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs4_ftype, offset);
break;
case FATTR4_FH_EXPIRE_TYPE:
- offset = dissect_nfs_fattr4_fh_expire_type(tvb, offset, attribute_tree);
+ offset = dissect_nfs4_fattr_fh_expire_type(tvb, offset, attribute_tree);
break;
case FATTR4_CHANGE:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_changeid4, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_changeid, offset);
break;
case FATTR4_SIZE:
- offset = dissect_rpc_uint64(tvb,attribute_tree, hf_nfs_fattr4_size, offset);
+ offset = dissect_rpc_uint64(tvb,attribute_tree, hf_nfs4_fattr_size, offset);
break;
case FATTR4_LINK_SUPPORT:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_link_support, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_link_support, offset);
break;
case FATTR4_SYMLINK_SUPPORT:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_symlink_support, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_symlink_support, offset);
break;
case FATTR4_NAMED_ATTR:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_named_attr, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_named_attr, offset);
break;
case FATTR4_FSID:
- offset = dissect_nfs_fsid4(tvb, offset, attribute_tree, "fattr4_fsid");
+ offset = dissect_nfs4_fsid(tvb, offset, attribute_tree, "fattr4_fsid");
break;
case FATTR4_UNIQUE_HANDLES:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_unique_handles, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_unique_handles, offset);
break;
case FATTR4_LEASE_TIME:
- offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs_fattr4_lease_time, offset);
+ offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs4_fattr_lease_time, offset);
break;
case FATTR4_RDATTR_ERROR:
- offset = dissect_nfs_nfsstat4(tvb, offset, attribute_tree, NULL);
+ offset = dissect_nfs4_status(tvb, offset, attribute_tree, NULL);
break;
case FATTR4_ACL:
- offset = dissect_nfs_fattr4_acl(tvb, offset, pinfo, attribute_tree);
+ offset = dissect_nfs4_fattr_acl(tvb, offset, pinfo, attribute_tree);
break;
case FATTR4_ACLSUPPORT:
- offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs_fattr4_aclsupport, offset);
+ offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs4_fattr_aclsupport, offset);
break;
case FATTR4_ARCHIVE:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_archive, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_archive, offset);
break;
case FATTR4_CANSETTIME:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_cansettime, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_cansettime, offset);
break;
case FATTR4_CASE_INSENSITIVE:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_case_insensitive, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_case_insensitive, offset);
break;
case FATTR4_CASE_PRESERVING:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_case_preserving, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_case_preserving, offset);
break;
case FATTR4_CHOWN_RESTRICTED:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_chown_restricted, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_chown_restricted, offset);
break;
case FATTR4_FILEID:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_fileid, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_fileid, offset);
break;
case FATTR4_FILES_AVAIL:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_files_avail, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_files_avail, offset);
break;
case FATTR4_FILEHANDLE:
- offset = dissect_nfs_fh4(tvb, offset, pinfo, attribute_tree, "fattr4_filehandle", NULL);
+ offset = dissect_nfs4_fh(tvb, offset, pinfo, attribute_tree, "fattr4_filehandle", NULL);
break;
case FATTR4_FILES_FREE:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_files_free, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_files_free, offset);
break;
case FATTR4_FILES_TOTAL:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_files_total, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_files_total, offset);
break;
case FATTR4_FS_LOCATIONS:
- offset = dissect_nfs_fs_locations4(tvb, pinfo, offset, attribute_tree, "fattr4_fs_locations");
+ offset = dissect_nfs4_fs_locations(tvb, pinfo, offset, attribute_tree, "fattr4_fs_locations");
break;
case FATTR4_HIDDEN:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_hidden, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_hidden, offset);
break;
case FATTR4_HOMOGENEOUS:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_homogeneous, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_homogeneous, offset);
break;
case FATTR4_MAXFILESIZE:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_maxfilesize, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_maxfilesize, offset);
break;
case FATTR4_MAXLINK:
- offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs_fattr4_maxlink, offset);
+ offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs4_fattr_maxlink, offset);
break;
case FATTR4_MAXNAME:
- offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs_fattr4_maxname, offset);
+ offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs4_fattr_maxname, offset);
break;
case FATTR4_MAXREAD:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_maxread, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_maxread, offset);
break;
case FATTR4_MAXWRITE:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_maxwrite, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_maxwrite, offset);
break;
case FATTR4_MIMETYPE:
- offset = dissect_nfs_utf8string(tvb, offset, attribute_tree, hf_nfs_fattr4_mimetype, NULL);
+ offset = dissect_nfs_utf8string(tvb, offset, attribute_tree, hf_nfs4_fattr_mimetype, NULL);
break;
case FATTR4_MODE:
- offset = dissect_nfs_mode4(tvb, offset, attribute_tree, "fattr4_mode");
+ offset = dissect_nfs4_mode(tvb, offset, attribute_tree, "fattr4_mode");
break;
case FATTR4_NO_TRUNC:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_no_trunc, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_no_trunc, offset);
break;
case FATTR4_NUMLINKS:
- offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs_fattr4_numlinks, offset);
+ offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs4_fattr_numlinks, offset);
break;
case FATTR4_OWNER:
- offset = dissect_nfs_utf8string(tvb, offset, attribute_tree, hf_nfs_fattr4_owner, NULL);
+ offset = dissect_nfs_utf8string(tvb, offset, attribute_tree, hf_nfs4_fattr_owner, NULL);
break;
case FATTR4_OWNER_GROUP:
- offset = dissect_nfs_utf8string(tvb, offset, attribute_tree, hf_nfs_fattr4_owner_group, NULL);
+ offset = dissect_nfs_utf8string(tvb, offset, attribute_tree, hf_nfs4_fattr_owner_group, NULL);
break;
case FATTR4_QUOTA_AVAIL_HARD:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_quota_hard, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_quota_hard, offset);
break;
case FATTR4_QUOTA_AVAIL_SOFT:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_quota_soft, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_quota_soft, offset);
break;
case FATTR4_QUOTA_USED:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_quota_used, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_quota_used, offset);
break;
case FATTR4_RAWDEV:
- offset = dissect_nfs_specdata4(tvb, offset, attribute_tree);
+ offset = dissect_nfs4_specdata(tvb, offset, attribute_tree);
break;
case FATTR4_SPACE_AVAIL:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_space_avail, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_space_avail, offset);
break;
case FATTR4_SPACE_FREE:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_space_free, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_space_free, offset);
break;
case FATTR4_SPACE_TOTAL:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_space_total, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_space_total, offset);
break;
case FATTR4_SPACE_USED:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_space_used, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_space_used, offset);
break;
case FATTR4_SYSTEM:
- offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs_fattr4_system, offset);
+ offset = dissect_rpc_bool(tvb, attribute_tree, hf_nfs4_fattr_system, offset);
break;
case FATTR4_TIME_ACCESS:
@@ -7585,16 +7581,16 @@ dissect_nfs4_attribute(tvbuff_t *tvb, int offset, packet_info *pinfo , proto_tre
case FATTR4_TIME_DELTA:
case FATTR4_TIME_METADATA:
case FATTR4_TIME_MODIFY:
- offset = dissect_nfs_nfstime4(tvb, offset, attribute_tree);
+ offset = dissect_nfs4_nfstime(tvb, offset, attribute_tree);
break;
case FATTR4_TIME_ACCESS_SET:
case FATTR4_TIME_MODIFY_SET:
- offset = dissect_nfs_settime4(tvb, offset, attribute_tree, "settime4");
+ offset = dissect_nfs4_settime(tvb, offset, attribute_tree, "settime4");
break;
case FATTR4_MOUNTED_ON_FILEID:
- offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs_fattr4_mounted_on_fileid, offset);
+ offset = dissect_rpc_uint64(tvb, attribute_tree, hf_nfs4_fattr_mounted_on_fileid, offset);
break;
case FATTR4_FS_LAYOUT_TYPE:
@@ -7602,7 +7598,7 @@ dissect_nfs4_attribute(tvbuff_t *tvb, int offset, packet_info *pinfo , proto_tre
break;
case FATTR4_LAYOUT_BLKSIZE:
- offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs_fattr4_layout_blksize, offset);
+ offset = dissect_rpc_uint32(tvb, attribute_tree, hf_nfs4_fattr_layout_blksize, offset);
break;
case FATTR4_SECURITY_LABEL:
offset = dissect_nfs4_security_label(tvb, attribute_tree, offset);
@@ -7615,6 +7611,7 @@ dissect_nfs4_attribute(tvbuff_t *tvb, int offset, packet_info *pinfo , proto_tre
return offset;
}
+
static int
dissect_nfs4_attrlist4(tvbuff_t *tvb _U_, int offset, packet_info *pinfo _U_, proto_tree *tree _U_,
guint32 bitmap_size, guint32 *bitmap, guint32 attr_count _U_)
@@ -7637,19 +7634,20 @@ dissect_nfs4_attrlist4(tvbuff_t *tvb _U_, int offset, packet_info *pinfo _U_, pr
return offset;
}
+
static int
-dissect_nfs_fattr4_new(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
+dissect_nfs4_fattr_new(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
guint32 bitmap_size = 0;
guint32 *bitmap = NULL;
guint32 attr_count = 0;
guint32 attrlist4_size;
- proto_item *fattr_item;
- proto_tree *fattr_tree;
+ proto_item *fattr_item = NULL;
+ proto_tree *fattr_tree = NULL;
bitmap_size = tvb_get_ntohl(tvb, offset);
- if(bitmap_size > MAX_BITMAP_LEN) {
+ if(bitmap_size > MAX_BITMAPS) {
proto_tree_add_text(tree, tvb, offset, 4, "attrmask length is too big: %u", bitmap_size);
THROW(ReportedBoundsError);
}
@@ -7663,9 +7661,10 @@ dissect_nfs_fattr4_new(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
attrlist4_size = tvb_get_ntohl(tvb, offset);
offset += 4;
fattr_item = proto_tree_add_text(tree, tvb, offset, attrlist4_size, "attr_vals");
- fattr_tree = proto_item_add_subtree(fattr_item, ett_nfs4_fattr4_new_attr_vals);
+ fattr_tree = proto_item_add_subtree(fattr_item, ett_nfs4_fattr_new_attr_vals);
if(tree) {
- offset = dissect_nfs4_attrlist4(tvb, offset, pinfo, fattr_tree, bitmap_size, bitmap, attr_count);
+ offset = dissect_nfs4_attrlist4(tvb, offset, pinfo, fattr_tree, bitmap_size, bitmap,
+ attr_count);
} else {
offset += attrlist4_size;
}
@@ -7673,6 +7672,7 @@ dissect_nfs_fattr4_new(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
return offset;
}
+
static int
dissect_nfs4_attr_resp_ok(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
@@ -7683,11 +7683,12 @@ dissect_nfs4_attr_resp_ok(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t
getattr_res_item = proto_tree_add_text(tree, tvb, offset, 0, "obj_attributes");
getattr_res_tree = proto_item_add_subtree(getattr_res_item, ett_nfs4_obj_attrs);
- offset = dissect_nfs_fattr4_new(tvb, offset, pinfo, getattr_res_tree);
+ offset = dissect_nfs4_fattr_new(tvb, offset, pinfo, getattr_res_tree);
return offset;
}
+
static int
dissect_nfs4_attr_resp(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
@@ -7702,8 +7703,9 @@ dissect_nfs4_attr_resp(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
return offset;
}
+
static int
-dissect_nfs_fattr4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs4_fattr(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
proto_tree *newftree = NULL;
@@ -7711,12 +7713,11 @@ dissect_nfs_fattr4(tvbuff_t *tvb, int offset, packet_info *pinfo,
fitem = proto_tree_add_text(tree, tvb, offset, 4, "obj_attributes");
- newftree = proto_item_add_subtree(fitem, ett_nfs_fattr4);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_fattr);
- offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree,
- FATTR4_FULL_DISSECT);
+ offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree, FATTR4_DISSECT_VALUES);
- offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_attrlist4);
+ offset = dissect_nfsdata(tvb, offset, tree, hf_nfs4_attrlist);
return offset;
}
@@ -7741,15 +7742,16 @@ static const value_string names_open4_share_access[] = {
#define OPEN4_SHARE_ACCESS_WANT_CANCEL 0x0500
{ OPEN4_SHARE_ACCESS_WANT_CANCEL, "OPEN4_SHARE_ACCESS_WANT_CANCEL" },
#define OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL 0x10000
- { OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL, "OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL"},
+ { OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL,
+ "OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL"},
#define OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED 0x20000
- { OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED, "OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED"},
+ { OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED,
+ "OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED"},
{ 0, NULL }
};
static int
-dissect_nfs_open4_share_access(tvbuff_t *tvb, int offset,
- proto_tree *tree)
+dissect_nfs4_open_share_access(tvbuff_t *tvb, int offset, proto_tree *tree)
{
proto_item *notify_item;
proto_tree *notify_tree;
@@ -7761,15 +7763,15 @@ dissect_nfs_open4_share_access(tvbuff_t *tvb, int offset,
share_access = want_notify_flags & 0x3;
want_flags = want_notify_flags & 0xff00;
want_notify_flags &= ~share_access & ~want_flags;
- proto_tree_add_uint(tree, hf_nfs_open4_share_access, tvb, offset, 4, share_access);
+ proto_tree_add_uint(tree, hf_nfs4_open_share_access, tvb, offset, 4, share_access);
if (want_flags)
- proto_tree_add_uint(tree, hf_nfs_want_flags, tvb, offset, 4, want_flags);
+ proto_tree_add_uint(tree, hf_nfs4_want_flags, tvb, offset, 4, want_flags);
if (want_notify_flags) {
- notify_item = proto_tree_add_uint(tree, hf_nfs_want_notify_flags, tvb, offset, 4, want_notify_flags);
+ notify_item = proto_tree_add_uint(tree, hf_nfs4_want_notify_flags, tvb, offset, 4, want_notify_flags);
- notify_tree = proto_item_add_subtree(notify_item, ett_nfs_want_notify_flags);
- proto_tree_add_item(notify_tree, hf_nfs_want_signal_deleg_when_resrc_avail, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(notify_tree, hf_nfs_want_push_deleg_when_uncontended, tvb, offset, 4, ENC_BIG_ENDIAN);
+ notify_tree = proto_item_add_subtree(notify_item, ett_nfs4_want_notify_flags);
+ proto_tree_add_item(notify_tree, hf_nfs4_want_signal_deleg_when_resrc_avail, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(notify_tree, hf_nfs4_want_push_deleg_when_uncontended, tvb, offset, 4, ENC_BIG_ENDIAN);
}
offset += 4;
@@ -7788,35 +7790,37 @@ static const value_string names_open4_share_deny[] = {
{ 0, NULL }
};
+
static int
-dissect_nfs_open4_share_deny(tvbuff_t *tvb, int offset,
- proto_tree *tree)
+dissect_nfs4_open_share_deny(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint deny_access;
deny_access = tvb_get_ntohl(tvb, offset);
- proto_tree_add_uint(tree, hf_nfs_open4_share_deny, tvb, offset, 4,
+ proto_tree_add_uint(tree, hf_nfs4_open_share_deny, tvb, offset, 4,
deny_access);
offset += 4;
return offset;
}
+
static int
-dissect_nfs_open_owner4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_open_owner(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_clientid4, offset);
- offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_open_owner4);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_clientid, offset);
+ offset = dissect_nfsdata(tvb, offset, tree, hf_nfs4_open_owner);
return offset;
}
+
static int
-dissect_nfs_open_claim_delegate_cur4(tvbuff_t *tvb, int offset,
+dissect_nfs4_open_claim_delegate_cur(tvbuff_t *tvb, int offset,
proto_tree *tree)
{
- offset = dissect_nfs_stateid4(tvb, offset, tree, NULL);
- offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_component4, NULL);
+ offset = dissect_nfs4_stateid(tvb, offset, tree, NULL);
+ offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs4_component, NULL);
return offset;
}
@@ -7842,7 +7846,7 @@ static const value_string names_claim_type4[] = {
/* XXX - need a better place to populate name than here, maybe? */
static int
-dissect_nfs_open_claim4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs4_open_claim(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, const char **name)
{
guint open_claim_type4;
@@ -7851,12 +7855,12 @@ dissect_nfs_open_claim4(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 name_offset, name_len;
open_claim_type4 = tvb_get_ntohl(tvb, offset);
- fitem = proto_tree_add_uint(tree, hf_nfs_open_claim_type4, tvb,
+ fitem = proto_tree_add_uint(tree, hf_nfs4_open_claim_type, tvb,
offset+0, 4, open_claim_type4);
offset += 4;
if (open_claim_type4==CLAIM_NULL) {
- dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs_component4, name);
+ dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_component, name);
if (nfs_file_name_snooping) {
rpc_call_info_value *civ=(rpc_call_info_value *)pinfo->private_data;
@@ -7868,24 +7872,24 @@ dissect_nfs_open_claim4(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
}
- newftree = proto_item_add_subtree(fitem, ett_nfs_open_claim4);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_open_claim);
switch(open_claim_type4)
{
case CLAIM_NULL:
- offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs_component4, name);
+ offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_component, name);
break;
case CLAIM_PREVIOUS:
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_delegate_type, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_delegate_type, offset);
break;
case CLAIM_DELEGATE_CUR:
- offset = dissect_nfs_open_claim_delegate_cur4(tvb, offset, newftree);
+ offset = dissect_nfs4_open_claim_delegate_cur(tvb, offset, newftree);
break;
case CLAIM_DELEGATE_PREV:
- offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs_component4, NULL);
+ offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_component, NULL);
break;
default:
@@ -7903,30 +7907,31 @@ static const value_string names_createmode4[] = {
{ 0, NULL }
};
+
static int
-dissect_nfs_createhow4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs4_createhow(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
guint mode;
mode = tvb_get_ntohl(tvb, offset);
- proto_tree_add_uint(tree, hf_nfs_createmode4, tvb, offset, 4, mode);
+ proto_tree_add_uint(tree, hf_nfs4_createmode, tvb, offset, 4, mode);
offset += 4;
switch(mode)
{
case UNCHECKED4:
case GUARDED4:
- offset = dissect_nfs_fattr4(tvb, offset, pinfo, tree);
+ offset = dissect_nfs4_fattr(tvb, offset, pinfo, tree);
break;
case EXCLUSIVE4:
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_verifier4, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_verifier, offset);
break;
case EXCLUSIVE4_1:
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_verifier4, offset);
- offset = dissect_nfs_fattr4(tvb, offset, pinfo, tree);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_verifier, offset);
+ offset = dissect_nfs4_fattr(tvb, offset, pinfo, tree);
break;
default:
@@ -7936,6 +7941,7 @@ dissect_nfs_createhow4(tvbuff_t *tvb, int offset, packet_info *pinfo,
return offset;
}
+
#define OPEN4_NOCREATE 0
#define OPEN4_CREATE 1
static const value_string names_opentype4[] = {
@@ -7945,7 +7951,7 @@ static const value_string names_opentype4[] = {
};
static int
-dissect_nfs_openflag4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs4_openflag(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
guint opentype4;
@@ -7953,16 +7959,16 @@ dissect_nfs_openflag4(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *newftree = NULL;
opentype4 = tvb_get_ntohl(tvb, offset);
- fitem = proto_tree_add_uint(tree, hf_nfs_opentype4, tvb,
+ fitem = proto_tree_add_uint(tree, hf_nfs4_opentype, tvb,
offset+0, 4, opentype4);
offset += 4;
- newftree = proto_item_add_subtree(fitem, ett_nfs_opentype4);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_opentype);
switch(opentype4)
{
case OPEN4_CREATE:
- offset = dissect_nfs_createhow4(tvb, offset, pinfo, newftree);
+ offset = dissect_nfs4_createhow(tvb, offset, pinfo, newftree);
break;
default:
@@ -7972,8 +7978,9 @@ dissect_nfs_openflag4(tvbuff_t *tvb, int offset, packet_info *pinfo,
return offset;
}
+
static int
-dissect_nfs_clientaddr4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_clientaddr(tvbuff_t *tvb, int offset, proto_tree *tree)
{
const char *universal_ip_address = NULL;
const char *protocol = NULL;
@@ -7981,9 +7988,9 @@ dissect_nfs_clientaddr4(tvbuff_t *tvb, int offset, proto_tree *tree)
guint16 port;
int addr_offset;
- offset = dissect_rpc_string(tvb, tree, hf_nfs_r_netid, offset, &protocol);
+ offset = dissect_rpc_string(tvb, tree, hf_nfs4_r_netid, offset, &protocol);
addr_offset = offset;
- offset = dissect_rpc_string(tvb, tree, hf_nfs_r_addr, offset, &universal_ip_address);
+ offset = dissect_rpc_string(tvb, tree, hf_nfs4_r_addr, offset, &universal_ip_address);
if(strlen(protocol) == 3 && strncmp(protocol,"tcp",3) == 0) {
if (universal_ip_address && sscanf(universal_ip_address, "%u.%u.%u.%u.%u.%u",
@@ -8015,7 +8022,7 @@ dissect_nfs_clientaddr4(tvbuff_t *tvb, int offset, proto_tree *tree)
static int
-dissect_nfs_cb_client4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_cb_client4(tvbuff_t *tvb, int offset, proto_tree *tree)
{
proto_tree *cb_location = NULL;
proto_item *fitem = NULL;
@@ -8023,15 +8030,16 @@ dissect_nfs_cb_client4(tvbuff_t *tvb, int offset, proto_tree *tree)
cbprog = tvb_get_ntohl(tvb, offset);
reg_callback(cbprog);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_cb_program, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_cb_program, offset);
fitem = proto_tree_add_text(tree, tvb, offset, 0, "cb_location");
- cb_location = proto_item_add_subtree(fitem, ett_nfs_clientaddr4);
- offset = dissect_nfs_clientaddr4(tvb, offset, cb_location);
+ cb_location = proto_item_add_subtree(fitem, ett_nfs4_clientaddr);
+ offset = dissect_nfs4_clientaddr(tvb, offset, cb_location);
return offset;
}
+
static const value_string names_stable_how4[] = {
#define UNSTABLE4 0
{ UNSTABLE4, "UNSTABLE4" },
@@ -8043,13 +8051,12 @@ static const value_string names_stable_how4[] = {
};
static int
-dissect_nfs_stable_how4(tvbuff_t *tvb, int offset,
- proto_tree *tree, const char *name)
+dissect_nfs4_stable_how(tvbuff_t *tvb, int offset, proto_tree *tree, const char *name)
{
guint stable_how4;
stable_how4 = tvb_get_ntohl(tvb, offset);
- proto_tree_add_uint_format(tree, hf_nfs_stable_how4, tvb,
+ proto_tree_add_uint_format(tree, hf_nfs4_stable_how, tvb,
offset+0, 4, stable_how4, "%s: %s (%u)", name,
val_to_str(stable_how4, names_stable_how4, "%u"), stable_how4);
offset += 4;
@@ -8057,175 +8064,181 @@ dissect_nfs_stable_how4(tvbuff_t *tvb, int offset,
return offset;
}
-static const value_string names_nfsv4_operation[] = {
- { NFS4_OP_ACCESS, "ACCESS" },
- { NFS4_OP_CLOSE, "CLOSE" },
- { NFS4_OP_COMMIT, "COMMIT" },
- { NFS4_OP_CREATE, "CREATE" },
- { NFS4_OP_DELEGPURGE, "DELEGPURGE" },
- { NFS4_OP_DELEGRETURN, "DELEGRETURN" },
- { NFS4_OP_GETATTR, "GETATTR" },
- { NFS4_OP_GETFH, "GETFH" },
- { NFS4_OP_LINK, "LINK" },
- { NFS4_OP_LOCK, "LOCK" },
- { NFS4_OP_LOCKT, "LOCKT" },
- { NFS4_OP_LOCKU, "LOCKU" },
- { NFS4_OP_LOOKUP, "LOOKUP" },
- { NFS4_OP_LOOKUPP, "LOOKUPP" },
- { NFS4_OP_NVERIFY, "NVERIFY" },
- { NFS4_OP_OPEN, "OPEN" },
- { NFS4_OP_OPENATTR, "OPENATTR" },
- { NFS4_OP_OPEN_CONFIRM, "OPEN_CONFIRM" },
- { NFS4_OP_OPEN_DOWNGRADE, "OPEN_DOWNGRADE" },
- { NFS4_OP_PUTFH, "PUTFH" },
- { NFS4_OP_PUTPUBFH, "PUTPUBFH" },
- { NFS4_OP_PUTROOTFH, "PUTROOTFH" },
- { NFS4_OP_READ, "READ" },
- { NFS4_OP_READDIR, "READDIR" },
- { NFS4_OP_READLINK, "READLINK" },
- { NFS4_OP_REMOVE, "REMOVE" },
- { NFS4_OP_RENAME, "RENAME" },
- { NFS4_OP_RENEW, "RENEW" },
- { NFS4_OP_RESTOREFH, "RESTOREFH" },
- { NFS4_OP_SAVEFH, "SAVEFH" },
- { NFS4_OP_SECINFO, "SECINFO" },
- { NFS4_OP_SETATTR, "SETATTR" },
- { NFS4_OP_SETCLIENTID, "SETCLIENTID" },
- { NFS4_OP_SETCLIENTID_CONFIRM, "SETCLIENTID_CONFIRM" },
- { NFS4_OP_VERIFY, "VERIFY" },
- { NFS4_OP_WRITE, "WRITE" },
- { NFS4_OP_RELEASE_LOCKOWNER, "RELEASE_LOCKOWNER" },
- { NFS4_OP_BACKCHANNEL_CTL, "BACKCHANNEL_CTL" },
- { NFS4_OP_BIND_CONN_TO_SESSION, "BIND_CONN_TO_SESSION" },
- { NFS4_OP_EXCHANGE_ID, "EXCHANGE_ID" },
- { NFS4_OP_CREATE_SESSION, "CREATE_SESSION" },
- { NFS4_OP_DESTROY_SESSION, "DESTROY_SESSION" },
- { NFS4_OP_FREE_STATEID, "FREE_STATEID" },
- { NFS4_OP_GET_DIR_DELEGATION, "GET_DIR_DELEGATION" },
- { NFS4_OP_GETDEVINFO, "GETDEVINFO" },
- { NFS4_OP_GETDEVLIST, "GETDEVLIST" },
- { NFS4_OP_LAYOUTCOMMIT, "LAYOUTCOMMIT" },
- { NFS4_OP_LAYOUTGET, "LAYOUTGET" },
- { NFS4_OP_LAYOUTRETURN, "LAYOUTRETURN" },
- { NFS4_OP_SECINFO_NO_NAME, "SECINFO_NO_NAME" },
- { NFS4_OP_SEQUENCE, "SEQUENCE" },
- { NFS4_OP_SET_SSV, "SET_SSV" },
- { NFS4_OP_TEST_STATEID, "TEST_STATEID" },
- { NFS4_OP_WANT_DELEGATION, "WANT_DELEG" },
- { NFS4_OP_DESTROY_CLIENTID, "DESTROY_CLIENTID" },
- { NFS4_OP_RECLAIM_COMPLETE, "RECLAIM_COMPLETE" },
- { NFS4_OP_ILLEGAL, "ILLEGAL" },
- { 0, NULL }
+
+/* NFSv4 Operations */
+static const value_string names_nfs4_operation[] = {
+ { NFS4_OP_ACCESS, "ACCESS" },
+ { NFS4_OP_CLOSE, "CLOSE" },
+ { NFS4_OP_COMMIT, "COMMIT" },
+ { NFS4_OP_CREATE, "CREATE" },
+ { NFS4_OP_DELEGPURGE, "DELEGPURGE" },
+ { NFS4_OP_DELEGRETURN, "DELEGRETURN" },
+ { NFS4_OP_GETATTR, "GETATTR" },
+ { NFS4_OP_GETFH, "GETFH" },
+ { NFS4_OP_LINK, "LINK" },
+ { NFS4_OP_LOCK, "LOCK" },
+ { NFS4_OP_LOCKT, "LOCKT" },
+ { NFS4_OP_LOCKU, "LOCKU" },
+ { NFS4_OP_LOOKUP, "LOOKUP" },
+ { NFS4_OP_LOOKUPP, "LOOKUPP" },
+ { NFS4_OP_NVERIFY, "NVERIFY" },
+ { NFS4_OP_OPEN, "OPEN" },
+ { NFS4_OP_OPENATTR, "OPENATTR" },
+ { NFS4_OP_OPEN_CONFIRM, "OPEN_CONFIRM" },
+ { NFS4_OP_OPEN_DOWNGRADE, "OPEN_DOWNGRADE" },
+ { NFS4_OP_PUTFH, "PUTFH" },
+ { NFS4_OP_PUTPUBFH, "PUTPUBFH" },
+ { NFS4_OP_PUTROOTFH, "PUTROOTFH" },
+ { NFS4_OP_READ, "READ" },
+ { NFS4_OP_READDIR, "READDIR" },
+ { NFS4_OP_READLINK, "READLINK" },
+ { NFS4_OP_REMOVE, "REMOVE" },
+ { NFS4_OP_RENAME, "RENAME" },
+ { NFS4_OP_RENEW, "RENEW" },
+ { NFS4_OP_RESTOREFH, "RESTOREFH" },
+ { NFS4_OP_SAVEFH, "SAVEFH" },
+ { NFS4_OP_SECINFO, "SECINFO" },
+ { NFS4_OP_SETATTR, "SETATTR" },
+ { NFS4_OP_SETCLIENTID, "SETCLIENTID" },
+ { NFS4_OP_SETCLIENTID_CONFIRM, "SETCLIENTID_CONFIRM" },
+ { NFS4_OP_VERIFY, "VERIFY" },
+ { NFS4_OP_WRITE, "WRITE" },
+ { NFS4_OP_RELEASE_LOCKOWNER, "RELEASE_LOCKOWNER" },
+ { NFS4_OP_BACKCHANNEL_CTL, "BACKCHANNEL_CTL" },
+ { NFS4_OP_BIND_CONN_TO_SESSION, "BIND_CONN_TO_SESSION" },
+ { NFS4_OP_EXCHANGE_ID, "EXCHANGE_ID" },
+ { NFS4_OP_CREATE_SESSION, "CREATE_SESSION" },
+ { NFS4_OP_DESTROY_SESSION, "DESTROY_SESSION" },
+ { NFS4_OP_FREE_STATEID, "FREE_STATEID" },
+ { NFS4_OP_GET_DIR_DELEGATION, "GET_DIR_DELEGATION" },
+ { NFS4_OP_GETDEVINFO, "GETDEVINFO" },
+ { NFS4_OP_GETDEVLIST, "GETDEVLIST" },
+ { NFS4_OP_LAYOUTCOMMIT, "LAYOUTCOMMIT" },
+ { NFS4_OP_LAYOUTGET, "LAYOUTGET" },
+ { NFS4_OP_LAYOUTRETURN, "LAYOUTRETURN" },
+ { NFS4_OP_SECINFO_NO_NAME, "SECINFO_NO_NAME" },
+ { NFS4_OP_SEQUENCE, "SEQUENCE" },
+ { NFS4_OP_SET_SSV, "SET_SSV" },
+ { NFS4_OP_TEST_STATEID, "TEST_STATEID" },
+ { NFS4_OP_WANT_DELEGATION, "WANT_DELEG" },
+ { NFS4_OP_DESTROY_CLIENTID, "DESTROY_CLIENTID" },
+ { NFS4_OP_RECLAIM_COMPLETE, "RECLAIM_COMPLETE" },
+ { NFS4_OP_ILLEGAL, "ILLEGAL" },
+ { 0, NULL }
};
-static value_string_ext names_nfsv4_operation_ext = VALUE_STRING_EXT_INIT(names_nfsv4_operation);
-
-static gint *nfsv4_operation_ett[] =
-{
- &ett_nfs_access4 ,
- &ett_nfs_close4 ,
- &ett_nfs_commit4 ,
- &ett_nfs_create4 ,
- &ett_nfs_delegpurge4 ,
- &ett_nfs_delegreturn4 ,
- &ett_nfs_getattr4 ,
- &ett_nfs_getfh4 ,
- &ett_nfs_link4 ,
- &ett_nfs_lock4 ,
- &ett_nfs_lockt4 ,
- &ett_nfs_locku4 ,
- &ett_nfs_lookup4 ,
- &ett_nfs_lookupp4 ,
- &ett_nfs_nverify4 ,
- &ett_nfs_open4 ,
- &ett_nfs_openattr4 ,
- &ett_nfs_open_confirm4 ,
- &ett_nfs_open_downgrade4 ,
- &ett_nfs_putfh4 ,
- &ett_nfs_putpubfh4 ,
- &ett_nfs_putrootfh4 ,
- &ett_nfs_read4 ,
- &ett_nfs_readdir4 ,
- &ett_nfs_readlink4 ,
- &ett_nfs_remove4 ,
- &ett_nfs_rename4 ,
- &ett_nfs_renew4 ,
- &ett_nfs_restorefh4 ,
- &ett_nfs_savefh4 ,
- &ett_nfs_secinfo4 ,
- &ett_nfs_setattr4 ,
- &ett_nfs_setclientid4 ,
- &ett_nfs_setclientid_confirm4 ,
- &ett_nfs_verify4 ,
- &ett_nfs_write4,
- &ett_nfs_release_lockowner4,
- &ett_nfs_backchannel_ctl4,
- &ett_nfs_bind_conn_to_session4,
- &ett_nfs_exchange_id4,
- &ett_nfs_create_session4,
- &ett_nfs_destroy_session4,
- &ett_nfs_free_stateid4,
+
+static value_string_ext names_nfs4_operation_ext = VALUE_STRING_EXT_INIT(names_nfs4_operation);
+
+/* Each subtree number in this array corresponds to the associated item in the above
+* 'names_nfs4_operation array[]' array. */
+static gint *nfs4_operation_ett[] =
+{
+ &ett_nfs4_access ,
+ &ett_nfs4_close ,
+ &ett_nfs4_commit ,
+ &ett_nfs4_create ,
+ &ett_nfs4_delegpurge ,
+ &ett_nfs4_delegreturn ,
+ &ett_nfs4_getattr ,
+ &ett_nfs4_getfh ,
+ &ett_nfs4_link ,
+ &ett_nfs4_lock ,
+ &ett_nfs4_lockt ,
+ &ett_nfs4_locku ,
+ &ett_nfs4_lookup ,
+ &ett_nfs4_lookupp ,
+ &ett_nfs4_nverify ,
+ &ett_nfs4_open ,
+ &ett_nfs4_openattr ,
+ &ett_nfs4_open_confirm ,
+ &ett_nfs4_open_downgrade ,
+ &ett_nfs4_putfh ,
+ &ett_nfs4_putpubfh ,
+ &ett_nfs4_putrootfh ,
+ &ett_nfs4_read ,
+ &ett_nfs4_readdir ,
+ &ett_nfs4_readlink ,
+ &ett_nfs4_remove ,
+ &ett_nfs4_rename ,
+ &ett_nfs4_renew ,
+ &ett_nfs4_restorefh ,
+ &ett_nfs4_savefh ,
+ &ett_nfs4_secinfo ,
+ &ett_nfs4_setattr ,
+ &ett_nfs4_setclientid ,
+ &ett_nfs4_setclientid_confirm ,
+ &ett_nfs4_verify ,
+ &ett_nfs4_write,
+ &ett_nfs4_release_lockowner,
+ &ett_nfs4_backchannel_ctl,
+ &ett_nfs4_bind_conn_to_session,
+ &ett_nfs4_exchange_id,
+ &ett_nfs4_create_session,
+ &ett_nfs4_destroy_session,
+ &ett_nfs4_free_stateid,
NULL, /* get dir delegation */
- &ett_nfs_getdevinfo4,
- &ett_nfs_getdevlist4,
- &ett_nfs_layoutcommit4,
- &ett_nfs_layoutget4,
- &ett_nfs_layoutreturn4,
- &ett_nfs_secinfo_no_name4,
- &ett_nfs_sequence4,
+ &ett_nfs4_getdevinfo,
+ &ett_nfs4_getdevlist,
+ &ett_nfs4_layoutcommit,
+ &ett_nfs4_layoutget,
+ &ett_nfs4_layoutreturn,
+ &ett_nfs4_secinfo_no_name,
+ &ett_nfs4_sequence,
NULL, /* set ssv */
- &ett_nfs_test_stateid4,
+ &ett_nfs4_test_stateid,
NULL, /* want delegation */
- &ett_nfs_destroy_clientid4,
- &ett_nfs_reclaim_complete4
+ &ett_nfs4_destroy_clientid,
+ &ett_nfs4_reclaim_complete
};
+
static int
-dissect_nfs_entry4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs4_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_cookie4, offset);
- offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_component4, NULL);
- offset = dissect_nfs_fattr4(tvb, offset, pinfo, tree);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_cookie, offset);
+ offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs4_component, NULL);
+ offset = dissect_nfs4_fattr(tvb, offset, pinfo, tree);
return offset;
}
+
static int
-dissect_nfs_dirlist4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs4_dirlist(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
proto_tree *newftree = NULL;
proto_tree *fitem = NULL;
fitem = proto_tree_add_text(tree, tvb, offset, 0, "Directory Listing");
- newftree = proto_item_add_subtree(fitem, ett_nfs_dirlist4);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_dirlist);
- offset = dissect_rpc_list(tvb, pinfo, newftree, offset, dissect_nfs_entry4);
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_dirlist4_eof, offset);
+ offset = dissect_rpc_list(tvb, pinfo, newftree, offset, dissect_nfs4_entry);
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_dirlist_eof, offset);
return offset;
}
+
static int
-dissect_nfs_change_info4(tvbuff_t *tvb, int offset,
+dissect_nfs4_change_info(tvbuff_t *tvb, int offset,
proto_tree *tree, const char *name)
{
proto_tree *newftree = NULL;
proto_tree *fitem = NULL;
fitem = proto_tree_add_text(tree, tvb, offset, 0, "%s", name);
- newftree = proto_item_add_subtree(fitem, ett_nfs_change_info4);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_change_info);
- offset = dissect_rpc_bool(tvb, newftree,
- hf_nfs_change_info4_atomic, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_changeid4_before,
- offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_changeid4_after,
- offset);
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_change_info_atomic, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_changeid_before, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_changeid_after, offset);
return offset;
}
+
static const value_string names_nfs_lock_type4[] =
{
#define READ_LT 1
@@ -8242,13 +8255,12 @@ static const value_string names_nfs_lock_type4[] =
};
static int
-dissect_nfs_lock4denied(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_lockdenied(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_offset4, offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_length4, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_lock_type4, offset);
- offset = dissect_nfs_lock_owner4(tvb, offset, tree);
-
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_offset, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_length, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_lock_type, offset);
+ offset = dissect_nfs4_lock_owner(tvb, offset, tree);
return offset;
}
@@ -8264,17 +8276,17 @@ static const value_string names_open4_result_flags[] = {
};
static int
-dissect_nfs_open4_rflags(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_open_rflags(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- proto_item *rflags_item;
- proto_item *rflags_tree;
+ proto_item *rflags_item = NULL;
+ proto_item *rflags_tree = NULL;
if (tree)
{
- rflags_item = proto_tree_add_item(tree, hf_nfs_open_rflags, tvb, offset, 4, ENC_BIG_ENDIAN);
- rflags_tree = proto_item_add_subtree(rflags_item, ett_nfs_open4_result_flags);
- proto_tree_add_item(rflags_tree, hf_nfs_open_rflags_mlock, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(rflags_tree, hf_nfs_open_rflags_confirm, tvb, offset, 4, ENC_BIG_ENDIAN);
+ rflags_item = proto_tree_add_item(tree, hf_nfs4_open_rflags, tvb, offset, 4, ENC_BIG_ENDIAN);
+ rflags_tree = proto_item_add_subtree(rflags_item, ett_nfs4_open_result_flags);
+ proto_tree_add_item(rflags_tree, hf_nfs4_open_rflags_mlock, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(rflags_tree, hf_nfs4_open_rflags_confirm, tvb, offset, 4, ENC_BIG_ENDIAN);
}
offset += 4;
@@ -8282,71 +8294,68 @@ dissect_nfs_open4_rflags(tvbuff_t *tvb, int offset, proto_tree *tree)
return offset;
}
+
static int
-dissect_nfs_stateid4(tvbuff_t *tvb, int offset,
- proto_tree *tree, guint16 *hash)
+dissect_nfs4_stateid(tvbuff_t *tvb, int offset, proto_tree *tree, guint16 *hash)
{
proto_item *fitem = NULL;
- proto_item *sh_item;
+ proto_item *sh_item = NULL;
proto_tree *newftree = NULL;
guint16 sid_hash;
guint8 *sidh_array;
-
- if(tree){
+ if (tree) {
fitem = proto_tree_add_text(tree, tvb, offset, 4, "stateid");
- newftree = proto_item_add_subtree(fitem, ett_nfs_stateid4);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_stateid);
}
sidh_array = tvb_get_string(tvb, offset, 16);
sid_hash = crc16_ccitt(sidh_array, 16);
g_free(sidh_array);
- sh_item=proto_tree_add_uint(newftree, hf_nfs_stateid4_hash, tvb, offset,
- + 16, sid_hash);
+ sh_item=proto_tree_add_uint(newftree, hf_nfs4_stateid_hash, tvb, offset, 16, sid_hash);
PROTO_ITEM_SET_GENERATED(sh_item);
-
-
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4, offset);
-
- proto_tree_add_item(newftree, hf_nfs_stateid4_other, tvb, offset, 12, ENC_NA);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_seqid, offset);
+ proto_tree_add_item(newftree, hf_nfs4_stateid_other, tvb, offset, 12, ENC_NA);
offset+=12;
if (hash)
*hash=sid_hash;
-
return offset;
}
+
static int
-dissect_nfs_open_read_delegation4(tvbuff_t *tvb, int offset,
+dissect_nfs4_open_read_delegation(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree)
{
- offset = dissect_nfs_stateid4(tvb, offset, tree, NULL);
- offset = dissect_rpc_bool(tvb, tree, hf_nfs_recall4, offset);
- offset = dissect_nfs_ace4(tvb, offset, pinfo, tree);
+ offset = dissect_nfs4_stateid(tvb, offset, tree, NULL);
+ offset = dissect_rpc_bool(tvb, tree, hf_nfs4_recall4, offset);
+ offset = dissect_nfs4_ace(tvb, offset, pinfo, tree);
return offset;
}
+
static int
-dissect_nfs_modified_limit4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_modified_limit(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_num_blocks, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_bytes_per_block, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_num_blocks, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_bytes_per_block, offset);
return offset;
}
+
/*
- * No FULL DISECT yet.
+ * No FULL DISSECT yet.
*/
static int
-dissect_nfs_state_protect_bitmap4(tvbuff_t *tvb, int offset,
+dissect_nfs4_state_protect_bitmap(tvbuff_t *tvb, int offset,
proto_tree *tree)
{
- guint32 bitmap_len;
+ guint32 num_bitmaps;
proto_item *fitem = NULL;
proto_tree *newftree = NULL;
guint32 *bitmap=NULL;
@@ -8355,29 +8364,29 @@ dissect_nfs_state_protect_bitmap4(tvbuff_t *tvb, int offset,
gint j;
guint32 sl;
- bitmap_len = tvb_get_ntohl(tvb, offset);
- if (bitmap_len > MAX_BITMAP_LEN) {
+ num_bitmaps = tvb_get_ntohl(tvb, offset);
+ if (num_bitmaps > MAX_BITMAPS) {
proto_tree_add_text(tree, tvb, offset, 4,
- "Huge bitmap length: %u", bitmap_len);
+ "Huge bitmap length: %u", num_bitmaps);
THROW(ReportedBoundsError);
}
- tvb_ensure_bytes_exist(tvb, offset, 4 + bitmap_len * 4);
- fitem = proto_tree_add_text(tree, tvb, offset, 4 + bitmap_len * 4,
+ tvb_ensure_bytes_exist(tvb, offset, 4 + num_bitmaps * 4);
+ fitem = proto_tree_add_text(tree, tvb, offset, 4 + num_bitmaps * 4,
"%s", "operation mask");
offset += 4;
- newftree = proto_item_add_subtree(fitem, ett_nfs_bitmap4);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_bitmap);
- if(bitmap_len)
- bitmap = (guint32 *)ep_alloc(bitmap_len * sizeof(guint32));
+ if(num_bitmaps)
+ bitmap = (guint32 *)ep_alloc(num_bitmaps * sizeof(guint32));
- for (i = 0; i < bitmap_len; i++) {
+ for (i = 0; i < num_bitmaps; i++) {
bitmap[i] = tvb_get_ntohl(tvb, offset);
sl = 0x00000001;
for (j = 0; j < 32; j++) {
op = 32 * i + j;
if (bitmap[i] & sl) {
- proto_tree_add_uint(newftree, hf_nfs_op_mask,
+ proto_tree_add_uint(newftree, hf_nfs4_op_mask,
tvb, offset, 4, op);
}
sl <<= 1;
@@ -8398,56 +8407,58 @@ static const value_string names_state_protect_how4[] = {
};
static int
-dissect_nfs_state_protect_ops4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_state_protect_ops(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_nfs_state_protect_bitmap4(tvb, offset, tree);
- offset = dissect_nfs_state_protect_bitmap4(tvb, offset, tree);
+ offset = dissect_nfs4_state_protect_bitmap(tvb, offset, tree);
+ offset = dissect_nfs4_state_protect_bitmap(tvb, offset, tree);
return offset;
}
+
static int
-dissect_nfs_ssv_sp_parms4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_ssv_sp_parms(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_nfs_state_protect_ops4(tvb, offset, tree);
+ offset = dissect_nfs4_state_protect_ops(tvb, offset, tree);
offset = dissect_rpc_opaque_data(tvb, offset, tree, NULL,
- hf_nfs_sec_oid4, FALSE, 0, FALSE, NULL, NULL);
+ hf_nfs4_sec_oid, FALSE, 0, FALSE, NULL, NULL);
offset = dissect_rpc_opaque_data(tvb, offset, tree, NULL,
- hf_nfs_sec_oid4, FALSE, 0, FALSE, NULL, NULL);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_state_protect_window, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_state_protect_num_gss_handles, offset);
+ hf_nfs4_sec_oid, FALSE, 0, FALSE, NULL, NULL);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_state_protect_window, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_state_protect_num_gss_handles, offset);
return offset;
}
+
static int
-dissect_nfs_ssv_prot_info4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_ssv_prot_info(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_nfs_state_protect_ops4(tvb, offset, tree);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_prot_info4_hash_alg, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_prot_info4_encr_alg, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_prot_info4_svv_length, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_prot_info4_spi_window, offset);
- offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_gsshandle4);
+ offset = dissect_nfs4_state_protect_ops(tvb, offset, tree);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_prot_info_hash_alg, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_prot_info_encr_alg, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_prot_info_svv_length, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_prot_info_spi_window, offset);
+ offset = dissect_nfsdata(tvb, offset, tree, hf_nfs4_gsshandle);
return offset;
}
+
static int
-dissect_nfs_state_protect4_a(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_state_protect_a(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint stateprotect;
stateprotect = tvb_get_ntohl(tvb, offset);
- proto_tree_add_uint(tree, hf_nfs_state_protect_how4, tvb, offset+0, 4,
- stateprotect);
+ proto_tree_add_uint(tree, hf_nfs4_state_protect_how, tvb, offset+0, 4, stateprotect);
offset += 4;
switch(stateprotect) {
case SP4_NONE:
break;
case SP4_MACH_CRED:
- offset = dissect_nfs_state_protect_ops4(tvb, offset, tree);
+ offset = dissect_nfs4_state_protect_ops(tvb, offset, tree);
break;
case SP4_SSV:
- offset = dissect_nfs_ssv_sp_parms4(tvb, offset, tree);
+ offset = dissect_nfs4_ssv_sp_parms(tvb, offset, tree);
break;
default:
break;
@@ -8455,13 +8466,14 @@ dissect_nfs_state_protect4_a(tvbuff_t *tvb, int offset, proto_tree *tree)
return offset;
}
+
static int
-dissect_nfs_state_protect4_r(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_state_protect_r(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint stateprotect;
stateprotect = tvb_get_ntohl(tvb, offset);
- proto_tree_add_uint(tree, hf_nfs_state_protect_how4, tvb, offset+0, 4,
+ proto_tree_add_uint(tree, hf_nfs4_state_protect_how, tvb, offset+0, 4,
stateprotect);
offset += 4;
@@ -8469,10 +8481,10 @@ dissect_nfs_state_protect4_r(tvbuff_t *tvb, int offset, proto_tree *tree)
case SP4_NONE:
break;
case SP4_MACH_CRED:
- offset = dissect_nfs_state_protect_ops4(tvb, offset, tree);
+ offset = dissect_nfs4_state_protect_ops(tvb, offset, tree);
break;
case SP4_SSV:
- offset = dissect_nfs_ssv_prot_info4(tvb, offset, tree);
+ offset = dissect_nfs4_ssv_prot_info(tvb, offset, tree);
break;
default:
break;
@@ -8480,6 +8492,7 @@ dissect_nfs_state_protect4_r(tvbuff_t *tvb, int offset, proto_tree *tree)
return offset;
}
+
#define NFS_LIMIT_SIZE 1
#define NFS_LIMIT_BLOCKS 2
static const value_string names_limit_by4[] = {
@@ -8489,24 +8502,24 @@ static const value_string names_limit_by4[] = {
};
static int
-dissect_nfs_space_limit4(tvbuff_t *tvb, int offset,
+dissect_nfs4_space_limit(tvbuff_t *tvb, int offset,
proto_tree *tree)
{
guint limitby;
limitby = tvb_get_ntohl(tvb, offset);
- proto_tree_add_uint(tree, hf_nfs_limit_by4, tvb, offset+0, 4, limitby);
+ proto_tree_add_uint(tree, hf_nfs4_limit_by, tvb, offset+0, 4, limitby);
offset += 4;
switch(limitby)
{
case NFS_LIMIT_SIZE:
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_filesize,
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_filesize,
offset);
break;
case NFS_LIMIT_BLOCKS:
- offset = dissect_nfs_modified_limit4(tvb, offset, tree);
+ offset = dissect_nfs4_modified_limit(tvb, offset, tree);
break;
default:
@@ -8516,18 +8529,20 @@ dissect_nfs_space_limit4(tvbuff_t *tvb, int offset,
return offset;
}
+
static int
-dissect_nfs_open_write_delegation4(tvbuff_t *tvb, int offset,
+dissect_nfs4_open_write_delegation(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree)
{
- offset = dissect_nfs_stateid4(tvb, offset, tree, NULL);
- offset = dissect_rpc_bool(tvb, tree, hf_nfs_recall, offset);
- offset = dissect_nfs_space_limit4(tvb, offset, tree);
- offset = dissect_nfs_ace4(tvb, offset, pinfo, tree);
+ offset = dissect_nfs4_stateid(tvb, offset, tree, NULL);
+ offset = dissect_rpc_bool(tvb, tree, hf_nfs4_recall, offset);
+ offset = dissect_nfs4_space_limit(tvb, offset, tree);
+ offset = dissect_nfs4_ace(tvb, offset, pinfo, tree);
return offset;
}
+
#define OPEN_DELEGATE_NONE 0
#define OPEN_DELEGATE_READ 1
#define OPEN_DELEGATE_WRITE 2
@@ -8563,7 +8578,7 @@ static const value_string names_why_no_delegation4[] = {
};
static int
-dissect_nfs_open_delegation4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs4_open_delegation(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
guint delegation_type;
@@ -8571,11 +8586,11 @@ dissect_nfs_open_delegation4(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item *fitem = NULL;
delegation_type = tvb_get_ntohl(tvb, offset);
- fitem = proto_tree_add_uint(tree, hf_nfs_open_delegation_type4, tvb,
+ fitem = proto_tree_add_uint(tree, hf_nfs4_open_delegation_type, tvb,
offset+0, 4, delegation_type);
offset += 4;
- newftree = proto_item_add_subtree(fitem, ett_nfs_open_delegation4);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_open_delegation);
switch(delegation_type)
{
@@ -8583,14 +8598,14 @@ dissect_nfs_open_delegation4(tvbuff_t *tvb, int offset, packet_info *pinfo,
break;
case OPEN_DELEGATE_READ:
- offset = dissect_nfs_open_read_delegation4(tvb, offset, pinfo, newftree);
+ offset = dissect_nfs4_open_read_delegation(tvb, offset, pinfo, newftree);
break;
case OPEN_DELEGATE_WRITE:
- offset = dissect_nfs_open_write_delegation4(tvb, offset, pinfo, newftree);
+ offset = dissect_nfs4_open_write_delegation(tvb, offset, pinfo, newftree);
break;
case OPEN_DELEGATE_NONE_EXT:
- proto_tree_add_item(tree, hf_nfs_why_no_delegation4, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_nfs4_why_no_delegation, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
break;
default:
@@ -8600,143 +8615,153 @@ dissect_nfs_open_delegation4(tvbuff_t *tvb, int offset, packet_info *pinfo,
return offset;
}
+
static int
dissect_nfs_rpcsec_gss_info(tvbuff_t *tvb, int offset, proto_tree *tree)
{
offset = dissect_rpc_opaque_data(tvb, offset, tree, NULL,
- hf_nfs_sec_oid4, FALSE, 0, FALSE, NULL, NULL);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_qop4, offset);
+ hf_nfs4_sec_oid, FALSE, 0, FALSE, NULL, NULL);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_qop, offset);
offset = dissect_rpc_uint32(tvb, tree,
- hf_nfs_secinfo_rpcsec_gss_info_service, offset);
+ hf_nfs4_secinfo_rpcsec_gss_info_service, offset);
return offset;
}
+
static int
-dissect_nfs_open_to_lock_owner4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_open_to_lock_owner(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_seqid4, offset);
- offset = dissect_nfs_stateid4(tvb, offset, tree, NULL);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_lock_seqid4, offset);
- offset = dissect_nfs_lock_owner4(tvb, offset, tree);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_seqid, offset);
+ offset = dissect_nfs4_stateid(tvb, offset, tree, NULL);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_lock_seqid, offset);
+ offset = dissect_nfs4_lock_owner(tvb, offset, tree);
return offset;
}
+
static int
-dissect_nfs_exist_lock_owner4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_exist_lock_owner(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_nfs_stateid4(tvb, offset, tree, NULL);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_lock_seqid4, offset);
+ offset = dissect_nfs4_stateid(tvb, offset, tree, NULL);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_lock_seqid, offset);
return offset;
}
+
static int
-dissect_nfs_locker4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_locker(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint new_lock_owner;
new_lock_owner = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_bool(tvb, tree, hf_nfs_new_lock_owner, offset);
+ offset = dissect_rpc_bool(tvb, tree, hf_nfs4_new_lock_owner, offset);
if (new_lock_owner)
- offset = dissect_nfs_open_to_lock_owner4(tvb, offset, tree);
+ offset = dissect_nfs4_open_to_lock_owner(tvb, offset, tree);
else
- offset = dissect_nfs_exist_lock_owner4(tvb, offset, tree);
+ offset = dissect_nfs4_exist_lock_owner(tvb, offset, tree);
return offset;
}
+
static int
-dissect_nfs_client_id4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_client_id(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_verifier4, offset);
- offset = dissect_rpc_data(tvb, tree, hf_nfs_client_id4_id, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_verifier, offset);
+ offset = dissect_rpc_data(tvb, tree, hf_nfs4_client_id, offset);
return offset;
}
static int
-dissect_nfs_newtime4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_newtime(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint new_time;
new_time = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_bool(tvb, tree, hf_nfs_newtime4, offset);
+ offset = dissect_rpc_bool(tvb, tree, hf_nfs4_newtime, offset);
if (new_time) {
- offset = dissect_nfs_nfstime4(tvb, offset, tree);
+ offset = dissect_nfs4_nfstime(tvb, offset, tree);
}
return offset;
}
+
static int
-dissect_nfs_newsize4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_newsize(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint new_size;
new_size = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_bool(tvb, tree, hf_nfs_newsize4, offset);
+ offset = dissect_rpc_bool(tvb, tree, hf_nfs4_newsize, offset);
if (new_size) {
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_length4, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_length, offset);
}
return offset;
}
+
static int
-dissect_nfs_newoffset4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_newoffset(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint new_offset;
new_offset = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_bool(tvb, tree, hf_nfs_newoffset4, offset);
+ offset = dissect_rpc_bool(tvb, tree, hf_nfs4_newoffset, offset);
if (new_offset) {
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_offset4, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_offset, offset);
}
return offset;
}
+
static int
-dissect_nfs_layoutreturn4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_layoutreturn(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint returntype;
returntype = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_layoutreturn_type4, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_layout_return_type, offset);
if (returntype == 1) { /* RETURN_FILE */
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_offset4, offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_length4, offset);
- offset = dissect_nfs_stateid4(tvb, offset, tree, NULL);
- offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_lrf_body_content);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_offset, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_length, offset);
+ offset = dissect_nfs4_stateid(tvb, offset, tree, NULL);
+ offset = dissect_nfsdata(tvb, offset, tree, hf_nfs4_lrf_body_content);
}
return offset;
}
+
static int
dissect_nfs_layoutreturn_stateid(tvbuff_t *tvb, proto_tree *tree, int offset)
{
guint lrs_present;
lrs_present = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_bool(tvb, tree, hf_nfs_lrs_present, offset);
+ offset = dissect_rpc_bool(tvb, tree, hf_nfs4_lrs_present, offset);
if (lrs_present) {
- offset = dissect_nfs_stateid4(tvb, offset, tree, NULL);
+ offset = dissect_nfs4_stateid(tvb, offset, tree, NULL);
}
return offset;
}
+
static int
-dissect_nfs_notification_bitmap4(tvbuff_t *tvb, proto_tree *tree, int offset)
+dissect_nfs4_notification_bitmap(tvbuff_t *tvb, proto_tree *tree, int offset)
{
guint32 bitmap_num;
guint i;
@@ -8744,14 +8769,15 @@ dissect_nfs_notification_bitmap4(tvbuff_t *tvb, proto_tree *tree, int offset)
bitmap_num = tvb_get_ntohl(tvb, offset);
offset += 4;
for (i = 0; i < bitmap_num; i++) {
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_notification_bitmap4, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_notification_bitmap, offset);
}
return offset;
}
+
static int
-dissect_nfs_devices4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_devices(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint i,j;
guint32 num_indices,num_multipath, num_addr;
@@ -8764,7 +8790,7 @@ dissect_nfs_devices4(tvbuff_t *tvb, int offset, proto_tree *tree)
num_indices = tvb_get_ntohl(tvb, offset);
offset += 4;
for (i = 0; i < num_indices; i++) {
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_deviceidx4,offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_deviceidx,offset);
}
num_multipath = tvb_get_ntohl(tvb, offset);
@@ -8773,63 +8799,69 @@ dissect_nfs_devices4(tvbuff_t *tvb, int offset, proto_tree *tree)
num_addr = tvb_get_ntohl(tvb, offset);
offset += 4;
for (j = 0; j < num_addr; j++) {
- offset = dissect_rpc_string(tvb, tree, hf_nfs_r_netid, offset, NULL);
- offset = dissect_rpc_string(tvb, tree, hf_nfs_r_addr, offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_nfs4_r_netid, offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_nfs4_r_addr, offset, NULL);
}
}
return offset;
}
+
static int
-dissect_nfs_test_stateid4_arg(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
+dissect_nfs4_test_stateid_arg(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
{
- return dissect_nfs_stateid4(tvb, offset, tree, NULL);
+ return dissect_nfs4_stateid(tvb, offset, tree, NULL);
}
+
static int
-dissect_nfs_test_stateid4_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
+dissect_nfs4_test_stateid_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
{
- return dissect_nfs_nfsstat4(tvb, offset, tree, NULL);
+ return dissect_nfs4_status(tvb, offset, tree, NULL);
}
+
static int
-dissect_nfs_deviceaddr4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_deviceaddr(tvbuff_t *tvb, int offset, proto_tree *tree)
{
/* layout type */
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_layouttype4, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_layout_type, offset);
/* skip da_addr_body size */
offset+=4;
- offset = dissect_nfs_devices4(tvb, offset, tree);
+ offset = dissect_nfs4_devices(tvb, offset, tree);
return offset;
}
+
static int
-dissect_nfs_devicelist4(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_devicelist(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint count;
guint i;
count = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_devicenum4, offset);
- for (i = 0; i < count; i++) {
- offset = dissect_nfs_deviceid4(tvb, offset, tree);
- }
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_devicenum, offset);
+ for (i = 0; i < count; i++)
+ offset = dissect_nfs4_deviceid(tvb, offset, tree);
+
return offset;
}
+
static int
dissect_rpc_serverowner4(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_minorid4, offset);
- offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_majorid4);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_minorid, offset);
+ offset = dissect_nfsdata(tvb, offset, tree, hf_nfs4_majorid);
return offset;
}
+
static int
dissect_rpc_chanattrs4(tvbuff_t *tvb, int offset, proto_tree *tree, const char *name)
{
@@ -8841,21 +8873,22 @@ dissect_rpc_chanattrs4(tvbuff_t *tvb, int offset, proto_tree *tree, const char *
count = 28 + rdma_ird_len * 4;
chan_attrs_item = proto_tree_add_text(tree, tvb, offset, count, name, count);
- chan_attrs_tree = proto_item_add_subtree(chan_attrs_item, ett_nfs_chan_attrs);
-
- offset = dissect_rpc_uint32(tvb, chan_attrs_tree, hf_nfs_padsize4, offset);
- offset = dissect_rpc_uint32(tvb, chan_attrs_tree, hf_nfs_maxreqsize4, offset);
- offset = dissect_rpc_uint32(tvb, chan_attrs_tree, hf_nfs_maxrespsize4, offset);
- offset = dissect_rpc_uint32(tvb, chan_attrs_tree, hf_nfs_maxrespsizecached4, offset);
- offset = dissect_rpc_uint32(tvb, chan_attrs_tree, hf_nfs_maxops4, offset);
- offset = dissect_rpc_uint32(tvb, chan_attrs_tree, hf_nfs_maxreqs4, offset);
+ chan_attrs_tree = proto_item_add_subtree(chan_attrs_item, ett_nfs4_chan_attrs);
+
+ offset = dissect_rpc_uint32(tvb, chan_attrs_tree, hf_nfs4_padsize, offset);
+ offset = dissect_rpc_uint32(tvb, chan_attrs_tree, hf_nfs4_maxreqsize, offset);
+ offset = dissect_rpc_uint32(tvb, chan_attrs_tree, hf_nfs4_maxrespsize, offset);
+ offset = dissect_rpc_uint32(tvb, chan_attrs_tree, hf_nfs4_maxrespsizecached, offset);
+ offset = dissect_rpc_uint32(tvb, chan_attrs_tree, hf_nfs4_maxops, offset);
+ offset = dissect_rpc_uint32(tvb, chan_attrs_tree, hf_nfs4_maxreqs, offset);
offset += 4;
for (i = 0; i < rdma_ird_len; i++) {
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_rdmachanattrs4, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_rdmachanattrs, offset);
}
return offset;
}
+
static int
dissect_rpc_nfs_impl_id4(tvbuff_t *tvb, int offset, proto_tree *tree, const char *name)
{
@@ -8865,23 +8898,24 @@ dissect_rpc_nfs_impl_id4(tvbuff_t *tvb, int offset, proto_tree *tree, const char
count = tvb_get_ntohl(tvb, offset);
impl_id_item = proto_tree_add_text(tree, tvb, offset, 4, name, count);
- impl_id_tree = proto_item_add_subtree(impl_id_item, ett_nfs_clientowner4);
+ impl_id_tree = proto_item_add_subtree(impl_id_item, ett_nfs4_clientowner);
offset += 4;
for (i = 0; i < count; i++) {
proto_item *date_item = NULL;
proto_tree *date_tree = NULL;
- offset = dissect_nfs_utf8string(tvb, offset, impl_id_tree, hf_nfs_nii_domain4, NULL);
- offset = dissect_nfs_utf8string(tvb, offset, impl_id_tree, hf_nfs_nii_name4, NULL);
+ offset = dissect_nfs_utf8string(tvb, offset, impl_id_tree, hf_nfs4_nii_domain, NULL);
+ offset = dissect_nfs_utf8string(tvb, offset, impl_id_tree, hf_nfs4_nii_name, NULL);
date_item = proto_tree_add_text(impl_id_tree, tvb, offset, 12, "Build timestamp(nii_date)");
- date_tree = proto_item_add_subtree(date_item, ett_nfs_clientowner4);
- offset = dissect_nfs_nfstime4(tvb, offset, date_tree);
+ date_tree = proto_item_add_subtree(date_item, ett_nfs4_clientowner);
+ offset = dissect_nfs4_nfstime(tvb, offset, date_tree);
}
return offset;
}
+
static int
dissect_rpc_secparms4(tvbuff_t *tvb, int offset, proto_tree *tree)
{
@@ -8891,24 +8925,24 @@ dissect_rpc_secparms4(tvbuff_t *tvb, int offset, proto_tree *tree)
for (i = 0; i < count; i++) {
guint j, flavor = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_flavor4, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_flavor, offset);
switch(flavor) {
case 1: { /* AUTH_SYS */
guint count2;
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_stamp4, offset);
- offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_machinename4, NULL);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_uid4, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_gid4, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_stamp, offset);
+ offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs4_machinename, NULL);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_uid, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_gid, offset);
count2 = tvb_get_ntohl(tvb, offset);
offset += 4;
for (j = 0; j < count2; j++) {
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_gid4, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_gid, offset);
}
break;
}
case 6: /* RPCSEC_GSS */
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_service4, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_service, offset);
proto_item_append_text(tree, ", Handle from server");
offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_data);
proto_item_append_text(tree, ", Handle from client");
@@ -8921,80 +8955,83 @@ dissect_rpc_secparms4(tvbuff_t *tvb, int offset, proto_tree *tree)
return offset;
}
+
static int
-dissect_nfs_layout(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
+dissect_nfs4_layout(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
guint layout_type;
guint fh_num;
guint lo_seg_count;
guint i, lo_seg;
- proto_item *fitem;
- proto_item *fh_fitem;
+ proto_item *fitem = NULL;
+ proto_item *fh_fitem = NULL;
proto_tree *newtree = NULL;
proto_tree *fh_tree = NULL;
lo_seg_count = tvb_get_ntohl(tvb, offset);
- fitem = proto_tree_add_text(tree, tvb, offset, 4,
- "Layout Segment (count: %u)", lo_seg_count);
+ fitem = proto_tree_add_text(tree, tvb, offset, 4, "Layout Segment (count: %u)", lo_seg_count);
offset += 4;
- newtree = proto_item_add_subtree(fitem, ett_nfs_layoutseg);
+ newtree = proto_item_add_subtree(fitem, ett_nfs4_layoutseg);
for (lo_seg = 0; lo_seg < lo_seg_count; lo_seg++) {
- offset = dissect_rpc_uint64(tvb, newtree, hf_nfs_offset4, offset);
- offset = dissect_rpc_uint64(tvb, newtree, hf_nfs_length4, offset);
+ offset = dissect_rpc_uint64(tvb, newtree, hf_nfs4_offset, offset);
+ offset = dissect_rpc_uint64(tvb, newtree, hf_nfs4_length, offset);
- offset = dissect_rpc_uint32(tvb, newtree, hf_nfs_iomode4, offset);
+ offset = dissect_rpc_uint32(tvb, newtree, hf_nfs4_iomode, offset);
layout_type = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, newtree, hf_nfs_layouttype4, offset);
+ offset = dissect_rpc_uint32(tvb, newtree, hf_nfs4_layout_type, offset);
/* If not files layout type eat the rest and move on.. */
if (layout_type != LAYOUT4_NFSV4_1_FILES) {
- offset = dissect_nfsdata(tvb, offset, newtree, hf_nfs_layout4);
+ offset = dissect_nfsdata(tvb, offset, newtree, hf_nfs4_layout);
continue;
}
/* NFS Files */
offset += 4; /* Skip past opaque count */
- offset = dissect_nfs_deviceid4(tvb, offset, newtree);
+ offset = dissect_nfs4_deviceid(tvb, offset, newtree);
- offset = dissect_rpc_uint32(tvb, newtree, hf_nfs_nfl_util, offset);
- offset = dissect_rpc_uint32(tvb, newtree, hf_nfs_nfl_first_stripe_index, offset);
- offset = dissect_rpc_uint64(tvb, newtree, hf_nfs_offset4, offset);
+ offset = dissect_rpc_uint32(tvb, newtree, hf_nfs4_nfl_util, offset);
+ offset = dissect_rpc_uint32(tvb, newtree, hf_nfs4_nfl_first_stripe_index, offset);
+ offset = dissect_rpc_uint64(tvb, newtree, hf_nfs4_offset, offset);
fh_num = tvb_get_ntohl(tvb, offset); /* Len of FH list */
- fh_fitem = proto_tree_add_text(newtree, tvb, offset, 4,
- "File Handles (count: %u)", fh_num);
+ fh_fitem = proto_tree_add_text(newtree, tvb, offset, 4, "File Handles (count: %u)", fh_num);
offset += 4;
- fh_tree = proto_item_add_subtree(fh_fitem, ett_nfs_layoutseg_fh);
- for (i = 0; i < fh_num; i++) {
- offset = dissect_nfs_fh4(tvb, offset, pinfo, fh_tree, "lo_filehandle", NULL);
- }
+ fh_tree = proto_item_add_subtree(fh_fitem, ett_nfs4_layoutseg_fh);
+ for (i = 0; i < fh_num; i++)
+ offset = dissect_nfs4_fh(tvb, offset, pinfo, fh_tree, "lo_filehandle", NULL);
}
return offset;
}
+
static int
dissect_nfs_create_session_flags(tvbuff_t *tvb, int offset, proto_tree *tree, int hf_csa)
{
- proto_tree *csa_flags_item;
- proto_tree *csa_flags_tree;
+ proto_tree *csa_flags_item = NULL;
+ proto_tree *csa_flags_tree = NULL;
csa_flags_item = proto_tree_add_item(tree, hf_csa, tvb, offset, 4, ENC_BIG_ENDIAN);
- csa_flags_tree = proto_item_add_subtree(csa_flags_item, ett_create_session_flags);
- proto_tree_add_item(csa_flags_tree, hf_nfs_create_session_flags_persist, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(csa_flags_tree, hf_nfs_create_session_flags_conn_back_chan, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(csa_flags_tree, hf_nfs_create_session_flags_conn_rdma, tvb, offset, 4, ENC_BIG_ENDIAN);
+ csa_flags_tree = proto_item_add_subtree(csa_flags_item, ett_nfs4_create_session_flags);
+ proto_tree_add_item(csa_flags_tree, hf_nfs4_create_session_flags_persist, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(csa_flags_tree, hf_nfs4_create_session_flags_conn_back_chan, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(csa_flags_tree, hf_nfs4_create_session_flags_conn_rdma, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
offset += 4;
return offset;
}
+
enum channel_dir_from_client4 {
CDFC4_FORE = 0x1,
CDFC4_BACK = 0x2,
@@ -9003,8 +9040,8 @@ enum channel_dir_from_client4 {
};
static const value_string names_channel_dir_from_client[] = {
- { CDFC4_FORE, "CDFC4_FORE" },
- { CDFC4_BACK, "CDFC4_BACK" },
+ { CDFC4_FORE, "CDFC4_FORE" },
+ { CDFC4_BACK, "CDFC4_BACK" },
{ CDFC4_FORE_OR_BOTH, "CDFC4_FORE_OR_BOTH" },
{ CDFC4_BACK_OR_BOTH, "CDFC4_BACK_OR_BOTH" },
{ 0, NULL }
@@ -9017,9 +9054,9 @@ enum channel_dir_from_server4 {
};
static const value_string names_channel_dir_from_server[] = {
- { CDFS4_FORE, "CDFS4_FORE" },
- { CDFS4_BACK, "CDFS4_BACK" },
- { CDFS4_BOTH, "CDFS4_BOTH" },
+ { CDFS4_FORE, "CDFS4_FORE" },
+ { CDFS4_BACK, "CDFS4_BACK" },
+ { CDFS4_BOTH, "CDFS4_BOTH" },
{ 0, NULL }
};
@@ -9027,39 +9064,113 @@ static const value_string names_channel_dir_from_server[] = {
#define SECINFO_STYLE4_PARENT 1
static const value_string names_secinfo_style4[] = {
{ SECINFO_STYLE4_CURRENT_FH, "SECINFO_STYLE4_CURRENT_FH" },
- { SECINFO_STYLE4_PARENT, "SECINFO_STYLE4_PARENT" },
+ { SECINFO_STYLE4_PARENT, "SECINFO_STYLE4_PARENT" },
{ 0, NULL }
};
+typedef struct _nfs4_operation_summary {
+ guint32 opcode;
+ gboolean iserror;
+ GString *optext;
+} nfs4_operation_summary;
+
+
+/* To try to determine which NFSv4 operations are most important in a request, we categorize
+ the operations into different "tiers".
+ All operations falling into the highest tier (where 1 is highest, 5 is lowest) are considered
+ to be the "most significant" operations. This information is useful for display purposes,
+ filtering, and for response time calculations.
+ For example, virtually all NFSv4 requests include a GETATTR. But in a request with
+ PUTFH; CLOSE; GETATTR operations, CLOSE is the significant operation. In a request with
+ PUTFH; GETATTR operations, GETATTR is the significant operation. CLOSE has higher tier than
+ GETATTR, which is in a higher tier than PUTFH.
+ In practice this seems to be a very reliable method of determining the most significant
+ operation(s). */
+
+static int nfs4_operation_tiers[] = {
+ 1 /* 0 */ ,
+ 1 /* 1 */ ,
+ 1 /* 2 */ ,
+ 2 /* 3, NFS4_OP_ACCESS */ ,
+ 1 /* 4, NFS4_OP_CLOSE */,
+ 1 /* 5, NFS4_OP_COMMIT */,
+ 1 /* 6, NFS4_OP_CREATE */,
+ 1 /* 7, NFS4_OP_DELEGPURGE */,
+ 1 /* 8, NFS4_OP_DELEGRETURN */,
+ 3 /* 9, NFS4_OP_GETATTR */,
+ 4 /* 10, NFS4_OP_GETFH */,
+ 1 /* 11, NFS4_OP_LINK */,
+ 1 /* 12, NFS4_OP_LOCK */,
+ 1 /* 13, NFS4_OP_LOCKT */,
+ 1 /* 14, NFS4_OP_LOCKU */,
+ 1 /* 15, NFS4_OP_LOOKUP */,
+ 1 /* 16, NFS4_OP_LOOKUPP */,
+ 2 /* 17, NFS4_OP_NVERIFY */,
+ 1 /* 18, NFS4_OP_OPEN */,
+ 1 /* 19, NFS4_OP_OPENATTR */,
+ 1 /* 20, NFS4_OP_OPEN_CONFIRM */,
+ 1 /* 21, NFS4_OP_OPEN_DOWNGRADE */,
+ 4 /* 22, NFS4_OP_PUTFH */,
+ 3 /* 23, NFS4_OP_PUTPUBFH */,
+ 3 /* 24, NFS4_OP_PUTROOTFH */,
+ 1 /* 25, NFS4_OP_READ */,
+ 1 /* 26, NFS4_OP_READDIR */,
+ 1 /* 27, NFS4_OP_READLINK */,
+ 1 /* 28, NFS4_OP_REMOVE */,
+ 1 /* 29, NFS4_OP_RENAME */,
+ 1 /* 30, NFS4_OP_RENEW */,
+ 4 /* 31, NFS4_OP_RESTOREFH */,
+ 4 /* 32, NFS4_OP_SAVEFH */,
+ 1 /* 33, NFS4_OP_SECINFO */,
+ 1 /* 34, NFS4_OP_SETATTR */,
+ 1 /* 35, NFS4_OP_SETCLIENTID */,
+ 1 /* 36, NFS4_OP_SETCLIENTID_CONFIRM */,
+ 1 /* 37, NFS4_OP_VERIFY */,
+ 1 /* 38, NFS4_OP_WRITE */,
+ 1 /* 39, NFS4_OP_RELEASE_LOCKOWNER */,
+ /* Minor version 1 */
+ 1 /* 40, NFS4_OP_BACKCHANNEL_CTL */,
+ 1 /* 41, NFS4_OP_BIND_CONN_TO_SESSION */,
+ 1 /* 42, NFS4_OP_EXCHANGE_ID */,
+ 1 /* 43, NFS4_OP_CREATE_SESSION */,
+ 1 /* 44, NFS4_OP_DESTROY_SESSION */,
+ 1 /* 45, NFS4_OP_FREE_STATEID */,
+ 1 /* 46, NFS4_OP_GET_DIR_DELEGATION */,
+ 1 /* 47, NFS4_OP_GETDEVINFO */,
+ 1 /* 48, NFS4_OP_GETDEVLIST */,
+ 1 /* 49, NFS4_OP_LAYOUTCOMMIT */,
+ 1 /* 50, NFS4_OP_LAYOUTGET */,
+ 1 /* 51, NFS4_OP_LAYOUTRETURN */,
+ 1 /* 52, NFS4_OP_SECINFO_NO_NAME */,
+ 4 /* 53, NFS4_OP_SEQUENCE */,
+ 1 /* 54, NFS4_OP_SET_SSV */,
+ 1 /* 55, NFS4_OP_TEST_STATEID */,
+ 1 /* 56, NFS4_OP_WANT_DELEGATION */,
+ 1 /* 57, NFS4_OP_DESTROY_CLIENTID */,
+ 1 /* 58, NFS4_OP_RECLAIM_COMPLETE */
+};
+
+
static int
-dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree)
+dissect_nfs4_request_op(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- guint32 ops, ops_counter, summary_counter;
- guint opcode;
- /*guint name_offset=0;*/
- proto_item *fitem;
- proto_tree *ftree = NULL;
- proto_tree *newftree = NULL;
- guint32 string_length;
- int cbprog;
const char *name = NULL, *source_name = NULL, *dest_name=NULL;
const char *opname=NULL;
- guint32 last_fh_hash=0;
- guint32 saved_fh_hash=0;
- guint16 sid_hash, clientid_hash=0;
+ int cbprog;
+ guint opcode, highest_tier=5, current_tier=5, first_operation=1;
+ /*guint name_offset=0;*/
guint8 *clientid_array;
+ guint16 sid_hash, clientid_hash=0;
+ guint32 ops, ops_counter, summary_counter, string_length, last_fh_hash=0, saved_fh_hash=0, length;
guint64 lock_length, file_offset;
- guint32 length;
- guint highest_tier=5;
- guint current_tier=5;
- guint first_operation=1;
-
- nfsv4_operation_summary *op_summary;
+ proto_item *fitem = NULL;
+ proto_tree *ftree = NULL;
+ proto_tree *newftree = NULL;
+ nfs4_operation_summary *op_summary;
ops = tvb_get_ntohl(tvb, offset+0);
- fitem = proto_tree_add_uint_format(tree, hf_nfs_ops_count4, tvb, offset+0, 4, ops,
+ fitem = proto_tree_add_uint_format(tree, hf_nfs4_ops_count, tvb, offset+0, 4, ops,
"Operations (count: %u)", ops);
offset += 4;
@@ -9073,10 +9184,10 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
ops = MAX_NFSV4_OPS;
}
- op_summary = (nfsv4_operation_summary *)g_malloc0(sizeof(nfsv4_operation_summary) * ops);
+ op_summary = (nfs4_operation_summary *)g_malloc0(sizeof(nfs4_operation_summary) * ops);
if (fitem) {
- ftree = proto_item_add_subtree(fitem, ett_nfs_argop4);
+ ftree = proto_item_add_subtree(fitem, ett_nfs4_request_op);
}
if (ops)
@@ -9085,35 +9196,31 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
for (ops_counter=0; ops_counter<ops; ops_counter++)
{
op_summary[ops_counter].optext = g_string_new("");
-
opcode = tvb_get_ntohl(tvb, offset);
-
op_summary[ops_counter].opcode = opcode;
- fitem = proto_tree_add_uint(ftree, hf_nfs_op4, tvb, offset, 4,
- opcode);
+ fitem = proto_tree_add_uint(ftree, hf_nfs4_op, tvb, offset, 4, opcode);
/* the opcodes are not contiguous */
- if ((opcode < NFS4_OP_ACCESS || opcode > NFS4_OP_RECLAIM_COMPLETE) &&
- (opcode != NFS4_OP_ILLEGAL))
+ if((opcode < NFS4_OP_ACCESS || opcode > NFS4_OP_RECLAIM_COMPLETE)
+ && opcode != NFS4_OP_ILLEGAL)
break;
/* all of the V4 ops are contiguous, except for NFS4_OP_ILLEGAL */
if (opcode == NFS4_OP_ILLEGAL) {
- newftree = proto_item_add_subtree(fitem, ett_nfs_illegal4);
- } else if (nfsv4_operation_ett[opcode - 3]) {
- newftree = proto_item_add_subtree(fitem,
- *nfsv4_operation_ett[opcode - 3]);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_illegal);
+ } else if (nfs4_operation_ett[opcode - 3]) {
+ newftree = proto_item_add_subtree(fitem, *nfs4_operation_ett[opcode - 3]);
} else {
break;
}
- opname=val_to_str_ext_const(opcode, &names_nfsv4_operation_ext, "Unknown");
+ opname = val_to_str_ext_const(opcode, &names_nfs4_operation_ext, "Unknown");
offset += 4;
g_string_append_printf (op_summary[ops_counter].optext, "%s", opname);
g_string_printf (op_summary[ops_counter].optext, "%s",
- val_to_str_ext_const(opcode, &names_nfsv4_operation_ext, "Unknown"));
+ val_to_str_ext_const(opcode, &names_nfs4_operation_ext, "Unknown"));
proto_item_append_text(proto_tree_get_parent(tree),
"%s%s", ops_counter ? ", " : " ", opname);
@@ -9123,39 +9230,37 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
switch(opcode)
{
case NFS4_OP_ACCESS:
- {
- guint32 *acc_request, amask;
- rpc_call_info_value *civ;
-
- /* Get access mask to check and save it for comparison in the reply. */
- amask = tvb_get_ntohl(tvb, offset);
- acc_request = (guint32 *)se_memdup( &amask, sizeof(guint32));
- civ = (rpc_call_info_value *)pinfo->private_data;
- civ->private_data = acc_request;
-
- g_string_append_printf (op_summary[ops_counter].optext, " FH:0x%08x",
- last_fh_hash);
- display_access_items(tvb, offset, pinfo, fitem, amask, 'C', 4,
- op_summary[ops_counter].optext, "Check") ;
- offset+=4;
- }
+ {
+ guint32 *acc_request, amask;
+ rpc_call_info_value *civ;
+
+ /* Get access mask to check and save it for comparison in the reply. */
+ amask = tvb_get_ntohl(tvb, offset);
+ acc_request = (guint32 *)se_memdup( &amask, sizeof(guint32));
+ civ = (rpc_call_info_value *)pinfo->private_data;
+ civ->private_data = acc_request;
+
+ g_string_append_printf (op_summary[ops_counter].optext, " FH: 0x%08x", last_fh_hash);
+ display_access_items(tvb, offset, pinfo, fitem, amask, 'C', 4,
+ op_summary[ops_counter].optext, "Check") ;
+ offset+=4;
+ }
break;
case NFS4_OP_CLOSE:
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4,
- offset);
- offset = dissect_nfs_stateid4(tvb, offset, newftree, &sid_hash);
- g_string_append_printf (op_summary[ops_counter].optext, " StateID:0x%04x", sid_hash);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_seqid, offset);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, &sid_hash);
+ g_string_append_printf (op_summary[ops_counter].optext, " StateID: 0x%04x", sid_hash);
break;
case NFS4_OP_COMMIT:
file_offset = tvb_get_ntoh64(tvb, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4,
- offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_offset, offset);
length = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_count4,
- offset);
- g_string_append_printf (op_summary[ops_counter].optext, " FH:0x%08x Offset:%"G_GINT64_MODIFIER"u Len:%u", last_fh_hash, file_offset, length);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_count, offset);
+ g_string_append_printf (op_summary[ops_counter].optext,
+ " FH: 0x%08x Offset: %"G_GINT64_MODIFIER"u Len: %u",
+ last_fh_hash, file_offset, length);
break;
@@ -9164,19 +9269,17 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint create_type;
create_type = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_ftype4,
- offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_ftype, offset);
switch(create_type)
{
case NF4LNK:
- offset = dissect_nfs_utf8string(tvb, offset, newftree,
- hf_nfs_linktext4, NULL);
+ offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_linktext, NULL);
break;
case NF4BLK:
case NF4CHR:
- offset = dissect_nfs_specdata4(tvb, offset, newftree);
+ offset = dissect_nfs4_specdata(tvb, offset, newftree);
break;
case NF4SOCK:
@@ -9188,19 +9291,18 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
break;
}
- offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs_component4, NULL);
-
- offset = dissect_nfs_fattr4(tvb, offset, pinfo, newftree);
+ offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_component, NULL);
+ offset = dissect_nfs4_fattr(tvb, offset, pinfo, newftree);
}
break;
case NFS4_OP_DELEGPURGE:
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_clientid4, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_clientid, offset);
break;
case NFS4_OP_DELEGRETURN:
- offset = dissect_nfs_stateid4(tvb, offset, newftree, &sid_hash);
- g_string_append_printf (op_summary[ops_counter].optext, " StateID:0x%04x", sid_hash);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, &sid_hash);
+ g_string_append_printf (op_summary[ops_counter].optext, " StateID: 0x%04x", sid_hash);
break;
case NFS4_OP_GETATTR:
@@ -9209,12 +9311,12 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *getattr_req_tree = NULL;
getattr_req_item = proto_tree_add_text(newftree,tvb,offset,0,"%s","GETATTR4args");
- getattr_req_tree = proto_item_add_subtree(getattr_req_item,ett_nfs_getattr4_args);
+ getattr_req_tree = proto_item_add_subtree(getattr_req_item,ett_nfs4_getattr_args);
offset = dissect_nfs4_attr_request(tvb, offset, pinfo, getattr_req_tree, 1);
}
if (last_fh_hash != 0)
- g_string_append_printf (op_summary[ops_counter].optext, " FH:0x%08x", last_fh_hash);
+ g_string_append_printf (op_summary[ops_counter].optext, " FH: 0x%08x", last_fh_hash);
break;
@@ -9223,56 +9325,55 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
break;
case NFS4_OP_LINK:
- offset = dissect_nfs_utf8string(tvb, offset, newftree,
- hf_nfs_component4, NULL);
+ offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_component, NULL);
break;
case NFS4_OP_LOCK:
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_lock_type4, offset);
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_lock4_reclaim, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_lock_type, offset);
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_lock_reclaim, offset);
file_offset = tvb_get_ntoh64(tvb, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_offset, offset);
lock_length = tvb_get_ntoh64(tvb, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_length4, offset);
- offset = dissect_nfs_locker4(tvb, offset, newftree);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_length, offset);
+ offset = dissect_nfs4_locker(tvb, offset, newftree);
if (lock_length == G_GINT64_CONSTANT(0xffffffffffffffffU))
- g_string_append_printf (op_summary[ops_counter].optext, " FH: 0x%08x Offset: %"G_GINT64_MODIFIER"u Length: <End of File>",
- last_fh_hash,file_offset);
- else {
- g_string_append_printf (op_summary[ops_counter].optext, " FH: 0x%08x Offset: %"G_GINT64_MODIFIER"u Length: %"G_GINT64_MODIFIER"u ",
- last_fh_hash,file_offset,lock_length);
- }
-
+ g_string_append_printf (op_summary[ops_counter].optext,
+ " FH: 0x%08x Offset: %"G_GINT64_MODIFIER"u Length: <End of File>",
+ last_fh_hash, file_offset);
+ else
+ g_string_append_printf (op_summary[ops_counter].optext,
+ " FH: 0x%08x Offset: %"G_GINT64_MODIFIER"u Length: %"G_GINT64_MODIFIER"u ",
+ last_fh_hash, file_offset, lock_length);
break;
case NFS4_OP_LOCKT:
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_lock_type4, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_length4, offset);
- offset = dissect_nfs_lock_owner4(tvb, offset, newftree);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_lock_type, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_offset, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_length, offset);
+ offset = dissect_nfs4_lock_owner(tvb, offset, newftree);
break;
case NFS4_OP_LOCKU:
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_lock_type4, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_seqid4, offset);
- offset = dissect_nfs_stateid4(tvb, offset, newftree, NULL);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_lock_type, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_seqid, offset);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, NULL);
file_offset = tvb_get_ntoh64(tvb, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_offset, offset);
lock_length = tvb_get_ntoh64(tvb, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_length4, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_length, offset);
if (lock_length == G_GINT64_CONSTANT(0xffffffffffffffffU))
- g_string_append_printf (op_summary[ops_counter].optext, " FH: 0x%08x Offset: %"G_GINT64_MODIFIER"u Length: <End of File>",
- last_fh_hash,file_offset);
- else {
- g_string_append_printf (op_summary[ops_counter].optext, " FH: 0x%08x Offset: %"G_GINT64_MODIFIER"u Length: %"G_GINT64_MODIFIER"u ",
- last_fh_hash,file_offset,lock_length);
- }
+ g_string_append_printf (op_summary[ops_counter].optext,
+ " FH: 0x%08x Offset: %"G_GINT64_MODIFIER"u Length: <End of File>",
+ last_fh_hash,file_offset);
+ else
+ g_string_append_printf (op_summary[ops_counter].optext,
+ " FH: 0x%08x Offset: %"G_GINT64_MODIFIER"u Length: %"G_GINT64_MODIFIER"u ",
+ last_fh_hash,file_offset,lock_length);
break;
case NFS4_OP_LOOKUP:
/*name_offset=offset;*/
- offset = dissect_nfs_utf8string(tvb, offset, newftree,
- hf_nfs_component4, &name);
+ offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_component, &name);
if (nfs_file_name_snooping){
rpc_call_info_value *civ=(rpc_call_info_value *)pinfo->private_data;
nfs_name_snoop_add_name(civ->xid, tvb,
@@ -9282,58 +9383,52 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
g_string_append_printf (op_summary[ops_counter].optext, " ");
if (last_fh_hash != 0)
- g_string_append_printf (op_summary[ops_counter].optext, "DH:0x%08x/", last_fh_hash);
+ g_string_append_printf (op_summary[ops_counter].optext, "DH: 0x%08x/", last_fh_hash);
if (name != NULL)
- g_string_append_printf (op_summary[ops_counter].optext, "%s", name);
-
+ g_string_append_printf (op_summary[ops_counter].optext, "%s", name);
break;
case NFS4_OP_LOOKUPP:
break;
case NFS4_OP_NVERIFY:
- offset = dissect_nfs_fattr4(tvb, offset, pinfo, newftree);
+ offset = dissect_nfs4_fattr(tvb, offset, pinfo, newftree);
if (last_fh_hash != 0)
- g_string_append_printf (op_summary[ops_counter].optext, " FH:0x%08x", last_fh_hash);
-
+ g_string_append_printf (op_summary[ops_counter].optext, " FH: 0x%08x", last_fh_hash);
break;
case NFS4_OP_OPEN:
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4,
- offset);
- offset = dissect_nfs_open4_share_access(tvb, offset, newftree);
- offset = dissect_nfs_open4_share_deny(tvb, offset, newftree);
- offset = dissect_nfs_open_owner4(tvb, offset, newftree);
- offset = dissect_nfs_openflag4(tvb, offset, pinfo, newftree);
- offset = dissect_nfs_open_claim4(tvb, offset, pinfo, newftree, &name);
- g_string_append_printf (op_summary[ops_counter].optext, " ");
- if (last_fh_hash != 0)
- g_string_append_printf (op_summary[ops_counter].optext, "DH:0x%08x/", last_fh_hash);
- if (name != NULL)
- g_string_append_printf (op_summary[ops_counter].optext, "%s", name);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_seqid, offset);
+ offset = dissect_nfs4_open_share_access(tvb, offset, newftree);
+ offset = dissect_nfs4_open_share_deny(tvb, offset, newftree);
+ offset = dissect_nfs4_open_owner(tvb, offset, newftree);
+ offset = dissect_nfs4_openflag(tvb, offset, pinfo, newftree);
+ offset = dissect_nfs4_open_claim(tvb, offset, pinfo, newftree, &name);
+ g_string_append_printf (op_summary[ops_counter].optext, " ");
+ if (last_fh_hash != 0)
+ g_string_append_printf (op_summary[ops_counter].optext, "DH: 0x%08x/", last_fh_hash);
+ if (name != NULL)
+ g_string_append_printf (op_summary[ops_counter].optext, "%s", name);
break;
case NFS4_OP_OPENATTR:
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_attrdircreate,
- offset);
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_attr_dir_create, offset);
break;
case NFS4_OP_OPEN_CONFIRM:
- offset = dissect_nfs_stateid4(tvb, offset, newftree, NULL);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4,
- offset);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, NULL);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_seqid, offset);
break;
case NFS4_OP_OPEN_DOWNGRADE:
- offset = dissect_nfs_stateid4(tvb, offset, newftree, NULL);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4,
- offset);
- offset = dissect_nfs_open4_share_access(tvb, offset, newftree);
- offset = dissect_nfs_open4_share_deny(tvb, offset, newftree);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, NULL);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_seqid, offset);
+ offset = dissect_nfs4_open_share_access(tvb, offset, newftree);
+ offset = dissect_nfs4_open_share_deny(tvb, offset, newftree);
break;
case NFS4_OP_PUTFH:
- offset = dissect_nfs_fh4(tvb, offset, pinfo, newftree, "filehandle", &last_fh_hash);
+ offset = dissect_nfs4_fh(tvb, offset, pinfo, newftree, "filehandle", &last_fh_hash);
break;
case NFS4_OP_PUTPUBFH:
@@ -9341,70 +9436,61 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
break;
case NFS4_OP_READ:
- offset = dissect_nfs_stateid4(tvb, offset, newftree, &sid_hash);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, &sid_hash);
file_offset = tvb_get_ntoh64(tvb, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4,
- offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_offset, offset);
length = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_count4,
- offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_count, offset);
if (sid_hash != 0)
- g_string_append_printf (op_summary[ops_counter].optext, " StateID:0x%04x Offset:%" G_GINT64_MODIFIER "u Len:%u", sid_hash, file_offset, length);
+ g_string_append_printf (op_summary[ops_counter].optext,
+ " StateID: 0x%04x Offset: %" G_GINT64_MODIFIER "u Len: %u",
+ sid_hash, file_offset, length);
break;
case NFS4_OP_READDIR:
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_cookie4,
- offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_cookieverf4,
- offset);
- offset = dissect_rpc_uint32(tvb, newftree,
- hf_nfs_count4_dircount, offset);
- offset = dissect_rpc_uint32(tvb, newftree,
- hf_nfs_count4_maxcount, offset);
- offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree,
- FATTR4_BITMAP_ONLY);
- if (last_fh_hash != 0)
- g_string_append_printf (op_summary[ops_counter].optext, " FH:0x%08x", last_fh_hash);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_cookie, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_cookie_verf, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_count_dircount, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_count_maxcount, offset);
+ offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree, FATTR4_BITMAP_ONLY);
+ if (last_fh_hash != 0)
+ g_string_append_printf (op_summary[ops_counter].optext, " FH: 0x%08x", last_fh_hash);
break;
case NFS4_OP_READLINK:
break;
case NFS4_OP_TEST_STATEID:
- offset = dissect_rpc_array(tvb, pinfo, newftree, offset, dissect_nfs_test_stateid4_arg, hf_nfs_test_stateid_arg4);
+ offset = dissect_rpc_array(tvb, pinfo, newftree, offset, dissect_nfs4_test_stateid_arg, hf_nfs4_test_stateid_arg);
break;
case NFS4_OP_DESTROY_CLIENTID:
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_clientid4, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_clientid, offset);
break;
case NFS4_OP_RECLAIM_COMPLETE:
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_reclaim_one_fs4, offset);
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_reclaim_one_fs, offset);
break;
case NFS4_OP_REMOVE:
- offset = dissect_nfs_utf8string(tvb, offset, newftree,
- hf_nfs_component4, &name);
+ offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_component, &name);
g_string_append_printf (op_summary[ops_counter].optext, " ");
if (last_fh_hash != 0)
- g_string_append_printf (op_summary[ops_counter].optext, "DH:0x%08x/", last_fh_hash);
+ g_string_append_printf (op_summary[ops_counter].optext, "DH: 0x%08x/", last_fh_hash);
if (name != NULL)
g_string_append_printf (op_summary[ops_counter].optext, "%s", name);
break;
case NFS4_OP_RENAME:
- offset = dissect_nfs_utf8string(tvb, offset, newftree,
- hf_nfs_component4, &source_name);
- offset = dissect_nfs_utf8string(tvb, offset, newftree,
- hf_nfs_component4, &dest_name);
+ offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_component, &source_name);
+ offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_component, &dest_name);
g_string_append_printf (op_summary[ops_counter].optext, " From: %s To: %s",
- source_name ? source_name : "Unknown",
- dest_name ? dest_name : "Unknown");
+ source_name ? source_name : "Unknown", dest_name ? dest_name : "Unknown");
break;
case NFS4_OP_RENEW:
clientid_array = tvb_get_ephemeral_string(tvb, offset, 8);
clientid_hash = crc16_ccitt(clientid_array, 8);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_clientid4, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_clientid, offset);
g_string_append_printf (op_summary[ops_counter].optext, " CID: 0x%04x", clientid_hash);
break;
@@ -9419,18 +9505,18 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
case NFS4_OP_SECINFO:
offset = dissect_nfs_utf8string(tvb, offset, newftree,
- hf_nfs_component4, NULL);
+ hf_nfs4_component, NULL);
break;
case NFS4_OP_SECINFO_NO_NAME:
- proto_tree_add_item(newftree, hf_nfs_secinfo_style4, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(newftree, hf_nfs4_secinfo_style, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
break;
case NFS4_OP_SETATTR:
- offset = dissect_nfs_stateid4(tvb, offset, newftree, NULL);
- offset = dissect_nfs_fattr4(tvb, offset, pinfo, newftree);
- g_string_append_printf (op_summary[ops_counter].optext, " FH:0x%08x", last_fh_hash);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, NULL);
+ offset = dissect_nfs4_fattr(tvb, offset, pinfo, newftree);
+ g_string_append_printf (op_summary[ops_counter].optext, " FH: 0x%08x", last_fh_hash);
break;
case NFS4_OP_SETCLIENTID:
@@ -9440,166 +9526,167 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
fitem = proto_tree_add_text(newftree, tvb, offset, 0, "client");
- client_tree = proto_item_add_subtree(fitem, ett_nfs_client_id4);
+ client_tree = proto_item_add_subtree(fitem, ett_nfs4_client_id);
- offset = dissect_nfs_client_id4(tvb, offset, client_tree);
+ offset = dissect_nfs4_client_id(tvb, offset, client_tree);
fitem = proto_tree_add_text(newftree, tvb, offset, 0, "callback");
callback_tree = proto_item_add_subtree(fitem,
- ett_nfs_cb_client4);
+ ett_nfs4_cb_client);
- offset = dissect_nfs_cb_client4(tvb, offset, callback_tree);
+ offset = dissect_nfs4_cb_client4(tvb, offset, callback_tree);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_callback_ident,
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_callback_ident,
offset);
}
break;
case NFS4_OP_SETCLIENTID_CONFIRM:
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_clientid4, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_verifier4, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_clientid, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_verifier, offset);
break;
case NFS4_OP_VERIFY:
- offset = dissect_nfs_fattr4(tvb, offset, pinfo, newftree);
+ offset = dissect_nfs4_fattr(tvb, offset, pinfo, newftree);
break;
case NFS4_OP_WRITE:
- offset = dissect_nfs_stateid4(tvb, offset, newftree, &sid_hash);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, &sid_hash);
file_offset = tvb_get_ntoh64(tvb, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4, offset);
- offset = dissect_nfs_stable_how4(tvb, offset, newftree, "stable");
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_offset, offset);
+ offset = dissect_nfs4_stable_how(tvb, offset, newftree, "stable");
string_length = tvb_get_ntohl(tvb,offset+0);
- dissect_rpc_uint32(tvb, newftree, hf_write_data_length, offset); /* don't change offset */
+ dissect_rpc_uint32(tvb, newftree, hf_nfs4_write_data_length, offset); /* don't change offset */
offset = dissect_nfsdata(tvb, offset, newftree, hf_nfs_data);
if (sid_hash != 0)
- g_string_append_printf (op_summary[ops_counter].optext, " StateID:0x%04x Offset:%"G_GINT64_MODIFIER"u Len:%u", sid_hash, file_offset, string_length);
+ g_string_append_printf (op_summary[ops_counter].optext,
+ " StateID: 0x%04x Offset: %"G_GINT64_MODIFIER"u Len: %u",
+ sid_hash, file_offset, string_length);
break;
case NFS4_OP_RELEASE_LOCKOWNER:
- offset = dissect_nfs_lock_owner4(tvb, offset, newftree);
+ offset = dissect_nfs4_lock_owner(tvb, offset, newftree);
break;
/* Minor Version 1 */
case NFS4_OP_BACKCHANNEL_CTL:
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_cb_program, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_cb_program, offset);
offset = dissect_rpc_secparms4(tvb, offset, newftree);
break;
case NFS4_OP_BIND_CONN_TO_SESSION:
- offset = dissect_nfs_sessionid4(tvb, offset, newftree);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_bctsa_dir, offset);
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_bctsa_use_conn_in_rdma_mode, offset);
+ offset = dissect_nfs4_sessionid(tvb, offset, newftree);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_bctsa_dir, offset);
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_bctsa_use_conn_in_rdma_mode, offset);
break;
- case NFS4_OP_EXCHANGE_ID: {
- proto_tree *eia_clientowner_tree = NULL;
- proto_tree *eia_flags_tree = NULL;
-
- fitem = proto_tree_add_text(newftree, tvb, offset, 0, "eia_clientowner");
- eia_clientowner_tree = proto_item_add_subtree(fitem, ett_nfs_clientowner4);
- offset = dissect_rpc_uint64(tvb, eia_clientowner_tree, hf_nfs_verifier4, offset);
- offset = dissect_nfsdata(tvb, offset, eia_clientowner_tree, hf_nfs_data);
-
- fitem = proto_tree_add_item(newftree, hf_nfs_exchid_call_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
- eia_flags_tree = proto_item_add_subtree(fitem, ett_exchangeid_call_flags);
- proto_tree_add_item(eia_flags_tree, hf_nfs_exchid_flags_confirmed_r, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eia_flags_tree, hf_nfs_exchid_flags_upd_conf_rec_a, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eia_flags_tree, hf_nfs_exchid_flags_pnfs_ds, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eia_flags_tree, hf_nfs_exchid_flags_pnfs_mds, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eia_flags_tree, hf_nfs_exchid_flags_non_pnfs, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eia_flags_tree, hf_nfs_exchid_flags_bind_princ, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eia_flags_tree, hf_nfs_exchid_flags_moved_migr, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eia_flags_tree, hf_nfs_exchid_flags_moved_refer, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
+ case NFS4_OP_EXCHANGE_ID:
+ {
+ proto_tree *eia_clientowner_tree = NULL;
+ proto_tree *eia_flags_tree = NULL;
+
+ fitem = proto_tree_add_text(newftree, tvb, offset, 0, "eia_clientowner");
+ eia_clientowner_tree = proto_item_add_subtree(fitem, ett_nfs4_clientowner);
+ offset = dissect_rpc_uint64(tvb, eia_clientowner_tree, hf_nfs4_verifier, offset);
+ offset = dissect_nfsdata(tvb, offset, eia_clientowner_tree, hf_nfs_data);
+
+ fitem = proto_tree_add_item(newftree, hf_nfs4_exchid_call_flags, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ eia_flags_tree = proto_item_add_subtree(fitem, ett_nfs4_exchangeid_call_flags);
+ proto_tree_add_item(eia_flags_tree, hf_nfs4_exchid_flags_confirmed_r, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eia_flags_tree, hf_nfs4_exchid_flags_upd_conf_rec_a, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eia_flags_tree, hf_nfs4_exchid_flags_pnfs_ds, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eia_flags_tree, hf_nfs4_exchid_flags_pnfs_mds, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eia_flags_tree, hf_nfs4_exchid_flags_non_pnfs, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eia_flags_tree, hf_nfs4_exchid_flags_bind_princ, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eia_flags_tree, hf_nfs4_exchid_flags_moved_migr, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eia_flags_tree, hf_nfs4_exchid_flags_moved_refer, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ offset += 4;
- offset = dissect_nfs_state_protect4_a(tvb, offset, newftree);
- offset = dissect_rpc_nfs_impl_id4(tvb, offset, newftree, "eia_client_impl_id");
+ offset = dissect_nfs4_state_protect_a(tvb, offset, newftree);
+ offset = dissect_rpc_nfs_impl_id4(tvb, offset, newftree, "eia_client_impl_id");
}
break;
case NFS4_OP_CREATE_SESSION:
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_clientid4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4, offset);
- offset = dissect_nfs_create_session_flags(tvb, offset, newftree, hf_nfs_create_session_flags_csa);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_clientid, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_seqid, offset);
+ offset = dissect_nfs_create_session_flags(tvb, offset, newftree,
+ hf_nfs4_create_session_flags_csa);
offset = dissect_rpc_chanattrs4(tvb, offset, newftree, "csa_fore_chan_attrs");
offset = dissect_rpc_chanattrs4(tvb, offset, newftree, "csa_back_chan_attrs");
cbprog = tvb_get_ntohl(tvb, offset);
reg_callback(cbprog);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_cb_program, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_cb_program, offset);
offset = dissect_rpc_secparms4(tvb, offset, newftree);
break;
case NFS4_OP_DESTROY_SESSION:
- offset = dissect_nfs_sessionid4(tvb, offset, newftree);
+ offset = dissect_nfs4_sessionid(tvb, offset, newftree);
break;
case NFS4_OP_FREE_STATEID:
- offset = dissect_nfs_stateid4(tvb, offset, newftree, &sid_hash);
- g_string_append_printf(op_summary[ops_counter].optext, " StateID:0x%04x", sid_hash);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, &sid_hash);
+ g_string_append_printf(op_summary[ops_counter].optext, " StateID: 0x%04x", sid_hash);
break;
/* pNFS */
case NFS4_OP_LAYOUTGET:
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_layout_avail4,
- offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_layouttype4,
- offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_iomode4, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_length4, offset);
- offset = dissect_rpc_uint64(tvb, newftree,
- hf_nfs_length4_minlength, offset);
- offset = dissect_nfs_stateid4(tvb, offset, newftree, NULL);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_count4_maxcount,
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_layout_avail, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_layout_type, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_iomode, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_offset, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_length, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_length_minlength, offset);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, NULL);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_count_maxcount,
offset);
break;
case NFS4_OP_LAYOUTCOMMIT:
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_length4, offset);
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_reclaim4, offset);
- offset = dissect_nfs_stateid4(tvb, offset, newftree, NULL);
- offset = dissect_nfs_newoffset4(tvb, offset, newftree);
- offset = dissect_nfs_newtime4(tvb, offset, newftree);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_layouttype4,
- offset);
- offset = dissect_nfsdata(tvb, offset, newftree,
- hf_nfs_layoutupdate4);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_offset, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_length, offset);
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_reclaim, offset);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, NULL);
+ offset = dissect_nfs4_newoffset(tvb, offset, newftree);
+ offset = dissect_nfs4_newtime(tvb, offset, newftree);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_layout_type, offset);
+ offset = dissect_nfsdata(tvb, offset, newftree, hf_nfs4_layoutupdate);
break;
case NFS4_OP_LAYOUTRETURN:
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_reclaim4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_layouttype4,
- offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_iomode4, offset);
- offset = dissect_nfs_layoutreturn4(tvb, offset, newftree);
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_reclaim, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_layout_type, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_iomode, offset);
+ offset = dissect_nfs4_layoutreturn(tvb, offset, newftree);
break;
case NFS4_OP_GETDEVINFO:
- offset = dissect_nfs_deviceid4(tvb, offset, newftree);
-
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_layouttype4,
- offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_count4_maxcount,
- offset);
- offset = dissect_nfs_notification_bitmap4(tvb, newftree, offset);
+ offset = dissect_nfs4_deviceid(tvb, offset, newftree);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_layout_type, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_count_maxcount, offset);
+ offset = dissect_nfs4_notification_bitmap(tvb, newftree, offset);
break;
case NFS4_OP_GETDEVLIST:
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_layouttype4,
- offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_count4_maxcount,
- offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_cookie4, offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_cookieverf4,
- offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_layout_type, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_count_maxcount, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_cookie, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_cookie_verf, offset);
break;
case NFS4_OP_SEQUENCE:
- offset = dissect_nfs_sessionid4(tvb, offset, newftree);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_slotid4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_high_slotid4, offset);
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_cachethis4, offset);
+ offset = dissect_nfs4_sessionid(tvb, offset, newftree);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_seqid, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_slotid, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_high_slotid, offset);
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_cachethis, offset);
break;
/* In theory, it's possible to get this opcode */
@@ -9614,30 +9701,30 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Detect which tiers are present in this packet */
for (summary_counter=0; summary_counter < ops_counter; summary_counter++)
{
- current_tier = nfsv4_operation_tiers[op_summary[summary_counter].opcode];
+ current_tier = nfs4_operation_tiers[op_summary[summary_counter].opcode];
if (current_tier < highest_tier)
- highest_tier=current_tier;
+ highest_tier = current_tier;
}
/* Display packet summary */
for (summary_counter=0; summary_counter < ops_counter; summary_counter++)
{
guint main_opcode;
- proto_item *main_op_item;
+ proto_item *main_op_item = NULL;
- main_opcode=op_summary[summary_counter].opcode;
- current_tier = nfsv4_operation_tiers[op_summary[summary_counter].opcode];
+ main_opcode = op_summary[summary_counter].opcode;
+ current_tier = nfs4_operation_tiers[op_summary[summary_counter].opcode];
/* Display summary info only for operations that are "most significant".
Controlled by a user option. */
- if (current_tier == highest_tier || !display_major_nfsv4_ops) {
- if (current_tier == highest_tier) {
+ if (current_tier==highest_tier || !display_major_nfs4_ops) {
+ if (current_tier==highest_tier) {
const char *main_opname=NULL;
/* Display a filterable field of the most significant operations in all cases. */
- main_opname=val_to_str_ext_const(main_opcode, &names_nfsv4_operation_ext, "Unknown");
- main_op_item=proto_tree_add_uint_format_value(ftree, hf_nfs_main_opcode, tvb, 0, 0,
- main_opcode, "%s (%u)", main_opname, main_opcode);
+ main_opname = val_to_str_ext_const(main_opcode, &names_nfs4_operation_ext, "Unknown");
+ main_op_item = proto_tree_add_uint_format_value(tree, hf_nfs4_main_opcode, tvb, 0, 0,
+ main_opcode, "%s (%u)", main_opname, main_opcode);
PROTO_ITEM_SET_GENERATED(main_op_item);
}
@@ -9646,7 +9733,8 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
col_append_fstr(pinfo->cinfo, COL_INFO, " |");
if (op_summary[summary_counter].optext->len > 0)
- col_append_fstr(pinfo->cinfo, COL_INFO, " %s", op_summary[summary_counter].optext->str);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+ op_summary[summary_counter].optext->str);
first_operation=0;
}
@@ -9663,41 +9751,43 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
return offset;
}
+
static int
-dissect_nfs4_compound_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree* tree)
+dissect_nfs4_compound_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree)
{
const char *tag=NULL;
- offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_tag4, &tag);
- /* Display the NFSv4 tag. If it is empty, string generator will have returned "<EMPTY>", in which case don't display anything */
- if (nfs_display_v4_tag && strncmp(tag,"<EMPTY>",7)!=0) {
+ offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs4_tag, &tag);
+ /*
+ * Display the NFSv4 tag. If it is empty, string generator will have returned "<EMPTY>",
+ * in which case don't display anything */
+ if (nfs_display_v4_tag && strncmp(tag,"<EMPTY>",7)!=0)
col_append_fstr(pinfo->cinfo, COL_INFO," %s", tag);
- }
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_minorversion, offset);
- offset = dissect_nfs_argop4(tvb, offset, pinfo, tree);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_minorversion, offset);
+ offset = dissect_nfs4_request_op(tvb, offset, pinfo, tree);
return offset;
}
+
static int
-dissect_nfs_secinfo4_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs4_secinfo_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
guint flavor;
- proto_item *fitem;
- proto_tree *secftree;
+ proto_item *fitem = NULL;
+ proto_tree *secftree = NULL;
flavor = tvb_get_ntohl(tvb, offset);
- fitem = proto_tree_add_uint(tree, hf_nfs_secinfo_flavor, tvb, offset, 4,
+ fitem = proto_tree_add_uint(tree, hf_nfs4_secinfo_flavor, tvb, offset, 4,
flavor);
offset += 4;
switch(flavor)
{
case RPCSEC_GSS:
- secftree = proto_item_add_subtree(fitem, ett_nfs_secinfo4_flavor_info);
+ secftree = proto_item_add_subtree(fitem, ett_nfs4_secinfo_flavor_info);
offset = dissect_nfs_rpcsec_gss_info(tvb, offset, secftree);
break;
@@ -9708,28 +9798,24 @@ dissect_nfs_secinfo4_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
return offset;
}
+
static int
-dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree)
+dissect_nfs4_response_op(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- guint32 ops, ops_counter, summary_counter;
- guint32 opcode;
- proto_item *fitem;
- proto_tree *ftree = NULL;
- proto_tree *newftree = NULL;
- guint32 status;
- const char *opname=NULL;
- guint32 last_fh_hash=0;
- guint16 sid_hash=0;
guint highest_tier=5;
guint current_tier=5;
guint first_operation=1;
-
- nfsv4_operation_summary *op_summary;
+ guint16 sid_hash=0;
+ guint32 ops, ops_counter, summary_counter, opcode, status, last_fh_hash=0;
+ const char *opname=NULL;
+ nfs4_operation_summary *op_summary;
+ proto_item *fitem = NULL;
+ proto_tree *ftree = NULL;
+ proto_tree *newftree = NULL;
ops = tvb_get_ntohl(tvb, offset+0);
- fitem = proto_tree_add_uint_format(tree, hf_nfs_ops_count4, tvb, offset+0, 4, ops,
+ fitem = proto_tree_add_uint_format(tree, hf_nfs4_ops_count, tvb, offset+0, 4, ops,
"Operations (count: %u)", ops);
offset += 4;
@@ -9738,10 +9824,10 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
ops = MAX_NFSV4_OPS;
}
- op_summary = (nfsv4_operation_summary *)g_malloc0(sizeof(nfsv4_operation_summary) * ops);
+ op_summary = (nfs4_operation_summary *)g_malloc0(sizeof(nfs4_operation_summary) * ops);
if (fitem) {
- ftree = proto_item_add_subtree(fitem, ett_nfs_resop4);
+ ftree = proto_item_add_subtree(fitem, ett_nfs4_response_op);
}
proto_item_append_text(tree, ", Ops(%d):", ops);
@@ -9749,9 +9835,7 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
for (ops_counter = 0; ops_counter < ops; ops_counter++)
{
op_summary[ops_counter].optext = g_string_new("");
-
opcode = tvb_get_ntohl(tvb, offset);
-
op_summary[ops_counter].iserror=FALSE;
op_summary[ops_counter].opcode = opcode;
@@ -9760,28 +9844,25 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
(opcode != NFS4_OP_ILLEGAL))
break;
- fitem = proto_tree_add_uint(ftree, hf_nfs_op4, tvb, offset, 4,
- opcode);
+ fitem = proto_tree_add_uint(ftree, hf_nfs4_op, tvb, offset, 4, opcode);
/* all of the V4 ops are contiguous, except for NFS4_OP_ILLEGAL */
if (opcode == NFS4_OP_ILLEGAL) {
- newftree = proto_item_add_subtree(fitem, ett_nfs_illegal4);
- } else if (nfsv4_operation_ett[opcode - 3]) {
- newftree = proto_item_add_subtree(fitem,
- *nfsv4_operation_ett[opcode - 3]);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_illegal);
+ } else if (nfs4_operation_ett[opcode - 3]) {
+ newftree = proto_item_add_subtree(fitem, *nfs4_operation_ett[opcode - 3]);
} else {
break;
}
- opname=val_to_str_ext_const(opcode, &names_nfsv4_operation_ext, "Unknown");
+ opname = val_to_str_ext_const(opcode, &names_nfs4_operation_ext, "Unknown");
offset += 4;
-
g_string_append_printf (op_summary[ops_counter].optext, "%s", opname);
- offset = dissect_nfs_nfsstat4(tvb, offset, newftree, &status);
+ offset = dissect_nfs4_status(tvb, offset, newftree, &status);
if (status != NFS4_OK) {
proto_item_append_text(tree, " %s(%s)", opname,
- val_to_str_ext(status, &names_nfs_stat_ext, "Unknown error:%u"));
+ val_to_str_ext(status, &names_nfs4_status_ext, "Unknown error: %u"));
} else {
proto_item_append_text(tree, " %s", opname);
}
@@ -9791,9 +9872,10 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
* NFS4_OP_SETATTR, all other ops do *not* return data with the
* failed status code.
*/
- if ((status != NFS4_OK) &&
- ((opcode != NFS4_OP_LOCK) && (opcode != NFS4_OP_LOCKT) &&
- (opcode != NFS4_OP_SETATTR))) {
+ if(status != NFS4_OK
+ && opcode != NFS4_OP_LOCK
+ && opcode != NFS4_OP_LOCKT
+ && opcode != NFS4_OP_SETATTR) {
op_summary[ops_counter].iserror=TRUE;
continue;
}
@@ -9802,24 +9884,20 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
switch(opcode)
{
case NFS4_OP_ACCESS:
- offset = dissect_access_reply(tvb, offset, pinfo, fitem, 4,
- op_summary[ops_counter].optext);
+ offset = dissect_access_reply(tvb, offset, pinfo, fitem, 4, op_summary[ops_counter].optext);
break;
case NFS4_OP_CLOSE:
- offset = dissect_nfs_stateid4(tvb, offset, newftree, NULL);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, NULL);
break;
case NFS4_OP_COMMIT:
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_verifier4,
- offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_verifier, offset);
break;
case NFS4_OP_CREATE:
- offset = dissect_nfs_change_info4(tvb, offset, newftree,
- "change_info");
- offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree,
- FATTR4_BITMAP_ONLY);
+ offset = dissect_nfs4_change_info(tvb, offset, newftree, "change_info");
+ offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree, FATTR4_BITMAP_ONLY);
break;
case NFS4_OP_GETATTR:
@@ -9828,18 +9906,17 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *getattr_res_tree = NULL;
getattr_res_item = proto_tree_add_text(newftree,tvb,offset,0,"%s","GETATTR4res");
- getattr_res_tree = proto_item_add_subtree(getattr_res_item,ett_nfs_getattr4_resp);
+ getattr_res_tree = proto_item_add_subtree(getattr_res_item,ett_nfs4_getattr_resp);
offset = dissect_nfs4_attr_resp(tvb, offset, pinfo, getattr_res_tree);
}
break;
case NFS4_OP_GETFH:
- offset = dissect_nfs_fh4(tvb, offset, pinfo, newftree, "Filehandle", &last_fh_hash);
+ offset = dissect_nfs4_fh(tvb, offset, pinfo, newftree, "Filehandle", &last_fh_hash);
break;
case NFS4_OP_LINK:
- offset = dissect_nfs_change_info4(tvb, offset, newftree,
- "change_info");
+ offset = dissect_nfs4_change_info(tvb, offset, newftree, "change_info");
break;
case NFS4_OP_LOCK:
@@ -9847,31 +9924,31 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (status == NFS4_OK)
{
if (opcode == NFS4_OP_LOCK)
- offset = dissect_nfs_stateid4(tvb, offset, newftree, NULL);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, NULL);
}
else
if (status == NFS4ERR_DENIED)
- offset = dissect_nfs_lock4denied(tvb, offset, newftree);
+ offset = dissect_nfs4_lockdenied(tvb, offset, newftree);
break;
case NFS4_OP_LOCKU:
- offset = dissect_nfs_stateid4(tvb, offset, newftree, NULL);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, NULL);
break;
case NFS4_OP_OPEN:
- offset = dissect_nfs_stateid4(tvb, offset, newftree, &sid_hash);
- offset = dissect_nfs_change_info4(tvb, offset, newftree,
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, &sid_hash);
+ offset = dissect_nfs4_change_info(tvb, offset, newftree,
"change_info");
- offset = dissect_nfs_open4_rflags(tvb, offset, newftree);
+ offset = dissect_nfs4_open_rflags(tvb, offset, newftree);
offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree,
FATTR4_BITMAP_ONLY);
- offset = dissect_nfs_open_delegation4(tvb, offset, pinfo, newftree);
- g_string_append_printf (op_summary[ops_counter].optext, " StateID:0x%04x", sid_hash);
+ offset = dissect_nfs4_open_delegation(tvb, offset, pinfo, newftree);
+ g_string_append_printf (op_summary[ops_counter].optext, " StateID: 0x%04x", sid_hash);
break;
case NFS4_OP_OPEN_CONFIRM:
case NFS4_OP_OPEN_DOWNGRADE:
- offset = dissect_nfs_stateid4(tvb, offset, newftree, NULL);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, NULL);
break;
case NFS4_OP_RESTOREFH:
@@ -9880,104 +9957,105 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
break;
case NFS4_OP_READ:
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_eof, offset);
- dissect_rpc_uint32(tvb, newftree, hf_read_data_length, offset); /* don't change offset */
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_eof, offset);
+ dissect_rpc_uint32(tvb, newftree, hf_nfs4_read_data_length, offset); /* don't change offset */
offset = dissect_nfsdata(tvb, offset, newftree, hf_nfs_data);
break;
case NFS4_OP_READDIR:
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_verifier4, offset);
- offset = dissect_nfs_dirlist4(tvb, offset, pinfo, newftree);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_verifier, offset);
+ offset = dissect_nfs4_dirlist(tvb, offset, pinfo, newftree);
break;
case NFS4_OP_READLINK:
- offset = dissect_nfs_utf8string(tvb, offset, newftree,
- hf_nfs_linktext4, NULL);
+ offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_linktext, NULL);
break;
case NFS4_OP_RECLAIM_COMPLETE:
break;
case NFS4_OP_REMOVE:
- offset = dissect_nfs_change_info4(tvb, offset, newftree,
- "change_info");
+ offset = dissect_nfs4_change_info(tvb, offset, newftree, "change_info");
break;
case NFS4_OP_RENAME:
- offset = dissect_nfs_change_info4(tvb, offset, newftree,
- "source_cinfo");
- offset = dissect_nfs_change_info4(tvb, offset, newftree,
- "target_cinfo");
+ offset = dissect_nfs4_change_info(tvb, offset, newftree, "source_cinfo");
+ offset = dissect_nfs4_change_info(tvb, offset, newftree, "target_cinfo");
break;
case NFS4_OP_SECINFO:
case NFS4_OP_SECINFO_NO_NAME:
offset = dissect_rpc_array(tvb, pinfo, newftree, offset,
- dissect_nfs_secinfo4_res, hf_nfs_secinfo_arr4);
+ dissect_nfs4_secinfo_res, hf_nfs4_secinfo_arr);
break;
case NFS4_OP_SETATTR:
- offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree,
- FATTR4_BITMAP_ONLY);
+ offset = dissect_nfs4_fattr(tvb, offset, pinfo, newftree);
break;
case NFS4_OP_SETCLIENTID:
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_clientid4,
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_clientid,
offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_verifier4,
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_verifier,
offset);
break;
case NFS4_OP_WRITE:
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_count4,
- offset);
- offset = dissect_nfs_stable_how4(tvb, offset, newftree,
- "committed");
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_verifier4,
- offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_count, offset);
+ offset = dissect_nfs4_stable_how(tvb, offset, newftree, "committed");
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_verifier, offset);
break;
/* Minor Version 1 */
case NFS4_OP_BIND_CONN_TO_SESSION:
- offset = dissect_nfs_sessionid4(tvb, offset, newftree);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_bctsr_dir, offset);
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_bctsr_use_conn_in_rdma_mode, offset);
+ offset = dissect_nfs4_sessionid(tvb, offset, newftree);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_bctsr_dir, offset);
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_bctsr_use_conn_in_rdma_mode, offset);
break;
case NFS4_OP_EXCHANGE_ID: {
proto_tree *eir_flags_tree = NULL;
proto_tree *eir_server_owner_tree = NULL;
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_clientid4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4, offset);
-
- fitem = proto_tree_add_item(newftree, hf_nfs_exchid_reply_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
- eir_flags_tree = proto_item_add_subtree(fitem, ett_exchangeid_reply_flags);
- proto_tree_add_item(eir_flags_tree, hf_nfs_exchid_flags_confirmed_r, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eir_flags_tree, hf_nfs_exchid_flags_upd_conf_rec_a, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eir_flags_tree, hf_nfs_exchid_flags_pnfs_ds, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eir_flags_tree, hf_nfs_exchid_flags_pnfs_mds, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eir_flags_tree, hf_nfs_exchid_flags_non_pnfs, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eir_flags_tree, hf_nfs_exchid_flags_bind_princ, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eir_flags_tree, hf_nfs_exchid_flags_moved_migr, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(eir_flags_tree, hf_nfs_exchid_flags_moved_refer, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_clientid, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_seqid, offset);
+
+ fitem = proto_tree_add_item(newftree, hf_nfs4_exchid_reply_flags, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ eir_flags_tree = proto_item_add_subtree(fitem, ett_nfs4_exchangeid_reply_flags);
+ proto_tree_add_item(eir_flags_tree, hf_nfs4_exchid_flags_confirmed_r, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eir_flags_tree, hf_nfs4_exchid_flags_upd_conf_rec_a, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eir_flags_tree, hf_nfs4_exchid_flags_pnfs_ds, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eir_flags_tree, hf_nfs4_exchid_flags_pnfs_mds, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eir_flags_tree, hf_nfs4_exchid_flags_non_pnfs, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eir_flags_tree, hf_nfs4_exchid_flags_bind_princ, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eir_flags_tree, hf_nfs4_exchid_flags_moved_migr, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eir_flags_tree, hf_nfs4_exchid_flags_moved_refer, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
offset += 4;
- offset = dissect_nfs_state_protect4_r(tvb, offset, newftree);
+ offset = dissect_nfs4_state_protect_r(tvb, offset, newftree);
fitem = proto_tree_add_text(newftree, tvb, offset, 0, "eir_server_owner");
- eir_server_owner_tree = proto_item_add_subtree(fitem, ett_server_owner4);
+ eir_server_owner_tree = proto_item_add_subtree(fitem, ett_nfs4_server_owner);
offset = dissect_rpc_serverowner4(tvb, offset, eir_server_owner_tree);
-
- offset = dissect_nfsdata(tvb, offset, newftree, hf_nfs_serverscope4);
+ offset = dissect_nfsdata(tvb, offset, newftree, hf_nfs4_serverscope4);
offset = dissect_rpc_nfs_impl_id4(tvb, offset, newftree, "eir_server_impl_id");
}
break;
case NFS4_OP_CREATE_SESSION:
- offset = dissect_nfs_sessionid4(tvb, offset, newftree);
+ offset = dissect_nfs4_sessionid(tvb, offset, newftree);
offset = dissect_rpc_uint32(tvb, newftree,
- hf_nfs_seqid4, offset);
- offset = dissect_nfs_create_session_flags(tvb, offset, newftree, hf_nfs_create_session_flags_csr);
+ hf_nfs4_seqid, offset);
+ offset = dissect_nfs_create_session_flags(tvb, offset, newftree,
+ hf_nfs4_create_session_flags_csr);
offset = dissect_rpc_chanattrs4(tvb, offset, newftree, "csr_fore_chan_attrs");
offset = dissect_rpc_chanattrs4(tvb, offset, newftree, "csr_back_chan_attrs");
break;
@@ -9987,18 +10065,18 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
case NFS4_OP_FREE_STATEID:
break;
case NFS4_OP_TEST_STATEID:
- offset = dissect_rpc_array(tvb, pinfo, newftree, offset, dissect_nfs_test_stateid4_res, hf_nfs_test_stateid_res4);
+ offset = dissect_rpc_array(tvb, pinfo, newftree, offset, dissect_nfs4_test_stateid_res, hf_nfs4_test_stateid_res);
break;
case NFS4_OP_LAYOUTGET:
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_return_on_close4,
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_return_on_close,
offset);
- offset = dissect_nfs_stateid4(tvb, offset, newftree, NULL);
- offset = dissect_nfs_layout(tvb, offset, pinfo, newftree);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, NULL);
+ offset = dissect_nfs4_layout(tvb, offset, pinfo, newftree);
break;
case NFS4_OP_LAYOUTCOMMIT:
- offset = dissect_nfs_newsize4(tvb, offset, newftree);
+ offset = dissect_nfs4_newsize(tvb, offset, newftree);
break;
case NFS4_OP_LAYOUTRETURN:
@@ -10006,43 +10084,55 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
break;
case NFS4_OP_GETDEVINFO:
- offset = dissect_nfs_deviceaddr4(tvb, offset, newftree);
- offset = dissect_nfs_notification_bitmap4(tvb, newftree, offset);
+ offset = dissect_nfs4_deviceaddr(tvb, offset, newftree);
+ offset = dissect_nfs4_notification_bitmap(tvb, newftree, offset);
break;
case NFS4_OP_GETDEVLIST:
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_cookie4,
- offset);
- offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_cookieverf4,
- offset);
- offset = dissect_nfs_devicelist4(tvb, offset, newftree);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_eof, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_cookie, offset);
+ offset = dissect_rpc_uint64(tvb, newftree, hf_nfs4_cookie_verf, offset);
+ offset = dissect_nfs4_devicelist(tvb, offset, newftree);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_eof, offset);
break;
case NFS4_OP_SEQUENCE:
{
- proto_tree* status_flags_tree;
-
- offset = dissect_nfs_sessionid4(tvb, offset, newftree);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_slotid4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_high_slotid4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_target_high_slotid4, offset);
- fitem = proto_tree_add_item(newftree, hf_nfs_sequence_status_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
- status_flags_tree = proto_item_add_subtree(fitem, ett_sequence_status_flags);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_cb_path_down, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_cb_gss_contexts_expiring, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_cb_gss_contexts_expired, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_expired_all_state_revoked, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_expired_some_state_revoked, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_admin_state_revoked, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_recallable_state_revoked, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_lease_moved, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_restart_reclaim_needed, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_cb_path_down_session, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_backchannel_fault, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_devid_changed, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(status_flags_tree, hf_nfs_sequence_status_flags_devid_deleted, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree* sf_tree = NULL;
+
+ offset = dissect_nfs4_sessionid(tvb, offset, newftree);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_seqid, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_slotid, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_high_slotid, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_target_high_slotid, offset);
+ fitem = proto_tree_add_item(newftree, hf_nfs4_sequence_status_flags,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ sf_tree = proto_item_add_subtree(fitem, ett_nfs4_sequence_status_flags);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_cb_path_down,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_cb_gss_contexts_expiring,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_cb_gss_contexts_expired,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_expired_all_state_revoked,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_expired_some_state_revoked,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_admin_state_revoked,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_recallable_state_revoked,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_lease_moved,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_restart_reclaim_needed,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_cb_path_down_session,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_backchannel_fault,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_devid_changed,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sf_tree, hf_nfs4_sequence_status_flags_devid_deleted,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
break;
@@ -10055,7 +10145,7 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Detect which tiers are present in this packet */
for (summary_counter=0; summary_counter < ops_counter; summary_counter++)
{
- current_tier = nfsv4_operation_tiers[op_summary[summary_counter].opcode];
+ current_tier = nfs4_operation_tiers[op_summary[summary_counter].opcode];
if (current_tier < highest_tier)
highest_tier=current_tier;
}
@@ -10064,31 +10154,35 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
for (summary_counter=0; summary_counter < ops_counter; summary_counter++)
{
guint main_opcode;
- proto_item *main_op_item;
+ proto_item *main_op_item = NULL;
main_opcode=op_summary[summary_counter].opcode;
- current_tier = nfsv4_operation_tiers[op_summary[summary_counter].opcode];
+ current_tier = nfs4_operation_tiers[op_summary[summary_counter].opcode];
/* Display summary info only for operations that are "most significant".
Controlled by a user option.
Display summary info for operations that return an error as well. */
- if (current_tier == highest_tier || !display_major_nfsv4_ops || op_summary[summary_counter].iserror==TRUE) {
+ if (current_tier == highest_tier
+ || !display_major_nfs4_ops
+ || op_summary[summary_counter].iserror==TRUE)
+ {
if (current_tier == highest_tier) {
const char *main_opname=NULL;
/* Display a filterable field of the most significant operations in all cases. */
- main_opname=val_to_str_ext_const(main_opcode, &names_nfsv4_operation_ext, "Unknown");
- main_op_item=proto_tree_add_uint_format_value(ftree, hf_nfs_main_opcode, tvb, 0, 0,
- main_opcode, "%s (%u)", main_opname, main_opcode);
+ main_opname = val_to_str_ext_const(main_opcode, &names_nfs4_operation_ext, "Unknown");
+ main_op_item = proto_tree_add_uint_format_value(tree, hf_nfs4_main_opcode, tvb, 0, 0,
+ main_opcode, "%s (%u)", main_opname, main_opcode);
PROTO_ITEM_SET_GENERATED(main_op_item);
}
if (first_operation==0)
- /* Seperator between operation text */
+ /* Seperator between operation text */
col_append_fstr(pinfo->cinfo, COL_INFO, " |");
if (op_summary[summary_counter].optext->len > 0)
- col_append_fstr(pinfo->cinfo, COL_INFO, " %s", op_summary[summary_counter].optext->str);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+ op_summary[summary_counter].optext->str);
first_operation=0;
}
}
@@ -10104,6 +10198,7 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
return offset;
}
+
static int
dissect_nfs4_compound_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
@@ -10111,18 +10206,19 @@ dissect_nfs4_compound_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 status;
const char *tag=NULL;
- offset = dissect_nfs_nfsstat4(tvb, offset, tree, &status);
- offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_tag4, &tag);
- /* Display the NFSv4 tag. If it is empty, string generator will have returned "<EMPTY>", in which case don't display anything */
- if (nfs_display_v4_tag && strncmp(tag,"<EMPTY>",7)!=0) {
+ offset = dissect_nfs4_status(tvb, offset, tree, &status);
+ offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs4_tag, &tag);
+ /*
+ * Display the NFSv4 tag. If it is empty, string generator will have returned "<EMPTY>", in
+ * which case don't display anything */
+ if (nfs_display_v4_tag && strncmp(tag,"<EMPTY>",7) != 0)
col_append_fstr(pinfo->cinfo, COL_INFO," %s", tag);
- }
-
- offset = dissect_nfs_resop4(tvb, offset, pinfo, tree);
+
+ offset = dissect_nfs4_response_op(tvb, offset, pinfo, tree);
if (status != NFS4_OK)
col_append_fstr(pinfo->cinfo, COL_INFO," Status: %s",
- val_to_str_ext(status, &names_nfs_nfsstat4_ext, "Unknown error:%u"));
+ val_to_str_ext(status, &names_nfs4_status_ext, "Unknown error: %u"));
return offset;
}
@@ -10178,7 +10274,7 @@ static const vsff nfs3_proc[] = {
{ 0, NULL, NULL, NULL }
};
-static const value_string nfsv3_proc_vals[] = {
+static const value_string nfs3_proc_vals[] = {
{ 0, "NULL" },
{ 1, "GETATTR" },
{ 2, "SETATTR" },
@@ -10204,7 +10300,8 @@ static const value_string nfsv3_proc_vals[] = {
{ 0, NULL }
};
-/* end of NFS Version 3 */
+/* End of NFS Version 3 */
+
/* the call to dissect_nfs3_null_call & dissect_nfs3_null_reply is
* intentional. The V4 NULLPROC is the same as V3.
@@ -10217,7 +10314,7 @@ static const vsff nfs4_proc[] = {
{ 0, NULL, NULL, NULL }
};
-static const value_string nfsv4_proc_vals[] = {
+static const value_string nfs4_proc_vals[] = {
{ 0, "NULL" },
{ 1, "COMPOUND" },
{ 0, NULL }
@@ -10225,201 +10322,241 @@ static const value_string nfsv4_proc_vals[] = {
/*
* Union of the NFSv2, NFSv3, and NFSv4 status codes.
- * Use for the "nfs.status" hidden field.
+ * Used for the "nfs.status" hidden field and in packet-nfsacl.c.
*/
static const value_string names_nfs_nfsstat[] = {
- { 0, "OK" },
- { 1, "ERR_PERM" },
- { 2, "ERR_NOENT" },
- { 5, "ERR_IO" },
- { 6, "ERR_NXIO" },
- { 13, "ERR_ACCES" },
- { 17, "ERR_EXIST" },
- { 18, "ERR_XDEV" },
- { 19, "ERR_NODEV" },
- { 20, "ERR_NOTDIR" },
- { 21, "ERR_ISDIR" },
- { 22, "ERR_INVAL" },
- { 26, "ERR_TXTBSY" },
- { 27, "ERR_FBIG" },
- { 28, "ERR_NOSPC" },
- { 30, "ERR_ROFS" },
- { 31, "ERR_MLINK" },
- { 45, "ERR_OPNOTSUPP" },
- { 63, "ERR_NAMETOOLONG" },
- { 66, "ERR_NOTEMPTY" },
- { 69, "ERR_DQUOT" },
- { 70, "ERR_STALE" },
- { 71, "ERR_REMOTE" },
- { 99, "ERR_WFLUSH" },
- { 10001, "ERR_BADHANDLE" },
- { 10002, "ERR_NOT_SYNC" },
- { 10003, "ERR_BAD_COOKIE" },
- { 10004, "ERR_NOTSUPP" },
- { 10005, "ERR_TOOSMALL" },
- { 10006, "ERR_SERVERFAULT" },
- { 10007, "ERR_BADTYPE" },
- { 10008, "ERR_DELAY" },
- { 10009, "ERR_SAME" },
- { 10010, "ERR_DENIED" },
- { 10011, "ERR_EXPIRED" },
- { 10012, "ERR_LOCKED" },
- { 10013, "ERR_GRACE" },
- { 10014, "ERR_FHEXPIRED" },
- { 10015, "ERR_SHARE_DENIED" },
- { 10016, "ERR_WRONGSEC" },
- { 10017, "ERR_CLID_INUSE" },
- { 10018, "ERR_RESOURCE" },
- { 10019, "ERR_MOVED" },
- { 10020, "ERR_NOFILEHANDLE" },
+ { 0, "OK" },
+ { 1, "ERR_PERM" },
+ { 2, "ERR_NOENT" },
+ { 5, "ERR_IO" },
+ { 6, "ERR_NXIO" },
+ { 11, "ERR_EAGAIN" },
+ { 13, "ERR_ACCESS" },
+ { 17, "ERR_EXIST" },
+ { 18, "ERR_XDEV" },
+ { 19, "ERR_NODEV" },
+ { 20, "ERR_NOTDIR" },
+ { 21, "ERR_ISDIR" },
+ { 22, "ERR_INVAL" },
+ { 26, "ERR_TXTBSY" },
+ { 27, "ERR_FBIG" },
+ { 28, "ERR_NOSPC" },
+ { 30, "ERR_ROFS" },
+ { 31, "ERR_MLINK" },
+ { 45, "ERR_OPNOTSUPP" },
+ { 63, "ERR_NAMETOOLONG" },
+ { 66, "ERR_NOTEMPTY" },
+ { 69, "ERR_DQUOT" },
+ { 70, "ERR_STALE" },
+ { 71, "ERR_REMOTE" },
+ { 99, "ERR_WFLUSH" },
+ { 10001, "ERR_BADHANDLE" },
+ { 10002, "ERR_NOT_SYNC" },
+ { 10003, "ERR_BAD_COOKIE" },
+ { 10004, "ERR_NOTSUPP" },
+ { 10005, "ERR_TOOSMALL" },
+ { 10006, "ERR_SERVERFAULT" },
+ { 10007, "ERR_BADTYPE" },
+ { 10008, "ERR_DELAY" },
+ { 10009, "ERR_SAME" },
+ { 10010, "ERR_DENIED" },
+ { 10011, "ERR_EXPIRED" },
+ { 10012, "ERR_LOCKED" },
+ { 10013, "ERR_GRACE" },
+ { 10014, "ERR_FHEXPIRED" },
+ { 10015, "ERR_SHARE_DENIED" },
+ { 10016, "ERR_WRONGSEC" },
+ { 10017, "ERR_CLID_INUSE" },
+ { 10018, "ERR_RESOURCE" },
+ { 10019, "ERR_MOVED" },
+ { 10020, "ERR_NOFILEHANDLE" },
{ 10021, "ERR_MINOR_VERS_MISMATCH" },
{ 10022, "ERR_STALE_CLIENTID" },
- { 10023, "ERR_STALE_STATEID" },
- { 10024, "ERR_OLD_STATEID" },
- { 10025, "ERR_BAD_STATEID" },
- { 10026, "ERR_BAD_SEQID" },
- { 10027, "ERR_NOT_SAME" },
- { 10028, "ERR_LOCK_RANGE" },
- { 10029, "ERR_SYMLINK" },
- { 10030, "ERR_READDIR_NOSPC" },
- { 10031, "ERR_LEASE_MOVED" },
- { 10032, "ERR_ATTRNOTSUPP" },
- { 10033, "ERR_NO_GRACE" },
- { 10034, "ERR_RECLAIM_BAD" },
+ { 10023, "ERR_STALE_STATEID" },
+ { 10024, "ERR_OLD_STATEID" },
+ { 10025, "ERR_BAD_STATEID" },
+ { 10026, "ERR_BAD_SEQID" },
+ { 10027, "ERR_NOT_SAME" },
+ { 10028, "ERR_LOCK_RANGE" },
+ { 10029, "ERR_SYMLINK" },
+ { 10030, "ERR_READDIR_NOSPC" },
+ { 10031, "ERR_LEASE_MOVED" },
+ { 10032, "ERR_ATTRNOTSUPP" },
+ { 10033, "ERR_NO_GRACE" },
+ { 10034, "ERR_RECLAIM_BAD" },
{ 10035, "ERR_RECLAIM_CONFLICT" },
- { 10036, "ERR_BADXDR" },
- { 10037, "ERR_LOCKS_HELD" },
- { 10038, "ERR_OPENMODE" },
- { 10039, "ERR_BADOWNER" },
- { 10040, "ERR_BADCHAR" },
- { 10041, "ERR_BADNAME" },
- { 10042, "ERR_BAD_RANGE" },
- { 10043, "ERR_LOCK_NOTSUPP" },
- { 10044, "ERR_OP_ILLEGAL" },
- { 10045, "ERR_DEADLOCK" },
- { 10046, "ERR_FILE_OPEN" },
- { 10047, "ERR_ADMIN_REVOKED" },
- { 10048, "ERR_CB_PATH_DOWN" },
+ { 10036, "ERR_BADXDR" },
+ { 10037, "ERR_LOCKS_HELD" },
+ { 10038, "ERR_OPENMODE" },
+ { 10039, "ERR_BADOWNER" },
+ { 10040, "ERR_BADCHAR" },
+ { 10041, "ERR_BADNAME" },
+ { 10042, "ERR_BAD_RANGE" },
+ { 10043, "ERR_LOCK_NOTSUPP" },
+ { 10044, "ERR_OP_ILLEGAL" },
+ { 10045, "ERR_DEADLOCK" },
+ { 10046, "ERR_FILE_OPEN" },
+ { 10047, "ERR_ADMIN_REVOKED" },
+ { 10048, "ERR_CB_PATH_DOWN" },
+ { 10049, "ERR_REPLAY_ME_or_BADIOMODE" },
+ { 10050, "ERR_BADLAYOUT" },
+ { 10051, "ERR_BAD_SESSION_DIGEST" },
+ { 10052, "ERR_BADSESSION" },
+ { 10053, "ERR_BADSLOT" },
+ { 10054, "ERR_COMPLETE_ALREADY" },
+ { 10055, "ERR_CONN_NOT_BOUND_TO_SESSION" },
+ { 10056, "ERR_DELEG_ALREADY_WANTED" },
+ { 10057, "ERR_BACK_CHAN_BUSY" },
+ { 10058, "ERR_LAYOUTTRYLATER" },
+ { 10059, "ERR_LAYOUTUNAVAILABLE" },
+ { 10060, "ERR_NOMATCHING_LAYOUT" },
+ { 10061, "ERR_RECALLCONFLICT" },
+ { 10062, "ERR_UNKNOWN_LAYOUTTYPE" },
+ { 10063, "ERR_SEQ_MISORDERED" },
+ { 10064, "ERR_SEQUENCE_POS" },
+ { 10065, "ERR_REQ_TOO_BIG" },
+ { 10066, "ERR_REP_TOO_BIG" },
+ { 10067, "ERR_REP_TOO_BIG_TO_CACHE" },
+ { 10068, "ERR_RETRY_UNCACHED_REP" },
+ { 10069, "ERR_UNSAFE_COMPOUND" },
+ { 10070, "ERR_TOO_MANY_OPS" },
+ { 10071, "ERR_OP_NOT_IN_SESSION" },
+ { 10072, "ERR_HASH_ALG_UNSUPP" },
+ { 10073, "NFS4ERR_CONN_BINDING_NOT_ENFORCED" },
+ { 10074, "ERR_CLIENTID_BUSY" },
+ { 10075, "ERR_PNFS_IO_HOLE" },
+ { 10076, "ERR_SEQ_FALSE_RETRY" },
+ { 10077, "ERR_BAD_HIGH_SLOT" },
+ { 10078, "ERR_DEADSESSION" },
+ { 10079, "ERR_ENCR_ALG_UNSUPP" },
+ { 10080, "ERR_PNFS_NO_LAYOUT" },
+ { 10081, "ERR_NOT_ONLY_OP" },
+ { 10082, "ERR_WRONG_CRED" },
+ { 10083, "ERR_WRONG_TYPE" },
+ { 10084, "ERR_DIRDELEG_UNAVAIL" },
+ { 10085, "ERR_REJECT_DELEG" },
+ { 10086, "ERR_RETURNCONFLICT" },
+ { 10087, "ERR_DELEG_REVOKED" },
{ 0, NULL }
};
static const value_string iomode_names[] = {
- { 1, "IOMODE_READ"},
- { 2, "IOMODE_RW"},
- { 3, "IOMODE_ANY"},
+ { 1, "IOMODE_READ" },
+ { 2, "IOMODE_RW" },
+ { 3, "IOMODE_ANY" },
{ 0, NULL }
};
static const value_string stripetype_names[] = {
- { 1, "STRIPE_SPARSE"},
- { 2, "STRIPE_DENSE"},
+ { 1, "STRIPE_SPARSE" },
+ { 2, "STRIPE_DENSE" },
{ 0, NULL }
};
static const value_string layouttype_names[] = {
- { 1, "LAYOUT4_NFSV4_1_FILES"},
- { 2, "LAYOUT4_OSD2_OBJECTS"},
- { 3, "LAYOUT4_BLOCK_VOLUME"},
+ { 1, "LAYOUT4_NFSV4_1_FILES" },
+ { 2, "LAYOUT4_OSD2_OBJECTS" },
+ { 3, "LAYOUT4_BLOCK_VOLUME" },
{ 0, NULL }
};
static const value_string layoutreturn_names[] = {
- { 1, "RETURN_FILE"},
- { 2, "RETURN_FSID"},
- { 3, "RETURN_ALL"},
+ { 1, "RETURN_FILE" },
+ { 2, "RETURN_FSID" },
+ { 3, "RETURN_ALL" },
{ 0, NULL }
};
static const value_string nfs_fh_obj_id[] = {
- { 1, "NF4REG"},
- { 2, "NF4DIR"},
- { 3, "NF4BLK"},
- { 4, "NF4CHR"},
- { 5, "NF4LNK"},
- { 6, "NF4SOCK"},
- { 7, "NF4FIFO"},
- { 8, "NF4ATTRDIR"},
+ { 1, "NF4REG" },
+ { 2, "NF4DIR" },
+ { 3, "NF4BLK" },
+ { 4, "NF4CHR" },
+ { 5, "NF4LNK" },
+ { 6, "NF4SOCK" },
+ { 7, "NF4FIFO" },
+ { 8, "NF4ATTRDIR" },
{ 9, "NF4NAMEDATTR"},
{ 0, NULL }
};
-static const true_false_string nfsv4_ro_boolean = {
+static const true_false_string nfs4_ro_boolean = {
"object is read only",
"object is *not* read-only"
};
static const value_string layoutrecall_names[] = {
- { 1, "RECALL_FILE"},
- { 2, "RECALL_FSID"},
- { 3, "RECALL_ALL"},
+ { 1, "RECALL_FILE" },
+ { 2, "RECALL_FSID" },
+ { 3, "RECALL_ALL" },
{ 0, NULL }
};
/* NFS Callback */
-static int hf_nfs_cb_procedure = -1;
-static int hf_nfs_cb_op = -1;
-static int hf_nfs_cb_truncate = -1;
-static int hf_nfs_cb_layoutrecall_type = -1;
-static int hf_nfs_cb_clorachanged = -1;
-
-static gint ett_nfs_cb_argop = -1;
-static gint ett_nfs_cb_resop = -1;
-static gint ett_nfs_cb_getattr = -1;
-static gint ett_nfs_cb_recall = -1;
-static gint ett_nfs_cb_layoutrecall = -1;
-static gint ett_nfs_cb_pushdeleg = -1;
-static gint ett_nfs_cb_recallany = -1;
-static gint ett_nfs_cb_recallableobjavail = -1;
-static gint ett_nfs_cb_recallslot = -1;
-static gint ett_nfs_cb_sequence = -1;
-static gint ett_nfs_cb_wantscancelled = -1;
-static gint ett_nfs_cb_notifylock = -1;
-static gint ett_nfs_cb_notifydeviceid = -1;
-static gint ett_nfs_cb_notify = -1;
-static gint ett_nfs_cb_reflists = -1;
-static gint ett_nfs_cb_refcalls = -1;
-static gint ett_nfs_cb_illegal = -1;
+static int hf_nfs4_cb_procedure = -1;
+static int hf_nfs4_cb_op = -1;
+static int hf_nfs4_cb_truncate = -1;
+static int hf_nfs4_cb_layoutrecall_type = -1;
+static int hf_nfs4_cb_clorachanged = -1;
+
+static gint ett_nfs4_cb_request_op = -1;
+static gint ett_nfs4_cb_resop = -1;
+static gint ett_nfs4_cb_getattr = -1;
+static gint ett_nfs4_cb_recall = -1;
+static gint ett_nfs4_cb_layoutrecall = -1;
+static gint ett_nfs4_cb_pushdeleg = -1;
+static gint ett_nfs4_cb_recallany = -1;
+static gint ett_nfs4_cb_recallableobjavail = -1;
+static gint ett_nfs4_cb_recallslot = -1;
+static gint ett_nfs4_cb_sequence = -1;
+static gint ett_nfs4_cb_wantscancelled = -1;
+static gint ett_nfs4_cb_notifylock = -1;
+static gint ett_nfs4_cb_notifydeviceid = -1;
+static gint ett_nfs4_cb_notify = -1;
+static gint ett_nfs4_cb_reflists = -1;
+static gint ett_nfs4_cb_refcalls = -1;
+static gint ett_nfs4_cb_illegal = -1;
static const value_string names_nfs_cb_operation[] = {
{ NFS4_OP_CB_GETATTR, "CB_GETATTR" },
{ NFS4_OP_CB_RECALL, "CB_RECALL" },
- { NFS4_OP_CB_LAYOUTRECALL, "CB_LAYOUTRECALL" },
+ { NFS4_OP_CB_LAYOUTRECALL, "CB_LAYOUTRECALL" },
{ NFS4_OP_CB_NOTIFY, "CB_NOTIFY" },
- { NFS4_OP_CB_PUSH_DELEG, "CB_PUSH_DELEG" },
- { NFS4_OP_CB_RECALL_ANY, "CB_RECALL_ANY" },
- { NFS4_OP_CB_RECALLABLE_OBJ_AVAIL, "CB_RECALLABLE_OBJ_AVAIL" },
- { NFS4_OP_CB_RECALL_SLOT, "CB_RECALL_SLOT"},
- { NFS4_OP_CB_SEQUENCE, "CB_SEQUENCE" },
- { NFS4_OP_CB_WANTS_CANCELLED, "CB_WANTS_CANCELLED" },
- { NFS4_OP_CB_NOTIFY_LOCK, "CB_NOTIFY_LOCK"},
- { NFS4_OP_CB_NOTIFY_DEVICEID, "CB_NOTIFY_DEVICEID" },
+ { NFS4_OP_CB_PUSH_DELEG, "CB_PUSH_DELEG" },
+ { NFS4_OP_CB_RECALL_ANY, "CB_RECALL_ANY" },
+ { NFS4_OP_CB_RECALLABLE_OBJ_AVAIL,"CB_RECALLABLE_OBJ_AVAIL" },
+ { NFS4_OP_CB_RECALL_SLOT, "CB_RECALL_SLOT"},
+ { NFS4_OP_CB_SEQUENCE, "CB_SEQUENCE" },
+ { NFS4_OP_CB_WANTS_CANCELLED, "CB_WANTS_CANCELLED" },
+ { NFS4_OP_CB_NOTIFY_LOCK, "CB_NOTIFY_LOCK" },
+ { NFS4_OP_CB_NOTIFY_DEVICEID, "CB_NOTIFY_DEVICEID" },
{ NFS4_OP_CB_ILLEGAL, "CB_ILLEGAL"},
{ 0, NULL }
};
static value_string_ext names_nfs_cb_operation_ext = VALUE_STRING_EXT_INIT(names_nfs_cb_operation);
-static gint *nfs_cb_operation_ett[] =
-{
- &ett_nfs_cb_getattr,
- &ett_nfs_cb_recall,
- &ett_nfs_cb_layoutrecall,
- &ett_nfs_cb_notify,
- &ett_nfs_cb_pushdeleg,
- &ett_nfs_cb_recallany,
- &ett_nfs_cb_recallableobjavail,
- &ett_nfs_cb_recallslot,
- &ett_nfs_cb_sequence,
- &ett_nfs_cb_wantscancelled,
- &ett_nfs_cb_notifylock,
- &ett_nfs_cb_notifydeviceid,
- &ett_nfs_cb_illegal
+static gint *nfs4_cb_operation_ett[] =
+{
+ &ett_nfs4_cb_getattr,
+ &ett_nfs4_cb_recall,
+ &ett_nfs4_cb_layoutrecall,
+ &ett_nfs4_cb_notify,
+ &ett_nfs4_cb_pushdeleg,
+ &ett_nfs4_cb_recallany,
+ &ett_nfs4_cb_recallableobjavail,
+ &ett_nfs4_cb_recallslot,
+ &ett_nfs4_cb_sequence,
+ &ett_nfs4_cb_wantscancelled,
+ &ett_nfs4_cb_notifylock,
+ &ett_nfs4_cb_notifydeviceid,
+ &ett_nfs4_cb_illegal
};
static int
-dissect_nfs_cb_referring_calls(tvbuff_t *tvb, int offset, proto_tree *tree)
+dissect_nfs4_cb_referring_calls(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint num_reflists, num_refcalls, i, j;
- proto_item *rl_item, *rc_item;
+ proto_item *rl_item, *rc_item = NULL;
proto_tree *rl_tree = NULL, *rc_tree = NULL;
num_reflists = tvb_get_ntohl(tvb, offset);
@@ -10429,54 +10566,56 @@ dissect_nfs_cb_referring_calls(tvbuff_t *tvb, int offset, proto_tree *tree)
if (num_reflists == 0)
return offset;
- rl_tree = proto_item_add_subtree(rl_item, ett_nfs_cb_reflists);
+ rl_tree = proto_item_add_subtree(rl_item, ett_nfs4_cb_reflists);
for (i = 0; i < num_reflists; i++) {
- offset = dissect_nfs_sessionid4(tvb, offset, rl_tree);
+ offset = dissect_nfs4_sessionid(tvb, offset, rl_tree);
num_refcalls = tvb_get_ntohl(tvb, offset);
rc_item = proto_tree_add_text(rl_tree, tvb, offset, 4,
"referring calls (count: %u)", num_refcalls);
offset += 4;
for (j = 0; j < num_refcalls; j++) {
- rc_tree = proto_item_add_subtree(rc_item, ett_nfs_cb_refcalls);
- offset = dissect_rpc_uint32(tvb, rc_tree, hf_nfs_seqid4, offset);
- offset = dissect_rpc_uint32(tvb, rc_tree, hf_nfs_slotid4, offset);
+ rc_tree = proto_item_add_subtree(rc_item, ett_nfs4_cb_refcalls);
+ offset = dissect_rpc_uint32(tvb, rc_tree, hf_nfs4_seqid, offset);
+ offset = dissect_rpc_uint32(tvb, rc_tree, hf_nfs4_slotid, offset);
}
}
return offset;
}
+
static int
-dissect_nfs_cb_layoutrecall(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo)
+dissect_nfs4_cb_layoutrecall(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo)
{
guint recall_type;
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_layouttype4, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_iomode4, offset);
- offset = dissect_rpc_bool(tvb, tree, hf_nfs_cb_clorachanged, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_layout_type, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_iomode, offset);
+ offset = dissect_rpc_bool(tvb, tree, hf_nfs4_cb_clorachanged, offset);
recall_type = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_cb_layoutrecall_type, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_cb_layoutrecall_type, offset);
if (recall_type == 1) { /* RECALL_FILE */
- offset = dissect_nfs_fh4(tvb, offset, pinfo, tree, "filehandle", NULL);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_offset4, offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_length4, offset);
- offset = dissect_nfs_stateid4(tvb, offset, tree, NULL);
+ offset = dissect_nfs4_fh(tvb, offset, pinfo, tree, "filehandle", NULL);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_offset, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_nfs4_length, offset);
+ offset = dissect_nfs4_stateid(tvb, offset, tree, NULL);
} else if (recall_type == 2) { /* RECALL_FSID */
- offset = dissect_nfs_fsid4(tvb, offset, tree, "fsid");
+ offset = dissect_nfs4_fsid(tvb, offset, tree, "fsid");
}
return offset;
}
+
static int
-dissect_nfs_cb_argop(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
+dissect_nfs4_cb_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
guint32 ops, ops_counter;
guint opcode;
- proto_item *fitem;
+ proto_item *fitem = NULL;
proto_tree *ftree = NULL;
proto_tree *newftree = NULL;
@@ -10486,7 +10625,7 @@ dissect_nfs_cb_argop(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
offset += 4;
if (fitem)
- ftree = proto_item_add_subtree(fitem, ett_nfs_cb_argop);
+ ftree = proto_item_add_subtree(fitem, ett_nfs4_cb_request_op);
for (ops_counter=0; ops_counter<ops; ops_counter++)
{
@@ -10494,7 +10633,7 @@ dissect_nfs_cb_argop(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
col_append_fstr(pinfo->cinfo, COL_INFO, "%c%s", ops_counter==0?' ':';',
val_to_str_ext_const(opcode, &names_nfs_cb_operation_ext, "Unknown"));
- fitem = proto_tree_add_uint(ftree, hf_nfs_cb_op, tvb, offset, 4, opcode);
+ fitem = proto_tree_add_uint(ftree, hf_nfs4_cb_op, tvb, offset, 4, opcode);
offset += 4;
/* the opcodes are not contiguous */
@@ -10504,22 +10643,22 @@ dissect_nfs_cb_argop(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
/* all of the V4 ops are contiguous, except for NFS4_OP_ILLEGAL */
if (opcode == NFS4_OP_CB_ILLEGAL)
- newftree = proto_item_add_subtree(fitem, ett_nfs_cb_illegal);
- else if (nfs_cb_operation_ett[opcode - 3])
- newftree = proto_item_add_subtree(fitem, *nfs_cb_operation_ett[opcode - 3]);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_cb_illegal);
+ else if (nfs4_cb_operation_ett[opcode - 3])
+ newftree = proto_item_add_subtree(fitem, *nfs4_cb_operation_ett[opcode - 3]);
else
break;
switch (opcode)
{
case NFS4_OP_CB_RECALL:
- offset = dissect_nfs_stateid4(tvb, offset, newftree, NULL);
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_cb_truncate, offset);
- offset = dissect_nfs_fh4(tvb, offset, pinfo, newftree, "filehandle", NULL);
+ offset = dissect_nfs4_stateid(tvb, offset, newftree, NULL);
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_cb_truncate, offset);
+ offset = dissect_nfs4_fh(tvb, offset, pinfo, newftree, "filehandle", NULL);
break;
case NFS4_OP_CB_GETATTR:
case NFS4_OP_CB_LAYOUTRECALL:
- offset = dissect_nfs_cb_layoutrecall(tvb, offset, newftree, pinfo);
+ offset = dissect_nfs4_cb_layoutrecall(tvb, offset, newftree, pinfo);
break;
case NFS4_OP_CB_NOTIFY:
case NFS4_OP_CB_PUSH_DELEG:
@@ -10528,12 +10667,12 @@ dissect_nfs_cb_argop(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
case NFS4_OP_CB_RECALL_SLOT:
break;
case NFS4_OP_CB_SEQUENCE:
- offset = dissect_nfs_sessionid4(tvb, offset, newftree);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_slotid4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_high_slotid4, offset);
- offset = dissect_rpc_bool(tvb, newftree, hf_nfs_cachethis4, offset);
- offset = dissect_nfs_cb_referring_calls(tvb, offset, newftree);
+ offset = dissect_nfs4_sessionid(tvb, offset, newftree);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_seqid, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_slotid, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_high_slotid, offset);
+ offset = dissect_rpc_bool(tvb, newftree, hf_nfs4_cachethis, offset);
+ offset = dissect_nfs4_cb_referring_calls(tvb, offset, newftree);
break;
case NFS4_OP_CB_WANTS_CANCELLED:
case NFS4_OP_CB_NOTIFY_LOCK:
@@ -10549,28 +10688,30 @@ dissect_nfs_cb_argop(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
return offset;
}
+
static int
-dissect_nfs_cb_compound_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree)
+dissect_nfs4_cb_compound_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree)
{
const char *tag=NULL;
- offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_tag4, &tag);
+ offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs4_tag, &tag);
col_append_fstr(pinfo->cinfo, COL_INFO," %s", tag);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_minorversion, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_callback_ident, offset);
- offset = dissect_nfs_cb_argop(tvb, offset, pinfo, tree);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_minorversion, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_nfs4_callback_ident, offset);
+ offset = dissect_nfs4_cb_request(tvb, offset, pinfo, tree);
return offset;
}
+
static int
-dissect_nfs_cb_resop(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
+dissect_nfs4_cb_resp_op(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
guint32 ops, ops_counter;
guint32 opcode;
- proto_item *fitem;
+ proto_item *fitem = NULL;
proto_tree *ftree = NULL;
proto_tree *newftree = NULL;
guint32 status;
@@ -10580,45 +10721,45 @@ dissect_nfs_cb_resop(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
offset += 4;
if (fitem)
- ftree = proto_item_add_subtree(fitem, ett_nfs_cb_resop);
+ ftree = proto_item_add_subtree(fitem, ett_nfs4_cb_resop);
for (ops_counter = 0; ops_counter < ops; ops_counter++)
{
opcode = tvb_get_ntohl(tvb, offset);
- /* sanity check for bogus packets */
+ /* sanity check for bogus packets */
if ((opcode < NFS4_OP_CB_GETATTR || opcode > NFS4_OP_CB_NOTIFY_DEVICEID) &&
- (opcode != NFS4_OP_ILLEGAL))
+ (opcode != NFS4_OP_ILLEGAL))
break;
col_append_fstr(pinfo->cinfo, COL_INFO, "%c%s", ops_counter==0?' ':';',
val_to_str_ext_const(opcode, &names_nfs_cb_operation_ext, "Unknown"));
- fitem = proto_tree_add_uint(ftree, hf_nfs_cb_op, tvb, offset, 4, opcode);
+ fitem = proto_tree_add_uint(ftree, hf_nfs4_cb_op, tvb, offset, 4, opcode);
offset += 4;
- /* all of the V4 ops are contiguous, except for NFS4_OP_ILLEGAL */
+ /* all of the V4 ops are contiguous, except for NFS4_OP_ILLEGAL */
if (opcode == NFS4_OP_ILLEGAL)
- newftree = proto_item_add_subtree(fitem, ett_nfs_illegal4);
- else if (nfs_cb_operation_ett[opcode - 3])
- newftree = proto_item_add_subtree(fitem, *nfs_cb_operation_ett[opcode - 3]);
+ newftree = proto_item_add_subtree(fitem, ett_nfs4_illegal);
+ else if (nfs4_cb_operation_ett[opcode - 3])
+ newftree = proto_item_add_subtree(fitem, *nfs4_cb_operation_ett[opcode - 3]);
else
- break;
+ break;
- offset = dissect_nfs_nfsstat4(tvb, offset, newftree, &status);
+ offset = dissect_nfs4_status(tvb, offset, newftree, &status);
- /* are there any ops that return data with a failure (?) */
+ /* are there any ops that return data with a failure (?) */
if (status != NFS4_OK)
continue;
- /* These parsing routines are only executed if the status is NFS4_OK */
+ /* These parsing routines are only executed if the status is NFS4_OK */
switch (opcode)
{
case NFS4_OP_CB_RECALL:
break;
case NFS4_OP_CB_GETATTR:
case NFS4_OP_CB_LAYOUTRECALL:
- break;
+ break;
case NFS4_OP_CB_NOTIFY:
case NFS4_OP_CB_PUSH_DELEG:
case NFS4_OP_CB_RECALL_ANY:
@@ -10626,47 +10767,49 @@ dissect_nfs_cb_resop(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
case NFS4_OP_CB_RECALL_SLOT:
break;
case NFS4_OP_CB_SEQUENCE:
- offset = dissect_nfs_sessionid4(tvb, offset, newftree);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_slotid4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_high_slotid4, offset);
- offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_target_high_slotid4, offset);
+ offset = dissect_nfs4_sessionid(tvb, offset, newftree);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_seqid, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_slotid, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_high_slotid, offset);
+ offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_target_high_slotid, offset);
break;
case NFS4_OP_CB_WANTS_CANCELLED:
case NFS4_OP_CB_NOTIFY_LOCK:
case NFS4_OP_CB_NOTIFY_DEVICEID:
- break;
+ break;
case NFS4_OP_ILLEGAL:
break;
default:
- break;
+ break;
}
}
return offset;
}
+
static int
-dissect_nfs_cb_compound_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs4_cb_compound_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree* tree)
{
guint32 status;
const char *tag=NULL;
- offset = dissect_nfs_nfsstat4(tvb, offset, tree, &status);
- offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_tag4, &tag);
+ offset = dissect_nfs4_status(tvb, offset, tree, &status);
+ offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs4_tag, &tag);
col_append_fstr(pinfo->cinfo, COL_INFO," %s", tag);
- offset = dissect_nfs_cb_resop(tvb, offset, pinfo, tree);
+ offset = dissect_nfs4_cb_resp_op(tvb, offset, pinfo, tree);
return offset;
}
+
static const vsff nfs_cb_proc[] = {
{ 0, "CB_NULL",
dissect_nfs3_null_call, dissect_nfs3_null_reply },
{ 1, "CB_COMPOUND",
- dissect_nfs_cb_compound_call, dissect_nfs_cb_compound_reply },
+ dissect_nfs4_cb_compound_call, dissect_nfs4_cb_compound_reply },
{ 0, NULL, NULL, NULL }
};
@@ -10684,27 +10827,27 @@ void reg_callback(int cbprog)
/*
* Register the procedure tables. The version should be 4,
* but some Linux kernels set this field to 1. "Temporarily",
- * accommodate these servers.
+ * accomodate these servers.
*/
- rpc_init_proc_table(cbprog, 1, nfs_cb_proc, hf_nfs_cb_procedure);
- rpc_init_proc_table(cbprog, 4, nfs_cb_proc, hf_nfs_cb_procedure);
+ rpc_init_proc_table(cbprog, 1, nfs_cb_proc, hf_nfs4_cb_procedure);
+ rpc_init_proc_table(cbprog, 4, nfs_cb_proc, hf_nfs4_cb_procedure);
}
void
proto_register_nfs(void)
{
static hf_register_info hf[] = {
- { &hf_nfs_procedure_v2, {
+ { &hf_nfs2_procedure, {
"V2 Procedure", "nfs.procedure_v2", FT_UINT32, BASE_DEC,
- VALS(nfsv2_proc_vals), 0, NULL, HFILL }},
- { &hf_nfs_procedure_v3, {
+ VALS(nfs2_proc_vals), 0, NULL, HFILL }},
+ { &hf_nfs3_procedure, {
"V3 Procedure", "nfs.procedure_v3", FT_UINT32, BASE_DEC,
- VALS(nfsv3_proc_vals), 0, NULL, HFILL }},
- { &hf_nfs_procedure_v4, {
+ VALS(nfs3_proc_vals), 0, NULL, HFILL }},
+ { &hf_nfs4_procedure, {
"V4 Procedure", "nfs.procedure_v4", FT_UINT32, BASE_DEC,
- VALS(nfsv4_proc_vals), 0, NULL, HFILL }},
+ VALS(nfs4_proc_vals), 0, NULL, HFILL }},
#if 0
- { &hf_nfs_impl_id4_len, {
+ { &hf_nfs4_impl_id_len, {
"Implementation ID length", "nfs.impl_id4.length", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
@@ -10879,7 +11022,7 @@ proto_register_nfs(void)
VALS(nfs_fh_obj_id), 0, "Object ID", HFILL }},
{ &hf_nfs_fh_ro_node, {
"RO_node", "nfs.fh.ro.node", FT_BOOLEAN, BASE_NONE,
- TFS(&nfsv4_ro_boolean), 0, "Read Only Node", HFILL }},
+ TFS(&nfs4_ro_boolean), 0, "Read Only Node", HFILL }},
{ &hf_nfs_fh_obj, {
"Object info", "nfs.fh.obj.info", FT_BYTES, BASE_NONE,
NULL, 0,"File/Dir/Object Info", HFILL }},
@@ -10922,52 +11065,52 @@ proto_register_nfs(void)
{ &hf_nfs_fh_endianness, {
"endianness", "nfs.fh.endianness", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_endianness), 0x0, "server native endianness", HFILL }},
- { &hf_nfs_stat, {
- "Status", "nfs.stat", FT_UINT32, BASE_DEC|BASE_EXT_STRING,
- &names_nfs_stat_ext, 0, "Reply status", HFILL }},
+ { &hf_nfs2_status, {
+ "Status", "nfs.status2", FT_UINT32, BASE_DEC|BASE_EXT_STRING,
+ &names_nfs2_stat_ext, 0, "Reply status", HFILL }},
{ &hf_nfs_full_name, {
"Full Name", "nfs.full_name", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
{ &hf_nfs_name, {
"Name", "nfs.name", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_readlink_data, {
+ { &hf_nfs2_readlink_data, {
"Data", "nfs.readlink.data", FT_STRING, BASE_NONE,
NULL, 0, "Symbolic Link Data", HFILL }},
- { &hf_nfs_read_offset, {
+ { &hf_nfs2_read_offset, {
"Offset", "nfs.read.offset", FT_UINT32, BASE_DEC,
NULL, 0, "Read Offset", HFILL }},
- { &hf_nfs_read_count, {
+ { &hf_nfs2_read_count, {
"Count", "nfs.read.count", FT_UINT32, BASE_DEC,
NULL, 0, "Read Count", HFILL }},
- { &hf_nfs_read_totalcount, {
+ { &hf_nfs2_read_totalcount, {
"Total Count", "nfs.read.totalcount", FT_UINT32, BASE_DEC,
NULL, 0, "Total Count (obsolete)", HFILL }},
{ &hf_nfs_data, {
"Data", "nfs.data", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_read_data_length, {
+ { &hf_nfs4_read_data_length, {
"Read length", "nfs.read.data_length", FT_UINT32, BASE_DEC,
NULL, 0, "Length of read response", HFILL }},
- { &hf_write_data_length, {
+ { &hf_nfs4_write_data_length, {
"Write length", "nfs.write.data_length", FT_UINT32, BASE_DEC,
NULL, 0, "Length of write request", HFILL }},
- { &hf_nfs_write_beginoffset, {
+ { &hf_nfs2_write_beginoffset, {
"Begin Offset", "nfs.write.beginoffset", FT_UINT32, BASE_DEC,
NULL, 0, "Begin offset (obsolete)", HFILL }},
- { &hf_nfs_write_offset, {
+ { &hf_nfs2_write_offset, {
"Offset", "nfs.write.offset", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_write_totalcount, {
+ { &hf_nfs2_write_totalcount, {
"Total Count", "nfs.write.totalcount", FT_UINT32, BASE_DEC,
NULL, 0, "Total Count (obsolete)", HFILL }},
{ &hf_nfs_symlink_to, {
"To", "nfs.symlink.to", FT_STRING, BASE_NONE,
NULL, 0, "Symbolic link destination name", HFILL }},
- { &hf_nfs_readdir_cookie, {
+ { &hf_nfs2_readdir_cookie, {
"Cookie", "nfs.readdir.cookie", FT_UINT32, BASE_DEC,
NULL, 0, "Directory Cookie", HFILL }},
- { &hf_nfs_readdir_count, {
+ { &hf_nfs2_readdir_count, {
"Count", "nfs.readdir.count", FT_UINT32, BASE_DEC,
NULL, 0, "Directory Count", HFILL }},
@@ -10975,39 +11118,39 @@ proto_register_nfs(void)
"Entry", "nfs.readdir.entry", FT_NONE, BASE_NONE,
NULL, 0, "Directory Entry", HFILL }},
- { &hf_nfs_readdir_entry_fileid, {
+ { &hf_nfs2_readdir_entry_fileid, {
"File ID", "nfs.readdir.entry.fileid", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_readdir_entry_name, {
+ { &hf_nfs2_readdir_entry_name, {
"Name", "nfs.readdir.entry.name", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_readdir_entry_cookie, {
+ { &hf_nfs2_readdir_entry_cookie, {
"Cookie", "nfs.readdir.entry.cookie", FT_UINT32, BASE_DEC,
NULL, 0, "Directory Cookie", HFILL }},
- { &hf_nfs_readdir_entry3_fileid, {
+ { &hf_nfs3_readdir_entry_fileid, {
"File ID", "nfs.readdir.entry3.fileid", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_readdir_entry3_name, {
+ { &hf_nfs3_readdir_entry_name, {
"Name", "nfs.readdir.entry3.name", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_readdir_entry3_cookie, {
+ { &hf_nfs3_readdir_entry_cookie, {
"Cookie", "nfs.readdir.entry3.cookie", FT_UINT64, BASE_DEC,
NULL, 0, "Directory Cookie", HFILL }},
- { &hf_nfs_readdirplus_entry_fileid, {
+ { &hf_nfs3_readdirplus_entry_fileid, {
"File ID", "nfs.readdirplus.entry.fileid", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_readdirplus_entry_name, {
+ { &hf_nfs3_readdirplus_entry_name, {
"Name", "nfs.readdirplus.entry.name", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_readdirplus_entry_cookie, {
+ { &hf_nfs3_readdirplus_entry_cookie, {
"Cookie", "nfs.readdirplus.entry.cookie", FT_UINT64, BASE_DEC,
NULL, 0, "Directory Cookie", HFILL }},
@@ -11015,700 +11158,703 @@ proto_register_nfs(void)
"EOF", "nfs.readdir.eof", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_statfs_tsize, {
+ { &hf_nfs2_statfs_tsize, {
"Transfer Size", "nfs.statfs.tsize", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_statfs_bsize, {
+ { &hf_nfs2_statfs_bsize, {
"Block Size", "nfs.statfs.bsize", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_statfs_blocks, {
+ { &hf_nfs2_statfs_blocks, {
"Total Blocks", "nfs.statfs.blocks", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_statfs_bfree, {
+ { &hf_nfs2_statfs_bfree, {
"Free Blocks", "nfs.statfs.bfree", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_statfs_bavail, {
+ { &hf_nfs2_statfs_bavail, {
"Available Blocks", "nfs.statfs.bavail", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_ftype3, {
+ { &hf_nfs3_ftype, {
"Type", "nfs.type", FT_UINT32, BASE_DEC|BASE_EXT_STRING,
&names_nfs_ftype3_ext, 0, "File Type", HFILL }},
- { &hf_nfs_nfsstat3, {
- "Status", "nfs.nfsstat3", FT_UINT32, BASE_DEC|BASE_EXT_STRING,
- &names_nfs_nfsstat3_ext, 0, "Reply status", HFILL }},
- { &hf_nfs_read_eof, {
+ { &hf_nfs3_status, {
+ "Status", "nfs.status3", FT_UINT32, BASE_DEC|BASE_EXT_STRING,
+ &names_nfs3_status_ext, 0, "Reply status", HFILL }},
+ { &hf_nfs3_read_eof, {
"EOF", "nfs.read.eof", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_write_stable, {
+ { &hf_nfs3_write_stable, {
"Stable", "nfs.write.stable", FT_UINT32, BASE_DEC,
VALS(names_stable_how), 0, NULL, HFILL }},
- { &hf_nfs_write_committed, {
+ { &hf_nfs3_write_committed, {
"Committed", "nfs.write.committed", FT_UINT32, BASE_DEC,
VALS(names_stable_how), 0, NULL, HFILL }},
- { &hf_nfs_createmode3, {
+ { &hf_nfs3_createmode, {
"Create Mode", "nfs.createmode", FT_UINT32, BASE_DEC,
VALS(names_createmode3), 0, NULL, HFILL }},
- { &hf_nfs_fsstat_invarsec, {
+ { &hf_nfs3_fsstat_invarsec, {
"invarsec", "nfs.fsstat.invarsec", FT_UINT32, BASE_DEC,
NULL, 0, "probable number of seconds of file system invariance", HFILL }},
- { &hf_nfs_fsinfo_rtmax, {
+ { &hf_nfs3_fsinfo_rtmax, {
"rtmax", "nfs.fsinfo.rtmax", FT_UINT32, BASE_DEC,
NULL, 0, "maximum READ request", HFILL }},
- { &hf_nfs_fsinfo_rtpref, {
+ { &hf_nfs3_fsinfo_rtpref, {
"rtpref", "nfs.fsinfo.rtpref", FT_UINT32, BASE_DEC,
NULL, 0, "Preferred READ request size", HFILL }},
- { &hf_nfs_fsinfo_rtmult, {
+ { &hf_nfs3_fsinfo_rtmult, {
"rtmult", "nfs.fsinfo.rtmult", FT_UINT32, BASE_DEC,
NULL, 0, "Suggested READ multiple", HFILL }},
- { &hf_nfs_fsinfo_wtmax, {
+ { &hf_nfs3_fsinfo_wtmax, {
"wtmax", "nfs.fsinfo.wtmax", FT_UINT32, BASE_DEC,
NULL, 0, "Maximum WRITE request size", HFILL }},
- { &hf_nfs_fsinfo_wtpref, {
+ { &hf_nfs3_fsinfo_wtpref, {
"wtpref", "nfs.fsinfo.wtpref", FT_UINT32, BASE_DEC,
NULL, 0, "Preferred WRITE request size", HFILL }},
- { &hf_nfs_fsinfo_wtmult, {
+ { &hf_nfs3_fsinfo_wtmult, {
"wtmult", "nfs.fsinfo.wtmult", FT_UINT32, BASE_DEC,
NULL, 0, "Suggested WRITE multiple", HFILL }},
- { &hf_nfs_fsinfo_dtpref, {
+ { &hf_nfs3_fsinfo_dtpref, {
"dtpref", "nfs.fsinfo.dtpref", FT_UINT32, BASE_DEC,
NULL, 0, "Preferred READDIR request", HFILL }},
- { &hf_nfs_fsinfo_maxfilesize, {
+ { &hf_nfs3_fsinfo_maxfilesize, {
"maxfilesize", "nfs.fsinfo.maxfilesize", FT_UINT64, BASE_DEC,
NULL, 0, "Maximum file size", HFILL }},
- { &hf_nfs_fsinfo_properties, {
+ { &hf_nfs3_fsinfo_properties, {
"Properties", "nfs.fsinfo.properties", FT_UINT32, BASE_HEX,
NULL, 0, "File System Properties", HFILL }},
- { &hf_nfs_fsinfo_properties_setattr, {
+ { &hf_nfs3_fsinfo_properties_setattr, {
"SETATTR can set time on server", "nfs.fsinfo.properties.setattr", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), FSF3_CANSETTIME, NULL, HFILL }},
- { &hf_nfs_fsinfo_properties_pathconf, {
+ { &hf_nfs3_fsinfo_properties_pathconf, {
"PATHCONF", "nfs.fsinfo.properties.pathconf", FT_BOOLEAN, 32,
TFS(&tfs_nfs_pathconf), FSF3_HOMOGENEOUS, NULL, HFILL }},
- { &hf_nfs_fsinfo_properties_symlinks, {
+ { &hf_nfs3_fsinfo_properties_symlinks, {
"File System supports symbolic links", "nfs.fsinfo.properties.symlinks", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), FSF3_SYMLINK, NULL, HFILL }},
- { &hf_nfs_fsinfo_properties_hardlinks, {
+ { &hf_nfs3_fsinfo_properties_hardlinks, {
"File System supports hard links", "nfs.fsinfo.properties.hardlinks", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), FSF3_LINK, NULL, HFILL }},
- { &hf_nfs_pathconf_linkmax, {
+ { &hf_nfs3_pathconf_linkmax, {
"linkmax", "nfs.pathconf.linkmax", FT_UINT32, BASE_DEC,
NULL, 0, "Maximum number of hard links", HFILL }},
- { &hf_nfs_pathconf_name_max, {
+ { &hf_nfs3_pathconf_name_max, {
"name_max", "nfs.pathconf.name_max", FT_UINT32, BASE_DEC,
NULL, 0, "Maximum file name length", HFILL }},
- { &hf_nfs_pathconf_no_trunc, {
+ { &hf_nfs3_pathconf_no_trunc, {
"no_trunc", "nfs.pathconf.no_trunc", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, "No long file name truncation", HFILL }},
- { &hf_nfs_pathconf_chown_restricted, {
+ { &hf_nfs3_pathconf_chown_restricted, {
"chown_restricted", "nfs.pathconf.chown_restricted", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, "chown is restricted to root", HFILL }},
- { &hf_nfs_pathconf_case_insensitive, {
+ { &hf_nfs3_pathconf_case_insensitive, {
"case_insensitive", "nfs.pathconf.case_insensitive", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, "file names are treated case insensitive", HFILL }},
- { &hf_nfs_pathconf_case_preserving, {
+ { &hf_nfs3_pathconf_case_preserving, {
"case_preserving", "nfs.pathconf.case_preserving", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, "file name cases are preserved", HFILL }},
#if 0
- { &hf_nfs_fattr_type, {
+ { &hf_nfs2_fattr_type, {
"type", "nfs.fattr.type", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
- { &hf_nfs_fattr_nlink, {
+ { &hf_nfs2_fattr_nlink, {
"nlink", "nfs.fattr.nlink", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr_uid, {
+ { &hf_nfs2_fattr_uid, {
"uid", "nfs.fattr.uid", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr_gid, {
+ { &hf_nfs2_fattr_gid, {
"gid", "nfs.fattr.gid", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr_size, {
+ { &hf_nfs2_fattr_size, {
"size", "nfs.fattr.size", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr_blocksize, {
+ { &hf_nfs2_fattr_blocksize, {
"blocksize", "nfs.fattr.blocksize", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr_rdev, {
+ { &hf_nfs2_fattr_rdev, {
"rdev", "nfs.fattr.rdev", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr_blocks, {
+ { &hf_nfs2_fattr_blocks, {
"blocks", "nfs.fattr.blocks", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr_fsid, {
+ { &hf_nfs2_fattr_fsid, {
"fsid", "nfs.fattr.fsid", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr_fileid, {
+ { &hf_nfs2_fattr_fileid, {
"fileid", "nfs.fattr.fileid", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr3_type, {
+ { &hf_nfs3_fattr_type, {
"Type", "nfs.fattr3.type", FT_UINT32, BASE_DEC|BASE_EXT_STRING,
&names_nfs_ftype3_ext, 0, NULL, HFILL }},
- { &hf_nfs_fattr3_nlink, {
+ { &hf_nfs3_fattr_nlink, {
"nlink", "nfs.fattr3.nlink", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr3_uid, {
+ { &hf_nfs3_fattr_uid, {
"uid", "nfs.fattr3.uid", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr3_gid, {
+ { &hf_nfs3_fattr_gid, {
"gid", "nfs.fattr3.gid", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr3_size, {
+ { &hf_nfs3_fattr_size, {
"size", "nfs.fattr3.size", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr3_used, {
+ { &hf_nfs3_fattr_used, {
"used", "nfs.fattr3.used", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
#if 0
- { &hf_nfs_fattr3_rdev, {
+ { &hf_nfs3_fattr_rdev, {
"rdev", "nfs.fattr3.rdev", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
- { &hf_nfs_fattr3_fsid, {
+ { &hf_nfs3_fattr_fsid, {
"fsid", "nfs.fattr3.fsid", FT_UINT64, BASE_HEX_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr3_fileid, {
+ { &hf_nfs3_fattr_fileid, {
"fileid", "nfs.fattr3.fileid", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_wcc_attr_size, {
+ { &hf_nfs3_wcc_attr_size, {
"size", "nfs.wcc_attr.size", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_set_size3_size, {
- "size", "nfs.set_size3.size", FT_UINT64, BASE_DEC,
+ { &hf_nfs3_set_size, {
+ "size", "nfs.set_size", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_uid3, {
+ { &hf_nfs3_uid, {
"uid", "nfs.uid3", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_gid3, {
+ { &hf_nfs3_gid, {
"gid", "nfs.gid3", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_cookie3, {
+ { &hf_nfs3_cookie, {
"cookie", "nfs.cookie3", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_offset3, {
+ { &hf_nfs3_offset, {
"offset", "nfs.offset3", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_count3, {
+ { &hf_nfs3_count, {
"count", "nfs.count3", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_count3_maxcount, {
+ { &hf_nfs3_count_maxcount, {
"maxcount", "nfs.count3_maxcount", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_count3_dircount, {
+ { &hf_nfs3_count_dircount, {
"dircount", "nfs.count3_dircount", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fsstat3_resok_tbytes, {
+ { &hf_nfs3_fsstat_resok_tbytes, {
"Total bytes", "nfs.fsstat3_resok.tbytes", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fsstat3_resok_fbytes, {
+ { &hf_nfs3_fsstat_resok_fbytes, {
"Free bytes", "nfs.fsstat3_resok.fbytes", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fsstat3_resok_abytes, {
+ { &hf_nfs3_fsstat_resok_abytes, {
"Available free bytes", "nfs.fsstat3_resok.abytes", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fsstat3_resok_tfiles, {
+ { &hf_nfs3_fsstat_resok_tfiles, {
"Total file slots", "nfs.fsstat3_resok.tfiles", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fsstat3_resok_ffiles, {
+ { &hf_nfs3_fsstat_resok_ffiles, {
"Free file slots", "nfs.fsstat3_resok.ffiles", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fsstat3_resok_afiles, {
+ { &hf_nfs3_fsstat_resok_afiles, {
"Available free file slots", "nfs.fsstat3_resok.afiles", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
/* NFSv4 */
- { &hf_nfs_nfsstat4, {
+ { &hf_nfs4_status, {
"Status", "nfs.nfsstat4", FT_UINT32, BASE_DEC|BASE_EXT_STRING,
- &names_nfs_nfsstat4_ext, 0, "Reply status", HFILL }},
+ &names_nfs4_status_ext, 0, "Reply status", HFILL }},
- { &hf_nfs_op4, {
+ { &hf_nfs4_op, {
"Opcode", "nfs.opcode", FT_UINT32, BASE_DEC|BASE_EXT_STRING,
- &names_nfsv4_operation_ext, 0, NULL, HFILL }},
+ &names_nfs4_operation_ext, 0, NULL, HFILL }},
- { &hf_nfs_main_opcode, {
+ { &hf_nfs4_main_opcode, {
"Main Opcode", "nfs.main_opcode", FT_UINT32, BASE_DEC,
NULL, 0, "Main Operation number", HFILL }},
- { &hf_nfs_linktext4, {
+ { &hf_nfs4_linktext, {
"Name", "nfs.symlink.linktext", FT_STRING, BASE_NONE,
NULL, 0, "Symbolic link contents", HFILL }},
- { &hf_nfs_component4, {
- "Filename", "nfs.pathname.component", FT_STRING, BASE_NONE,
+ { &hf_nfs4_component, {
+ "Name", "nfs.pathname.component", FT_STRING, BASE_NONE,
NULL, 0, "Pathname component", HFILL }},
- { &hf_nfs_tag4, {
+ { &hf_nfs4_tag, {
"Tag", "nfs.tag", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_ops_count4, {
+ { &hf_nfs4_ops_count, {
"Operations", "nfs.ops.count", FT_UINT32, BASE_DEC,
NULL, 0, "Number of Operations", HFILL }},
- { &hf_nfs_clientid4, {
+ { &hf_nfs4_clientid, {
"clientid", "nfs.clientid", FT_UINT64, BASE_HEX,
NULL, 0, "Client ID", HFILL }},
#if 0
- { &hf_nfs_ace4, {
+ { &hf_nfs4_ace, {
"ace", "nfs.ace", FT_STRING, BASE_NONE,
NULL, 0, "Access Control Entry", HFILL }},
#endif
- { &hf_nfs_recall, {
+ { &hf_nfs4_recall, {
"Recall", "nfs.recall", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_open_claim_type4, {
+ { &hf_nfs4_open_claim_type, {
"Claim Type", "nfs.open.claim_type", FT_UINT32, BASE_DEC,
VALS(names_claim_type4), 0, NULL, HFILL }},
- { &hf_nfs_opentype4, {
+ { &hf_nfs4_opentype, {
"Open Type", "nfs.open.opentype", FT_UINT32, BASE_DEC,
VALS(names_opentype4), 0, NULL, HFILL }},
- { &hf_nfs_state_protect_how4, {
+ { &hf_nfs4_state_protect_how, {
"eia_state_protect", "nfs.exchange_id.state_protect", FT_UINT32, BASE_DEC,
VALS(names_state_protect_how4), 0, "State Protect How", HFILL }},
- { &hf_nfs_limit_by4, {
+ { &hf_nfs4_limit_by, {
"Space Limit", "nfs.open.limit_by", FT_UINT32, BASE_DEC,
VALS(names_limit_by4), 0, "Limit By", HFILL }},
- { &hf_nfs_open_delegation_type4, {
+ { &hf_nfs4_open_delegation_type, {
"Delegation Type", "nfs.open.delegation_type", FT_UINT32, BASE_DEC,
VALS(names_open_delegation_type4), 0, NULL, HFILL }},
- { &hf_nfs_why_no_delegation4, {
+ { &hf_nfs4_why_no_delegation, {
"why no delegation", "nfs.open.why_no_delegation", FT_UINT32, BASE_DEC,
VALS(names_why_no_delegation4), 0, NULL, HFILL }},
- { &hf_nfs_secinfo_style4, {
+ { &hf_nfs4_secinfo_style, {
"Secinfo Style", "nfs.secinfo.style", FT_UINT32, BASE_DEC,
VALS(names_secinfo_style4), 0, NULL, HFILL }},
- { &hf_nfs_ftype4, {
- "nfs_ftype4", "nfs.nfs_ftype4", FT_UINT32, BASE_DEC,
+ { &hf_nfs4_ftype, {
+ "ftype4", "nfs.nfs_ftype4", FT_UINT32, BASE_DEC,
VALS(names_ftype4), 0, NULL, HFILL }},
- { &hf_nfs_change_info4_atomic, {
+ { &hf_nfs4_change_info_atomic, {
"Atomic", "nfs.change_info.atomic", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_open4_share_access, {
+ { &hf_nfs4_open_share_access, {
"share_access", "nfs.open4.share_access", FT_UINT32, BASE_DEC,
VALS(names_open4_share_access), 0, NULL, HFILL }},
- { &hf_nfs_open4_share_deny, {
+ { &hf_nfs4_open_share_deny, {
"share_deny", "nfs.open4.share_deny", FT_UINT32, BASE_DEC,
VALS(names_open4_share_deny), 0, NULL, HFILL }},
- { &hf_nfs_want_flags, {
+ { &hf_nfs4_want_flags, {
"wants", "nfs.want", FT_UINT32, BASE_HEX,
VALS(names_open4_share_access), 0, NULL, HFILL }},
- { &hf_nfs_want_notify_flags, {
+
+ { &hf_nfs4_want_notify_flags, {
"want notification", "nfs.want_notification", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_want_signal_deleg_when_resrc_avail, {
+
+ { &hf_nfs4_want_signal_deleg_when_resrc_avail, {
"want_signal_deleg_when_resrc_avail",
"nfs.want_notification.when_resrc_avail", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL, NULL, HFILL }},
- { &hf_nfs_want_push_deleg_when_uncontended, {
+
+ { &hf_nfs4_want_push_deleg_when_uncontended, {
"want_push_deleg_when_uncontended",
"nfs.want_push_deleg_when_uncontended", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED, NULL, HFILL }},
- { &hf_nfs_seqid4, {
+ { &hf_nfs4_seqid, {
"seqid", "nfs.seqid", FT_UINT32, BASE_HEX,
NULL, 0, "Sequence ID", HFILL }},
- { &hf_nfs_lock_seqid4, {
+ { &hf_nfs4_lock_seqid, {
"lock_seqid", "nfs.lock_seqid", FT_UINT32, BASE_HEX,
NULL, 0, "Lock Sequence ID", HFILL }},
- { &hf_nfs_mand_attr, {
+ { &hf_nfs4_mand_attr, {
"mand_attr", "nfs.attr", FT_UINT32, BASE_DEC,
VALS(names_fattr4), 0, "Mandatory Attribute", HFILL }},
- { &hf_nfs_recc_attr, {
+ { &hf_nfs4_recc_attr, {
"recc_attr", "nfs.attr", FT_UINT32, BASE_DEC,
VALS(names_fattr4), 0, "Recommended Attribute", HFILL }},
- { &hf_nfs_time_how4, {
+ { &hf_nfs4_time_how, {
"set_it", "nfs.set_it", FT_UINT32, BASE_DEC,
VALS(names_time_how4), 0, "How To Set Time", HFILL }},
- { &hf_nfs_attrlist4, {
+ { &hf_nfs4_attrlist, {
"attr_vals", "nfs.fattr4.attr_vals", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_link_support, {
+ { &hf_nfs4_fattr_link_support, {
"fattr4_link_support", "nfs.fattr4_link_support", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_fattr4_symlink_support, {
+ { &hf_nfs4_fattr_symlink_support, {
"fattr4_symlink_support", "nfs.fattr4_symlink_support", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_fattr4_named_attr, {
+ { &hf_nfs4_fattr_named_attr, {
"fattr4_named_attr", "nfs.fattr4_named_attr", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_fattr4_unique_handles, {
+ { &hf_nfs4_fattr_unique_handles, {
"fattr4_unique_handles", "nfs.fattr4_unique_handles", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_fattr4_archive, {
+ { &hf_nfs4_fattr_archive, {
"fattr4_archive", "nfs.fattr4_archive", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_fattr4_cansettime, {
+ { &hf_nfs4_fattr_cansettime, {
"fattr4_cansettime", "nfs.fattr4_cansettime", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_fattr4_case_insensitive, {
+ { &hf_nfs4_fattr_case_insensitive, {
"fattr4_case_insensitive", "nfs.fattr4_case_insensitive", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_fattr4_case_preserving, {
+ { &hf_nfs4_fattr_case_preserving, {
"fattr4_case_preserving", "nfs.fattr4_case_preserving", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_fattr4_chown_restricted, {
+ { &hf_nfs4_fattr_chown_restricted, {
"fattr4_chown_restricted", "nfs.fattr4_chown_restricted", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_fattr4_hidden, {
+ { &hf_nfs4_fattr_hidden, {
"fattr4_hidden", "nfs.fattr4_hidden", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_fattr4_homogeneous, {
+ { &hf_nfs4_fattr_homogeneous, {
"fattr4_homogeneous", "nfs.fattr4_homogeneous", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_fattr4_mimetype, {
+ { &hf_nfs4_fattr_mimetype, {
"fattr4_mimetype", "nfs.fattr4_mimetype", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_no_trunc, {
+ { &hf_nfs4_fattr_no_trunc, {
"fattr4_no_trunc", "nfs.fattr4_no_trunc", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_fattr4_system, {
+ { &hf_nfs4_fattr_system, {
"fattr4_system", "nfs.fattr4_system", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_who, {
- "who", "nfs.who", FT_STRING, BASE_NONE,
+ { &hf_nfs4_who, {
+ "Who", "nfs.who", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_server, {
+ { &hf_nfs4_server, {
"server", "nfs.server", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fslocation4, {
+ { &hf_nfs4_fslocation, {
"fs_location4", "nfs.fattr4.fs_location", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_owner, {
+ { &hf_nfs4_fattr_owner, {
"fattr4_owner", "nfs.fattr4_owner", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_owner_group, {
+ { &hf_nfs4_fattr_owner_group, {
"fattr4_owner_group", "nfs.fattr4_owner_group", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_stable_how4, {
+ { &hf_nfs4_stable_how, {
"stable_how4", "nfs.stable_how4", FT_UINT32, BASE_DEC,
VALS(names_stable_how4), 0, NULL, HFILL }},
- { &hf_nfs_dirlist4_eof, {
- "eof", "nfs.dirlist4.eof", FT_BOOLEAN, BASE_NONE,
- TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
+ { &hf_nfs4_dirlist_eof, {
+ "EOF", "nfs.dirlist4.eof", FT_BOOLEAN, BASE_NONE,
+ TFS(&tfs_yes_no), 0x0, "There are no more entries", HFILL }},
#if 0
- { &hf_nfs_stateid4, {
+ { &hf_nfs4_stateid, {
"stateid", "nfs.stateid4", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
- { &hf_nfs_offset4, {
+ { &hf_nfs4_offset, {
"offset", "nfs.offset4", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_specdata1, {
+ { &hf_nfs4_specdata1, {
"specdata1", "nfs.specdata1", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_specdata2, {
+ { &hf_nfs4_specdata2, {
"specdata2", "nfs.specdata2", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_lock_type4, {
+ { &hf_nfs4_lock_type, {
"locktype", "nfs.locktype4", FT_UINT32, BASE_DEC,
VALS(names_nfs_lock_type4), 0, NULL, HFILL }},
- { &hf_nfs_open_rflags, {
+ { &hf_nfs4_open_rflags, {
"results_flags", "nfs.open_rflags", FT_UINT32, BASE_HEX,
VALS(names_nfs_lock_type4), 0, NULL, HFILL }},
- { &hf_nfs_open_rflags_mlock, {
+ { &hf_nfs4_open_rflags_mlock, {
"mlock", "nfs.open_rflags.mlock", FT_UINT32, BASE_DEC,
VALS(names_open4_result_flags), OPEN4_RESULT_MLOCK, NULL, HFILL }},
- { &hf_nfs_open_rflags_confirm, {
+ { &hf_nfs4_open_rflags_confirm, {
"confirm", "nfs.open_rflags.confirm", FT_UINT32, BASE_DEC,
VALS(names_open4_result_flags), OPEN4_RESULT_CONFIRM, NULL, HFILL }},
- { &hf_nfs_reclaim4, {
+ { &hf_nfs4_reclaim, {
"reclaim", "nfs.reclaim4", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_length4, {
+ { &hf_nfs4_length, {
"length", "nfs.length4", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_changeid4, {
+ { &hf_nfs4_changeid, {
"changeid", "nfs.changeid4", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_changeid4_before, {
+ { &hf_nfs4_changeid_before, {
"changeid (before)", "nfs.changeid4.before", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_changeid4_after, {
+ { &hf_nfs4_changeid_after, {
"changeid (after)", "nfs.changeid4.after", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_nfstime4_seconds, {
+ { &hf_nfs4_time_seconds, {
"seconds", "nfs.nfstime4.seconds", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_nfstime4_nseconds, {
+ { &hf_nfs4_time_nseconds, {
"nseconds", "nfs.nfstime4.nseconds", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fsid4_major, {
+ { &hf_nfs4_fsid_major, {
"fsid4.major", "nfs.fsid4.major", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fsid4_minor, {
+ { &hf_nfs4_fsid_minor, {
"fsid4.minor", "nfs.fsid4.minor", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_acetype4, {
+ { &hf_nfs4_acetype, {
"acetype", "nfs.acetype4", FT_UINT32, BASE_DEC,
VALS(names_acetype4), 0, NULL, HFILL }},
#if 0
- { &hf_nfs_aceflag4, {
+ { &hf_nfs4_aceflag, {
"aceflag", "nfs.aceflag4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
#if 0
- { &hf_nfs_acemask4, {
+ { &hf_nfs4_acemask, {
"acemask", "nfs.acemask4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
- { &hf_nfs_fattr4_size, {
+ { &hf_nfs4_fattr_size, {
"size", "nfs.fattr4.size", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_lease_time, {
+ { &hf_nfs4_fattr_lease_time, {
"lease_time", "nfs.fattr4.lease_time", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
+ NULL, 0, "Duration of the lease at server in seconds", HFILL }},
- { &hf_nfs_fattr4_aclsupport, {
+ { &hf_nfs4_fattr_aclsupport, {
"aclsupport", "nfs.fattr4.aclsupport", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_fileid, {
+ { &hf_nfs4_fattr_fileid, {
"fileid", "nfs.fattr4.fileid", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_files_avail, {
+ { &hf_nfs4_fattr_files_avail, {
"files_avail", "nfs.fattr4.files_avail", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_files_free, {
+ { &hf_nfs4_fattr_files_free, {
"files_free", "nfs.fattr4.files_free", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_files_total, {
+ { &hf_nfs4_fattr_files_total, {
"files_total", "nfs.fattr4.files_total", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_maxfilesize, {
+ { &hf_nfs4_fattr_maxfilesize, {
"maxfilesize", "nfs.fattr4.maxfilesize", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_maxlink, {
+ { &hf_nfs4_fattr_maxlink, {
"maxlink", "nfs.fattr4.maxlink", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_maxname, {
+ { &hf_nfs4_fattr_maxname, {
"maxname", "nfs.fattr4.maxname", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_numlinks, {
+ { &hf_nfs4_fattr_numlinks, {
"numlinks", "nfs.fattr4.numlinks", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_delegate_type, {
+ { &hf_nfs4_delegate_type, {
"delegate_type", "nfs.delegate_type", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_secinfo_flavor, {
+ { &hf_nfs4_secinfo_flavor, {
"flavor", "nfs.secinfo.flavor", FT_UINT32, BASE_DEC,
VALS(rpc_auth_flavor), 0, NULL, HFILL }},
- { &hf_nfs_num_blocks, {
+ { &hf_nfs4_num_blocks, {
"num_blocks", "nfs.num_blocks", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_bytes_per_block, {
+ { &hf_nfs4_bytes_per_block, {
"bytes_per_block", "nfs.bytes_per_block", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_eof, {
+ { &hf_nfs4_eof, {
"eof", "nfs.eof", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_maxread, {
+ { &hf_nfs4_fattr_maxread, {
"maxread", "nfs.fattr4.maxread", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_maxwrite, {
+ { &hf_nfs4_fattr_maxwrite, {
"maxwrite", "nfs.fattr4.maxwrite", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_quota_hard, {
+ { &hf_nfs4_fattr_quota_hard, {
"quota_hard", "nfs.fattr4.quota_hard", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_quota_soft, {
+ { &hf_nfs4_fattr_quota_soft, {
"quota_soft", "nfs.fattr4.quota_soft", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_quota_used, {
+ { &hf_nfs4_fattr_quota_used, {
"quota_used", "nfs.fattr4.quota_used", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_space_avail, {
+ { &hf_nfs4_fattr_space_avail, {
"space_avail", "nfs.fattr4.space_avail", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_space_free, {
+ { &hf_nfs4_fattr_space_free, {
"space_free", "nfs.fattr4.space_free", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_space_total, {
+ { &hf_nfs4_fattr_space_total, {
"space_total", "nfs.fattr4.space_total", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_space_used, {
+ { &hf_nfs4_fattr_space_used, {
"space_used", "nfs.fattr4.space_used", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_mounted_on_fileid, {
+ { &hf_nfs4_fattr_mounted_on_fileid, {
"fileid", "nfs.fattr4.mounted_on_fileid", FT_UINT64, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_layout_blksize, {
+ { &hf_nfs4_fattr_layout_blksize, {
"fileid", "nfs.fattr4.layout_blksize", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_security_label_lfs, {
+ { &hf_nfs4_fattr_security_label_lfs, {
"label_format", "nfs.fattr4.security_label.lfs", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_security_label_pi, {
+ { &hf_nfs4_fattr_security_label_pi, {
"policy_id", "nfs.fattr4.security_label.pi", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_fattr4_security_label_context, {
+ { &hf_nfs4_fattr_security_label_context, {
"context", "nfs.fattr4.security_label.context", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_verifier4, {
+ { &hf_nfs4_verifier, {
"verifier", "nfs.verifier4", FT_UINT64, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_cookie4, {
+ { &hf_nfs4_cookie, {
"cookie", "nfs.cookie4", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_cookieverf4, {
- "cookieverf", "nfs.cookieverf4", FT_UINT64, BASE_DEC,
+ { &hf_nfs4_cookie_verf, {
+ "cookie_verf", "nfs.cookie_verf4", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
#if 0
- { &hf_nfs_cb_location, {
+ { &hf_nfs4_cb_location, {
"cb_location", "nfs.cb_location", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
- { &hf_nfs_cb_program, {
+ { &hf_nfs4_cb_program, {
"cb_program", "nfs.cb_program", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_recall4, {
+ { &hf_nfs4_recall4, {
"recall", "nfs.recall4", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_filesize, {
+ { &hf_nfs4_filesize, {
"filesize", "nfs.filesize", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_count4, {
+ { &hf_nfs4_count, {
"count", "nfs.count4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_count4_dircount, {
+ { &hf_nfs4_count_dircount, {
"dircount", "nfs.dircount", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_count4_maxcount, {
+ { &hf_nfs4_count_maxcount, {
"maxcount", "nfs.maxcount", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_minorversion, {
+ { &hf_nfs4_minorversion, {
"minorversion", "nfs.minorversion", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
@@ -11772,73 +11918,72 @@ proto_register_nfs(void)
"nano seconds", "nfs.dtime.nsec", FT_UINT32, BASE_DEC,
NULL, 0, "Time Delta, Nano-seconds", HFILL }},
- { &hf_nfs_open_owner4, {
+ { &hf_nfs4_open_owner, {
"owner", "nfs.open_owner4", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
#if 0
- { &hf_nfs_lock_owner4, {
+ { &hf_nfs4_lock_owner, {
"owner", "nfs.lock_owner4", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
#endif
- { &hf_nfs_createmode4, {
+ { &hf_nfs4_createmode, {
"Create Mode", "nfs.createmode4", FT_UINT32, BASE_DEC,
VALS(names_createmode4), 0, NULL, HFILL }},
- { &hf_nfs_secinfo_rpcsec_gss_info_service, {
+ { &hf_nfs4_secinfo_rpcsec_gss_info_service, {
"service", "nfs.secinfo.rpcsec_gss_info.service", FT_UINT32, BASE_DEC,
VALS(rpc_authgss_svc), 0, NULL, HFILL }},
- { &hf_nfs_attrdircreate, {
+ { &hf_nfs4_attr_dir_create, {
"attribute dir create", "nfs.openattr4.createdir", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_new_lock_owner, {
+ { &hf_nfs4_new_lock_owner, {
"new lock owner?", "nfs.lock.locker.new_lock_owner", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_lock4_reclaim, {
+ { &hf_nfs4_lock_reclaim, {
"reclaim?", "nfs.lock.reclaim", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_sec_oid4, {
+ { &hf_nfs4_sec_oid, {
"oid", "nfs.secinfo.flavor_info.rpcsec_gss_info.oid", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_qop4, {
+ { &hf_nfs4_qop, {
"qop", "nfs.secinfo.flavor_info.rpcsec_gss_info.qop", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_client_id4_id, {
+ { &hf_nfs4_client_id, {
"id", "nfs.nfs_client_id4.id", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_stateid4_other, {
+ { &hf_nfs4_stateid_other, {
"Data", "nfs.stateid4.other", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_stateid4_hash, {
+ { &hf_nfs4_stateid_hash, {
"StateID Hash", "nfs.stateid4.hash", FT_UINT16, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_acl4, {
- "ACL", "nfs.acl", FT_NONE, BASE_NONE,
- NULL, 0, "Access Control List", HFILL }},
+ { &hf_nfs4_acl, {
+ "ACL", "nfs.acl", FT_NONE, BASE_NONE, NULL, 0, "Access Control List", HFILL }},
- { &hf_nfs_callback_ident, {
+ { &hf_nfs4_callback_ident, {
"callback_ident", "nfs.callback.ident", FT_UINT32, BASE_HEX,
NULL, 0, "Callback Identifier", HFILL }},
- { &hf_nfs_gsshandle4, {
+ { &hf_nfs4_gsshandle, {
"gsshandle4", "nfs.gsshandle4", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_r_netid, {
+ { &hf_nfs4_r_netid, {
"r_netid", "nfs.r_netid", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_r_addr, {
+ { &hf_nfs4_r_addr, {
"r_addr", "nfs.r_addr", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
@@ -11846,327 +11991,327 @@ proto_register_nfs(void)
"filehandle", "nfs.fhandle", FT_BYTES, BASE_NONE,
NULL, 0, "Opaque nfs filehandle", HFILL }},
- { &hf_nfs_secinfo_arr4, {
+ { &hf_nfs4_secinfo_arr, {
"Flavors Info", "nfs.flavors.info", FT_NONE, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_gxfh3_utlfield, {
+ { &hf_nfs3_gxfh_utlfield, {
"utility", "nfs.gxfh3.utility", FT_UINT8, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_gxfh3_utlfield_tree_r, {
+ { &hf_nfs3_gxfh_utlfield_tree_r, {
"tree R", "nfs.gxfh3.utlfield.treeR", FT_UINT8, BASE_HEX,
NULL, NFS3GX_FH_TREE_MASK, NULL, HFILL }},
- { &hf_gxfh3_utlfield_tree_w, {
+ { &hf_nfs3_gxfh_utlfield_tree_w, {
"tree W", "nfs.gxfh3.utlfield.treeW", FT_UINT8, BASE_HEX,
NULL, NFS3GX_FH_TREE_MASK, NULL, HFILL }},
- { &hf_gxfh3_utlfield_jun, {
+ { &hf_nfs3_gxfh_utlfield_jun, {
"broken junction", "nfs.gxfh3.utlfield.junction", FT_UINT8, BASE_HEX,
NULL, NFS3GX_FH_JUN_MASK, NULL, HFILL }},
- { &hf_gxfh3_utlfield_jun_not, {
+ { &hf_nfs3_gxfh_utlfield_jun_not, {
"not broken junction", "nfs.gxfh3.utlfield.notjunction", FT_UINT8, BASE_HEX,
NULL, NFS3GX_FH_JUN_MASK, NULL, HFILL }},
- { &hf_gxfh3_utlfield_ver, {
+ { &hf_nfs3_gxfh_utlfield_ver, {
"file handle version","nfs.gxfh3.utlfield.version", FT_UINT8, BASE_HEX,
NULL, NFS3GX_FH_VER_MASK, NULL, HFILL }},
- { &hf_gxfh3_volcnt, {
+ { &hf_nfs3_gxfh_volcnt, {
"volume count", "nfs.gxfh3.volcnt", FT_UINT8, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_gxfh3_epoch, {
+ { &hf_nfs3_gxfh_epoch, {
"epoch", "nfs.gxfh3.epoch", FT_UINT16, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_gxfh3_ldsid, {
+ { &hf_nfs3_gxfh_ldsid, {
"local dsid", "nfs.gxfh3.ldsid", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_gxfh3_cid, {
+ { &hf_nfs3_gxfh_cid, {
"cluster id", "nfs.gxfh3.cid", FT_UINT16, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_gxfh3_resv, {
+ { &hf_mfs3_gxfh_resv, {
"reserved", "nfs.gxfh3.reserved", FT_UINT16, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_gxfh3_sfhflags, {
+ { &hf_nfs3_gxfh_sfhflags, {
"flags", "nfs.gxfh3.sfhflags", FT_UINT8, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_gxfh3_sfhflags_resv1, {
+ { &hf_nfs3_gxfh_sfhflags_resv1, {
"reserved", "nfs.gxfh3.sfhflags.reserve1", FT_UINT8, BASE_HEX,
NULL, SPINNP_FH_FLAG_RESV1, NULL, HFILL }},
- { &hf_gxfh3_sfhflags_resv2, {
+ { &hf_nfs3_gxfh_sfhflags_resv2, {
"reserved", "nfs.gxfh3.sfhflags.reserv2", FT_UINT8, BASE_HEX,
NULL, SPINNP_FH_FLAG_RESV2, NULL, HFILL }},
- { &hf_gxfh3_sfhflags_ontap7G, {
+ { &hf_nfs3_gxfh_sfhflags_ontap7G, {
"ontap-7g", "nfs.gxfh3.sfhflags.ontap7g", FT_UINT8, BASE_HEX,
NULL, SPINNP_FH_FLAG_ONTAP_MASK, NULL, HFILL }},
- { &hf_gxfh3_sfhflags_ontapGX, {
+ { &hf_nfs3_gxfh_sfhflags_ontapGX, {
"ontap-gx", "nfs.gxfh3.sfhflags.ontapgx", FT_UINT8, BASE_HEX,
NULL, SPINNP_FH_FLAG_ONTAP_MASK, NULL, HFILL }},
- { &hf_gxfh3_sfhflags_striped, {
+ { &hf_nfs3_gxfh_sfhflags_striped, {
"striped", "nfs.gxfh3.sfhflags.striped", FT_BOOLEAN, 8,
TFS(&tfs_set_notset), SPINNP_FH_FLAG_STRIPED_MASK, NULL, HFILL }},
- { &hf_gxfh3_sfhflags_empty, {
+ { &hf_nfs3_gxfh_sfhflags_empty, {
"empty", "nfs.gxfh3.sfhflags.empty", FT_BOOLEAN, 8,
TFS(&tfs_set_notset), SPINNP_FH_FLAG_EMPTY_MASK, NULL, HFILL }},
- { &hf_gxfh3_sfhflags_snapdirent, {
+ { &hf_nfs3_gxfh_sfhflags_snapdirent, {
"snap dir ent", "nfs.gxfh3.sfhflags.snapdirent", FT_BOOLEAN, 8,
TFS(&tfs_set_notset), SPINNP_FH_FLAG_SNAPDIR_ENT_MASK, NULL, HFILL }},
- { &hf_gxfh3_sfhflags_snapdir, {
+ { &hf_nfs3_gxfh_sfhflags_snapdir, {
"snap dir", "nfs.gxfh3.sfhflags.snapdir", FT_BOOLEAN, 8,
TFS(&tfs_set_notset), SPINNP_FH_FLAG_SNAPDIR_MASK, NULL, HFILL }},
- { &hf_gxfh3_sfhflags_streamdir, {
+ { &hf_nfs3_gxfh_sfhflags_streamdir, {
"stream dir", "nfs.gxfh3.sfhflags.streamdir", FT_BOOLEAN, 8,
TFS(&tfs_set_notset), SPINNP_FH_FLAG_STREAMDIR_MASK, NULL, HFILL }},
- { &hf_gxfh3_spinfid, {
+ { &hf_nfs3_gxfh_spinfid, {
"spin file id", "nfs.gxfh3.spinfid", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_gxfh3_spinfuid, {
+ { &hf_nfs3_gxfh_spinfuid, {
"spin file unique id", "nfs.gxfh3.spinfuid", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_gxfh3_exportptid, {
+ { &hf_nfs3_gxfh_exportptid, {
"export point id", "nfs.gxfh3.exportptid", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_gxfh3_exportptuid, {
+ { &hf_nfs3_gxfh_exportptuid, {
"export point unique id", "nfs.gxfh3.exportptuid", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_length4_minlength, {
+ { &hf_nfs4_length_minlength, {
"min length", "nfs.minlength4", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_layouttype4, {
+ { &hf_nfs4_layout_type, {
"layout type", "nfs.layouttype", FT_UINT32, BASE_DEC,
VALS(layouttype_names), 0, NULL, HFILL }},
- { &hf_nfs_layoutreturn_type4, {
+ { &hf_nfs4_layout_return_type, {
"return type", "nfs.returntype", FT_UINT32, BASE_DEC,
VALS(layoutreturn_names), 0, NULL, HFILL }},
- { &hf_nfs_lrf_body_content, {
+ { &hf_nfs4_lrf_body_content, {
"lrf_body_content", "nfs.lrf_body_content", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_iomode4, {
+ { &hf_nfs4_iomode, {
"IO mode", "nfs.iomode", FT_UINT32, BASE_DEC,
VALS(iomode_names), 0, NULL, HFILL }},
#if 0
- { &hf_nfs_stripetype4, {
+ { &hf_nfs4_stripetype, {
"stripe type", "nfs.stripetype", FT_UINT32, BASE_DEC,
VALS(stripetype_names), 0, NULL, HFILL }},
#endif
#if 0
- { &hf_nfs_stripeunit4, {
+ { &hf_nfs4_stripeunit, {
"stripe unit", "nfs.stripeunit", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
#if 0
- { &hf_nfs_util4, {
+ { &hf_nfs4_util, {
"util", "nfs.util", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
#if 0
- { &hf_nfs_first_stripe_idx4, {
+ { &hf_nfs4_first_stripe_idx, {
"first stripe index", "nfs.stripeindex", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
#if 0
- { &hf_nfs_pattern_offset, {
+ { &hf_nfs4_pattern_offset, {
"layout pattern offset", "nfs.patternoffset", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
- { &hf_nfs_notification_bitmap4, {
+ { &hf_nfs4_notification_bitmap, {
"notification bitmap", "nfs.notificationbitmap", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_newtime4, {
+ { &hf_nfs4_newtime, {
"new time?", "nfs.newtime", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_newoffset4, {
+ { &hf_nfs4_newoffset, {
"new offset?", "nfs.newoffset", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_newsize4, {
+ { &hf_nfs4_newsize, {
"new size?", "nfs.newsize", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_layout_avail4, {
+ { &hf_nfs4_layout_avail, {
"layout available?", "nfs.layoutavail", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
#if 0
- { &hf_nfs_mdscommit4, {
+ { &hf_nfs4_mdscommit, {
"MDS commit?", "nfs.mdscommit", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
#endif
- { &hf_nfs_layoutupdate4, {
+ { &hf_nfs4_layoutupdate, {
"layout update", "nfs.layoutupdate", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_deviceid4, {
+ { &hf_nfs4_deviceid, {
"device ID", "nfs.deviceid", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_devicenum4, {
+ { &hf_nfs4_devicenum, {
"num devices", "nfs.devicenum4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_deviceidx4, {
+ { &hf_nfs4_deviceidx, {
"device index", "nfs.deviceidx", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_layout4, {
+ { &hf_nfs4_layout, {
"layout", "nfs.layout", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
#if 0
- { &hf_nfs_layout_count, {
+ { &hf_nfs4_layout_count, {
"layout", "nfs.layoutcount", FT_UINT32, BASE_DEC,
NULL, 0, "layout count", HFILL }},
#endif
#if 0
- { &hf_nfs_stripedevs4, {
+ { &hf_nfs4_stripedevs, {
"stripe devs", "nfs.stripedevs", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
#if 0
- { &hf_nfs_devaddr4, {
+ { &hf_nfs4_devaddr, {
"device addr", "nfs.devaddr", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
#endif
- { &hf_nfs_return_on_close4, {
+ { &hf_nfs4_return_on_close, {
"return on close?", "nfs.retclose4", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_nfl_util, {
+ { &hf_nfs4_nfl_util, {
"nfl_util", "nfs.nfl_util", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_nfl_first_stripe_index, {
+ { &hf_nfs4_nfl_first_stripe_index, {
"first stripe to use index", "nfs.nfl_first_stripe_index", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_slotid4, {
+ { &hf_nfs4_slotid, {
"slot id", "nfs.slotid", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_high_slotid4, {
+ { &hf_nfs4_high_slotid, {
"high slot id", "nfs.high_slotid", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_target_high_slotid4, {
+ { &hf_nfs4_target_high_slotid, {
"target high slot id", "nfs.target_high_slotid", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_serverscope4, {
+ { &hf_nfs4_serverscope4, {
"server scope", "nfs.scope", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_minorid4, {
+ { &hf_nfs4_minorid, {
"minor ID", "nfs.minorid4", FT_UINT64, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_majorid4, {
+ { &hf_nfs4_majorid, {
"major ID", "nfs.majorid4", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_padsize4, {
+ { &hf_nfs4_padsize, {
"hdr pad size", "nfs.padsize4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
#if 0
- { &hf_nfs_cbrenforce4, {
+ { &hf_nfs4_cbrenforce, {
"binding enforce?", "nfs.cbrenforce4", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
#endif
#if 0
- { &hf_nfs_hashalg4, {
+ { &hf_nfs4_hashalg, {
"hash alg", "nfs.hashalg4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
#if 0
- { &hf_nfs_ssvlen4, {
+ { &hf_nfs4_ssvlen, {
"ssv len", "nfs.ssvlen4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
#endif
- { &hf_nfs_maxreqsize4, {
+ { &hf_nfs4_maxreqsize, {
"max req size", "nfs.maxreqsize4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_maxrespsize4, {
+ { &hf_nfs4_maxrespsize, {
"max resp size", "nfs.maxrespsize4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_maxrespsizecached4, {
+ { &hf_nfs4_maxrespsizecached, {
"max resp size cached", "nfs.maxrespsizecached4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_maxops4, {
+ { &hf_nfs4_maxops, {
"max ops", "nfs.maxops4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_maxreqs4, {
+ { &hf_nfs4_maxreqs, {
"max reqs", "nfs.maxreqs4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_rdmachanattrs4, {
+ { &hf_nfs4_rdmachanattrs, {
"RDMA chan attrs", "nfs.rdmachanattrs4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_machinename4, {
+ { &hf_nfs4_machinename, {
"machine name", "nfs.machinename4", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_flavor4, {
+ { &hf_nfs4_flavor, {
"flavor", "nfs.flavor4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_stamp4, {
+ { &hf_nfs4_stamp, {
"stamp", "nfs.stamp4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_uid4, {
+ { &hf_nfs4_uid, {
"uid", "nfs.uid4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_gid4, {
+ { &hf_nfs4_gid, {
"gid", "nfs.gid4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_service4, {
+ { &hf_nfs4_service, {
"gid", "nfs.service4", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
@@ -12266,290 +12411,290 @@ proto_register_nfs(void)
NULL, 0x0,
"True if access has been denied to one or more of the requested types", HFILL }
},
- { &hf_nfs_sessionid4, {
+ { &hf_nfs4_sessionid, {
"sessionid", "nfs.session_id4", FT_BYTES, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_exchid_call_flags, {
+ { &hf_nfs4_exchid_call_flags, {
"flags", "nfs.exchange_id.call_flags", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL}},
- { &hf_nfs_exchid_reply_flags, {
+ { &hf_nfs4_exchid_reply_flags, {
"flags", "nfs.exchange_id.reply_flags", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL}},
- { &hf_nfs_exchid_flags_moved_refer, {
+ { &hf_nfs4_exchid_flags_moved_refer, {
"EXCHGID4_FLAG_SUPP_MOVED_REFER", "nfs.exchange_id.flags.moved_refer", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x00000001, NULL, HFILL}},
- { &hf_nfs_exchid_flags_moved_migr, {
+ { &hf_nfs4_exchid_flags_moved_migr, {
"EXCHGID4_FLAG_SUPP_MOVED_MIGR", "nfs.exchange_id.flags.moved_migr", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x00000002, NULL, HFILL}},
- { &hf_nfs_exchid_flags_bind_princ, {
+ { &hf_nfs4_exchid_flags_bind_princ, {
"EXCHGID4_FLAG_BIND_PRINC_STATEID", "nfs.exchange_id.flags.bind_princ", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x00000100, NULL, HFILL}},
- { &hf_nfs_exchid_flags_non_pnfs, {
+ { &hf_nfs4_exchid_flags_non_pnfs, {
"EXCHGID4_FLAG_USE_NON_PNFS", "nfs.exchange_id.flags.non_pnfs", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x00010000, NULL, HFILL}},
- { &hf_nfs_exchid_flags_pnfs_mds, {
+ { &hf_nfs4_exchid_flags_pnfs_mds, {
"EXCHGID4_FLAG_USE_PNFS_MDS", "nfs.exchange_id.flags.pnfs_mds", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x00020000, NULL, HFILL}},
- { &hf_nfs_exchid_flags_pnfs_ds, {
+ { &hf_nfs4_exchid_flags_pnfs_ds, {
"EXCHGID4_FLAG_USE_PNFS_DS", "nfs.exchange_id.flags.pnfs_ds", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x00040000, NULL, HFILL}},
- { &hf_nfs_exchid_flags_upd_conf_rec_a, {
- "EXCHGID4_FLAG_UPD_CONFIRMED_REC_A", "nfs.exchange_id.flags.confirmed_rec_a", FT_BOOLEAN, 32,
- TFS(&tfs_set_notset), 0x40000000, NULL, HFILL}},
- { &hf_nfs_exchid_flags_confirmed_r, {
+ { &hf_nfs4_exchid_flags_upd_conf_rec_a, {
+ "EXCHGID4_FLAG_UPD_CONFIRMED_REC_A", "nfs.exchange_id.flags.confirmed_rec_a",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x40000000, NULL, HFILL}},
+ { &hf_nfs4_exchid_flags_confirmed_r, {
"EXCHGID4_FLAG_CONFIRMED_R", "nfs.exchange_id.flags.confirmed_r", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x80000000, NULL, HFILL}},
- { &hf_nfs_prot_info4_hash_alg, {
+ { &hf_nfs4_prot_info_hash_alg, {
"Prot Info hash algorithm", "nfs.prot_info4_hash_alg", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_prot_info4_encr_alg, {
+ { &hf_nfs4_prot_info_encr_alg, {
"Prot Info encryption algorithm", "nfs.prot_info4_encr_alg", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_prot_info4_svv_length, {
+ { &hf_nfs4_prot_info_svv_length, {
"Prot Info svv_length", "nfs.prot_info4_svv_length", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_prot_info4_spi_window, {
+ { &hf_nfs4_prot_info_spi_window, {
"Prot Info spi window", "nfs.prot_info4_spi_window", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_state_protect_window, {
+ { &hf_nfs4_state_protect_window, {
"State Protect window", "nfs.state_protect_window", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_state_protect_num_gss_handles, {
+ { &hf_nfs4_state_protect_num_gss_handles, {
"State Protect num gss handles", "nfs.state_protect_num_gss_handles", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_nii_domain4, {
+ { &hf_nfs4_nii_domain, {
"Implementor DNS domain name(nii_domain)", "nfs.nii_domain4", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_nii_name4, {
+ { &hf_nfs4_nii_name, {
"Implementation product name(nii_name)", "nfs.nii_name4", FT_STRING, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_create_session_flags_csa, {
+ { &hf_nfs4_create_session_flags_csa, {
"csa_flags", "nfs.create_session_flags", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_create_session_flags_csr, {
+ { &hf_nfs4_create_session_flags_csr, {
"csr_flags", "nfs.create_session_flags", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_create_session_flags_persist, {
+ { &hf_nfs4_create_session_flags_persist, {
"CREATE_SESSION4_FLAG_PERSIST", "nfs.create_session.flags.persist", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x00000001, NULL, HFILL}},
- { &hf_nfs_create_session_flags_conn_back_chan, {
- "CREATE_SESSION4_FLAG_CONN_BACK_CHAN", "nfs.create_session.flags.conn_back_chan", FT_BOOLEAN, 32,
- TFS(&tfs_set_notset), 0x00000002, NULL, HFILL}},
- { &hf_nfs_create_session_flags_conn_rdma, {
- "CREATE_SESSION4_FLAG_CONN_RDMA", "nfs.create_session.flags.conn_rdma", FT_BOOLEAN, 32,
- TFS(&tfs_set_notset), 0x00000004, NULL, HFILL}},
- { &hf_nfs_cachethis4, {
+ { &hf_nfs4_create_session_flags_conn_back_chan, {
+ "CREATE_SESSION4_FLAG_CONN_BACK_CHAN", "nfs.create_session.flags.conn_back_chan",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x00000002, NULL, HFILL}},
+ { &hf_nfs4_create_session_flags_conn_rdma, {
+ "CREATE_SESSION4_FLAG_CONN_RDMA", "nfs.create_session.flags.conn_rdma",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x00000004, NULL, HFILL}},
+ { &hf_nfs4_cachethis, {
"cache this?", "nfs.cachethis4", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_reclaim_one_fs4, {
+ { &hf_nfs4_reclaim_one_fs, {
"reclaim one fs?", "nfs.reclaim_one_fs4", FT_BOOLEAN,
BASE_NONE, TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_cb_procedure, {
+ { &hf_nfs4_cb_procedure, {
"CB Procedure", "nfs.cb_procedure", FT_UINT32, BASE_DEC,
VALS(nfs_cb_proc_vals), 0, NULL, HFILL }},
- { &hf_nfs_cb_op, {
+ { &hf_nfs4_cb_op, {
"Opcode", "nfs.cb.operation", FT_UINT32, BASE_DEC|BASE_EXT_STRING,
&names_nfs_cb_operation_ext, 0, NULL, HFILL }},
- { &hf_nfs_lrs_present, {
+ { &hf_nfs4_lrs_present, {
"Stateid present?", "nfs.lrs_present", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0x0, NULL, HFILL }},
- { &hf_nfs_cb_truncate, {
+ { &hf_nfs4_cb_truncate, {
"Truncate?", "nfs.truncate", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0, NULL, HFILL }},
- { &hf_nfs_cb_layoutrecall_type, {
+ { &hf_nfs4_cb_layoutrecall_type, {
"recall type", "nfs.recalltype", FT_UINT32, BASE_DEC,
VALS(layoutrecall_names), 0, NULL, HFILL }},
- { &hf_nfs_cb_clorachanged, {
+ { &hf_nfs4_cb_clorachanged, {
"Clora changed", "nfs.clorachanged", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0, NULL, HFILL }},
- { &hf_nfs_bctsa_dir, {
+ { &hf_nfs4_bctsa_dir, {
"bctsa_dir", "nfs.bctsa_dir", FT_UINT32, BASE_HEX,
VALS(names_channel_dir_from_client), 0, NULL, HFILL }},
- { &hf_nfs_bctsa_use_conn_in_rdma_mode, {
+ { &hf_nfs4_bctsa_use_conn_in_rdma_mode, {
"bctsa_use_conn_in_rdma_mode", "nfs.bctsa_use_conn_in_rdma_mode", FT_BOOLEAN, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_bctsr_dir, {
+ { &hf_nfs4_bctsr_dir, {
"bctsr_dir", "nfs.bctsr_dir", FT_UINT32, BASE_HEX,
VALS(names_channel_dir_from_server), 0, NULL, HFILL }},
- { &hf_nfs_bctsr_use_conn_in_rdma_mode, {
+ { &hf_nfs4_bctsr_use_conn_in_rdma_mode, {
"bctsr_use_conn_in_rdma_mode", "nfs.bctsr_use_conn_in_rdma_mode", FT_BOOLEAN, BASE_NONE,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_mode3, {
+ { &hf_nfs3_mode, {
"Mode", "nfs.mode3", FT_UINT32, BASE_OCT,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_mode3_suid, {
+ { &hf_nfs3_mode_suid, {
"S_ISUID", "nfs.mode3.suid", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x800, NULL, HFILL }},
- { &hf_nfs_mode3_sgid, {
+ { &hf_nfs3_mode_sgid, {
"S_ISGID", "nfs.mode3.sgid", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x400, NULL, HFILL }},
- { &hf_nfs_mode3_sticky, {
+ { &hf_nfs3_mode_sticky, {
"S_ISVTX", "nfs.mode3.sticky", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x200, NULL, HFILL }},
- { &hf_nfs_mode3_rusr, {
+ { &hf_nfs3_mode_rusr, {
"S_IRUSR", "nfs.mode3.rusr", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x100, NULL, HFILL }},
- { &hf_nfs_mode3_wusr, {
+ { &hf_nfs3_mode_wusr, {
"S_IWUSR", "nfs.mode3.wusr", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x080, NULL, HFILL }},
- { &hf_nfs_mode3_xusr, {
+ { &hf_nfs3_mode_xusr, {
"S_IXUSR", "nfs.mode3.xusr", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x040, NULL, HFILL }},
- { &hf_nfs_mode3_rgrp, {
+ { &hf_nfs3_mode_rgrp, {
"S_IRGRP", "nfs.mode3.rgrp", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x020, NULL, HFILL }},
- { &hf_nfs_mode3_wgrp, {
+ { &hf_nfs3_mode_wgrp, {
"S_IWGRP", "nfs.mode3.wgrp", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x010, NULL, HFILL }},
- { &hf_nfs_mode3_xgrp, {
+ { &hf_nfs3_mode_xgrp, {
"S_IXGRP", "nfs.mode3.xgrp", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x008, NULL, HFILL }},
- { &hf_nfs_mode3_roth, {
+ { &hf_nfs3_mode_roth, {
"S_IROTH", "nfs.mode3.roth", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x004, NULL, HFILL }},
- { &hf_nfs_mode3_woth, {
+ { &hf_nfs3_mode_woth, {
"S_IWOTH", "nfs.mode3.woth", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x002, NULL, HFILL }},
- { &hf_nfs_mode3_xoth, {
+ { &hf_nfs3_mode_xoth, {
"S_IXOTH", "nfs.mode3.xoth", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0x001, NULL, HFILL }},
- { &hf_nfs_mode_name, {
+ { &hf_nfs2_mode_name, {
"Name", "nfs.mode.name", FT_UINT32, BASE_DEC,
VALS(nfs2_mode_names), 0160000, NULL, HFILL }},
- { &hf_nfs_mode_set_user_id, {
+ { &hf_nfs2_mode_set_user_id, {
"Set user id on exec", "nfs.mode.set_user_id", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 04000, NULL, HFILL }},
- { &hf_nfs_mode_set_group_id, {
+ { &hf_nfs2_mode_set_group_id, {
"Set group id on exec", "nfs.mode.set_group_id", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 02000, NULL, HFILL }},
- { &hf_nfs_mode_save_swap_text, {
+ { &hf_nfs2_mode_save_swap_text, {
"Save swapped text even after use", "nfs.mode.save_swap_text", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 01000, NULL, HFILL }},
- { &hf_nfs_mode_read_owner, {
+ { &hf_nfs2_mode_read_owner, {
"Read permission for owner", "nfs.mode.read_owner", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0400, NULL, HFILL }},
- { &hf_nfs_mode_write_owner, {
- "Read permission for owner", "nfs.mode.write_owner", FT_BOOLEAN, 32,
+ { &hf_nfs2_mode_write_owner, {
+ "Write permission for owner", "nfs.mode.write_owner", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0200, NULL, HFILL }},
- { &hf_nfs_mode_exec_owner, {
- "Read permission for owner", "nfs.mode.exec_owner", FT_BOOLEAN, 32,
+ { &hf_nfs2_mode_exec_owner, {
+ "Execute permission for owner", "nfs.mode.exec_owner", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 0100, NULL, HFILL }},
- { &hf_nfs_mode_read_group, {
+ { &hf_nfs2_mode_read_group, {
"Read permission for group", "nfs.mode.read_group", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 040, NULL, HFILL }},
- { &hf_nfs_mode_write_group, {
- "Read permission for group", "nfs.mode.write_group", FT_BOOLEAN, 32,
+ { &hf_nfs2_mode_write_group, {
+ "Write permission for group", "nfs.mode.write_group", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 020, NULL, HFILL }},
- { &hf_nfs_mode_exec_group, {
- "Read permission for group", "nfs.mode.exec_group", FT_BOOLEAN, 32,
+ { &hf_nfs2_mode_exec_group, {
+ "Execute permission for group", "nfs.mode.exec_group", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 010, NULL, HFILL }},
- { &hf_nfs_mode_read_other, {
+ { &hf_nfs2_mode_read_other, {
"Read permission for others", "nfs.mode.read_other", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 04, NULL, HFILL }},
- { &hf_nfs_mode_write_other, {
- "Read permission for others", "nfs.mode.write_other", FT_BOOLEAN, 32,
+ { &hf_nfs2_mode_write_other, {
+ "Write permission for others", "nfs.mode.write_other", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 02, NULL, HFILL }},
- { &hf_nfs_mode_exec_other, {
- "Read permission for others", "nfs.mode.exec_other", FT_BOOLEAN, 32,
+ { &hf_nfs2_mode_exec_other, {
+ "Execute permission for others", "nfs.mode.exec_other", FT_BOOLEAN, 32,
TFS(&tfs_yes_no), 01, NULL, HFILL }},
- { &hf_nfs_op_mask, {
+ { &hf_nfs4_op_mask, {
"op_mask", "nfs.op_mask", FT_UINT32, BASE_DEC,
- VALS(names_nfsv4_operation), 0, "Operation Mask", HFILL }},
+ VALS(names_nfs4_operation), 0, "Operation Mask", HFILL }},
- { &hf_nfs_sequence_status_flags, {
+ { &hf_nfs4_sequence_status_flags, {
"status flags", "nfs.sequence.flags", FT_UINT32, BASE_HEX,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_sequence_status_flags_cb_path_down, {
+ { &hf_nfs4_sequence_status_flags_cb_path_down, {
"SEQ4_STATUS_CB_PATH_DOWN", "nfs.sequence.flags.cb_path_down", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x00000001, NULL, HFILL}},
- { &hf_nfs_sequence_status_flags_cb_gss_contexts_expiring, {
- "SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING", "nfs.sequence.flags.cb_gss_contexts_expiring", FT_BOOLEAN, 32,
- TFS(&tfs_set_notset), 0x00000002, NULL, HFILL}},
+ { &hf_nfs4_sequence_status_flags_cb_gss_contexts_expiring, {
+ "SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING", "nfs.sequence.flags.cb_gss_contexts_expiring",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x00000002, NULL, HFILL}},
- { &hf_nfs_sequence_status_flags_cb_gss_contexts_expired, {
- "SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED", "nfs.sequence.flags.cb_gss_contexts_expired", FT_BOOLEAN, 32,
- TFS(&tfs_set_notset), 0x00000004, NULL, HFILL}},
+ { &hf_nfs4_sequence_status_flags_cb_gss_contexts_expired, {
+ "SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED", "nfs.sequence.flags.cb_gss_contexts_expired",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x00000004, NULL, HFILL}},
- { &hf_nfs_sequence_status_flags_expired_all_state_revoked, {
- "SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED", "nfs.sequence.flags.expired_all_state_revoked", FT_BOOLEAN, 32,
- TFS(&tfs_set_notset), 0x00000008, NULL, HFILL}},
+ { &hf_nfs4_sequence_status_flags_expired_all_state_revoked, {
+ "SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED", "nfs.sequence.flags.expired_all_state_revoked",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x00000008, NULL, HFILL}},
- { &hf_nfs_sequence_status_flags_expired_some_state_revoked, {
- "SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED", "nfs.sequence.flags.expired_some_state_revoked", FT_BOOLEAN, 32,
- TFS(&tfs_set_notset), 0x00000010, NULL, HFILL}},
+ { &hf_nfs4_sequence_status_flags_expired_some_state_revoked, {
+ "SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED", "nfs.sequence.flags.expired_some_state_revoked",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x00000010, NULL, HFILL}},
- { &hf_nfs_sequence_status_flags_admin_state_revoked, {
- "SEQ4_STATUS_ADMIN_STATE_REVOKED", "nfs.sequence.flags.admin_state_revoked", FT_BOOLEAN, 32,
- TFS(&tfs_set_notset), 0x00000020, NULL, HFILL}},
+ { &hf_nfs4_sequence_status_flags_admin_state_revoked, {
+ "SEQ4_STATUS_ADMIN_STATE_REVOKED", "nfs.sequence.flags.admin_state_revoked",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x00000020, NULL, HFILL}},
- { &hf_nfs_sequence_status_flags_recallable_state_revoked, {
- "SEQ4_STATUS_RECALLABLE_STATE_REVOKED", "nfs.sequence.flags.recallable_state_revoked", FT_BOOLEAN, 32,
- TFS(&tfs_set_notset), 0x00000040, NULL, HFILL}},
+ { &hf_nfs4_sequence_status_flags_recallable_state_revoked, {
+ "SEQ4_STATUS_RECALLABLE_STATE_REVOKED", "nfs.sequence.flags.recallable_state_revoked",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x00000040, NULL, HFILL}},
- { &hf_nfs_sequence_status_flags_lease_moved, {
+ { &hf_nfs4_sequence_status_flags_lease_moved, {
"SEQ4_STATUS_LEASE_MOVED", "nfs.sequence.flags.lease_moved", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x00000080, NULL, HFILL}},
- { &hf_nfs_sequence_status_flags_restart_reclaim_needed, {
- "SEQ4_STATUS_RESTART_RECLAIM_NEEDED", "nfs.sequence.flags.restart_reclaim_needed", FT_BOOLEAN, 32,
- TFS(&tfs_set_notset), 0x00000100, NULL, HFILL}},
+ { &hf_nfs4_sequence_status_flags_restart_reclaim_needed, {
+ "SEQ4_STATUS_RESTART_RECLAIM_NEEDED", "nfs.sequence.flags.restart_reclaim_needed",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x00000100, NULL, HFILL}},
- { &hf_nfs_sequence_status_flags_cb_path_down_session, {
- "SEQ4_STATUS_CB_PATH_DOWN_SESSION", "nfs.sequence.flags.cb_path_down_session", FT_BOOLEAN, 32,
- TFS(&tfs_set_notset), 0x00000200, NULL, HFILL}},
+ { &hf_nfs4_sequence_status_flags_cb_path_down_session, {
+ "SEQ4_STATUS_CB_PATH_DOWN_SESSION", "nfs.sequence.flags.cb_path_down_session",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x00000200, NULL, HFILL}},
- { &hf_nfs_sequence_status_flags_backchannel_fault, {
+ { &hf_nfs4_sequence_status_flags_backchannel_fault, {
"SEQ4_STATUS_BACKCHANNEL_FAULT", "nfs.sequence.flags.backchannel_fault", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x00000400, NULL, HFILL}},
- { &hf_nfs_sequence_status_flags_devid_changed, {
+ { &hf_nfs4_sequence_status_flags_devid_changed, {
"SEQ4_STATUS_DEVID_CHANGED", "nfs.sequence.flags.devid_changed", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x00000800, NULL, HFILL}},
- { &hf_nfs_sequence_status_flags_devid_deleted, {
+ { &hf_nfs4_sequence_status_flags_devid_deleted, {
"SEQ4_STATUS_DEVID_DELETED", "nfs.sequence.flags.devid_deleted", FT_BOOLEAN, 32,
TFS(&tfs_set_notset), 0x00001000, NULL, HFILL}},
- { &hf_nfs_test_stateid_arg4, {
+ { &hf_nfs4_test_stateid_arg, {
"Stateid List", "nfs.test_stateid.stateids",
FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL}},
- { &hf_nfs_test_stateid_res4, {
+ { &hf_nfs4_test_stateid_res, {
"Stateid Result List", "nfs.test_stateid.results",
FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL}},
/* Hidden field for v2, v3, and v4 status */
- { &hf_nfs_nfsstat, {
+ { &hf_nfs_status, {
"Status", "nfs.status", FT_UINT32, BASE_DEC,
VALS(names_nfs_nfsstat), 0, "Reply status", HFILL }}
};
@@ -12561,11 +12706,6 @@ proto_register_nfs(void)
&ett_nfs_fh_file,
&ett_nfs_fh_mount,
&ett_nfs_fh_export,
- &ett_nfsv4_fh_export,
- &ett_nfsv4_fh_file,
- &ett_nfsv4_fh_handle_type,
- &ett_nfsv4_fh_export_snapgen,
- &ett_nfsv4_fh_file_flags,
&ett_nfs_fh_xfsid,
&ett_nfs_fh_fn,
&ett_nfs_fh_xfn,
@@ -12573,181 +12713,185 @@ proto_register_nfs(void)
&ett_nfs_fh_auth,
&ett_nfs_fhandle,
&ett_nfs_timeval,
- &ett_nfs_mode,
&ett_nfs_fattr,
- &ett_nfs_sattr,
- &ett_nfs_diropargs,
+ &ett_nfs_fh_obj,
+ &ett_nfs_fh_ex,
&ett_nfs_readdir_entry,
- &ett_nfs_mode3,
- &ett_nfs_specdata3,
- &ett_nfs_fh3,
- &ett_nfs_nfstime3,
- &ett_nfs_fattr3,
- &ett_nfs_post_op_fh3,
- &ett_nfs_sattr3,
- &ett_nfs_diropargs3,
- &ett_nfs_sattrguard3,
- &ett_nfs_set_mode3,
- &ett_nfs_set_uid3,
- &ett_nfs_set_gid3,
- &ett_nfs_set_size3,
- &ett_nfs_set_atime,
- &ett_nfs_set_mtime,
- &ett_nfs_pre_op_attr,
- &ett_nfs_post_op_attr,
- &ett_nfs_wcc_attr,
- &ett_nfs_wcc_data,
- &ett_nfs_access3,
- &ett_nfs_fsinfo_properties,
- &ett_nfs_compound_call4,
&ett_nfs_utf8string,
- &ett_nfs_argop4,
- &ett_nfs_resop4,
- &ett_nfs_access4,
- &ett_nfs_access_supp4,
- &ett_nfs_close4,
- &ett_nfs_commit4,
- &ett_nfs_create4,
- &ett_nfs_delegpurge4,
- &ett_nfs_delegreturn4,
- &ett_nfs_getattr4,
- &ett_nfs_getattr4_args,
- &ett_nfs_getattr4_resp,
+
+ &ett_nfs2_mode,
+ &ett_nfs2_sattr,
+ &ett_nfs2_diropargs,
+
+ &ett_nfs3_gxfh_utlfield,
+ &ett_nfs3_gxfh_sfhfield,
+ &ett_nfs3_gxfh_sfhflags,
+ &ett_nfs3_mode,
+ &ett_nfs3_specdata,
+ &ett_nfs3_fh,
+ &ett_nfs3_nfstime,
+ &ett_nfs3_fattr,
+ &ett_nfs3_post_op_fh,
+ &ett_nfs3_sattr,
+ &ett_nfs3_diropargs,
+ &ett_nfs3_sattrguard,
+ &ett_nfs3_set_mode,
+ &ett_nfs3_set_uid,
+ &ett_nfs3_set_gid,
+ &ett_nfs3_set_size,
+ &ett_nfs3_set_atime,
+ &ett_nfs3_set_mtime,
+ &ett_nfs3_pre_op_attr,
+ &ett_nfs3_post_op_attr,
+ &ett_nfs3_wcc_attr,
+ &ett_nfs3_wcc_data,
+ &ett_nfs3_access,
+ &ett_nfs3_fsinfo_properties,
+
+ &ett_nfs4_fh_file,
+ &ett_nfs4_fh_file_flags,
+ &ett_nfs4_compound_call,
+ &ett_nfs4_request_op,
+ &ett_nfs4_response_op,
+ &ett_nfs4_access,
+ &ett_nfs4_access_supp,
+ &ett_nfs4_close,
+ &ett_nfs4_commit,
+ &ett_nfs4_create,
+ &ett_nfs4_delegpurge,
+ &ett_nfs4_delegreturn,
+ &ett_nfs4_getattr,
+ &ett_nfs4_getattr_args,
+ &ett_nfs4_getattr_resp,
&ett_nfs4_resok4,
&ett_nfs4_obj_attrs,
- &ett_nfs4_fattr4_new_attr_vals,
+ &ett_nfs4_fattr_new_attr_vals,
&ett_nfs4_fattr4_attrmask,
&ett_nfs4_attribute,
- &ett_nfs_getfh4,
- &ett_nfs_link4,
- &ett_nfs_lock4,
- &ett_nfs_lockt4,
- &ett_nfs_locku4,
- &ett_nfs_lookup4,
- &ett_nfs_lookupp4,
- &ett_nfs_nverify4,
- &ett_nfs_open4,
- &ett_nfs_openattr4,
- &ett_nfs_open_confirm4,
- &ett_nfs_open_downgrade4,
- &ett_nfs_putfh4,
- &ett_nfs_putpubfh4,
- &ett_nfs_putrootfh4,
- &ett_nfs_read4,
- &ett_nfs_readdir4,
- &ett_nfs_readlink4,
- &ett_nfs_test_stateid4,
- &ett_nfs_destroy_clientid4,
- &ett_nfs_reclaim_complete4,
- &ett_nfs_remove4,
- &ett_nfs_rename4,
- &ett_nfs_renew4,
- &ett_nfs_restorefh4,
- &ett_nfs_savefh4,
- &ett_nfs_setattr4,
- &ett_nfs_setclientid4,
- &ett_nfs_setclientid_confirm4,
- &ett_nfs_verify4,
- &ett_nfs_write4,
- &ett_nfs_release_lockowner4,
- &ett_nfs_backchannel_ctl4,
- &ett_nfs_bind_conn_to_session4,
- &ett_nfs_exchange_id4,
- &ett_nfs_create_session4,
- &ett_nfs_destroy_session4,
- &ett_nfs_free_stateid4,
- &ett_nfs_secinfo_no_name4,
- &ett_nfs_sequence4,
- &ett_nfs_layoutget4,
- &ett_nfs_layoutcommit4,
- &ett_nfs_layoutreturn4,
- &ett_nfs_getdevinfo4,
- &ett_nfs_getdevlist4,
- &ett_nfs_illegal4,
- &ett_nfs_verifier4,
- &ett_nfs_opaque,
- &ett_nfs_dirlist4,
- &ett_nfs_pathname4,
- &ett_nfs_change_info4,
- &ett_nfs_open_delegation4,
- &ett_nfs_open_claim4,
- &ett_nfs_opentype4,
- &ett_nfs_lock_owner4,
- &ett_nfs_cb_client4,
- &ett_nfs_client_id4,
- &ett_nfs_clientowner4,
- &ett_exchangeid_call_flags,
- &ett_exchangeid_reply_flags,
- &ett_server_owner4,
- &ett_nfs_bitmap4,
- &ett_nfs_attr_request,
- &ett_nfs_fattr4,
- &ett_nfs_fsid4,
- &ett_nfs_fs_locations4,
- &ett_nfs_fs_location4,
- &ett_nfs_open4_result_flags,
- &ett_nfs_secinfo4,
- &ett_nfs_secinfo4_flavor_info,
- &ett_nfs_stateid4,
- &ett_nfs_fattr4_fh_expire_type,
- &ett_nfs_ace4,
- &ett_nfs_clientaddr4,
- &ett_nfs_aceflag4,
- &ett_nfs_acemask4,
- &ett_nfs_gxfh3_utlfield,
- &ett_nfs_gxfh3_sfhfield,
- &ett_nfs_gxfh3_sfhflags,
- &ett_nfs_slotid4,
- &ett_nfs_sr_status4,
- &ett_nfs_serverscope4,
- &ett_nfs_minorid4,
- &ett_nfs_majorid4,
- &ett_nfs_persist4,
- &ett_nfs_backchan4,
- &ett_nfs_rdmamode4,
- &ett_nfs_padsize4,
- &ett_nfs_cbrenforce4,
- &ett_nfs_hashalg4,
- &ett_nfs_ssvlen4,
- &ett_nfs_maxreqsize4,
- &ett_nfs_maxrespsize4,
- &ett_nfs_maxrespsizecached4,
- &ett_nfs_maxops4,
- &ett_nfs_maxreqs4,
- &ett_nfs_streamchanattrs4,
- &ett_nfs_rdmachanattrs4,
- &ett_nfs_machinename4,
- &ett_nfs_flavor4,
- &ett_nfs_stamp4,
- &ett_nfs_uid4,
- &ett_nfs_gid4,
- &ett_nfs_service4,
- &ett_nfs_sessionid4,
- &ett_nfs_layoutseg,
- &ett_nfs_layoutseg_fh,
- &ett_nfs_fh_obj,
- &ett_nfs_fh_ex,
- &ett_nfs_cb_argop,
- &ett_nfs_cb_resop,
- &ett_nfs_cb_getattr,
- &ett_nfs_cb_recall,
- &ett_nfs_cb_layoutrecall,
- &ett_nfs_cb_pushdeleg,
- &ett_nfs_cb_recallany,
- &ett_nfs_cb_recallableobjavail,
- &ett_nfs_cb_recallslot,
- &ett_nfs_cb_sequence,
- &ett_nfs_cb_wantscancelled,
- &ett_nfs_cb_notifylock,
- &ett_nfs_cb_notifydeviceid,
- &ett_nfs_cb_notify,
- &ett_nfs_cb_reflists,
- &ett_nfs_cb_refcalls,
- &ett_nfs_cb_illegal,
- &ett_nfs_chan_attrs,
- &ett_create_session_flags,
- &ett_sequence_status_flags,
- &ett_nfs_want_notify_flags
+ &ett_nfs4_getfh,
+ &ett_nfs4_link,
+ &ett_nfs4_lock,
+ &ett_nfs4_lockt,
+ &ett_nfs4_locku,
+ &ett_nfs4_lookup,
+ &ett_nfs4_lookupp,
+ &ett_nfs4_nverify,
+ &ett_nfs4_open,
+ &ett_nfs4_openattr,
+ &ett_nfs4_open_confirm,
+ &ett_nfs4_open_downgrade,
+ &ett_nfs4_putfh,
+ &ett_nfs4_putpubfh,
+ &ett_nfs4_putrootfh,
+ &ett_nfs4_read,
+ &ett_nfs4_readdir,
+ &ett_nfs4_readlink,
+ &ett_nfs4_test_stateid,
+ &ett_nfs4_destroy_clientid,
+ &ett_nfs4_reclaim_complete,
+ &ett_nfs4_remove,
+ &ett_nfs4_rename,
+ &ett_nfs4_renew,
+ &ett_nfs4_restorefh,
+ &ett_nfs4_savefh,
+ &ett_nfs4_setattr,
+ &ett_nfs4_setclientid,
+ &ett_nfs4_setclientid_confirm,
+ &ett_nfs4_verify,
+ &ett_nfs4_write,
+ &ett_nfs4_release_lockowner,
+ &ett_nfs4_backchannel_ctl,
+ &ett_nfs4_bind_conn_to_session,
+ &ett_nfs4_exchange_id,
+ &ett_nfs4_create_session,
+ &ett_nfs4_destroy_session,
+ &ett_nfs4_free_stateid,
+ &ett_nfs4_secinfo_no_name,
+ &ett_nfs4_sequence,
+ &ett_nfs4_layoutget,
+ &ett_nfs4_layoutcommit,
+ &ett_nfs4_layoutreturn,
+ &ett_nfs4_getdevinfo,
+ &ett_nfs4_getdevlist,
+ &ett_nfs4_illegal,
+ &ett_nfs4_verifier,
+ &ett_nfs4_dirlist,
+ &ett_nfs4_pathname,
+ &ett_nfs4_change_info,
+ &ett_nfs4_open_delegation,
+ &ett_nfs4_open_claim,
+ &ett_nfs4_opentype,
+ &ett_nfs4_lock_owner,
+ &ett_nfs4_cb_client,
+ &ett_nfs4_client_id,
+ &ett_nfs4_clientowner,
+ &ett_nfs4_exchangeid_call_flags,
+ &ett_nfs4_exchangeid_reply_flags,
+ &ett_nfs4_server_owner,
+ &ett_nfs4_bitmap,
+ &ett_nfs4_attr_request,
+ &ett_nfs4_fattr,
+ &ett_nfs4_fsid,
+ &ett_nfs4_fs_locations,
+ &ett_nfs4_fs_location,
+ &ett_nfs4_open_result_flags,
+ &ett_nfs4_secinfo,
+ &ett_nfs4_secinfo_flavor_info,
+ &ett_nfs4_stateid,
+ &ett_nfs4_fattr_fh_expire_type,
+ &ett_nfs4_ace,
+ &ett_nfs4_clientaddr,
+ &ett_nfs4_aceflag,
+ &ett_nfs4_acemask,
+ &ett_nfs4_slotid,
+ &ett_nfs4_sr_status,
+ &ett_nfs4_serverscope,
+ &ett_nfs4_minorid,
+ &ett_nfs4_majorid,
+ &ett_nfs4_persist,
+ &ett_nfs4_backchan,
+ &ett_nfs4_rdmamode,
+ &ett_nfs4_padsize,
+ &ett_nfs4_cbrenforce,
+ &ett_nfs4_hashalg,
+ &ett_nfs4_ssvlen,
+ &ett_nfs4_maxreqsize,
+ &ett_nfs4_maxrespsize,
+ &ett_nfs4_maxrespsizecached,
+ &ett_nfs4_maxops,
+ &ett_nfs4_maxreqs,
+ &ett_nfs4_streamchanattrs,
+ &ett_nfs4_rdmachanattrs,
+ &ett_nfs4_machinename,
+ &ett_nfs4_flavor,
+ &ett_nfs4_stamp,
+ &ett_nfs4_uid,
+ &ett_nfs4_gid,
+ &ett_nfs4_service,
+ &ett_nfs4_sessionid,
+ &ett_nfs4_layoutseg,
+ &ett_nfs4_layoutseg_fh,
+ &ett_nfs4_cb_request_op,
+ &ett_nfs4_cb_resop,
+ &ett_nfs4_cb_getattr,
+ &ett_nfs4_cb_recall,
+ &ett_nfs4_cb_layoutrecall,
+ &ett_nfs4_cb_pushdeleg,
+ &ett_nfs4_cb_recallany,
+ &ett_nfs4_cb_recallableobjavail,
+ &ett_nfs4_cb_recallslot,
+ &ett_nfs4_cb_sequence,
+ &ett_nfs4_cb_wantscancelled,
+ &ett_nfs4_cb_notifylock,
+ &ett_nfs4_cb_notifydeviceid,
+ &ett_nfs4_cb_notify,
+ &ett_nfs4_cb_reflists,
+ &ett_nfs4_cb_refcalls,
+ &ett_nfs4_cb_illegal,
+ &ett_nfs4_chan_attrs,
+ &ett_nfs4_create_session_flags,
+ &ett_nfs4_sequence_status_flags,
+ &ett_nfs4_want_notify_flags
};
module_t *nfs_module;
@@ -12782,7 +12926,7 @@ proto_register_nfs(void)
"Display only 'significant' NFSv4 Operations in info Column",
"When enabled, shows only the significant NFSv4 Operations"
" in the info column. Others (like GETFH, PUTFH, etc) are not displayed",
- &display_major_nfsv4_ops);
+ &display_major_nfs4_ops);
nfs_fhandle_table = register_dissector_table("nfs_fhandle.type",
"NFS Filehandle types", FT_UINT8, BASE_HEX);
@@ -12811,9 +12955,9 @@ proto_reg_handoff_nfs(void)
rpc_init_prog(proto_nfs, NFS_PROGRAM, ett_nfs);
/* Register the procedure tables */
- rpc_init_proc_table(NFS_PROGRAM, 2, nfs2_proc, hf_nfs_procedure_v2);
- rpc_init_proc_table(NFS_PROGRAM, 3, nfs3_proc, hf_nfs_procedure_v3);
- rpc_init_proc_table(NFS_PROGRAM, 4, nfs4_proc, hf_nfs_procedure_v4);
+ rpc_init_proc_table(NFS_PROGRAM, 2, nfs2_proc, hf_nfs2_procedure);
+ rpc_init_proc_table(NFS_PROGRAM, 3, nfs3_proc, hf_nfs3_procedure);
+ rpc_init_proc_table(NFS_PROGRAM, 4, nfs4_proc, hf_nfs4_procedure);
fhandle_handle=create_dissector_handle(dissect_fhandle_data_SVR4, proto_nfs);
dissector_add_uint("nfs_fhandle.type", FHT_SVR4, fhandle_handle);
diff --git a/epan/dissectors/packet-nfs.h b/epan/dissectors/packet-nfs.h
index b8946ea398..9a4d9a904c 100644
--- a/epan/dissectors/packet-nfs.h
+++ b/epan/dissectors/packet-nfs.h
@@ -174,35 +174,23 @@
#define LAYOUT4_BLOCK_VOLUME 3
extern gboolean nfs_file_name_snooping;
-
-extern int dissect_fhandle(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
- const char *name, guint32 *hash);
-extern int dissect_nfs_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
- const char *name, guint32 *hash);
-
-int dissect_nfs_post_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
- const char* name);
-
-void nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len, int parent_offset, int parent_len, const char *name);
-
-
+extern void nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len,
+ int parent_offset, int parent_len, const char *name);
extern gboolean nfs_fhandle_reqrep_matching;
-
-void dissect_fhandle_hidden(packet_info *pinfo, proto_tree *tree, int frame);
-
-typedef int (diss_p)(tvbuff_t *tvb, int offset, proto_tree *tree, int hf);
-
-/* Used in packet-nfsacl.c for NFS_ACL dissection */
-extern int dissect_fattr(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, const char* label);
-
+extern int dissect_fhandle(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+ const char *name, guint32 *hash);
+extern void dissect_fhandle_hidden(packet_info *pinfo, proto_tree *tree, int frame);
+extern int dissect_nfs3_fh(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+ const char *name, guint32 *hash);
+extern int dissect_nfs3_post_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+ const char* name);
+extern int dissect_nfs2_fattr(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, const char* label);
extern int dissect_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree,
- int version, GString *optext);
-
-extern gint hf_nfs_nfsstat;
+ int version, GString *optext);
+extern int hf_nfs_status;
#endif /* packet-nfs.h */
diff --git a/epan/dissectors/packet-nfsacl.c b/epan/dissectors/packet-nfsacl.c
index 40336e3cc6..1b57908fa7 100644
--- a/epan/dissectors/packet-nfsacl.c
+++ b/epan/dissectors/packet-nfsacl.c
@@ -237,13 +237,13 @@ dissect_nfsacl2_getacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
status = tvb_get_ntohl(tvb, offset + 0);
- proto_tree_add_uint(tree, hf_nfs_nfsstat, tvb, offset + 0, 4, status);
+ proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4, status);
offset += 4;
if (status == ACL2_OK)
{
- offset = dissect_fattr(tvb, offset, tree, "attr");
+ offset = dissect_nfs2_fattr(tvb, offset, tree, "attr");
offset = dissect_nfsacl_secattr(tvb, offset, pinfo, tree);
}
@@ -268,12 +268,12 @@ dissect_nfsacl2_setacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
status = tvb_get_ntohl(tvb, offset + 0);
- proto_tree_add_uint(tree, hf_nfs_nfsstat, tvb, offset + 0, 4, status);
+ proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4, status);
offset += 4;
if (status == ACL2_OK)
- offset = dissect_fattr(tvb, offset, tree, "attr");
+ offset = dissect_nfs2_fattr(tvb, offset, tree, "attr");
return offset;
}
@@ -291,7 +291,7 @@ static int
dissect_nfsacl2_getattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- offset = dissect_fattr(tvb, offset, tree, "attr");
+ offset = dissect_nfs2_fattr(tvb, offset, tree, "attr");
return offset;
}
@@ -325,13 +325,13 @@ dissect_nfsacl2_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
status = tvb_get_ntohl(tvb, offset + 0);
- proto_tree_add_uint(tree, hf_nfs_nfsstat, tvb, offset + 0, 4, status);
+ proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4, status);
offset += 4;
if (status == ACL2_OK)
{
- offset = dissect_fattr(tvb, offset, tree, "attr");
+ offset = dissect_nfs2_fattr(tvb, offset, tree, "attr");
offset = dissect_access_reply(tvb, offset, pinfo, tree, 3, NULL);
}
@@ -356,14 +356,14 @@ dissect_nfsacl2_getxattrdir_reply(tvbuff_t *tvb, int offset,
status = tvb_get_ntohl(tvb, offset + 0);
- proto_tree_add_uint(tree, hf_nfs_nfsstat, tvb, offset + 0, 4, status);
+ proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4, status);
offset += 4;
if (status == ACL2_OK)
{
offset = dissect_fhandle(tvb, offset, pinfo, tree, "fhandle", NULL);
- offset = dissect_fattr(tvb, offset, tree, "attr");
+ offset = dissect_nfs2_fattr(tvb, offset, tree, "attr");
}
return offset;
@@ -398,7 +398,7 @@ static int
dissect_nfsacl3_getacl_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "fhandle", NULL);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "fhandle", NULL);
offset = dissect_nfsacl_mask(tvb, offset, tree);
return offset;
@@ -415,7 +415,7 @@ dissect_nfsacl3_getacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
status = tvb_get_ntohl(tvb, offset + 0);
if (tree)
- proto_tree_add_uint(tree, hf_nfs_nfsstat, tvb, offset + 0, 4,
+ proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4,
status);
offset += 4;
@@ -429,7 +429,7 @@ dissect_nfsacl3_getacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
if (entry_tree)
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, entry_tree, "attr");
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, entry_tree, "attr");
if (status != ACL3_OK)
return offset;
@@ -448,7 +448,7 @@ dissect_nfsacl3_setacl_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_item *acl_item = NULL;
proto_tree *acl_tree = NULL;
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "fhandle", NULL);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "fhandle", NULL);
if (tree)
{
@@ -472,12 +472,12 @@ dissect_nfsacl3_setacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
guint32 status = tvb_get_ntohl(tvb, offset + 0);
if (tree)
- proto_tree_add_uint(tree, hf_nfs_nfsstat, tvb, offset + 0, 4,
+ proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4,
status);
offset += 4;
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree, "attr");
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree, "attr");
return offset;
}
@@ -487,7 +487,7 @@ dissect_nfsacl3_getxattrdir_call(tvbuff_t *tvb, int offset,
packet_info *pinfo _U_, proto_tree *tree)
{
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "fhandle", NULL);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "fhandle", NULL);
offset = dissect_rpc_bool(tvb, tree, hf_nfsacl_create, offset);
return offset;
@@ -502,15 +502,15 @@ dissect_nfsacl3_getxattrdir_reply(tvbuff_t *tvb, int offset,
status = tvb_get_ntohl(tvb, offset + 0);
if (tree)
- proto_tree_add_uint(tree, hf_nfs_nfsstat, tvb, offset + 0, 4,
+ proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4,
status);
offset += 4;
if (status == ACL3_OK)
{
- offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "fhandle", NULL);
- offset = dissect_nfs_post_op_attr(tvb, offset, pinfo, tree, "attr");
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "fhandle", NULL);
+ offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree, "attr");
}
return offset;
diff --git a/epan/dissectors/packet-nlm.c b/epan/dissectors/packet-nlm.c
index 92e0e3074a..cbdf52f3d3 100644
--- a/epan/dissectors/packet-nlm.c
+++ b/epan/dissectors/packet-nlm.c
@@ -380,7 +380,7 @@ dissect_lock(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int version, i
offset = dissect_rpc_string(tvb,lock_tree,
hf_nlm_lock_caller_name, offset, NULL);
- offset = dissect_nfs_fh3(tvb, offset, pinfo, lock_tree, "fh", &fh_hash);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, lock_tree, "fh", &fh_hash);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " FH:0x%08x", fh_hash);
}
@@ -643,7 +643,7 @@ dissect_nlm_share(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_rpc_string(tvb,lock_tree,
hf_nlm_lock_caller_name, offset, NULL);
- offset = dissect_nfs_fh3(tvb, offset, pinfo, lock_tree, "fh", &fh_hash);
+ offset = dissect_nfs3_fh(tvb, offset, pinfo, lock_tree, "fh", &fh_hash);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " FH:0x%08x", fh_hash);
}