Add a separate hash table to the reassembly code for reassembled
[obnox/wireshark/wip.git] / packet-nfs.c
index 7b943b90b63e7bd5878373212e65172e40840ac0..46c175f138231096b3ecf7cd5f161ff804238bf3 100644 (file)
@@ -1,12 +1,11 @@
 /* packet-nfs.c
  * Routines for nfs dissection
  * Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
- * Copyright 2000-2001, Mike Frisch <frisch@hummingbird.com> (NFSv4 decoding)
- *
- * $Id: packet-nfs.c,v 1.52 2001/05/30 04:40:27 guy Exp $
+ * Copyright 2000-2002, Mike Frisch <frisch@hummingbird.com> (NFSv4 decoding)
+ * $Id: packet-nfs.c,v 1.69 2002/04/03 13:24:12 girlich Exp $
  *
  * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
  * Copyright 1998 Gerald Combs
  *
  * Copied from packet-smb.c
 
 #include "packet-rpc.h"
 #include "packet-nfs.h"
+#include "prefs.h"
 
 
 static int proto_nfs = -1;
 
+static int hf_nfs_fh_length = -1;
+static int hf_nfs_fh_hash = -1;
 static int hf_nfs_fh_fsid_major = -1;
 static int hf_nfs_fh_fsid_minor = -1;
+static int hf_nfs_fh_fsid_inode = -1;
 static int hf_nfs_fh_xfsid_major = -1;
 static int hf_nfs_fh_xfsid_minor = -1;
 static int hf_nfs_fh_fstype = -1;
@@ -63,8 +66,13 @@ static int hf_nfs_fh_xdev = -1;
 static int hf_nfs_fh_dirinode = -1;
 static int hf_nfs_fh_pinode = -1;
 static int hf_nfs_fh_hp_len = -1;
+static int hf_nfs_fh_version = -1;
+static int hf_nfs_fh_auth_type = -1;
+static int hf_nfs_fh_fsid_type = -1;
+static int hf_nfs_fh_fileid_type = -1;
 static int hf_nfs_stat = -1;
 static int hf_nfs_name = -1;
+static int hf_nfs_full_name = -1;
 static int hf_nfs_readlink_data = -1;
 static int hf_nfs_read_offset = -1;
 static int hf_nfs_read_count = -1;
@@ -116,6 +124,22 @@ static int hf_nfs_pathconf_case_insensitive = -1;
 static int hf_nfs_pathconf_case_preserving = -1;
 static int hf_nfs_data_follows = -1;
 
+static int hf_nfs_atime = -1;
+static int hf_nfs_atime_sec = -1;
+static int hf_nfs_atime_nsec = -1;
+static int hf_nfs_atime_usec = -1;
+static int hf_nfs_mtime = -1;
+static int hf_nfs_mtime_sec = -1;
+static int hf_nfs_mtime_nsec = -1;
+static int hf_nfs_mtime_usec = -1;
+static int hf_nfs_ctime = -1;
+static int hf_nfs_ctime_sec = -1;
+static int hf_nfs_ctime_nsec = -1;
+static int hf_nfs_ctime_usec = -1;
+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;
@@ -158,7 +182,6 @@ static int hf_nfs_linktext4 = -1;
 static int hf_nfs_tag4 = -1;
 static int hf_nfs_component4 = -1;
 static int hf_nfs_clientid4 = -1;
-static int hf_nfs_clientid4_verifier = -1;
 static int hf_nfs_ace4 = -1;
 static int hf_nfs_recall = -1;
 static int hf_nfs_open_claim_type4 = -1;
@@ -170,11 +193,11 @@ 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_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_expire_type = -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;
@@ -219,7 +242,7 @@ 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_locktype4 = -1;
+static int hf_nfs_lock_type4 = -1;
 static int hf_nfs_reclaim4 = -1;
 static int hf_nfs_length4 = -1;
 static int hf_nfs_changeid4 = -1;
@@ -247,13 +270,25 @@ 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_lock4_reclaim = -1;
 
 static gint ett_nfs = -1;
+static gint ett_nfs_fh_encoding = -1;
 static gint ett_nfs_fh_fsid = -1;
 static gint ett_nfs_fh_xfsid = -1;
 static gint ett_nfs_fh_fn = -1;
 static gint ett_nfs_fh_xfn = -1;
 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;
@@ -332,7 +367,7 @@ 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_lockowner4 = -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_bitmap4 = -1;
@@ -341,20 +376,381 @@ 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;
+
+
+/* file name snooping */
+gboolean nfs_file_name_snooping = FALSE;
+gboolean nfs_file_name_full_snooping = FALSE;
+typedef struct nfs_name_snoop {
+       int fh_length;
+       unsigned char *fh;
+       int name_len;
+       unsigned char *name;
+       int parent_len;
+       unsigned char *parent;
+       int full_name_len;
+       unsigned char *full_name;
+} nfs_name_snoop_t;
+
+typedef struct nfs_name_snoop_key {
+       int key;
+       int fh_length;
+       unsigned char *fh;
+} nfs_name_snoop_key_t;
+
+static GMemChunk *nfs_name_snoop_chunk = NULL;
+static int nfs_name_snoop_init_count = 100;
+static GHashTable *nfs_name_snoop_unmatched = NULL;
+
+static GMemChunk *nfs_name_snoop_key_chunk = NULL;
+static int nfs_name_snoop_key_init_count = 100;
+static GHashTable *nfs_name_snoop_matched = NULL;
+
+static GHashTable *nfs_name_snoop_known = NULL;
+
+static gint
+nfs_name_snoop_matched_equal(gconstpointer k1, gconstpointer k2)
+{
+       nfs_name_snoop_key_t *key1 = (nfs_name_snoop_key_t *)k1;
+       nfs_name_snoop_key_t *key2 = (nfs_name_snoop_key_t *)k2;
+
+       return (key1->key==key2->key)
+            &&(key1->fh_length==key2->fh_length)
+            &&(!memcmp(key1->fh, key2->fh, key1->fh_length));
+}
+static guint
+nfs_name_snoop_matched_hash(gconstpointer k)
+{
+       nfs_name_snoop_key_t *key = (nfs_name_snoop_key_t *)k;
+       int i;
+       int hash;
+
+       hash=key->key;
+       for(i=0;i<key->fh_length;i++)
+               hash ^= key->fh[i];
+
+       return hash;
+}
+static gint
+nfs_name_snoop_unmatched_equal(gconstpointer k1, gconstpointer k2)
+{
+       guint32 key1 = (guint32)k1;
+       guint32 key2 = (guint32)k2;
+
+       return key1==key2;
+}
+static guint
+nfs_name_snoop_unmatched_hash(gconstpointer k)
+{
+       guint32 key = (guint32)k;
+
+       return key;
+}
+static gboolean
+nfs_name_snoop_unmatched_free_all(gpointer key_arg _U_, gpointer value, gpointer user_data _U_)
+{
+       nfs_name_snoop_t *nns = (nfs_name_snoop_t *)value;
+
+       if(nns->name){
+               g_free((gpointer)nns->name);
+               nns->name=NULL;
+               nns->name_len=0;
+       }
+       if(nns->full_name){
+               g_free((gpointer)nns->full_name);
+               nns->full_name=NULL;
+               nns->full_name_len=0;
+       }
+       if(nns->parent){
+               g_free((gpointer)nns->parent);
+               nns->parent=NULL;
+               nns->parent_len=0;
+       }
+       if(nns->fh){
+               g_free((gpointer)nns->fh);
+               nns->fh=NULL;
+               nns->fh_length=0;
+       }
+       return TRUE;
+}
+
+static void
+nfs_name_snoop_init(void)
+{
+       if (nfs_name_snoop_unmatched != NULL) {
+               g_hash_table_foreach_remove(nfs_name_snoop_unmatched,
+                               nfs_name_snoop_unmatched_free_all, NULL);
+       } else {
+               /* The fragment table does not exist. Create it */
+               nfs_name_snoop_unmatched=g_hash_table_new(nfs_name_snoop_unmatched_hash,
+                       nfs_name_snoop_unmatched_equal);
+       }
+       if (nfs_name_snoop_matched != NULL) {
+               g_hash_table_foreach_remove(nfs_name_snoop_matched,
+                               nfs_name_snoop_unmatched_free_all, NULL);
+       } else {
+               /* The fragment table does not exist. Create it */
+               nfs_name_snoop_matched=g_hash_table_new(nfs_name_snoop_matched_hash,
+                       nfs_name_snoop_matched_equal);
+       }
+       if (nfs_name_snoop_known != NULL) {
+               g_hash_table_foreach_remove(nfs_name_snoop_known,
+                               nfs_name_snoop_unmatched_free_all, NULL);
+       } else {
+               /* The fragment table does not exist. Create it */
+               nfs_name_snoop_known=g_hash_table_new(nfs_name_snoop_matched_hash,
+                       nfs_name_snoop_matched_equal);
+       }
+
+       if(nfs_name_snoop_chunk){
+               g_mem_chunk_destroy(nfs_name_snoop_chunk);
+               nfs_name_snoop_chunk = NULL;
+       }
+       if(nfs_name_snoop_key_chunk){
+               g_mem_chunk_destroy(nfs_name_snoop_key_chunk);
+               nfs_name_snoop_key_chunk = NULL;
+       }
+
+       if(nfs_file_name_snooping){
+               nfs_name_snoop_chunk = g_mem_chunk_new("nfs_name_snoop_chunk",
+                       sizeof(nfs_name_snoop_t),
+                       nfs_name_snoop_init_count * sizeof(nfs_name_snoop_t),
+                       G_ALLOC_ONLY);
+               nfs_name_snoop_key_chunk = g_mem_chunk_new("nfs_name_snoop_key_chunk",
+                       sizeof(nfs_name_snoop_key_t),
+                       nfs_name_snoop_key_init_count * sizeof(nfs_name_snoop_key_t),
+                       G_ALLOC_ONLY);
+       }
+               
+}
+
+void
+nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len, int parent_offset, int parent_len, unsigned char *name)
+{
+       nfs_name_snoop_t *nns, *old_nns;
+       unsigned char *ptr=NULL;
+
+       /* filter out all '.' and '..' names */
+       if(!name){
+               ptr=(unsigned char *)tvb_get_ptr(tvb, name_offset, name_len);
+               if(ptr[0]=='.'){
+                       if(ptr[1]==0){
+                               return;
+                       }
+                       if(ptr[1]=='.'){
+                               if(ptr[2]==0){
+                                       return;
+                               }
+                       }
+               }
+       }
+
+       nns=g_mem_chunk_alloc(nfs_name_snoop_chunk);
+
+       nns->fh_length=0;
+       nns->fh=NULL;
+
+       if(parent_len){
+               nns->parent_len=parent_len;
+               nns->parent=g_malloc(parent_len);
+               memcpy(nns->parent, tvb_get_ptr(tvb, parent_offset, parent_len), parent_len);
+       } else {
+               nns->parent_len=0;
+               nns->parent=NULL;
+       }
+
+       nns->name_len=name_len;
+       if(name){
+               nns->name=name;
+       } else {
+               nns->name=g_malloc(name_len+1);
+               memcpy(nns->name, ptr, name_len);
+       }
+       nns->name[name_len]=0;
+
+       nns->full_name_len=0;
+       nns->full_name=NULL;
+
+       /* remove any old entry for this */
+       old_nns=g_hash_table_lookup(nfs_name_snoop_unmatched, (gconstpointer)xid);
+       if(old_nns){
+               /* if we havnt seen the reply yet, then there are no
+                  matched entries for it, thus we can dealloc the arrays*/
+               if(!old_nns->fh){
+                       g_free(old_nns->name);
+                       old_nns->name=NULL;
+                       old_nns->name_len=0;
+
+                       g_free(old_nns->parent);
+                       old_nns->parent=NULL;
+                       old_nns->parent_len=0;
+
+                       g_mem_chunk_free(nfs_name_snoop_chunk, old_nns);
+               }
+               g_hash_table_remove(nfs_name_snoop_unmatched, (gconstpointer)xid);
+       }
+
+       g_hash_table_insert(nfs_name_snoop_unmatched, (gpointer)xid, nns);
+}
+
+static void
+nfs_name_snoop_add_fh(int xid, tvbuff_t *tvb, int fh_offset, int fh_length)
+{
+       nfs_name_snoop_t *nns, *old_nns;
+       nfs_name_snoop_key_t *key;
+
+       /* find which request we correspond to */
+       nns=g_hash_table_lookup(nfs_name_snoop_unmatched, (gconstpointer)xid);
+       if(!nns){
+               /* oops couldnt find matching request, bail out */
+               return;
+       }
+
+       /* if we have already seen this response earlier */
+       if(nns->fh){
+               return;
+       }
+
+       /* oki, we have a new entry */
+       nns->fh=g_malloc(fh_length);
+       memcpy(nns->fh, tvb_get_ptr(tvb, fh_offset, fh_length), fh_length);
+       nns->fh_length=fh_length;
+       
+       key=g_mem_chunk_alloc(nfs_name_snoop_key_chunk);
+       key->key=0;
+       key->fh_length=nns->fh_length;
+       key->fh    =nns->fh;
+
+       /* already have something matched for this fh, remove it from
+          the table */
+       old_nns=g_hash_table_lookup(nfs_name_snoop_matched, key);
+       if(old_nns){
+               g_hash_table_remove(nfs_name_snoop_matched, key);
+       }
+
+       g_hash_table_remove(nfs_name_snoop_unmatched, (gconstpointer)xid);
+       g_hash_table_insert(nfs_name_snoop_matched, key, nns);
+}
+
+static void
+nfs_full_name_snoop(nfs_name_snoop_t *nns, int *len, unsigned char **name, unsigned char **pos)
+{
+       nfs_name_snoop_t *parent_nns = NULL;
+       nfs_name_snoop_key_t key;
+
+       /* check if the nns component ends with a '/' else we just allocate
+          an extra byte to len to accommodate for it later */
+       if(nns->name[nns->name_len-1]!='/'){
+               (*len)++;
+       }
+
+       (*len) += nns->name_len;
+
+       if(nns->parent==NULL){
+               *name = g_malloc((*len)+1);
+               *pos = *name;
+
+               strcpy(*pos, nns->name);
+               *pos += nns->name_len;
+               return;
+       }
+
+       key.key=0;
+       key.fh_length=nns->parent_len;
+       key.fh=nns->parent;
+
+       parent_nns=g_hash_table_lookup(nfs_name_snoop_matched, &key);
+
+       if(parent_nns){
+               nfs_full_name_snoop(parent_nns, len, name, pos);
+               if(*name){
+                       /* make sure components are '/' separated */
+                       if( (*pos)[-1] != '/'){
+                               **pos='/';
+                               (*pos)++;
+                               **pos=0;
+                       }
+                       strcpy(*pos, nns->name);
+                       *pos += nns->name_len;
+               }
+               return;
+       }
+
+       return;
+}
+
+static void
+nfs_name_snoop_fh(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int fh_offset, int fh_length)
+{
+       nfs_name_snoop_key_t key;
+       nfs_name_snoop_t *nns = NULL;
+
+       /* if this is a new packet, see if we can register the mapping */
+       if(!pinfo->fd->flags.visited){
+               key.key=0;
+               key.fh_length=fh_length;
+               key.fh=(unsigned char *)tvb_get_ptr(tvb, fh_offset, fh_length);
+
+               nns=g_hash_table_lookup(nfs_name_snoop_matched, &key);
+               if(nns){
+                       nfs_name_snoop_key_t *k;
+                       k=g_mem_chunk_alloc(nfs_name_snoop_key_chunk);
+                       k->key=pinfo->fd->num;
+                       k->fh_length=nns->fh_length;
+                       k->fh=nns->fh;
+                       g_hash_table_insert(nfs_name_snoop_known, k, nns);
+
+                       if(nfs_file_name_full_snooping){
+                               unsigned char *name=NULL, *pos=NULL;
+                               int len=0;
+
+                               nfs_full_name_snoop(nns, &len, &name, &pos);
+                               if(name){
+                                       nns->full_name=name;
+                                       nns->full_name_len=len;
+                               }
+                       }
+               }
+       }
+
+       /* see if we know this mapping */
+       if(!nns){
+               key.key=pinfo->fd->num;
+               key.fh_length=fh_length;
+               key.fh=(unsigned char *)tvb_get_ptr(tvb, fh_offset, fh_length);
+
+               nns=g_hash_table_lookup(nfs_name_snoop_known, &key);
+       }
+
+       /* if we know the mapping, print the filename */
+       if(nns){
+               proto_tree_add_string_format(tree, hf_nfs_name, tvb, 
+                       fh_offset, 0, nns->name, "Name: %s", nns->name);
+               if(nns->full_name){
+                       proto_tree_add_string_format(tree, hf_nfs_full_name, tvb, 
+                               fh_offset, 0, nns->name, "Full Name: %s", nns->full_name);
+               }
+       }
+}
 
 /* file handle dissection */
 
-#define FHT_UNKNOWN    0
-#define FHT_SVR4       1
+#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
 
-const value_string names_fhtype[] =
+static const value_string names_fhtype[] =
 {
-       {       FHT_UNKNOWN,    "unknown"       },
-       {       FHT_SVR4,       "System V R4"   },
-       {       FHT_LINUX_KNFSD_LE,     "Linux knfsd (little-endian)"   },
+       {       FHT_UNKNOWN,            "unknown"                               },
+       {       FHT_SVR4,               "System V R4"                           },
+       {       FHT_LINUX_KNFSD_LE,     "Linux knfsd (little-endian)"           },
        {       FHT_LINUX_NFSD_LE,      "Linux user-land nfsd (little-endian)"  },
+       {       FHT_LINUX_KNFSD_NEW,    "Linux knfsd (new)"                     },
        {       0,      NULL    }
 };
 
