Have the Etherenet and PPP dissectors register themselves, and have
[obnox/wireshark/wip.git] / packet-smb.c
index d69ce12af62b81199e28b58cf8f0c7bac1df9929..930e5d3f8b50151ce9388279d317d03a455b6a0c 100644 (file)
@@ -2,10 +2,10 @@
  * Routines for smb packet dissection
  * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
  *
- * $Id: packet-smb.c,v 1.58 2000/01/07 04:27:06 gram Exp $
+ * $Id: packet-smb.c,v 1.73 2000/10/21 05:52:22 guy Exp $
  *
  * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@unicom.net>
+ * By Gerald Combs <gerald@zing.org>
  * Copyright 1998 Gerald Combs
  *
  * Copied from packet-pop.c
 #include "conversation.h"
 #include "smb.h"
 #include "alignment.h"
+#include "strutil.h"
+
+guint32 dissect_mailslot_smb(const u_char *, int, frame_data *, proto_tree *, proto_tree *, struct smb_info, int, int, int, int, const u_char *, int, int, int, int);
+
+guint32 dissect_pipe_smb(const u_char *, int, frame_data *, proto_tree *, proto_tree *, struct smb_info, int, int, int, int, const u_char *, int, int, int, int);
+
 
 static int proto_smb = -1;
 
+static int hf_smb_cmd = -1;
+
 static gint ett_smb = -1;
 static gint ett_smb_fileattributes = -1;
 static gint ett_smb_capabilities = -1;
@@ -68,21 +76,7 @@ static gint ett_smb_action = -1;
 static gint ett_smb_writemode = -1;
 static gint ett_smb_lock_type = -1;
 
-static int proto_browse = -1;
-
-static gint ett_browse = -1;
-static gint ett_browse_flags = -1;
-static gint ett_browse_election_criteria = -1;
-static gint ett_browse_election_os = -1;
-static gint ett_browse_election_desire = -1;
-
-static int proto_lanman = -1;
 
-static gint ett_lanman = -1;
-static gint ett_lanman_servers = -1;
-static gint ett_lanman_server = -1;
-static gint ett_lanman_shares = -1;
-static gint ett_lanman_share = -1;
 
 /*
  * Struct passed to each SMB decode routine of info it may need
@@ -97,23 +91,6 @@ struct smb_request_key {
   guint16 mid;
 };
 
-struct smb_request_val {
-  guint16 last_transact2_command;
-  gchar *last_transact_command;
-  guint16 mid;
-  guint16 last_lanman_cmd;
-  gchar *last_param_descrip;   /* Keep these descriptors around */
-  gchar *last_data_descrip;
-  guint16 trans_response_seen;
-  guint16 last_level;          /* Last level in request */
-};
-
-struct smb_info {
-  int tid, uid, mid, pid;   /* Any more?  */
-  conversation_t *conversation;
-  struct smb_request_val *request_val;
-  int unicode;
-};
 
 GHashTable *smb_request_hash = NULL;
 GMemChunk *smb_request_keys = NULL;
@@ -187,6 +164,265 @@ smb_init_protocol(void)
 
 void (*dissect[256])(const u_char *, int, frame_data *, proto_tree *, proto_tree *, struct smb_info si, int, int, int, int);
 
+static const value_string smb_cmd_vals[] = {
+  { 0x00, "SMBcreatedirectory" },
+  { 0x01, "SMBdeletedirectory" },
+  { 0x02, "SMBopen" },
+  { 0x03, "SMBcreate" },
+  { 0x04, "SMBclose" },
+  { 0x05, "SMBflush" },
+  { 0x06, "SMBunlink" },
+  { 0x07, "SMBmv" },
+  { 0x08, "SMBgetatr" },
+  { 0x09, "SMBsetatr" },
+  { 0x0A, "SMBread" },
+  { 0x0B, "SMBwrite" },
+  { 0x0C, "SMBlock" },
+  { 0x0D, "SMBunlock" },
+  { 0x0E, "SMBctemp" },
+  { 0x0F, "SMBmknew" },
+  { 0x10, "SMBchkpth" },
+  { 0x11, "SMBexit" },
+  { 0x12, "SMBlseek" },
+  { 0x13, "SMBlockread" },
+  { 0x14, "SMBwriteunlock" },
+  { 0x15, "unknown-0x15" },
+  { 0x16, "unknown-0x16" },
+  { 0x17, "unknown-0x17" },
+  { 0x18, "unknown-0x18" },
+  { 0x19, "unknown-0x19" },
+  { 0x1A, "SMBreadBraw" },
+  { 0x1B, "SMBreadBmpx" },
+  { 0x1C, "SMBreadBs" },
+  { 0x1D, "SMBwriteBraw" },
+  { 0x1E, "SMBwriteBmpx" },
+  { 0x1F, "SMBwriteBs" },
+  { 0x20, "SMBwriteC" },
+  { 0x21, "unknown-0x21" },
+  { 0x22, "SMBsetattrE" },
+  { 0x23, "SMBgetattrE" },
+  { 0x24, "SMBlockingX" },
+  { 0x25, "SMBtrans" },
+  { 0x26, "SMBtranss" },
+  { 0x27, "SMBioctl" },
+  { 0x28, "SMBioctls" },
+  { 0x29, "SMBcopy" },
+  { 0x2A, "SMBmove" },
+  { 0x2B, "SMBecho" },
+  { 0x2C, "SMBwriteclose" },
+  { 0x2D, "SMBopenX" },
+  { 0x2E, "SMBreadX" },
+  { 0x2F, "SMBwriteX" },
+  { 0x30, "unknown-0x30" },
+  { 0x31, "SMBcloseandtreedisc" },
+  { 0x32, "SMBtrans2" },
+  { 0x33, "SMBtrans2secondary" },
+  { 0x34, "SMBfindclose2" },
+  { 0x35, "SMBfindnotifyclose" },
+  { 0x36, "unknown-0x36" },
+  { 0x37, "unknown-0x37" },
+  { 0x38, "unknown-0x38" },
+  { 0x39, "unknown-0x39" },
+  { 0x3A, "unknown-0x3A" },
+  { 0x3B, "unknown-0x3B" },
+  { 0x3C, "unknown-0x3C" },
+  { 0x3D, "unknown-0x3D" },
+  { 0x3E, "unknown-0x3E" },
+  { 0x3F, "unknown-0x3F" },
+  { 0x40, "unknown-0x40" },
+  { 0x41, "unknown-0x41" },
+  { 0x42, "unknown-0x42" },
+  { 0x43, "unknown-0x43" },
+  { 0x44, "unknown-0x44" },
+  { 0x45, "unknown-0x45" },
+  { 0x46, "unknown-0x46" },
+  { 0x47, "unknown-0x47" },
+  { 0x48, "unknown-0x48" },
+  { 0x49, "unknown-0x49" },
+  { 0x4A, "unknown-0x4A" },
+  { 0x4B, "unknown-0x4B" },
+  { 0x4C, "unknown-0x4C" },
+  { 0x4D, "unknown-0x4D" },
+  { 0x4E, "unknown-0x4E" },
+  { 0x4F, "unknown-0x4F" },
+  { 0x50, "unknown-0x50" },
+  { 0x51, "unknown-0x51" },
+  { 0x52, "unknown-0x52" },
+  { 0x53, "unknown-0x53" },
+  { 0x54, "unknown-0x54" },
+  { 0x55, "unknown-0x55" },
+  { 0x56, "unknown-0x56" },
+  { 0x57, "unknown-0x57" },
+  { 0x58, "unknown-0x58" },
+  { 0x59, "unknown-0x59" },
+  { 0x5A, "unknown-0x5A" },
+  { 0x5B, "unknown-0x5B" },
+  { 0x5C, "unknown-0x5C" },
+  { 0x5D, "unknown-0x5D" },
+  { 0x5E, "unknown-0x5E" },
+  { 0x5F, "unknown-0x5F" },
+  { 0x60, "unknown-0x60" },
+  { 0x61, "unknown-0x61" },
+  { 0x62, "unknown-0x62" },
+  { 0x63, "unknown-0x63" },
+  { 0x64, "unknown-0x64" },
+  { 0x65, "unknown-0x65" },
+  { 0x66, "unknown-0x66" },
+  { 0x67, "unknown-0x67" },
+  { 0x68, "unknown-0x68" },
+  { 0x69, "unknown-0x69" },
+  { 0x6A, "unknown-0x6A" },
+  { 0x6B, "unknown-0x6B" },
+  { 0x6C, "unknown-0x6C" },
+  { 0x6D, "unknown-0x6D" },
+  { 0x6E, "unknown-0x6E" },
+  { 0x6F, "unknown-0x6F" },
+  { 0x70, "SMBtcon" },
+  { 0x71, "SMBtdis" },
+  { 0x72, "SMBnegprot" },
+  { 0x73, "SMBsesssetupX" },
+  { 0x74, "SMBlogoffX" },
+  { 0x75, "SMBtconX" },
+  { 0x76, "unknown-0x76" },
+  { 0x77, "unknown-0x77" },
+  { 0x78, "unknown-0x78" },
+  { 0x79, "unknown-0x79" },
+  { 0x7A, "unknown-0x7A" },
+  { 0x7B, "unknown-0x7B" },
+  { 0x7C, "unknown-0x7C" },
+  { 0x7D, "unknown-0x7D" },
+  { 0x7E, "unknown-0x7E" },
+  { 0x7F, "unknown-0x7F" },
+  { 0x80, "SMBdskattr" },
+  { 0x81, "SMBsearch" },
+  { 0x82, "SMBffirst" },
+  { 0x83, "SMBfunique" },
+  { 0x84, "SMBfclose" },
+  { 0x85, "unknown-0x85" },
+  { 0x86, "unknown-0x86" },
+  { 0x87, "unknown-0x87" },
+  { 0x88, "unknown-0x88" },
+  { 0x89, "unknown-0x89" },
+  { 0x8A, "unknown-0x8A" },
+  { 0x8B, "unknown-0x8B" },
+  { 0x8C, "unknown-0x8C" },
+  { 0x8D, "unknown-0x8D" },
+  { 0x8E, "unknown-0x8E" },
+  { 0x8F, "unknown-0x8F" },
+  { 0x90, "unknown-0x90" },
+  { 0x91, "unknown-0x91" },
+  { 0x92, "unknown-0x92" },
+  { 0x93, "unknown-0x93" },
+  { 0x94, "unknown-0x94" },
+  { 0x95, "unknown-0x95" },
+  { 0x96, "unknown-0x96" },
+  { 0x97, "unknown-0x97" },
+  { 0x98, "unknown-0x98" },
+  { 0x99, "unknown-0x99" },
+  { 0x9A, "unknown-0x9A" },
+  { 0x9B, "unknown-0x9B" },
+  { 0x9C, "unknown-0x9C" },
+  { 0x9D, "unknown-0x9D" },
+  { 0x9E, "unknown-0x9E" },
+  { 0x9F, "unknown-0x9F" },
+  { 0xA0, "SMBnttransact" },
+  { 0xA1, "SMBnttransactsecondary" },
+  { 0xA2, "SMBntcreateX" },
+  { 0xA3, "unknown-0xA3" },
+  { 0xA4, "SMBntcancel" },
+  { 0xA5, "unknown-0xA5" },
+  { 0xA6, "unknown-0xA6" },
+  { 0xA7, "unknown-0xA7" },
+  { 0xA8, "unknown-0xA8" },
+  { 0xA9, "unknown-0xA9" },
+  { 0xAA, "unknown-0xAA" },
+  { 0xAB, "unknown-0xAB" },
+  { 0xAC, "unknown-0xAC" },
+  { 0xAD, "unknown-0xAD" },
+  { 0xAE, "unknown-0xAE" },
+  { 0xAF, "unknown-0xAF" },
+  { 0xB0, "unknown-0xB0" },
+  { 0xB1, "unknown-0xB1" },
+  { 0xB2, "unknown-0xB2" },
+  { 0xB3, "unknown-0xB3" },
+  { 0xB4, "unknown-0xB4" },
+  { 0xB5, "unknown-0xB5" },
+  { 0xB6, "unknown-0xB6" },
+  { 0xB7, "unknown-0xB7" },
+  { 0xB8, "unknown-0xB8" },
+  { 0xB9, "unknown-0xB9" },
+  { 0xBA, "unknown-0xBA" },
+  { 0xBB, "unknown-0xBB" },
+  { 0xBC, "unknown-0xBC" },
+  { 0xBD, "unknown-0xBD" },
+  { 0xBE, "unknown-0xBE" },
+  { 0xBF, "unknown-0xBF" },
+  { 0xC0, "SMBsplopen" },
+  { 0xC1, "SMBsplwr" },
+  { 0xC2, "SMBsplclose" },
+  { 0xC3, "SMBsplretq" },
+  { 0xC4, "unknown-0xC4" },
+  { 0xC5, "unknown-0xC5" },
+  { 0xC6, "unknown-0xC6" },
+  { 0xC7, "unknown-0xC7" },
+  { 0xC8, "unknown-0xC8" },
+  { 0xC9, "unknown-0xC9" },
+  { 0xCA, "unknown-0xCA" },
+  { 0xCB, "unknown-0xCB" },
+  { 0xCC, "unknown-0xCC" },
+  { 0xCD, "unknown-0xCD" },
+  { 0xCE, "unknown-0xCE" },
+  { 0xCF, "unknown-0xCF" },
+  { 0xD0, "SMBsends" },
+  { 0xD1, "SMBsendb" },
+  { 0xD2, "SMBfwdname" },
+  { 0xD3, "SMBcancelf" },
+  { 0xD4, "SMBgetmac" },
+  { 0xD5, "SMBsendstrt" },
+  { 0xD6, "SMBsendend" },
+  { 0xD7, "SMBsendtxt" },
+  { 0xD8, "SMBreadbulk" },
+  { 0xD9, "SMBwritebulk" },
+  { 0xDA, "SMBwritebulkdata" },
+  { 0xDB, "unknown-0xDB" },
+  { 0xDC, "unknown-0xDC" },
+  { 0xDD, "unknown-0xDD" },
+  { 0xDE, "unknown-0xDE" },
+  { 0xDF, "unknown-0xDF" },
+  { 0xE0, "unknown-0xE0" },
+  { 0xE1, "unknown-0xE1" },
+  { 0xE2, "unknown-0xE2" },
+  { 0xE3, "unknown-0xE3" },
+  { 0xE4, "unknown-0xE4" },
+  { 0xE5, "unknown-0xE5" },
+  { 0xE6, "unknown-0xE6" },
+  { 0xE7, "unknown-0xE7" },
+  { 0xE8, "unknown-0xE8" },
+  { 0xE9, "unknown-0xE9" },
+  { 0xEA, "unknown-0xEA" },
+  { 0xEB, "unknown-0xEB" },
+  { 0xEC, "unknown-0xEC" },
+  { 0xED, "unknown-0xED" },
+  { 0xEE, "unknown-0xEE" },
+  { 0xEF, "unknown-0xEF" },
+  { 0xF0, "unknown-0xF0" },
+  { 0xF1, "unknown-0xF1" },
+  { 0xF2, "unknown-0xF2" },
+  { 0xF3, "unknown-0xF3" },
+  { 0xF4, "unknown-0xF4" },
+  { 0xF5, "unknown-0xF5" },
+  { 0xF6, "unknown-0xF6" },
+  { 0xF7, "unknown-0xF7" },
+  { 0xF8, "unknown-0xF8" },
+  { 0xF9, "unknown-0xF9" },
+  { 0xFA, "unknown-0xFA" },
+  { 0xFB, "unknown-0xFB" },
+  { 0xFC, "unknown-0xFC" },
+  { 0xFD, "unknown-0xFD" },
+  { 0xFE, "SMBinvalid" },
+  { 0xFF, "unknown-0xFF" },
+};
+
 char *SMB_names[256] = {
   "SMBcreatedirectory",
   "SMBdeletedirectory",
@@ -452,7 +688,7 @@ dissect_unknown_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
   if (tree) {
 
-    proto_tree_add_text(tree, offset, END_OF_FRAME, "Data (%u bytes)", 
+    proto_tree_add_text(tree, NullTVB, offset, END_OF_FRAME, "Data (%u bytes)", 
                        END_OF_FRAME); 
 
   }
@@ -476,7 +712,7 @@ dissect_smbu_date(guint16 date, guint16 time)
 
   _gtime = gmtime(&ltime);
   sprintf(datebuf, "%04d-%02d-%02d",
-         1900 + (_gtime -> tm_year), _gtime -> tm_mon, _gtime -> tm_mday);
+         1900 + (_gtime -> tm_year), 1 + (_gtime -> tm_mon), _gtime -> tm_mday);
 
   return datebuf;
 
@@ -589,7 +825,7 @@ dissect_flush_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -601,7 +837,7 @@ dissect_flush_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -613,7 +849,7 @@ dissect_flush_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count: %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count: %u", ByteCount);
 
     }
 
@@ -629,7 +865,7 @@ dissect_flush_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -641,7 +877,7 @@ dissect_flush_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -671,7 +907,7 @@ dissect_get_disk_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -683,7 +919,7 @@ dissect_get_disk_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -699,7 +935,7 @@ dissect_get_disk_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -713,7 +949,7 @@ dissect_get_disk_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Total Units: %u", TotalUnits);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Total Units: %u", TotalUnits);
 
       }
 
@@ -725,7 +961,7 @@ dissect_get_disk_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Blocks Per Unit: %u", BlocksPerUnit);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Blocks Per Unit: %u", BlocksPerUnit);
 
       }
 
@@ -737,7 +973,7 @@ dissect_get_disk_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Block Size: %u", BlockSize);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Block Size: %u", BlockSize);
 
       }
 
@@ -749,7 +985,7 @@ dissect_get_disk_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Free Units: %u", FreeUnits);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Free Units: %u", FreeUnits);
 
       }
 
@@ -761,7 +997,7 @@ dissect_get_disk_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved: %u", Reserved);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved: %u", Reserved);
 
       }
 
@@ -775,7 +1011,7 @@ dissect_get_disk_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -812,7 +1048,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -826,19 +1062,19 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       ti = proto_tree_add_text(tree, offset, 2, "Attributes: 0x%02x", Attributes);
+       ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Attributes: 0x%02x", Attributes);
        Attributes_tree = proto_item_add_subtree(ti, ett_smb_fileattributes);
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x01, 16, "Read-only file", "Not a read-only file"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x02, 16, "Hidden file", "Not a hidden file"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x04, 16, "System file", "Not a system file"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x08, 16, " Volume", "Not a volume"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x10, 16, " Directory", "Not a directory"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x20, 16, " Archived", "Not archived"));
        
       }
@@ -851,7 +1087,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Last Write Time: %u", dissect_dos_time(LastWriteTime));
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Last Write Time: %s", dissect_dos_time(LastWriteTime));
 
       }
 
@@ -863,7 +1099,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Last Write Date: %u", dissect_dos_date(LastWriteDate));
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Last Write Date: %s", dissect_dos_date(LastWriteDate));
 
       }
 
@@ -875,7 +1111,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 1: %u", Reserved1);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 1: %u", Reserved1);
 
       }
 
@@ -887,7 +1123,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 2: %u", Reserved2);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 2: %u", Reserved2);
 
       }
 
@@ -899,7 +1135,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 3: %u", Reserved3);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 3: %u", Reserved3);
 
       }
 
@@ -911,7 +1147,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 4: %u", Reserved4);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 4: %u", Reserved4);
 
       }
 
@@ -923,7 +1159,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 5: %u", Reserved5);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 5: %u", Reserved5);
 
       }
 
@@ -937,7 +1173,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -949,7 +1185,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -961,7 +1197,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(FileName) + 1, "File Name: %s", FileName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(FileName) + 1, "File Name: %s", FileName);
 
     }
 
@@ -977,7 +1213,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -989,7 +1225,7 @@ dissect_set_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -1020,7 +1256,7 @@ dissect_write_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -1032,7 +1268,7 @@ dissect_write_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -1044,7 +1280,7 @@ dissect_write_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
     }
 
@@ -1056,7 +1292,7 @@ dissect_write_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
     }
 
@@ -1068,7 +1304,7 @@ dissect_write_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Remaining: %u", Remaining);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Remaining: %u", Remaining);
 
     }
 
@@ -1080,7 +1316,7 @@ dissect_write_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -1092,7 +1328,7 @@ dissect_write_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -1104,12 +1340,21 @@ dissect_write_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Length: %u", DataLength);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
 
     }
 
     offset += 2; /* Skip Data Length */
 
+    if (ByteCount > 0 && tree) {
+
+       if(END_OF_FRAME >= ByteCount)
+           proto_tree_add_text(tree, NullTVB, offset, ByteCount, "Data (%u bytes)", ByteCount);
+       else
+           proto_tree_add_text(tree, NullTVB, offset, END_OF_FRAME, "Data (first %u bytes)", END_OF_FRAME);
+
+    }
+
   }
 
   if (dirn == 0) { /* Response(s) dissect code */
@@ -1120,7 +1365,7 @@ dissect_write_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -1132,7 +1377,7 @@ dissect_write_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
     }
 
@@ -1144,7 +1389,7 @@ dissect_write_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -1181,7 +1426,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -1193,7 +1438,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -1205,7 +1450,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
     }
 
@@ -1217,7 +1462,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max Count: %u", MaxCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max Count: %u", MaxCount);
 
     }
 
@@ -1229,7 +1474,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Min Count: %u", MinCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Min Count: %u", MinCount);
 
     }
 
@@ -1241,7 +1486,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Reserved 1: %u", Reserved1);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Reserved 1: %u", Reserved1);
 
     }
 
@@ -1253,7 +1498,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Reserved 2: %u", Reserved2);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 2: %u", Reserved2);
 
     }
 
@@ -1265,7 +1510,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -1281,7 +1526,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count: %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count: %u", WordCount);
 
     }
 
@@ -1295,7 +1540,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+       proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
       }
 
@@ -1307,7 +1552,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
       }
 
@@ -1319,7 +1564,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved: %u", Reserved);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved: %u", Reserved);
 
       }
 
@@ -1331,7 +1576,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Data Compaction Mode: %u", DataCompactionMode);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Data Compaction Mode: %u", DataCompactionMode);
 
       }
 
@@ -1343,7 +1588,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved: %u", Reserved);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved: %u", Reserved);
 
       }
 
@@ -1355,7 +1600,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Data Length: %u", DataLength);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
 
       }
 
@@ -1367,7 +1612,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Data Offset: %u", DataOffset);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
       }
 
@@ -1381,7 +1626,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -1393,7 +1638,7 @@ dissect_read_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *a
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Pad: %u", Pad);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Pad: %u", Pad);
 
     }
 
@@ -1409,6 +1654,7 @@ dissect_delete_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 {
   guint8        WordCount;
   guint8        BufferFormat;
+  guint16       SearchAttributes;
   guint16       ByteCount;
   const char    *FileName;
 
@@ -1420,19 +1666,30 @@ dissect_delete_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
     offset += 1; /* Skip Word Count (WCT) */
 
+    /* Build display for: SearchAttributes */
+
+    SearchAttributes = GSHORT(pd, offset);
+
+    if (tree) {
+
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Search Attributes: %u", SearchAttributes);
+    }
+
+    offset += 2; /* Skip SearchAttributes */
+
     /* Build display for: Byte Count (BCC) */
 
     ByteCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -1444,7 +1701,7 @@ dissect_delete_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -1456,7 +1713,7 @@ dissect_delete_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(FileName) + 1, "File Name: %s", FileName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(FileName) + 1, "File Name: %s", FileName);
 
     }
 
@@ -1472,7 +1729,7 @@ dissect_delete_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -1484,7 +1741,7 @@ dissect_delete_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -1521,7 +1778,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -1533,7 +1790,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -1545,7 +1802,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count: %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count: %u", ByteCount);
 
     }
 
@@ -1561,7 +1818,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -1575,7 +1832,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Creation Date: %u", dissect_dos_date(CreationDate));
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Creation Date: %s", dissect_dos_date(CreationDate));
 
       }
 
@@ -1587,7 +1844,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Creation Time: %u", dissect_dos_time(CreationTime));
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Creation Time: %s", dissect_dos_time(CreationTime));
 
       }
 
@@ -1599,7 +1856,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Last Access Date: %u", dissect_dos_date(LastAccessDate));
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Last Access Date: %s", dissect_dos_date(LastAccessDate));
 
       }
 
@@ -1611,7 +1868,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Last Access Time: %u", dissect_dos_time(LastAccessTime));
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Last Access Time: %s", dissect_dos_time(LastAccessTime));
 
       }
 
@@ -1623,7 +1880,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Last Write Date: %u", dissect_dos_date(LastWriteDate));
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Last Write Date: %s", dissect_dos_date(LastWriteDate));
 
       }
 
@@ -1635,7 +1892,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Last Write Time: %u", dissect_dos_time(LastWriteTime));
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Last Write Time: %s", dissect_dos_time(LastWriteTime));
 
       }
 
@@ -1647,7 +1904,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
        
-       proto_tree_add_text(tree, offset, 4, "File Data Size: %u", FileDataSize);
+       proto_tree_add_text(tree, NullTVB, offset, 4, "File Data Size: %u", FileDataSize);
 
       }
 
@@ -1659,7 +1916,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 4, "File Allocation Size: %u", FileAllocationSize);
+       proto_tree_add_text(tree, NullTVB, offset, 4, "File Allocation Size: %u", FileAllocationSize);
 
       }
 
@@ -1671,19 +1928,19 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
       
       if (tree) {
 
-       ti = proto_tree_add_text(tree, offset, 2, "Attributes: 0x%02x", Attributes);
+       ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Attributes: 0x%02x", Attributes);
        Attributes_tree = proto_item_add_subtree(ti, ett_smb_fileattributes);
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x01, 16, "Read-only file", "Not a read-only file"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x02, 16, "Hidden file", "Not a hidden file"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x04, 16, "System file", "Not a system file"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x08, 16, " Volume", "Not a volume"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x10, 16, " Directory", "Not a directory"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x20, 16, " Archived", "Not archived"));
     
       }
@@ -1698,7 +1955,7 @@ dissect_query_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count: %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count: %u", ByteCount);
 
     }
 
@@ -1731,7 +1988,7 @@ dissect_treecon_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -1743,7 +2000,7 @@ dissect_treecon_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -1755,7 +2012,7 @@ dissect_treecon_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "BufferFormat1: %u", BufferFormat1);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "BufferFormat1: %u", BufferFormat1);
 
     }
 
@@ -1767,7 +2024,7 @@ dissect_treecon_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(SharePath) + 1, "Share Path: %s", SharePath);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(SharePath) + 1, "Share Path: %s", SharePath);
 
     }
 
@@ -1779,7 +2036,7 @@ dissect_treecon_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "BufferFormat2: %u", BufferFormat2);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "BufferFormat2: %u", BufferFormat2);
 
     }
 
@@ -1791,7 +2048,7 @@ dissect_treecon_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(Password) + 1, "Password: %s", Password);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(Password) + 1, "Password: %s", Password);
 
     }
 
@@ -1803,7 +2060,7 @@ dissect_treecon_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "BufferFormat3: %u", BufferFormat3);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "BufferFormat3: %u", BufferFormat3);
 
     }
 