@@ -363,7 +759,7 @@ const value_string names_fhtype[] =
 
 static void
 dissect_fhandle_data_SVR4(tvbuff_t* tvb, int offset, proto_tree *tree,
-    int fhlen)
+    int fhlen _U_)
 {
        guint32 nof = offset;
 
@@ -514,7 +910,7 @@ dissect_fhandle_data_SVR4(tvbuff_t* tvb, int offset, proto_tree *tree,
 
 static void
 dissect_fhandle_data_LINUX_KNFSD_LE(tvbuff_t* tvb, int offset, proto_tree *tree,
-    int fhlen)
+    int fhlen _U_)
 {
        guint32 dentry;
        guint32 inode;
@@ -595,7 +991,7 @@ dissect_fhandle_data_LINUX_KNFSD_LE(tvbuff_t* tvb, int offset, proto_tree *tree,
 
 void
 dissect_fhandle_data_LINUX_NFSD_LE(tvbuff_t* tvb, int offset, proto_tree *tree,
-    int fhlen)
+    int fhlen _U_)
 {
        /* pseudo inode */
        {
@@ -638,6 +1034,202 @@ dissect_fhandle_data_LINUX_NFSD_LE(tvbuff_t* tvb, int offset, proto_tree *tree,
 }
 
 
+/* Checked with SuSE 7.1 (kernel 2.4.0 knfsd) */
+/* read linux-2.4.5/include/linux/nfsd/nfsfh.h for more details */
+
+#define AUTH_TYPE_NONE 0
+static const value_string auth_type_names[] = {
+       {       AUTH_TYPE_NONE,                         "no authentication"             },
+       {0,NULL}
+};
+
+#define FSID_TYPE_MAJOR_MINOR_INODE 0
+static const value_string fsid_type_names[] = {
+       {       FSID_TYPE_MAJOR_MINOR_INODE,            "major/minor/inode"             },
+       {0,NULL}
+};
+
+#define FILEID_TYPE_ROOT                       0
+#define FILEID_TYPE_INODE_GENERATION           1
+#define FILEID_TYPE_INODE_GENERATION_PARENT    2
+static const value_string fileid_type_names[] = {
+       {       FILEID_TYPE_ROOT,                       "root"                          },
+       {       FILEID_TYPE_INODE_GENERATION,           "inode/generation"              },
+       {       FILEID_TYPE_INODE_GENERATION_PARENT,    "inode/generation/parent"       },
+       {0,NULL}
+};
+
+static void
+dissect_fhandle_data_LINUX_KNFSD_NEW(tvbuff_t* tvb, int offset, proto_tree *tree,
+    int fhlen _U_)
+{
+       guint8 version;
+       guint8 auth_type;
+       guint8 fsid_type;
+       guint8 fileid_type;
+
+       version     = tvb_get_guint8(tvb, offset + 0);
+       if (tree) {
+               proto_tree_add_uint(tree, hf_nfs_fh_version,
+                       tvb, offset+0, 1, version);
+       }
+
+       switch (version) {
+               case 1: {
+                       auth_type   = tvb_get_guint8(tvb, offset + 1);
+                       fsid_type   = tvb_get_guint8(tvb, offset + 2);
+                       fileid_type = tvb_get_guint8(tvb, offset + 3);
+                       if (tree) {
+                               proto_item* encoding_item = proto_tree_add_text(tree, tvb,
+                                       offset + 1, 3,
+                                       "encoding: %u %u %u",
+                                       auth_type, fsid_type, fileid_type);
+                               if (encoding_item) {
+                                       proto_tree* encoding_tree = proto_item_add_subtree(encoding_item,
+                                               ett_nfs_fh_encoding);
+                                       if (encoding_tree) {
+                                               proto_tree_add_uint(encoding_tree, hf_nfs_fh_auth_type,
+                                                       tvb, offset+1, 1, auth_type);
+                                               proto_tree_add_uint(encoding_tree, hf_nfs_fh_fsid_type,
+                                                       tvb, offset+2, 1, fsid_type);
+                                               proto_tree_add_uint(encoding_tree, hf_nfs_fh_fileid_type,
+                                                       tvb, offset+3, 1, fileid_type);
+                                       }
+                               }
+                       }
+                       offset += 4;
+               } break;
+               default: {
+                       /* unknown version */
+                       goto out;
+               }
+       }
+               
+       switch (auth_type) {
+               case 0: {
+                       /* no authentication */
+                       if (tree) {
+                               proto_tree_add_text(tree, tvb,
+                                       offset + 0, 0,
+                                       "authentication: none");
+                       }
+               } break;
+               default: {
+                       /* unknown authentication type */
+                       goto out;
+               }
+       }
+
+       switch (fsid_type) {
+               case 0: {
+                       guint16 fsid_major;
+                       guint16 fsid_minor;
+                       guint32 fsid_inode;
+
+                       fsid_major = tvb_get_ntohs(tvb, offset + 0);
+                       fsid_minor = tvb_get_ntohs(tvb, offset + 2);
+                       fsid_inode = tvb_get_letohl(tvb, offset + 4);
+                       if (tree) {
+                               proto_item* fsid_item = proto_tree_add_text(tree, tvb,
+                                       offset+0, 8, 
+                                       "file system ID: %u,%u (inode %u)",
+                                       fsid_major, fsid_minor, fsid_inode);
+                               if (fsid_item) {
+                                       proto_tree* fsid_tree = proto_item_add_subtree(fsid_item, 
+                                               ett_nfs_fh_fsid);
+                                       if (fsid_tree) {
+                                               proto_tree_add_uint(fsid_tree, hf_nfs_fh_fsid_major,
+                                                       tvb, offset+0, 2, fsid_major);
+                                               proto_tree_add_uint(fsid_tree, hf_nfs_fh_fsid_minor,
+                                                       tvb, offset+2, 2, fsid_minor);
+                                               proto_tree_add_uint(fsid_tree, hf_nfs_fh_fsid_inode,
+                                                       tvb, offset+4, 4, fsid_inode);
+                                       }
+                               }
+                       }
+                       offset += 8;
+               } break;
+               default: {
+                       /* unknown fsid type */
+                       goto out;
+               }
+       }
+
+       switch (fileid_type) {
+               case 0: {
+                       if (tree) {
+                               proto_tree_add_text(tree, tvb,
+                                       offset+0, 0,
+                                       "file ID: root inode");
+                       }
+               } break;
+               case 1: {
+                       guint32 inode;
+                       guint32 generation;
+
+                       inode = tvb_get_letohl(tvb, offset + 0);
+                       generation = tvb_get_letohl(tvb, offset + 4);
+
+                       if (tree) {
+                               proto_item* fileid_item = proto_tree_add_text(tree, tvb,
+                                       offset+0, 8,
+                                       "file ID: %u (%u)",
+                                       inode, generation);
+                               if (fileid_item) {
+                                       proto_tree* fileid_tree = proto_item_add_subtree(
+                                               fileid_item, ett_nfs_fh_fn);
+                                       if (fileid_tree) {
+                                               proto_tree_add_uint(fileid_tree, hf_nfs_fh_fn_inode,
+                                               tvb, offset+0, 4, inode);
+                                               proto_tree_add_uint(fileid_tree, hf_nfs_fh_fn_generation,
+                                               tvb, offset+4, 4, generation);
+                                       }
+                               }
+                       }
+
+                       offset += 8;
+               } break;
+               case 2: {
+                       guint32 inode;
+                       guint32 generation;
+                       guint32 parent_inode;
+
+                       inode = tvb_get_letohl(tvb, offset + 0);
+                       generation = tvb_get_letohl(tvb, offset + 4);
+                       parent_inode = tvb_get_letohl(tvb, offset + 8);
+
+                       if (tree) {
+                                proto_item* fileid_item = proto_tree_add_text(tree, tvb,
+                                       offset+0, 8,
+                                       "file ID: %u (%u)",
+                                       inode, generation);
+                               if (fileid_item) {
+                                       proto_tree* fileid_tree = proto_item_add_subtree(
+                                               fileid_item, ett_nfs_fh_fn);
+                                       if (fileid_tree) {
+                                               proto_tree_add_uint(fileid_tree, hf_nfs_fh_fn_inode,
+                                               tvb, offset+0, 4, inode);
+                                               proto_tree_add_uint(fileid_tree, hf_nfs_fh_fn_generation,
+                                               tvb, offset+4, 4, generation);
+                                               proto_tree_add_uint(fileid_tree, hf_nfs_fh_dirinode,
+                                               tvb, offset+8, 4, parent_inode);
+                                       }
+                               }
+                       }
+
+                       offset += 12;
+               } break;
+               default: {
+                       /* unknown fileid type */
+                       goto out;
+               }
+       }
+
+out:
+       ;
+}
+
+
 static void
 dissect_fhandle_data_unknown(tvbuff_t *tvb, int offset, proto_tree *tree,
     int fhlen)
@@ -666,18 +1258,48 @@ dissect_fhandle_data_unknown(tvbuff_t *tvb, int offset, proto_tree *tree,
 
 static void
 dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
-    proto_tree *tree, int fhlen)
+    proto_tree *tree, unsigned int fhlen)
 {
-       int fhtype = FHT_UNKNOWN;
+       unsigned int fhtype = FHT_UNKNOWN;
 
        /* filehandle too long */
        if (fhlen>64) goto type_ready;
        /* Not all bytes there. Any attempt to deduce the type would be
           senseless. */
        if (!tvb_bytes_exist(tvb,offset,fhlen)) goto type_ready;
+
+       /* create a semiunique hash value for the filehandle */
+       {
+               guint32 fhhash;
+               guint32 i;
+
+               for(fhhash=0,i=0;i<(fhlen-3);i+=4){
+                       fhhash ^= tvb_get_ntohl(tvb, offset+i);
+               }
+               proto_tree_add_uint(tree, hf_nfs_fh_hash, tvb, offset, fhlen,
+                       fhhash);
+       }
+       if(nfs_file_name_snooping){
+               nfs_name_snoop_fh(pinfo, tree, tvb, offset, fhlen);
+       }
                
        /* calculate (heuristically) fhtype */
        switch (fhlen) {
+               case 12: {
+                       if (tvb_get_ntohl(tvb,offset) == 0x01000000) {
+                               fhtype=FHT_LINUX_KNFSD_NEW;
+                       }
+               } break;
+               case 20: {
+                       if (tvb_get_ntohl(tvb,offset) == 0x01000001) {
+                               fhtype=FHT_LINUX_KNFSD_NEW;
+                       }
+               } break;
+               case 24: {
+                       if (tvb_get_ntohl(tvb,offset) == 0x01000002) {
+                               fhtype=FHT_LINUX_KNFSD_NEW;
+                       }
+               } break;
                case 32: {
                        guint32 len1;
                        guint32 len2;
@@ -735,6 +1357,10 @@ type_ready:
                        dissect_fhandle_data_LINUX_NFSD_LE (tvb, offset, tree,
                            fhlen);
                break;
+               case FHT_LINUX_KNFSD_NEW:
+                       dissect_fhandle_data_LINUX_KNFSD_NEW (tvb, offset, tree,
+                           fhlen);
+               break;
                case FHT_UNKNOWN:
                default:
                        dissect_fhandle_data_unknown(tvb, offset, tree, fhlen);
@@ -829,6 +1455,12 @@ const value_string names_nfs_stat4[] = {
        {       10029,  "NFS4ERR_SYMLINK"                                       },
        {       10030,  "NFS4ERR_READDIR_NOSPC"                 },
        {       10031,  "NFS4ERR_LEASE_MOVED"                   },
+       {       10032,  "NFS4ERR_ATTRNOTSUPP"                   },
+       {       10033,  "NFS4ERR_NO_GRACE"                              },
+       {       10034,  "NFS4ERR_RECLAIM_BAD"                   },
+       {       10035,  "NFS4ERR_RECLAIM_CONFLICT"              },
+       {       10036,  "NFS4ERR_BADXDR"                                        },
+       {       10037,  "NFS4ERR_LOCKS_HELD"                            },
        { 0, NULL }
 };
 
@@ -837,7 +1469,7 @@ const value_string names_nfs_stat4[] = {
  * well as being backwards compatible with NFSv2 and NFSv3.
  */
 int
-dissect_stat_internal(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_stat_internal(tvbuff_t *tvb, int offset,
        proto_tree *tree, guint32* status, int nfsvers)
 {
        guint32 stat;
@@ -854,43 +1486,45 @@ dissect_stat_internal(tvbuff_t *tvb, int offset, packet_info *pinfo,
        }
 
        offset += 4;
-       *status = stat;
+
+       if (status) *status = stat;
+
        return offset;
 }
 
 
 /* RFC 1094, Page 12..14 */
 int
-dissect_stat(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+dissect_stat(tvbuff_t *tvb, int offset, proto_tree *tree,
        guint32 *status)
 {
-       return dissect_stat_internal(tvb, offset, pinfo, tree, status, !4);
+       return dissect_stat_internal(tvb, offset, tree, status, !4);
 }
 
 
 /* RFC 1094, Page 12..14 */
 int
-dissect_nfs2_stat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree)
+dissect_nfs2_stat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree* tree)
 {
        guint32 status;
 
-       offset = dissect_stat(tvb, offset, pinfo, tree, &status);
+       offset = dissect_stat(tvb, offset, tree, &status);
 
        return offset;
 }
 
 
 int
-dissect_nfs_nfsstat4(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_nfs_nfsstat4(tvbuff_t *tvb, int offset,
        proto_tree *tree, guint32 *status)
 {
-       return dissect_stat_internal(tvb, offset, pinfo, tree, status, 4);
+       return dissect_stat_internal(tvb, offset, tree, status, 4);
 }
 
 
 /* RFC 1094, Page 15 */
 int
-dissect_ftype(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+dissect_ftype(tvbuff_t *tvb, int offset, proto_tree *tree,
 char* name)
 {
        guint32 ftype;
@@ -935,8 +1569,32 @@ dissect_fhandle(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
                        ftree = proto_item_add_subtree(fitem, ett_nfs_fhandle);
        }
 
-       if (ftree)
-               dissect_fhandle_data(tvb, offset, pinfo, ftree, FHSIZE);
+       /* are we snooping fh to filenames ?*/
+       if((!pinfo->fd->flags.visited) && nfs_file_name_snooping){
+               rpc_call_info_value *civ=pinfo->private_data;
+
+               /* NFS v2 LOOKUP, CREATE, MKDIR calls might give us a mapping*/
+               if( (civ->prog==100003)
+                 &&(civ->vers==2)
+                 &&(!civ->request)
+                 &&((civ->proc==4)||(civ->proc==9)||(civ->proc==14))
+               ) {
+                       nfs_name_snoop_add_fh(civ->xid, tvb, 
+                               offset, 32);
+               }
+
+               /* MOUNT v1,v2 MNT replies might give us a filehandle*/
+               if( (civ->prog==100005)
+                 &&(civ->proc==1)
+                 &&((civ->vers==1)||(civ->vers==2))
+                 &&(!civ->request)
+               ) {
+                       nfs_name_snoop_add_fh(civ->xid, tvb, 
+                               offset, 32);
+               }
+       }
+
+       dissect_fhandle_data(tvb, offset, pinfo, ftree, FHSIZE);
 
        offset += FHSIZE;
        return offset;
@@ -954,29 +1612,32 @@ dissect_nfs2_fhandle_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t
 
 /* RFC 1094, Page 15 */
 int
-dissect_timeval(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char* name)
+dissect_timeval(tvbuff_t *tvb, int offset, proto_tree *tree, int hf_time, int hf_time_sec, int hf_time_usec)
 {
        guint32 seconds;
-       guint32 mseconds;
+       guint32 useconds;
+       nstime_t ts;
 
        proto_item* time_item;
        proto_tree* time_tree = NULL;
 
        seconds = tvb_get_ntohl(tvb, offset+0);
-       mseconds = tvb_get_ntohl(tvb, offset+4);
-       
+       useconds = tvb_get_ntohl(tvb, offset+4);
+       ts.secs = seconds;
+       ts.nsecs = useconds*1000;
+
        if (tree) {
-               time_item = proto_tree_add_text(tree, tvb, offset, 8,
-                       "%s: %u.%06u", name, seconds, mseconds);
+               time_item = proto_tree_add_time(tree, hf_time, tvb, offset, 8,
+                               &ts);
                if (time_item)
                        time_tree = proto_item_add_subtree(time_item, ett_nfs_timeval);
        }
 
        if (time_tree) {
-               proto_tree_add_text(time_tree, tvb,offset+0,4,
-                                       "seconds: %u", seconds);
-               proto_tree_add_text(time_tree, tvb,offset+4,4,
-                                       "micro seconds: %u", mseconds);
+               proto_tree_add_uint(time_tree, hf_time_sec, tvb, offset, 4,
+                                       seconds);
+               proto_tree_add_uint(time_tree, hf_time_usec, tvb, offset+4, 4,
+                                       useconds);
        }
        offset += 8;
        return offset;
@@ -995,7 +1656,7 @@ const value_string nfs2_mode_names[] = {
 };
 
 int
-dissect_mode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+dissect_mode(tvbuff_t *tvb, int offset, proto_tree *tree,
 char* name)
 {
        guint32 mode;
@@ -1048,32 +1709,33 @@ char* name)
 
 /* RFC 1094, Page 15 */
 int
-dissect_fattr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char* name)
+dissect_fattr(tvbuff_t *tvb, int offset, proto_tree *tree, char* name)
 {
        proto_item* fattr_item = NULL;
        proto_tree* fattr_tree = NULL;
        int old_offset = offset;
 
        if (tree) {
-               fattr_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s", name);
+               fattr_item = proto_tree_add_text(tree, tvb, offset, -1,
+                       "%s", name);
                fattr_tree = proto_item_add_subtree(fattr_item, ett_nfs_fattr);
        }
 
-       offset = dissect_ftype(tvb, offset, pinfo, fattr_tree, "type");
-       offset = dissect_mode(tvb, offset, pinfo, fattr_tree, "mode");
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, fattr_tree, hf_nfs_fattr_nlink, offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, fattr_tree, hf_nfs_fattr_uid, offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, fattr_tree, hf_nfs_fattr_gid, offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, fattr_tree, hf_nfs_fattr_size, offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, fattr_tree, hf_nfs_fattr_blocksize, offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, fattr_tree, hf_nfs_fattr_rdev, offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, fattr_tree, hf_nfs_fattr_blocks, offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, fattr_tree, hf_nfs_fattr_fsid, offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, fattr_tree, hf_nfs_fattr_fileid, offset);
-       offset = dissect_timeval(tvb, offset, pinfo, fattr_tree, "atime");
-       offset = dissect_timeval(tvb, offset, pinfo, fattr_tree, "mtime");
-       offset = dissect_timeval(tvb, offset, pinfo, fattr_tree, "ctime");
+       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);
 
        /* now we know, that fattr is shorter */
        if (fattr_item) {
@@ -1086,27 +1748,27 @@ dissect_fattr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, c
 
 /* RFC 1094, Page 17 */
 int
-dissect_sattr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, char* name)
+dissect_sattr(tvbuff_t *tvb, int offset, proto_tree *tree, char* name)
 {
        proto_item* sattr_item = NULL;
        proto_tree* sattr_tree = NULL;
        int old_offset = offset;
 
        if (tree) {
-               sattr_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s", name);
+               sattr_item = proto_tree_add_text(tree, tvb, offset, -1,
+                       "%s", name);
                sattr_tree = proto_item_add_subtree(sattr_item, ett_nfs_sattr);
        }
 
        if (tvb_get_ntohl(tvb, offset+0) != 0xffffffff)
-               offset = dissect_mode(tvb, offset, pinfo, sattr_tree, "mode");
+               offset = dissect_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(tvb, pinfo, sattr_tree, hf_nfs_fattr_uid,
+               offset = dissect_rpc_uint32(tvb, sattr_tree, hf_nfs_fattr_uid,
                        offset);
        else {
                proto_tree_add_text(sattr_tree, tvb, offset, 4, "uid: no value");
@@ -1114,7 +1776,7 @@ dissect_sattr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, c
        }
 
        if (tvb_get_ntohl(tvb, offset+0) != 0xffffffff)
-               offset = dissect_rpc_uint32_tvb(tvb, pinfo, sattr_tree, hf_nfs_fattr_gid,
+               offset = dissect_rpc_uint32(tvb, sattr_tree, hf_nfs_fattr_gid,
                        offset);
        else {
                proto_tree_add_text(sattr_tree, tvb, offset, 4, "gid: no value");
@@ -1122,23 +1784,23 @@ dissect_sattr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, c
        }
 
        if (tvb_get_ntohl(tvb, offset+0) != 0xffffffff)
-               offset = dissect_rpc_uint32_tvb(tvb, pinfo, sattr_tree, hf_nfs_fattr_size,
+               offset = dissect_rpc_uint32(tvb, sattr_tree, hf_nfs_fattr_size,
                        offset);
        else {
                proto_tree_add_text(sattr_tree, tvb, offset, 4, "size: no value");
                offset += 4;
        }
 
-       if (tvb_get_ntohl(tvb, offset+0) != 0xffffffff)
-               offset = dissect_timeval(tvb, offset, pinfo, sattr_tree, "atime");
-       else {
+       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);
+       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, pinfo, sattr_tree, "mtime");
-       else {
+       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);
+       else {
                proto_tree_add_text(sattr_tree, tvb, offset, 8, "mtime: no value");
                offset += 8;
        }
@@ -1154,32 +1816,32 @@ dissect_sattr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, c
 
 /* RFC 1094, Page 17 */
 int
-dissect_filename(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_filename(tvbuff_t *tvb, int offset,
     proto_tree *tree, int hf, char **string_ret)
 {
-       offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf, offset, string_ret);
+       offset = dissect_rpc_string(tvb, tree, hf, offset, string_ret);
        return offset;
 }
 
 
 /* RFC 1094, Page 17 */
 int
-dissect_path(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf)
+dissect_path(tvbuff_t *tvb, int offset, proto_tree *tree, int hf)
 {
-       offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf, offset, NULL);
+       offset = dissect_rpc_string(tvb, tree, hf, offset, NULL);
        return offset;
 }
 
 
 /* RFC 1094, Page 17,18 */
 int
-dissect_attrstat(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree){
+dissect_attrstat(tvbuff_t *tvb, int offset, proto_tree *tree){
        guint32 status;
 
-       offset = dissect_stat(tvb, offset, pinfo, tree, &status);
+       offset = dissect_stat(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_fattr(tvb, offset, pinfo, tree, "attributes");
+                       offset = dissect_fattr(tvb, offset, tree, "attributes");
                break;
                default:
                        /* do nothing */
@@ -1192,9 +1854,9 @@ dissect_attrstat(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
 
 /* RFC 1094, Page 17,18 */
 int
-dissect_nfs2_attrstat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree)
+dissect_nfs2_attrstat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree* tree)
 {
-       offset = dissect_attrstat(tvb, offset, pinfo, tree);
+       offset = dissect_attrstat(tvb, offset, tree);
 
        return offset;
 }
@@ -1209,13 +1871,29 @@ dissect_diropargs(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
        int old_offset = offset;
 
        if (tree) {
-               diropargs_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s", name);
+               diropargs_item = proto_tree_add_text(tree, tvb, offset, -1,
+                       "%s", name);
                diropargs_tree = proto_item_add_subtree(diropargs_item, ett_nfs_diropargs);
        }
 
+       /* are we snooping fh to filenames ?*/
+       if((!pinfo->fd->flags.visited) && nfs_file_name_snooping){
+               /* v2 LOOKUP, CREATE, MKDIR calls might give us a mapping*/
+               rpc_call_info_value *civ=pinfo->private_data;
+
+               if( (civ->prog==100003)
+                 &&(civ->vers==2)
+                 &&(civ->request)
+                 &&((civ->proc==4)||(civ->proc==9)||(civ->proc==14))
+               ) {
+                       nfs_name_snoop_add_name(civ->xid, tvb, 
+                               offset+36, tvb_get_ntohl(tvb, offset+32),
+                               offset, 32, NULL);
+               }
+       }
+
        offset = dissect_fhandle (tvb,offset,pinfo,diropargs_tree,"dir");
-       offset = dissect_filename(tvb,offset,pinfo,diropargs_tree,hf_nfs_name,NULL);
+       offset = dissect_filename(tvb,offset,      diropargs_tree,hf_nfs_name,NULL);
 
        /* now we know, that diropargs is shorter */
        if (diropargs_item) {
@@ -1242,11 +1920,11 @@ dissect_diropres(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
 {
        guint32 status;
 
-       offset = dissect_stat(tvb, offset, pinfo, tree, &status);
+       offset = dissect_stat(tvb, offset, tree, &status);
        switch (status) {
                case 0:
                        offset = dissect_fhandle(tvb, offset, pinfo, tree, "file");
-                       offset = dissect_fattr  (tvb, offset, pinfo, tree, "attributes");
+                       offset = dissect_fattr  (tvb, offset, tree, "attributes");
                break;
                default:
                        /* do nothing */
@@ -1259,10 +1937,10 @@ dissect_diropres(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
 
 /* nfsdata is simply a chunk of RPC opaque data (length, data, fill bytes) */
 int
-dissect_nfsdata(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_nfsdata(tvbuff_t *tvb, int offset,
        proto_tree *tree, int hf)
 {
-       offset = dissect_rpc_data_tvb(tvb, pinfo, tree, hf, offset);
+       offset = dissect_rpc_data(tvb, tree, hf, offset);
        return offset;
 }
 
@@ -1283,7 +1961,7 @@ dissect_nfs2_setattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree *tree)
 {
        offset = dissect_fhandle(tvb, offset, pinfo, tree, "file"      );
-       offset = dissect_sattr  (tvb, offset, pinfo, tree, "attributes");
+       offset = dissect_sattr  (tvb, offset,        tree, "attributes");
 
        return offset;
 }
@@ -1291,15 +1969,15 @@ dissect_nfs2_setattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1094, Page 6 */
 int
-dissect_nfs2_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_nfs2_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_
        proto_tree *tree)
 {
        guint32 status;
 
-       offset = dissect_stat(tvb, offset, pinfo, tree, &status);
+       offset = dissect_stat(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_path(tvb, offset, pinfo, tree, hf_nfs_readlink_data);
+                       offset = dissect_path(tvb, offset, tree, hf_nfs_readlink_data);
                break;
                default:
                        /* do nothing */
@@ -1339,16 +2017,16 @@ dissect_nfs2_read_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1094, Page 7 */
 int
-dissect_nfs2_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_nfs2_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_
        proto_tree* tree)
 {
        guint32 status;
 
-       offset = dissect_stat(tvb, offset, pinfo, tree, &status);
+       offset = dissect_stat(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_fattr(tvb, offset, pinfo, tree, "attributes");
-                       offset = dissect_nfsdata(tvb, offset, pinfo, tree, hf_nfs_data); 
+                       offset = dissect_fattr(tvb, offset, tree, "attributes");
+                       offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_data); 
                break;
                default:
                        /* do nothing */
@@ -1382,7 +2060,7 @@ dissect_nfs2_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        }
        offset += 12;
 
-       offset = dissect_nfsdata(tvb, offset, pinfo, tree, hf_nfs_data); 
+       offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_data); 
 
        return offset;
 }
@@ -1394,7 +2072,7 @@ dissect_nfs2_createargs_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree *tree)
 {
        offset = dissect_diropargs(tvb, offset, pinfo, tree, "where"     );
-       offset = dissect_sattr    (tvb, offset, pinfo, tree, "attributes");
+       offset = dissect_sattr    (tvb, offset,        tree, "attributes");
 
        return offset;
 }
@@ -1430,8 +2108,8 @@ dissect_nfs2_symlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree *tree)
 {
        offset = dissect_diropargs(tvb, offset, pinfo, tree, "from"           );
-       offset = dissect_path     (tvb, offset, pinfo, tree, hf_nfs_symlink_to);
-       offset = dissect_sattr    (tvb, offset, pinfo, tree, "attributes"     );
+       offset = dissect_path     (tvb, offset,        tree, hf_nfs_symlink_to);
+       offset = dissect_sattr    (tvb, offset,        tree, "attributes"     );
 
        return offset;
 }
@@ -1462,7 +2140,7 @@ dissect_nfs2_readdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1094, Page 11 */
 int
-dissect_readdir_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_readdir_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_
        proto_tree* tree)
 {
        proto_item* entry_item = NULL;
@@ -1474,7 +2152,7 @@ dissect_readdir_entry(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        if (tree) {
                entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, tvb,
-                       offset+0, tvb_length_remaining(tvb, offset), FALSE);
+                       offset+0, -1, FALSE);
                entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
        }
 
@@ -1484,7 +2162,7 @@ dissect_readdir_entry(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        offset+0, 4, fileid);
        offset += 4;
 
-       offset = dissect_filename(tvb, offset, pinfo, entry_tree,
+       offset = dissect_filename(tvb, offset, entry_tree,
                hf_nfs_readdir_entry_name, &name);
        if (entry_item)
                proto_item_set_text(entry_item, "Entry: file ID %u, name %s",
@@ -1513,10 +2191,10 @@ dissect_nfs2_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
        guint32 status;
        guint32 eof_value;
 
-       offset = dissect_stat(tvb, offset, pinfo, tree, &status);
+       offset = dissect_stat(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_rpc_list_tvb(tvb, pinfo, tree, offset, 
+                       offset = dissect_rpc_list(tvb, pinfo, tree, offset, 
                                dissect_readdir_entry);
                        eof_value = tvb_get_ntohl(tvb, offset+0);
                        if (tree)
@@ -1535,7 +2213,7 @@ dissect_nfs2_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1094, Page 12 */
 int
-dissect_nfs2_statfs_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs2_statfs_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
@@ -1545,7 +2223,7 @@ dissect_nfs2_statfs_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
        guint32 bfree;
        guint32 bavail;
 
-       offset = dissect_stat(tvb, offset, pinfo, tree, &status);
+       offset = dissect_stat(tvb, offset, tree, &status);
        switch (status) {
                case 0:
                        tsize  = tvb_get_ntohl(tvb, offset+ 0);
@@ -1627,26 +2305,26 @@ static const vsff nfs2_proc[] = {
 
 /* RFC 1813, Page 15 */
 int
-dissect_filename3(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_filename3(tvbuff_t *tvb, int offset,
     proto_tree *tree, int hf, char **string_ret)
 {
-       offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf, offset, string_ret);
+       offset = dissect_rpc_string(tvb, tree, hf, offset, string_ret);
        return offset;
 }
 
 
 /* RFC 1813, Page 15 */
 int
-dissect_nfspath3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_nfspath3(tvbuff_t *tvb, int offset,
        proto_tree *tree, int hf)
 {
-       offset = dissect_rpc_string_tvb(tvb, pinfo, tree, hf, offset, NULL);
+       offset = dissect_rpc_string(tvb, tree, hf, offset, NULL);
        return offset;
 }
 
 /* RFC 1813, Page 15 */
 int
-dissect_cookieverf3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_cookieverf3(tvbuff_t *tvb, int offset,
        proto_tree *tree)
 {
        proto_tree_add_text(tree, tvb, offset, NFS3_COOKIEVERFSIZE,
@@ -1658,7 +2336,7 @@ dissect_cookieverf3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 16 */
 int
-dissect_createverf3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_createverf3(tvbuff_t *tvb, int offset,
        proto_tree *tree)
 {
        proto_tree_add_text(tree, tvb, offset, NFS3_CREATEVERFSIZE,
@@ -1670,7 +2348,7 @@ dissect_createverf3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 16 */
 int
-dissect_writeverf3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_writeverf3(tvbuff_t *tvb, int offset,
        proto_tree *tree)
 {
        proto_tree_add_text(tree, tvb, offset, NFS3_WRITEVERFSIZE,
@@ -1681,7 +2359,7 @@ dissect_writeverf3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 16 */
 int
-dissect_mode3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+dissect_mode3(tvbuff_t *tvb, int offset, proto_tree *tree,
        char* name)
 {
        guint32 mode3;
@@ -1767,7 +2445,7 @@ const value_string names_nfs_nfsstat3[] =
 
 /* RFC 1813, Page 16 */
 int
-dissect_nfsstat3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_nfsstat3(tvbuff_t *tvb, int offset,
        proto_tree *tree,guint32 *status)
 {
        guint32 nfsstat3;
@@ -1800,7 +2478,7 @@ const value_string names_nfs_ftype3[] =
 
 /* RFC 1813, Page 20 */
 int
-dissect_ftype3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+dissect_ftype3(tvbuff_t *tvb, int offset, proto_tree *tree,
        int hf, guint32* ftype3)
 {
        guint32 type;
@@ -1819,7 +2497,7 @@ dissect_ftype3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
 
 /* RFC 1813, Page 20 */
 int
-dissect_specdata3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_specdata3(tvbuff_t *tvb, int offset,
        proto_tree *tree, char* name)
 {
        guint32 specdata1;
@@ -1859,8 +2537,9 @@ dissect_nfs_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo,
        guint fh3_len;
        guint fh3_len_full;
        guint fh3_fill;
-       proto_item* fitem;
+       proto_item* fitem = NULL;
        proto_tree* ftree = NULL;
+       int fh_offset,fh_length;
 
        fh3_len = tvb_get_ntohl(tvb, offset+0);
        fh3_len_full = rpc_roundup(fh3_len);
@@ -1873,11 +2552,39 @@ dissect_nfs_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        ftree = proto_item_add_subtree(fitem, ett_nfs_fh3);
        }
 
-       if (ftree) {
-               proto_tree_add_text(ftree, tvb, offset+0, 4,
-                                       "length: %u", fh3_len);
-               dissect_fhandle_data(tvb, offset+4, pinfo, ftree, fh3_len);
+       /* are we snooping fh to filenames ?*/
+       if((!pinfo->fd->flags.visited) && nfs_file_name_snooping){
+               rpc_call_info_value *civ=pinfo->private_data;
+
+               /* NFS v3 LOOKUP, CREATE, MKDIR calls might give us a mapping*/
+               if( (civ->prog==100003)
+                 &&(civ->vers==3)
+                 &&(!civ->request)
+                 &&((civ->proc==3)||(civ->proc==8)||(civ->proc==9))
+               ) {
+                       fh_length=tvb_get_ntohl(tvb, offset);
+                       fh_offset=offset+4;
+                       nfs_name_snoop_add_fh(civ->xid, tvb, 
+                               fh_offset, fh_length);
+               }
+
+               /* MOUNT v3 MNT replies might give us a filehandle */
+               if( (civ->prog==100005)
+                 &&(civ->vers==3)
+                 &&(!civ->request)
+                 &&(civ->proc==1)
+               ) {
+                       fh_length=tvb_get_ntohl(tvb, offset);
+                       fh_offset=offset+4;
+                       nfs_name_snoop_add_fh(civ->xid, tvb, 
+                               fh_offset, fh_length);
+               }
        }
+
+       proto_tree_add_uint(ftree, hf_nfs_fh_length, tvb, offset+0, 4,
+                       fh3_len);
+       dissect_fhandle_data(tvb, offset+4, pinfo, ftree, fh3_len);
+
        offset += 4 + fh3_len_full;
        return offset;
 }
@@ -1885,30 +2592,33 @@ dissect_nfs_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 21 */
 int
-dissect_nfstime3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
-       proto_tree *tree,char* name)
+dissect_nfstime3(tvbuff_t *tvb, int offset,
+       proto_tree *tree, int hf_time, int hf_time_sec, int hf_time_nsec)
 {
        guint32 seconds;
        guint32 nseconds;
+       nstime_t ts;
 
        proto_item* time_item;
        proto_tree* time_tree = NULL;
 
        seconds = tvb_get_ntohl(tvb, offset+0);
        nseconds = tvb_get_ntohl(tvb, offset+4);
+       ts.secs = seconds;
+       ts.nsecs = nseconds;
        
        if (tree) {
-               time_item = proto_tree_add_text(tree, tvb, offset, 8,
-                       "%s: %u.%09u", name, seconds, nseconds);
+               time_item = proto_tree_add_time(tree, hf_time, tvb, offset, 8,
+                               &ts);
                if (time_item)
                        time_tree = proto_item_add_subtree(time_item, ett_nfs_nfstime3);
        }
 
        if (time_tree) {
-               proto_tree_add_text(time_tree, tvb,offset+0,4,
-                                       "seconds: %u", seconds);
-               proto_tree_add_text(time_tree, tvb,offset+4,4,
-                                       "nano seconds: %u", nseconds);
+               proto_tree_add_uint(time_tree, hf_time_sec, tvb, offset, 4,
+                                       seconds);
+               proto_tree_add_uint(time_tree, hf_time_nsec, tvb, offset+4, 4,
+                                       nseconds);
        }
        offset += 8;
        return offset;
@@ -1917,7 +2627,7 @@ dissect_nfstime3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 22 */
 int
-dissect_fattr3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+dissect_fattr3(tvbuff_t *tvb, int offset, proto_tree *tree,
        char* name)
 {
        proto_item* fattr3_item = NULL;
@@ -1926,31 +2636,31 @@ dissect_fattr3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
        guint32 type;
 
        if (tree) {
-               fattr3_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s", name);
+               fattr3_item = proto_tree_add_text(tree, tvb, offset, -1,
+                       "%s", name);
                fattr3_tree = proto_item_add_subtree(fattr3_item, ett_nfs_fattr3);
        }
 
-       offset = dissect_ftype3(tvb,offset,pinfo,fattr3_tree,hf_nfs_fattr3_type,&type);
-       offset = dissect_mode3(tvb,offset,pinfo,fattr3_tree,"mode");
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, fattr3_tree, hf_nfs_fattr3_nlink,
+       offset = dissect_ftype3(tvb,offset,fattr3_tree,hf_nfs_fattr3_type,&type);
+       offset = dissect_mode3(tvb,offset,fattr3_tree,"mode");
+       offset = dissect_rpc_uint32(tvb, fattr3_tree, hf_nfs_fattr3_nlink,
                offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, fattr3_tree, hf_nfs_fattr3_uid,
+       offset = dissect_rpc_uint32(tvb, fattr3_tree, hf_nfs_fattr3_uid,
                offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, fattr3_tree, hf_nfs_fattr3_gid,
+       offset = dissect_rpc_uint32(tvb, fattr3_tree, hf_nfs_fattr3_gid,
                offset);
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, fattr3_tree, hf_nfs_fattr3_size, 
+       offset = dissect_rpc_uint64(tvb, fattr3_tree, hf_nfs_fattr3_size, 
                offset);
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, fattr3_tree, hf_nfs_fattr3_used,
+       offset = dissect_rpc_uint64(tvb, fattr3_tree, hf_nfs_fattr3_used,
                offset);
-       offset = dissect_specdata3(tvb,offset,pinfo,fattr3_tree,"rdev");
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, fattr3_tree, hf_nfs_fattr3_fsid,
+       offset = dissect_specdata3(tvb,offset,fattr3_tree,"rdev");
+       offset = dissect_rpc_uint64(tvb, fattr3_tree, hf_nfs_fattr3_fsid,
                offset);
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, fattr3_tree, hf_nfs_fattr3_fileid,
+       offset = dissect_rpc_uint64(tvb, fattr3_tree, hf_nfs_fattr3_fileid,
                offset);
-       offset = dissect_nfstime3 (tvb,offset,pinfo,fattr3_tree,"atime");
-       offset = dissect_nfstime3 (tvb,offset,pinfo,fattr3_tree,"mtime");
-       offset = dissect_nfstime3 (tvb,offset,pinfo,fattr3_tree,"ctime");
+       offset = dissect_nfstime3 (tvb,offset,fattr3_tree,hf_nfs_atime,hf_nfs_atime_sec,hf_nfs_atime_nsec);
+       offset = dissect_nfstime3 (tvb,offset,fattr3_tree,hf_nfs_mtime,hf_nfs_mtime_sec,hf_nfs_mtime_nsec);
+       offset = dissect_nfstime3 (tvb,offset,fattr3_tree,hf_nfs_ctime,hf_nfs_ctime_sec,hf_nfs_ctime_nsec);
 
        /* now we know, that fattr3 is shorter */
        if (fattr3_item) {
@@ -1971,7 +2681,7 @@ const value_string value_follows[] =
 
 /* RFC 1813, Page 23 */
 int
-dissect_post_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_post_op_attr(tvbuff_t *tvb, int offset,
        proto_tree *tree, char* name)
 {
        proto_item* post_op_attr_item = NULL;
@@ -1980,8 +2690,8 @@ dissect_post_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo,
        guint32 attributes_follow;
 
        if (tree) {
-               post_op_attr_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s", name);
+               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);
        }
@@ -1993,7 +2703,7 @@ dissect_post_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo,
        offset += 4;
        switch (attributes_follow) {
                case TRUE:
-                       offset = dissect_fattr3(tvb, offset, pinfo, post_op_attr_tree,
+                       offset = dissect_fattr3(tvb, offset, post_op_attr_tree,
                                        "attributes");
                break;
                case FALSE:
@@ -2012,7 +2722,7 @@ dissect_post_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 24 */
 int
-dissect_wcc_attr(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_wcc_attr(tvbuff_t *tvb, int offset,
        proto_tree *tree, char* name)
 {
        proto_item* wcc_attr_item = NULL;
@@ -2020,17 +2730,16 @@ dissect_wcc_attr(tvbuff_t *tvb, int offset, packet_info *pinfo,
        int old_offset = offset;
 
        if (tree) {
-               wcc_attr_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s", 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);
        }
 
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, wcc_attr_tree, hf_nfs_wcc_attr_size, 
+       offset = dissect_rpc_uint64(tvb, wcc_attr_tree, hf_nfs_wcc_attr_size, 
                offset);
-       offset = dissect_nfstime3(tvb, offset, pinfo, wcc_attr_tree, "mtime");
-       offset = dissect_nfstime3(tvb, offset, pinfo, wcc_attr_tree, "ctime");
-       
+       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);
@@ -2042,7 +2751,7 @@ dissect_wcc_attr(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 24 */
 int
-dissect_pre_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_pre_op_attr(tvbuff_t *tvb, int offset,
        proto_tree *tree, char* name)
 {
        proto_item* pre_op_attr_item = NULL;
@@ -2051,8 +2760,8 @@ dissect_pre_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo,
        guint32 attributes_follow;
 
        if (tree) {
-               pre_op_attr_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s", name);
+               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);
        }
@@ -2064,7 +2773,7 @@ dissect_pre_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo,
        offset += 4;
        switch (attributes_follow) {
                case TRUE:
-                       offset = dissect_wcc_attr(tvb, offset, pinfo, pre_op_attr_tree,
+                       offset = dissect_wcc_attr(tvb, offset, pre_op_attr_tree,
                                        "attributes");
                break;
                case FALSE:
@@ -2083,7 +2792,7 @@ dissect_pre_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 24 */
 int
-dissect_wcc_data(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_wcc_data(tvbuff_t *tvb, int offset,
        proto_tree *tree, char* name)
 {
        proto_item* wcc_data_item = NULL;
@@ -2091,14 +2800,14 @@ dissect_wcc_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
        int old_offset = offset;
 
        if (tree) {
-               wcc_data_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s", name);
+               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);
        }
 
-       offset = dissect_pre_op_attr (tvb, offset, pinfo, wcc_data_tree, "before");
-       offset = dissect_post_op_attr(tvb, offset, pinfo, wcc_data_tree, "after" );
+       offset = dissect_pre_op_attr (tvb, offset, wcc_data_tree, "before");
+       offset = dissect_post_op_attr(tvb, offset, wcc_data_tree, "after" );
 
        /* now we know, that wcc_data is shorter */
        if (wcc_data_item) {
@@ -2120,8 +2829,8 @@ dissect_post_op_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo,
        guint32 handle_follows;
 
        if (tree) {
-               post_op_fh3_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s", name);
+               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);
        }
@@ -2152,7 +2861,7 @@ dissect_post_op_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 25 */
 int
-dissect_set_mode3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_set_mode3(tvbuff_t *tvb, int offset,
        proto_tree *tree, char* name)
 {
        proto_item* set_mode3_item = NULL;
@@ -2165,9 +2874,8 @@ dissect_set_mode3(tvbuff_t *tvb, int offset, packet_info *pinfo,
        set_it_name = val_to_str(set_it,value_follows,"Unknown");
 
        if (tree) {
-               set_mode3_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s: %s",
-                       name, set_it_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);
        }
@@ -2180,7 +2888,7 @@ dissect_set_mode3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        switch (set_it) {
                case 1:
-                       offset = dissect_mode3(tvb, offset, pinfo, set_mode3_tree,
+                       offset = dissect_mode3(tvb, offset, set_mode3_tree,
                                        "mode");
                break;
                default:
@@ -2199,7 +2907,7 @@ dissect_set_mode3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 26 */
 int
-dissect_set_uid3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_set_uid3(tvbuff_t *tvb, int offset,
        proto_tree *tree, char* name)
 {
        proto_item* set_uid3_item = NULL;
@@ -2212,9 +2920,8 @@ dissect_set_uid3(tvbuff_t *tvb, int offset, packet_info *pinfo,
        set_it_name = val_to_str(set_it,value_follows,"Unknown");
 
        if (tree) {
-               set_uid3_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s: %s",
-                       name, set_it_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);
        }
@@ -2227,7 +2934,7 @@ dissect_set_uid3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        switch (set_it) {
                case 1:
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, set_uid3_tree,
+                       offset = dissect_rpc_uint32(tvb, set_uid3_tree,
                                                                 hf_nfs_uid3, offset);
                break;
                default:
@@ -2246,7 +2953,7 @@ dissect_set_uid3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 26 */
 int
-dissect_set_gid3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_set_gid3(tvbuff_t *tvb, int offset,
        proto_tree *tree, char* name)
 {
        proto_item* set_gid3_item = NULL;
@@ -2259,9 +2966,8 @@ dissect_set_gid3(tvbuff_t *tvb, int offset, packet_info *pinfo,
        set_it_name = val_to_str(set_it,value_follows,"Unknown");
 
        if (tree) {
-               set_gid3_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s: %s",
-                       name, set_it_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);
        }
@@ -2274,7 +2980,7 @@ dissect_set_gid3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        switch (set_it) {
                case 1:
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, set_gid3_tree, 
+                       offset = dissect_rpc_uint32(tvb, set_gid3_tree, 
                                hf_nfs_gid3, offset);
                break;
                default:
@@ -2293,7 +2999,7 @@ dissect_set_gid3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 26 */
 int
-dissect_set_size3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_set_size3(tvbuff_t *tvb, int offset,
        proto_tree *tree, char* name)
 {
        proto_item* set_size3_item = NULL;
@@ -2306,9 +3012,8 @@ dissect_set_size3(tvbuff_t *tvb, int offset, packet_info *pinfo,
        set_it_name = val_to_str(set_it,value_follows,"Unknown");
 
        if (tree) {
-               set_size3_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s: %s",
-                       name, set_it_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);
        }
@@ -2321,7 +3026,7 @@ dissect_set_size3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        switch (set_it) {
                case 1:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, set_size3_tree,
+                       offset = dissect_rpc_uint64(tvb, set_size3_tree,
                                hf_nfs_set_size3_size, offset);
                break;
                default:
@@ -2354,7 +3059,7 @@ const value_string time_how[] =
 
 /* RFC 1813, Page 26 */
 int
-dissect_set_atime(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_set_atime(tvbuff_t *tvb, int offset,
        proto_tree *tree, char* name)
 {
        proto_item* set_atime_item = NULL;
@@ -2367,9 +3072,8 @@ dissect_set_atime(tvbuff_t *tvb, int offset, packet_info *pinfo,
        set_it_name = val_to_str(set_it,time_how,"Unknown");
 
        if (tree) {
-               set_atime_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s: %s",
-                       name, set_it_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);
        }
@@ -2382,9 +3086,10 @@ dissect_set_atime(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        switch (set_it) {
                case SET_TO_CLIENT_TIME:
-                       if (set_atime_item)
-                       offset = dissect_nfstime3(tvb, offset, pinfo, set_atime_tree,
-                                       "atime");
+                       if (set_atime_item) {
+                               offset = dissect_nfstime3(tvb, offset, set_atime_tree,
+                                       hf_nfs_atime, hf_nfs_atime_sec, hf_nfs_atime_nsec);
+                       }
                break;
                default:
                        /* void */
@@ -2402,7 +3107,7 @@ dissect_set_atime(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 26 */
 int
-dissect_set_mtime(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_set_mtime(tvbuff_t *tvb, int offset,
        proto_tree *tree, char* name)
 {
        proto_item* set_mtime_item = NULL;
@@ -2415,9 +3120,8 @@ dissect_set_mtime(tvbuff_t *tvb, int offset, packet_info *pinfo,
        set_it_name = val_to_str(set_it,time_how,"Unknown");
 
        if (tree) {
-               set_mtime_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s: %s",
-                       name, set_it_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);
        }
@@ -2430,9 +3134,10 @@ dissect_set_mtime(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        switch (set_it) {
                case SET_TO_CLIENT_TIME:
-                       if (set_mtime_item)
-                       offset = dissect_nfstime3(tvb, offset, pinfo, set_mtime_tree,
-                                       "atime");
+                       if (set_mtime_item) {
+                               offset = dissect_nfstime3(tvb, offset, set_mtime_tree,
+                                       hf_nfs_atime, hf_nfs_atime_sec, hf_nfs_atime_nsec);
+                       }
                break;
                default:
                        /* void */
@@ -2450,7 +3155,7 @@ dissect_set_mtime(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 25..27 */
 int
-dissect_sattr3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+dissect_sattr3(tvbuff_t *tvb, int offset, proto_tree *tree,
        char* name)
 {
        proto_item* sattr3_item = NULL;
@@ -2458,17 +3163,17 @@ dissect_sattr3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
        int old_offset = offset;
 
        if (tree) {
-               sattr3_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s", name);
+               sattr3_item = proto_tree_add_text(tree, tvb, offset, -1,
+                       "%s", name);
                sattr3_tree = proto_item_add_subtree(sattr3_item, ett_nfs_sattr3);
        }
 
-       offset = dissect_set_mode3(tvb, offset, pinfo, sattr3_tree, "mode");
-       offset = dissect_set_uid3 (tvb, offset, pinfo, sattr3_tree, "uid");
-       offset = dissect_set_gid3 (tvb, offset, pinfo, sattr3_tree, "gid");
-       offset = dissect_set_size3(tvb, offset, pinfo, sattr3_tree, "size");
-       offset = dissect_set_atime(tvb, offset, pinfo, sattr3_tree, "atime");
-       offset = dissect_set_mtime(tvb, offset, pinfo, sattr3_tree, "mtime");
+       offset = dissect_set_mode3(tvb, offset, sattr3_tree, "mode");
+       offset = dissect_set_uid3 (tvb, offset, sattr3_tree, "uid");
+       offset = dissect_set_gid3 (tvb, offset, sattr3_tree, "gid");
+       offset = dissect_set_size3(tvb, offset, sattr3_tree, "size");
+       offset = dissect_set_atime(tvb, offset, sattr3_tree, "atime");
+       offset = dissect_set_mtime(tvb, offset, sattr3_tree, "mtime");
 
        /* now we know, that sattr3 is shorter */
        if (sattr3_item) {
@@ -2487,18 +3192,41 @@ dissect_diropargs3(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_item* diropargs3_item = NULL;
        proto_tree* diropargs3_tree = NULL;
        int old_offset = offset;
+       int parent_offset, parent_len;
+       int name_offset, name_len;
 
        if (tree) {
-               diropargs3_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s", name);
+               diropargs3_item = proto_tree_add_text(tree, tvb, offset, -1,
+                       "%s", name);
                diropargs3_tree = proto_item_add_subtree(diropargs3_item, 
                        ett_nfs_diropargs3);
        }
 
+       parent_offset=offset+4;
+       parent_len=tvb_get_ntohl(tvb, offset);
        offset = dissect_nfs_fh3(tvb, offset, pinfo, diropargs3_tree, "dir");
-       offset = dissect_filename3(tvb, offset, pinfo, diropargs3_tree, 
+       name_offset=offset+4;
+       name_len=tvb_get_ntohl(tvb, offset);
+       offset = dissect_filename3(tvb, offset, diropargs3_tree, 
                hf_nfs_name, NULL);
 
+       /* are we snooping fh to filenames ?*/
+       if((!pinfo->fd->flags.visited) && nfs_file_name_snooping){
+               /* v3 LOOKUP, CREATE, MKDIR calls might give us a mapping*/
+               rpc_call_info_value *civ=pinfo->private_data;
+
+               if( (civ->prog==100003)
+                 &&(civ->vers==3)
+                 &&(civ->request)
+                 &&((civ->proc==3)||(civ->proc==8)||(civ->proc==9))
+               ) {
+                       nfs_name_snoop_add_name(civ->xid, tvb, 
+                               name_offset, name_len,
+                               parent_offset, parent_len, NULL);
+               }
+       }
+
+
        /* now we know, that diropargs3 is shorter */
        if (diropargs3_item) {
                proto_item_set_len(diropargs3_item, offset - old_offset);
@@ -2521,7 +3249,7 @@ dissect_nfs3_diropargs3_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 40 */
 int
-dissect_access(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
+dissect_access(tvbuff_t *tvb, int offset, proto_tree *tree,
        char* name)
 {
        guint32 access;
@@ -2567,20 +3295,6 @@ dissect_nfs3_nfs_fh3_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 }
 
 
-/* generic NFS3 reply dissector */
-int
-dissect_nfs3_any_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, 
-       proto_tree* tree)
-{
-       guint32 status;
-
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
-
-       return offset;
-
-}
-
-
 /* RFC 1813, Page 32,33 */
 int
 dissect_nfs3_getattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo, 
@@ -2593,15 +3307,15 @@ dissect_nfs3_getattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 32,33 */
 int
-dissect_nfs3_getattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_nfs3_getattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_
        proto_tree* tree)
 {
        guint32 status;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_fattr3(tvb, offset, pinfo, tree, "obj_attributes");
+                       offset = dissect_fattr3(tvb, offset, tree, "obj_attributes");
                break;
                default:
                        /* void */
@@ -2614,7 +3328,7 @@ dissect_nfs3_getattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 33 */
 int
-dissect_sattrguard3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_sattrguard3(tvbuff_t *tvb, int offset,
        proto_tree* tree, char *name)
 {
        proto_item* sattrguard3_item = NULL;
@@ -2627,9 +3341,8 @@ dissect_sattrguard3(tvbuff_t *tvb, int offset, packet_info *pinfo,
        check_name = val_to_str(check,value_follows,"Unknown");
 
        if (tree) {
-               sattrguard3_item = proto_tree_add_text(tree, tvb, offset,
-                       tvb_length_remaining(tvb, offset), "%s: %s",
-                       name, check_name);
+               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);
        }
@@ -2642,8 +3355,8 @@ dissect_sattrguard3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        switch (check) {
                case TRUE:
-                       offset = dissect_nfstime3(tvb, offset, pinfo, sattrguard3_tree,
-                                       "obj_ctime");
+                       offset = dissect_nfstime3(tvb, offset, sattrguard3_tree,
+                                       hf_nfs_ctime, hf_nfs_ctime_sec, hf_nfs_ctime_nsec);
                break;
                case FALSE:
                        /* void */
@@ -2665,26 +3378,26 @@ dissect_nfs3_setattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree* tree)
 {
        offset = dissect_nfs_fh3    (tvb, offset, pinfo, tree, "object");
-       offset = dissect_sattr3     (tvb, offset, pinfo, tree, "new_attributes");
-       offset = dissect_sattrguard3(tvb, offset, pinfo, tree, "guard");
+       offset = dissect_sattr3     (tvb, offset,        tree, "new_attributes");
+       offset = dissect_sattrguard3(tvb, offset,        tree, "guard");
        return offset;
 }
 
 
 /* RFC 1813, Page 33..36 */
 int
-dissect_nfs3_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs3_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_wcc_data(tvb, offset, pinfo, tree, "obj_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "obj_wcc");
                break;
                default:
-                       offset = dissect_wcc_data(tvb, offset, pinfo, tree, "obj_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "obj_wcc");
                break;
        }
                
@@ -2709,17 +3422,17 @@ dissect_nfs3_lookup_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
 {
        guint32 status;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
                        offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "object");
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "obj_attributes");
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "dir_attributes");
                break;
                default:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "dir_attributes");
                break;
        }
@@ -2734,7 +3447,7 @@ dissect_nfs3_access_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree* tree)
 {
        offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "object");
-       offset = dissect_access (tvb, offset, pinfo, tree, "access");
+       offset = dissect_access (tvb, offset,        tree, "access");
 
        return offset;
 }
@@ -2742,20 +3455,20 @@ dissect_nfs3_access_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 40..43 */
 int
-dissect_nfs3_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs3_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "obj_attributes");
-                       offset = dissect_access(tvb, offset, pinfo, tree, "access");
+                       offset = dissect_access(tvb, offset, tree, "access");
                break;
                default:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "obj_attributes");
                break;
        }
@@ -2766,21 +3479,21 @@ dissect_nfs3_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 44,45 */
 int
-dissect_nfs3_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs3_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "symlink_attributes");
-                       offset = dissect_nfspath3(tvb, offset, pinfo, tree, 
+                       offset = dissect_nfspath3(tvb, offset, tree, 
                                hf_nfs_readlink_data);
                break;
                default:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "symlink_attributes");
                break;
        }
@@ -2795,8 +3508,8 @@ dissect_nfs3_read_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree* tree)
 {
        offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "file");
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_offset3, offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_count3, offset);
+       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_offset3, offset);
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3, offset);
 
        return offset;
 }
@@ -2804,24 +3517,24 @@ dissect_nfs3_read_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 46..48 */
 int
-dissect_nfs3_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs3_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "file_attributes");
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_count3, 
+                       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3, 
                                offset);
-                       offset = dissect_rpc_bool_tvb(tvb, pinfo, tree, hf_nfs_read_eof, 
+                       offset = dissect_rpc_bool(tvb, tree, hf_nfs_read_eof, 
                                offset);
-                       offset = dissect_nfsdata(tvb, offset, pinfo, tree, hf_nfs_data);
+                       offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_data);
                break;
                default:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "file_attributes");
                break;
        }
@@ -2841,7 +3554,7 @@ static const value_string names_stable_how[] = {
 
 /* RFC 1813, Page 49 */
 int
-dissect_stable_how(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_stable_how(tvbuff_t *tvb, int offset,
        proto_tree* tree, int hfindex)
 {
        guint32 stable_how;
@@ -2863,10 +3576,10 @@ dissect_nfs3_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree* tree)
 {
        offset = dissect_nfs_fh3   (tvb, offset, pinfo, tree, "file");
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_offset3, offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_count3, offset);
-       offset = dissect_stable_how(tvb, offset, pinfo, tree, hf_nfs_write_stable);
-       offset = dissect_nfsdata   (tvb, offset, pinfo, tree, hf_nfs_data);
+       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_offset3, offset);
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3, offset);
+       offset = dissect_stable_how(tvb, offset, tree, hf_nfs_write_stable);
+       offset = dissect_nfsdata   (tvb, offset, tree, hf_nfs_data);
 
        return offset;
 }
@@ -2874,23 +3587,23 @@ dissect_nfs3_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 49..54 */
 int
-dissect_nfs3_write_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs3_write_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_wcc_data  (tvb, offset, pinfo, tree, "file_wcc");
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_count3, 
+                       offset = dissect_wcc_data  (tvb, offset, tree, "file_wcc");
+                       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3, 
                                offset);
-                       offset = dissect_stable_how(tvb, offset, pinfo, tree,
+                       offset = dissect_stable_how(tvb, offset, tree,
                                hf_nfs_write_committed);
-                       offset = dissect_writeverf3(tvb, offset, pinfo, tree);
+                       offset = dissect_writeverf3(tvb, offset, tree);
                break;
                default:
-                       offset = dissect_wcc_data(tvb, offset, pinfo, tree, "file_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "file_wcc");
                break;
        }
                
@@ -2909,7 +3622,7 @@ static const value_string names_createmode3[] = {
 
 /* RFC 1813, Page 54 */
 int
-dissect_createmode3(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_createmode3(tvbuff_t *tvb, int offset,
        proto_tree* tree, guint32* mode)
 {
        guint32 mode_value;
@@ -2934,14 +3647,14 @@ dissect_nfs3_create_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        guint32 mode;
 
        offset = dissect_diropargs3 (tvb, offset, pinfo, tree, "where");
-       offset = dissect_createmode3(tvb, offset, pinfo, tree, &mode);
+       offset = dissect_createmode3(tvb, offset, tree, &mode);
        switch (mode) {
                case UNCHECKED:
                case GUARDED:
-                       offset = dissect_sattr3(tvb, offset, pinfo, tree, "obj_attributes");
+                       offset = dissect_sattr3(tvb, offset, tree, "obj_attributes");
                break;
                case EXCLUSIVE:
-                       offset = dissect_createverf3(tvb, offset, pinfo, tree);
+                       offset = dissect_createverf3(tvb, offset, tree);
                break;
        }
        
@@ -2956,16 +3669,16 @@ dissect_nfs3_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
 {
        guint32 status;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
                        offset = dissect_post_op_fh3 (tvb, offset, pinfo, tree, "obj");
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "obj_attributes");
-                       offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "dir_wcc");
                break;
                default:
-                       offset = dissect_wcc_data(tvb, offset, pinfo, tree, "dir_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "dir_wcc");
                break;
        }
                
@@ -2979,7 +3692,7 @@ dissect_nfs3_mkdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree* tree)
 {
        offset = dissect_diropargs3(tvb, offset, pinfo, tree, "where");
-       offset = dissect_sattr3    (tvb, offset, pinfo, tree, "attributes");
+       offset = dissect_sattr3    (tvb, offset, tree, "attributes");
        
        return offset;
 }
@@ -2991,8 +3704,8 @@ dissect_nfs3_symlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree* tree)
 {
        offset = dissect_diropargs3(tvb, offset, pinfo, tree, "where");
-       offset = dissect_sattr3    (tvb, offset, pinfo, tree, "symlink_attributes");
-       offset = dissect_nfspath3  (tvb, offset, pinfo, tree, hf_nfs_symlink_to);
+       offset = dissect_sattr3    (tvb, offset,        tree, "symlink_attributes");
+       offset = dissect_nfspath3  (tvb, offset,        tree, hf_nfs_symlink_to);
        
        return offset;
 }
@@ -3006,16 +3719,16 @@ dissect_nfs3_mknod_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        guint32 type;
 
        offset = dissect_diropargs3(tvb, offset, pinfo, tree, "where");
-       offset = dissect_ftype3(tvb, offset, pinfo, tree, hf_nfs_ftype3, &type);
+       offset = dissect_ftype3(tvb, offset, tree, hf_nfs_ftype3, &type);
        switch (type) {
                case NF3CHR:
                case NF3BLK:
-                       offset = dissect_sattr3(tvb, offset, pinfo, tree, "dev_attributes");
-                       offset = dissect_specdata3(tvb, offset, pinfo, tree, "spec");
+                       offset = dissect_sattr3(tvb, offset, tree, "dev_attributes");
+                       offset = dissect_specdata3(tvb, offset, tree, "spec");
                break;
                case NF3SOCK:
                case NF3FIFO:
-                       offset = dissect_sattr3(tvb, offset, pinfo, tree, "pipe_attributes");
+                       offset = dissect_sattr3(tvb, offset, tree, "pipe_attributes");
                break;
                default:
                        /* nothing to do */
@@ -3028,18 +3741,18 @@ dissect_nfs3_mknod_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 67..69 */
 int
-dissect_nfs3_remove_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs3_remove_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_wcc_data    (tvb, offset, pinfo, tree, "dir_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "dir_wcc");
                break;
                default:
-                       offset = dissect_wcc_data    (tvb, offset, pinfo, tree, "dir_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "dir_wcc");
                break;
        }
                
@@ -3061,20 +3774,20 @@ dissect_nfs3_rename_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 71..74 */
 int
-dissect_nfs3_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs3_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_wcc_data(tvb, offset, pinfo, tree, "fromdir_wcc");
-                       offset = dissect_wcc_data(tvb, offset, pinfo, tree, "todir_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "fromdir_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "todir_wcc");
                break;
                default:
-                       offset = dissect_wcc_data(tvb, offset, pinfo, tree, "fromdir_wcc");
-                       offset = dissect_wcc_data(tvb, offset, pinfo, tree, "todir_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "fromdir_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "todir_wcc");
                break;
        }
                
@@ -3096,22 +3809,22 @@ dissect_nfs3_link_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 74..76 */
 int
-dissect_nfs3_link_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs3_link_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "file_attributes");
-                       offset = dissect_wcc_data(tvb, offset, pinfo, tree, "linkdir_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "linkdir_wcc");
                break;
                default:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "file_attributes");
-                       offset = dissect_wcc_data(tvb, offset, pinfo, tree, "linkdir_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "linkdir_wcc");
                break;
        }
                
@@ -3125,9 +3838,9 @@ dissect_nfs3_readdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree* tree)
 {
        offset = dissect_nfs_fh3    (tvb, offset, pinfo, tree, "dir");
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_cookie3, offset);
-       offset = dissect_cookieverf3(tvb, offset, pinfo, tree);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_count3, offset);
+       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);
        
        return offset;
 }
@@ -3135,7 +3848,7 @@ dissect_nfs3_readdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 76..80 */
 int
-dissect_entry3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree)
+dissect_entry3(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree* tree)
 {
        proto_item* entry_item = NULL;
        proto_tree* entry_tree = NULL;
@@ -3144,20 +3857,20 @@ dissect_entry3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree)
 
        if (tree) {
                entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, tvb,
-                       offset+0, tvb_length_remaining(tvb, offset), FALSE);
+                       offset+0, -1, FALSE);
                entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
        }
 
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, entry_tree, hf_nfs_readdir_entry3_fileid,
+       offset = dissect_rpc_uint64(tvb, entry_tree, hf_nfs_readdir_entry3_fileid,
                offset);
 
-       offset = dissect_filename3(tvb, offset, pinfo, entry_tree,
+       offset = dissect_filename3(tvb, offset, entry_tree,
                hf_nfs_readdir_entry3_name, &name);
        if (entry_item)
                proto_item_set_text(entry_item, "Entry: name %s", name);
        g_free(name);
 
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, entry_tree, hf_nfs_readdir_entry3_cookie, 
+       offset = dissect_rpc_uint64(tvb, entry_tree, hf_nfs_readdir_entry3_cookie, 
                offset);
 
        /* now we know, that a readdir entry is shorter */
@@ -3177,13 +3890,13 @@ dissect_nfs3_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
        guint32 status;
        guint32 eof_value;
 
-       offset = dissect_stat(tvb, offset, pinfo, tree, &status);
+       offset = dissect_stat(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "dir_attributes");
-                       offset = dissect_cookieverf3(tvb, offset, pinfo, tree);
-                       offset = dissect_rpc_list_tvb(tvb, pinfo, tree, offset, 
+                       offset = dissect_cookieverf3(tvb, offset, tree);
+                       offset = dissect_rpc_list(tvb, pinfo, tree, offset, 
                                dissect_entry3);
                        eof_value = tvb_get_ntohl(tvb, offset+0);
                        if (tree)
@@ -3192,7 +3905,7 @@ dissect_nfs3_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        offset += 4;
                break;
                default:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "dir_attributes");
                break;
        }
@@ -3207,11 +3920,11 @@ dissect_nfs3_readdirplus_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree* tree)
 {
        offset = dissect_nfs_fh3    (tvb, offset, pinfo, tree, "dir");
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_cookie3, offset);
-       offset = dissect_cookieverf3(tvb, offset, pinfo, tree);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_count3_dircount,
+       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);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_count3_maxcount,
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3_maxcount,
                offset);
        
        return offset;
@@ -3230,23 +3943,23 @@ dissect_entryplus3(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        if (tree) {
                entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, tvb,
-                       offset+0, tvb_length_remaining(tvb, offset), FALSE);
+                       offset+0, -1, FALSE);
                entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
        }
 
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, entry_tree,
+       offset = dissect_rpc_uint64(tvb, entry_tree,
                hf_nfs_readdirplus_entry_fileid, offset);
 
-       offset = dissect_filename3(tvb, offset, pinfo, entry_tree,
+       offset = dissect_filename3(tvb, offset, entry_tree,
                hf_nfs_readdirplus_entry_name, &name);
        if (entry_item)
                proto_item_set_text(entry_item, "Entry: name %s", name);
        g_free(name);
 
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, entry_tree, hf_nfs_readdirplus_entry_cookie,
+       offset = dissect_rpc_uint64(tvb, entry_tree, hf_nfs_readdirplus_entry_cookie,
                offset);
 
-       offset = dissect_post_op_attr(tvb, offset, pinfo, entry_tree, 
+       offset = dissect_post_op_attr(tvb, offset, entry_tree, 
                "name_attributes");
        offset = dissect_post_op_fh3(tvb, offset, pinfo, entry_tree, "name_handle");
 
@@ -3267,13 +3980,13 @@ dissect_nfs3_readdirplus_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
        guint32 status;
        guint32 eof_value;
 
-       offset = dissect_stat(tvb, offset, pinfo, tree, &status);
+       offset = dissect_stat(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "dir_attributes");
-                       offset = dissect_cookieverf3(tvb, offset, pinfo, tree);
-                       offset = dissect_rpc_list_tvb(tvb, pinfo, tree, offset, 
+                       offset = dissect_cookieverf3(tvb, offset, tree);
+                       offset = dissect_rpc_list(tvb, pinfo, tree, offset, 
                                dissect_entryplus3);
                        eof_value = tvb_get_ntohl(tvb, offset+0);
                        if (tree)
@@ -3282,7 +3995,7 @@ dissect_nfs3_readdirplus_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        offset += 4;
                break;
                default:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "dir_attributes");
                break;
        }
@@ -3293,28 +4006,28 @@ dissect_nfs3_readdirplus_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 84..86 */
 int
-dissect_nfs3_fsstat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs3_fsstat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
        guint32 invarsec;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "obj_attributes");
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_fsstat3_resok_tbytes,
+                       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_fsstat3_resok_tbytes,
                                offset);
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_fsstat3_resok_fbytes,
+                       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_fsstat3_resok_fbytes,
                                offset);
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_fsstat3_resok_abytes,
+                       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_fsstat3_resok_abytes,
                                offset);
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_fsstat3_resok_tfiles,
+                       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_fsstat3_resok_tfiles,
                                offset);
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_fsstat3_resok_ffiles,
+                       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_fsstat3_resok_ffiles,
                                offset);
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_fsstat3_resok_afiles,
+                       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_fsstat3_resok_afiles,
                                offset);
                        invarsec = tvb_get_ntohl(tvb, offset + 0);
                        if (tree)
@@ -3323,7 +4036,7 @@ dissect_nfs3_fsstat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        offset += 4;
                break;
                default:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "obj_attributes");
                break;
        }
@@ -3340,7 +4053,7 @@ dissect_nfs3_fsstat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 86..90 */
 int
-dissect_nfs3_fsinfo_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs3_fsinfo_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
@@ -3355,10 +4068,10 @@ dissect_nfs3_fsinfo_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_item*     properties_item = NULL;
        proto_tree*     properties_tree = NULL;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "obj_attributes");
                        rtmax = tvb_get_ntohl(tvb, offset+0);
                        if (tree)
@@ -3396,9 +4109,9 @@ dissect_nfs3_fsinfo_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
                                offset+0, 4, dtpref);
                        offset += 4;
 
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, 
+                       offset = dissect_rpc_uint64(tvb, tree, 
                                hf_nfs_fsinfo_maxfilesize, offset);
-                       offset = dissect_nfstime3(tvb, offset, pinfo, tree, "time_delta");
+                       offset = dissect_nfstime3(tvb, offset, tree, hf_nfs_dtime, hf_nfs_dtime_sec, hf_nfs_dtime_nsec);
                        properties = tvb_get_ntohl(tvb, offset+0);
                        if (tree) {
                                properties_item = proto_tree_add_uint(tree,
@@ -3440,7 +4153,7 @@ dissect_nfs3_fsinfo_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        offset += 4;
                break;
                default:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "obj_attributes");
                break;
        }
@@ -3451,17 +4164,17 @@ dissect_nfs3_fsinfo_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 /* RFC 1813, Page 90..92 */
 int
-dissect_nfs3_pathconf_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs3_pathconf_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
        guint32 linkmax;
        guint32 name_max;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "obj_attributes");
                        linkmax = tvb_get_ntohl(tvb, offset + 0);
                        if (tree)
@@ -3473,17 +4186,17 @@ dissect_nfs3_pathconf_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
                                proto_tree_add_uint(tree, hf_nfs_pathconf_name_max, tvb,
                                offset+0, 4, name_max);
                        offset += 4;
-                       offset = dissect_rpc_bool_tvb(tvb, pinfo, tree, 
+                       offset = dissect_rpc_bool(tvb, tree, 
                                hf_nfs_pathconf_no_trunc, offset);
-                       offset = dissect_rpc_bool_tvb(tvb, pinfo, tree, 
+                       offset = dissect_rpc_bool(tvb, tree, 
                                hf_nfs_pathconf_chown_restricted, offset);
-                       offset = dissect_rpc_bool_tvb(tvb, pinfo, tree, 
+                       offset = dissect_rpc_bool(tvb, tree, 
                                hf_nfs_pathconf_case_insensitive, offset);
-                       offset = dissect_rpc_bool_tvb(tvb, pinfo, tree, 
+                       offset = dissect_rpc_bool(tvb, tree, 
                                hf_nfs_pathconf_case_preserving, offset);
                break;
                default:
-                       offset = dissect_post_op_attr(tvb, offset, pinfo, tree, 
+                       offset = dissect_post_op_attr(tvb, offset, tree, 
                                "obj_attributes");
                break;
        }
@@ -3498,83 +4211,70 @@ dissect_nfs3_commit_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree* tree)
 {
        offset = dissect_nfs_fh3(tvb, offset, pinfo, tree, "file");
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_offset3, offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_count3, offset);
+       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_offset3, offset);
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_count3, offset);
        return offset;
 }
 
 
 /* RFC 1813, Page 92..95 */
 int
-dissect_nfs3_commit_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
+dissect_nfs3_commit_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree* tree)
 {
        guint32 status;
 
-       offset = dissect_nfsstat3(tvb, offset, pinfo, tree, &status);
+       offset = dissect_nfsstat3(tvb, offset, tree, &status);
        switch (status) {
                case 0:
-                       offset = dissect_wcc_data  (tvb, offset, pinfo, tree, "file_wcc");
-                       offset = dissect_writeverf3(tvb, offset, pinfo, tree);
+                       offset = dissect_wcc_data  (tvb, offset, tree, "file_wcc");
+                       offset = dissect_writeverf3(tvb, offset, tree);
                break;
                default:
-                       offset = dissect_wcc_data(tvb, offset, pinfo, tree, "file_wcc");
+                       offset = dissect_wcc_data(tvb, offset, tree, "file_wcc");
                break;
        }
                
        return offset;
 }
 
-/* 1 missing functions */
-
-/* NFS Version 4 Protocol Draft Specification 07 */
+/**********************************************************/
+/* NFS Version 4, RFC 3010 with nfs4_prot.x 1.103 changes */
+/**********************************************************/
 
 int
-dissect_nfs_utf8string(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs_utf8string(tvbuff_t *tvb, int offset,
        proto_tree *tree, int hf, char **string_ret)
 {
        /* TODO: this needs to be fixed */
-       return dissect_rpc_string_tvb(tvb, pinfo, tree, hf, offset, string_ret);
-}
-
-int
-dissect_nfs_seqid4(tvbuff_t *tvb, int offset, packet_info *pinfo, 
-       proto_tree *tree)
-{
-       guint seqid;
-
-       seqid = tvb_get_ntohl(tvb, offset);
-       proto_tree_add_uint(tree, hf_nfs_seqid4, tvb, offset, 4, seqid);
-       offset += 4;
-
-       return offset;
+       return dissect_rpc_string(tvb, tree, hf, offset, string_ret);
 }
 
 int
-dissect_nfs_linktext4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_linktext4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       return dissect_nfs_utf8string(tvb, offset, pinfo, tree, hf_nfs_linktext4, 
+       /* TODO: use parameter "name" */
+       return dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_linktext4, 
                NULL);
 }
 
 int
-dissect_nfs_specdata4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_specdata4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_specdata1, offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_specdata2, offset);
+       /* TODO: use parameter "name" */
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_specdata1, offset);
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_specdata2, offset);
 
        return offset;
 }
 
 int
-dissect_nfs_client_id4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_clientid4(tvbuff_t *tvb, int offset,
+       proto_tree *tree)
 {
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_clientid4_verifier,
-               offset);
-       offset = dissect_nfsdata(tvb, offset, pinfo, tree, hf_nfs_data);
+       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_clientid4, offset);
 
        return offset;
 }
@@ -3593,62 +4293,54 @@ static const value_string names_ftype4[] = {
 };
 
 int
-dissect_nfs_ftype4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_component4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       guint ftype4;
-
-       ftype4 = tvb_get_ntohl(tvb, offset);
-       proto_tree_add_uint(tree, hf_nfs_ftype4, tvb, offset, 4, ftype4);
-       offset += 4;
+       /* TODO: use parameter "name" */
+       return dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_component4, 
+               NULL);
+}
 
+/* TODO: this function is not referenced at all. Remove it? */
+int
+dissect_nfs_reclaim4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
+{
+       /* TODO: use parameter "name */
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_reclaim4, offset);
        return offset;
 }
 
 int
-dissect_nfs_component4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_length4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       return dissect_nfs_utf8string(tvb, offset, pinfo, tree, hf_nfs_component4, 
-               NULL);
-}
-
-int
-dissect_nfs_reclaim4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
-{
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_reclaim4, offset);
+       /* TODO: use parameter "name */
+       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_length4, offset);
        return offset;
 }
 
 int
-dissect_nfs_length4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
-{
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_length4, offset);
-       return offset;
-}
-
-int
-dissect_nfs_opaque4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs_opaque4(tvbuff_t *tvb, int offset,
        proto_tree *tree, char *name);
 
 int
-dissect_nfs_lockowner4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_lock_owner4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
+       /* TODO: use paramter "name" */
        proto_tree *newftree = NULL;
        proto_item *fitem = NULL;
 
        fitem = proto_tree_add_text(tree, tvb, offset, 4, "Owner");
 
        if (fitem) {
-               newftree = proto_item_add_subtree(fitem, ett_nfs_lockowner4);
+               newftree = proto_item_add_subtree(fitem, ett_nfs_lock_owner4);
 
                if (newftree) {
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_clientid4,
+                       offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_clientid4,
                                offset);
-                       offset = dissect_nfs_opaque4(tvb, offset, pinfo, newftree, "Owner");
+                       offset = dissect_nfs_opaque4(tvb, offset, newftree, "Owner");
                }
        }
 
@@ -3656,9 +4348,10 @@ dissect_nfs_lockowner4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 }
 
 int
-dissect_nfs_pathname4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_pathname4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
+       /* TODO: use paramter "name" */
        guint comp_count, i;
        proto_item *fitem = NULL;
        proto_tree *newftree = NULL;
@@ -3673,7 +4366,7 @@ dissect_nfs_pathname4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
                if (newftree) {
                        for (i=0; i<comp_count; i++)
-                               offset=dissect_nfs_component4(tvb, offset, pinfo, newftree, "comp");
+                               offset=dissect_nfs_component4(tvb, offset, newftree, "comp");
                }
        }
 
@@ -3681,20 +4374,22 @@ dissect_nfs_pathname4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 }
 
 int
-dissect_nfs_changeid4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_changeid4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_changeid4, offset);
+       /* TODO: use parameter "name" */
+       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_changeid4, offset);
        return offset;
 }
 
 int
-dissect_nfs_nfstime4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_nfstime4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_nfstime4_seconds, 
+       /* TODO: use parameter "name" */
+       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_nfstime4_seconds, 
                offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_nfstime4_nseconds,
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_nfstime4_nseconds,
                offset);
        return offset;
 }
@@ -3708,8 +4403,8 @@ static const value_string names_time_how4[] = {
 };
 
 int
-dissect_nfs_settime4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_settime4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
        guint32 set_it;
 
@@ -3719,41 +4414,13 @@ dissect_nfs_settime4(tvbuff_t *tvb, int offset, packet_info *pinfo,
        offset += 4;
 
        if (set_it == SET_TO_CLIENT_TIME4)
-               offset = dissect_nfs_nfstime4(tvb, offset, pinfo, tree, NULL);
+               offset = dissect_nfs_nfstime4(tvb, offset, tree, NULL);
        
        return offset;
 }
 
-static const value_string names_fattr4_expire_type[] = {
-#define FH4_PERSISTENT 0x00000000
-       {       FH4_PERSISTENT, "FH4_PERSISTENT"        },
-#define FH4_NOEXPIRE_WITH_OPEN 0x00000001
-       {       FH4_NOEXPIRE_WITH_OPEN, "FH4_NOEXPIRE_WITH_OPEN"        },
-#define FH4_VOLATILE_ANY 0x00000002
-       {       FH4_NOEXPIRE_WITH_OPEN, "FH4_NOEXPIRE_WITH_OPEN"        },
-#define FH4_VOL_MIGRATION 0x00000004
-       {       FH4_VOL_MIGRATION,      "FH4_VOL_MIGRATION"     },
-#define FH4_VOL_RENAME 0x00000008
-       {       FH4_VOL_RENAME, "FH4_VOL_RENAME"        },
-       {       0,      NULL    }
-};
-
-int
-dissect_nfs_fh_expire_type(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree)
-{
-       guint32 fattr4_fh_expire_type;
-
-       fattr4_fh_expire_type = tvb_get_ntohl(tvb, offset);
-       proto_tree_add_uint(tree, hf_nfs_fattr4_expire_type, tvb, offset+0, 
-               4, fattr4_fh_expire_type);
-       offset += 4;
-
-       return offset;
-}
-
 int
-dissect_nfs_fsid4(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_nfs_fsid4(tvbuff_t *tvb, int offset,
        proto_tree *tree, char *name)
 {
        proto_tree *newftree = NULL;
@@ -3767,39 +4434,42 @@ dissect_nfs_fsid4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        if (newftree == NULL) return offset;
 
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_fsid4_major,
+       offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_fsid4_major,
                offset);
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_fsid4_minor,
+       offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_fsid4_minor,
                offset);
 
        return offset;
 }
 
 int
-dissect_nfs_acetype4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_acetype4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_acetype4, offset);
+       /* TODO: use parameter "name" */
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_acetype4, offset);
        return offset;
 }
 
 int
-dissect_nfs_aceflag4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_aceflag4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_aceflag4, offset);
+       /* TODO: use parameter "name" */
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_aceflag4, offset);
        return offset;
 }
 
 int
-dissect_nfs_acemask4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_acemask4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       return dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_acemask4, offset);
+       /* TODO: use parameter "name" */
+       return dissect_rpc_uint32(tvb, tree, hf_nfs_acemask4, offset);
 }
 
 int
-dissect_nfs_nfsace4(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_nfs_nfsace4(tvbuff_t *tvb, int offset,
        proto_tree *tree, char *name)
 {
        proto_tree *newftree = NULL;
@@ -3815,16 +4485,16 @@ dissect_nfs_nfsace4(tvbuff_t *tvb, int offset, packet_info *pinfo,
        if (newftree == NULL) return offset;
 
        nextentry = tvb_get_ntohl(tvb, offset);
-       offset = dissect_rpc_bool_tvb(tvb, pinfo, newftree, hf_nfs_data_follows,
+       offset = dissect_rpc_bool(tvb, newftree, hf_nfs_data_follows,
                offset);
 
        while (nextentry)
        {
-               offset = dissect_nfs_acetype4(tvb, offset, pinfo, newftree, "type");
-               offset = dissect_nfs_aceflag4(tvb, offset, pinfo, newftree, "flag");
-               offset = dissect_nfs_acemask4(tvb, offset, pinfo, newftree, 
+               offset = dissect_nfs_acetype4(tvb, offset, newftree, "type");
+               offset = dissect_nfs_aceflag4(tvb, offset, newftree, "flag");
+               offset = dissect_nfs_acemask4(tvb, offset, newftree, 
                        "access_mask");
-               offset = dissect_nfs_utf8string(tvb, offset, pinfo, newftree, 
+               offset = dissect_nfs_utf8string(tvb, offset, newftree, 
                        hf_nfs_who, NULL);
                nextentry = tvb_get_ntohl(tvb, offset);
                offset += 4;
@@ -3841,7 +4511,7 @@ dissect_nfs_fh4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 }
 
 int
-dissect_nfs_fs_location4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs_fs_location4(tvbuff_t *tvb, int offset,
        proto_tree *tree, char *name)
 {
        proto_tree *newftree = NULL;
@@ -3855,14 +4525,14 @@ dissect_nfs_fs_location4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        if (newftree == NULL) return offset;
 
-       offset = dissect_nfs_utf8string(tvb, offset, pinfo, tree, hf_nfs_server, 
+       offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_server, 
                NULL);
 
        return offset;
 }
 
 int
-dissect_nfs_fs_locations4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs_fs_locations4(tvbuff_t *tvb, int offset,
        proto_tree *tree, char *name)
 {
        proto_tree *newftree = NULL;
@@ -3877,15 +4547,15 @@ dissect_nfs_fs_locations4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        if (newftree == NULL) return offset;
 
-       offset = dissect_nfs_pathname4(tvb, offset, pinfo, newftree, "fs_root");
+       offset = dissect_nfs_pathname4(tvb, offset, newftree, "fs_root");
 
        nextentry = tvb_get_ntohl(tvb, offset);
-       offset = dissect_rpc_bool_tvb(tvb, pinfo, newftree, hf_nfs_data_follows, 
+       offset = dissect_rpc_bool(tvb, newftree, hf_nfs_data_follows, 
                offset);
 
        while (nextentry)
        {
-               offset = dissect_nfs_fs_location4(tvb, offset, pinfo, newftree, 
+               offset = dissect_nfs_fs_location4(tvb, offset, newftree, 
                        "locations");
                nextentry = tvb_get_ntohl(tvb, offset);
                offset += 4;
@@ -3895,10 +4565,77 @@ dissect_nfs_fs_locations4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 }
 
 int
-dissect_nfs_mode4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs_mode4(tvbuff_t *tvb, int offset,
        proto_tree *tree, char *name)
 {
-       return dissect_mode(tvb, offset, pinfo, tree, name);
+       return dissect_mode(tvb, offset, tree, name);
+}
+
+static const value_string nfs4_fattr4_fh_expire_type_names[] = {
+#define FH4_PERSISTENT 0x00000000
+       {       FH4_PERSISTENT, "FH4_PERSISTENT"        },
+#define FH4_NOEXPIRE_WITH_OPEN 0x00000001
+       {       FH4_NOEXPIRE_WITH_OPEN, "FH4_NOEXPIRE_WITH_OPEN"        },
+#define FH4_VOLATILE_ANY 0x00000002
+       {       FH4_VOLATILE_ANY,       "FH4_VOLATILE_ANY"      },
+#define FH4_VOL_MIGRATION 0x00000004
+       {       FH4_VOL_MIGRATION,      "FH4_VOL_MIGRATION"     },
+#define FH4_VOL_RENAME 0x00000008
+       {       FH4_VOL_RENAME, "FH4_VOL_RENAME"        },
+       {       0,      NULL    }
+};
+
+
+int
+dissect_nfs_fattr4_fh_expire_type(tvbuff_t *tvb, int offset, 
+       proto_tree *tree)
+{
+       guint32 expire_type;
+       proto_item *expire_type_item = NULL;
+       proto_tree *expire_type_tree = NULL;
+
+       expire_type = tvb_get_ntohl(tvb, offset + 0);
+
+       if (tree)
+       {
+               expire_type_item = proto_tree_add_text(tree, tvb, offset, 4,
+                       "fattr4_fh_expire_type: 0x%08x", expire_type);
+               if (expire_type_item)
+                       expire_type_tree = proto_item_add_subtree(expire_type_item, 
+                               ett_nfs_fattr4_fh_expire_type);
+       }
+
+       if (expire_type_tree)
+       {
+               if (expire_type == FH4_PERSISTENT)
+               {
+                       proto_tree_add_text(expire_type_tree, tvb, offset, 4, "%s",
+                               decode_enumerated_bitfield(expire_type, FH4_PERSISTENT, 8, 
+                               nfs4_fattr4_fh_expire_type_names, "%s"));
+               }
+               else
+               {
+                       if (expire_type & FH4_NOEXPIRE_WITH_OPEN)
+                               proto_tree_add_text(expire_type_tree, tvb, offset, 4,
+                                               "FH4_NOEXPIRE_WITH_OPEN (0x%08x)", FH4_NOEXPIRE_WITH_OPEN);
+
+                       if (expire_type & FH4_VOLATILE_ANY)
+                               proto_tree_add_text(expire_type_tree, tvb, offset, 4,
+                                               "FH4_VOLATILE_ANY (0x%08x)", FH4_VOLATILE_ANY);
+
+                       if (expire_type & FH4_VOL_MIGRATION)
+                               proto_tree_add_text(expire_type_tree, tvb, offset, 4,
+                                               "FH4_VOL_MIGRATION (0x%08x)", FH4_VOL_MIGRATION);
+
+                       if (expire_type & FH4_VOL_RENAME)
+                               proto_tree_add_text(expire_type_tree, tvb, offset, 4,
+                                               "FH4_VOL_RENAME (0x%08x)", FH4_VOL_RENAME);
+               }
+       }
+
+       offset += 4;
+
+       return offset;
 }
 
 static const value_string names_fattr4[] = {
@@ -4015,17 +4752,21 @@ static const value_string names_fattr4[] = {
        {       0,      NULL    }
 };
 
+#define FATTR4_BITMAP_ONLY 0
+#define FATTR4_FULL_DISSECT 1
 
 int
 dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name, int type)
+       proto_tree *tree, char *name _U_, int type)
 {
+       /* TODO: use parameter "name" */
        guint32 bitmap_len;
        proto_item *fitem = NULL;
        proto_tree *newftree = NULL;
        proto_item *attr_fitem = NULL;
        proto_tree *attr_newftree = NULL;
-       int i, j, fattr;
+       unsigned int i;
+       int j, fattr;
        guint32 *bitmap;
        guint32 sl;
        int attr_vals_offset;
@@ -4069,15 +4810,13 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
                                        (fattr < FATTR4_ACL)? hf_nfs_mand_attr: hf_nfs_recc_attr, 
                                        tvb, offset, 4, fattr);
 
-                               if (attr_fitem == NULL)
-                                       continue;
+                               if (attr_fitem == NULL) break;
 
                                attr_newftree = proto_item_add_subtree(attr_fitem, ett_nfs_bitmap4);
 
-                               if (attr_newftree == NULL)
-                                       continue;
+                               if (attr_newftree == NULL) break;
 
-                               if (type == 1)
+                               if (type == FATTR4_FULL_DISSECT)
                                {
                                        /* do a full decode of the arguments for the set flag */
                                        switch(fattr)
@@ -4085,113 +4824,114 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
                                        case FATTR4_SUPPORTED_ATTRS:
                                                attr_vals_offset = dissect_nfs_attributes(tvb, 
                                                        attr_vals_offset, pinfo, attr_newftree, 
-                                                       "fattr4_supported_attrs", 0);
+                                                       "fattr4_supported_attrs", FATTR4_BITMAP_ONLY);
                                                break;
                                                
                                        case FATTR4_TYPE:
-                                               attr_vals_offset = dissect_nfs_ftype4(tvb, attr_vals_offset,
-                                                       pinfo, attr_newftree, "fattr4_type");
+                                               attr_vals_offset = dissect_rpc_uint32(tvb,
+                                                       attr_newftree, hf_nfs_ftype4, attr_vals_offset);
                                                break;
 
                                        case FATTR4_FH_EXPIRE_TYPE:
-                                               attr_vals_offset = dissect_nfs_fh_expire_type(tvb,
-                                                       attr_vals_offset, pinfo, attr_newftree);
+                                               attr_vals_offset = dissect_nfs_fattr4_fh_expire_type(tvb,
+                                                       attr_vals_offset, attr_newftree);
                                                break;
 
                                        case FATTR4_CHANGE:
                                                attr_vals_offset = dissect_nfs_changeid4(tvb, 
-                                                       attr_vals_offset, pinfo, attr_newftree, "fattr4_change");
+                                                       attr_vals_offset, attr_newftree, "fattr4_change");
                                                break;
 
                                        case FATTR4_SIZE:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_size, attr_vals_offset);
                                                break;
 
                                        case FATTR4_LINK_SUPPORT:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb,
                                                        attr_newftree, hf_nfs_fattr4_link_support, 
                                                        attr_vals_offset);
                                                break;
 
                                        case FATTR4_SYMLINK_SUPPORT:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb,
                                                        attr_newftree, hf_nfs_fattr4_symlink_support, 
                                                        attr_vals_offset);
                                                break;
 
                                        case FATTR4_NAMED_ATTR:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb,
                                                        attr_newftree, hf_nfs_fattr4_named_attr, attr_vals_offset);
                                                break;
 
                                        case FATTR4_FSID:
                                                attr_vals_offset = dissect_nfs_fsid4(tvb, attr_vals_offset,
-                                                       pinfo, attr_newftree, "fattr4_fsid");
+                                                       attr_newftree, "fattr4_fsid");
                                                break;
 
                                        case FATTR4_UNIQUE_HANDLES:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb,
                                                        attr_newftree, hf_nfs_fattr4_unique_handles, 
                                                        attr_vals_offset);
                                                break;
 
                                        case FATTR4_LEASE_TIME:
-                                               attr_vals_offset = dissect_rpc_uint32_tvb(tvb, pinfo, 
-                                                       attr_newftree, hf_nfs_fattr4_lease_time, offset);
+                                               attr_vals_offset = dissect_rpc_uint32(tvb,
+                                                       attr_newftree, hf_nfs_fattr4_lease_time, 
+                                                       attr_vals_offset);
                                                break;
 
                                        case FATTR4_RDATTR_ERROR:
                                                attr_vals_offset = dissect_nfs_nfsstat4(tvb, attr_vals_offset,
-                                                       pinfo, attr_newftree, NULL);
+                                                       attr_newftree, NULL);
                                                break;
 
                                        case FATTR4_ACL:
                                                attr_vals_offset = dissect_nfs_nfsace4(tvb, attr_vals_offset,
-                                                       pinfo, attr_newftree, "fattr4_acl");
+                                                       attr_newftree, "fattr4_acl");
                                                break;
 
                                        case FATTR4_ACLSUPPORT:
-                                               attr_vals_offset = dissect_rpc_uint32_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint32(tvb,
                                                        attr_newftree, hf_nfs_fattr4_aclsupport, offset);
                                                break;
 
                                        case FATTR4_ARCHIVE:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, 
-                                                       pinfo, attr_newftree, hf_nfs_fattr4_archive, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb, 
+                                                       attr_newftree, hf_nfs_fattr4_archive, 
                                                        attr_vals_offset);
                                                break;
 
                                        case FATTR4_CANSETTIME:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb,
                                                        attr_newftree, hf_nfs_fattr4_cansettime, attr_vals_offset);
                                                break;
 
                                        case FATTR4_CASE_INSENSITIVE:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb,
                                                        attr_newftree, hf_nfs_fattr4_case_insensitive, 
                                                        attr_vals_offset);
                                                break;
 
                                        case FATTR4_CASE_PRESERVING:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb,
                                                        attr_newftree, hf_nfs_fattr4_case_preserving, 
                                                        attr_vals_offset);
                                                break;
 
                                        case FATTR4_CHOWN_RESTRICTED:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb,
                                                        attr_newftree, hf_nfs_fattr4_chown_restricted, 
                                                        attr_vals_offset);
                                                break;
 
                                        case FATTR4_FILEID:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_fileid, attr_vals_offset);
                                                break;
 
                                        case FATTR4_FILES_AVAIL:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_files_avail, 
                                                        attr_vals_offset);
                                                break;