@@ -1815,7 +2072,7 @@ dissect_treecon_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(Service) + 1, "Service: %s", Service);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(Service) + 1, "Service: %s", Service);
 
     }
 
@@ -1831,7 +2088,7 @@ dissect_treecon_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -1845,7 +2102,7 @@ dissect_treecon_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max Buffer Size: %u", MaxBufferSize);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max Buffer Size: %u", MaxBufferSize);
 
     }
 
@@ -1857,7 +2114,7 @@ dissect_treecon_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "TID: %u", TID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "TID: %u", TID);
 
     }
 
@@ -1869,7 +2126,7 @@ dissect_treecon_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -1924,7 +2181,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+        proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
       }
 
@@ -1936,7 +2193,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 1, "AndXCommand: %s", 
+        proto_tree_add_text(tree, NullTVB, offset, 1, "AndXCommand: %s", 
                            (AndXCommand == 0xFF ? "No further commands" : decode_smb_name(AndXCommand)));
 
       }
@@ -1949,7 +2206,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 1, "AndXReserved: %u", AndXReserved);
+        proto_tree_add_text(tree, NullTVB, offset, 1, "AndXReserved: %u", AndXReserved);
 
       }
 
@@ -1961,7 +2218,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "AndXOffset: %u", AndXOffset);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "AndXOffset: %u", AndXOffset);
 
       }
 
@@ -1973,7 +2230,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "MaxBufferSize: %u", MaxBufferSize);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "MaxBufferSize: %u", MaxBufferSize);
 
       }
 
@@ -1985,7 +2242,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "MaxMpxCount: %u", MaxMpxCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "MaxMpxCount: %u", MaxMpxCount);
 
       }
 
@@ -1997,7 +2254,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "VcNumber: %u", VcNumber);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "VcNumber: %u", VcNumber);
 
       }
 
@@ -2009,7 +2266,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "SessionKey: %u", SessionKey);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "SessionKey: %u", SessionKey);
 
       }
 
@@ -2021,7 +2278,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "PasswordLen: %u", PasswordLen);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "PasswordLen: %u", PasswordLen);
 
       }
 
@@ -2033,7 +2290,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "Reserved: %u", Reserved);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "Reserved: %u", Reserved);
 
       }
 
@@ -2045,7 +2302,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
       }
 
@@ -2059,7 +2316,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
        if (tree) {
 
-         proto_tree_add_text(tree, offset, strlen(Password) + 1, "Password: %s", Password);
+         proto_tree_add_text(tree, NullTVB, offset, strlen(Password) + 1, "Password: %s", Password);
 
        }
 
@@ -2071,7 +2328,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
        if (tree) {
 
-         proto_tree_add_text(tree, offset, strlen(AccountName) + 1, "AccountName: %s", AccountName);
+         proto_tree_add_text(tree, NullTVB, offset, strlen(AccountName) + 1, "AccountName: %s", AccountName);
 
        }
 
@@ -2083,7 +2340,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
        if (tree) {
 
-         proto_tree_add_text(tree, offset, strlen(PrimaryDomain) + 1, "PrimaryDomain: %s", PrimaryDomain);
+         proto_tree_add_text(tree, NullTVB, offset, strlen(PrimaryDomain) + 1, "PrimaryDomain: %s", PrimaryDomain);
 
        }
 
@@ -2095,7 +2352,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
        if (tree) {
 
-         proto_tree_add_text(tree, offset, strlen(NativeOS) + 1, "Native OS: %s", NativeOS);
+         proto_tree_add_text(tree, NullTVB, offset, strlen(NativeOS) + 1, "Native OS: %s", NativeOS);
 
        }
 
@@ -2107,7 +2364,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
        if (tree) {
 
-         proto_tree_add_text(tree, offset, strlen(NativeLanMan) + 1, "Native Lan Manager: %s", NativeLanMan);
+         proto_tree_add_text(tree, NullTVB, offset, strlen(NativeLanMan) + 1, "Native Lan Manager: %s", NativeLanMan);
 
        }
 
@@ -2125,7 +2382,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+        proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
       }
 
@@ -2137,7 +2394,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 1, "AndXCommand: %s", 
+        proto_tree_add_text(tree, NullTVB, offset, 1, "AndXCommand: %s", 
                            (AndXCommand == 0xFF ? "No further commands" : decode_smb_name(AndXCommand)));
 
       }
@@ -2150,7 +2407,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 1, "AndXReserved: %u", AndXReserved);
+        proto_tree_add_text(tree, NullTVB, offset, 1, "AndXReserved: %u", AndXReserved);
 
       }
 
@@ -2162,7 +2419,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "AndXOffset: %u", AndXOffset);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "AndXOffset: %u", AndXOffset);
 
       }
 
@@ -2174,7 +2431,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "MaxBufferSize: %u", MaxBufferSize);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "MaxBufferSize: %u", MaxBufferSize);
 
       }
 
@@ -2186,7 +2443,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "MaxMpxCount: %u", MaxMpxCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "MaxMpxCount: %u", MaxMpxCount);
 
       }
 
@@ -2198,7 +2455,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "VcNumber: %u", VcNumber);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "VcNumber: %u", VcNumber);
 
       }
 
@@ -2210,7 +2467,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "SessionKey: %u", SessionKey);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "SessionKey: %u", SessionKey);
 
       }
 
@@ -2222,7 +2479,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "ANSI Account Password Length: %u", ANSIAccountPasswordLength);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "ANSI Account Password Length: %u", ANSIAccountPasswordLength);
 
       }
 
@@ -2234,7 +2491,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "UNICODE Account Password Length: %u", UNICODEAccountPasswordLength);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "UNICODE Account Password Length: %u", UNICODEAccountPasswordLength);
 
       }
 
@@ -2246,7 +2503,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "Reserved: %u", Reserved);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "Reserved: %u", Reserved);
 
       }
 
@@ -2258,35 +2515,35 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        ti = proto_tree_add_text(tree, offset, 4, "Capabilities: 0x%04x", Capabilities);
+        ti = proto_tree_add_text(tree, NullTVB, offset, 4, "Capabilities: 0x%04x", Capabilities);
         Capabilities_tree = proto_item_add_subtree(ti, ett_smb_capabilities);
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x0001, 32, " Raw Mode supported", " Raw Mode not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x0002, 32, " Raw Mode supported", " MPX Mode not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x0004, 32," Unicode supported", " Unicode not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x0008, 32, " Large Files supported", " Large Files not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x0010, 32, " NT LM 0.12 SMBs supported", " NT LM 0.12 SMBs not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x0020, 32, " RPC Remote APIs supported", " RPC Remote APIs not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x0040, 32, " NT Status Codes supported", " NT Status Codes not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x0080, 32, " Level 2 OpLocks supported", " Level 2 OpLocks not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x0100, 32, " Lock&Read supported", " Lock&Read not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x0200, 32, " NT Find supported", " NT Find not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x1000, 32, " DFS supported", " DFS not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x4000, 32, " Large READX supported", " Large READX not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x8000, 32, " Large WRITEX supported", " Large WRITEX not supported"));
-        proto_tree_add_text(Capabilities_tree, offset, 4, "%s",
+        proto_tree_add_text(Capabilities_tree, NullTVB, offset, 4, "%s",
                             decode_boolean_bitfield(Capabilities, 0x80000000, 32, " Extended Security Exchanges supported", " Extended Security Exchanges not supported"));
       
 }
@@ -2299,7 +2556,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Byte Count: %u", ByteCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count: %u", ByteCount);
 
       }
 
@@ -2307,18 +2564,20 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (ByteCount > 0) {
 
-       /* Build display for: ANSI Password */
+         /* Build display for: ANSI Password */
 
-       ANSIPassword = pd + offset;
+         ANSIPassword = pd + offset;
 
-       if (tree) {
+         if (ANSIAccountPasswordLength > 0) {
 
-         proto_tree_add_text(tree, offset, ANSIAccountPasswordLength, "ANSI Password: %s", format_text(ANSIPassword, ANSIAccountPasswordLength));
+             if (tree) {
 
-       }
+                 proto_tree_add_text(tree, NullTVB, offset, ANSIAccountPasswordLength, "ANSI Password: %s", format_text(ANSIPassword, ANSIAccountPasswordLength));
 
-       offset += ANSIAccountPasswordLength; /* Skip ANSI Password */
-       if (ANSIAccountPasswordLength == 0) offset++;  /* Add 1 */
+             }
+
+             offset += ANSIAccountPasswordLength; /* Skip ANSI Password */
+         }
 
        /* Build display for: UNICODE Password */
 
@@ -2328,7 +2587,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
          if (tree) {
 
-           proto_tree_add_text(tree, offset, UNICODEAccountPasswordLength, "UNICODE Password: %s", format_text(UNICODEPassword, UNICODEAccountPasswordLength));
+           proto_tree_add_text(tree, NullTVB, offset, UNICODEAccountPasswordLength, "UNICODE Password: %s", format_text(UNICODEPassword, UNICODEAccountPasswordLength));
 
          }
 
@@ -2342,7 +2601,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
        if (tree) {
 
-         proto_tree_add_text(tree, offset, strlen(AccountName) + 1, "Account Name: %s", AccountName);
+         proto_tree_add_text(tree, NullTVB, offset, strlen(AccountName) + 1, "Account Name: %s", AccountName);
 
        }
 
@@ -2354,7 +2613,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
        if (tree) {
 
-         proto_tree_add_text(tree, offset, strlen(PrimaryDomain) + 1, "Primary Domain: %s", PrimaryDomain);
+         proto_tree_add_text(tree, NullTVB, offset, strlen(PrimaryDomain) + 1, "Primary Domain: %s", PrimaryDomain);
 
        }
 
@@ -2366,7 +2625,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
        if (tree) {
 
-         proto_tree_add_text(tree, offset, strlen(NativeOS) + 1, "Native OS: %s", NativeOS);
+         proto_tree_add_text(tree, NullTVB, offset, strlen(NativeOS) + 1, "Native OS: %s", NativeOS);
 
        }
 
@@ -2378,7 +2637,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
        if (tree) {
 
-         proto_tree_add_text(tree, offset, strlen(NativeLanManType) + 1, "Native LanMan Type: %s", NativeLanManType);
+         proto_tree_add_text(tree, NullTVB, offset, strlen(NativeLanManType) + 1, "Native LanMan Type: %s", NativeLanManType);
 
        }
 
@@ -2407,7 +2666,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -2421,7 +2680,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 1, "AndXCommand: %s",
+       proto_tree_add_text(tree, NullTVB, offset, 1, "AndXCommand: %s",
                            (AndXCommand == 0xFF ? "No futher commands" : decode_smb_name(AndXCommand)));
 
       }
@@ -2434,7 +2693,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 1, "AndXReserved: %u", AndXReserved);
+       proto_tree_add_text(tree, NullTVB, offset, 1, "AndXReserved: %u", AndXReserved);
 
       }
 
@@ -2446,7 +2705,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "AndXOffset: %u", AndXOffset);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "AndXOffset: %u", AndXOffset);
 
       }
 
@@ -2459,7 +2718,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Action: %u", Action);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Action: %u", Action);
 
       }
 
@@ -2473,7 +2732,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -2489,7 +2748,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, strlen(NativeOS) + 1, "NativeOS: %s", NativeOS);
+       proto_tree_add_text(tree, NullTVB, offset, strlen(NativeOS) + 1, "NativeOS: %s", NativeOS);
 
       }
 
@@ -2501,7 +2760,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, strlen(NativeLanMan) + 1, "NativeLanMan: %s", NativeLanMan);
+       proto_tree_add_text(tree, NullTVB, offset, strlen(NativeLanMan) + 1, "NativeLanMan: %s", NativeLanMan);
 
       }
 
@@ -2513,7 +2772,7 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, strlen(PrimaryDomain) + 1, "PrimaryDomain: %s", PrimaryDomain);
+       proto_tree_add_text(tree, NullTVB, offset, strlen(PrimaryDomain) + 1, "PrimaryDomain: %s", PrimaryDomain);
 
       }
 
@@ -2552,9 +2811,9 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Invalid TCON_ANDX format. WCT should be 0, 2, 3, or 4 ..., not %u", wct);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Invalid TCON_ANDX format. WCT should be 0, 2, 3, or 4 ..., not %u", wct);
 
-      proto_tree_add_text(tree, offset, END_OF_FRAME, "Data");
+      proto_tree_add_text(tree, NullTVB, offset, END_OF_FRAME, "Data");
 
       return;
 
@@ -2564,7 +2823,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
   if (tree) {
 
-    proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", wct);
+    proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", wct);
 
   }
 
@@ -2576,11 +2835,11 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Next Command: %s",
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Next Command: %s",
                          (andxcmd == 0xFF) ? "No further commands":
                          decode_smb_name(andxcmd));
                
-      proto_tree_add_text(tree, offset + 1, 1, "Reserved (MBZ): %u", pd[offset+1]);
+      proto_tree_add_text(tree, NullTVB, offset + 1, 1, "Reserved (MBZ): %u", pd[offset+1]);
 
     }
 
@@ -2590,7 +2849,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Offset to next command: %u", andxoffs);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Offset to next command: %u", andxoffs);
 
     }
 
@@ -2606,7 +2865,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", bcc);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", bcc);
 
     }
 
@@ -2618,9 +2877,9 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Additional Flags: 0x%02x", flags);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Additional Flags: 0x%02x", flags);
       flags_tree = proto_item_add_subtree(ti, ett_smb_aflags);
-      proto_tree_add_text(flags_tree, offset, 2, "%s", 
+      proto_tree_add_text(flags_tree, NullTVB, offset, 2, "%s", 
                          decode_boolean_bitfield(flags, 0x01, 16,
                                                  "Disconnect TID",
                                                  "Don't disconnect TID"));
@@ -2633,7 +2892,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Password Length: %u", passwdlen);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Password Length: %u", passwdlen);
 
     }
 
@@ -2643,7 +2902,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", bcc);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", bcc);
 
     }
 
@@ -2653,7 +2912,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(str) + 1, "Password: %s", format_text(str, passwdlen));
+      proto_tree_add_text(tree, NullTVB, offset, strlen(str) + 1, "Password: %s", format_text(str, passwdlen));
 
     }
 
@@ -2663,7 +2922,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(str) + 1, "Path: %s", str);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(str) + 1, "Path: %s", str);
 
     }
 
@@ -2673,7 +2932,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(str) + 1, "Service: %s", str);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(str) + 1, "Service: %s", str);
 
     }
 
@@ -2685,7 +2944,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", bcc);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", bcc);
 
     }
 
@@ -2695,7 +2954,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(str) + 1, "Service Type: %s",
+      proto_tree_add_text(tree, NullTVB, offset, strlen(str) + 1, "Service Type: %s",
                          str);
 
     }
@@ -2710,7 +2969,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {  /* Should break out the bits */
 
-      proto_tree_add_text(tree, offset, 2, "Optional Support: 0x%04x", 
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Optional Support: 0x%04x", 
                          optionsup);
 
     }
@@ -2721,7 +2980,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", bcc);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", bcc);
 
     }
 
@@ -2731,7 +2990,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(str) + 1, "Service: %s", str);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(str) + 1, "Service: %s", str);
 
     }
 
@@ -2741,7 +3000,7 @@ dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(str) + 1, "Native File System: %s", str);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(str) + 1, "Native File System: %s", str);
 
     }
 
@@ -2779,9 +3038,9 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
       !((wct == 13) && (dirn == 0)) && !((wct == 17) && (dirn == 0))) {
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Invalid Negotiate Protocol format. WCT should be zero or 1 or 13 or 17 ..., not %u", wct);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Invalid Negotiate Protocol format. WCT should be zero or 1 or 13 or 17 ..., not %u", wct);
 
-      proto_tree_add_text(tree, offset, END_OF_FRAME, "Data");
+      proto_tree_add_text(tree, NullTVB, offset, END_OF_FRAME, "Data");
 
       return;
     }
@@ -2789,7 +3048,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
   if (tree) {
 
-    proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %d", wct);
+    proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %d", wct);
 
   }
 
@@ -2807,7 +3066,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", bcc);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", bcc);
 
     }
 
@@ -2815,7 +3074,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, END_OF_FRAME, "Dialects");
+      ti = proto_tree_add_text(tree, NullTVB, offset, END_OF_FRAME, "Dialects");
       dialects = proto_item_add_subtree(ti, ett_smb_dialects);
 
     }
@@ -2825,7 +3084,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
       if (tree) {
 
-       proto_tree_add_text(dialects, offset, 1, "Dialect Marker: %d", pd[offset]);
+       proto_tree_add_text(dialects, NullTVB, offset, 1, "Dialect Marker: %d", pd[offset]);
 
       }
 
@@ -2835,7 +3094,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
       if (tree) {
 
-       proto_tree_add_text(dialects, offset, strlen(str)+1, "Dialect: %s", str);
+       proto_tree_add_text(dialects, NullTVB, offset, strlen(str)+1, "Dialect: %s", str);
 
       }
 
@@ -2852,12 +3111,12 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
       if (dialect == 0xFFFF) { /* Server didn't like them dialects */
 
-       proto_tree_add_text(tree, offset, 2, "Supplied dialects not recognized");
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Supplied dialects not recognized");
 
       }
       else {
 
-       proto_tree_add_text(tree, offset, 2, "Dialect Index: %u, PC NETWORK PROTGRAM 1.0", dialect);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Dialect Index: %u, PC NETWORK PROTGRAM 1.0", dialect);
 
       }
 
@@ -2869,7 +3128,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", bcc);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", bcc);
 
     }
 
@@ -2879,7 +3138,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Dialect Index: %u, Greater than CORE PROTOCOL and up to LANMAN2.1", GSHORT(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Dialect Index: %u, Greater than CORE PROTOCOL and up to LANMAN2.1", GSHORT(pd, offset));
 
     }
 
@@ -2891,13 +3150,13 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Security Mode: 0x%04x", mode);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Security Mode: 0x%04x", mode);
       mode_tree = proto_item_add_subtree(ti, ett_smb_mode);
-      proto_tree_add_text(mode_tree, offset, 2, "%s",
+      proto_tree_add_text(mode_tree, NullTVB, offset, 2, "%s",
                          decode_boolean_bitfield(mode, 0x0001, 16,
                                                  "Security  = User",
                                                  "Security  = Share"));
-      proto_tree_add_text(mode_tree, offset, 2, "%s",
+      proto_tree_add_text(mode_tree, NullTVB, offset, 2, "%s",
                          decode_boolean_bitfield(mode, 0x0002, 16,
                                                  "Passwords = Encrypted",
                                                  "Passwords = Plaintext"));
@@ -2908,7 +3167,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max buffer size:     %u", GSHORT(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max buffer size:     %u", GSHORT(pd, offset));
 
     }
 
@@ -2916,7 +3175,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max multiplex count: %u", GSHORT(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max multiplex count: %u", GSHORT(pd, offset));
 
     }
     
@@ -2924,7 +3183,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max vcs:             %u", GSHORT(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max vcs:             %u", GSHORT(pd, offset));
 
     }
 
@@ -2934,13 +3193,13 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Raw Mode: 0x%04x", rawmode);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Raw Mode: 0x%04x", rawmode);
       rawmode_tree = proto_item_add_subtree(ti, ett_smb_rawmode);
-      proto_tree_add_text(rawmode_tree, offset, 2, "%s",
+      proto_tree_add_text(rawmode_tree, NullTVB, offset, 2, "%s",
                          decode_boolean_bitfield(rawmode, 0x01, 16,
                                                  "Read Raw supported",
                                                  "Read Raw not supported"));
-      proto_tree_add_text(rawmode_tree, offset, 2, "%s",
+      proto_tree_add_text(rawmode_tree, NullTVB, offset, 2, "%s",
                          decode_boolean_bitfield(rawmode, 0x02, 16,
                                                  "Write Raw supported",
                                                  "Write Raw not supported"));
@@ -2951,7 +3210,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Session key:         %08x", GWORD(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Session key:         %08x", GWORD(pd, offset));
 
     }
 
@@ -2961,9 +3220,9 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Server Time: %s",
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Server Time: %s",
                        dissect_dos_time(GSHORT(pd, offset)));
-      proto_tree_add_text(tree, offset + 2, 2, "Server Date: %s",
+      proto_tree_add_text(tree, NullTVB, offset + 2, 2, "Server Date: %s",
                        dissect_dos_date(GSHORT(pd, offset + 2)));
 
     }
@@ -2974,7 +3233,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Server time zone: %i min from UTC",
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Server time zone: %i min from UTC",
                          (signed)GSSHORT(pd, offset));
 
     }
@@ -2987,7 +3246,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Challenge Length: %u", enckeylen);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Challenge Length: %u", enckeylen);
 
     }
 
@@ -2995,7 +3254,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Reserved: %u (MBZ)", GSHORT(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved: %u (MBZ)", GSHORT(pd, offset));
 
     }
 
@@ -3005,7 +3264,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", bcc);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", bcc);
 
     }
 
@@ -3017,7 +3276,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, enckeylen, "Challenge: %s",
+       proto_tree_add_text(tree, NullTVB, offset, enckeylen, "Challenge: %s",
                                bytes_to_str(str, enckeylen));
       }
 
@@ -3031,7 +3290,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(str)+1, "Primary Domain: %s", str);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(str)+1, "Primary Domain: %s", str);
 
     }
 
@@ -3041,7 +3300,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Dialect Index: %u, Greater than LANMAN2.1", GSHORT(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Dialect Index: %u, Greater than LANMAN2.1", GSHORT(pd, offset));
 
     }
 
@@ -3051,21 +3310,21 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 1, "Security Mode: 0x%02x", mode);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 1, "Security Mode: 0x%02x", mode);
       mode_tree = proto_item_add_subtree(ti, ett_smb_mode);
-      proto_tree_add_text(mode_tree, offset, 1, "%s",
+      proto_tree_add_text(mode_tree, NullTVB, offset, 1, "%s",
                          decode_boolean_bitfield(mode, 0x01, 8,
                                                  "Security  = User",
                                                  "Security  = Share"));
-      proto_tree_add_text(mode_tree, offset, 1, "%s",
+      proto_tree_add_text(mode_tree, NullTVB, offset, 1, "%s",
                          decode_boolean_bitfield(mode, 0x02, 8,
                                                  "Passwords = Encrypted",
                                                  "Passwords = Plaintext"));
-      proto_tree_add_text(mode_tree, offset, 1, "%s",
+      proto_tree_add_text(mode_tree, NullTVB, offset, 1, "%s",
                          decode_boolean_bitfield(mode, 0x04, 8,
                                                  "Security signatures enabled",
                                                  "Security signatures not enabled"));
-      proto_tree_add_text(mode_tree, offset, 1, "%s",
+      proto_tree_add_text(mode_tree, NullTVB, offset, 1, "%s",
                          decode_boolean_bitfield(mode, 0x08, 8,
                                                  "Security signatures required",
                                                  "Security signatures not required"));
@@ -3076,7 +3335,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max multiplex count: %u", GSHORT(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max multiplex count: %u", GSHORT(pd, offset));
 
     }
     
@@ -3084,7 +3343,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max vcs:             %u", GSHORT(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max vcs:             %u", GSHORT(pd, offset));
 
     }
 
@@ -3092,7 +3351,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max buffer size:     %u", GWORD(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max buffer size:     %u", GWORD(pd, offset));
 
     }
 
@@ -3100,7 +3359,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Max raw size:        %u", GWORD(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Max raw size:        %u", GWORD(pd, offset));
 
     }
 
@@ -3108,7 +3367,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Session key:         %08x", GWORD(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Session key:         %08x", GWORD(pd, offset));
 
     }
 
@@ -3118,61 +3377,61 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 4, "Capabilities: 0x%04x", caps);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 4, "Capabilities: 0x%04x", caps);
       caps_tree = proto_item_add_subtree(ti, ett_smb_capabilities);
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x0001, 32,
                                                  "Raw Mode supported",
                                                  "Raw Mode not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x0002, 32,
                                                  "MPX Mode supported",
                                                  "MPX Mode not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x0004, 32,
                                                  "Unicode supported",
                                                  "Unicode not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x0008, 32,
                                                  "Large files supported",
                                                  "Large files not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x0010, 32, 
                                                  "NT LM 0.12 SMBs supported",
                                                  "NT LM 0.12 SMBs not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x0020, 32,
                                                  "RPC remote APIs supported",
                                                  "RPC remote APIs not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x0040, 32,
                                                  "NT status codes supported",
                                                  "NT status codes  not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x0080, 32,
                                                  "Level 2 OpLocks supported",
                                                  "Level 2 OpLocks not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x0100, 32,
                                                  "Lock&Read supported",
                                                  "Lock&Read not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x0200, 32,
                                                  "NT Find supported",
                                                  "NT Find not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x1000, 32,
                                                  "DFS supported",
                                                  "DFS not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x4000, 32,
                                                  "Large READX supported",
                                                  "Large READX not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x8000, 32,
                                                  "Large WRITEX supported",
                                                  "Large WRITEX not supported"));
-      proto_tree_add_text(caps_tree, offset, 4, "%s",
+      proto_tree_add_text(caps_tree, NullTVB, offset, 4, "%s",
                          decode_boolean_bitfield(caps, 0x80000000, 32,
                                                  "Extended security exchanges supported",
                                                  "Extended security exchanges not supported"));
@@ -3184,8 +3443,8 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "System Time Low: 0x%08x", GWORD(pd, offset));
-      proto_tree_add_text(tree, offset + 4, 4, "System Time High: 0x%08x", GWORD(pd, offset + 4)); 
+      proto_tree_add_text(tree, NullTVB, offset, 4, "System Time Low: 0x%08x", GWORD(pd, offset));
+      proto_tree_add_text(tree, NullTVB, offset + 4, 4, "System Time High: 0x%08x", GWORD(pd, offset + 4)); 
 
     }
 
@@ -3195,7 +3454,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Server time zone: %i min from UTC",
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Server time zone: %i min from UTC",
                          (signed)GSSHORT(pd, offset));
 
     }
@@ -3208,7 +3467,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Encryption key len: %u", enckeylen);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Encryption key len: %u", enckeylen);
 
     }
 
@@ -3218,7 +3477,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte count (BCC): %u", bcc);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte count (BCC): %u", bcc);
 
     }
 
@@ -3232,7 +3491,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, enckeylen, "Challenge encryption key: %s",
+       proto_tree_add_text(tree, NullTVB, offset, enckeylen, "Challenge encryption key: %s",
                                bytes_to_str(str, enckeylen));
 
       }
@@ -3251,9 +3510,9 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
 
       if (caps & 0x0004) {
        ustr = unicode_to_str(str, &ustr_len);
-       proto_tree_add_text(tree, offset, ustr_len+2, "OEM domain name: %s", ustr);
+       proto_tree_add_text(tree, NullTVB, offset, ustr_len+2, "OEM domain name: %s", ustr);
       } else {
-       proto_tree_add_text(tree, offset, strlen(str)+1, "OEM domain name: %s", str);
+       proto_tree_add_text(tree, NullTVB, offset, strlen(str)+1, "OEM domain name: %s", str);
       }
 
     }
@@ -3263,7 +3522,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
   default:    /* Baddd */
 
     if (tree)
-      proto_tree_add_text(tree, offset, 1, "Bad format, should never get here");
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Bad format, should never get here");
     return;
 
   }