@@ -4202,137 +4942,137 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
                                                break;
 
                                        case FATTR4_FILES_FREE:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_files_free, attr_vals_offset);
                                                break;
 
                                        case FATTR4_FILES_TOTAL:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_files_total, 
                                                        attr_vals_offset);
                                                break;
 
                                        case FATTR4_FS_LOCATIONS:
                                                attr_vals_offset = dissect_nfs_fs_locations4(tvb, 
-                                                       attr_vals_offset, pinfo, attr_newftree, 
+                                                       attr_vals_offset, attr_newftree, 
                                                        "fattr4_fs_locations");
                                                break;
 
                                        case FATTR4_HIDDEN:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb,
                                                        attr_newftree, hf_nfs_fattr4_hidden, attr_vals_offset);
                                                break;
 
                                        case FATTR4_HOMOGENEOUS:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb,
                                                        attr_newftree, hf_nfs_fattr4_homogeneous, 
                                                        attr_vals_offset);
                                                break;
 
                                        case FATTR4_MAXFILESIZE:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_maxfilesize, 
                                                        attr_vals_offset);
                                                break;
 
                                        case FATTR4_MAXLINK:
-                                               attr_vals_offset = dissect_rpc_uint32_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint32(tvb,
                                                        attr_newftree, hf_nfs_fattr4_maxlink, attr_vals_offset);
                                                break;
 
                                        case FATTR4_MAXNAME:
-                                               attr_vals_offset = dissect_rpc_uint32_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint32(tvb,
                                                        attr_newftree, hf_nfs_fattr4_maxname, attr_vals_offset);
                                                break;
 
                                        case FATTR4_MAXREAD:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_maxread, attr_vals_offset);
                                                break;
 
                                        case FATTR4_MAXWRITE:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_maxwrite, attr_vals_offset);
                                                break;
 
                                        case FATTR4_MIMETYPE:
                                                attr_vals_offset = dissect_nfs_utf8string(tvb, 
-                                                       attr_vals_offset, pinfo, attr_newftree, 
+                                                       attr_vals_offset, attr_newftree, 
                                                        hf_nfs_fattr4_mimetype, NULL);
                                                break;
                                        
                                        case FATTR4_MODE:
                                                attr_vals_offset = dissect_nfs_mode4(tvb,
-                                                       attr_vals_offset, pinfo, attr_newftree, "fattr4_mode");
+                                                       attr_vals_offset, attr_newftree, "fattr4_mode");
                                                break;
 
                                        case FATTR4_NO_TRUNC:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb,
                                                        attr_newftree, hf_nfs_fattr4_no_trunc, attr_vals_offset);
                                                break;
 
                                        case FATTR4_NUMLINKS:
-                                               attr_vals_offset = dissect_rpc_uint32_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint32(tvb,
                                                        attr_newftree, hf_nfs_fattr4_numlinks, attr_vals_offset);
                                                break;
 
                                        case FATTR4_OWNER:
                                                attr_vals_offset = dissect_nfs_utf8string(tvb, 
-                                                       attr_vals_offset, pinfo, attr_newftree, 
+                                                       attr_vals_offset, attr_newftree, 
                                                        hf_nfs_fattr4_owner,
                                                        NULL);
                                                break;
 
                                        case FATTR4_OWNER_GROUP:
                                                attr_vals_offset = dissect_nfs_utf8string(tvb, 
-                                                       attr_vals_offset, pinfo, attr_newftree, 
+                                                       attr_vals_offset, attr_newftree, 
                                                        hf_nfs_fattr4_owner_group, NULL);
                                                break;
 
                                        case FATTR4_QUOTA_AVAIL_HARD:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_quota_hard, attr_vals_offset);
                                                break;
 
                                        case FATTR4_QUOTA_AVAIL_SOFT:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_quota_soft, attr_vals_offset);
                                                break;
 
                                        case FATTR4_QUOTA_USED:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_quota_used, attr_vals_offset);
                                                break;
 
                                        case FATTR4_RAWDEV:
                                                attr_vals_offset = dissect_nfs_specdata4(tvb, 
-                                                       attr_vals_offset, pinfo, attr_newftree, "fattr4_rawdev");
+                                                       attr_vals_offset, attr_newftree, "fattr4_rawdev");
                                                break;
 
                                        case FATTR4_SPACE_AVAIL:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_space_avail, 
                                                        attr_vals_offset);
                                                break;
 
                                        case FATTR4_SPACE_FREE:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_space_free, attr_vals_offset);
                                                break;
 
                                        case FATTR4_SPACE_TOTAL:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_space_total, 
                                                        attr_vals_offset);
                                                break;
 
                                        case FATTR4_SPACE_USED:
-                                               attr_vals_offset = dissect_rpc_uint64_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_uint64(tvb,
                                                        attr_newftree, hf_nfs_fattr4_space_used, attr_vals_offset);
                                                break;
                                        
                                        case FATTR4_SYSTEM:
-                                               attr_vals_offset = dissect_rpc_bool_tvb(tvb, pinfo, 
+                                               attr_vals_offset = dissect_rpc_bool(tvb,
                                                        attr_newftree, hf_nfs_fattr4_system, attr_vals_offset);
                                                break;
 
@@ -4343,13 +5083,13 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
                                        case FATTR4_TIME_METADATA:
                                        case FATTR4_TIME_MODIFY:
                                                attr_vals_offset = dissect_nfs_nfstime4(tvb, attr_vals_offset,
-                                                       pinfo, attr_newftree, "nfstime4");
+                                                       attr_newftree, "nfstime4");
                                                break;
 
                                        case FATTR4_TIME_ACCESS_SET:
                                        case FATTR4_TIME_MODIFY_SET:
                                                attr_vals_offset = dissect_nfs_settime4(tvb, 
-                                                       attr_vals_offset, pinfo, attr_newftree, "settime4");
+                                                       attr_vals_offset, attr_newftree, "settime4");
                                                break;
 
                                        default:
@@ -4369,13 +5109,6 @@ dissect_nfs_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
        return offset;
 }
 
-int
-dissect_nfs_attrlist4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree)
-{
-       return dissect_nfsdata(tvb, offset, pinfo, tree, hf_nfs_attrlist4);
-}
-
 int
 dissect_nfs_fattr4(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree *tree, char *name)
@@ -4391,8 +5124,10 @@ dissect_nfs_fattr4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        if (newftree == NULL) return offset;
 
-       offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree, name, 1);
-       offset = dissect_nfs_attrlist4(tvb, offset, pinfo, newftree);
+       offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree, name, 
+               FATTR4_FULL_DISSECT);
+
+       offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_attrlist4);
 
        return offset;
 }
@@ -4408,7 +5143,7 @@ static const value_string names_open4_share_access[] = {
 };
 
 int
-dissect_nfs_open4_share_access(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs_open4_share_access(tvbuff_t *tvb, int offset,
        proto_tree *tree)
 {
        guint share_access;
@@ -4434,7 +5169,7 @@ static const value_string names_open4_share_deny[] = {
 };
 
 int
-dissect_nfs_open4_share_deny(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs_open4_share_deny(tvbuff_t *tvb, int offset,
        proto_tree *tree)
 {
        guint deny_access;
@@ -4447,13 +5182,23 @@ dissect_nfs_open4_share_deny(tvbuff_t *tvb, int offset, packet_info *pinfo,
        return offset;
 }
 
+int
+dissect_nfs_open_owner4(tvbuff_t *tvb, int offset, proto_tree *tree)
+{
+       offset = dissect_nfs_clientid4(tvb, offset, tree);
+       offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_open_owner4);
+
+       return offset;
+}
+
 int
 dissect_nfs_open_claim_delegate_cur4(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, char *name)
+       proto_tree *tree, char *name _U_)
 {
-       offset = dissect_nfs_pathname4(tvb, offset, pinfo, tree, "file");
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, 
+       /* TODO: use parameter "name" */
+       offset = dissect_rpc_uint64(tvb, tree, 
                hf_nfs_stateid4_delegate_stateid, offset);
+       offset = dissect_nfs_component4(tvb, offset, tree, "file");
        return offset;
 }
 
@@ -4471,8 +5216,8 @@ static const value_string names_claim_type4[] = {
 };
 
 int
-dissect_nfs_open_claim4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_open_claim4(tvbuff_t *tvb, int offset,
+       proto_tree *tree)
 {
        guint open_claim_type4;
        proto_item *fitem = NULL;
@@ -4491,22 +5236,22 @@ dissect_nfs_open_claim4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        switch(open_claim_type4)
                        {
                        case CLAIM_NULL:
-                               offset = dissect_nfs_pathname4(tvb, offset, pinfo, newftree, 
+                               offset = dissect_nfs_component4(tvb, offset, newftree, 
                                        "file");
                                break;
 
                        case CLAIM_PREVIOUS:
-                               offset = dissect_rpc_uint32_tvb(tvb, pinfo, newftree, 
+                               offset = dissect_rpc_uint32(tvb, newftree, 
                                        hf_nfs_delegate_type, offset);
                                break;
 
                        case CLAIM_DELEGATE_CUR:
-                               offset = dissect_nfs_open_claim_delegate_cur4(tvb, offset, pinfo, 
+                               offset = dissect_nfs_open_claim_delegate_cur4(tvb, offset,
                                        newftree, "delegate_cur_info");
                                break;
 
                        case CLAIM_DELEGATE_PREV:
-                               offset = dissect_nfs_pathname4(tvb, offset, pinfo, newftree, 
+                               offset = dissect_nfs_component4(tvb, offset, newftree, 
                                        "file_delegate_prev");
                                break;
 
@@ -4519,14 +5264,11 @@ dissect_nfs_open_claim4(tvbuff_t *tvb, int offset, packet_info *pinfo,
        return offset;
 }
 
-int
-dissect_nfs_verifier4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name);
-
 int
 dissect_nfs_createhow4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+       proto_tree *tree, char *name _U_)
 {
+       /* TODO: use parameter "name" */
        guint mode;
 
        /* This is intentional; we're using the same flags as NFSv3 */
@@ -4542,7 +5284,7 @@ dissect_nfs_createhow4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                break;
 
        case EXCLUSIVE:         /* EXCLUSIVE4 */
-               offset = dissect_nfs_verifier4(tvb, offset, pinfo, tree, "createverf");
+               offset = dissect_rpc_uint64(tvb, tree, hf_nfs_verifier4, offset);
                break;
        
        default:
@@ -4595,46 +5337,25 @@ dissect_nfs_openflag4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 }
 
 int
-dissect_nfs_verifier4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
-{
-       return dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_verifier4, offset);
-}
-
-
-int
-dissect_nfs_cookie4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
-{
-       return dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_cookie4, offset);
-}
-
-int
-dissect_nfs_cookieverf4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
-{
-       return dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_cookieverf4, offset);
-}
-
-
-int
-dissect_nfs_clientaddr4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_clientaddr4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       offset = dissect_nfs_opaque4(tvb, offset, pinfo, tree, "network id");
-       offset = dissect_nfs_opaque4(tvb, offset, pinfo, tree, "universal address");
+       /* TODO: use parameter "name" */
+       offset = dissect_nfs_opaque4(tvb, offset, tree, "network id");
+       offset = dissect_nfs_opaque4(tvb, offset, tree, "universal address");
 
        return offset;
 }
        
 
 int
-dissect_nfs_cb_client4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_cb_client4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_cb_program, 
+       /* TODO: use parameter "name" */
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_cb_program, 
                offset);
-       offset = dissect_nfs_clientaddr4(tvb, offset, pinfo, tree, "cb_location");
+       offset = dissect_nfs_clientaddr4(tvb, offset, tree, "cb_location");
        return offset;
 }
 
@@ -4649,7 +5370,7 @@ static const value_string names_stable_how4[] = {
 };
 
 int
-dissect_nfs_stable_how4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs_stable_how4(tvbuff_t *tvb, int offset,
        proto_tree *tree, char *name)
 {
        guint stable_how4;
@@ -4664,10 +5385,11 @@ dissect_nfs_stable_how4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 }
 
 int
-dissect_nfs_opaque4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_opaque4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       return dissect_nfsdata(tvb, offset, pinfo, tree, hf_nfs_data);
+       /* TODO: use parameter "name" */
+       return dissect_nfsdata(tvb, offset, tree, hf_nfs_data);
 }
 
 /* There is probably a better (built-in?) way to do this, but this works
@@ -4755,8 +5477,9 @@ gint *nfsv4_operation_ett[] =
 
 int
 dissect_nfs_dirlist4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+       proto_tree *tree, char *name _U_)
 {
+       /* TODO: use parameter "name" */
        proto_tree *newftree = NULL;
        guint nextentry;
 
@@ -4765,26 +5488,27 @@ dissect_nfs_dirlist4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        nextentry = tvb_get_ntohl(tvb, offset);
 
-       offset = dissect_rpc_bool_tvb(tvb, pinfo, newftree, hf_nfs_data_follows,
+       offset = dissect_rpc_bool(tvb, newftree, hf_nfs_data_follows,
                offset);
-       
+
        while (nextentry)
        {
-               offset = dissect_nfs_cookie4(tvb, offset, pinfo, newftree, "cookie");
-               offset = dissect_nfs_component4(tvb, offset, pinfo, newftree, "name");
+               /* offset = dissect_nfs_cookie4(tvb, offset, pinfo, newftree); */
+               offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_cookie4, offset);
+               offset = dissect_nfs_component4(tvb, offset, newftree, "name");
                offset = dissect_nfs_fattr4(tvb, offset, pinfo, newftree, "attrs");
                nextentry = tvb_get_ntohl(tvb, offset);
                offset += 4;
        }
 
-       offset = dissect_rpc_bool_tvb(tvb, pinfo, newftree, hf_nfs_dirlist4_eof,
+       offset = dissect_rpc_bool(tvb, newftree, hf_nfs_dirlist4_eof,
                offset);
 
        return offset;
 }
 
 int
-dissect_nfs_change_info4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs_change_info4(tvbuff_t *tvb, int offset,
        proto_tree *tree, char *name)
 {
        proto_tree *newftree = NULL;
@@ -4793,38 +5517,55 @@ dissect_nfs_change_info4(tvbuff_t *tvb, int offset, packet_info *pinfo,
        fitem = proto_tree_add_text(tree, tvb, offset, 0, "%s", name);
 
        if (fitem) {
-               newftree=proto_item_add_subtree(fitem, ett_nfs_change_info4);
+               newftree = proto_item_add_subtree(fitem, ett_nfs_change_info4);
 
                if (newftree) {
-                       offset = dissect_rpc_bool_tvb(tvb, pinfo, newftree, 
+                       offset = dissect_rpc_bool(tvb, newftree, 
                                hf_nfs_change_info4_atomic, offset);
-                       offset = dissect_nfs_changeid4(tvb, offset, pinfo, newftree, "before");
-                       offset = dissect_nfs_changeid4(tvb, offset, pinfo, newftree, "after");
+                       offset = dissect_nfs_changeid4(tvb, offset, newftree, "before");
+                       offset = dissect_nfs_changeid4(tvb, offset, newftree, "after");
                }
        }
 
        return offset;
 }
 
+static const value_string names_nfs_lock_type4[] =
+{
+#define READ_LT 1
+       {       READ_LT,                "READ_LT"                               },
+#define WRITE_LT 2
+       {       WRITE_LT,               "WRITE_LT"                              },
+#define READW_LT 3
+       {       READW_LT,       "READW_LT"      },
+#define WRITEW_LT 4
+       {       WRITEW_LT,      "WRITEW_LT"     },
+#define RELEASE_STATE 5
+       {       RELEASE_STATE,  "RELEASE_STATE" },
+       {       0,      NULL    }
+};
+
 int
-dissect_nfs_lock4denied(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_lock4denied(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       offset = dissect_nfs_lockowner4(tvb, offset, pinfo, tree, "owner");
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_offset4, offset);
-       offset = dissect_nfs_length4(tvb, offset, pinfo, tree, "length");
+       /* TODO: use parameter "name" */
+       offset = dissect_rpc_uint64(tvb, tree, hf_nfs_offset4, offset);
+       offset = dissect_nfs_length4(tvb, offset, tree, "length");
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_lock_type4, offset);
+       offset = dissect_nfs_lock_owner4(tvb, offset, tree, "owner");
        return offset;
 }
 
 
 int
-dissect_nfs_ace4(tvbuff_t *tvb, int offset, packet_info *pinfo, 
-       proto_tree *tree, char *name)
+dissect_nfs_ace4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       offset = dissect_nfs_acetype4(tvb, offset, pinfo, tree, "type");
-       offset = dissect_nfs_aceflag4(tvb, offset, pinfo, tree, "flag");
-       offset = dissect_nfs_acemask4(tvb, offset, pinfo, tree, "access_mask");
-       return dissect_nfs_utf8string(tvb, offset, pinfo, tree, hf_nfs_ace4, NULL);
+       offset = dissect_nfs_acetype4(tvb, offset, tree, "type");
+       offset = dissect_nfs_aceflag4(tvb, offset, tree, "flag");
+       offset = dissect_nfs_acemask4(tvb, offset, tree, "access_mask");
+       return dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_ace4, NULL);
 }
 
 static const value_string names_open4_result_flags[] = {
@@ -4836,7 +5577,7 @@ static const value_string names_open4_result_flags[] = {
 };
 
 int 
-dissect_nfs_open4_rflags(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+dissect_nfs_open4_rflags(tvbuff_t *tvb, int offset,
        proto_tree *tree, char *name)
 {
        guint rflags;
@@ -4851,19 +5592,21 @@ dissect_nfs_open4_rflags(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        "%s: 0x%08x", name, rflags);
 
                if (rflags_item)
+               {
                        rflags_tree = proto_item_add_subtree(rflags_item, 
                                ett_nfs_open4_result_flags);
-       }
 
-       if (rflags_tree)
-       {
-               proto_tree_add_text(rflags_tree, tvb, offset, 4, "%s",
-                       decode_enumerated_bitfield(rflags, OPEN4_RESULT_MLOCK, 2,
-                       names_open4_result_flags, "%s"));
+                       if (rflags_tree)
+                       {
+                               proto_tree_add_text(rflags_tree, tvb, offset, 4, "%s",
+                                       decode_enumerated_bitfield(rflags, OPEN4_RESULT_MLOCK, 2,
+                                       names_open4_result_flags, "%s"));
 
-               proto_tree_add_text(rflags_tree, tvb, offset, 4, "%s",
-                       decode_enumerated_bitfield(rflags, OPEN4_RESULT_CONFIRM, 2,
-                       names_open4_result_flags, "%s"));
+                               proto_tree_add_text(rflags_tree, tvb, offset, 4, "%s",
+                                       decode_enumerated_bitfield(rflags, OPEN4_RESULT_CONFIRM, 2,
+                                       names_open4_result_flags, "%s"));
+                       }
+               }
        }
        
        offset += 4;
@@ -4872,23 +5615,65 @@ dissect_nfs_open4_rflags(tvbuff_t *tvb, int offset, packet_info *pinfo,
 }
 
 int
-dissect_nfs_open_read_delegation4(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs_stateid4(tvbuff_t *tvb, int offset,
+               proto_tree *tree)
+{
+       proto_item *fitem = NULL;
+       proto_tree *newftree = NULL;
+       int sublen;
+       int bytes_left;
+       gboolean first_line;
+
+       fitem = proto_tree_add_text(tree, tvb, offset, 4, "stateid");
+
+       if (fitem) {
+               newftree = proto_item_add_subtree(fitem, ett_nfs_stateid4);
+               if (newftree) {
+                       offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4, 
+                               offset);
+
+                       bytes_left = 12;
+                       first_line = TRUE;
+
+                       while (bytes_left != 0)
+                       {
+                               sublen = 12;
+                               if (sublen > bytes_left)
+                                       sublen = bytes_left;
+
+                               proto_tree_add_text(newftree, tvb, offset, sublen, "%s%s",
+                                       first_line ? "other: " : "      ",
+                                       tvb_bytes_to_str(tvb, offset, sublen));
+
+                               bytes_left -= sublen;
+                               offset += sublen;
+                               first_line = FALSE;
+                       }
+               }
+       }
+
+       return offset;
+}
+
+int
+dissect_nfs_open_read_delegation4(tvbuff_t *tvb, int offset,
        proto_tree *tree)
 {
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_stateid4, offset);
-       offset = dissect_rpc_bool_tvb(tvb, pinfo, tree, hf_nfs_recall4, offset);
-       offset = dissect_nfs_ace4(tvb, offset, pinfo, tree, "permissions");
+       offset = dissect_nfs_stateid4(tvb, offset, tree);
+       offset = dissect_rpc_bool(tvb, tree, hf_nfs_recall4, offset);
+       offset = dissect_nfs_ace4(tvb, offset, tree, "permissions");
 
        return offset;
 }
 
 int
-dissect_nfs_modified_limit4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_modified_limit4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_num_blocks, 
+       /* TODO: use parameter "name" */
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_num_blocks, 
                offset);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_bytes_per_block,
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_bytes_per_block,
                offset);
        return offset;
 }
@@ -4902,9 +5687,10 @@ static const value_string names_limit_by4[] = {
 };
 
 int
-dissect_nfs_space_limit4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_space_limit4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
+       /* TODO: use parameter "name" */
        guint limitby;
 
        limitby = tvb_get_ntohl(tvb, offset);