@@ -3287,7 +3546,7 @@ dissect_deletedir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -3299,7 +3558,7 @@ dissect_deletedir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -3311,7 +3570,7 @@ dissect_deletedir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -3323,7 +3582,7 @@ dissect_deletedir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(DirectoryName) + 1, "Directory Name: %s", DirectoryName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(DirectoryName) + 1, "Directory Name: %s", DirectoryName);
 
     }
 
@@ -3339,7 +3598,7 @@ dissect_deletedir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -3351,7 +3610,7 @@ dissect_deletedir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -3378,7 +3637,7 @@ dissect_createdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -3390,7 +3649,7 @@ dissect_createdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -3402,7 +3661,7 @@ dissect_createdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -3414,7 +3673,7 @@ dissect_createdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(DirectoryName) + 1, "Directory Name: %s", DirectoryName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(DirectoryName) + 1, "Directory Name: %s", DirectoryName);
 
     }
 
@@ -3430,7 +3689,7 @@ dissect_createdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -3442,7 +3701,7 @@ dissect_createdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -3452,6 +3711,7 @@ dissect_createdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
 }
 
+
 void
 dissect_checkdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
 
@@ -3469,7 +3729,7 @@ dissect_checkdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -3481,7 +3741,7 @@ dissect_checkdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -3493,7 +3753,7 @@ dissect_checkdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -3505,7 +3765,7 @@ dissect_checkdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(DirectoryName) + 1, "Directory Name: %s", DirectoryName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(DirectoryName) + 1, "Directory Name: %s", DirectoryName);
 
     }
 
@@ -3521,7 +3781,7 @@ dissect_checkdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -3533,7 +3793,7 @@ dissect_checkdir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -3654,7 +3914,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -3666,7 +3926,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "AndXCommand: %s", 
+      proto_tree_add_text(tree, NullTVB, offset, 1, "AndXCommand: %s", 
                          (AndXCommand == 0xFF ? "No further commands" : decode_smb_name(AndXCommand)));
 
     }
@@ -3679,7 +3939,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "AndXReserved: %u", AndXReserved);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "AndXReserved: %u", AndXReserved);
 
     }
 
@@ -3691,7 +3951,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "AndXOffset: %u", AndXOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "AndXOffset: %u", AndXOffset);
 
     }
 
@@ -3703,13 +3963,13 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Flags: 0x%02x", Flags);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Flags: 0x%02x", Flags);
       Flags_tree = proto_item_add_subtree(ti, ett_smb_flags);
-      proto_tree_add_text(Flags_tree, offset, 2, "%s",
+      proto_tree_add_text(Flags_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Flags, 0x01, 16, "Dont Return Additional Info", "Return Additional Info"));
-      proto_tree_add_text(Flags_tree, offset, 2, "%s",
+      proto_tree_add_text(Flags_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Flags, 0x02, 16, "Exclusive OpLock not Requested", "Exclusive OpLock Requested"));
-      proto_tree_add_text(Flags_tree, offset, 2, "%s",
+      proto_tree_add_text(Flags_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Flags, 0x04, 16, "Batch OpLock not Requested", "Batch OpLock Requested"));
     
 }
@@ -3722,17 +3982,17 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Desired Access: 0x%02x", DesiredAccess);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Desired Access: 0x%02x", DesiredAccess);
       DesiredAccess_tree = proto_item_add_subtree(ti, ett_smb_desiredaccess);
-      proto_tree_add_text(DesiredAccess_tree, offset, 2, "%s",
+      proto_tree_add_text(DesiredAccess_tree, NullTVB, offset, 2, "%s",
                           decode_enumerated_bitfield(DesiredAccess, 0x07, 16, DesiredAccess_0x07, "%s"));
-      proto_tree_add_text(DesiredAccess_tree, offset, 2, "%s",
+      proto_tree_add_text(DesiredAccess_tree, NullTVB, offset, 2, "%s",
                           decode_enumerated_bitfield(DesiredAccess, 0x70, 16, DesiredAccess_0x70, "%s"));
-      proto_tree_add_text(DesiredAccess_tree, offset, 2, "%s",
+      proto_tree_add_text(DesiredAccess_tree, NullTVB, offset, 2, "%s",
                           decode_enumerated_bitfield(DesiredAccess, 0x700, 16, DesiredAccess_0x700, "%s"));
-      proto_tree_add_text(DesiredAccess_tree, offset, 2, "%s",
+      proto_tree_add_text(DesiredAccess_tree, NullTVB, offset, 2, "%s",
                           decode_enumerated_bitfield(DesiredAccess, 0x1000, 16, DesiredAccess_0x1000, "%s"));
-      proto_tree_add_text(DesiredAccess_tree, offset, 2, "%s",
+      proto_tree_add_text(DesiredAccess_tree, NullTVB, offset, 2, "%s",
                           decode_enumerated_bitfield(DesiredAccess, 0x4000, 16, DesiredAccess_0x4000, "%s"));
     
 }
@@ -3745,19 +4005,19 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Search: 0x%02x", Search);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Search: 0x%02x", Search);
       Search_tree = proto_item_add_subtree(ti, ett_smb_search);
-      proto_tree_add_text(Search_tree, offset, 2, "%s",
+      proto_tree_add_text(Search_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Search, 0x01, 16, "Read only file", "Not a read only file"));
-      proto_tree_add_text(Search_tree, offset, 2, "%s",
+      proto_tree_add_text(Search_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Search, 0x02, 16, "Hidden file", "Not a hidden file"));
-      proto_tree_add_text(Search_tree, offset, 2, "%s",
+      proto_tree_add_text(Search_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Search, 0x04, 16, "System file", "Not a system file"));
-      proto_tree_add_text(Search_tree, offset, 2, "%s",
+      proto_tree_add_text(Search_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Search, 0x08, 16, " Volume", "Not a volume"));
-      proto_tree_add_text(Search_tree, offset, 2, "%s",
+      proto_tree_add_text(Search_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Search, 0x10, 16, " Directory", "Not a directory"));
-      proto_tree_add_text(Search_tree, offset, 2, "%s",
+      proto_tree_add_text(Search_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Search, 0x20, 16, "Archive file", "Do not archive file"));
     
 }
@@ -3770,19 +4030,19 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "File: 0x%02x", File);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "File: 0x%02x", File);
       File_tree = proto_item_add_subtree(ti, ett_smb_file);
-      proto_tree_add_text(File_tree, offset, 2, "%s",
+      proto_tree_add_text(File_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(File, 0x01, 16, "Read only file", "Not a read only file"));
-      proto_tree_add_text(File_tree, offset, 2, "%s",
+      proto_tree_add_text(File_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(File, 0x02, 16, "Hidden file", "Not a hidden file"));
-      proto_tree_add_text(File_tree, offset, 2, "%s",
+      proto_tree_add_text(File_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(File, 0x04, 16, "System file", "Not a system file"));
-      proto_tree_add_text(File_tree, offset, 2, "%s",
+      proto_tree_add_text(File_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(File, 0x08, 16, " Volume", "Not a volume"));
-      proto_tree_add_text(File_tree, offset, 2, "%s",
+      proto_tree_add_text(File_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(File, 0x10, 16, " Directory", "Not a directory"));
-      proto_tree_add_text(File_tree, offset, 2, "%s",
+      proto_tree_add_text(File_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(File, 0x20, 16, "Archive file", "Do not archive file"));
     
 }
@@ -3806,8 +4066,8 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Creation Date: %s", dissect_smbu_date(CreationDate, CreationTime));
-      proto_tree_add_text(tree, offset, 2, "Creation Time: %s", dissect_smbu_time(CreationDate, CreationTime));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Creation Date: %s", dissect_smbu_date(CreationDate, CreationTime));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Creation Time: %s", dissect_smbu_time(CreationDate, CreationTime));
 
     }
 
@@ -3819,11 +4079,11 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Open Function: 0x%02x", OpenFunction);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Open Function: 0x%02x", OpenFunction);
       OpenFunction_tree = proto_item_add_subtree(ti, ett_smb_openfunction);
-      proto_tree_add_text(OpenFunction_tree, offset, 2, "%s",
+      proto_tree_add_text(OpenFunction_tree, NullTVB, offset, 2, "%s",
                           decode_enumerated_bitfield(OpenFunction, 0x10, 16, OpenFunction_0x10, "%s"));
-      proto_tree_add_text(OpenFunction_tree, offset, 2, "%s",
+      proto_tree_add_text(OpenFunction_tree, NullTVB, offset, 2, "%s",
                           decode_enumerated_bitfield(OpenFunction, 0x03, 16, OpenFunction_0x03, "%s"));
     
 }
@@ -3836,7 +4096,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Allocated Size: %u", AllocatedSize);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Allocated Size: %u", AllocatedSize);
 
     }
 
@@ -3848,7 +4108,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Reserved1: %u", Reserved1);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Reserved1: %u", Reserved1);
 
     }
 
@@ -3860,7 +4120,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Reserved2: %u", Reserved2);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Reserved2: %u", Reserved2);
 
     }
 
@@ -3872,7 +4132,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count: %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count: %u", ByteCount);
 
     }
 
@@ -3884,7 +4144,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(FileName) + 1, "File Name: %s", FileName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(FileName) + 1, "File Name: %s", FileName);
 
     }
 
@@ -3907,7 +4167,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -3921,7 +4181,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 1, "AndXCommand: %s", 
+       proto_tree_add_text(tree, NullTVB, offset, 1, "AndXCommand: %s", 
                            (AndXCommand == 0xFF ? "No further commands" : decode_smb_name(AndXCommand)));
 
       }
@@ -3934,7 +4194,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 1, "AndXReserved: %u", AndXReserved);
+       proto_tree_add_text(tree, NullTVB, offset, 1, "AndXReserved: %u", AndXReserved);
 
       }
 
@@ -3946,7 +4206,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "AndXOffset: %u", AndXOffset);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "AndXOffset: %u", AndXOffset);
 
       }
 
@@ -3958,7 +4218,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
       }
 
@@ -3970,19 +4230,19 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       ti = proto_tree_add_text(tree, offset, 2, "FileAttributes: 0x%02x", FileAttributes);
+       ti = proto_tree_add_text(tree, NullTVB, offset, 2, "FileAttributes: 0x%02x", FileAttributes);
        FileAttributes_tree = proto_item_add_subtree(ti, ett_smb_fileattributes);
-       proto_tree_add_text(FileAttributes_tree, offset, 2, "%s",
+       proto_tree_add_text(FileAttributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(FileAttributes, 0x01, 16, "Read only file", "Not a read only file"));
-       proto_tree_add_text(FileAttributes_tree, offset, 2, "%s",
+       proto_tree_add_text(FileAttributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(FileAttributes, 0x02, 16, "Hidden file", "Not a hidden file"));
-       proto_tree_add_text(FileAttributes_tree, offset, 2, "%s",
+       proto_tree_add_text(FileAttributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(FileAttributes, 0x04, 16, "System file", "Not a system file"));
-       proto_tree_add_text(FileAttributes_tree, offset, 2, "%s",
+       proto_tree_add_text(FileAttributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(FileAttributes, 0x08, 16, " Volume", "Not a volume"));
-       proto_tree_add_text(FileAttributes_tree, offset, 2, "%s",
+       proto_tree_add_text(FileAttributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(FileAttributes, 0x10, 16, " Directory", "Not a directory"));
-       proto_tree_add_text(FileAttributes_tree, offset, 2, "%s",
+       proto_tree_add_text(FileAttributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(FileAttributes, 0x20, 16, "Archive file", "Do not archive file"));
     
       }
@@ -4005,8 +4265,8 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Last Write Date: %s", dissect_smbu_date(LastWriteDate, LastWriteTime));
-       proto_tree_add_text(tree, offset, 2, "Last Write Time: %s", dissect_smbu_time(LastWriteDate, LastWriteTime));
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Last Write Date: %s", dissect_smbu_date(LastWriteDate, LastWriteTime));
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Last Write Time: %s", dissect_smbu_time(LastWriteDate, LastWriteTime));
 
 
       }
@@ -4019,7 +4279,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 4, "Data Size: %u", DataSize);
+       proto_tree_add_text(tree, NullTVB, offset, 4, "Data Size: %u", DataSize);
 
       }
 
@@ -4031,7 +4291,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Granted Access: %u", GrantedAccess);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Granted Access: %u", GrantedAccess);
 
       }
 
@@ -4043,9 +4303,9 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       ti = proto_tree_add_text(tree, offset, 2, "File Type: 0x%02x", FileType);
+       ti = proto_tree_add_text(tree, NullTVB, offset, 2, "File Type: 0x%02x", FileType);
        FileType_tree = proto_item_add_subtree(ti, ett_smb_filetype);
-       proto_tree_add_text(FileType_tree, offset, 2, "%s",
+       proto_tree_add_text(FileType_tree, NullTVB, offset, 2, "%s",
                           decode_enumerated_bitfield(FileType, 0xFFFF, 16, FileType_0xFFFF, "%s"));
     
       }
@@ -4058,7 +4318,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Device State: %u", DeviceState);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Device State: %u", DeviceState);
 
       }
 
@@ -4070,11 +4330,11 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       ti = proto_tree_add_text(tree, offset, 2, "Action: 0x%02x", Action);
+       ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Action: 0x%02x", Action);
        Action_tree = proto_item_add_subtree(ti, ett_smb_action);
-       proto_tree_add_text(Action_tree, offset, 2, "%s",
+       proto_tree_add_text(Action_tree, NullTVB, offset, 2, "%s",
                            decode_enumerated_bitfield(Action, 0x8000, 16, Action_0x8000, "%s"));
-       proto_tree_add_text(Action_tree, offset, 2, "%s",
+       proto_tree_add_text(Action_tree, NullTVB, offset, 2, "%s",
                            decode_enumerated_bitfield(Action, 0x0003, 16, Action_0x0003, "%s"));
        
       }
@@ -4087,7 +4347,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 4, "Server FID: %u", ServerFID);
+       proto_tree_add_text(tree, NullTVB, offset, 4, "Server FID: %u", ServerFID);
 
       }
 
@@ -4099,7 +4359,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
        
-       proto_tree_add_text(tree, offset, 2, "Reserved: %u", Reserved);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved: %u", Reserved);
 
       }
 
@@ -4113,7 +4373,7 @@ dissect_open_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count: %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count: %u", ByteCount);
 
     }
 
@@ -4164,7 +4424,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+        proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
       }
 
@@ -4176,7 +4436,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
       }
 
@@ -4188,7 +4448,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
       }
 
@@ -4200,7 +4460,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Reserved 1: %u", Reserved1);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 1: %u", Reserved1);
 
       }
 
@@ -4212,7 +4472,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
       }
 
@@ -4224,7 +4484,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "Timeout: %u", Timeout);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "Timeout: %u", Timeout);
 
       }
 
@@ -4236,11 +4496,11 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        ti = proto_tree_add_text(tree, offset, 2, "WriteMode: 0x%02x", WriteMode);
+        ti = proto_tree_add_text(tree, NullTVB, offset, 2, "WriteMode: 0x%02x", WriteMode);
         WriteMode_tree = proto_item_add_subtree(ti, ett_smb_writemode);
-        proto_tree_add_text(WriteMode_tree, offset, 2, "%s",
+        proto_tree_add_text(WriteMode_tree, NullTVB, offset, 2, "%s",
                             decode_boolean_bitfield(WriteMode, 0x01, 16, "Write through requested", "Write through not requested"));
-        proto_tree_add_text(WriteMode_tree, offset, 2, "%s",
+        proto_tree_add_text(WriteMode_tree, NullTVB, offset, 2, "%s",
                             decode_boolean_bitfield(WriteMode, 0x02, 16, "Return Remaining (pipe/dev)", "Dont return Remaining (pipe/dev)"));
       
 }
@@ -4253,7 +4513,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "Reserved 2: %u", Reserved2);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "Reserved 2: %u", Reserved2);
 
       }
 
@@ -4265,7 +4525,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Data Length: %u", DataLength);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
 
       }
 
@@ -4277,7 +4537,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Data Offset: %u", DataOffset);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
       }
 
@@ -4289,7 +4549,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
       }
 
@@ -4301,7 +4561,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 1, "Pad: %u", Pad);
+        proto_tree_add_text(tree, NullTVB, offset, 1, "Pad: %u", Pad);
 
       }
 
@@ -4317,7 +4577,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+        proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
       }
 
@@ -4329,7 +4589,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
       }
 
@@ -4341,7 +4601,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
       }
 
@@ -4353,7 +4613,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Reserved 1: %u", Reserved1);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 1: %u", Reserved1);
 
       }
 
@@ -4365,7 +4625,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "Timeout: %u", Timeout);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "Timeout: %u", Timeout);
 
       }
 
@@ -4377,11 +4637,11 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        ti = proto_tree_add_text(tree, offset, 2, "WriteMode: 0x%02x", WriteMode);
+        ti = proto_tree_add_text(tree, NullTVB, offset, 2, "WriteMode: 0x%02x", WriteMode);
         WriteMode_tree = proto_item_add_subtree(ti, ett_smb_writemode);
-        proto_tree_add_text(WriteMode_tree, offset, 2, "%s",
+        proto_tree_add_text(WriteMode_tree, NullTVB, offset, 2, "%s",
                             decode_boolean_bitfield(WriteMode, 0x01, 16, "Write through requested", "Write through not requested"));
-        proto_tree_add_text(WriteMode_tree, offset, 2, "%s",
+        proto_tree_add_text(WriteMode_tree, NullTVB, offset, 2, "%s",
                             decode_boolean_bitfield(WriteMode, 0x02, 16, "Return Remaining (pipe/dev)", "Dont return Remaining (pipe/dev)"));
       
 }
@@ -4394,7 +4654,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "Reserved 2: %u", Reserved2);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "Reserved 2: %u", Reserved2);
 
       }
 
@@ -4406,7 +4666,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Data Length: %u", DataLength);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
 
       }
 
@@ -4418,7 +4678,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Data Offset: %u", DataOffset);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
       }
 
@@ -4430,7 +4690,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
       }
 
@@ -4442,7 +4702,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 1, "Pad: %u", Pad);
+        proto_tree_add_text(tree, NullTVB, offset, 1, "Pad: %u", Pad);
 
       }
 
@@ -4462,7 +4722,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -4476,7 +4736,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Remaining: %u", Remaining);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Remaining: %u", Remaining);
 
       }
 
@@ -4490,7 +4750,7 @@ dissect_write_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count: %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count: %u", ByteCount);
 
     }
 
@@ -4515,7 +4775,7 @@ dissect_tdis_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -4527,7 +4787,7 @@ dissect_tdis_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -4543,7 +4803,7 @@ dissect_tdis_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -4555,7 +4815,7 @@ dissect_tdis_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -4596,7 +4856,7 @@ dissect_move_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -4608,7 +4868,7 @@ dissect_move_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "TID2: %u", TID2);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "TID2: %u", TID2);
 
     }
 
@@ -4620,7 +4880,7 @@ dissect_move_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Open Function: %u", OpenFunction);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Open Function: %u", OpenFunction);
 
     }
 
@@ -4632,9 +4892,9 @@ dissect_move_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Flags: 0x%02x", Flags);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Flags: 0x%02x", Flags);
       Flags_tree = proto_item_add_subtree(ti, ett_smb_flags);
-      proto_tree_add_text(Flags_tree, offset, 2, "%s",
+      proto_tree_add_text(Flags_tree, NullTVB, offset, 2, "%s",
                           decode_enumerated_bitfield(Flags, 0x03, 16, Flags_0x03, "%s"));
     
 }
@@ -4651,7 +4911,7 @@ dissect_move_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -4665,7 +4925,7 @@ dissect_move_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
       }
 
@@ -4679,7 +4939,7 @@ dissect_move_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count: %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count: %u", ByteCount);
 
     }
 
@@ -4691,7 +4951,7 @@ dissect_move_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Error File Format: %u", ErrorFileFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Error File Format: %u", ErrorFileFormat);
 
     }
 
@@ -4703,7 +4963,7 @@ dissect_move_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *paren
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(ErrorFileName) + 1, "Error File Name: %s", ErrorFileName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(ErrorFileName) + 1, "Error File Name: %s", ErrorFileName);
 
     }
 
@@ -4733,7 +4993,7 @@ dissect_rename_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -4745,7 +5005,7 @@ dissect_rename_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Search Attributes: %u", SearchAttributes);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Search Attributes: %u", SearchAttributes);
 
     }
 
@@ -4757,7 +5017,7 @@ dissect_rename_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count: %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count: %u", ByteCount);
 
     }
 
@@ -4769,7 +5029,7 @@ dissect_rename_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format 1: %u", BufferFormat1);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format 1: %u", BufferFormat1);
 
     }
 
@@ -4781,7 +5041,7 @@ dissect_rename_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(OldFileName) + 1, "Old File Name: %s", OldFileName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(OldFileName) + 1, "Old File Name: %s", OldFileName);
 
     }
 
@@ -4793,7 +5053,7 @@ dissect_rename_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format 2: %u", BufferFormat2);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format 2: %u", BufferFormat2);
 
     }
 
@@ -4805,7 +5065,7 @@ dissect_rename_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(NewFileName) + 1, "New File Name: %s", NewFileName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(NewFileName) + 1, "New File Name: %s", NewFileName);
 
     }
 
@@ -4821,7 +5081,7 @@ dissect_rename_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -4833,7 +5093,7 @@ dissect_rename_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -4870,7 +5130,7 @@ dissect_open_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto_
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -4882,7 +5142,7 @@ dissect_open_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto_
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Setup Length: %u", SetupLength);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Setup Length: %u", SetupLength);
 
     }
 
@@ -4894,9 +5154,9 @@ dissect_open_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto_
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Mode: 0x%02x", Mode);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Mode: 0x%02x", Mode);
       Mode_tree = proto_item_add_subtree(ti, ett_smb_mode);
-      proto_tree_add_text(Mode_tree, offset, 2, "%s",
+      proto_tree_add_text(Mode_tree, NullTVB, offset, 2, "%s",
                           decode_enumerated_bitfield(Mode, 0x03, 16, Mode_0x03, "%s"));
     
 }
@@ -4909,7 +5169,7 @@ dissect_open_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto_
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -4921,7 +5181,7 @@ dissect_open_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto_
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -4933,7 +5193,7 @@ dissect_open_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto_
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(IdentifierString) + 1, "Identifier String: %s", IdentifierString);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(IdentifierString) + 1, "Identifier String: %s", IdentifierString);
 
     }
 
@@ -4949,7 +5209,7 @@ dissect_open_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto_
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -4961,7 +5221,7 @@ dissect_open_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto_
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -4973,7 +5233,7 @@ dissect_open_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto_
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -4999,7 +5259,7 @@ dissect_close_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -5011,7 +5271,7 @@ dissect_close_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -5023,7 +5283,7 @@ dissect_close_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -5039,7 +5299,7 @@ dissect_close_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count: %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count: %u", WordCount);
 
     }
 
@@ -5051,7 +5311,7 @@ dissect_close_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -5089,7 +5349,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+        proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
       }
 
@@ -5101,7 +5361,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
       }
 
@@ -5113,7 +5373,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
       }
 
@@ -5125,7 +5385,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Max Count: %u", MaxCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Max Count: %u", MaxCount);
 
       }
 
@@ -5137,7 +5397,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Min Count: %u", MinCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Min Count: %u", MinCount);
 
       }
 
@@ -5149,7 +5409,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "Timeout: %u", Timeout);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "Timeout: %u", Timeout);
 
       }
 
@@ -5161,7 +5421,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Reserved: %u", Reserved);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved: %u", Reserved);
 
       }
 
@@ -5173,7 +5433,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
       }
 
@@ -5189,7 +5449,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+        proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
       }
 
@@ -5201,7 +5461,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
       }
 
@@ -5213,7 +5473,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
       }
 
@@ -5225,7 +5485,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Max Count: %u", MaxCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Max Count: %u", MaxCount);
 
       }
 
@@ -5237,7 +5497,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Min Count: %u", MinCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Min Count: %u", MinCount);
 
       }
 
@@ -5249,7 +5509,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "Timeout: %u", Timeout);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "Timeout: %u", Timeout);
 
       }
 
@@ -5261,7 +5521,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Reserved: %u", Reserved);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved: %u", Reserved);
 
       }
 
@@ -5273,7 +5533,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 4, "Offset High: %u", OffsetHigh);
+        proto_tree_add_text(tree, NullTVB, offset, 4, "Offset High: %u", OffsetHigh);
 
       }
 
@@ -5285,7 +5545,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       if (tree) {
 
-        proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
       }
 
@@ -5304,7 +5564,7 @@ dissect_read_raw_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 }
 
 void
-dissect_logoff_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
+dissect_read_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
 
 {
   guint8        WordCount;
@@ -5312,6 +5572,17 @@ dissect_logoff_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
   guint8        AndXCommand = 0xFF;
   guint16       ByteCount;
   guint16       AndXOffset = 0;
+  guint16       FID;
+  guint16       DataCompactionMode;
+  guint16       DataLength;
+  guint16       DataOffset;
+  guint16       Remaining;
+  guint16       MaxCount;
+  guint16       MinCount;
+  guint16       Reserved;
+  guint32       Offset;
+  guint32       OffsetHigh;
+  int           i;
 
   if (dirn == 1) { /* Request(s) dissect code */
 
@@ -5321,7 +5592,7 @@ dissect_logoff_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -5333,7 +5604,7 @@ dissect_logoff_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "AndXCommand: %u", AndXCommand);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "AndXCommand: %u", AndXCommand);
 
     }
 
@@ -5345,7 +5616,7 @@ dissect_logoff_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "AndXReserved: %u", AndXReserved);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "AndXReserved: %u", AndXReserved);
 
     }
 
@@ -5357,82 +5628,98 @@ dissect_logoff_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "AndXOffset: %u", AndXOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "AndXOffset: %u", AndXOffset);
 
     }
 
     offset += 2; /* Skip AndXOffset */
 
-    /* Build display for: Byte Count (BCC) */
+    /* Build display for: FID */
 
-    ByteCount = GSHORT(pd, offset);
+    FID = GSHORT(pd, offset);
 
     if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
-
+       
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
+       
     }
 
-    offset += 2; /* Skip Byte Count (BCC) */
+    offset += 2; /* Skip FID */
 
+    /* Build display for: Offset */
 
-    if (AndXCommand != 0xFF) {
+    Offset = GWORD(pd, offset);
 
-      (dissect[AndXCommand])(pd, SMB_offset + AndXOffset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn);
+    if (tree) {
 
-    }
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
-  }
+    }
 
-  if (dirn == 0) { /* Response(s) dissect code */
+    offset += 4; /* Skip Offset */
 
-    /* Build display for: Word Count (WCT) */
+    /* Build display for: Max Count */
 
-    WordCount = GBYTE(pd, offset);
+    MaxCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Max Count: %u", MaxCount);
 
     }
 
-    offset += 1; /* Skip Word Count (WCT) */
+    offset += 2; /* Skip Max Count */
 
-    /* Build display for: AndXCommand */
+    /* Build display for: Min Count */
 
-    AndXCommand = GBYTE(pd, offset);
+    MinCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "AndXCommand: %u", AndXCommand);
+        proto_tree_add_text(tree, NullTVB, offset, 2, "Min Count: %u", MinCount);
 
     }
 
-    offset += 1; /* Skip AndXCommand */
+    offset += 2; /* Skip Min Count */
 
-    /* Build display for: AndXReserved */
+    /* Build display for: Reserved */
 
-    AndXReserved = GBYTE(pd, offset);
+    Reserved = GWORD(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "AndXReserved: %u", AndXReserved);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Reserved: %u", Reserved);
 
     }
 
-    offset += 1; /* Skip AndXReserved */
+    offset += 4; /* Skip Reserved */
 
-    /* Build display for: AndXOffset */
+    /* Build display for: Remaining */
 
-    AndXOffset = GSHORT(pd, offset);
+    Remaining = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "AndXOffset: %u", AndXOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Remaining: %u", Remaining);
 
     }
 
-    offset += 2; /* Skip AndXOffset */
+    offset += 2; /* Skip Remaining */
+
+    if (WordCount == 12) {
+
+       /* Build display for: Offset High */
+
+       OffsetHigh = GWORD(pd, offset);
+
+       if (tree) {
+
+           proto_tree_add_text(tree, NullTVB, offset, 4, "Offset High: %u", OffsetHigh);
+
+       }
+
+       offset += 4; /* Skip Offset High */
+    }
 
     /* Build display for: Byte Count (BCC) */
 
@@ -5440,7 +5727,7 @@ dissect_logoff_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -5455,27 +5742,7 @@ dissect_logoff_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
   }
 
-}
-
-void
-dissect_seek_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
-
-{
-  static const value_string Mode_0x03[] = {
-       { 0, "Seek from start of file"},
-       { 1, "Seek from current position"},
-       { 2, "Seek from end of file"},
-       { 0, NULL}
-};
-  proto_tree    *Mode_tree;
-  proto_item    *ti;
-  guint8        WordCount;
-  guint32       Offset;
-  guint16       Mode;
-  guint16       FID;
-  guint16       ByteCount;
-
-  if (dirn == 1) { /* Request(s) dissect code */
+  if (dirn == 0) { /* Response(s) dissect code */
 
     /* Build display for: Word Count (WCT) */
 
@@ -5483,90 +5750,121 @@ dissect_seek_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
     offset += 1; /* Skip Word Count (WCT) */
 
-    /* Build display for: FID */
+    /* Build display for: AndXCommand */
 
-    FID = GSHORT(pd, offset);
+    AndXCommand = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "AndXCommand: %u", AndXCommand);
 
     }
 
-    offset += 2; /* Skip FID */
+    offset += 1; /* Skip AndXCommand */
 
-    /* Build display for: Mode */
+    /* Build display for: AndXReserved */
 
-    Mode = GSHORT(pd, offset);
+    AndXReserved = GBYTE(pd, offset);
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Mode: 0x%02x", Mode);
-      Mode_tree = proto_item_add_subtree(ti, ett_smb_mode);
-      proto_tree_add_text(Mode_tree, offset, 2, "%s",
-                          decode_enumerated_bitfield(Mode, 0x03, 16, Mode_0x03, "%s"));
-    
-}
+      proto_tree_add_text(tree, NullTVB, offset, 1, "AndXReserved: %u", AndXReserved);
 
-    offset += 2; /* Skip Mode */
+    }
 
-    /* Build display for: Offset */
+    offset += 1; /* Skip AndXReserved */
 
-    Offset = GWORD(pd, offset);
+    /* Build display for: AndXOffset */
+
+    AndXOffset = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "AndXOffset: %u", AndXOffset);
 
     }
 
-    offset += 4; /* Skip Offset */
+    offset += 2; /* Skip AndXOffset */
 
-    /* Build display for: Byte Count (BCC) */
+    /* Build display for: Remaining */
 
-    ByteCount = GSHORT(pd, offset);
+    Remaining = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Remaining: %u", Remaining);
 
     }
 
-    offset += 2; /* Skip Byte Count (BCC) */
+    offset += 2; /* Skip Remaining */
 
-  }
+    /* Build display for: Data Compaction Mode */
 
-  if (dirn == 0) { /* Response(s) dissect code */
+    DataCompactionMode = GSHORT(pd, offset);
 
-    /* Build display for: Word Count (WCT) */
+    if (tree) {
 
-    WordCount = GBYTE(pd, offset);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Data Compaction Mode: %u", DataCompactionMode);
+
+    }
+
+    offset += 2; /* Skip Data Compaction Mode */
+
+    /* Build display for: Reserved */
+
+    Reserved = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved: %u", Reserved);
 
     }
 
-    offset += 1; /* Skip Word Count (WCT) */
+    offset += 2; /* Skip Reserved */
 
-    /* Build display for: Offset */
+    /* Build display for: Data Length */
 
-    Offset = GWORD(pd, offset);
+    DataLength = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
 
     }
 
-    offset += 4; /* Skip Offset */
+    offset += 2; /* Skip Data Length */
+
+    /* Build display for: Data Offset */
+
+    DataOffset = GSHORT(pd, offset);
+
+    if (tree) {
+
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
+
+    }
+
+    offset += 2; /* Skip Data Offset */
+
+    /* Build display for: Reserved[5] */
+    for(i = 1; i <= 5; ++i) {
+
+       Reserved = GSHORT(pd, offset);
+
+       if (tree) {
+
+           proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved%u: %u", i, Reserved);
+
+       }
+       offset += 2;
+    }
 
     /* Build display for: Byte Count (BCC) */
 
@@ -5574,28 +5872,43 @@ dissect_seek_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
     offset += 2; /* Skip Byte Count (BCC) */
 
+    /* Build display for data */
+
+    if (tree) {
+
+       offset = SMB_offset + DataOffset;
+       if(END_OF_FRAME >= DataLength)
+           proto_tree_add_text(tree, NullTVB, offset, DataLength, "Data (%u bytes)", DataLength);
+       else
+           proto_tree_add_text(tree, NullTVB, offset, END_OF_FRAME, "Data (first %u bytes)", END_OF_FRAME);
+
+    }
+
+    if (AndXCommand != 0xFF) {
+
+      (dissect[AndXCommand])(pd, SMB_offset + AndXOffset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn);
+
+    }
+
   }
 
 }
 
 void
-dissect_write_and_unlock_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
+dissect_logoff_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
 
 {
   guint8        WordCount;
-  guint8        BufferFormat;
-  guint32       Offset;
-  guint16       Remaining;
-  guint16       FID;
-  guint16       DataLength;
-  guint16       Count;
+  guint8        AndXReserved;
+  guint8        AndXCommand = 0xFF;
   guint16       ByteCount;
+  guint16       AndXOffset = 0;
 
   if (dirn == 1) { /* Request(s) dissect code */
 
@@ -5605,123 +5918,118 @@ dissect_write_and_unlock_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
     offset += 1; /* Skip Word Count (WCT) */
 
-    /* Build display for: FID */
+    /* Build display for: AndXCommand */
 
-    FID = GSHORT(pd, offset);
+    AndXCommand = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "AndXCommand: %u", AndXCommand);
 
     }
 
-    offset += 2; /* Skip FID */
+    offset += 1; /* Skip AndXCommand */
 
-    /* Build display for: Count */
+    /* Build display for: AndXReserved */
 
-    Count = GSHORT(pd, offset);
+    AndXReserved = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "AndXReserved: %u", AndXReserved);
 
     }
 
-    offset += 2; /* Skip Count */
+    offset += 1; /* Skip AndXReserved */
 
-    /* Build display for: Offset */
+    /* Build display for: AndXOffset */
 
-    Offset = GWORD(pd, offset);
+    AndXOffset = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "AndXOffset: %u", AndXOffset);
 
     }
 
-    offset += 4; /* Skip Offset */
+    offset += 2; /* Skip AndXOffset */
 
-    /* Build display for: Remaining */
+    /* Build display for: Byte Count (BCC) */
 
-    Remaining = GSHORT(pd, offset);
+    ByteCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Remaining: %u", Remaining);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
-    offset += 2; /* Skip Remaining */
-
-    /* Build display for: Byte Count (BCC) */
+    offset += 2; /* Skip Byte Count (BCC) */
 
-    ByteCount = GSHORT(pd, offset);
 
-    if (tree) {
+    if (AndXCommand != 0xFF) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      (dissect[AndXCommand])(pd, SMB_offset + AndXOffset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn);
 
     }
 
-    offset += 2; /* Skip Byte Count (BCC) */
+  }
 
-    /* Build display for: Buffer Format */
+  if (dirn == 0) { /* Response(s) dissect code */
 
-    BufferFormat = GBYTE(pd, offset);
+    /* Build display for: Word Count (WCT) */
+
+    WordCount = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
-    offset += 1; /* Skip Buffer Format */
+    offset += 1; /* Skip Word Count (WCT) */
 
-    /* Build display for: Data Length */
+    /* Build display for: AndXCommand */
 
-    DataLength = GSHORT(pd, offset);
+    AndXCommand = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Length: %u", DataLength);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "AndXCommand: %u", AndXCommand);
 
     }
 
-    offset += 2; /* Skip Data Length */
-
-  }
-
-  if (dirn == 0) { /* Response(s) dissect code */
+    offset += 1; /* Skip AndXCommand */
 
-    /* Build display for: Word Count (WCT) */
+    /* Build display for: AndXReserved */
 
-    WordCount = GBYTE(pd, offset);
+    AndXReserved = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "AndXReserved: %u", AndXReserved);
 
     }
 
-    offset += 1; /* Skip Word Count (WCT) */
+    offset += 1; /* Skip AndXReserved */
 
-    /* Build display for: Count */
+    /* Build display for: AndXOffset */
 
-    Count = GSHORT(pd, offset);
+    AndXOffset = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "AndXOffset: %u", AndXOffset);
 
     }
 
-    offset += 2; /* Skip Count */
+    offset += 2; /* Skip AndXOffset */
 
     /* Build display for: Byte Count (BCC) */
 
@@ -5729,43 +6037,54 @@ dissect_write_and_unlock_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
     offset += 2; /* Skip Byte Count (BCC) */
 
+
+    if (AndXCommand != 0xFF) {
+
+      (dissect[AndXCommand])(pd, SMB_offset + AndXOffset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn);
+
+    }
+
   }
 
 }
 
 void
-dissect_set_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
+dissect_seek_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
 
 {
+  static const value_string Mode_0x03[] = {
+       { 0, "Seek from start of file"},
+       { 1, "Seek from current position"},
+       { 2, "Seek from end of file"},
+       { 0, NULL}
+};
+  proto_tree    *Mode_tree;
+  proto_item    *ti;
   guint8        WordCount;
-  guint16       LastWriteTime;
-  guint16       LastWriteDate;
-  guint16       LastAccessTime;
-  guint16       LastAccessDate;
+  guint32       Offset;
+  guint16       Mode;
   guint16       FID;
-  guint16       CreationTime;
-  guint16       CreationDate;
   guint16       ByteCount;
 
   if (dirn == 1) { /* Request(s) dissect code */
 
-    /* Build display for: Word Count */
+    /* Build display for: Word Count (WCT) */
 
     WordCount = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count: %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
-    offset += 1; /* Skip Word Count */
+    offset += 1; /* Skip Word Count (WCT) */
 
     /* Build display for: FID */
 
@@ -5773,111 +6092,78 @@ dissect_set_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
     offset += 2; /* Skip FID */
 
-    /* Build display for: Creation Date */
-
-    CreationDate = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Creation Date: %u", dissect_dos_date(CreationDate));
-
-    }
-
-    offset += 2; /* Skip Creation Date */
-
-    /* Build display for: Creation Time */
-
-    CreationTime = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Creation Time: %u", dissect_dos_time(CreationTime));
-
-    }
-
-    offset += 2; /* Skip Creation Time */
-
-    /* Build display for: Last Access Date */
+    /* Build display for: Mode */
 
-    LastAccessDate = GSHORT(pd, offset);
+    Mode = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Last Access Date: %u", dissect_dos_date(LastAccessDate));
-
-    }
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Mode: 0x%02x", Mode);
+      Mode_tree = proto_item_add_subtree(ti, ett_smb_mode);
+      proto_tree_add_text(Mode_tree, NullTVB, offset, 2, "%s",
+                          decode_enumerated_bitfield(Mode, 0x03, 16, Mode_0x03, "%s"));
+    
+}
 
-    offset += 2; /* Skip Last Access Date */
+    offset += 2; /* Skip Mode */
 
-    /* Build display for: Last Access Time */
+    /* Build display for: Offset */
 
-    LastAccessTime = GSHORT(pd, offset);
+    Offset = GWORD(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Last Access Time: %u", dissect_dos_time(LastAccessTime));
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
     }
 
-    offset += 2; /* Skip Last Access Time */
+    offset += 4; /* Skip Offset */
 
-    /* Build display for: Last Write Date */
+    /* Build display for: Byte Count (BCC) */
 
-    LastWriteDate = GSHORT(pd, offset);
+    ByteCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Last Write Date: %u", dissect_dos_date(LastWriteDate));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
-    offset += 2; /* Skip Last Write Date */
-
-    /* Build display for: Last Write Time */
-
-    LastWriteTime = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Last Write Time: %u", dissect_dos_time(LastWriteTime));
+    offset += 2; /* Skip Byte Count (BCC) */
 
-    }
+  }
 
-    offset += 2; /* Skip Last Write Time */
+  if (dirn == 0) { /* Response(s) dissect code */
 
-    /* Build display for: Byte Count (BCC) */
+    /* Build display for: Word Count (WCT) */
 
-    ByteCount = GSHORT(pd, offset);
+    WordCount = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
-    offset += 2; /* Skip Byte Count (BCC) */
-
-  }
-
-  if (dirn == 0) { /* Response(s) dissect code */
+    offset += 1; /* Skip Word Count (WCT) */
 
-    /* Build display for: Word Count (WCC) */
+    /* Build display for: Offset */
 
-    WordCount = GBYTE(pd, offset);
+    Offset = GWORD(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCC): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
     }
 
-    offset += 1; /* Skip Word Count (WCC) */
+    offset += 4; /* Skip Offset */
 
     /* Build display for: Byte Count (BCC) */
 
@@ -5885,7 +6171,7 @@ dissect_set_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -5896,13 +6182,16 @@ dissect_set_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 }
 
 void
-dissect_lock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
+dissect_write_and_unlock_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
 
 {
   guint8        WordCount;
+  guint8        BufferFormat;
   guint32       Offset;
-  guint32       Count;
+  guint16       Remaining;
   guint16       FID;
+  guint16       DataLength;
+  guint16       Count;
   guint16       ByteCount;
 
   if (dirn == 1) { /* Request(s) dissect code */
@@ -5913,7 +6202,7 @@ dissect_lock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -5925,7 +6214,7 @@ dissect_lock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -5933,15 +6222,15 @@ dissect_lock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     /* Build display for: Count */
 
-    Count = GWORD(pd, offset);
+    Count = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Count: %u", Count);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
     }
 
-    offset += 4; /* Skip Count */
+    offset += 2; /* Skip Count */
 
     /* Build display for: Offset */
 
@@ -5949,24 +6238,60 @@ dissect_lock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
     }
 
     offset += 4; /* Skip Offset */
 
+    /* Build display for: Remaining */
+
+    Remaining = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Remaining: %u", Remaining);
+
+    }
+
+    offset += 2; /* Skip Remaining */
+
     /* Build display for: Byte Count (BCC) */
 
     ByteCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
     offset += 2; /* Skip Byte Count (BCC) */
 
+    /* Build display for: Buffer Format */
+
+    BufferFormat = GBYTE(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
+
+    }
+
+    offset += 1; /* Skip Buffer Format */
+
+    /* Build display for: Data Length */
+
+    DataLength = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
+
+    }
+
+    offset += 2; /* Skip Data Length */
+
   }
 
   if (dirn == 0) { /* Response(s) dissect code */
@@ -5977,19 +6302,31 @@ dissect_lock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
     offset += 1; /* Skip Word Count (WCT) */
 
+    /* Build display for: Count */
+
+    Count = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
+
+    }
+
+    offset += 2; /* Skip Count */
+
     /* Build display for: Byte Count (BCC) */
 
     ByteCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -6000,16 +6337,17 @@ dissect_lock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 }
 
 void
-dissect_get_print_queue_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
+dissect_set_info2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
 
 {
   guint8        WordCount;
-  guint8        BufferFormat;
-  guint16       StartIndex;
-  guint16       RestartIndex;
-  guint16       MaxCount;
-  guint16       DataLength;
-  guint16       Count;
+  guint16       LastWriteTime;
+  guint16       LastWriteDate;
+  guint16       LastAccessTime;
+  guint16       LastAccessDate;
+  guint16       FID;
+  guint16       CreationTime;
+  guint16       CreationDate;
   guint16       ByteCount;
 
   if (dirn == 1) { /* Request(s) dissect code */
@@ -6020,123 +6358,382 @@ dissect_get_print_queue_smb(const u_char *pd, int offset, frame_data *fd, proto_
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count: %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count: %u", WordCount);
 
     }
 
     offset += 1; /* Skip Word Count */
 
-    /* Build display for: Max Count */
+    /* Build display for: FID */
 
-    MaxCount = GSHORT(pd, offset);
+    FID = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max Count: %u", MaxCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
-    offset += 2; /* Skip Max Count */
+    offset += 2; /* Skip FID */
 
-    /* Build display for: Start Index */
+    /* Build display for: Creation Date */
 
-    StartIndex = GSHORT(pd, offset);
+    CreationDate = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Start Index: %u", StartIndex);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Creation Date: %s", dissect_dos_date(CreationDate));
 
     }
 
-    offset += 2; /* Skip Start Index */
+    offset += 2; /* Skip Creation Date */
 
-    /* Build display for: Byte Count (BCC) */
+    /* Build display for: Creation Time */
 
-    ByteCount = GSHORT(pd, offset);
+    CreationTime = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Creation Time: %s", dissect_dos_time(CreationTime));
 
     }
 
-    offset += 2; /* Skip Byte Count (BCC) */
-
-  }
-
-  if (dirn == 0) { /* Response(s) dissect code */
+    offset += 2; /* Skip Creation Time */
 
-    /* Build display for: Word Count (WCT) */
+    /* Build display for: Last Access Date */
 
-    WordCount = GBYTE(pd, offset);
+    LastAccessDate = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Last Access Date: %s", dissect_dos_date(LastAccessDate));
 
     }
 
-    offset += 1; /* Skip Word Count (WCT) */
-
-    if (WordCount > 0) {
-
-      /* Build display for: Count */
+    offset += 2; /* Skip Last Access Date */
 
-      Count = GSHORT(pd, offset);
+    /* Build display for: Last Access Time */
 
-      if (tree) {
+    LastAccessTime = GSHORT(pd, offset);
 
-       proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+    if (tree) {
 
-      }
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Last Access Time: %s", dissect_dos_time(LastAccessTime));
 
-      offset += 2; /* Skip Count */
+    }
 
-      /* Build display for: Restart Index */
+    offset += 2; /* Skip Last Access Time */
 
-      RestartIndex = GSHORT(pd, offset);
+    /* Build display for: Last Write Date */
 
-      if (tree) {
+    LastWriteDate = GSHORT(pd, offset);
 
-       proto_tree_add_text(tree, offset, 2, "Restart Index: %u", RestartIndex);
+    if (tree) {
 
-      }
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Last Write Date: %s", dissect_dos_date(LastWriteDate));
 
-      offset += 2; /* Skip Restart Index */
+    }
 
-      /* Build display for: Byte Count (BCC) */
+    offset += 2; /* Skip Last Write Date */
 
-    }
+    /* Build display for: Last Write Time */
 
-    ByteCount = GSHORT(pd, offset);
+    LastWriteTime = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Last Write Time: %s", dissect_dos_time(LastWriteTime));
 
     }
 
-    offset += 2; /* Skip Byte Count (BCC) */
+    offset += 2; /* Skip Last Write Time */
 
-    /* Build display for: Buffer Format */
+    /* Build display for: Byte Count (BCC) */
 
-    BufferFormat = GBYTE(pd, offset);
+    ByteCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
-    offset += 1; /* Skip Buffer Format */
+    offset += 2; /* Skip Byte Count (BCC) */
 
-    /* Build display for: Data Length */
+  }
+
+  if (dirn == 0) { /* Response(s) dissect code */
+
+    /* Build display for: Word Count (WCC) */
+
+    WordCount = GBYTE(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCC): %u", WordCount);
+
+    }
+
+    offset += 1; /* Skip Word Count (WCC) */
+
+    /* Build display for: Byte Count (BCC) */
+
+    ByteCount = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
+
+    }
+
+    offset += 2; /* Skip Byte Count (BCC) */
+
+  }
+
+}
+
+void
+dissect_lock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
+
+{
+  guint8        WordCount;
+  guint32       Offset;
+  guint32       Count;
+  guint16       FID;
+  guint16       ByteCount;
+
+  if (dirn == 1) { /* Request(s) dissect code */
+
+    /* Build display for: Word Count (WCT) */
+
+    WordCount = GBYTE(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
+
+    }
+
+    offset += 1; /* Skip Word Count (WCT) */
+
+    /* Build display for: FID */
+
+    FID = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
+
+    }
+
+    offset += 2; /* Skip FID */
+
+    /* Build display for: Count */
+
+    Count = GWORD(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Count: %u", Count);
+
+    }
+
+    offset += 4; /* Skip Count */
+
+    /* Build display for: Offset */
+
+    Offset = GWORD(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
+
+    }
+
+    offset += 4; /* Skip Offset */
+
+    /* Build display for: Byte Count (BCC) */
+
+    ByteCount = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
+
+    }
+
+    offset += 2; /* Skip Byte Count (BCC) */
+
+  }
+
+  if (dirn == 0) { /* Response(s) dissect code */
+
+    /* Build display for: Word Count (WCT) */
+
+    WordCount = GBYTE(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
+
+    }
+
+    offset += 1; /* Skip Word Count (WCT) */
+
+    /* Build display for: Byte Count (BCC) */
+
+    ByteCount = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
+
+    }
+
+    offset += 2; /* Skip Byte Count (BCC) */
+
+  }
+
+}
+
+void
+dissect_get_print_queue_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
+
+{
+  guint8        WordCount;
+  guint8        BufferFormat;
+  guint16       StartIndex;
+  guint16       RestartIndex;
+  guint16       MaxCount;
+  guint16       DataLength;
+  guint16       Count;
+  guint16       ByteCount;
+
+  if (dirn == 1) { /* Request(s) dissect code */
+
+    /* Build display for: Word Count */
+
+    WordCount = GBYTE(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count: %u", WordCount);
+
+    }
+
+    offset += 1; /* Skip Word Count */
+
+    /* Build display for: Max Count */
+
+    MaxCount = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max Count: %u", MaxCount);
+
+    }
+
+    offset += 2; /* Skip Max Count */
+
+    /* Build display for: Start Index */
+
+    StartIndex = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Start Index: %u", StartIndex);
+
+    }
+
+    offset += 2; /* Skip Start Index */
+
+    /* Build display for: Byte Count (BCC) */
+
+    ByteCount = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
+
+    }
+
+    offset += 2; /* Skip Byte Count (BCC) */
+
+  }
+
+  if (dirn == 0) { /* Response(s) dissect code */
+
+    /* Build display for: Word Count (WCT) */
+
+    WordCount = GBYTE(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
+
+    }
+
+    offset += 1; /* Skip Word Count (WCT) */
+
+    if (WordCount > 0) {
+
+      /* Build display for: Count */
+
+      Count = GSHORT(pd, offset);
+
+      if (tree) {
+
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
+
+      }
+
+      offset += 2; /* Skip Count */
+
+      /* Build display for: Restart Index */
+
+      RestartIndex = GSHORT(pd, offset);
+
+      if (tree) {
+
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Restart Index: %u", RestartIndex);
+
+      }
+
+      offset += 2; /* Skip Restart Index */
+
+      /* Build display for: Byte Count (BCC) */
+
+    }
+
+    ByteCount = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
+
+    }
+
+    offset += 2; /* Skip Byte Count (BCC) */
+
+    /* Build display for: Buffer Format */
+
+    BufferFormat = GBYTE(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
+
+    }
+
+    offset += 1; /* Skip Buffer Format */
+
+    /* Build display for: Data Length */
 
     DataLength = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Length: %u", DataLength);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
 
     }
 
@@ -6173,7 +6770,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -6185,7 +6782,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "AndXCommand: %u", AndXCommand);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "AndXCommand: %u", AndXCommand);
 
     }
 
@@ -6197,7 +6794,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "AndXReserved: %u", AndXReserved);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "AndXReserved: %u", AndXReserved);
 
     }
 
@@ -6209,7 +6806,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "AndXOffset: %u", AndXOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "AndXOffset: %u", AndXOffset);
 
     }
 
@@ -6221,7 +6818,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -6233,17 +6830,17 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 1, "Lock Type: 0x%01x", LockType);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 1, "Lock Type: 0x%01x", LockType);
       LockType_tree = proto_item_add_subtree(ti, ett_smb_lock_type);
-      proto_tree_add_text(LockType_tree, offset, 1, "%s",
+      proto_tree_add_text(LockType_tree, NullTVB, offset, 1, "%s",
                           decode_boolean_bitfield(LockType, 0x01, 16, "Read-only lock", "Not a Read-only lock"));
-      proto_tree_add_text(LockType_tree, offset, 1, "%s",
+      proto_tree_add_text(LockType_tree, NullTVB, offset, 1, "%s",
                           decode_boolean_bitfield(LockType, 0x02, 16, "Oplock break notification", "Not an Oplock break notification"));
-      proto_tree_add_text(LockType_tree, offset, 1, "%s",
+      proto_tree_add_text(LockType_tree, NullTVB, offset, 1, "%s",
                           decode_boolean_bitfield(LockType, 0x04, 16, "Change lock type", "Not a lock type change"));
-      proto_tree_add_text(LockType_tree, offset, 1, "%s",
+      proto_tree_add_text(LockType_tree, NullTVB, offset, 1, "%s",
                           decode_boolean_bitfield(LockType, 0x08, 16, "Cancel outstanding request", "Dont cancel outstanding request"));
-      proto_tree_add_text(LockType_tree, offset, 1, "%s",
+      proto_tree_add_text(LockType_tree, NullTVB, offset, 1, "%s",
                           decode_boolean_bitfield(LockType, 0x10, 16, "Large file locking format", "Not a large file locking format"));
     
 }
@@ -6256,7 +6853,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "OplockLevel: %u", OplockLevel);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "OplockLevel: %u", OplockLevel);
 
     }
 
@@ -6268,7 +6865,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Timeout: %u", Timeout);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Timeout: %u", Timeout);
 
     }
 
@@ -6280,7 +6877,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Number Of Unlocks: %u", NumberOfUnlocks);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Number Of Unlocks: %u", NumberOfUnlocks);
 
     }
 
@@ -6292,7 +6889,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Number of Locks: %u", NumberofLocks);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Number of Locks: %u", NumberofLocks);
 
     }
 
@@ -6304,7 +6901,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -6327,7 +6924,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -6341,7 +6938,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 1, "AndXCommand: %s", 
+       proto_tree_add_text(tree, NullTVB, offset, 1, "AndXCommand: %s", 
                            (AndXCommand == 0xFF ? "No further commands" : decode_smb_name(AndXCommand)));
 
       }