@@ -4914,12 +5700,12 @@ dissect_nfs_space_limit4(tvbuff_t *tvb, int offset, packet_info *pinfo,
        switch(limitby)
        {
        case NFS_LIMIT_SIZE:
-               offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_filesize, 
+               offset = dissect_rpc_uint64(tvb, tree, hf_nfs_filesize, 
                        offset);
                break;
 
        case NFS_LIMIT_BLOCKS:
-               offset = dissect_nfs_modified_limit4(tvb, offset, pinfo, tree, 
+               offset = dissect_nfs_modified_limit4(tvb, offset, tree, 
                        "mod_blocks");
                break;
 
@@ -4932,12 +5718,12 @@ dissect_nfs_space_limit4(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 int
 dissect_nfs_open_write_delegation4(tvbuff_t *tvb, int offset, 
-       packet_info *pinfo, proto_tree *tree)
+       proto_tree *tree)
 {
-       offset = dissect_rpc_uint64_tvb(tvb, pinfo, tree, hf_nfs_stateid4, offset);
-       offset = dissect_rpc_bool_tvb(tvb, pinfo, tree, hf_nfs_recall, offset);
-       offset = dissect_nfs_space_limit4(tvb, offset, pinfo, tree, "space_limit");
-       return dissect_nfs_ace4(tvb, offset, pinfo, tree, "permissions");
+       offset = dissect_nfs_stateid4(tvb, offset, tree);
+       offset = dissect_rpc_bool(tvb, tree, hf_nfs_recall, offset);
+       offset = dissect_nfs_space_limit4(tvb, offset, tree, "space_limit");
+       return dissect_nfs_ace4(tvb, offset, tree, "permissions");
 }
 
 #define OPEN_DELEGATE_NONE 0
@@ -4951,9 +5737,10 @@ static const value_string names_open_delegation_type4[] = {
 };
 
 int
-dissect_nfs_open_delegation4(tvbuff_t *tvb, int offset, packet_info *pinfo,
-       proto_tree *tree, char *name)
+dissect_nfs_open_delegation4(tvbuff_t *tvb, int offset,
+       proto_tree *tree, char *name _U_)
 {
+       /* TODO: use parameter "name" */
        guint delegation_type;
        proto_tree *newftree = NULL;
        proto_item *fitem = NULL;
@@ -4972,12 +5759,12 @@ 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, 
+                       offset = dissect_nfs_open_read_delegation4(tvb, offset,
                                newftree);
                        break;
 
                case OPEN_DELEGATE_WRITE:
-                       offset = dissect_nfs_open_write_delegation4(tvb, offset, pinfo, 
+                       offset = dissect_nfs_open_write_delegation4(tvb, offset,
                                newftree);
                        break;
 
@@ -4989,6 +5776,58 @@ dissect_nfs_open_delegation4(tvbuff_t *tvb, int offset, packet_info *pinfo,
        return offset;
 }
 
+int
+dissect_nfs_rpcsec_gss_info(tvbuff_t *tvb, int offset, proto_tree *tree)
+{
+       guint data_follows;
+
+       while ((data_follows = tvb_get_ntohl(tvb, offset)))
+       {
+               offset += 4;
+               offset = dissect_nfsdata(tvb, offset, tree, hf_nfs_sec_oid4); 
+               offset = dissect_rpc_uint32(tvb, tree, hf_nfs_qop4, offset);
+               offset = dissect_rpc_uint32(tvb, tree, 
+                               hf_nfs_secinfo_rpcsec_gss_info_service, offset);
+       }
+
+       return offset;
+}
+
+int
+dissect_nfs_open_to_lock_owner4(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);
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_lock_seqid4, offset);
+       offset = dissect_nfs_lock_owner4(tvb, offset, tree, "owner");
+
+       return offset;
+}
+
+int
+dissect_nfs_exist_lock_owner4(tvbuff_t *tvb, int offset, proto_tree *tree)
+{
+       offset = dissect_nfs_stateid4(tvb, offset, tree);
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_lock_seqid4, offset);
+
+       return offset;
+}
+
+int
+dissect_nfs_locker4(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);
+       
+       if (new_lock_owner)
+               offset = dissect_nfs_open_to_lock_owner4(tvb, offset, tree);
+       else
+               offset = dissect_nfs_exist_lock_owner4(tvb, offset, tree);
+
+       return offset;
+}
 
 int
 dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo, 
@@ -5015,35 +5854,35 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
        for (ops_counter=0; ops_counter<ops; ops_counter++)
        {
                opcode = tvb_get_ntohl(tvb, offset);
+
                fitem = proto_tree_add_uint(ftree, hf_nfs_argop4, tvb, offset, 4, 
                        opcode);
                offset += 4;
 
-               if (opcode < NFS4_OP_ACCESS || opcode >NFS4_OP_WRITE)
+               if (opcode < NFS4_OP_ACCESS || opcode > NFS4_OP_WRITE)
                        break;
 
                if (fitem == NULL)      break;
 
                newftree = proto_item_add_subtree(fitem, *nfsv4_operation_ett[opcode-3]);
-
                if (newftree == NULL)   break;
 
                switch(opcode)
                {
                case NFS4_OP_ACCESS:
-                       offset = dissect_access(tvb, offset, pinfo, newftree, "access");
+                       offset = dissect_access(tvb, offset, newftree, "access");
                        break;
 
                case NFS4_OP_CLOSE:
-                       offset = dissect_nfs_seqid4(tvb, offset, pinfo, newftree);
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
+                       offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4,
                                offset);
+                       offset = dissect_nfs_stateid4(tvb, offset, newftree);
                        break;
 
                case NFS4_OP_COMMIT:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_offset4,
+                       offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4,
                                offset);
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, newftree, hf_nfs_count4,
+                       offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_count4,
                                offset);
                        break;
 
@@ -5051,22 +5890,20 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        {
                                guint create_type;
 
-                               offset = dissect_nfs_component4(tvb, offset, pinfo, newftree, 
-                                       "objname");
-
                                create_type = tvb_get_ntohl(tvb, offset);
-                               offset = dissect_nfs_ftype4(tvb, offset, pinfo, newftree, "type");
+                               offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_ftype4, 
+                                       offset);
 
                                switch(create_type)
                                {
                                case NF4LNK:
-                                       offset = dissect_nfs_linktext4(tvb, offset, pinfo, newftree, 
+                                       offset = dissect_nfs_linktext4(tvb, offset, newftree, 
                                                "linkdata");
                                        break;
                                
                                case NF4BLK:
                                case NF4CHR:
-                                       offset = dissect_nfs_specdata4(tvb, offset, pinfo, 
+                                       offset = dissect_nfs_specdata4(tvb, offset,
                                                newftree, "devdata");
                                        break;
 
@@ -5078,66 +5915,71 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                                default:
                                        break;
                                }
+
+                               offset = dissect_nfs_component4(tvb, offset, newftree, 
+                                       "objname");
+
+                               offset = dissect_nfs_fattr4(tvb, offset, pinfo, newftree, 
+                                       "createattrs");
                        }
                        break;
 
                case NFS4_OP_DELEGPURGE:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, 
+                       offset = dissect_rpc_uint64(tvb, newftree, 
                                hf_nfs_clientid4, offset);
                        break;
 
                case NFS4_OP_DELEGRETURN:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
-                               offset);
+                       offset = dissect_nfs_stateid4(tvb, offset, newftree);
                        break;
 
                case NFS4_OP_GETATTR:
                        offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree, 
-                               "attr_request", 0);
+                               "attr_request", FATTR4_BITMAP_ONLY);
                        break;
 
                case NFS4_OP_GETFH:
                        break;
 
                case NFS4_OP_LINK:
-                       offset = dissect_nfs_component4(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_component4(tvb, offset, newftree, 
                                "newname");
                        break;
 
                case NFS4_OP_LOCK:
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, newftree, hf_nfs_locktype4,
+                       offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_lock_type4,
                                offset);
-                       offset = dissect_nfs_seqid4(tvb, offset, pinfo, newftree);
-                       offset = dissect_nfs_reclaim4(tvb, offset, pinfo, newftree, "reclaim");
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
+                       offset = dissect_rpc_bool(tvb, newftree, hf_nfs_lock4_reclaim,
                                offset);
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_offset4,
+                       offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4,
                                offset);
-                       offset = dissect_nfs_length4(tvb, offset, pinfo, newftree, "length");
+                       offset = dissect_nfs_length4(tvb, offset, newftree, "length");
+                       offset = dissect_nfs_locker4(tvb, offset, newftree);
                        break;
 
                case NFS4_OP_LOCKT:
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, newftree, hf_nfs_locktype4,
+                       offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_lock_type4,
                                offset);
-                       offset = dissect_nfs_lockowner4(tvb, offset, pinfo, newftree, "owner");
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_offset4,
+                       offset = dissect_nfs_lock_owner4(tvb, offset, newftree, 
+                               "owner");
+                       offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4,
                                offset);
-                       offset = dissect_nfs_length4(tvb, offset, pinfo, newftree, "length");
+                       offset = dissect_nfs_length4(tvb, offset, newftree, "length");
                        break;
 
                case NFS4_OP_LOCKU:
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, newftree, hf_nfs_locktype4,
+                       offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_lock_type4,
                                offset);
-                       offset = dissect_nfs_seqid4(tvb, offset, pinfo, newftree);
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
+                       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_seqid4, offset);
+                       offset = dissect_nfs_stateid4(tvb, offset, newftree);
+                       offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4,
                                offset);
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_offset4,
-                               offset);
-                       offset = dissect_nfs_length4(tvb, offset, pinfo, newftree, "length");
+                       offset = dissect_nfs_length4(tvb, offset, newftree, "length");
                        break;
 
                case NFS4_OP_LOOKUP:
-                       offset = dissect_nfs_pathname4(tvb, offset, pinfo, newftree, "path");
+                       offset = dissect_nfs_component4(tvb, offset, newftree, 
+                               "objname");
                        break;
 
                case NFS4_OP_LOOKUPP:
@@ -5149,30 +5991,32 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        break;
 
                case NFS4_OP_OPEN:
-                       offset = dissect_nfs_open_claim4(tvb, offset, pinfo, newftree, 
-                               "claim");
+                       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_lockowner4(tvb, offset, pinfo, newftree, "Owner");
-                       offset = dissect_nfs_seqid4(tvb, offset, pinfo, newftree);
-                       offset = dissect_nfs_open4_share_access(tvb, offset, pinfo, newftree);
-                       offset = dissect_nfs_open4_share_deny(tvb, offset, pinfo, newftree);
+                       offset = dissect_nfs_open_claim4(tvb, offset, newftree);
                        break;
 
                case NFS4_OP_OPENATTR:
+                       offset = dissect_rpc_bool(tvb, newftree, hf_nfs_attrdircreate,
+                               offset);
                        break;
 
                case NFS4_OP_OPEN_CONFIRM:
-                       offset = dissect_nfs_seqid4(tvb, offset, pinfo, newftree);
-                       offset = dissect_nfs_verifier4(tvb, offset, pinfo, newftree
-                               "verifier");
+                       offset = dissect_nfs_stateid4(tvb, offset, newftree);
+                       offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4
+                               offset);
                        break;
 
                case NFS4_OP_OPEN_DOWNGRADE:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
+                       offset = dissect_nfs_stateid4(tvb, offset, newftree);
+                       offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_seqid4, 
                                offset);
-                       offset = dissect_nfs_seqid4(tvb, offset, pinfo, newftree);
-                       offset = dissect_nfs_open4_share_access(tvb, offset, pinfo, newftree);
-                       offset = dissect_nfs_open4_share_deny(tvb, offset, pinfo, newftree);
+                       offset = dissect_nfs_open4_share_access(tvb, offset, newftree);
+                       offset = dissect_nfs_open4_share_deny(tvb, offset, newftree);
                        break;
 
                case NFS4_OP_PUTFH:
@@ -5184,44 +6028,43 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        break;
 
                case NFS4_OP_READ:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
-                               offset);
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_offset4,
+                       offset = dissect_nfs_stateid4(tvb, offset, newftree);
+                       offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4,
                                offset);
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, newftree, hf_nfs_count4,
+                       offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_count4,
                                offset);
                        break;
 
                case NFS4_OP_READDIR:
-                       offset = dissect_nfs_cookie4(tvb, offset, pinfo, newftree, "cookie");
-                       offset = dissect_nfs_cookieverf4(tvb, offset, pinfo, newftree, 
-                               "cookieverf");
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, newftree, 
+                       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(tvb, pinfo, newftree,
+                       offset = dissect_rpc_uint32(tvb, newftree,
                                hf_nfs_count4_maxcount, offset);
                        offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree, "attr", 
-                               0);
+                               FATTR4_BITMAP_ONLY);
                        break;
 
                case NFS4_OP_READLINK:
                        break;
 
                case NFS4_OP_REMOVE:
-                       offset = dissect_nfs_component4(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_component4(tvb, offset, newftree, 
                                "target");
                        break;
 
                case NFS4_OP_RENAME:
-                       offset = dissect_nfs_component4(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_component4(tvb, offset, newftree, 
                                "oldname");
-                       offset = dissect_nfs_component4(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_component4(tvb, offset, newftree, 
                                "newname");
                        break;
 
                case NFS4_OP_RENEW:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
-                               offset);
+                       offset = dissect_nfs_clientid4(tvb, offset, newftree);
                        break;
        
                case NFS4_OP_RESTOREFH:
@@ -5229,12 +6072,11 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        break;
 
                case NFS4_OP_SECINFO:
-                       offset = dissect_nfs_component4(tvb, offset, pinfo, newftree, "name");
+                       offset = dissect_nfs_component4(tvb, offset, newftree, "name");
                        break;
 
                case NFS4_OP_SETATTR:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
-                               offset);
+                       offset = dissect_nfs_stateid4(tvb, offset, newftree);
                        offset = dissect_nfs_fattr4(tvb, offset, pinfo, newftree, 
                                "obj_attributes");
                        break;
@@ -5243,46 +6085,48 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        {
                                proto_tree *client_tree = NULL;
 
-                               fitem = proto_tree_add_text(newftree, tvb, offset, 0, "Client");
+                               fitem = proto_tree_add_text(newftree, tvb, offset, 0, "client");
 
                                if (fitem) {
                                        client_tree = proto_item_add_subtree(fitem, 
                                                ett_nfs_client_id4);
 
                                        if (newftree)
-                                               offset = dissect_nfs_client_id4(tvb, offset, pinfo, 
-                                                       client_tree, "client");
+                                       {
+                                               offset = dissect_nfs_clientid4(tvb, offset,
+                                                       client_tree);
+
+                                               offset = dissect_nfsdata(tvb, offset, client_tree, 
+                                                       hf_nfs_client_id4_id); 
+                                       }
                                }
 
-                               fitem = proto_tree_add_text(newftree, tvb, offset, 0,
-                                       "Callback");
+                               fitem = proto_tree_add_text(newftree, tvb, offset, 0, "callback");
                                if (fitem) {
                                        newftree = proto_item_add_subtree(fitem, ett_nfs_cb_client4);
                                        if (newftree)
-                                               offset = dissect_nfs_cb_client4(tvb, offset, pinfo, newftree, 
+                                               offset = dissect_nfs_cb_client4(tvb, offset, newftree, 
                                                        "callback");
                                }
                        }
                        break;
 
                case NFS4_OP_SETCLIENTID_CONFIRM:
-                       offset = dissect_nfs_verifier4(tvb, offset, pinfo, newftree,
-                                               "setclientid_confirm");
+                       offset = dissect_nfs_clientid4(tvb, offset, newftree);
                        break;
                
                case NFS4_OP_VERIFY:
                        offset = dissect_nfs_fattr4(tvb, offset, pinfo, newftree, 
-                                               "obj_attributes");
+                               "obj_attributes");
                        break;
 
                case NFS4_OP_WRITE:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
+                       offset = dissect_nfs_stateid4(tvb, offset, newftree);
+                       offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_offset4,
                                offset);
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_offset4,
-                               offset);
-                       offset = dissect_nfs_stable_how4(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_stable_how4(tvb, offset, newftree, 
                                "stable");
-                       offset = dissect_nfs_opaque4(tvb, offset, pinfo, newftree, "data");
+                       offset = dissect_nfs_opaque4(tvb, offset, newftree, "data");
                        break;
                
                default:
@@ -5297,17 +6141,19 @@ int
 dissect_nfs4_compound_call(tvbuff_t *tvb, int offset, packet_info *pinfo, 
        proto_tree* tree)
 {
-       offset = dissect_nfs_utf8string(tvb, offset, pinfo, tree, hf_nfs_tag4, NULL);
-       offset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nfs_minorversion,
+       offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_tag4, NULL);
+       offset = dissect_rpc_uint32(tvb, tree, hf_nfs_minorversion,
                offset);
        offset = dissect_nfs_argop4(tvb, offset, pinfo, tree);
+
        return offset;
 }
 
 int
 dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo, 
-       proto_tree *tree, char *name)
+       proto_tree *tree, char *name _U_)
 {
+       /* TODO: use parameter "name" */
        guint ops, ops_counter;
        guint opcode;
        proto_item *fitem;
@@ -5344,7 +6190,7 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                if (newftree == NULL)
                        break;          /* error adding new subtree to operation item */
 
-               offset = dissect_nfs_nfsstat4(tvb, offset, pinfo, newftree, &status);
+               offset = dissect_nfs_nfsstat4(tvb, offset, newftree, &status);
 
                /*
                 * With the exception of NFS4_OP_LOCK, NFS4_OP_LOCKT, and 
@@ -5360,31 +6206,24 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                switch(opcode)
                {
                case NFS4_OP_ACCESS:
-                       offset = dissect_access(tvb, offset, pinfo, newftree, "Supported");
-                       offset = dissect_access(tvb, offset, pinfo, newftree, "Access");
+                       offset = dissect_access(tvb, offset, newftree, "Supported");
+                       offset = dissect_access(tvb, offset, newftree, "Access");
                        break;
 
                case NFS4_OP_CLOSE:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
-                               offset);
+                       offset = dissect_nfs_stateid4(tvb, offset, newftree);
                        break;
 
                case NFS4_OP_COMMIT:
-                       offset = dissect_nfs_verifier4(tvb, offset, pinfo, newftree
-                               "writeverf");
+                       offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_verifier4
+                               offset);
                        break;
 
                case NFS4_OP_CREATE:
-                       offset = dissect_nfs_change_info4(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_change_info4(tvb, offset, newftree, 
                                "change_info");
-                       break;
-
-               case NFS4_OP_DELEGPURGE:
-                       /* void */
-                       break;
-
-               case NFS4_OP_DELEGRETURN:
-                       /* void */
+                       offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree,
+                               "attrsset", FATTR4_BITMAP_ONLY);
                        break;
 
                case NFS4_OP_GETATTR:
@@ -5397,156 +6236,127 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        break;
 
                case NFS4_OP_LINK:
-                       offset = dissect_nfs_change_info4(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_change_info4(tvb, offset, newftree, 
                                "change_info");
                        break;
 
                case NFS4_OP_LOCK:
                case NFS4_OP_LOCKT:
                        if (status == NFS4_OK)
-                               offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, 
-                                       hf_nfs_stateid4, offset);
+                               offset = dissect_nfs_stateid4(tvb, offset, newftree);
                        else
                        if (status == NFS4ERR_DENIED)
-                               offset = dissect_nfs_lock4denied(tvb, offset, pinfo, newftree, 
+                               offset = dissect_nfs_lock4denied(tvb, offset, newftree, 
                                        "denied");
                        break;
 
                case NFS4_OP_LOCKU:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
-                               offset);
-                       break;
-
-               case NFS4_OP_LOOKUP:
-                       /* void */
-                       break;
-
-               case NFS4_OP_LOOKUPP:
-                       /* void */
-                       break;
-
-               case NFS4_OP_NVERIFY:
-                       /* void */
+                       offset = dissect_nfs_stateid4(tvb, offset, newftree);
                        break;
 
                case NFS4_OP_OPEN:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
-                                       offset);
-                       offset = dissect_nfs_change_info4(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_stateid4(tvb, offset, newftree);
+                       offset = dissect_nfs_change_info4(tvb, offset, newftree, 
                                "change_info");
-                       offset = dissect_nfs_open4_rflags(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_open4_rflags(tvb, offset, newftree, 
                                "result_flags");
-                       offset = dissect_nfs_verifier4(tvb, offset, pinfo, newftree, 
-                               "verifier");
-                       offset = dissect_nfs_open_delegation4(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree, 
+                               "attrsset", FATTR4_BITMAP_ONLY);
+                       offset = dissect_nfs_open_delegation4(tvb, offset, newftree,
                                "delegation");
                        break;
 
-               case NFS4_OP_OPENATTR:
-                       /* void */
-                       break;
-
                case NFS4_OP_OPEN_CONFIRM:
                case NFS4_OP_OPEN_DOWNGRADE:
-                       offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree, hf_nfs_stateid4,
-                               offset);
-                       break;
-
-               case NFS4_OP_PUTFH:
-                       /* void */
-                       break;
-
-               case NFS4_OP_PUTPUBFH:
-                       /* void */
-                       break;
-               
-               case NFS4_OP_PUTROOTFH:
-                       /* void */
+                       offset = dissect_nfs_stateid4(tvb, offset, newftree);
                        break;
 
                case NFS4_OP_READ:
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, newftree, hf_nfs_eof, 
+                       offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_eof, 
                                offset);
-                       offset = dissect_nfs_opaque4(tvb, offset, pinfo, newftree, "data");
+                       offset = dissect_nfs_opaque4(tvb, offset, newftree, "data");
                        break;
 
                case NFS4_OP_READDIR:
-                       offset = dissect_nfs_verifier4(tvb, offset, pinfo, newftree
-                               "cookieverf");
+                       offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_verifier4
+                               offset);
                        offset = dissect_nfs_dirlist4(tvb, offset, pinfo, newftree, "reply");
                        break;
 
                case NFS4_OP_READLINK:
-                       offset = dissect_nfs_linktext4(tvb, offset, pinfo, newftree, "link");   
+                       offset = dissect_nfs_linktext4(tvb, offset, newftree, "link");
                        break;
 
                case NFS4_OP_REMOVE:
-                       offset = dissect_nfs_change_info4(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_change_info4(tvb, offset, newftree, 
                                "change_info");
                        break;
 
                case NFS4_OP_RENAME:
-                       offset = dissect_nfs_change_info4(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_change_info4(tvb, offset, newftree, 
                                "source_cinfo");
-                       offset = dissect_nfs_change_info4(tvb, offset, pinfo, newftree,
+                       offset = dissect_nfs_change_info4(tvb, offset, newftree,
                                "target_cinfo");
                        break;
 
-               case NFS4_OP_RENEW:
-                       /* void */
-                       break;
+               case NFS4_OP_SECINFO:
+                       {
+                               guint data_follows;
+                               guint flavor;
+                               proto_item *fitem;
+                               proto_tree *secftree;
 
-               case NFS4_OP_RESTOREFH:
-                       /* void */
-                       break;
+                               while ((data_follows = tvb_get_ntohl(tvb, offset)))
+                               {
+                                       offset += 4;
 
-               case NFS4_OP_SAVEFH:
-                       /* void */
-                       break;
+                                       flavor = tvb_get_ntohl(tvb, offset);
+                                       fitem = proto_tree_add_uint(tree, hf_nfs_secinfo_flavor, tvb, 
+                                                       offset, 4, flavor);
+                                       offset += 4;
 
-               case NFS4_OP_SECINFO:
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, newftree, 
-                               hf_nfs_secinfo_flavor, offset);
-                       offset = dissect_nfs_opaque4(tvb, offset, pinfo, newftree, 
-                               "flavor_info");
+                                       if (fitem) 
+                                       {
+                                               switch(flavor)
+                                               {
+                                                       case RPCSEC_GSS:
+                                                               secftree = proto_item_add_subtree(fitem, 
+                                                                               ett_nfs_secinfo4_flavor_info);
+                                                               if (secftree)
+                                                                       offset = dissect_nfs_rpcsec_gss_info(tvb, offset,
+                                                                                       secftree);
+                                                               break;
+
+                                                       default:
+                                                               break;
+                                               }
+                                       }
+                               }
+                       }
                        break;
 
                case NFS4_OP_SETATTR:
                        offset = dissect_nfs_attributes(tvb, offset, pinfo, newftree, 
-                               "attrsset", 0);
+                               "attrsset", FATTR4_BITMAP_ONLY);
                        break;
 
                case NFS4_OP_SETCLIENTID:
                        if (status == NFS4_OK)
-                       {
-                               offset = dissect_rpc_uint64_tvb(tvb, pinfo, newftree,
+                               offset = dissect_rpc_uint64(tvb, newftree,
                                        hf_nfs_clientid4, offset);
-                               offset = dissect_nfs_verifier4(tvb, offset, pinfo, newftree,
-                                       "setclientid_confirm");
-                       }
                        else
                        if (status == NFS4ERR_CLID_INUSE)
-                       {
-                               offset = dissect_nfs_clientaddr4(tvb, offset, pinfo, newftree,
+                               offset = dissect_nfs_clientaddr4(tvb, offset, newftree,
                                        "client_using");
-                       }
-                       break;
-
-               case NFS4_OP_SETCLIENTID_CONFIRM:
-                       /* void */
-                       break;
-
-               case NFS4_OP_VERIFY:
-                       /* void */
                        break;
 
                case NFS4_OP_WRITE:
-                       offset = dissect_rpc_uint32_tvb(tvb, pinfo, newftree, hf_nfs_count4,
+                       offset = dissect_rpc_uint32(tvb, newftree, hf_nfs_count4,
                                offset);
-                       offset = dissect_nfs_stable_how4(tvb, offset, pinfo, newftree, 
+                       offset = dissect_nfs_stable_how4(tvb, offset, newftree, 
                                "committed");
-                       offset = dissect_nfs_verifier4(tvb, offset, pinfo, newftree,
-                               "writeverf");
+                       offset = dissect_rpc_uint64(tvb, newftree, hf_nfs_verifier4, 
+                               offset);
                        break;
 
                default:
@@ -5563,8 +6373,8 @@ dissect_nfs4_compound_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
 {
        guint32 status;
 
-       offset = dissect_nfs_nfsstat4(tvb, offset, pinfo, tree, &status);
-       offset = dissect_nfs_utf8string(tvb, offset, pinfo, tree, hf_nfs_tag4, NULL);
+       offset = dissect_nfs_nfsstat4(tvb, offset, tree, &status);
+       offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs_tag4, NULL);
        offset = dissect_nfs_resop4(tvb, offset, pinfo, tree, "arguments");
 
        return offset;
@@ -5638,759 +6448,881 @@ void
 proto_register_nfs(void)
 {
        static hf_register_info hf[] = {
+               { &hf_nfs_fh_length, {
+                       "length", "nfs.fh.length", FT_UINT32, BASE_DEC,
+                       NULL, 0, "file handle length", HFILL }},
+               { &hf_nfs_fh_hash, {
+                       "hash", "nfs.fh.hash", FT_UINT32, BASE_HEX,
+                       NULL, 0, "file handle hash", HFILL }},
                { &hf_nfs_fh_fsid_major, {
                        "major", "nfs.fh.fsid.major", FT_UINT32, BASE_DEC,
-                       NULL, 0, "major file system ID" }},
+                       NULL, 0, "major file system ID", HFILL }},
                { &hf_nfs_fh_fsid_minor, {
                        "minor", "nfs.fh.fsid.minor", FT_UINT32, BASE_DEC,
-                       NULL, 0, "minor file system ID" }},
+                       NULL, 0, "minor file system ID", HFILL }},
+               { &hf_nfs_fh_fsid_inode, {
+                       "inode", "nfs.fh.fsid.inode", FT_UINT32, BASE_DEC,
+                       NULL, 0, "file system inode", HFILL }},
                { &hf_nfs_fh_xfsid_major, {
                        "exported major", "nfs.fh.xfsid.major", FT_UINT32, BASE_DEC,
-                       NULL, 0, "exported major file system ID" }},
+                       NULL, 0, "exported major file system ID", HFILL }},
                { &hf_nfs_fh_xfsid_minor, {
                        "exported minor", "nfs.fh.xfsid.minor", FT_UINT32, BASE_DEC,
-                       NULL, 0, "exported minor file system ID" }},
+                       NULL, 0, "exported minor file system ID", HFILL }},
                { &hf_nfs_fh_fstype, {
                        "file system type", "nfs.fh.fstype", FT_UINT32, BASE_DEC,
-                       NULL, 0, "file system type" }},
+                       NULL, 0, "file system type", HFILL }},
                { &hf_nfs_fh_fn, {
                        "file number", "nfs.fh.fn", FT_UINT32, BASE_DEC,
-                       NULL, 0, "file number" }},
+                       NULL, 0, "file number", HFILL }},
                { &hf_nfs_fh_fn_len, {
                        "length", "nfs.fh.fn.len", FT_UINT32, BASE_DEC,
-                       NULL, 0, "file number length" }},
+                       NULL, 0, "file number length", HFILL }},
                { &hf_nfs_fh_fn_inode, {
                        "inode", "nfs.fh.fn.inode", FT_UINT32, BASE_DEC,
-                       NULL, 0, "file number inode" }},
+                       NULL, 0, "file number inode", HFILL }},
                { &hf_nfs_fh_fn_generation, {
                        "generation", "nfs.fh.fn.generation", FT_UINT32, BASE_DEC,
-                       NULL, 0, "file number generation" }},
+                       NULL, 0, "file number generation", HFILL }},
                { &hf_nfs_fh_xfn, {
                        "exported file number", "nfs.fh.xfn", FT_UINT32, BASE_DEC,
-                       NULL, 0, "exported file number" }},
+                       NULL, 0, "exported file number", HFILL }},
                { &hf_nfs_fh_xfn_len, {
                        "length", "nfs.fh.xfn.len", FT_UINT32, BASE_DEC,
-                       NULL, 0, "exported file number length" }},
+                       NULL, 0, "exported file number length", HFILL }},
                { &hf_nfs_fh_xfn_inode, {
                        "exported inode", "nfs.fh.xfn.inode", FT_UINT32, BASE_DEC,
-                       NULL, 0, "exported file number inode" }},
+                       NULL, 0, "exported file number inode", HFILL }},
                { &hf_nfs_fh_xfn_generation, {
                        "generation", "nfs.fh.xfn.generation", FT_UINT32, BASE_DEC,
-                       NULL, 0, "exported file number generation" }},
+                       NULL, 0, "exported file number generation", HFILL }},
                { &hf_nfs_fh_dentry, {
                        "dentry", "nfs.fh.dentry", FT_UINT32, BASE_HEX,
-                       NULL, 0, "dentry (cookie)" }},
+                       NULL, 0, "dentry (cookie)", HFILL }},
                { &hf_nfs_fh_dev, {
                        "device", "nfs.fh.dev", FT_UINT32, BASE_DEC,
-                       NULL, 0, "device" }},
+                       NULL, 0, "device", HFILL }},
                { &hf_nfs_fh_xdev, {
                        "exported device", "nfs.fh.xdev", FT_UINT32, BASE_DEC,
-                       NULL, 0, "exported device" }},
+                       NULL, 0, "exported device", HFILL }},
                { &hf_nfs_fh_dirinode, {
                        "directory inode", "nfs.fh.dirinode", FT_UINT32, BASE_DEC,
-                       NULL, 0, "directory inode" }},
+                       NULL, 0, "directory inode", HFILL }},
                { &hf_nfs_fh_pinode, {
                        "pseudo inode", "nfs.fh.pinode", FT_UINT32, BASE_HEX,
-                       NULL, 0, "pseudo inode" }},
+                       NULL, 0, "pseudo inode", HFILL }},
                { &hf_nfs_fh_hp_len, {
                        "length", "nfs.fh.hp.len", FT_UINT32, BASE_DEC,
-                       NULL, 0, "hash path length" }},
+                       NULL, 0, "hash path length", HFILL }},
+               { &hf_nfs_fh_version, {
+                       "version", "nfs.fh.version", FT_UINT8, BASE_DEC,
+                       NULL, 0, "file handle layout version", HFILL }},
+               { &hf_nfs_fh_auth_type, {
+                       "auth_type", "nfs.fh.auth_type", FT_UINT8, BASE_DEC,
+                       VALS(auth_type_names), 0, "authentication type", HFILL }},
+               { &hf_nfs_fh_fsid_type, {
+                       "fsid_type", "nfs.fh.fsid_type", FT_UINT8, BASE_DEC,
+                       VALS(fsid_type_names), 0, "file system ID type", HFILL }},
+               { &hf_nfs_fh_fileid_type, {
+                       "fileid_type", "nfs.fh.fileid_type", FT_UINT8, BASE_DEC,
+                       VALS(fileid_type_names), 0, "file ID type", HFILL }},
                { &hf_nfs_stat, {
                        "Status", "nfs.status2", FT_UINT32, BASE_DEC,
-                       VALS(names_nfs_stat), 0, "Reply status" }},
+                       VALS(names_nfs_stat), 0, "Reply status", HFILL }},
+               { &hf_nfs_full_name, {
+                       "Full Name", "nfs.full_name", FT_STRING, BASE_DEC,
+                       NULL, 0, "Full Name", HFILL }},
                { &hf_nfs_name, {
                        "Name", "nfs.name", FT_STRING, BASE_DEC,
-                       NULL, 0, "Name" }},
+                       NULL, 0, "Name", HFILL }},
                { &hf_nfs_readlink_data, {
                        "Data", "nfs.readlink.data", FT_STRING, BASE_DEC,
-                       NULL, 0, "Symbolic Link Data" }},
+                       NULL, 0, "Symbolic Link Data", HFILL }},
                { &hf_nfs_read_offset, {
                        "Offset", "nfs.read.offset", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Read Offset" }},
+                       NULL, 0, "Read Offset", HFILL }},
                { &hf_nfs_read_count, {
                        "Count", "nfs.read.count", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Read Count" }},
+                       NULL, 0, "Read Count", HFILL }},
                { &hf_nfs_read_totalcount, {
                        "Total Count", "nfs.read.totalcount", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Total Count (obsolete)" }},
+                       NULL, 0, "Total Count (obsolete)", HFILL }},
                { &hf_nfs_data, {
                        "Data", "nfs.data", FT_BYTES, BASE_DEC,
-                       NULL, 0, "Data" }},
+                       NULL, 0, "Data", HFILL }},
                { &hf_nfs_write_beginoffset, {
                        "Begin Offset", "nfs.write.beginoffset", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Begin offset (obsolete)" }},
+                       NULL, 0, "Begin offset (obsolete)", HFILL }},
                { &hf_nfs_write_offset, {
                        "Offset", "nfs.write.offset", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Offset" }},
+                       NULL, 0, "Offset", HFILL }},
                { &hf_nfs_write_totalcount, {
                        "Total Count", "nfs.write.totalcount", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Total Count (obsolete)" }},
+                       NULL, 0, "Total Count (obsolete)", HFILL }},
                { &hf_nfs_symlink_to, {
                        "To", "nfs.symlink.to", FT_STRING, BASE_DEC,
-                       NULL, 0, "Symbolic link destination name" }},
+                       NULL, 0, "Symbolic link destination name", HFILL }},
                { &hf_nfs_readdir_cookie, {
                        "Cookie", "nfs.readdir.cookie", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Directory Cookie" }},
+                       NULL, 0, "Directory Cookie", HFILL }},
                { &hf_nfs_readdir_count, {
                        "Count", "nfs.readdir.count", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Directory Count" }},
+                       NULL, 0, "Directory Count", HFILL }},
 
                { &hf_nfs_readdir_entry, {
                        "Entry", "nfs.readdir.entry", FT_NONE, 0,
-                       NULL, 0, "Directory Entry" }},
+                       NULL, 0, "Directory Entry", HFILL }},
 
                { &hf_nfs_readdir_entry_fileid, {
                        "File ID", "nfs.readdir.entry.fileid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "File ID" }},
+                       NULL, 0, "File ID", HFILL }},
 
                { &hf_nfs_readdir_entry_name, {
                        "Name", "nfs.readdir.entry.name", FT_STRING, BASE_DEC,
-                       NULL, 0, "Name" }},
+                       NULL, 0, "Name", HFILL }},
 
                { &hf_nfs_readdir_entry_cookie, {
                        "Cookie", "nfs.readdir.entry.cookie", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Directory Cookie" }},
+                       NULL, 0, "Directory Cookie", HFILL }},
 
                { &hf_nfs_readdir_entry3_fileid, {
-                       "File ID", "nfs.readdir.entry3.fileid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "File ID" }},
+                       "File ID", "nfs.readdir.entry3.fileid", FT_UINT64, BASE_DEC,
+                       NULL, 0, "File ID", HFILL }},
 
                { &hf_nfs_readdir_entry3_name, {
                        "Name", "nfs.readdir.entry3.name", FT_STRING, BASE_DEC,
-                       NULL, 0, "Name" }},
+                       NULL, 0, "Name", HFILL }},
 
                { &hf_nfs_readdir_entry3_cookie, {
-                       "Cookie", "nfs.readdir.entry3.cookie", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Directory Cookie" }},
+                       "Cookie", "nfs.readdir.entry3.cookie", FT_UINT64, BASE_DEC,
+                       NULL, 0, "Directory Cookie", HFILL }},
 
                { &hf_nfs_readdirplus_entry_fileid, {
-                       "File ID", "nfs.readdirplus.entry.fileid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Name" }},
+                       "File ID", "nfs.readdirplus.entry.fileid", FT_UINT64, BASE_DEC,
+                       NULL, 0, "Name", HFILL }},
 
                { &hf_nfs_readdirplus_entry_name, {
                        "Name", "nfs.readdirplus.entry.name", FT_STRING, BASE_DEC,
-                       NULL, 0, "Name" }},
+                       NULL, 0, "Name", HFILL }},
 
                { &hf_nfs_readdirplus_entry_cookie, {
-                       "Cookie", "nfs.readdirplus.entry.cookie", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Directory Cookie" }},
+                       "Cookie", "nfs.readdirplus.entry.cookie", FT_UINT64, BASE_DEC,
+                       NULL, 0, "Directory Cookie", HFILL }},
 
                { &hf_nfs_readdir_eof, {
                        "EOF", "nfs.readdir.eof", FT_UINT32, BASE_DEC,
-                       NULL, 0, "EOF" }},
+                       NULL, 0, "EOF", HFILL }},
 
                { &hf_nfs_statfs_tsize, {
                        "Transfer Size", "nfs.statfs.tsize", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Transfer Size" }},
+                       NULL, 0, "Transfer Size", HFILL }},
                { &hf_nfs_statfs_bsize, {
                        "Block Size", "nfs.statfs.bsize", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Block Size" }},
+                       NULL, 0, "Block Size", HFILL }},
                { &hf_nfs_statfs_blocks, {
                        "Total Blocks", "nfs.statfs.blocks", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Total Blocks" }},
+                       NULL, 0, "Total Blocks", HFILL }},
                { &hf_nfs_statfs_bfree, {
                        "Free Blocks", "nfs.statfs.bfree", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Free Blocks" }},
+                       NULL, 0, "Free Blocks", HFILL }},
                { &hf_nfs_statfs_bavail, {
                        "Available Blocks", "nfs.statfs.bavail", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Available Blocks" }},
+                       NULL, 0, "Available Blocks", HFILL }},
                { &hf_nfs_ftype3, {
                        "Type", "nfs.type", FT_UINT32, BASE_DEC,
-                       VALS(names_nfs_ftype3), 0, "File Type" }},
+                       VALS(names_nfs_ftype3), 0, "File Type", HFILL }},
                { &hf_nfs_nfsstat3, {
                        "Status", "nfs.status", FT_UINT32, BASE_DEC,
-                       VALS(names_nfs_nfsstat3), 0, "Reply status" }},
+                       VALS(names_nfs_nfsstat3), 0, "Reply status", HFILL }},
                { &hf_nfs_read_eof, {
                        "EOF", "nfs.read.eof", FT_BOOLEAN, BASE_NONE,
-                       &yesno, 0, "EOF" }},
+                       &yesno, 0, "EOF", HFILL }},
                { &hf_nfs_write_stable, {
                        "Stable", "nfs.write.stable", FT_UINT32, BASE_DEC,
-                       VALS(names_stable_how), 0, "Stable" }},
+                       VALS(names_stable_how), 0, "Stable", HFILL }},
                { &hf_nfs_write_committed, {
                        "Committed", "nfs.write.committed", FT_UINT32, BASE_DEC,
-                       VALS(names_stable_how), 0, "Committed" }},
+                       VALS(names_stable_how), 0, "Committed", HFILL }},
                { &hf_nfs_createmode3, {
                        "Create Mode", "nfs.createmode", FT_UINT32, BASE_DEC,
-                       VALS(names_createmode3), 0, "Create Mode" }},
+                       VALS(names_createmode3), 0, "Create Mode", HFILL }},
                { &hf_nfs_fsstat_invarsec, {
                        "invarsec", "nfs.fsstat.invarsec", FT_UINT32, BASE_DEC,
-                       NULL, 0, "probable number of seconds of file system invariance" }},
+                       NULL, 0, "probable number of seconds of file system invariance", HFILL }},
                { &hf_nfs_fsinfo_rtmax, {
                        "rtmax", "nfs.fsinfo.rtmax", FT_UINT32, BASE_DEC,
-                       NULL, 0, "maximum READ request" }},
+                       NULL, 0, "maximum READ request", HFILL }},
                { &hf_nfs_fsinfo_rtpref, {
                        "rtpref", "nfs.fsinfo.rtpref", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Preferred READ request size" }},
+                       NULL, 0, "Preferred READ request size", HFILL }},
                { &hf_nfs_fsinfo_rtmult, {
                        "rtmult", "nfs.fsinfo.rtmult", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Suggested READ multiple" }},
+                       NULL, 0, "Suggested READ multiple", HFILL }},
                { &hf_nfs_fsinfo_wtmax, {
                        "wtmax", "nfs.fsinfo.wtmax", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Maximum WRITE request size" }},
+                       NULL, 0, "Maximum WRITE request size", HFILL }},
                { &hf_nfs_fsinfo_wtpref, {
                        "wtpref", "nfs.fsinfo.wtpref", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Preferred WRITE request size" }},
+                       NULL, 0, "Preferred WRITE request size", HFILL }},
                { &hf_nfs_fsinfo_wtmult, {
                        "wtmult", "nfs.fsinfo.wtmult", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Suggested WRITE multiple" }},
+                       NULL, 0, "Suggested WRITE multiple", HFILL }},
                { &hf_nfs_fsinfo_dtpref, {
                        "dtpref", "nfs.fsinfo.dtpref", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Preferred READDIR request" }},
+                       NULL, 0, "Preferred READDIR request", HFILL }},
                { &hf_nfs_fsinfo_maxfilesize, {
-                       "maxfilesize", "nfs.fsinfo.maxfilesize", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Maximum file size" }},
+                       "maxfilesize", "nfs.fsinfo.maxfilesize", FT_UINT64, BASE_DEC,
+                       NULL, 0, "Maximum file size", HFILL }},
                { &hf_nfs_fsinfo_properties, {
                        "Properties", "nfs.fsinfo.propeties", FT_UINT32, BASE_HEX,
-                       NULL, 0, "File System Properties" }},
+                       NULL, 0, "File System Properties", HFILL }},
                { &hf_nfs_pathconf_linkmax, {
                        "linkmax", "nfs.pathconf.linkmax", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Maximum number of hard links" }},
+                       NULL, 0, "Maximum number of hard links", HFILL }},
                { &hf_nfs_pathconf_name_max, {
                        "name_max", "nfs.pathconf.name_max", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Maximum file name length" }},
+                       NULL, 0, "Maximum file name length", HFILL }},
                { &hf_nfs_pathconf_no_trunc, {
                        "no_trunc", "nfs.pathconf.no_trunc", FT_BOOLEAN, BASE_NONE,
-                       &yesno, 0, "No long file name truncation" }},
+                       &yesno, 0, "No long file name truncation", HFILL }},
                { &hf_nfs_pathconf_chown_restricted, {
                        "chown_restricted", "nfs.pathconf.chown_restricted", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "chown is restricted to root" }},
+                       BASE_NONE, &yesno, 0, "chown is restricted to root", HFILL }},
                { &hf_nfs_pathconf_case_insensitive, {
                        "case_insensitive", "nfs.pathconf.case_insensitive", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "file names are treated case insensitive" }},
+                       BASE_NONE, &yesno, 0, "file names are treated case insensitive", HFILL }},
                { &hf_nfs_pathconf_case_preserving, {
                        "case_preserving", "nfs.pathconf.case_preserving", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "file name cases are preserved" }},
+                       BASE_NONE, &yesno, 0, "file name cases are preserved", HFILL }},
 
                { &hf_nfs_fattr_type, {
                        "type", "nfs.fattr.type", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr.type" }},
+                       NULL, 0, "nfs.fattr.type", HFILL }},
 
                { &hf_nfs_fattr_nlink, {
                        "nlink", "nfs.fattr.nlink", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr.nlink" }},
+                       NULL, 0, "nfs.fattr.nlink", HFILL }},
 
                { &hf_nfs_fattr_uid, {
                        "uid", "nfs.fattr.uid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr.uid" }},
+                       NULL, 0, "nfs.fattr.uid", HFILL }},
 
                { &hf_nfs_fattr_gid, {
                        "gid", "nfs.fattr.gid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr.gid" }},
+                       NULL, 0, "nfs.fattr.gid", HFILL }},
 
                { &hf_nfs_fattr_size, {
                        "size", "nfs.fattr.size", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr.size" }},
+                       NULL, 0, "nfs.fattr.size", HFILL }},
 
                { &hf_nfs_fattr_blocksize, {
                        "blocksize", "nfs.fattr.blocksize", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr.blocksize" }},
+                       NULL, 0, "nfs.fattr.blocksize", HFILL }},
 
                { &hf_nfs_fattr_rdev, {
                        "rdev", "nfs.fattr.rdev", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr.rdev" }},
+                       NULL, 0, "nfs.fattr.rdev", HFILL }},
 
                { &hf_nfs_fattr_blocks, {
                        "blocks", "nfs.fattr.blocks", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr.blocks" }},
+                       NULL, 0, "nfs.fattr.blocks", HFILL }},
 
                { &hf_nfs_fattr_fsid, {
                        "fsid", "nfs.fattr.fsid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr.fsid" }},
+                       NULL, 0, "nfs.fattr.fsid", HFILL }},
 
                { &hf_nfs_fattr_fileid, {
                        "fileid", "nfs.fattr.fileid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr.fileid" }},
+                       NULL, 0, "nfs.fattr.fileid", HFILL }},
 
                { &hf_nfs_fattr3_type, {
                        "Type", "nfs.fattr3.type", FT_UINT32, BASE_DEC,
-                       VALS(names_nfs_ftype3), 0, "nfs.fattr3.type" }},
+                       VALS(names_nfs_ftype3), 0, "nfs.fattr3.type", HFILL }},
 
                { &hf_nfs_fattr3_nlink, {
                        "nlink", "nfs.fattr3.nlink", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr3.nlink" }},
+                       NULL, 0, "nfs.fattr3.nlink", HFILL }},
 
                { &hf_nfs_fattr3_uid, {
                        "uid", "nfs.fattr3.uid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr3.uid" }},
+                       NULL, 0, "nfs.fattr3.uid", HFILL }},
 
                { &hf_nfs_fattr3_gid, {
                        "gid", "nfs.fattr3.gid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr3.gid" }},