@@ -6354,7 +6951,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 1, "AndXReserved: %u", AndXReserved);
+       proto_tree_add_text(tree, NullTVB, offset, 1, "AndXReserved: %u", AndXReserved);
 
       }
 
@@ -6366,7 +6963,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "AndXoffset: %u", AndXoffset);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "AndXoffset: %u", AndXoffset);
 
       }
 
@@ -6380,7 +6977,7 @@ dissect_locking_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count: %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count: %u", ByteCount);
 
     }
 
@@ -6415,7 +7012,7 @@ dissect_unlock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -6427,7 +7024,7 @@ dissect_unlock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -6439,7 +7036,7 @@ dissect_unlock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Count: %u", Count);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Count: %u", Count);
 
     }
 
@@ -6451,7 +7048,7 @@ dissect_unlock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
     }
 
@@ -6463,7 +7060,7 @@ dissect_unlock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -6479,7 +7076,7 @@ dissect_unlock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -6491,7 +7088,7 @@ dissect_unlock_bytes_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -6523,7 +7120,7 @@ dissect_create_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -6535,19 +7132,19 @@ dissect_create_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Attributes: 0x%02x", Attributes);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Attributes: 0x%02x", Attributes);
       Attributes_tree = proto_item_add_subtree(ti, ett_smb_fileattributes);
-      proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+      proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Attributes, 0x01, 16, "Read-only file", "Not a read-only file"));
-      proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+      proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Attributes, 0x02, 16, "Hidden file", "Not a hidden file"));
-      proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+      proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Attributes, 0x04, 16, "System file", "Not a system file"));
-      proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+      proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Attributes, 0x08, 16, " Volume", "Not a volume"));
-      proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+      proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Attributes, 0x10, 16, " Directory", "Not a directory"));
-      proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+      proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Attributes, 0x20, 16, " Archived", "Not archived"));
     
 }
@@ -6560,7 +7157,7 @@ dissect_create_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Creation Time: %u", dissect_dos_time(CreationTime));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Creation Time: %s", dissect_dos_time(CreationTime));
 
     }
 
@@ -6572,7 +7169,7 @@ dissect_create_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -6584,7 +7181,7 @@ dissect_create_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -6596,7 +7193,7 @@ dissect_create_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(FileName) + 1, "File Name: %s", FileName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(FileName) + 1, "File Name: %s", FileName);
 
     }
 
@@ -6612,7 +7209,7 @@ dissect_create_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -6626,7 +7223,7 @@ dissect_create_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
       }
 
@@ -6640,7 +7237,7 @@ dissect_create_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -6674,7 +7271,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -6686,7 +7283,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max Count: %u", MaxCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max Count: %u", MaxCount);
 
     }
 
@@ -6698,7 +7295,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Search Attributes: %u", SearchAttributes);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Search Attributes: %u", SearchAttributes);
 
     }
 
@@ -6710,7 +7307,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -6722,7 +7319,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format 1: %u", BufferFormat1);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format 1: %u", BufferFormat1);
 
     }
 
@@ -6734,7 +7331,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(FileName) + 1, "File Name: %s", FileName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(FileName) + 1, "File Name: %s", FileName);
 
     }
 
@@ -6746,7 +7343,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format 2: %u", BufferFormat2);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format 2: %u", BufferFormat2);
 
     }
 
@@ -6758,7 +7355,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Resume Key Length: %u", ResumeKeyLength);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Resume Key Length: %u", ResumeKeyLength);
 
     }
 
@@ -6774,7 +7371,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -6788,7 +7385,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
       }
 
@@ -6802,7 +7399,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -6814,7 +7411,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -6826,7 +7423,7 @@ dissect_search_dir_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Length: %u", DataLength);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
 
     }
 
@@ -6858,7 +7455,7 @@ dissect_create_temporary_file_smb(const u_char *pd, int offset, frame_data *fd,
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -6870,7 +7467,7 @@ dissect_create_temporary_file_smb(const u_char *pd, int offset, frame_data *fd,
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Reserved: %u", Reserved);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved: %u", Reserved);
 
     }
 
@@ -6882,7 +7479,7 @@ dissect_create_temporary_file_smb(const u_char *pd, int offset, frame_data *fd,
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Creation Time: %u", dissect_dos_time(CreationTime));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Creation Time: %s", dissect_dos_time(CreationTime));
 
     }
 
@@ -6894,7 +7491,7 @@ dissect_create_temporary_file_smb(const u_char *pd, int offset, frame_data *fd,
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Creation Date: %u", dissect_dos_date(CreationDate));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Creation Date: %s", dissect_dos_date(CreationDate));
 
     }
 
@@ -6906,7 +7503,7 @@ dissect_create_temporary_file_smb(const u_char *pd, int offset, frame_data *fd,
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -6918,7 +7515,7 @@ dissect_create_temporary_file_smb(const u_char *pd, int offset, frame_data *fd,
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -6930,7 +7527,7 @@ dissect_create_temporary_file_smb(const u_char *pd, int offset, frame_data *fd,
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(DirectoryName) + 1, "Directory Name: %s", DirectoryName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(DirectoryName) + 1, "Directory Name: %s", DirectoryName);
 
     }
 
@@ -6946,7 +7543,7 @@ dissect_create_temporary_file_smb(const u_char *pd, int offset, frame_data *fd,
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -6960,7 +7557,7 @@ dissect_create_temporary_file_smb(const u_char *pd, int offset, frame_data *fd,
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
       }
 
@@ -6974,7 +7571,7 @@ dissect_create_temporary_file_smb(const u_char *pd, int offset, frame_data *fd,
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -6986,7 +7583,7 @@ dissect_create_temporary_file_smb(const u_char *pd, int offset, frame_data *fd,
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -6998,7 +7595,7 @@ dissect_create_temporary_file_smb(const u_char *pd, int offset, frame_data *fd,
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(FileName) + 1, "File Name: %s", FileName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(FileName) + 1, "File Name: %s", FileName);
 
     }
 
@@ -7026,7 +7623,7 @@ dissect_close_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pare
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7038,7 +7635,7 @@ dissect_close_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pare
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -7050,7 +7647,7 @@ dissect_close_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pare
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Last Write Time: %u", dissect_dos_time(LastWriteTime));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Last Write Time: %s", dissect_dos_time(LastWriteTime));
 
     }
 
@@ -7062,7 +7659,7 @@ dissect_close_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pare
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Last Write Date: %u", dissect_dos_date(LastWriteDate));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Last Write Date: %s", dissect_dos_date(LastWriteDate));
 
     }
 
@@ -7074,7 +7671,7 @@ dissect_close_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pare
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -7090,7 +7687,7 @@ dissect_close_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pare
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7102,7 +7699,7 @@ dissect_close_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pare
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -7130,7 +7727,7 @@ dissect_write_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7142,7 +7739,7 @@ dissect_write_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -7154,7 +7751,7 @@ dissect_write_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -7166,7 +7763,7 @@ dissect_write_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -7178,7 +7775,7 @@ dissect_write_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Length: %u", DataLength);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
 
     }
 
@@ -7194,7 +7791,7 @@ dissect_write_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7206,7 +7803,7 @@ dissect_write_print_file_smb(const u_char *pd, int offset, frame_data *fd, proto
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -7241,7 +7838,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7253,7 +7850,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -7265,7 +7862,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
     }
 
@@ -7277,7 +7874,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
     }
 
@@ -7289,7 +7886,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Remaining: %u", Remaining);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Remaining: %u", Remaining);
 
     }
 
@@ -7301,7 +7898,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -7317,7 +7914,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7331,7 +7928,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
       }
 
@@ -7343,7 +7940,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 1: %u", Reserved1);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 1: %u", Reserved1);
 
       }
 
@@ -7355,7 +7952,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 2: %u", Reserved2);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 2: %u", Reserved2);
 
       }
 
@@ -7367,7 +7964,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 3: %u", Reserved3);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 3: %u", Reserved3);
 
       }
 
@@ -7379,7 +7976,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 4: %u", Reserved4);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 4: %u", Reserved4);
 
       }
 
@@ -7391,7 +7988,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
       }
 
@@ -7405,7 +8002,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -7417,7 +8014,7 @@ dissect_lock_and_read_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Length: %u", DataLength);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
 
     }
 
@@ -7442,7 +8039,7 @@ dissect_process_exit_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7454,7 +8051,7 @@ dissect_process_exit_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -7470,7 +8067,7 @@ dissect_process_exit_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7482,7 +8079,7 @@ dissect_process_exit_smb(const u_char *pd, int offset, frame_data *fd, proto_tre
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -7520,7 +8117,7 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7532,7 +8129,7 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -7544,7 +8141,7 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -7556,7 +8153,7 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, strlen(FileName) + 1, "File Name: %s", FileName);
+      proto_tree_add_text(tree, NullTVB, offset, strlen(FileName) + 1, "File Name: %s", FileName);
 
     }
 
@@ -7572,7 +8169,7 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7586,19 +8183,19 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       ti = proto_tree_add_text(tree, offset, 2, "Attributes: 0x%02x", Attributes);
+       ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Attributes: 0x%02x", Attributes);
        Attributes_tree = proto_item_add_subtree(ti, ett_smb_fileattributes);
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x01, 16, "Read-only file", "Not a read-only file"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x02, 16, "Hidden file", "Not a hidden file"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x04, 16, "System file", "Not a system file"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x08, 16, " Volume", "Not a volume"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x10, 16, " Directory", "Not a directory"));
-       proto_tree_add_text(Attributes_tree, offset, 2, "%s",
+       proto_tree_add_text(Attributes_tree, NullTVB, offset, 2, "%s",
                            decode_boolean_bitfield(Attributes, 0x20, 16, " Archived", "Not archived"));
        
       }
@@ -7621,9 +8218,9 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Last Write Date: %s", dissect_smbu_date(LastWriteDate, LastWriteTime));
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Last Write Date: %s", dissect_smbu_date(LastWriteDate, LastWriteTime));
 
-       proto_tree_add_text(tree, offset, 2, "Last Write Time: %s", dissect_smbu_time(LastWriteDate, LastWriteTime));
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Last Write Time: %s", dissect_smbu_time(LastWriteDate, LastWriteTime));
 
       }
 
@@ -7635,7 +8232,7 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 4, "File Size: %u", FileSize);
+       proto_tree_add_text(tree, NullTVB, offset, 4, "File Size: %u", FileSize);
 
       }
 
@@ -7647,7 +8244,7 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 1: %u", Reserved1);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 1: %u", Reserved1);
 
       }
 
@@ -7659,7 +8256,7 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 2: %u", Reserved2);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 2: %u", Reserved2);
 
       }
 
@@ -7671,7 +8268,7 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 3: %u", Reserved3);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 3: %u", Reserved3);
 
       }
 
@@ -7683,7 +8280,7 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 4: %u", Reserved4);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 4: %u", Reserved4);
 
       }
 
@@ -7695,7 +8292,7 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 5: %u", Reserved5);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 5: %u", Reserved5);
 
       }
 
@@ -7709,7 +8306,7 @@ dissect_get_file_attr_smb(const u_char *pd, int offset, frame_data *fd, proto_tr
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -7744,7 +8341,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7756,7 +8353,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -7768,7 +8365,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
     }
 
@@ -7780,7 +8377,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Offset: %u", Offset);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Offset: %u", Offset);
 
     }
 
@@ -7792,7 +8389,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Remaining: %u", Remaining);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Remaining: %u", Remaining);
 
     }
 
@@ -7804,7 +8401,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -7820,7 +8417,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7834,7 +8431,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
       }
 
@@ -7846,7 +8443,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 1: %u", Reserved1);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 1: %u", Reserved1);
 
       }
 
@@ -7858,7 +8455,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 2: %u", Reserved2);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 2: %u", Reserved2);
 
       }
 
@@ -7870,7 +8467,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 3: %u", Reserved3);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 3: %u", Reserved3);
 
       }
 
@@ -7882,7 +8479,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Reserved 4: %u", Reserved4);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 4: %u", Reserved4);
 
       }
 
@@ -7896,7 +8493,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
       
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -7908,7 +8505,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Buffer Format: %u", BufferFormat);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Buffer Format: %u", BufferFormat);
 
     }
 
@@ -7920,7 +8517,7 @@ dissect_read_file_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Length: %u", DataLength);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
 
     }
 
@@ -7957,7 +8554,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -7969,7 +8566,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -7981,7 +8578,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
     }
 
@@ -7993,7 +8590,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Reserved 1: %u", Reserved1);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 1: %u", Reserved1);
 
     }
 
@@ -8005,7 +8602,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Timeout: %u", Timeout);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Timeout: %u", Timeout);
 
     }
 
@@ -8017,13 +8614,13 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "WriteMode: 0x%02x", WriteMode);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "WriteMode: 0x%02x", WriteMode);
       WriteMode_tree = proto_item_add_subtree(ti, ett_smb_writemode);
-      proto_tree_add_text(WriteMode_tree, offset, 2, "%s",
+      proto_tree_add_text(WriteMode_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(WriteMode, 0x01, 16, "Write through requested", "Write through not requested"));
-      proto_tree_add_text(WriteMode_tree, offset, 2, "%s",
+      proto_tree_add_text(WriteMode_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(WriteMode, 0x02, 16, "Return Remaining", "Dont return Remaining"));
-      proto_tree_add_text(WriteMode_tree, offset, 2, "%s",
+      proto_tree_add_text(WriteMode_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(WriteMode, 0x40, 16, "Connectionless mode requested", "Connectionless mode not requested"));
     
 }
@@ -8036,7 +8633,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Request Mask: %u", RequestMask);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Request Mask: %u", RequestMask);
 
     }
 
@@ -8048,7 +8645,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Length: %u", DataLength);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
 
     }
 
@@ -8060,7 +8657,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Offset: %u", DataOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
     }
 
@@ -8072,7 +8669,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -8084,7 +8681,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Pad: %u", Pad);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Pad: %u", Pad);
 
     }
 
@@ -8100,7 +8697,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -8114,7 +8711,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 4, "Response Mask: %u", ResponseMask);
+       proto_tree_add_text(tree, NullTVB, offset, 4, "Response Mask: %u", ResponseMask);
 
       }
 
@@ -8126,7 +8723,7 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
       }
 
@@ -8154,7 +8751,7 @@ dissect_find_close2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WTC): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WTC): %u", WordCount);
 
     }
 
@@ -8166,7 +8763,7 @@ dissect_find_close2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
@@ -8178,7 +8775,7 @@ dissect_find_close2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -8194,7 +8791,7 @@ dissect_find_close2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -8206,7 +8803,7 @@ dissect_find_close2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -8221,6 +8818,7 @@ char *trans2_cmd_names[] = {
   "TRANS2_FIND_FIRST2",
   "TRANS2_FIND_NEXT2",
   "TRANS2_QUERY_FS_INFORMATION",
+  "no such command",
   "TRANS2_QUERY_PATH_INFORMATION",
   "TRANS2_SET_PATH_INFORMATION",
   "TRANS2_QUERY_FILE_INFORMATION",
@@ -8248,9 +8846,6 @@ char *decode_trans2_name(int code)
 
 }
 
-guint32 dissect_mailslot_smb(const u_char *, int, frame_data *, proto_tree *, proto_tree *, struct smb_info, int, int, int, int, const u_char *, int, int, int, int);
-
-guint32 dissect_pipe_smb(const u_char *, int, frame_data *, proto_tree *, proto_tree *, struct smb_info, int, int, int, int, const u_char *, int, int, int, int);
 
 void
 dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn)
@@ -8262,8 +8857,6 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
   guint8        SetupCount;
   guint8        Reserved3;
   guint8        Reserved1;
-  guint8        Pad2;
-  guint8        Pad1;
   guint8        MaxSetupCount;
   guint8        Data;
   guint32       Timeout;
@@ -8299,11 +8892,11 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
    * packets from B:Y to A:X.
    */
   conversation = find_conversation(&pi.src, &pi.dst, pi.ptype,
-                               pi.srcport, pi.destport);
+                               pi.srcport, pi.destport, 0);
   if (conversation == NULL) {
     /* It's not part of any conversation - create a new one. */
     conversation = conversation_new(&pi.src, &pi.dst, pi.ptype,
-                               pi.srcport, pi.destport, NULL);
+                               pi.srcport, pi.destport, NULL, 0);
   }
 
   si.conversation = conversation;  /* Save this for later */
@@ -8346,7 +8939,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -8358,7 +8951,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Total Parameter Count: %u", TotalParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Total Parameter Count: %u", TotalParameterCount);
 
     }
 
@@ -8370,7 +8963,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Total Data Count: %u", TotalDataCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Total Data Count: %u", TotalDataCount);
 
     }
 
@@ -8382,7 +8975,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max Parameter Count: %u", MaxParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max Parameter Count: %u", MaxParameterCount);
 
     }
 
@@ -8394,7 +8987,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max Data Count: %u", MaxDataCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max Data Count: %u", MaxDataCount);
 
     }
 
@@ -8406,7 +8999,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Max Setup Count: %u", MaxSetupCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Max Setup Count: %u", MaxSetupCount);
 
     }
 
@@ -8418,7 +9011,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Reserved1: %u", Reserved1);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Reserved1: %u", Reserved1);
 
     }
 
@@ -8430,11 +9023,11 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Flags: 0x%02x", Flags);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Flags: 0x%02x", Flags);
       Flags_tree = proto_item_add_subtree(ti, ett_smb_flags);
-      proto_tree_add_text(Flags_tree, offset, 2, "%s",
+      proto_tree_add_text(Flags_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Flags, 0x01, 16, "Also disconnect TID", "Dont disconnect TID"));
-      proto_tree_add_text(Flags_tree, offset, 2, "%s",
+      proto_tree_add_text(Flags_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Flags, 0x02, 16, "One way transaction", "Two way transaction"));
     
 }
@@ -8447,7 +9040,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 4, "Timeout: %u", Timeout);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Timeout: %u", Timeout);
 
     }
 
@@ -8459,7 +9052,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Reserved2: %u", Reserved2);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved2: %u", Reserved2);
 
     }
 
@@ -8471,7 +9064,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Parameter Count: %u", ParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Count: %u", ParameterCount);
 
     }
 
@@ -8483,7 +9076,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Parameter Offset: %u", ParameterOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Offset: %u", ParameterOffset);
 
     }
 
@@ -8495,7 +9088,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Count: %u", DataCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Count: %u", DataCount);
 
     }
 
@@ -8507,7 +9100,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Offset: %u", DataOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
     }
 
@@ -8519,7 +9112,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Setup Count: %u", SetupCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Setup Count: %u", SetupCount);
 
     }
 
@@ -8531,7 +9124,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Reserved3: %u", Reserved3);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Reserved3: %u", Reserved3);
 
     }
 
@@ -8560,7 +9153,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
        if (tree) {
 
-         proto_tree_add_text(tree, offset, 2, "Setup%i: %u", i, Setup1);
+         proto_tree_add_text(tree, NullTVB, offset, 2, "Setup%i: %u", i, Setup1);
 
        }
 
@@ -8576,7 +9169,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -8586,23 +9179,22 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Transact Name: %s", decode_trans2_name(Setup));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Transact Name: %s", decode_trans2_name(Setup));
 
     }
 
-    if (offset % 2) {
+    if (offset < (SMB_offset + ParameterOffset)) {
 
-      /* Build display for: Pad1 */
+      int pad1Count = SMB_offset + ParameterOffset - offset;
 
-      Pad1 = GBYTE(pd, offset);
+      /* Build display for: Pad1 */
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 1, "Pad1: %u", Pad1);
-
+       proto_tree_add_text(tree, NullTVB, offset, pad1Count, "Pad1: %s", format_text(pd + offset, pad1Count));
       }
-    
-      offset += 1; /* Skip Pad1 */
+
+      offset += pad1Count; /* Skip Pad1 */
 
     }
 
@@ -8612,7 +9204,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, SMB_offset + ParameterOffset, ParameterCount, "Parameters: %s", format_text(pd + SMB_offset + ParameterOffset, ParameterCount));
+       proto_tree_add_text(tree, NullTVB, SMB_offset + ParameterOffset, ParameterCount, "Parameters: %s", format_text(pd + SMB_offset + ParameterOffset, ParameterCount));
 
       }
 
@@ -8620,19 +9212,19 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     }
 
-    if (offset % 2) {
+    if (DataCount > 0 && offset < (SMB_offset + DataOffset)) {
+
+      int pad2Count = SMB_offset + DataOffset - offset;
        
       /* Build display for: Pad2 */
 
-      Pad2 = GBYTE(pd, offset);
-
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 1, "Pad2: %u", Pad2);
+       proto_tree_add_text(tree, NullTVB, offset, pad2Count, "Pad2: %s", format_text(pd + offset, pad2Count));
 
       }
 
-      offset += 1; /* Skip Pad2 */
+      offset += pad2Count; /* Skip Pad2 */
 
     }
 
@@ -8644,7 +9236,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, SMB_offset + DataOffset, DataCount, "Data: %s", format_text(&pd[offset], DataCount));
+       proto_tree_add_text(tree, NullTVB, SMB_offset + DataOffset, DataCount, "Data: %s", format_text(&pd[offset], DataCount));
 
       }
 
@@ -8669,7 +9261,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -8681,7 +9273,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Total Parameter Count: %u", TotalParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Total Parameter Count: %u", TotalParameterCount);
 
     }
 
@@ -8693,7 +9285,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Total Data Count: %u", TotalDataCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Total Data Count: %u", TotalDataCount);
 
     }
 
@@ -8705,7 +9297,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Reserved2: %u", Reserved2);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved2: %u", Reserved2);
 
     }
 
@@ -8717,7 +9309,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Parameter Count: %u", ParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Count: %u", ParameterCount);
 
     }
 
@@ -8729,7 +9321,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Parameter Offset: %u", ParameterOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Offset: %u", ParameterOffset);
 
     }
 
@@ -8741,7 +9333,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Parameter Displacement: %u", ParameterDisplacement);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Displacement: %u", ParameterDisplacement);
 
     }
 
@@ -8753,7 +9345,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Count: %u", DataCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Count: %u", DataCount);
 
     }
 
@@ -8765,7 +9357,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Offset: %u", DataOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
     }
 
@@ -8777,7 +9369,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Displacement: %u", DataDisplacement);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Displacement: %u", DataDisplacement);
 
     }
 
@@ -8789,7 +9381,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Setup Count: %u", SetupCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Setup Count: %u", SetupCount);
 
     }
 
@@ -8801,23 +9393,32 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Reserved3: %u", Reserved3);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Reserved3: %u", Reserved3);
 
     }
 
     offset += 1; /* Skip Reserved3 */
 
-    /* Build display for: Setup */
+    if (SetupCount > 0) {
 
-    Setup = GSHORT(pd, offset);
+      int i = SetupCount;
 
-    if (tree) {
+      Setup = GSHORT(pd, offset);
+
+      for (i = 1; i <= SetupCount; i++) {
+       
+       Setup = GSHORT(pd, offset);
+
+       if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Setup: %u", Setup);
+         proto_tree_add_text(tree, NullTVB, offset, 2, "Setup%i: %u", i, Setup);
 
-    }
+       }
+
+       offset += 2; /* Skip Setup */
 
-    offset += 2; /* Skip Setup */
+      }
+    }
 
     /* Build display for: Byte Count (BCC) */
 
@@ -8825,23 +9426,26 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
     offset += 2; /* Skip Byte Count (BCC) */
 
-    /* Build display for: Pad1 */
+    if (offset < (SMB_offset + ParameterOffset)) {
 
-    Pad1 = GBYTE(pd, offset);
+      int pad1Count = SMB_offset + ParameterOffset - offset;
 
-    if (tree) {
+      /* Build display for: Pad1 */
 
-      proto_tree_add_text(tree, offset, 1, "Pad1: %u", Pad1);
+      if (tree) {
 
-    }
+       proto_tree_add_text(tree, NullTVB, offset, pad1Count, "Pad1: %s", format_text(pd + offset, pad1Count));
+      }
+
+      offset += pad1Count; /* Skip Pad1 */
 
-    offset += 1; /* Skip Pad1 */
+    }
 
     /* Build display for: Parameter */
 
@@ -8849,7 +9453,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, ParameterCount, "Parameter: %s", format_text(pd + SMB_offset + ParameterOffset, ParameterCount));
+       proto_tree_add_text(tree, NullTVB, offset, ParameterCount, "Parameter: %s", format_text(pd + SMB_offset + ParameterOffset, ParameterCount));
 
       }
 
@@ -8857,17 +9461,21 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     }
 
-    /* Build display for: Pad2 */
+    if (DataCount > 0 && offset < (SMB_offset + DataOffset)) {
 
-    Pad2 = GBYTE(pd, offset);
+      int pad2Count = SMB_offset + DataOffset - offset;
+       
+      /* Build display for: Pad2 */
 
-    if (tree) {
+      if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Pad2: %u", Pad2);
+       proto_tree_add_text(tree, NullTVB, offset, pad2Count, "Pad2: %s", format_text(pd + offset, pad2Count));
 
-    }
+      }
+
+      offset += pad2Count; /* Skip Pad2 */
 
-    offset += 1; /* Skip Pad2 */
+    }
 
     /* Build display for: Data */
 
@@ -8875,7 +9483,7 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, DataCount, "Data: %s", format_text(pd + SMB_offset + DataOffset, DataCount));
+       proto_tree_add_text(tree, NullTVB, offset, DataCount, "Data: %s", format_text(pd + SMB_offset + DataOffset, DataCount));
 
       }
 
@@ -8887,346 +9495,13 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
 }
 
-static char *p_desc = NULL, *d_desc = NULL, *data = NULL, *params = NULL;
-static int p_count, d_count, p_offset, d_offset, d_current = 0, p_current = 0;
-static int pd_p_current = 0, pd_d_current = 0, in_params = 0, need_data = 0;
-static int lm_ent_count = 0, lm_act_count = 0; 
-
-/* Initialize the various data structure */
-void 
-dissect_transact_engine_init(const u_char *pd, const char *param_desc, const char *data_desc, int SMB_offset, int ParameterOffset, int ParameterCount, int DataOffset, int DataCount)
-{
-
-  d_count = DataCount;
-  p_count = ParameterCount;
-  d_offset = 0;
-  p_offset = 0;
-  d_current = 0;
-  p_current = 0;
-  lm_ent_count = lm_act_count = 0;
-  pd_d_current = DataOffset;
-  pd_p_current = ParameterOffset;
-  in_params = need_data = 0;
-
-  if (p_desc) g_free(p_desc);
-  p_desc = g_malloc(strlen(param_desc) + 1);
-  strcpy(p_desc, param_desc);
-
-  if (d_desc) g_free(d_desc);
-  d_desc= g_malloc(strlen(data_desc) + 1);
-  strcpy(d_desc, data_desc);
-
-  if (params) g_free(params);
-  params = g_malloc(p_count);
-  memcpy(params, pd + ParameterOffset, ParameterCount);
-
-  if (data) g_free(data);
-  data = g_malloc(d_count);
-  memcpy(data, pd + DataOffset, DataCount);
-
-}
-
-int get_ent_count()
-{
-
-  return lm_ent_count;
-
-}
-
-int get_act_count()
-{
-
-  return lm_act_count;
-
-}
-
-int get_byte_count(const u_char *p_data)
-
-{
-  int count = 0, off = 0;
-
-  while (p_data[off] && isdigit(p_data[off])) {
-
-    count = (count * 10) + (int)p_data[off++] - (int)'0';
-
-  }
-
-  return count;
-}
-
-/* Dissect the next item, if Name is null, call it by its data type  */
-/* We pull out the next item in the appropriate place and display it */
-/* We display the parameters first, then the data, then any auxilliary data */
-
-int dissect_transact_next(const u_char *pd, char *Name, int dirn, proto_tree *tree)
-{
-  /*  guint8        BParam; */
-  guint16       WParam = 0;
-  guint32       LParam = 0;
-  const char    /**Bytes,*/ *AsciiZ = NULL;
-  int           bc;
-
-  while (1) {
-
-    if (p_desc[p_offset] == 0) return 0;  /* No more ... */
-
-    switch (in_params) {
-
-    case 0:   /* We are in the params area ... */
-
-      switch (p_desc[p_offset++]) {
-
-      case 'r':
-
-       if (dirn == 0) { /* We need to process the data ... */
-         
-         need_data = 1;
-
-       }
-
-       break;
-
-      case 'h':  /* A WORD parameter received */
-
-       if (dirn == 0) {
-
-         WParam = GSHORT(pd, pd_p_current);
-
-         proto_tree_add_text(tree, pd_p_current, 2, "%s: %u (%04X)", (Name) ? Name : "Returned Word", WParam, WParam);
-
-         pd_p_current += 2;
-
-         lm_act_count = WParam;
-
-         return 1;
-
-       }
-
-       break;
-
-      case 'e':  /* An ent count ..  */
-
-       if (dirn == 0) { /* Only relevant in a response */
-
-         WParam = GSHORT(pd, pd_p_current);
-
-         proto_tree_add_text(tree, pd_p_current, 2, "%s: (%04X)", (Name) ? Name : "Entry Count", WParam, WParam);
-
-         pd_p_current += 2;
-
-         lm_ent_count = WParam;  /* Save this for later retrieval */
-
-         return 1;
-
-       }
-
-       break;
-
-      case 'W':  /* Word Parameter */
-
-       if (dirn == 1) {  /* A request ... */
-       
-         /* Insert a word param */
-
-         WParam = GSHORT(pd, pd_p_current);
-
-         proto_tree_add_text(tree, pd_p_current, 2, "%s: %u (%04X)", (Name) ? Name : "Word Param", WParam, WParam);
-
-         pd_p_current += 2;
-
-         return 1;  /* That's it here ... we have dissected a param */
-
-       }
-
-       break;
-
-      case 'i':  /* A long word is returned */
-
-       if (dirn == 0) {
-
-         LParam = GWORD(pd, pd_p_current);
-
-         proto_tree_add_text(tree, pd_p_current, 4, "%s: %u (0x%08X)", (Name) ? Name : "Returned Long Word", LParam, LParam);
-
-         pd_p_current += 2;
-
-         return 1;
-
-       }
-
-       break;
-
-      case 'D':  /* Double Word parameter */
-
-       if (dirn == 1) {
-
-         LParam = GWORD(pd, pd_p_current);
-
-         proto_tree_add_text(tree, pd_p_current, 4, "%s: %u (0x%08X)", (Name) ? Name : "DWord Param", LParam, LParam);
-
-         pd_p_current += 4;
-         
-         return 1;  /* That's it here */
-
-       }
-
-       break;
-
-      case 'g':  /* A byte or series of bytes is returned */
-
-       if (dirn == 0) {
-         bc = get_byte_count(p_desc + p_offset);
-
-         proto_tree_add_text(tree, pd_p_current, bc, "%s%u: %s", (Name) ? Name : "B", (bc) ? bc : 1, format_text( pd + pd_p_current, (bc) ? bc : 1));
-
-         pd_p_current += (bc) ? bc : 1;
-
-         return 1;
-
-       }
-
-       break;
-
-      case 'b':  /* A byte or series of bytes */
-
-       if (dirn == 1) {
-
-         bc = get_byte_count(p_desc + p_offset);  /* This is not clean */
-
-         /*Bytes = g_malloc(bc + 1); / * Is this needed ? */
-
-         proto_tree_add_text(tree, pd_p_current, bc, "%s%u: %s", (Name) ? Name : "B", (bc) ? bc : 1, format_text(pd + pd_p_current, (bc) ? bc : 1));
-
-         pd_p_current += (bc) ? bc : 1;
-
-         return 1;  /* That's it here ... */
-
-       }
-
-       break;
-
-      case 'O': /* A null pointer */
-
-       if (dirn == 1) {
-
-         proto_tree_add_text(tree, pd_p_current, 0, "%s: Null Pointer", (Name) ? Name : "Unknown");
-
-         return 1;  /* That's it here */
-
-       }
-
-       break;
-
-      case 'z': /* An AsciiZ string */
-
-       if (dirn == 1) {
-
-         AsciiZ = pd + pd_p_current;
-
-         proto_tree_add_text(tree, pd_p_current, strlen(AsciiZ) + 1, "%s: %s", (Name) ? Name : "AsciiZ", AsciiZ);
-
-         pd_p_current += strlen(AsciiZ) + 1;
-
-         return 1;  /* That's it here ... */
-
-       }
-
-       break;
-
-      case 'F': /* One or more pad bytes */
-
-       if (dirn == 1) {
-
-         bc = get_byte_count(pd);
-
-         proto_tree_add_text(tree, pd_p_current, bc, "%s%u: %s", (Name) ? Name : "Pad", bc, format_text(pd + pd_p_current, bc));
-
-         pd_p_current += bc;
-
-         return 1;  /* That's it here */
-
-       }
-
-       break;
-
-      case 'L': /* Receive buffer len: Short */
-
-       if (dirn == 1) {
-
-         WParam = GSHORT(pd, pd_p_current);
-
-         proto_tree_add_text(tree, pd_p_current, 2, "%s: %u (0x%04X)", (Name) ? Name : "Receive Buffer Len", WParam, WParam);
-
-         pd_p_current += 2;
-
-         return 1;  /* That's it here ... */
-
-       }
-
-       break;
-
-      case 's': /* Send buf ... */
-
-       if (dirn == 1) {
-
-         need_data = 1;
-
-         LParam = GWORD(pd, pd_p_current);
-
-         proto_tree_add_text(tree, pd_p_current, 4, "%s: %u", (Name) ? Name : "Send Buffer Ptr", LParam);
-
-         pd_p_current += 4;
-
-         return 1;  /* That's it here ... */
-
-       }
-
-       break;
-
-      case 'T':
-
-       if (dirn == 1) {
-
-         WParam = GSHORT(pd, pd_p_current);
-
-         proto_tree_add_text(tree, pd_p_current, 2, "%s: %u", (Name) ? Name : "Send Buffer Len", WParam);
-
-         pd_p_current += 2;
-
-         return 1;
-
-       }
-
-       break;
-       
-      default:
-
-       break;
-
-      }
-
-      break;
-
-    case 1:   /* We are in the data area ... */
-
-      
-      break;
-       
-    }
-  }
-
-  return 0;
-
-}
 
 void 
-dissect_transact_params(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn, int DataOffset, int DataCount, int ParameterOffset, int ParameterCount, const char *TransactName)
+dissect_transact_params(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn, int DataOffset, int DataCount, int ParameterOffset, int ParameterCount, int SetupAreaOffset, int SetupCount, const char *TransactName)
 {
   char             *TransactNameCopy;
   char             *trans_type = NULL, *trans_cmd, *loc_of_slash = NULL;
   int              index;
-  guint8           Pad2;
   const gchar      *Data;
 
   if (!TransactName)
@@ -9252,7 +9527,7 @@ dissect_transact_params(const u_char *pd, int offset, frame_data *fd, proto_tree
 
   if ((trans_cmd == NULL) ||
       (((strcmp(trans_type, "MAILSLOT") != 0) ||
-       !dissect_mailslot_smb(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, trans_cmd, SMB_offset + DataOffset, DataCount, SMB_offset + ParameterOffset, ParameterCount)) &&
+       !dissect_mailslot_smb(pd, SetupAreaOffset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, trans_cmd, SMB_offset + DataOffset, DataCount, SMB_offset + ParameterOffset, ParameterCount)) &&
       ((strcmp(trans_type, "PIPE") != 0) ||
        !dissect_pipe_smb(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, trans_cmd, DataOffset, DataCount, ParameterOffset, ParameterCount)))) {
     
@@ -9262,7 +9537,7 @@ dissect_transact_params(const u_char *pd, int offset, frame_data *fd, proto_tree
       
       if (tree) {
 
-       proto_tree_add_text(tree, SMB_offset + ParameterOffset, ParameterCount, "Parameters: %s", format_text(pd + SMB_offset + ParameterOffset, ParameterCount));
+       proto_tree_add_text(tree, NullTVB, SMB_offset + ParameterOffset, ParameterCount, "Parameters: %s", format_text(pd + SMB_offset + ParameterOffset, ParameterCount));
          
       }
        
@@ -9270,19 +9545,19 @@ dissect_transact_params(const u_char *pd, int offset, frame_data *fd, proto_tree
 
     }
 
-    if (offset % 2) {
+    if (DataCount > 0 && offset < (SMB_offset + DataOffset)) {
+
+      int pad2Count = SMB_offset + DataOffset - offset;
        
       /* Build display for: Pad2 */
 
-      Pad2 = GBYTE(pd, offset);
-
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 1, "Pad2: %u: %u", Pad2, offset);
+       proto_tree_add_text(tree, NullTVB, offset, pad2Count, "Pad2: %s", format_text(pd + offset, pad2Count));
 
       }
 
-      offset += 1; /* Skip Pad2 */
+      offset += pad2Count; /* Skip Pad2 */
 
     }
 
@@ -9294,7 +9569,7 @@ dissect_transact_params(const u_char *pd, int offset, frame_data *fd, proto_tree
 
       if (tree) {
 
-       proto_tree_add_text(tree, SMB_offset + DataOffset, DataCount, "Data: %s", format_text(pd + SMB_offset + DataOffset, DataCount));
+       proto_tree_add_text(tree, NullTVB, SMB_offset + DataOffset, DataCount, "Data: %s", format_text(pd + SMB_offset + DataOffset, DataCount));
 
       }
 
@@ -9315,7 +9590,6 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
   guint8        SetupCount;
   guint8        Reserved3;
   guint8        Reserved1;
-  guint8        Pad1;
   guint8        MaxSetupCount;
   guint32       Timeout;
   guint16       TotalParameterCount;
@@ -9337,18 +9611,21 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
   conversation_t *conversation;
   struct smb_request_key   request_key, *new_request_key;
   struct smb_request_val   *request_val;
+  guint16      SetupAreaOffset;
+
 
   /*
    * Find out what conversation this packet is part of
    */
 
   conversation = find_conversation(&pi.src, &pi.dst, pi.ptype,
-                                  pi.srcport, pi.destport);
+                                  pi.srcport, pi.destport, 0);
 
   if (conversation == NULL) {  /* Create a new conversation */
 
     conversation = conversation_new(&pi.src, &pi.dst, pi.ptype,
-                                   pi.srcport, pi.destport, NULL);
+                                   pi.srcport, pi.destport, NULL, 0);
 
   }
 
@@ -9388,7 +9665,7 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -9400,7 +9677,7 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Total Parameter Count: %u", TotalParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Total Parameter Count: %u", TotalParameterCount);
 
     }
 
@@ -9412,7 +9689,7 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Total Data Count: %u", TotalDataCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Total Data Count: %u", TotalDataCount);
 
     }
 
@@ -9424,7 +9701,7 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max Parameter Count: %u", MaxParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max Parameter Count: %u", MaxParameterCount);
 
     }
 
@@ -9436,7 +9713,7 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Max Data Count: %u", MaxDataCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max Data Count: %u", MaxDataCount);
 
     }
 
@@ -9448,7 +9725,7 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Max Setup Count: %u", MaxSetupCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Max Setup Count: %u", MaxSetupCount);
 
     }
 
@@ -9460,7 +9737,7 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Reserved1: %u", Reserved1);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Reserved1: %u", Reserved1);
 
     }
 