+                       NULL, 0, "nfs.fattr3.gid", HFILL }},
 
                { &hf_nfs_fattr3_size, {
-                       "size", "nfs.fattr3.size", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr3.size" }},
+                       "size", "nfs.fattr3.size", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr3.size", HFILL }},
 
                { &hf_nfs_fattr3_used, {
-                       "used", "nfs.fattr3.used", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr3.used" }},
+                       "used", "nfs.fattr3.used", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr3.used", HFILL }},
 
                { &hf_nfs_fattr3_rdev, {
                        "rdev", "nfs.fattr3.rdev", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr3.rdev" }},
+                       NULL, 0, "nfs.fattr3.rdev", HFILL }},
 
                { &hf_nfs_fattr3_fsid, {
-                       "fsid", "nfs.fattr3.fsid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr3.fsid" }},
+                       "fsid", "nfs.fattr3.fsid", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr3.fsid", HFILL }},
 
                { &hf_nfs_fattr3_fileid, {
-                       "fileid", "nfs.fattr3.fileid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr3.fileid" }},
+                       "fileid", "nfs.fattr3.fileid", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr3.fileid", HFILL }},
 
                { &hf_nfs_wcc_attr_size, {
-                       "size", "nfs.wcc_attr.size", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.wcc_attr.size" }},
+                       "size", "nfs.wcc_attr.size", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.wcc_attr.size", HFILL }},
 
                { &hf_nfs_set_size3_size, {
-                       "size", "nfs.set_size3.size", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.set_size3.size" }},
+                       "size", "nfs.set_size3.size", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.set_size3.size", HFILL }},
 
                { &hf_nfs_uid3, {
                        "uid", "nfs.uid3", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.uid3" }},
+                       NULL, 0, "nfs.uid3", HFILL }},
 
                { &hf_nfs_gid3, {
                        "gid", "nfs.gid3", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.gid3" }},
+                       NULL, 0, "nfs.gid3", HFILL }},
 
                { &hf_nfs_cookie3, {
-                       "cookie", "nfs.cookie3", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.cookie3" }},
+                       "cookie", "nfs.cookie3", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.cookie3", HFILL }},
 
                { &hf_nfs_offset3, {
-                       "offset", "nfs.offset3", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.offset3" }},
+                       "offset", "nfs.offset3", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.offset3", HFILL }},
 
                { &hf_nfs_count3, {
                        "count", "nfs.count3", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.count3" }},
+                       NULL, 0, "nfs.count3", HFILL }},
 
                { &hf_nfs_count3_maxcount, {
                        "maxcount", "nfs.count3_maxcount", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.count3_maxcount" }},
+                       NULL, 0, "nfs.count3_maxcount", HFILL }},
 
                { &hf_nfs_count3_dircount, {
                        "dircount", "nfs.count3_dircount", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.count3_dircount" }},
+                       NULL, 0, "nfs.count3_dircount", HFILL }},
 
                { &hf_nfs_fsstat3_resok_tbytes, {
-                       "tbytes", "nfs.fsstat3_resok.tbytes", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fsstat3_resok.tbytes" }},
+                       "Total bytes", "nfs.fsstat3_resok.tbytes", FT_UINT64, BASE_DEC,
+                       NULL, 0, "Total bytes", HFILL }},
 
                { &hf_nfs_fsstat3_resok_fbytes, {
-                       "fbytes", "nfs.fsstat3_resok.fbytes", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fsstat3_resok.fbytes" }},
+                       "Free bytes", "nfs.fsstat3_resok.fbytes", FT_UINT64, BASE_DEC,
+                       NULL, 0, "Free bytes", HFILL }},
 
                { &hf_nfs_fsstat3_resok_abytes, {
-                       "abytes", "nfs.fsstat3_resok.abytes", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fsstat3_resok.abytes" }},
+                       "Available free bytes", "nfs.fsstat3_resok.abytes", FT_UINT64, BASE_DEC,
+                       NULL, 0, "Available free bytes", HFILL }},
 
                { &hf_nfs_fsstat3_resok_tfiles, {
-                       "tfiles", "nfs.fsstat3_resok.tfiles", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fsstat3_resok.tfiles" }},
+                       "Total file slots", "nfs.fsstat3_resok.tfiles", FT_UINT64, BASE_DEC,
+                       NULL, 0, "Total file slots", HFILL }},
 
                { &hf_nfs_fsstat3_resok_ffiles, {
-                       "ffiles", "nfs.fsstat3_resok.ffiles", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fsstat3_resok.ffiles" }},
+                       "Free file slots", "nfs.fsstat3_resok.ffiles", FT_UINT64, BASE_DEC,
+                       NULL, 0, "Free file slots", HFILL }},
 
                { &hf_nfs_fsstat3_resok_afiles, {
-                       "afiles", "nfs.fsstat3_resok.afiles", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fsstat3_resok.afiles" }},
+                       "Available free file slots", "nfs.fsstat3_resok.afiles", FT_UINT64, BASE_DEC,
+                       NULL, 0, "Available free file slots", HFILL }},
 
                /* NFSv4 */
 
                { &hf_nfs_argop4, {
                        "Opcode", "nfs.call.operation", FT_UINT32, BASE_DEC,
-                       VALS(names_nfsv4_operation), 0, "Opcode" }},
+                       VALS(names_nfsv4_operation), 0, "Opcode", HFILL }},
 
                { &hf_nfs_resop4,       {
                        "Opcode", "nfs.reply.operation", FT_UINT32, BASE_DEC,
-                       VALS(names_nfsv4_operation), 0, "Opcode" }},
+                       VALS(names_nfsv4_operation), 0, "Opcode", HFILL }},
 
                { &hf_nfs_linktext4, {
                        "Name", "nfs.symlink.linktext", FT_STRING, BASE_DEC,
-                       NULL, 0, "Symbolic link contents" }},
+                       NULL, 0, "Symbolic link contents", HFILL }},
 
                { &hf_nfs_component4, {
                        "Filename", "nfs.pathname.component", FT_STRING, BASE_DEC,
-                       NULL, 0, "Pathname component" }},
+                       NULL, 0, "Pathname component", HFILL }},
 
                { &hf_nfs_tag4, {
                        "Tag", "nfs.tag", FT_STRING, BASE_DEC,
-                       NULL, 0, "Tag" }},
+                       NULL, 0, "Tag", HFILL }},
 
                { &hf_nfs_clientid4, {
-                       "clientid", "nfs.clientid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Client ID" }},
-
-               { &hf_nfs_clientid4_verifier, {
-                       "verifier", "nfs.clientid.verifier", FT_UINT32, BASE_DEC,
-                       NULL, 0, "Verifier Client ID" }},
+                       "clientid", "nfs.clientid", FT_UINT64, BASE_DEC,
+                       NULL, 0, "Client ID", HFILL }},
 
                { &hf_nfs_ace4, {
                        "ace", "nfs.ace", FT_STRING, BASE_DEC,
-                       NULL, 0, "Access Control Entry" }},
+                       NULL, 0, "Access Control Entry", HFILL }},
 
                { &hf_nfs_recall, {
                        "EOF", "nfs.recall", FT_BOOLEAN, BASE_NONE,
-                       &yesno, 0, "Recall" }},
+                       &yesno, 0, "Recall", HFILL }},
 
                { &hf_nfs_open_claim_type4, {
                        "Claim Type", "nfs.open.claim_type", FT_UINT32, BASE_DEC,
-                       VALS(names_claim_type4), 0, "Claim Type" }},
+                       VALS(names_claim_type4), 0, "Claim Type", HFILL }},
 
                { &hf_nfs_opentype4, {
                        "Open Type", "nfs.open.opentype", FT_UINT32, BASE_DEC,
-                       VALS(names_opentype4), 0, "Open Type" }},
+                       VALS(names_opentype4), 0, "Open Type", HFILL }},
 
                { &hf_nfs_limit_by4, {
                        "Space Limit", "nfs.open.limit_by", FT_UINT32, BASE_DEC,
-                       VALS(names_limit_by4), 0, "Limit By" }},
+                       VALS(names_limit_by4), 0, "Limit By", HFILL }},
 
                { &hf_nfs_open_delegation_type4, {
                        "Delegation Type", "nfs.open.delegation_type", FT_UINT32, BASE_DEC,
-                       VALS(names_open_delegation_type4), 0, "Delegation Type" }},
+                       VALS(names_open_delegation_type4), 0, "Delegation Type", HFILL }},
 
                { &hf_nfs_ftype4, {
                        "nfs_ftype4", "nfs.nfs_ftype4", FT_UINT32, BASE_DEC,
-                       VALS(names_ftype4), 0, "nfs.nfs_ftype4" }},
+                       VALS(names_ftype4), 0, "nfs.nfs_ftype4", HFILL }},
 
                { &hf_nfs_change_info4_atomic, {
                        "Atomic", "nfs.change_info.atomic", FT_BOOLEAN, BASE_NONE,
-                       &yesno, 0, "Atomic" }},
+                       &yesno, 0, "Atomic", HFILL }},
 
                { &hf_nfs_open4_share_access, {
                        "share_access", "nfs.open4.share_access", FT_UINT32, BASE_DEC,
-                       VALS(names_open4_share_access), 0, "Share Access" }},
+                       VALS(names_open4_share_access), 0, "Share Access", HFILL }},
 
                { &hf_nfs_open4_share_deny, {
                        "share_deny", "nfs.open4.share_deny", FT_UINT32, BASE_DEC,
-                       VALS(names_open4_share_deny), 0, "Share Deny" }},
+                       VALS(names_open4_share_deny), 0, "Share Deny", HFILL }},
 
                { &hf_nfs_seqid4, {
                        "seqid", "nfs.seqid", FT_UINT32, BASE_HEX,
-                       NULL, 0, "Sequence ID" }},
+                       NULL, 0, "Sequence ID", HFILL }},
+
+               { &hf_nfs_lock_seqid4, {
+                       "lock_seqid", "nfs.lock_seqid", FT_UINT32, BASE_HEX,
+                       NULL, 0, "Lock Sequence ID", HFILL }},
 
                { &hf_nfs_mand_attr, {
                        "mand_attr",    "nfs.attr", FT_UINT32, BASE_DEC,
-                       VALS(names_fattr4), 0, "Mandatory Attribute" }},
+                       VALS(names_fattr4), 0, "Mandatory Attribute", HFILL }},
 
                { &hf_nfs_recc_attr, {
                        "recc_attr",    "nfs.attr", FT_UINT32, BASE_DEC,
-                       VALS(names_fattr4), 0, "Recommended Attribute" }},
+                       VALS(names_fattr4), 0, "Recommended Attribute", HFILL }},
 
                { &hf_nfs_time_how4,    {
                        "set_it", "nfs.set_it", FT_UINT32, BASE_DEC,
-                       VALS(names_time_how4), 0, "How To Set Time" }},
+                       VALS(names_time_how4), 0, "How To Set Time", HFILL }},
 
                { &hf_nfs_attrlist4, {
                        "attr_vals", "nfs.fattr4.attr_vals", FT_BYTES, BASE_DEC,
-                       NULL, 0, "attr_vals" }},
-
-               { &hf_nfs_fattr4_expire_type, {
-                       "fattr4_expire_type", "nfs.fattr4_expire_type", FT_UINT32, BASE_DEC,
-                       VALS(names_fattr4_expire_type), 0, "fattr4_expire_type" }},
+                       NULL, 0, "attr_vals", HFILL }},
 
                { &hf_nfs_fattr4_link_support, {
                        "fattr4_link_support", "nfs.fattr4_link_support", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.fattr4_link_support" }},
+                       BASE_NONE, &yesno, 0, "nfs.fattr4_link_support", HFILL }},
 
                { &hf_nfs_fattr4_symlink_support, {
                        "fattr4_symlink_support", "nfs.fattr4_symlink_support", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.fattr4_symlink_support" }},
+                       BASE_NONE, &yesno, 0, "nfs.fattr4_symlink_support", HFILL }},
 
                { &hf_nfs_fattr4_named_attr, {
                        "fattr4_named_attr", "nfs.fattr4_named_attr", FT_BOOLEAN, BASE_NONE,
-                       &yesno, 0, "nfs.fattr4_named_attr" }},
+                       &yesno, 0, "nfs.fattr4_named_attr", HFILL }},
 
                { &hf_nfs_fattr4_unique_handles, {
                        "fattr4_unique_handles", "nfs.fattr4_unique_handles", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.fattr4_unique_handles" }},
+                       BASE_NONE, &yesno, 0, "nfs.fattr4_unique_handles", HFILL }},
 
                { &hf_nfs_fattr4_archive, {
                        "fattr4_archive", "nfs.fattr4_archive", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.fattr4_archive" }},
+                       BASE_NONE, &yesno, 0, "nfs.fattr4_archive", HFILL }},
 
                { &hf_nfs_fattr4_cansettime, {
                        "fattr4_cansettime", "nfs.fattr4_cansettime", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.fattr4_cansettime" }},
+                       BASE_NONE, &yesno, 0, "nfs.fattr4_cansettime", HFILL }},
 
                { &hf_nfs_fattr4_case_insensitive, {
                        "fattr4_case_insensitive", "nfs.fattr4_case_insensitive", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.fattr4_case_insensitive" }},
+                       BASE_NONE, &yesno, 0, "nfs.fattr4_case_insensitive", HFILL }},
 
                { &hf_nfs_fattr4_case_preserving, {
                        "fattr4_case_preserving", "nfs.fattr4_case_preserving", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.fattr4_case_preserving" }},
+                       BASE_NONE, &yesno, 0, "nfs.fattr4_case_preserving", HFILL }},
 
                { &hf_nfs_fattr4_chown_restricted, {
                        "fattr4_chown_restricted", "nfs.fattr4_chown_restricted", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.fattr4_chown_restricted" }},
+                       BASE_NONE, &yesno, 0, "nfs.fattr4_chown_restricted", HFILL }},
 
                { &hf_nfs_fattr4_hidden, {
                        "fattr4_hidden", "nfs.fattr4_hidden", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.fattr4_hidden" }},
+                       BASE_NONE, &yesno, 0, "nfs.fattr4_hidden", HFILL }},
 
                { &hf_nfs_fattr4_homogeneous, {
                        "fattr4_homogeneous", "nfs.fattr4_homogeneous", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.fattr4_homogeneous" }},
+                       BASE_NONE, &yesno, 0, "nfs.fattr4_homogeneous", HFILL }},
 
                { &hf_nfs_fattr4_mimetype, {
                        "fattr4_mimetype", "nfs.fattr4_mimetype", FT_STRING, BASE_DEC,
-                       NULL, 0, "nfs.fattr4_mimetype" }},
+                       NULL, 0, "nfs.fattr4_mimetype", HFILL }},
 
                { &hf_nfs_fattr4_no_trunc, {
                        "fattr4_no_trunc", "nfs.fattr4_no_trunc", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.fattr4_no_trunc" }},
+                       BASE_NONE, &yesno, 0, "nfs.fattr4_no_trunc", HFILL }},
 
                { &hf_nfs_fattr4_system, {
                        "fattr4_system", "nfs.fattr4_system", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.fattr4_system" }},
+                       BASE_NONE, &yesno, 0, "nfs.fattr4_system", HFILL }},
 
                { &hf_nfs_who, {
                        "who", "nfs.who", FT_STRING, BASE_DEC,
-                       NULL, 0, "nfs.who" }},
+                       NULL, 0, "nfs.who", HFILL }},
 
                { &hf_nfs_server, {
                        "server", "nfs.server", FT_STRING, BASE_DEC,
-                       NULL, 0, "nfs.server" }},
+                       NULL, 0, "nfs.server", HFILL }},
 
                { &hf_nfs_fattr4_owner, {
                        "fattr4_owner", "nfs.fattr4_owner", FT_STRING, BASE_DEC,
-                       NULL, 0, "nfs.fattr4_owner" }},
+                       NULL, 0, "nfs.fattr4_owner", HFILL }},
 
                { &hf_nfs_fattr4_owner_group, {
                        "fattr4_owner_group", "nfs.fattr4_owner_group", FT_STRING, BASE_DEC,
-                       NULL, 0, "nfs.fattr4_owner_group" }},
+                       NULL, 0, "nfs.fattr4_owner_group", HFILL }},
 
                { &hf_nfs_stable_how4, {
                        "stable_how4", "nfs.stable_how4", FT_UINT32, BASE_DEC,
-                       VALS(names_stable_how4), 0, "nfs.stable_how4" }},
+                       VALS(names_stable_how4), 0, "nfs.stable_how4", HFILL }},
 
                { &hf_nfs_dirlist4_eof, {
                        "eof", "nfs.dirlist4.eof", FT_BOOLEAN,
-                       BASE_NONE, &yesno, 0, "nfs.dirlist4.eof" }},
+                       BASE_NONE, &yesno, 0, "nfs.dirlist4.eof", HFILL }},
 
                { &hf_nfs_data_follows, {
                        "data_follows", "nfs.data_follows", FT_BOOLEAN,
-                       BASE_NONE, &yesno, 0, "nfs.data_follows" }},
+                       BASE_NONE, &yesno, 0, "nfs.data_follows", HFILL }},
 
                { &hf_nfs_stateid4, {
-                       "stateid", "nfs.stateid4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.stateid4" }},
+                       "stateid", "nfs.stateid4", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.stateid4", HFILL }},
 
                { &hf_nfs_offset4, {
-                       "offset", "nfs.offset4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.offset4" }},
+                       "offset", "nfs.offset4", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.offset4", HFILL }},
 
                { &hf_nfs_specdata1, {
                        "specdata1", "nfs.specdata1", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.specdata1" }},
+                       NULL, 0, "nfs.specdata1", HFILL }},
 
                { &hf_nfs_specdata2, {
                        "specdata2", "nfs.specdata2", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.specdata2" }},
+                       NULL, 0, "nfs.specdata2", HFILL }},
 
-               { &hf_nfs_locktype4, {
+               { &hf_nfs_lock_type4, {
                        "locktype", "nfs.locktype4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.locktype4" }},
+                       VALS(names_nfs_lock_type4), 0, "nfs.locktype4", HFILL }},
 
                { &hf_nfs_reclaim4, {
                        "reclaim", "nfs.reclaim4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.reclaim4" }},
+                       NULL, 0, "nfs.reclaim4", HFILL }},
 
                { &hf_nfs_length4, {
-                       "length", "nfs.length4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.length4" }},
+                       "length", "nfs.length4", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.length4", HFILL }},
 
                { &hf_nfs_changeid4, {
-                       "changeid", "nfs.changeid4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.changeid4" }},
+                       "changeid", "nfs.changeid4", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.changeid4", HFILL }},
 
                { &hf_nfs_nfstime4_seconds, {
-                       "seconds", "nfs.nfstime4.seconds", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.nfstime4.seconds" }},
+                       "seconds", "nfs.nfstime4.seconds", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.nfstime4.seconds", HFILL }},
 
                { &hf_nfs_nfstime4_nseconds, {
                        "nseconds", "nfs.nfstime4.nseconds", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.nfstime4.nseconds" }},
+                       NULL, 0, "nfs.nfstime4.nseconds", HFILL }},
 
                { &hf_nfs_fsid4_major, {
-                       "fsid4.major", "nfs.fsid4.major", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.nfstime4.fsid4.major" }},
+                       "fsid4.major", "nfs.fsid4.major", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.nfstime4.fsid4.major", HFILL }},
 
                { &hf_nfs_fsid4_minor, {
-                       "fsid4.minor", "nfs.fsid4.minor", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fsid4.minor" }},
+                       "fsid4.minor", "nfs.fsid4.minor", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fsid4.minor", HFILL }},
 
                { &hf_nfs_acetype4, {
                        "acetype", "nfs.acetype4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.acetype4" }},
+                       NULL, 0, "nfs.acetype4", HFILL }},
 
                { &hf_nfs_aceflag4, {
                        "aceflag", "nfs.aceflag4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.aceflag4" }},
+                       NULL, 0, "nfs.aceflag4", HFILL }},
 
                { &hf_nfs_acemask4, {
                        "acemask", "nfs.acemask4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.acemask4" }},
+                       NULL, 0, "nfs.acemask4", HFILL }},
 
                { &hf_nfs_fattr4_size, {
-                       "size", "nfs.fattr4.size", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.size" }},
+                       "size", "nfs.fattr4.size", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.size", HFILL }},
 
                { &hf_nfs_fattr4_lease_time, {
                        "lease_time", "nfs.fattr4.lease_time", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.lease_time" }},
+                       NULL, 0, "nfs.fattr4.lease_time", HFILL }},
 
                { &hf_nfs_fattr4_aclsupport, {
                        "aclsupport", "nfs.fattr4.aclsupport", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.aclsupport" }},
+                       NULL, 0, "nfs.fattr4.aclsupport", HFILL }},
 
                { &hf_nfs_fattr4_fileid, {
-                       "fileid", "nfs.fattr4.fileid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.fileid" }},
+                       "fileid", "nfs.fattr4.fileid", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.fileid", HFILL }},
 
                { &hf_nfs_fattr4_files_avail, {
-                       "files_avail", "nfs.fattr4.files_avail", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.files_avail" }},
+                       "files_avail", "nfs.fattr4.files_avail", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.files_avail", HFILL }},
 
                { &hf_nfs_fattr4_files_free, {
-                       "files_free", "nfs.fattr4.files_free", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.files_free" }},
+                       "files_free", "nfs.fattr4.files_free", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.files_free", HFILL }},
 
                { &hf_nfs_fattr4_files_total, {
-                       "files_total", "nfs.fattr4.files_total", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.files_total" }},
+                       "files_total", "nfs.fattr4.files_total", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.files_total", HFILL }},
 
                { &hf_nfs_fattr4_maxfilesize, {
-                       "maxfilesize", "nfs.fattr4.maxfilesize", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.maxfilesize" }},
+                       "maxfilesize", "nfs.fattr4.maxfilesize", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.maxfilesize", HFILL }},
 
                { &hf_nfs_fattr4_maxlink, {
                        "maxlink", "nfs.fattr4.maxlink", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.maxlink" }},
+                       NULL, 0, "nfs.fattr4.maxlink", HFILL }},
 
                { &hf_nfs_fattr4_maxname, {
                        "maxname", "nfs.fattr4.maxname", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.maxname" }},
+                       NULL, 0, "nfs.fattr4.maxname", HFILL }},
 
                { &hf_nfs_fattr4_numlinks, {
                        "numlinks", "nfs.fattr4.numlinks", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.numlinks" }},
+                       NULL, 0, "nfs.fattr4.numlinks", HFILL }},
 
                { &hf_nfs_delegate_type, {
                        "delegate_type", "nfs.delegate_type", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.delegate_type" }},
+                       NULL, 0, "nfs.delegate_type", HFILL }},
 
                { &hf_nfs_secinfo_flavor, {
-                       "secinfo_flavor", "nfs.secinfo_flavor", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.secinfo_flavor" }},
+                       "flavor", "nfs.secinfo.flavor", FT_UINT32, BASE_DEC,
+                       VALS(rpc_auth_flavor), 0, "nfs.secinfo.flavor", HFILL }},
 
                { &hf_nfs_num_blocks, {
                        "num_blocks", "nfs.num_blocks", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.num_blocks" }},
+                       NULL, 0, "nfs.num_blocks", HFILL }},
 
                { &hf_nfs_bytes_per_block, {
                        "bytes_per_block", "nfs.bytes_per_block", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.bytes_per_block" }},
+                       NULL, 0, "nfs.bytes_per_block", HFILL }},
 
                { &hf_nfs_eof, {
                        "eof", "nfs.eof", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.eof" }},
+                       NULL, 0, "nfs.eof", HFILL }},
 
                { &hf_nfs_fattr4_maxread, {
-                       "maxread", "nfs.fattr4.maxread", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.maxread" }},
+                       "maxread", "nfs.fattr4.maxread", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.maxread", HFILL }},
 
                { &hf_nfs_fattr4_maxwrite, {
-                       "maxwrite", "nfs.fattr4.maxwrite", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.maxwrite" }},
+                       "maxwrite", "nfs.fattr4.maxwrite", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.maxwrite", HFILL }},
 
                { &hf_nfs_fattr4_quota_hard, {
-                       "quota_hard", "nfs.fattr4.quota_hard", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.quota_hard" }},
+                       "quota_hard", "nfs.fattr4.quota_hard", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.quota_hard", HFILL }},
 
                { &hf_nfs_fattr4_quota_soft, {
-                       "quota_soft", "nfs.fattr4.quota_soft", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.quota_soft" }},
+                       "quota_soft", "nfs.fattr4.quota_soft", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.quota_soft", HFILL }},
 
                { &hf_nfs_fattr4_quota_used, {
-                       "quota_used", "nfs.fattr4.quota_used", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.quota_used" }},
+                       "quota_used", "nfs.fattr4.quota_used", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.quota_used", HFILL }},
 
                { &hf_nfs_fattr4_space_avail, {
-                       "space_avail", "nfs.fattr4.space_avail", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.space_avail" }},
+                       "space_avail", "nfs.fattr4.space_avail", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.space_avail", HFILL }},
 
                { &hf_nfs_fattr4_space_free, {
-                       "space_free", "nfs.fattr4.space_free", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.space_free" }},
+                       "space_free", "nfs.fattr4.space_free", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.space_free", HFILL }},
 
                { &hf_nfs_fattr4_space_total, {
-                       "space_total", "nfs.fattr4.space_total", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.space_total" }},
+                       "space_total", "nfs.fattr4.space_total", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.space_total", HFILL }},
 
                { &hf_nfs_fattr4_space_used, {
-                       "space_used", "nfs.fattr4.space_used", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.fattr4.space_used" }},
+                       "space_used", "nfs.fattr4.space_used", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.fattr4.space_used", HFILL }},
 
                { &hf_nfs_stateid4_delegate_stateid, {
-                       "delegate_stateid", "nfs.delegate_stateid", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.delegate_stateid" }},
+                       "delegate_stateid", "nfs.delegate_stateid", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.delegate_stateid", HFILL }},
 
                { &hf_nfs_verifier4, {
-                       "verifier", "nfs.verifier4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.verifier4" }},
+                       "verifier", "nfs.verifier4", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.verifier4", HFILL }},
 
                { &hf_nfs_cookie4, {
-                       "cookie", "nfs.cookie4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.cookie4" }},
+                       "cookie", "nfs.cookie4", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.cookie4", HFILL }},
 
                { &hf_nfs_cookieverf4, {
-                       "cookieverf", "nfs.cookieverf4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.cookieverf4" }},
+                       "cookieverf", "nfs.cookieverf4", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.cookieverf4", HFILL }},
 
                { &hf_nfs_cb_location, {
                        "cb_location", "nfs.cb_location", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.cb_location" }},
+                       NULL, 0, "nfs.cb_location", HFILL }},
 
                { &hf_nfs_cb_program, {
                        "cb_program", "nfs.cb_program", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.cb_program" }},
+                       NULL, 0, "nfs.cb_program", HFILL }},
 
                { &hf_nfs_recall4, {
                        "recall", "nfs.recall4", FT_BOOLEAN, 
-                       BASE_NONE, &yesno, 0, "nfs.recall4" }},
+                       BASE_NONE, &yesno, 0, "nfs.recall4", HFILL }},
 
                { &hf_nfs_filesize, {
-                       "filesize", "nfs.filesize", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.filesize" }},
+                       "filesize", "nfs.filesize", FT_UINT64, BASE_DEC,
+                       NULL, 0, "nfs.filesize", HFILL }},
 
                { &hf_nfs_count4, {
                        "count", "nfs.count4", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.count4" }},
+                       NULL, 0, "nfs.count4", HFILL }},
 
                { &hf_nfs_count4_dircount, {
                        "dircount", "nfs.dircount", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.dircount" }},
+                       NULL, 0, "nfs.dircount", HFILL }},
 
                { &hf_nfs_count4_maxcount, {
                        "maxcount", "nfs.maxcount", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.maxcount" }},
+                       NULL, 0, "nfs.maxcount", HFILL }},
 
                { &hf_nfs_minorversion, {
                        "minorversion", "nfs.minorversion", FT_UINT32, BASE_DEC,
-                       NULL, 0, "nfs.minorversion" }},
+                       NULL, 0, "nfs.minorversion", HFILL }},
+
+               { &hf_nfs_atime, {
+                       "atime", "nfs.atime", FT_ABSOLUTE_TIME, BASE_NONE,
+                       NULL, 0, "Access Time", HFILL }},
+
+               { &hf_nfs_atime_sec, {
+                       "seconds", "nfs.atime.sec", FT_UINT32, BASE_DEC,
+                       NULL, 0, "Access Time, Seconds", HFILL }},
+
+               { &hf_nfs_atime_nsec, {
+                       "nano seconds", "nfs.atime.nsec", FT_UINT32, BASE_DEC,
+                       NULL, 0, "Access Time, Nano-seconds", HFILL }},
+
+               { &hf_nfs_atime_usec, {
+                       "micro seconds", "nfs.atime.usec", FT_UINT32, BASE_DEC,
+                       NULL, 0, "Access Time, Micro-seconds", HFILL }},
+
+               { &hf_nfs_mtime, {
+                       "mtime", "nfs.mtime", FT_ABSOLUTE_TIME, BASE_NONE,
+                       NULL, 0, "Modify Time", HFILL }},
+
+               { &hf_nfs_mtime_sec, {
+                       "seconds", "nfs.mtime.sec", FT_UINT32, BASE_DEC,
+                       NULL, 0, "Modify Seconds", HFILL }},
+
+               { &hf_nfs_mtime_nsec, {
+                       "nano seconds", "nfs.mtime.nsec", FT_UINT32, BASE_DEC,
+                       NULL, 0, "Modify Time, Nano-seconds", HFILL }},
+
+               { &hf_nfs_mtime_usec, {
+                       "micro seconds", "nfs.mtime.usec", FT_UINT32, BASE_DEC,
+                       NULL, 0, "Modify Time, Micro-seconds", HFILL }},
+
+               { &hf_nfs_ctime, {
+                       "ctime", "nfs.ctime", FT_ABSOLUTE_TIME, BASE_NONE,
+                       NULL, 0, "Creation Time", HFILL }},
+
+               { &hf_nfs_ctime_sec, {
+                       "seconds", "nfs.ctime.sec", FT_UINT32, BASE_DEC,
+                       NULL, 0, "Creation Time, Seconds", HFILL }},
+
+               { &hf_nfs_ctime_nsec, {
+                       "nano seconds", "nfs.ctime.nsec", FT_UINT32, BASE_DEC,
+                       NULL, 0, "Creation Time, Nano-seconds", HFILL }},
+
+               { &hf_nfs_ctime_usec, {
+                       "micro seconds", "nfs.ctime.usec", FT_UINT32, BASE_DEC,
+                       NULL, 0, "Creation Time, Micro-seconds", HFILL }},
+
+               { &hf_nfs_dtime, {
+                       "time delta", "nfs.dtime", FT_RELATIVE_TIME, BASE_NONE,
+                       NULL, 0, "Time Delta", HFILL }},
+
+               { &hf_nfs_dtime_sec, {
+                       "seconds", "nfs.dtime.sec", FT_UINT32, BASE_DEC,
+                       NULL, 0, "Time Delta, Seconds", HFILL }},
+
+               { &hf_nfs_dtime_nsec, {
+                       "nano seconds", "nfs.dtime.nsec", FT_UINT32, BASE_DEC,
+                       NULL, 0, "Time Delta, Nano-seconds", HFILL }},
+
+               { &hf_nfs_open_owner4, {
+                       "owner", "nfs.open_owner4", FT_BYTES, BASE_DEC,
+                       NULL, 0, "owner", HFILL }},
+
+               { &hf_nfs_lock_owner4, {
+                       "owner", "nfs.lock_owner4", FT_BYTES, BASE_DEC,
+                       NULL, 0, "owner", HFILL }},
+
+               { &hf_nfs_secinfo_rpcsec_gss_info_service, {
+                       "service", "nfs.secinfo.rpcsec_gss_info.service", FT_UINT32,
+                       BASE_DEC, VALS(rpc_authgss_svc), 0, "service", HFILL }},
+
+               { &hf_nfs_attrdircreate, {
+                       "attribute dir create", "nfs.openattr4.createdir", FT_BOOLEAN, 
+                       BASE_NONE, &yesno, 0, "nfs.openattr4.createdir", HFILL }},
+
+               { &hf_nfs_new_lock_owner, {
+                       "new lock owner?", "nfs.lock.locker.new_lock_owner", FT_BOOLEAN, 
+                       BASE_NONE, &yesno, 0, "nfs.lock.locker.new_lock_owner", HFILL }},
+
+               { &hf_nfs_lock4_reclaim, {
+                       "reclaim?", "nfs.lock.reclaim", FT_BOOLEAN, 
+                       BASE_NONE, &yesno, 0, "nfs.lock.reclaim", HFILL }},
+
+               { &hf_nfs_sec_oid4, {
+                       "oid", "nfs.secinfo.flavor_info.rpcsec_gss_info.oid", FT_BYTES,
+                       BASE_DEC, NULL, 0, "oid", HFILL }},
+
+               { &hf_nfs_qop4, {
+                       "qop", "nfs.secinfo.flavor_info.rpcsec_gss_info.qop", FT_UINT32, 
+                       BASE_DEC, NULL, 0, "qop", HFILL }},
+
+               { &hf_nfs_client_id4_id, {
+                       "Data", "nfs.nfs_client_id4.id", FT_BYTES, BASE_DEC,
+                       NULL, 0, "Data", HFILL }},
+
+               { &hf_nfs_stateid4_other, {
+                       "Data", "nfs.stateid4.other", FT_BYTES, BASE_DEC,
+                       NULL, 0, "Data", HFILL }},
        };
 
        static gint *ett[] = {
                &ett_nfs,
+               &ett_nfs_fh_encoding,
                &ett_nfs_fh_fsid,
                &ett_nfs_fh_xfsid,
                &ett_nfs_fh_fn,
                &ett_nfs_fh_xfn,
                &ett_nfs_fh_hp,
+               &ett_nfs_fh_auth,
                &ett_nfs_fhandle,
                &ett_nfs_timeval,
                &ett_nfs_mode,
@@ -6453,7 +7385,6 @@ proto_register_nfs(void)
                &ett_nfs_renew4,
                &ett_nfs_restorefh4,
                &ett_nfs_savefh4,
-               &ett_nfs_secinfo4,
                &ett_nfs_setattr4,
                &ett_nfs_setclientid4,
                &ett_nfs_setclientid_confirm4,
@@ -6467,7 +7398,7 @@ proto_register_nfs(void)
                &ett_nfs_open_delegation4,
                &ett_nfs_open_claim4,
                &ett_nfs_opentype4,
-               &ett_nfs_lockowner4,
+               &ett_nfs_lock_owner4,
                &ett_nfs_cb_client4,
                &ett_nfs_client_id4,
                &ett_nfs_bitmap4,
@@ -6475,11 +7406,28 @@ proto_register_nfs(void)
                &ett_nfs_fsid4,
                &ett_nfs_fs_locations4,
                &ett_nfs_fs_location4,
-               &ett_nfs_open4_result_flags
+               &ett_nfs_open4_result_flags,
+               &ett_nfs_secinfo4,
+               &ett_nfs_secinfo4_flavor_info,
+               &ett_nfs_stateid4,
+               &ett_nfs_fattr4_fh_expire_type,
        };
+       module_t *nfs_module;
+
        proto_nfs = proto_register_protocol("Network File System", "NFS", "nfs");
        proto_register_field_array(proto_nfs, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
+
+       nfs_module=prefs_register_protocol(proto_nfs, NULL);
+       prefs_register_bool_preference(nfs_module, "file_name_snooping",
+                                      "Snoop FH to filename mappings",
+                                      "Whether the dissector should snoop the FH to filename mappings by looking inside certain packets",
+                                      &nfs_file_name_snooping);
+       prefs_register_bool_preference(nfs_module, "file_full_name_snooping",
+                                      "Snoop full path to filenames",
+                                      "Whether the dissector should snoop the full pathname for files for matching FH's",
+                                      &nfs_file_name_full_snooping);
+       register_init_routine(nfs_name_snoop_init);
 }
 
 void