@@ -9472,11 +9749,11 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     if (tree) {
 
-      ti = proto_tree_add_text(tree, offset, 2, "Flags: 0x%02x", Flags);
+      ti = proto_tree_add_text(tree, NullTVB, offset, 2, "Flags: 0x%02x", Flags);
       Flags_tree = proto_item_add_subtree(ti, ett_smb_flags);
-      proto_tree_add_text(Flags_tree, offset, 2, "%s",
+      proto_tree_add_text(Flags_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Flags, 0x01, 16, "Also disconnect TID", "Dont disconnect TID"));
-      proto_tree_add_text(Flags_tree, offset, 2, "%s",
+      proto_tree_add_text(Flags_tree, NullTVB, offset, 2, "%s",
                           decode_boolean_bitfield(Flags, 0x02, 16, "One way transaction", "Two way transaction"));
     
 }
@@ -9485,1750 +9762,421 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     /* Build display for: Timeout */
 
-    Timeout = GWORD(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 4, "Timeout: %u", Timeout);
-
-    }
-
-    offset += 4; /* Skip Timeout */
-
-    /* Build display for: Reserved2 */
-
-    Reserved2 = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Reserved2: %u", Reserved2);
-
-    }
-
-    offset += 2; /* Skip Reserved2 */
-
-    /* Build display for: Parameter Count */
-
-    ParameterCount = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Parameter Count: %u", ParameterCount);
-
-    }
-
-    offset += 2; /* Skip Parameter Count */
-
-    /* Build display for: Parameter Offset */
-
-    ParameterOffset = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Parameter Offset: %u", ParameterOffset);
-
-    }
-
-    offset += 2; /* Skip Parameter Offset */
-
-    /* Build display for: Data Count */
-
-    DataCount = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Data Count: %u", DataCount);
-
-    }
-
-    offset += 2; /* Skip Data Count */
-
-    /* Build display for: Data Offset */
-
-    DataOffset = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Data Offset: %u", DataOffset);
-
-    }
-
-    offset += 2; /* Skip Data Offset */
-
-    /* Build display for: Setup Count */
-
-    SetupCount = GBYTE(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 1, "Setup Count: %u", SetupCount);
-
-    }
-
-    offset += 1; /* Skip Setup Count */
-
-    /* Build display for: Reserved3 */
-
-    Reserved3 = GBYTE(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 1, "Reserved3: %u", Reserved3);
-
-    }
-
-    offset += 1; /* Skip Reserved3 */
-
-    /* Build display for: Setup */
-
-    if (SetupCount > 0) {
-
-      int i = SetupCount;
-
-      Setup = GSHORT(pd, offset);
-
-      for (i = 1; i <= SetupCount; i++) {
-       
-       Setup = GSHORT(pd, offset);
-
-       if (tree) {
-
-         proto_tree_add_text(tree, offset, 2, "Setup%i: %u", i, Setup);
-
-       }
-
-       offset += 2; /* Skip Setup */
-
-      }
-
-    }
-
-    /* Build display for: Byte Count (BCC) */
-
-    ByteCount = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
-
-    }
-
-    offset += 2; /* Skip Byte Count (BCC) */
-
-    /* Build display for: Transact Name */
-
-    /* Watch out for Unicode names */
-
-    if (si.unicode) {
-
-      if (offset % 2) offset++;   /* Looks like a pad byte there sometimes */
-
-      TransactName = unicode_to_str(pd + offset, &TNlen);
-      TNlen += 2;
-
-    }
-    else { 
-      TransactName = pd + offset;
-      TNlen = strlen(TransactName) + 1;
-    }
-
-    if (request_val -> last_transact_command) g_free(request_val -> last_transact_command);
-
-    request_val -> last_transact_command = g_malloc(strlen(TransactName) + 1);
-
-    if (request_val -> last_transact_command) 
-      strcpy(request_val -> last_transact_command, TransactName);
-
-    if (check_col(fd, COL_INFO)) {
-
-      col_add_fstr(fd, COL_INFO, "%s %s", TransactName, (dirn ? "Request" : "Response"));
-
-    }
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, TNlen, "Transact Name: %s", TransactName);
-
-    }
-
-    offset += TNlen; /* Skip Transact Name */
-    if (si.unicode) offset += 2;   /* There are two more extraneous bytes there*/
-
-    if (offset % 2) {
-
-      /* Build display for: Pad1 */
-
-      Pad1 = GBYTE(pd, offset);
-
-      if (tree) {
-
-       proto_tree_add_text(tree, offset, 1, "Pad1: %u", Pad1);
-
-      }
-    
-      offset += 1; /* Skip Pad1 */
-
-    }
-
-    /* Let's see if we can decode this */
-
-    dissect_transact_params(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, DataOffset, DataCount, ParameterOffset, ParameterCount, TransactName);
-
-  }
-
-  if (dirn == 0) { /* Response(s) dissect code */
-
-    if (check_col(fd, COL_INFO)) {
-
-      col_add_fstr(fd, COL_INFO, "%s %s", request_val -> last_transact_command, "Response");
-
-    }
-
-    /* Build display for: Word Count (WCT) */
-
-    WordCount = GBYTE(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 1, "Word Count (WCT): %u", WordCount);
-
-    }
-
-    offset += 1; /* Skip Word Count (WCT) */
-
-    /* Build display for: Total Parameter Count */
-
-    TotalParameterCount = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Total Parameter Count: %u", TotalParameterCount);
-
-    }
-
-    offset += 2; /* Skip Total Parameter Count */
-
-    /* Build display for: Total Data Count */
-
-    TotalDataCount = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Total Data Count: %u", TotalDataCount);
-
-    }
-
-    offset += 2; /* Skip Total Data Count */
-
-    /* Build display for: Reserved2 */
-
-    Reserved2 = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Reserved2: %u", Reserved2);
-
-    }
-
-    offset += 2; /* Skip Reserved2 */
-
-    /* Build display for: Parameter Count */
-
-    ParameterCount = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Parameter Count: %u", ParameterCount);
-
-    }
-
-    offset += 2; /* Skip Parameter Count */
-
-    /* Build display for: Parameter Offset */
-
-    ParameterOffset = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Parameter Offset: %u", ParameterOffset);
-
-    }
-
-    offset += 2; /* Skip Parameter Offset */
-
-    /* Build display for: Parameter Displacement */
-
-    ParameterDisplacement = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Parameter Displacement: %u", ParameterDisplacement);
-
-    }
-
-    offset += 2; /* Skip Parameter Displacement */
-
-    /* Build display for: Data Count */
-
-    DataCount = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Data Count: %u", DataCount);
-
-    }
-
-    offset += 2; /* Skip Data Count */
-
-    /* Build display for: Data Offset */
-
-    DataOffset = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Data Offset: %u", DataOffset);
-
-    }
-
-    offset += 2; /* Skip Data Offset */
-
-    /* Build display for: Data Displacement */
-
-    DataDisplacement = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Data Displacement: %u", DataDisplacement);
-
-    }
-
-    offset += 2; /* Skip Data Displacement */
-
-    /* Build display for: Setup Count */
-
-    SetupCount = GBYTE(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 1, "Setup Count: %u", SetupCount);
-
-    }
-
-    offset += 1; /* Skip Setup Count */
-
-    /* Build display for: Reserved3 */
-
-    Reserved3 = GBYTE(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 1, "Reserved3: %u", Reserved3);
-
-    }
-
-    offset += 1; /* Skip Reserved3 */
-
-    /* Build display for: Setup */
-
-    if (SetupCount > 0) {
-
-      /* Hmmm, should code for all setup words ... */
-
-      Setup = GSHORT(pd, offset);
-
-      if (tree) {
-
-       proto_tree_add_text(tree, offset, 2, "Setup: %u", Setup);
-
-      }
-
-    offset += 2; /* Skip Setup */
-
-    }
-
-    /* Build display for: Byte Count (BCC) */
-
-    ByteCount = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
-
-    }
-
-    offset += 2; /* Skip Byte Count (BCC) */
-
-    /* Build display for: Pad1 */
-
-    if (offset % 2) {
-
-      Pad1 = GBYTE(pd, offset);
-
-      if (tree) {
-
-       proto_tree_add_text(tree, offset, 1, "Pad1: %u", Pad1);
-
-      }
-
-      offset += 1; /* Skip Pad1 */
-
-    }
-
-    dissect_transact_params(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, DataOffset, DataCount, ParameterOffset, ParameterCount, si.request_val -> last_transact_command);
-
-  }
-
-}
-
-/*
- * The routines for mailslot and pipe dissecting should be migrated to another 
- * file soon?
- */
-
-#define NETSHAREENUM   0x00  /* 00  */
-#define NETSERVERENUM2 0x68  /* 104 */
-
-void dissect_server_flags(proto_tree *tree, int offset, int length, int flags)
-{
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x0001, length*8, "Workstation", "Not Workstation"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x0002, length*8, "Server", "Not Server"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x0004, length*8, "SQL Server", "Not SQL Server"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x0008, length*8, "Domain Controller", "Not Domain Controller"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x0010, length*8, "Backup Controller", "Not Backup Controller"));
-  proto_tree_add_text(tree, offset, 4, "%s",
-                     decode_boolean_bitfield(flags, 0x0020, length*8, "Time Source", "Not Time Source"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x0040, length*8, "Apple Server", "Not Apple Server"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x0080, length*8, "Novell Server", "Not Novell Server"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x0100, length*8, "Domain Member Server", "Not Domain Member Server"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x0200, length*8, "Print Queue Server", "Not Print Queue Server"));      
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x0400, length*8, "Dialin Server", "Not Dialin Server"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x0800, length*8, "Xenix Server", "Not Xenix Server"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x1000, length*8, "NT Workstation", "Not NT Workstation"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x2000, length*8, "Windows for Workgroups", "Not Windows for Workgroups"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x8000, length*8, "NT Server", "Not NT Server"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x10000, length*8, "Potential Browser", "Not Potential Browser"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x20000, length*8, "Backup Browser", "Not Backup Browser"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x40000, length*8, "Master Browser", "Not Master Browser"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x80000, length*8, "Domain Master Browser", "Not Domain Master Browser"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x100000, length*8, "OSF", "Not OSF"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x200000, length*8, "VMS", "Not VMS"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x400000, length*8, "Windows 95 or above", "Not Windows 95 or above"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x40000000, length*8, "Local List Only", "Not Local List Only"));
-  proto_tree_add_text(tree, offset, length, "%s",
-                     decode_boolean_bitfield(flags, 0x80000000, length*8, "Domain Enum", "Not Domain Enum"));
-
-}
-
-/* 
- * The following data structure describes the LANMAN requests we understand
- *
- * Simply fill in the number, name, and parameter names if you know them
- * Try to keep them in order 
- *
- * We will extend this data structure as we try to decode more ...
- */
-
-struct lanman_desc {
-  int   lanman_num;
-  char  *lanman_name;
-  char  **req;
-  char  **req_data;     /* Hmmm, not flexible enough */
-  char  **resp;
-  char  **resp_data;
-};
-
-static char *lm_params_req_0[]   = {"Detail Level", "Return Buffer Size", NULL};
-static char *lm_params_req_1[]   = {"Share Name", "Detail Level", "Receive Buffer Size", NULL};
-static char *lm_params_resp_1[]  = {"Returned Data Len", NULL};
-static char *lm_params_req_13[]  = {"Detail Level", "Receive Buffer Size", NULL};
-static char *lm_params_req_56[]  = {"User Name", "Detail Level", "Receive Buffer Size", NULL};
-static char *lm_params_req_104[] = {"Detail Level", "Return Buffer Size", "Server Type", "Domain", NULL};
-static char *lm_params_req_132[] = {"Reserved1", "Reserved2", "Detail Level", "UserInfoStruct?", "Length of UStruct", "Receive Buffer Size", NULL};
-static char *lm_params_req_133[] = {"Reserved1", "Reserved2", "Detail Level", "UserInfoStruct?", "Length of UStruct", "Receive Buffer Size", NULL};
-
-static char *lm_null_params[] = {NULL};
-
-struct lanman_desc lmd[] = {
-  {0, "NetShareEnum", lm_params_req_0, lm_null_params, lm_null_params, lm_null_params},
-  {1, "NetShareGetInfo", lm_params_req_1, lm_null_params, lm_params_resp_1, lm_null_params},
-  {13, "NetServerGetInfo", lm_params_req_13, lm_null_params, lm_null_params, lm_null_params},
-  {56, "NetGroupGetUser", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {56, "NetUserGetInfo", lm_params_req_56, lm_null_params, lm_null_params, lm_null_params},
-  {59, "NetUserGetGroups", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {63, "NetWkstaGetInfo", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {69, "DOSPrintQEnum", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {70, "DOSPrintQGetInfo", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {74, "WPrintQueuePause", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {75, "WPrintQueueResume", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {76, "WPrintJobEnumerate", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {77, "WPrintJobGetInfo", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {81, "RDOSPrintJobDel", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {82, "RDOSPrintJobPause", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {83, "RDOSPrintJobResume", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {84, "WPrintDestEnum", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {85, "WPrintDestGetInfo", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {91, "NetRemoteTOD", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {103, "WPrintQueuePurge", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {104, "NetServerEnum2", lm_params_req_104, lm_null_params, lm_null_params, lm_null_params},
-  {105, "WAccessGetUserPerms", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {115, "SetUserPassword", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {132, "NetWkstaUserLogon", lm_params_req_132, lm_null_params, lm_null_params, lm_null_params},
-  {133, "NetWkstaUserLogoff", lm_params_req_133, lm_null_params, lm_null_params, lm_null_params},
-  {147, "PrintJobInfo", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {205, "WPrintDriverEnum", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {206, "WPrintQProcEnum", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {207, "WPrintPortEnum", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {214, "SamOEMChangePassword", lm_null_params, lm_null_params, lm_null_params, lm_null_params},
-  {-1, NULL, NULL,NULL, NULL, NULL}
-};
-
-struct lanman_desc *
-find_lanman(int lanman_num)
-{
-  int i = 0;
-
-  /* FIXME, This could be more efficient */
-
-  while (lmd[i].lanman_num != -1) {
-
-    if (lmd[i].lanman_num == lanman_num) {
-
-      return &lmd[i];
-
-    }
-
-    i++;
-
-  }
-
-  return NULL;
-
-}
-
-guint32 
-dissect_pipe_lanman(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn, const u_char *command, int DataOffset, int DataCount, int ParameterOffset, int ParameterCount)
-{
-  guint32             loc_offset = SMB_offset + ParameterOffset;
-  guint16             FunctionCode;
-  guint16             Level;
-  guint16             RecvBufLen;
-  guint16             Flags;
-  const char          *ParameterDescriptor;
-  const char          *ReturnDescriptor;
-  proto_tree          *lanman_tree = NULL, *flags_tree = NULL;
-  proto_item          *ti;
-  struct lanman_desc  *lanman;
-
-  if (check_col(fd, COL_PROTOCOL))
-    col_add_fstr(fd, COL_PROTOCOL, "LANMAN");
-
-  if (dirn == 1) { /* The request side */
-
-    FunctionCode = GSHORT(pd, loc_offset);
-
-    si.request_val -> last_lanman_cmd = FunctionCode;
-
-    switch (FunctionCode) {
-
-    case NETSHAREENUM:   /* Never decode this at the moment ... */
-
-      if (check_col(fd, COL_INFO)) {
-
-       col_add_fstr(fd, COL_INFO, "NetShareEnum Request");
-
-      }
-
-      if (tree) {
-
-       ti = proto_tree_add_item(parent, proto_lanman, SMB_offset + ParameterOffset, ParameterCount, NULL);
-       lanman_tree = proto_item_add_subtree(ti, ett_lanman);
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Function Code: NetShareEnum");
-
-      }
-
-      loc_offset += 2;
-
-      ParameterDescriptor = pd + loc_offset;
-
-      si.request_val -> trans_response_seen = 0; 
-
-      if (si.request_val -> last_param_descrip) g_free(si.request_val -> last_param_descrip);
-      si.request_val -> last_param_descrip = g_malloc(strlen(ParameterDescriptor) + 1);
-      if (si.request_val -> last_param_descrip)
-       strcpy(si.request_val -> last_param_descrip, ParameterDescriptor);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, strlen(ParameterDescriptor) + 1, "Parameter Descriptor: %s", ParameterDescriptor);
-
-      }
-
-      loc_offset += strlen(ParameterDescriptor) + 1;
-
-      ReturnDescriptor = pd + loc_offset;
-
-      if (si.request_val -> last_data_descrip) g_free(si.request_val -> last_data_descrip);
-      si.request_val -> last_data_descrip = g_malloc(strlen(ReturnDescriptor) + 1);
-      if (si.request_val -> last_data_descrip)
-       strcpy(si.request_val -> last_data_descrip, ReturnDescriptor);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, strlen(ReturnDescriptor) + 1, "Return Descriptor: %s", ReturnDescriptor);
-
-      }
-
-      loc_offset += strlen(ReturnDescriptor) + 1;
-
-      Level = GSHORT(pd, loc_offset);
-      
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Detail Level: %u", Level);
-
-      }
-
-      loc_offset += 2;
-
-      RecvBufLen = GSHORT(pd, loc_offset);
-      
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Receive Buffer Length: %u", RecvBufLen);
-
-      }
-
-      loc_offset += 2;
-      
-      break;
-
-    case NETSERVERENUM2:  /* Process a NetServerEnum2 */
-
-      if (check_col(fd, COL_INFO)) {
-
-       col_add_fstr(fd, COL_INFO, "NetServerEnum2 %s", dirn ? "Request" : "Response");
-
-      }
-
-      if (tree) {
-
-       ti = proto_tree_add_item(parent, proto_lanman, SMB_offset + ParameterOffset, ParameterCount, NULL);
-       lanman_tree = proto_item_add_subtree(ti, ett_lanman);
-      
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Function Code: NetServerEnum2");
-
-      }
-
-      loc_offset += 2;
-
-      ParameterDescriptor = pd + loc_offset;
-
-      /* Now, save these for later */
-
-      si.request_val -> trans_response_seen = 0; 
-
-      if (si.request_val -> last_param_descrip) g_free(si.request_val -> last_param_descrip);
-      si.request_val -> last_param_descrip = g_malloc(strlen(ParameterDescriptor) + 1);
-      if (si.request_val -> last_param_descrip)
-       strcpy(si.request_val -> last_param_descrip, ParameterDescriptor);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, strlen(ParameterDescriptor) + 1, "Parameter Descriptor: %s", ParameterDescriptor);
-
-      }
-
-      loc_offset += strlen(ParameterDescriptor) + 1;
-
-      ReturnDescriptor = pd + loc_offset;
-
-      if (si.request_val -> last_data_descrip) g_free(si.request_val -> last_data_descrip);
-
-      si.request_val -> last_data_descrip = g_malloc(strlen(ReturnDescriptor) + 1);
-      if (si.request_val -> last_data_descrip)
-       strcpy(si.request_val -> last_data_descrip, ReturnDescriptor);
-      
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, strlen(ReturnDescriptor) + 1, "Return Descriptor: %s", ReturnDescriptor);
-
-      }
-
-      loc_offset += strlen(ReturnDescriptor) + 1;
-
-      Level = GSHORT(pd, loc_offset);
-      si.request_val -> last_level = Level;
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Info Detail Level: %u", Level);
-
-      }
-
-      loc_offset += 2;
-      
-      RecvBufLen = GSHORT(pd, loc_offset);
-      
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Receive Buffer Length: %u", RecvBufLen);
-
-      }
-
-      loc_offset += 2;
-
-      Flags = GWORD(pd, loc_offset);
-
-      if (tree) {
-
-       ti = proto_tree_add_text(lanman_tree, loc_offset, 4, "Server Types Required: 0x%08X", Flags);
-       flags_tree = proto_item_add_subtree(ti, ett_browse_flags);
-       dissect_server_flags(flags_tree, loc_offset, 4, Flags);
-
-      }
-
-      loc_offset += 4;
-
-      return 1;
-      break;
-
-      default:   /* Just try to handle what is there ... */
-
-      lanman = find_lanman(FunctionCode);
-
-      if (check_col(fd, COL_INFO)) {
-
-       if (lanman) { 
-         col_add_fstr(fd, COL_INFO, "%s Request", lanman -> lanman_name);
-       }
-       else {
-         col_add_fstr(fd, COL_INFO, "Unknown LANMAN Request: %u", FunctionCode);
-       }
-      }
-
-      if (tree) {
-
-       ti = proto_tree_add_item(parent, proto_lanman, SMB_offset + ParameterOffset, ParameterCount, NULL);
-       lanman_tree = proto_item_add_subtree(ti, ett_lanman);
-
-       if (lanman) {
-         proto_tree_add_text(lanman_tree, loc_offset, 2, "%s Request", lanman -> lanman_name);
-       }
-       else {
-         proto_tree_add_text(lanman_tree, loc_offset, 2, "Function Code: Unknown LANMAN Request: %u", FunctionCode);
-       }
-
-      }
-
-      loc_offset += 2;
-
-      ParameterDescriptor = pd + loc_offset;
-
-      si.request_val -> trans_response_seen = 0; 
-
-      if (si.request_val -> last_param_descrip) g_free(si.request_val -> last_param_descrip);
-      si.request_val -> last_param_descrip = g_malloc(strlen(ParameterDescriptor) + 1);
-      if (si.request_val -> last_param_descrip)
-       strcpy(si.request_val -> last_param_descrip, ParameterDescriptor);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, strlen(ParameterDescriptor) + 1, "Parameter Descriptor: %s", ParameterDescriptor);
-
-      }
-
-      loc_offset += strlen(ParameterDescriptor) + 1;
-
-      ReturnDescriptor = pd + loc_offset;
-
-      if (si.request_val -> last_data_descrip) g_free(si.request_val -> last_data_descrip);
-      si.request_val -> last_data_descrip = g_malloc(strlen(ReturnDescriptor) + 1);
-      if (si.request_val -> last_data_descrip)
-       strcpy(si.request_val -> last_data_descrip, ReturnDescriptor);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, strlen(ReturnDescriptor) + 1, "Return Descriptor: %s", ReturnDescriptor);
-
-      }
-
-      loc_offset += strlen(ReturnDescriptor) + 1;
-
-      if (tree) {
-
-       int i = 0;  /* Counter for names below */
-       char *name = NULL;
-
-       dissect_transact_engine_init(pd, ParameterDescriptor, ReturnDescriptor,SMB_offset, loc_offset, ParameterCount, DataOffset, DataCount);
-
-       if (lanman) name = lanman -> req[i];  /* Must be OK ... */
-
-       while (dissect_transact_next(pd, name, dirn, lanman_tree))
-         if (name) name = lanman -> req[++i];
-      }
-
-      break;
-    
-    }
-  }
-  else {  /* Dirn == 0, response */
-    guint16          Status;
-    guint16          Convert;
-    guint16          EntCount;
-    guint16          AvailCount;
-    guint32          loc_offset = 0;
-    int              i;
-    proto_tree       *server_tree = NULL, *flags_tree = NULL, *share_tree = NULL;
-
-    FunctionCode = si.request_val -> last_lanman_cmd;
-
-    /*
-     * If we have already seen the response to this transact, simply
-     * record it as a continuation ...
-     */
-
-    printf("TransResponseSeen = %u\n", si.request_val -> trans_response_seen);
-
-    if (si.request_val -> trans_response_seen == 1) {
-
-      if (check_col(fd, COL_INFO)) {
-         col_add_fstr(fd, COL_INFO, "Transact Continuation");
-      }
-      
-      if (tree) {
-
-       ti = proto_tree_add_item(parent, proto_lanman, SMB_offset + DataOffset, END_OF_FRAME, NULL);
-
-       lanman_tree = proto_item_add_subtree(ti, ett_lanman);
-
-       proto_tree_add_text(lanman_tree, loc_offset, END_OF_FRAME, "Payload: %s", format_text(pd + SMB_offset + DataOffset, END_OF_FRAME));
-
-      }
-
-      return 1;
-
-
-    } 
-
-    si.request_val -> trans_response_seen = 1; 
-
-    switch (FunctionCode) {
-
-    case NETSHAREENUM:
-
-      if (check_col(fd, COL_INFO)) {
-
-       col_add_fstr(fd, COL_INFO, "NetShareEnum Response");
-
-      }
-
-      if (tree) {
-
-       ti = proto_tree_add_item(parent, proto_lanman, SMB_offset + ParameterOffset, END_OF_FRAME, NULL);
-       lanman_tree = proto_item_add_subtree(ti, ett_lanman);
-      
-       proto_tree_add_text(lanman_tree, loc_offset, 0, "Function Code: NetShareEnum");
-
-      }
-
-      si.request_val -> trans_response_seen = 1; 
-
-      loc_offset = SMB_offset + ParameterOffset;
-
-      Status = GSHORT(pd, loc_offset);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Status: %u", Status);
-
-      }
-
-      loc_offset += 2;
-
-      Convert = GSHORT(pd, loc_offset);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Convert: %u", Convert);
-
-      }
-
-      loc_offset += 2;
-
-      EntCount = GSHORT(pd, loc_offset);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Entry Count: %u", EntCount);
-
-      }
-
-      loc_offset += 2;
-
-      AvailCount = GSHORT(pd, loc_offset);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Available Entries: %u", AvailCount);
-
-      }
-
-      loc_offset += 2;
-
-      if (tree) {
-
-       ti = proto_tree_add_text(lanman_tree, loc_offset, AvailCount * 20, "Available Shares", NULL);
-
-       share_tree = proto_item_add_subtree(ti, ett_lanman_shares);
-
-      }
-
-      for (i = 1; i <= EntCount; i++) {
-       const gchar *Share = pd + loc_offset;
-       guint32     Flags;
-       const gchar *Comment;
-       proto_tree  *share = NULL;
-       proto_item  *ti = NULL;
-
-       if (tree) {
-
-         ti = proto_tree_add_text(share_tree, loc_offset, 20, "Share %s", Share);
-         share = proto_item_add_subtree(ti, ett_lanman_share);
-
-
-       }
-
-       if (tree) {
-         
-         proto_tree_add_text(share, loc_offset, 13, "Share Name: %s", Share);
-
-       }
-
-       loc_offset += 13;
-
-       while (loc_offset % 4)
-         loc_offset += 1;  /* Align to a word boundary ... */
-
-       Flags = GSHORT(pd, loc_offset);
-
-       if (tree) {
-
-         proto_tree_add_text(share, loc_offset, 2, "Share Type: %u", Flags);
-
-       }
-
-       loc_offset += 2;
-
-       Comment = pd + SMB_offset + DataOffset + (GWORD(pd, loc_offset) & 0xFFFF) - Convert;
-
-       if (tree) {
-
-         proto_tree_add_text(share, loc_offset, 4, "Share Comment: %s", Comment);
-
-       }
-
-       loc_offset += 4;
-
-      }
-
-      break;
-
-    case NETSERVERENUM2:
-
-      if (check_col(fd, COL_INFO)) {
-
-       col_add_fstr(fd, COL_INFO, "NetServerEnum2 %s", dirn ? "Request" : "Response");
-
-      }
-
-      if (tree) {
-
-       ti = proto_tree_add_item(parent, proto_lanman, SMB_offset + ParameterOffset, END_OF_FRAME, NULL);
-       lanman_tree = proto_item_add_subtree(ti, ett_lanman);
-      
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Function Code: NetServerEnum2");
-
-      }
-
-      loc_offset = SMB_offset + ParameterOffset;
-      Status = GSHORT(pd, loc_offset);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Status: %u", Status);
-
-      }
-
-      loc_offset += 2;
-
-      Convert = GSHORT(pd, loc_offset);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Convert: %u", Convert);
-
-      }
-
-      loc_offset += 2;
-
-      EntCount = GSHORT(pd, loc_offset);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Entry Count: %u", EntCount);
-
-      }
-
-      loc_offset += 2;
-
-      AvailCount = GSHORT(pd, loc_offset);
-
-      if (tree) {
-
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Available Entries: %u", AvailCount);
-
-      }
-
-      loc_offset += 2;
-
-      if (tree) {
-
-       ti = proto_tree_add_text(lanman_tree, loc_offset, 26 * AvailCount, "Servers");
-       if (ti == NULL) { 
-
-         printf("Null value returned from proto_tree_add_text\n");
-         exit(1);
-
-       }
-
-       server_tree = proto_item_add_subtree(ti, ett_lanman_servers);
-
-      }
-
-      /* Make sure we don't go past the end of the capture buffer */
-
-      for (i = 1; (i <= EntCount) && ((pi.captured_len - loc_offset) > 16); i++) {
-       const gchar *Server = pd + loc_offset;
-       gint8       ServerMajor;
-       guint       ServerMinor;
-       guint32     ServerFlags;
-       const gchar *Comment;
-       proto_tree  *server = NULL;
-       proto_item  *ti;
-
-       if (tree) {
-
-         ti = proto_tree_add_text(server_tree, loc_offset, 
-                                  (si.request_val -> last_level) ? 26 : 16,
-                                  "Server %s", Server);
-         server = proto_item_add_subtree(ti, ett_lanman_server);
-
-
-       }
-
-       if (tree) {
-         
-         proto_tree_add_text(server, loc_offset, 16, "Server Name: %s", Server);
-
-       }
-
-       loc_offset += 16;
-
-       if (si.request_val -> last_level) { /* Print out the rest of the info */
-
-         ServerMajor = GBYTE(pd, loc_offset);
-
-         if (tree) {
-
-           proto_tree_add_text(server, loc_offset, 1, "Major Version: %u", ServerMajor);
-
-         }
-
-         loc_offset += 1;
-
-         ServerMinor = GBYTE(pd, loc_offset);
-
-         if (tree) {
-
-           proto_tree_add_text(server, loc_offset, 1, "Minor Version: %u", ServerMinor);
-
-         }
-
-         loc_offset += 1;
-
-         ServerFlags = GWORD(pd, loc_offset);
-
-         if (tree) {
-
-           ti = proto_tree_add_text(server, loc_offset, 4, "Server Type: 0x%08X", ServerFlags);
-           flags_tree = proto_item_add_subtree(ti, ett_browse_flags);
-           dissect_server_flags(flags_tree, loc_offset, 4, ServerFlags);
-
-         }
-
-         loc_offset += 4;
-
-         Comment = pd + SMB_offset + DataOffset + (GWORD(pd, loc_offset) & 0xFFFF) - Convert;
-
-         if (tree) {
-
-           proto_tree_add_text(server, loc_offset, 4, "Server Comment: %s", Comment);
-
-         }
-
-         loc_offset += 4;
-
-       }
-
-      }
-
-      break;
-
-    default:
-
-      lanman = find_lanman(si.request_val -> last_lanman_cmd);
-
-      if (check_col(fd, COL_INFO)) {
-
-       if (lanman) {
-         col_add_fstr(fd, COL_INFO, "%s Response", lanman -> lanman_name);
-       }
-       else {
-         col_add_fstr(fd, COL_INFO, "Unknown LANMAN Response: %u", FunctionCode);
-       }
-      }
-
-      if (tree) {
-
-       ti = proto_tree_add_item(parent, proto_lanman, SMB_offset + ParameterOffset, END_OF_FRAME, NULL);
-       lanman_tree = proto_item_add_subtree(ti, ett_lanman);
-       if (lanman) {
-         proto_tree_add_text(lanman_tree, 0, 0, "%s Response", lanman -> lanman_name);
-       }
-       else {
-         proto_tree_add_text(lanman_tree, loc_offset, 0, "Function Code: Unknown LANMAN Response: %u", FunctionCode);
-       }
-      }
-
-      loc_offset = SMB_offset + ParameterOffset;
-
-      Status = GSHORT(pd, loc_offset);
+    Timeout = GWORD(pd, offset);
 
-      if (tree) {
+    if (tree) {
 
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Status: %u", Status);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Timeout: %u", Timeout);
 
-      }
+    }
 
-      loc_offset += 2;
+    offset += 4; /* Skip Timeout */
 
-      Convert = GSHORT(pd, loc_offset);
+    /* Build display for: Reserved2 */
 
-      if (tree) {
+    Reserved2 = GSHORT(pd, offset);
 
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Convert: %u", Convert);
+    if (tree) {
 
-      }
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved2: %u", Reserved2);
 
-      loc_offset += 2;
+    }
 
-      if (tree) {
+    offset += 2; /* Skip Reserved2 */
 
-       int i = 0;
-       char *name = NULL;
+    /* Build display for: Parameter Count */
 
-       dissect_transact_engine_init(pd, si.request_val -> last_param_descrip, si.request_val -> last_data_descrip, SMB_offset, loc_offset, ParameterCount, DataOffset, DataCount);
+    ParameterCount = GSHORT(pd, offset);
 
-       if (lanman) name = lanman -> resp[i];
-         
-       while (dissect_transact_next(pd, name, dirn, lanman_tree))
-         if (name) name = lanman -> resp[++i];
-         
-      }
+    if (tree) {
 
-      return 1;
-      break;
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Count: %u", ParameterCount);
 
     }
 
-  }
-
-  return 0;
+    offset += 2; /* Skip Parameter Count */
 
-}
+    /* Build display for: Parameter Offset */
 
-guint32
-dissect_pipe_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn, const u_char *command, int DataOffset, int DataCount, int ParameterOffset, int ParameterCount)
-{
+    ParameterOffset = GSHORT(pd, offset);
 
-  if (strcmp(command, "LANMAN") == 0) { /* Try to decode a LANMAN */
+    if (tree) {
 
-    return dissect_pipe_lanman(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, command, DataOffset, DataCount, ParameterOffset, ParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Offset: %u", ParameterOffset);
 
-  }
+    }
 
-  return 0;
+    offset += 2; /* Skip Parameter Offset */
 
-}
+    /* Build display for: Data Count */
 
-char *browse_commands[] = 
-{ "Error, No such command!",       /* Value 0 */
-  "Host Announcement",             /* Value 1 */
-  "Request Announcement",          /* Value 2 */
-  "Error, No such command!",       /* Value 3 */
-  "Error, No such command!",       /* Value 4 */
-  "Error, No such command!",       /* Value 5 */
-  "Error, No such command!",       /* Value 6 */
-  "Error, No such command!",       /* Value 7 */
-  "Browser Election Request",      /* Value 8 */
-  "Get Backup List Request",       /* Value 9 */
-  "Get Backup List Response",      /* Value 10 */
-  "Become Backup Browser",         /* Value 11 */
-  "Domain/Workgroup Announcement", /* Value 12 */
-  "Master Announcement",           /* Value 13 */
-  "Error! No such command",        /* Value 14 */
-  "Local Master Announcement"      /* Value 15 */
-};
+    DataCount = GSHORT(pd, offset);
 
-#define HOST_ANNOUNCE        1
-#define REQUEST_ANNOUNCE     2
-#define BROWSER_ELECTION     8
-#define GETBACKUPLISTREQ     9
-#define GETBACKUPLISTRESP   10
-#define BECOMEBACKUPBROWSER 11
-#define DOMAINANNOUNCEMENT  12
-#define MASTERANNOUNCEMENT  13
-#define LOCALMASTERANNOUNC  15
-
-char *svr_types[32] = {
-  "Workstation",
-  "Server",
-  "SQL Server",
-  "Domain Controller",
-  "Backup Controller",
-  "Time Source",
-  "Apple Server",
-  "Novell Server",
-  "Domain Member Server",
-  "Print Queue Server",
-  "Dialin Server",
-  "Xenix Server",
-  "NT Workstation",
-  "Windows for Workgroups",
-  "Unknown Server - FIXME",
-  "NT Server",
-  "Potential Browser",
-  "Backup Browser",
-  "Master Browser",
-  "Domain Master Browser",
-  "OSF",
-  "VMS",
-  "Windows 95 or above",
-  "Unused",
-  "Unused",
-  "Unused",
-  "Unused",
-  "Unused",
-  "Unused",
-  "Unused",
-  "Local List Only",
-  "Domain Enum"
-};
+    if (tree) {
 
-guint32 
-dissect_mailslot_browse(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn, const u_char *command, int DataOffset, int DataCount)
-{
-  guint8               OpCode;
-  guint8               UpdateCount;
-  guint8               VersionMajor;
-  guint8               VersionMinor;
-  guint32              Periodicity;
-  guint32              ServerType;
-  guint16              SigConstant;
-  guint32              Token;
-  guint8               BackupServerCount;
-  guint8               Flags;
-  guint32              MBZ;
-  guint8               ElectionVersion;
-  guint32              ElectionCriteria;
-  guint8               ElectionOS;
-  guint8               ElectionDesire;
-  guint16              ElectionRevision;
-  guint32              ServerUpTime;
-  const char           *ServerName;
-  const char           *ServerComment;
-  proto_tree           *browse_tree = NULL, *flags_tree = NULL, 
-                       *OSflags = NULL, *DesireFlags = NULL;
-  proto_item           *ti, *ec;
-  guint32              loc_offset = DataOffset, count = 0;
-  int                  i;
-
-  if (check_col(fd, COL_PROTOCOL))
-    col_add_str(fd, COL_PROTOCOL, "BROWSER");
-
-  if (check_col(fd, COL_INFO)) /* Put in something, and replace it later */
-    col_add_str(fd, COL_INFO, "Browse Announcement");
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Count: %u", DataCount);
 
-  /*
-   * Now, decode the browse request 
-   */
+    }
 
-  OpCode = GBYTE(pd, loc_offset);
+    offset += 2; /* Skip Data Count */
 
-  if (check_col(fd, COL_INFO))
-    col_add_fstr(fd, COL_INFO, (OpCode > (sizeof(browse_commands)/sizeof(char *))) ? "Error, No Such Command:%u" : browse_commands[OpCode], OpCode);
-    
-  if (tree) {  /* Add the browse tree */
+    /* Build display for: Data Offset */
 
-    ti = proto_tree_add_item(parent, proto_browse, DataOffset, DataCount, NULL);
-    browse_tree = proto_item_add_subtree(ti, ett_browse);
+    DataOffset = GSHORT(pd, offset);
 
-    proto_tree_add_text(browse_tree, loc_offset, 1, "OpCode: %s", (OpCode > (sizeof(browse_commands)/sizeof(char *))) ? "Error, No Such Command" : browse_commands[OpCode]);
+    if (tree) {
 
-  }
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
-  loc_offset += 1;    /* Skip the OpCode */
+    }
 
-  switch (OpCode) {
+    offset += 2; /* Skip Data Offset */
 
-  case DOMAINANNOUNCEMENT:
-  case LOCALMASTERANNOUNC:
-  case HOST_ANNOUNCE:
+    /* Build display for: Setup Count */
 
-    UpdateCount = GBYTE(pd, loc_offset);
+    SetupCount = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Update Count: %u", UpdateCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Setup Count: %u", SetupCount);
 
     }
 
-    loc_offset += 1;  /* Skip the Update Count */
+    offset += 1; /* Skip Setup Count */
+
+    /* Build display for: Reserved3 */
 
-    Periodicity = GWORD(pd, loc_offset);
+    Reserved3 = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 4, "Update Periodicity: %u Sec", Periodicity/1000 );
-
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Reserved3: %u", Reserved3);
     }
 
-    loc_offset += 4;
-
-    ServerName = pd + loc_offset;
+    offset += 1; /* Skip Reserved3 */
+    SetupAreaOffset = offset;
 
-    if (check_col(fd, COL_INFO)) {
+    /* Build display for: Setup */
 
-      col_append_fstr(fd, COL_INFO, " %s", ServerName);
+    if (SetupCount > 0) {
 
-    }
+      int i = SetupCount;
 
-    if (tree) {
+      Setup = GSHORT(pd, offset);
 
-      proto_tree_add_text(browse_tree, loc_offset, 16, (OpCode == DOMAINANNOUNCEMENT) ? "Domain/WorkGroup: %s": "Host Name: %s", ServerName);
+      for (i = 1; i <= SetupCount; i++) {
+       
+       Setup = GSHORT(pd, offset);
 
-    }
+       if (tree) {
 
-    loc_offset += 16;
+         proto_tree_add_text(tree, NullTVB, offset, 2, "Setup%i: %u", i, Setup);
 
-    VersionMajor = GBYTE(pd, loc_offset);
+       }
 
-    if (tree) {
+       offset += 2; /* Skip Setup */
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Major Version: %u", VersionMajor);
+      }
 
     }
 
-    loc_offset += 1;
+    /* Build display for: Byte Count (BCC) */
 
-    VersionMinor = GBYTE(pd, loc_offset);
+    ByteCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Minor Version: %u", VersionMinor);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
-    loc_offset += 1;
+    offset += 2; /* Skip Byte Count (BCC) */
 
-    ServerType = GWORD(pd, loc_offset);
+    /* Build display for: Transact Name */
 
-    if (check_col(fd, COL_INFO)) {
+    /* Watch out for Unicode names */
 
-      /* Append the type(s) of the system to the COL_INFO line ... */
+    if (si.unicode) {
 
-      for (i = 1; i <= 32; i++) {
+      if (offset % 2) offset++;   /* Looks like a pad byte there sometimes */
 
-       if (ServerType & (1 << (i - 1)) && (strcmp("Unused", svr_types[i]) != 0))
-           col_append_fstr(fd, COL_INFO, ", %s", svr_types[i - 1]);
-       
-      }
-      
+      TransactName = unicode_to_str(pd + offset, &TNlen);
+      TNlen += 2;
+
+    }
+    else { 
+      TransactName = pd + offset;
+      TNlen = strlen(TransactName) + 1;
     }
 
-    if (tree) {
+    if (request_val -> last_transact_command) g_free(request_val -> last_transact_command);
 
-      ti = proto_tree_add_text(browse_tree, loc_offset, 4, "Server Type: 0x%04x", ServerType);
-      flags_tree = proto_item_add_subtree(ti, ett_browse_flags);
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0001, 32, "Workstation", "Not Workstation"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0002, 32, "Server", "Not Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0004, 32, "SQL Server", "Not SQL Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0008, 32, "Domain Controller", "Not Domain Controller"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0010, 32, "Backup Controller", "Not Backup Controller"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0020, 32, "Time Source", "Not Time Source"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0040, 32, "Apple Server", "Not Apple Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0080, 32, "Novell Server", "Not Novell Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0100, 32, "Domain Member Server", "Not Domain Member Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0200, 32, "Print Queue Server", "Not Print Queue Server"));      
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0400, 32, "Dialin Server", "Not Dialin Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0800, 32, "Xenix Server", "Not Xenix Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x1000, 32, "NT Workstation", "Not NT Workstation"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x2000, 32, "Windows for Workgroups", "Not Windows for Workgroups"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x8000, 32, "NT Server", "Not NT Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x10000, 32, "Potential Browser", "Not Potential Browser"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x20000, 32, "Backup Browser", "Not Backup Browser"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x40000, 32, "Master Browser", "Not Master Browser"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x80000, 32, "Domain Master Browser", "Not Domain Master Browser"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x100000, 32, "OSF", "Not OSF"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x200000, 32, "VMS", "Not VMS"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x400000, 32, "Windows 95 or above", "Not Windows 95 or above"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x40000000, 32, "Local List Only", "Not Local List Only"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x80000000, 32, "Domain Enum", "Not Domain Enum"));
-    }
-    loc_offset += 4;
-    
-    ElectionVersion = GSHORT(pd, loc_offset);
-    
-    if (tree) {
-      
-      proto_tree_add_text(browse_tree, loc_offset, 2, "Election Version: %u", ElectionVersion);
+    request_val -> last_transact_command = g_malloc(strlen(TransactName) + 1);
 
-    }
+    if (request_val -> last_transact_command) 
+      strcpy(request_val -> last_transact_command, TransactName);
+
+    if (check_col(fd, COL_INFO)) {
 
-    loc_offset += 2;
+      col_add_fstr(fd, COL_INFO, "%s %s", TransactName, (dirn ? "Request" : "Response"));
 
-    SigConstant = GSHORT(pd, loc_offset);
+    }
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 2, "Signature: %u (0x%04X)", SigConstant, SigConstant);
+      proto_tree_add_text(tree, NullTVB, offset, TNlen, "Transact Name: %s", TransactName);
 
     }
 
-    loc_offset += 2;
+    offset += TNlen; /* Skip Transact Name */
+    if (si.unicode) offset += 2;   /* There are two more extraneous bytes there*/
+
+    if (offset < (SMB_offset + ParameterOffset)) {
 
-    ServerComment = pd + loc_offset;
+      int pad1Count = SMB_offset + ParameterOffset - offset;
 
-    if (tree) {
+      /* Build display for: Pad1 */
+
+      if (tree) {
+
+       proto_tree_add_text(tree, NullTVB, offset, pad1Count, "Pad1: %s", format_text(pd + offset, pad1Count));
+      }
 
-      proto_tree_add_text(browse_tree, loc_offset, strlen(ServerComment) + 1, "Host Comment: %s", ServerComment);
+      offset += pad1Count; /* Skip Pad1 */
 
     }
 
-    break;
+    /* Let's see if we can decode this */
 
-  case REQUEST_ANNOUNCE:
+    dissect_transact_params(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, DataOffset, DataCount, ParameterOffset, ParameterCount, SetupAreaOffset, SetupCount, TransactName);
 
-    Flags = GBYTE(pd, loc_offset);
+  }
 
-    if (tree) {
+  if (dirn == 0) { /* Response(s) dissect code */
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Unused Flags: %u", Flags);
+    if (check_col(fd, COL_INFO)) {
+      if ( request_val -> last_transact_command )
+        col_add_fstr(fd, COL_INFO, "%s %s", request_val -> last_transact_command, "Response");
+      else col_add_fstr(fd, COL_INFO, "Response to unknown message");
 
     }
 
-    loc_offset += 1;
+    /* Build display for: Word Count (WCT) */
 
-    ServerName = pd + loc_offset;
+    WordCount = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, strlen(ServerName) + 1, "Send List To: %s", ServerName);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
-    break;
+    offset += 1; /* Skip Word Count (WCT) */
 
-  case BROWSER_ELECTION:
+    /* Build display for: Total Parameter Count */
 
-    ElectionVersion = GBYTE(pd, loc_offset);
+    TotalParameterCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Election Version = %u", ElectionVersion);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Total Parameter Count: %u", TotalParameterCount);
 
     }
 
-    loc_offset += 1;
+    offset += 2; /* Skip Total Parameter Count */
+
+    /* Build display for: Total Data Count */
 
-    ElectionCriteria = GWORD(pd, loc_offset);
-    ElectionOS       = GBYTE(pd, loc_offset + 3);
-    ElectionRevision = GSHORT(pd, loc_offset + 1);
-    ElectionDesire   = GBYTE(pd, loc_offset);
+    TotalDataCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      ti = proto_tree_add_text(browse_tree, loc_offset, 4, "Election Criteria = %u (0x%08X)", ElectionCriteria, ElectionCriteria);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Total Data Count: %u", TotalDataCount);
 
-      ec = proto_item_add_subtree(ti, ett_browse_election_criteria);
+    }
 
-      ti = proto_tree_add_text(ec, loc_offset + 3, 1, "Election OS Summary: %u (0x%02X)", ElectionOS, ElectionOS);
+    offset += 2; /* Skip Total Data Count */
 
-      OSflags = proto_item_add_subtree(ti, ett_browse_election_os);
+    /* Build display for: Reserved2 */
 
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                           decode_boolean_bitfield(ElectionOS, 0x01, 8, "Windows for Workgroups", "Not Windows for Workgroups"));
-      
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x02, 8, "Unknown", "Not used"));
+    Reserved2 = GSHORT(pd, offset);
 
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x04, 8, "Unknown", "Not used"));
+    if (tree) {
 
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x08, 8, "Unknown", "Not used"));
-      
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x10, 8, "Windows NT Workstation", "Not Windows NT Workstation"));
-      
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x20, 8, "Windows NT Server", "Not Windows NT Server"));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved2: %u", Reserved2);
 
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x40, 8, "Unknown", "Not used"));
+    }
 
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x80, 8, "Unknown", "Not used"));
+    offset += 2; /* Skip Reserved2 */
 
-      proto_tree_add_text(ec, loc_offset + 1, 2, "Election Revision: %u (0x%04X)", ElectionRevision, ElectionRevision);
+    /* Build display for: Parameter Count */
 
-      ti = proto_tree_add_text(ec, loc_offset, 1, "Election Desire Summary: %u (0x%02X)", ElectionDesire, ElectionDesire);
+    ParameterCount = GSHORT(pd, offset);
 
-      DesireFlags = proto_item_add_subtree(ti, ett_browse_election_desire);
+    if (tree) {
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x01, 8, "Backup Browse Server", "Not Backup Browse Server"));
-      
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x02, 8, "Standby Browse Server", "Not Standby Browse Server"));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Count: %u", ParameterCount);
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x04, 8, "Master Browser", "Not Master Browser"));
+    }
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x08, 8, "Domain Master Browse Server", "Not Domain Master Browse Server"));
+    offset += 2; /* Skip Parameter Count */
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x10, 8, "Unknown", "Not used"));
+    /* Build display for: Parameter Offset */
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x20, 8, "WINS Client", "Not WINS Client"));
+    ParameterOffset = GSHORT(pd, offset);
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x40, 8, "Unknown", "Not used"));
+    if (tree) {
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x80, 8, "Windows NT Advanced Server", "Not Windows NT Advanced Server"));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Offset: %u", ParameterOffset);
 
     }
 
-    loc_offset += 4;
+    offset += 2; /* Skip Parameter Offset */
+
+    /* Build display for: Parameter Displacement */
 
-    ServerUpTime = GWORD(pd, loc_offset);
+    ParameterDisplacement = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 4, "Server Up Time: %u Sec", ServerUpTime/1000);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Displacement: %u", ParameterDisplacement);
 
     }
 
-    loc_offset += 4;
-
-    MBZ = GWORD(pd, loc_offset);
+    offset += 2; /* Skip Parameter Displacement */
 
-    loc_offset += 4;
+    /* Build display for: Data Count */
 
-    ServerName = pd + loc_offset;
+    DataCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, strlen(ServerName) + 1, "Election Server Name: %s", ServerName);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Count: %u", DataCount);
 
     }
 
-    break;
+    offset += 2; /* Skip Data Count */
 
-  case GETBACKUPLISTREQ:
+    /* Build display for: Data Offset */
 
-    BackupServerCount = GBYTE(pd, loc_offset);
+    DataOffset = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Backup List Requested Count: %u", BackupServerCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
     }
 
-    loc_offset += 1;
+    offset += 2; /* Skip Data Offset */
+
+    /* Build display for: Data Displacement */
 
-    Token = GWORD(pd, loc_offset);
+    DataDisplacement = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 4, "Backup Request Token: %u", Token);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Displacement: %u", DataDisplacement);
 
     }
 
-    break;
+    offset += 2; /* Skip Data Displacement */
 
-  case GETBACKUPLISTRESP:
+    /* Build display for: Setup Count */
 
-    BackupServerCount = GBYTE(pd, loc_offset);
+    SetupCount = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Backup Server Count: %u", BackupServerCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Setup Count: %u", SetupCount);
 
     }
 
-    loc_offset += 1;
+    offset += 1; /* Skip Setup Count */
+
+    /* Build display for: Reserved3 */
 
-    Token = GWORD(pd, loc_offset);
+    Reserved3 = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 4, "Backup Response Token: %u", Token);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Reserved3: %u", Reserved3);
 
     }
 
-    loc_offset += 4;
-
-    ServerName = pd + loc_offset;
-
-    for (count = 1; count <= BackupServerCount; count++) {
-
-      if (tree) {
+    offset += 1; /* Skip Reserved3 */
+    SetupAreaOffset = offset;  
 
-       proto_tree_add_text(browse_tree, loc_offset, strlen(ServerName) + 1, "Backup Server: %s", ServerName);
+    /* Build display for: Setup */
 
-      }
+    if (SetupCount > 0) {
 
-      loc_offset += strlen(ServerName) + 1;
+      int i = SetupCount;
 
-      ServerName = pd + loc_offset;
+      Setup = GSHORT(pd, offset);
 
-    }
+      for (i = 1; i <= SetupCount; i++) {
+       
+       Setup = GSHORT(pd, offset);
 
-    break;
+       if (tree) {
 
-  case BECOMEBACKUPBROWSER:
+         proto_tree_add_text(tree, NullTVB, offset, 2, "Setup%i: %u", i, Setup);
 
-    ServerName = pd + loc_offset;
+       }
 
-    if (tree) {
+       offset += 2; /* Skip Setup */
 
-      proto_tree_add_text(browse_tree, loc_offset, strlen(ServerName) + 1, "Browser to Promote: %s", ServerName);
+      }
 
     }
 
-    break;
-
-  case MASTERANNOUNCEMENT:
+    /* Build display for: Byte Count (BCC) */
 
-    ServerName = pd + loc_offset;
+    ByteCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, strlen(ServerName) + 1, "Server Name: %s", ServerName);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
-    break;
-
-  default:
-    break;
-  }
-  
-  return 1;  /* Success */
+    offset += 2; /* Skip Byte Count (BCC) */
 
-}
+    /* Build display for: Pad1 */
 
-guint32
-dissect_mailslot_net(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn, const u_char *command, int DataOffset, int DataCount)
-{
+    if (offset < (SMB_offset + ParameterOffset)) {
 
-  return 0;
+      int pad1Count = SMB_offset + ParameterOffset - offset;
 
-}
+      /* Build display for: Pad1 */
 
-guint32
-dissect_mailslot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn, const u_char *command, int DataOffset, int DataCount, int ParameterOffset, int ParameterCount)
-{
+      if (tree) {
 
-  if (strcmp(command, "BROWSE") == 0) { /* Decode a browse */
+       proto_tree_add_text(tree, NullTVB, offset, pad1Count, "Pad1: %s", format_text(pd + offset, pad1Count));
+      }
 
-    return dissect_mailslot_browse(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, command, DataOffset, DataCount);
+      offset += pad1Count; /* Skip Pad1 */
 
-  }
-  else if (strcmp(command, "LANMAN") == 0) {
+    }
 
-    return dissect_pipe_lanman(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, command, DataOffset, DataCount, ParameterOffset, ParameterCount);
+    dissect_transact_params(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, DataOffset, DataCount, ParameterOffset, ParameterCount, SetupAreaOffset, SetupCount, si.request_val -> last_transact_command);
 
   }
 
-  return 0;
 }
 
+
+
+
+
 void (*dissect[256])(const u_char *, int, frame_data *, proto_tree *, proto_tree *, struct smb_info, int, int, int, int) = {
 
-  dissect_unknown_smb,      /* unknown SMB 0x00 */
-  dissect_unknown_smb,      /* unknown SMB 0x01 */
+  dissect_createdir_smb,    /* unknown SMB 0x00 */
+  dissect_deletedir_smb,    /* unknown SMB 0x01 */
   dissect_unknown_smb,      /* SMBopen open a file */
   dissect_create_file_smb,  /* SMBcreate create a file */
   dissect_close_smb,        /* SMBclose close a file */
@@ -11273,7 +10221,7 @@ void (*dissect[256])(const u_char *, int, frame_data *, proto_tree *, proto_tree
   dissect_unknown_smb,      /* SMBecho echo */
   dissect_unknown_smb,      /* SMBwriteclose write a file and then close it */
   dissect_open_andx_smb,      /* SMBopenX open and X */
-  dissect_unknown_smb,      /* SMBreadX read and X */
+  dissect_read_andx_smb,    /* SMBreadX read and X */
   dissect_unknown_smb,      /* SMBwriteX write and X */
   dissect_unknown_smb,      /* unknown SMB 0x30 */
   dissect_unknown_smb,      /* unknown SMB 0x31 */
@@ -11573,7 +10521,7 @@ static const value_string SRV_errors[] = {
   {SMBE_useSTD, "Temporarily unable to use raw mode, use standard mode"},
   {SMBE_contMPX, "Resume MPX mode"},
   {SMBE_badPW, "Bad Password???"},
-  {SMBE_nosupport, "Operation not supported???"},
+  {SMBE_nosupport, "Operation not supported"},
   { 0, 0}
 };
 
@@ -11602,7 +10550,7 @@ static const value_string HRD_errors[] = {
   {0, 0}
 };
 
-char *decode_smb_error(guint8 errcls, guint8 errcode)
+char *decode_smb_error(guint8 errcls, guint16 errcode)
 {
 
   switch (errcls) {
@@ -11644,9 +10592,12 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
        proto_item      *ti, *tf;
        guint8          cmd, errcls, errcode1, flags;
        guint16         flags2, errcode, tid, pid, uid, mid;
+       guint32         status;
        int             SMB_offset = offset;
        struct smb_info si;
 
+       OLD_CHECK_DISPLAY_AS_DATA(proto_smb, pd, offset, fd, tree);
+
        si.unicode = 0;
 
        cmd = pd[offset + SMB_hdr_com_offset];
@@ -11664,15 +10615,15 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
 
        if (tree) {
 
-         ti = proto_tree_add_item(tree, proto_smb, offset, END_OF_FRAME, NULL);
+         ti = proto_tree_add_item(tree, proto_smb, NullTVB, offset, END_OF_FRAME, FALSE);
          smb_tree = proto_item_add_subtree(ti, ett_smb);
 
          /* 0xFFSMB is actually a 1 byte msg type and 3 byte server
           * component ... SMB is only one used
           */
 
-         proto_tree_add_text(smb_tree, offset, 1, "Message Type: 0xFF");
-         proto_tree_add_text(smb_tree, offset+1, 3, "Server Component: SMB");
+         proto_tree_add_text(smb_tree, NullTVB, offset, 1, "Message Type: 0xFF");
+         proto_tree_add_text(smb_tree, NullTVB, offset+1, 3, "Server Component: SMB");
 
        }
 
@@ -11680,46 +10631,68 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
 
        if (tree) {
 
-         proto_tree_add_text(smb_tree, offset, 1, "Command: %s", decode_smb_name(cmd));
+         proto_tree_add_uint(smb_tree, hf_smb_cmd, NullTVB, offset, 1, cmd);
 
        }
 
        offset += 1;
 
-       /* Next, look at the error class, SMB_RETCLASS */
+       /* Handle error code */
 
-       errcls = pd[offset];
+       if (GSHORT(pd, SMB_offset + 10) & 0x4000) {
 
-       if (tree) {
+           /* handle NT 32 bit error code */
+           errcode = 0;        /* better than a random number */
+           status = GWORD(pd, offset); 
+
+           if (tree) {
+
+               proto_tree_add_text(smb_tree, NullTVB, offset, 4, "Status: 0x%08x",
+                                   status);
+
+           }
+
+           offset += 4;
 
-         proto_tree_add_text(smb_tree, offset, 1, "Error Class: %s", 
-                             val_to_str((guint8)pd[offset], errcls_types, "Unknown Error Class (%x)"));
        }
+       else {
+           /* handle DOS error code & class */
 
-       offset += 1;
+           /* Next, look at the error class, SMB_RETCLASS */
 
-       /* Error code, SMB_HEINFO ... */
+           errcls = pd[offset];
 
-       errcode1 = pd[offset];
+           if (tree) {
 
-       if (tree) {
+               proto_tree_add_text(smb_tree, NullTVB, offset, 1, "Error Class: %s", 
+                                   val_to_str((guint8)pd[offset], errcls_types, "Unknown Error Class (%x)"));
+           }
 
-         proto_tree_add_text(smb_tree, offset, 1, "Reserved: %i", errcode1); 
+           offset += 1;
 
-       }
+           /* Error code, SMB_HEINFO ... */
 
-       offset += 1;
+           errcode1 = pd[offset];
 
-       errcode = GSHORT(pd, offset); 
+           if (tree) {
 
-       if (tree) {
+               proto_tree_add_text(smb_tree, NullTVB, offset, 1, "Reserved: %i", errcode1); 
 
-         proto_tree_add_text(smb_tree, offset, 2, "Error Code: %s",
-                             decode_smb_error(errcls, errcode));
+           }
 
-       }
+           offset += 1;
 
-       offset += 2;
+           errcode = GSHORT(pd, offset); 
+
+           if (tree) {
+
+               proto_tree_add_text(smb_tree, NullTVB, offset, 2, "Error Code: %s",
+                                   decode_smb_error(errcls, errcode));
+
+           }
+
+           offset += 2;
+       }
 
        /* Now for the flags: Bit 0 = 0 means cmd, 0 = 1 means resp */
 
@@ -11727,35 +10700,35 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
 
        if (tree) {
 
-         tf = proto_tree_add_text(smb_tree, offset, 1, "Flags: 0x%02x", flags);
+         tf = proto_tree_add_text(smb_tree, NullTVB, offset, 1, "Flags: 0x%02x", flags);
 
          flags_tree = proto_item_add_subtree(tf, ett_smb_flags);
-         proto_tree_add_text(flags_tree, offset, 1, "%s",
+         proto_tree_add_text(flags_tree, NullTVB, offset, 1, "%s",
                              decode_boolean_bitfield(flags, 0x01, 8,
                                                      "Lock&Read, Write&Unlock supported",
                                                      "Lock&Read, Write&Unlock not supported"));
-         proto_tree_add_text(flags_tree, offset, 1, "%s",
+         proto_tree_add_text(flags_tree, NullTVB, offset, 1, "%s",
                              decode_boolean_bitfield(flags, 0x02, 8,
                                                      "Receive buffer posted",
                                                      "Receive buffer not posted"));
-         proto_tree_add_text(flags_tree, offset, 1, "%s",
+         proto_tree_add_text(flags_tree, NullTVB, offset, 1, "%s",
                              decode_boolean_bitfield(flags, 0x08, 8, 
                                                      "Path names caseless",
                                                      "Path names case sensitive"));
-         proto_tree_add_text(flags_tree, offset, 1, "%s",
+         proto_tree_add_text(flags_tree, NullTVB, offset, 1, "%s",
                              decode_boolean_bitfield(flags, 0x10, 8,
                                                      "Pathnames canonicalized",
                                                      "Pathnames not canonicalized"));
-         proto_tree_add_text(flags_tree, offset, 1, "%s",
+         proto_tree_add_text(flags_tree, NullTVB, offset, 1, "%s",
                              decode_boolean_bitfield(flags, 0x20, 8,
                                                      "OpLocks requested/granted",
                                                      "OpLocks not requested/granted"));
-         proto_tree_add_text(flags_tree, offset, 1, "%s",
+         proto_tree_add_text(flags_tree, NullTVB, offset, 1, "%s",
                              decode_boolean_bitfield(flags, 0x40, 8, 
                                                      "Notify all",
                                                      "Notify open only"));
 
-         proto_tree_add_text(flags_tree, offset, 1, "%s",
+         proto_tree_add_text(flags_tree, NullTVB, offset, 1, "%s",
                              decode_boolean_bitfield(flags, SMB_FLAGS_DIRN,
                                                      8, "Response to client/redirector", "Request to server"));
 
@@ -11767,38 +10740,38 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
 
        if (tree) {
 
-         tf = proto_tree_add_text(smb_tree, offset, 1, "Flags2: 0x%04x", flags2);
+         tf = proto_tree_add_text(smb_tree, NullTVB, offset, 2, "Flags2: 0x%04x", flags2);
 
          flags2_tree = proto_item_add_subtree(tf, ett_smb_flags2);
-         proto_tree_add_text(flags2_tree, offset, 1, "%s",
+         proto_tree_add_text(flags2_tree, NullTVB, offset, 2, "%s",
                              decode_boolean_bitfield(flags2, 0x0001, 16,
                                                      "Long file names supported",
                                                      "Long file names not supported"));
-         proto_tree_add_text(flags2_tree, offset, 1, "%s",
+         proto_tree_add_text(flags2_tree, NullTVB, offset, 2, "%s",
                              decode_boolean_bitfield(flags2, 0x0002, 16,
                                                      "Extended attributes supported",
                                                      "Extended attributes not supported"));
-         proto_tree_add_text(flags2_tree, offset, 1, "%s",
+         proto_tree_add_text(flags2_tree, NullTVB, offset, 1, "%s",
                              decode_boolean_bitfield(flags2, 0x0004, 16,
                                                      "Security signatures supported",
                                                      "Security signatures not supported"));
-         proto_tree_add_text(flags2_tree, offset, 1, "%s",
+         proto_tree_add_text(flags2_tree, NullTVB, offset, 2, "%s",
                              decode_boolean_bitfield(flags2, 0x0800, 16,
                                                      "Extended security negotiation supported",
                                                      "Extended security negotiation not supported"));
-         proto_tree_add_text(flags2_tree, offset, 1, "%s",
+         proto_tree_add_text(flags2_tree, NullTVB, offset, 2, "%s",
                              decode_boolean_bitfield(flags2, 0x1000, 16, 
                                                      "Resolve pathnames with DFS",
                                                      "Don't resolve pathnames with DFS"));
-         proto_tree_add_text(flags2_tree, offset, 1, "%s",
+         proto_tree_add_text(flags2_tree, NullTVB, offset, 2, "%s",
                              decode_boolean_bitfield(flags2, 0x2000, 16,
                                                      "Permit reads if execute-only",
                                                      "Don't permit reads if execute-only"));
-         proto_tree_add_text(flags2_tree, offset, 1, "%s",
+         proto_tree_add_text(flags2_tree, NullTVB, offset, 2, "%s",
                              decode_boolean_bitfield(flags2, 0x4000, 16,
                                                      "Error codes are NT error codes",
                                                      "Error codes are DOS error codes"));
-         proto_tree_add_text(flags2_tree, offset, 1, "%s",
+         proto_tree_add_text(flags2_tree, NullTVB, offset, 2, "%s",
                              decode_boolean_bitfield(flags2, 0x8000, 16, 
                                                      "Strings are Unicode",
                                                      "Strings are ASCII"));
@@ -11811,7 +10784,7 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
 
        if (tree) {
 
-         proto_tree_add_text(smb_tree, offset, 12, "Reserved: 6 WORDS");
+         proto_tree_add_text(smb_tree, NullTVB, offset, 12, "Reserved: 6 WORDS");
 
        }
 
@@ -11824,7 +10797,7 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
 
        if (tree) {
 
-         proto_tree_add_text(smb_tree, offset, 2, "Network Path/Tree ID (TID): %i (%04x)", tid, tid); 
+         proto_tree_add_text(smb_tree, NullTVB, offset, 2, "Network Path/Tree ID (TID): %i (%04x)", tid, tid); 
 
        }
 
@@ -11837,7 +10810,7 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
 
        if (tree) {
 
-         proto_tree_add_text(smb_tree, offset, 2, "Process ID (PID): %i (%04x)", pid, pid); 
+         proto_tree_add_text(smb_tree, NullTVB, offset, 2, "Process ID (PID): %i (%04x)", pid, pid); 
 
        }
 
@@ -11850,7 +10823,7 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
 
        if (tree) {
 
-         proto_tree_add_text(smb_tree, offset, 2, "User ID (UID): %i (%04x)", uid, uid); 
+         proto_tree_add_text(smb_tree, NullTVB, offset, 2, "User ID (UID): %i (%04x)", uid, uid); 
 
        }
        
@@ -11863,7 +10836,7 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
 
        if (tree) {
 
-         proto_tree_add_text(smb_tree, offset, 2, "Multiplex ID (MID): %i (%04x)", mid, mid); 
+         proto_tree_add_text(smb_tree, NullTVB, offset, 2, "Multiplex ID (MID): %i (%04x)", mid, mid); 
 
        }
 
@@ -11877,13 +10850,25 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
 
 }
 
+/*** External routines called during the registration process */
+
+extern void register_proto_smb_browse( void);
+extern void register_proto_smb_logon( void);
+extern void register_proto_smb_mailslot( void);
+extern void register_proto_smb_pipe( void);
+extern void register_proto_smb_mailslot( void);
+
+
 void
 proto_register_smb(void)
 {
-/*        static hf_register_info hf[] = {
-                { &variable,
-                { "Name",           "smb.abbreviation", TYPE, VALS_POINTER }},
-        };*/
+  static hf_register_info hf[] = {
+    { &hf_smb_cmd,
+      { "SMB Command", "smb.cmd",
+       FT_UINT8, BASE_HEX, VALS(smb_cmd_vals), 0x0, "" }}
+
+
+  };
        static gint *ett[] = {
                &ett_smb,
                &ett_smb_fileattributes,
@@ -11902,22 +10887,17 @@ proto_register_smb(void)
                &ett_smb_action,
                &ett_smb_writemode,
                &ett_smb_lock_type,
-               &ett_browse,
-               &ett_browse_flags,
-               &ett_browse_election_criteria,
-               &ett_browse_election_os,
-               &ett_browse_election_desire,
-               &ett_lanman,
-               &ett_lanman_servers,
-               &ett_lanman_server,
-               &ett_lanman_shares,
-               &ett_lanman_share
        };
 
-        proto_smb = proto_register_protocol("Server Message Block Protocol", "smb");
-       proto_browse = proto_register_protocol("Microsoft Windows Browser Protocol", "browser");
-       proto_lanman = proto_register_protocol("Microsoft Windows LanMan Protocol", "lanman");
- /*       proto_register_field_array(proto_smb, hf, array_length(hf));*/
+        proto_smb = proto_register_protocol("SMB (Server Message Block Protocol)", "smb");
+
        proto_register_subtree_array(ett, array_length(ett));
+       proto_register_field_array(proto_smb, hf, array_length(hf));
        register_init_routine(&smb_init_protocol);
+       
+       register_proto_smb_browse();
+       register_proto_smb_logon( );
+       register_proto_smb_mailslot();
+       register_proto_smb_pipe();
+
 }