Updates from Ed Warnicke.
[obnox/wireshark/wip.git] / packet-smb.c
index cb9694863abdef58c81549b88cb7a2263a85dc1d..0f43553ac6d87e9ce20275505183804a545712ca 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.49 1999/11/30 03:46:46 gram Exp $
+ * $Id: packet-smb.c,v 1.76 2000/12/17 03:48:44 sharpe 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,22 +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 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;
@@ -186,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",
@@ -451,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); 
 
   }
@@ -462,18 +699,24 @@ dissect_unknown_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *pa
  * Dissect a UNIX like date ...
  */
 
-struct tm *gtime;
+struct tm *_gtime; /* Add leading underscore ("_") to prevent symbol
+                      conflict with /usr/include/time.h on some NetBSD
+                      systems */
 
 static char *
 dissect_smbu_date(guint16 date, guint16 time)
 
 {
-  static char         datebuf[4+2+2+2+1];
+  static char         datebuf[4+2+2+2+1+10];
   time_t              ltime = (date << 16) + time;
 
-  gtime = gmtime(&ltime);
-  sprintf(datebuf, "%04d-%02d-%02d",
-         1900 + (gtime -> tm_year), gtime -> tm_mon, gtime -> tm_mday);
+  _gtime = gmtime(&ltime);
+
+  if (_gtime)
+    sprintf(datebuf, "%04d-%02d-%02d",
+           1900 + (_gtime -> tm_year), 1 + (_gtime -> tm_mon), _gtime -> tm_mday);
+  else 
+    sprintf(datebuf, "Bad date format");
 
   return datebuf;
 
@@ -486,10 +729,13 @@ static char *
 dissect_smbu_time(guint16 date, guint16 time)
 
 {
-  static char timebuf[2+2+2+2+1];
+  static char timebuf[2+2+2+2+1+10];
 
-  sprintf(timebuf, "%02d:%02d:%02d",
-          gtime -> tm_hour, gtime -> tm_min, gtime -> tm_sec);
+  if (_gtime)
+    sprintf(timebuf, "%02d:%02d:%02d",
+           _gtime -> tm_hour, _gtime -> tm_min, _gtime -> tm_sec);
+  else
+    sprintf(timebuf, "Bad time format");
 
   return timebuf;
 
@@ -586,7 +832,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);
 
     }
 
@@ -598,7 +844,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);
 
     }
 
@@ -610,7 +856,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);
 
     }
 
@@ -626,7 +872,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);
 
     }
 
@@ -638,7 +884,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);
 
     }
 
@@ -668,7 +914,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);
 
     }
 
@@ -680,7 +926,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);
 
     }
 
@@ -696,7 +942,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);
 
     }
 
@@ -710,7 +956,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);
 
       }
 
@@ -722,7 +968,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);
 
       }
 
@@ -734,7 +980,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);
 
       }
 
@@ -746,7 +992,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);
 
       }
 
@@ -758,7 +1004,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);
 
       }
 
@@ -772,7 +1018,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);
 
     }
 
@@ -809,7 +1055,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);
 
     }
 
@@ -823,19 +1069,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"));
        
       }
@@ -848,7 +1094,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));
 
       }
 
@@ -860,7 +1106,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));
 
       }
 
@@ -872,7 +1118,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);
 
       }
 
@@ -884,7 +1130,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);
 
       }
 
@@ -896,7 +1142,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);
 
       }
 
@@ -908,7 +1154,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);
 
       }
 
@@ -920,7 +1166,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);
 
       }
 
@@ -934,7 +1180,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);
 
     }
 
@@ -946,7 +1192,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);
 
     }
 
@@ -958,7 +1204,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);
 
     }
 
@@ -974,7 +1220,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);
 
     }
 
@@ -986,7 +1232,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);
 
     }
 
@@ -1017,7 +1263,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);
 
     }
 
@@ -1029,7 +1275,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);
 
     }
 
@@ -1041,7 +1287,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);
 
     }
 
@@ -1053,7 +1299,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);
 
     }
 
@@ -1065,7 +1311,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);
 
     }
 
@@ -1077,7 +1323,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);
 
     }
 
@@ -1089,7 +1335,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);
 
     }
 
@@ -1101,12 +1347,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 */
@@ -1117,7 +1372,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);
 
     }
 
@@ -1129,7 +1384,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);
 
     }
 
@@ -1141,7 +1396,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);
 
     }
 
@@ -1178,7 +1433,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);
 
     }
 
@@ -1190,7 +1445,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);
 
     }
 
@@ -1202,7 +1457,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);
 
     }
 
@@ -1214,7 +1469,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);
 
     }
 
@@ -1226,7 +1481,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);
 
     }
 
@@ -1238,7 +1493,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);
 
     }
 
@@ -1250,7 +1505,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);
 
     }
 
@@ -1262,7 +1517,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);
 
     }
 
@@ -1278,7 +1533,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);
 
     }
 
@@ -1292,7 +1547,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);
 
       }
 
@@ -1304,7 +1559,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);
 
       }
 
@@ -1316,7 +1571,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);
 
       }
 
@@ -1328,7 +1583,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);
 
       }
 
@@ -1340,7 +1595,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);
 
       }
 
@@ -1352,7 +1607,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);
 
       }
 
@@ -1364,7 +1619,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);
 
       }
 
@@ -1378,7 +1633,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);
 
     }
 
@@ -1390,7 +1645,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);
 
     }
 
@@ -1406,6 +1661,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;
 
@@ -1417,19 +1673,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);
 
     }
 
@@ -1441,7 +1708,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);
 
     }
 
@@ -1453,7 +1720,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);
 
     }
 
@@ -1469,7 +1736,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);
 
     }
 
@@ -1481,7 +1748,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);
 
     }
 
@@ -1518,7 +1785,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);
 
     }
 
@@ -1530,7 +1797,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);
 
     }
 
@@ -1542,7 +1809,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);
 
     }
 
@@ -1558,7 +1825,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);
 
     }
 
@@ -1572,7 +1839,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));
 
       }
 
@@ -1584,7 +1851,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));
 
       }
 
@@ -1596,7 +1863,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));
 
       }
 
@@ -1608,7 +1875,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));
 
       }
 
@@ -1620,7 +1887,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));
 
       }
 
@@ -1632,7 +1899,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));
 
       }
 
@@ -1644,7 +1911,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);
 
       }
 
@@ -1656,7 +1923,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);
 
       }
 
@@ -1668,19 +1935,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"));
     
       }
@@ -1695,7 +1962,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);
 
     }
 
@@ -1728,7 +1995,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);
 
     }
 
@@ -1740,7 +2007,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);
 
     }
 
@@ -1752,7 +2019,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);
 
     }
 
@@ -1764,7 +2031,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);
 
     }
 
@@ -1776,7 +2043,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);
 
     }
 
@@ -1788,7 +2055,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);
 
     }
 
@@ -1800,7 +2067,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);
 
     }
 
@@ -1812,7 +2079,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);
 
     }
 
@@ -1828,7 +2095,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);
 
     }
 
@@ -1842,7 +2109,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);
 
     }
 
@@ -1854,7 +2121,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);
 
     }
 
@@ -1866,7 +2133,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);
 
     }
 
@@ -1921,7 +2188,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);
 
       }
 
@@ -1933,7 +2200,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)));
 
       }
@@ -1946,7 +2213,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);
 
       }
 
@@ -1958,7 +2225,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);
 
       }
 
@@ -1970,7 +2237,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);
 
       }
 
@@ -1982,7 +2249,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);
 
       }
 
@@ -1994,7 +2261,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);
 
       }
 
@@ -2006,7 +2273,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);
 
       }
 
@@ -2018,7 +2285,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);
 
       }
 
@@ -2030,7 +2297,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);
 
       }
 
@@ -2042,7 +2309,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);
 
       }
 
@@ -2056,7 +2323,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);
 
        }
 
@@ -2068,7 +2335,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);
 
        }
 
@@ -2080,7 +2347,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);
 
        }
 
@@ -2092,7 +2359,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);
 
        }
 
@@ -2104,7 +2371,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);
 
        }
 
@@ -2122,7 +2389,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);
 
       }
 
@@ -2134,7 +2401,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)));
 
       }
@@ -2147,7 +2414,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);
 
       }
 
@@ -2159,7 +2426,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);
 
       }
 
@@ -2171,7 +2438,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);
 
       }
 
@@ -2183,7 +2450,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);
 
       }
 
@@ -2195,7 +2462,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);
 
       }
 
@@ -2207,7 +2474,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);
 
       }
 
@@ -2219,7 +2486,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);
 
       }
 
@@ -2231,7 +2498,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);
 
       }
 
@@ -2243,7 +2510,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);
 
       }
 
@@ -2255,35 +2522,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"));
       
 }
@@ -2296,7 +2563,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);
 
       }
 
@@ -2304,18 +2571,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, strlen(ANSIPassword) + 1, "ANSI Password: %s", ANSIPassword);
+             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 */
 
@@ -2325,11 +2594,11 @@ dissect_ssetup_andx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree
 
          if (tree) {
 
-           proto_tree_add_text(tree, offset, strlen(UNICODEPassword) + 1, "UNICODE Password: %s", UNICODEPassword);
+           proto_tree_add_text(tree, NullTVB, offset, UNICODEAccountPasswordLength, "UNICODE Password: %s", format_text(UNICODEPassword, UNICODEAccountPasswordLength));
 
          }
 
-         offset += strlen(UNICODEPassword) + 1; /* Skip UNICODE Password */
+         offset += UNICODEAccountPasswordLength; /* Skip UNICODE Password */
 
        }
 
@@ -2339,7 +2608,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);
 
        }
 
@@ -2351,7 +2620,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);
 
        }
 
@@ -2363,7 +2632,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);
 
        }
 
@@ -2375,7 +2644,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);
 
        }
 
@@ -2404,7 +2673,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);
 
     }
 
@@ -2418,7 +2687,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)));
 
       }
@@ -2431,7 +2700,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);
 
       }
 
@@ -2443,7 +2712,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);
 
       }
 
@@ -2456,7 +2725,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);
 
       }
 
@@ -2470,7 +2739,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);
 
     }
 
@@ -2486,7 +2755,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);
 
       }
 
@@ -2498,7 +2767,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);
 
       }
 
@@ -2510,7 +2779,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);
 
       }
 
@@ -2549,9 +2818,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;
 
@@ -2561,7 +2830,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);
 
   }
 
@@ -2573,11 +2842,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]);
 
     }
 
@@ -2587,7 +2856,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);
 
     }
 
@@ -2603,7 +2872,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);
 
     }
 
@@ -2615,9 +2884,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"));
@@ -2630,7 +2899,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);
 
     }
 
@@ -2640,7 +2909,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);
 
     }
 
@@ -2650,7 +2919,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));
 
     }
 
@@ -2660,7 +2929,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);
 
     }
 
@@ -2670,7 +2939,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);
 
     }
 
@@ -2682,7 +2951,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);
 
     }
 
@@ -2692,7 +2961,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);
 
     }
@@ -2707,7 +2976,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);
 
     }
@@ -2718,7 +2987,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);
 
     }
 
@@ -2728,7 +2997,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);
 
     }
 
@@ -2738,7 +3007,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);
 
     }
 
@@ -2776,9 +3045,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;
     }
@@ -2786,7 +3055,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);
 
   }
 
@@ -2804,7 +3073,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);
 
     }
 
@@ -2812,7 +3081,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);
 
     }
@@ -2822,7 +3091,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]);
 
       }
 
@@ -2832,7 +3101,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);
 
       }
 
@@ -2849,12 +3118,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);
 
       }
 
@@ -2866,7 +3135,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);
 
     }
 
@@ -2876,7 +3145,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));
 
     }
 
@@ -2888,13 +3157,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"));
@@ -2905,7 +3174,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));
 
     }
 
@@ -2913,7 +3182,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));
 
     }
     
@@ -2921,7 +3190,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));
 
     }
 
@@ -2931,13 +3200,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"));
@@ -2948,7 +3217,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));
 
     }
 
@@ -2958,9 +3227,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)));
 
     }
@@ -2971,7 +3240,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));
 
     }
@@ -2984,7 +3253,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);
 
     }
 
@@ -2992,7 +3261,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));
 
     }
 
@@ -3002,7 +3271,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);
 
     }
 
@@ -3014,7 +3283,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));
       }
 
@@ -3028,7 +3297,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);
 
     }
 
@@ -3038,7 +3307,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));
 
     }
 
@@ -3048,21 +3317,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"));
@@ -3073,7 +3342,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));
 
     }
     
@@ -3081,7 +3350,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));
 
     }
 
@@ -3089,7 +3358,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));
 
     }
 
@@ -3097,7 +3366,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));
 
     }
 
@@ -3105,7 +3374,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));
 
     }
 
@@ -3115,61 +3384,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"));
@@ -3181,8 +3450,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)); 
 
     }
 
@@ -3192,7 +3461,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));
 
     }
@@ -3205,7 +3474,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);
 
     }
 
@@ -3215,7 +3484,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);
 
     }
 
@@ -3229,7 +3498,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));
 
       }
@@ -3248,9 +3517,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);
       }
 
     }
@@ -3260,7 +3529,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;
 
   }
@@ -3284,7 +3553,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);
 
     }
 
@@ -3296,7 +3565,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);
 
     }
 
@@ -3308,7 +3577,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);
 
     }
 
@@ -3320,7 +3589,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);
 
     }
 
@@ -3336,7 +3605,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);
 
     }
 
@@ -3348,7 +3617,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);
 
     }
 
@@ -3375,7 +3644,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);
 
     }
 
@@ -3387,7 +3656,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);
 
     }
 
@@ -3399,7 +3668,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);
 
     }
 
@@ -3411,7 +3680,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);
 
     }
 
@@ -3427,7 +3696,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);
 
     }
 
@@ -3439,7 +3708,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);
 
     }
 
@@ -3449,6 +3718,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)
 
@@ -3466,7 +3736,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);
 
     }
 
@@ -3478,7 +3748,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);
 
     }
 
@@ -3490,7 +3760,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);
 
     }
 
@@ -3502,7 +3772,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);
 
     }
 
@@ -3518,7 +3788,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);
 
     }
 
@@ -3530,7 +3800,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);
 
     }
 
@@ -3651,7 +3921,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);
 
     }
 
@@ -3663,7 +3933,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)));
 
     }
@@ -3676,7 +3946,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);
 
     }
 
@@ -3688,7 +3958,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);
 
     }
 
@@ -3700,13 +3970,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"));
     
 }
@@ -3719,17 +3989,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"));
     
 }
@@ -3742,19 +4012,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"));
     
 }
@@ -3767,19 +4037,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"));
     
 }
@@ -3803,8 +4073,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));
 
     }
 
@@ -3816,11 +4086,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"));
     
 }
@@ -3833,7 +4103,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);
 
     }
 
@@ -3845,7 +4115,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);
 
     }
 
@@ -3857,7 +4127,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);
 
     }
 
@@ -3869,7 +4139,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);
 
     }
 
@@ -3881,7 +4151,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);
 
     }
 
@@ -3904,7 +4174,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);
 
     }
 
@@ -3918,7 +4188,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)));
 
       }
@@ -3931,7 +4201,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);
 
       }
 
@@ -3943,7 +4213,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);
 
       }
 
@@ -3955,7 +4225,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);
 
       }
 
@@ -3967,19 +4237,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"));
     
       }
@@ -4002,8 +4272,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));
 
 
       }
@@ -4016,7 +4286,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);
 
       }
 
@@ -4028,7 +4298,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);
 
       }
 
@@ -4040,9 +4310,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"));
     
       }
@@ -4055,7 +4325,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);
 
       }
 
@@ -4067,11 +4337,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"));
        
       }
@@ -4084,7 +4354,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);
 
       }
 
@@ -4096,7 +4366,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);
 
       }
 
@@ -4110,7 +4380,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);
 
     }
 
@@ -4161,7 +4431,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);
 
       }
 
@@ -4173,7 +4443,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);
 
       }
 
@@ -4185,7 +4455,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);
 
       }
 
@@ -4197,7 +4467,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);
 
       }
 
@@ -4209,7 +4479,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);
 
       }
 
@@ -4221,7 +4491,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);
 
       }
 
@@ -4233,11 +4503,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)"));
       
 }
@@ -4250,7 +4520,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);
 
       }
 
@@ -4262,7 +4532,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);
 
       }
 
@@ -4274,7 +4544,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);
 
       }
 
@@ -4286,7 +4556,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);
 
       }
 
@@ -4298,7 +4568,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);
 
       }
 
@@ -4314,7 +4584,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);
 
       }
 
@@ -4326,7 +4596,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);
 
       }
 
@@ -4338,7 +4608,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);
 
       }
 
@@ -4350,7 +4620,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);
 
       }
 
@@ -4362,7 +4632,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);
 
       }
 
@@ -4374,11 +4644,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)"));
       
 }
@@ -4391,7 +4661,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);
 
       }
 
@@ -4403,7 +4673,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);
 
       }
 
@@ -4415,7 +4685,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);
 
       }
 
@@ -4427,7 +4697,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);
 
       }
 
@@ -4439,7 +4709,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);
 
       }
 
@@ -4459,7 +4729,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);
 
     }
 
@@ -4473,7 +4743,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);
 
       }
 
@@ -4487,7 +4757,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);
 
     }
 
@@ -4512,7 +4782,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);
 
     }
 
@@ -4524,7 +4794,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);
 
     }
 
@@ -4540,7 +4810,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);
 
     }
 
@@ -4552,7 +4822,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);
 
     }
 
@@ -4593,7 +4863,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);
 
     }
 
@@ -4605,7 +4875,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);
 
     }
 
@@ -4617,7 +4887,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);
 
     }
 
@@ -4629,9 +4899,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"));
     
 }
@@ -4648,7 +4918,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);
 
     }
 
@@ -4662,7 +4932,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);
 
       }
 
@@ -4676,7 +4946,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);
 
     }
 
@@ -4688,7 +4958,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);
 
     }
 
@@ -4700,7 +4970,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);
 
     }
 
@@ -4730,7 +5000,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);
 
     }
 
@@ -4742,7 +5012,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);
 
     }
 
@@ -4754,7 +5024,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);
 
     }
 
@@ -4766,7 +5036,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);
 
     }
 
@@ -4778,7 +5048,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);
 
     }
 
@@ -4790,7 +5060,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);
 
     }
 
@@ -4802,7 +5072,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);
 
     }
 
@@ -4818,7 +5088,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);
 
     }
 
@@ -4830,7 +5100,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);
 
     }
 
@@ -4867,7 +5137,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);
 
     }
 
@@ -4879,7 +5149,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);
 
     }
 
@@ -4891,9 +5161,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"));
     
 }
@@ -4906,7 +5176,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);
 
     }
 
@@ -4918,7 +5188,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);
 
     }
 
@@ -4930,7 +5200,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);
 
     }
 
@@ -4946,7 +5216,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);
 
     }
 
@@ -4958,7 +5228,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);
 
     }
 
@@ -4970,7 +5240,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);
 
     }
 
@@ -4996,7 +5266,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);
 
     }
 
@@ -5008,7 +5278,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);
 
     }
 
@@ -5020,7 +5290,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);
 
     }
 
@@ -5036,7 +5306,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);
 
     }
 
@@ -5048,7 +5318,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);
 
     }
 
@@ -5086,7 +5356,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);
 
       }
 
@@ -5098,7 +5368,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);
 
       }
 
@@ -5110,7 +5380,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);
 
       }
 
@@ -5122,7 +5392,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);
 
       }
 
@@ -5134,7 +5404,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);
 
       }
 
@@ -5146,7 +5416,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);
 
       }
 
@@ -5158,7 +5428,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);
 
       }
 
@@ -5170,7 +5440,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);
 
       }
 
@@ -5186,7 +5456,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);
 
       }
 
@@ -5198,7 +5468,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);
 
       }
 
@@ -5210,7 +5480,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);
 
       }
 
@@ -5222,7 +5492,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);
 
       }
 
@@ -5234,7 +5504,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);
 
       }
 
@@ -5246,7 +5516,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);
 
       }
 
@@ -5258,7 +5528,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);
 
       }
 
@@ -5270,7 +5540,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);
 
       }
 
@@ -5282,7 +5552,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);
 
       }
 
@@ -5301,7 +5571,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;
@@ -5309,6 +5579,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 */
 
@@ -5318,7 +5599,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);
 
     }
 
@@ -5330,7 +5611,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);
 
     }
 
@@ -5342,7 +5623,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);
 
     }
 
@@ -5354,82 +5635,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 */
 
+    Offset = GWORD(pd, offset);
 
-    if (AndXCommand != 0xFF) {
+    if (tree) {
 
-      (dissect[AndXCommand])(pd, SMB_offset + AndXOffset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn);
+      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) */
 
@@ -5437,7 +5734,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);
 
     }
 
@@ -5452,27 +5749,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) */
 
@@ -5480,90 +5757,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) */
 
@@ -5571,28 +5879,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 */
 
@@ -5602,123 +5925,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) */
 
@@ -5726,43 +6044,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 */
 
@@ -5770,111 +6099,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) */
 
@@ -5882,7 +6178,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);
 
     }
 
@@ -5893,13 +6189,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 */
@@ -5910,7 +6209,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);
 
     }
 
@@ -5922,7 +6221,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);
 
     }
 
@@ -5930,15 +6229,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 */
 
@@ -5946,24 +6245,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 */
@@ -5974,19 +6309,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);
 
     }
 
@@ -5997,16 +6344,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 */
@@ -6017,123 +6365,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);
 
     }
 
@@ -6170,7 +6777,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);
 
     }
 
@@ -6182,7 +6789,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);
 
     }
 
@@ -6194,7 +6801,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);
 
     }
 
@@ -6206,7 +6813,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);
 
     }
 
@@ -6218,7 +6825,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);
 
     }
 
@@ -6230,17 +6837,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"));
     
 }
@@ -6253,7 +6860,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);
 
     }
 
@@ -6265,7 +6872,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);
 
     }
 
@@ -6277,7 +6884,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);
 
     }
 
@@ -6289,7 +6896,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);
 
     }
 
@@ -6301,7 +6908,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);
 
     }
 
@@ -6324,7 +6931,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);
 
     }
 
@@ -6338,7 +6945,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)));
 
       }
@@ -6351,7 +6958,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);
 
       }
 
@@ -6363,7 +6970,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);
 
       }
 
@@ -6377,7 +6984,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);
 
     }
 
@@ -6412,7 +7019,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);
 
     }
 
@@ -6424,7 +7031,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);
 
     }
 
@@ -6436,7 +7043,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);
 
     }
 
@@ -6448,7 +7055,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);
 
     }
 
@@ -6460,7 +7067,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);
 
     }
 
@@ -6476,7 +7083,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);
 
     }
 
@@ -6488,7 +7095,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);
 
     }
 
@@ -6520,7 +7127,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);
 
     }
 
@@ -6532,19 +7139,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"));
     
 }
@@ -6557,7 +7164,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));
 
     }
 
@@ -6569,7 +7176,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);
 
     }
 
@@ -6581,7 +7188,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);
 
     }
 
@@ -6593,7 +7200,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);
 
     }
 
@@ -6609,7 +7216,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);
 
     }
 
@@ -6623,7 +7230,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);
 
       }
 
@@ -6637,7 +7244,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);
 
     }
 
@@ -6671,7 +7278,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);
 
     }
 
@@ -6683,7 +7290,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);
 
     }
 
@@ -6695,7 +7302,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);
 
     }
 
@@ -6707,7 +7314,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);
 
     }
 
@@ -6719,7 +7326,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);
 
     }
 
@@ -6731,7 +7338,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);
 
     }
 
@@ -6743,7 +7350,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);
 
     }
 
@@ -6755,7 +7362,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);
 
     }
 
@@ -6771,7 +7378,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);
 
     }
 
@@ -6785,7 +7392,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);
 
       }
 
@@ -6799,7 +7406,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);
 
     }
 
@@ -6811,7 +7418,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);
 
     }
 
@@ -6823,7 +7430,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);
 
     }
 
@@ -6855,7 +7462,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);
 
     }
 
@@ -6867,7 +7474,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);
 
     }
 
@@ -6879,7 +7486,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));
 
     }
 
@@ -6891,7 +7498,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));
 
     }
 
@@ -6903,7 +7510,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);
 
     }
 
@@ -6915,7 +7522,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);
 
     }
 
@@ -6927,7 +7534,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);
 
     }
 
@@ -6943,7 +7550,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);
 
     }
 
@@ -6957,7 +7564,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);
 
       }
 
@@ -6971,7 +7578,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);
 
     }
 
@@ -6983,7 +7590,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);
 
     }
 
@@ -6995,7 +7602,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);
 
     }
 
@@ -7023,7 +7630,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);
 
     }
 
@@ -7035,7 +7642,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);
 
     }
 
@@ -7047,7 +7654,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));
 
     }
 
@@ -7059,7 +7666,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));
 
     }
 
@@ -7071,7 +7678,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);
 
     }
 
@@ -7087,7 +7694,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);
 
     }
 
@@ -7099,7 +7706,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);
 
     }
 
@@ -7127,7 +7734,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);
 
     }
 
@@ -7139,7 +7746,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);
 
     }
 
@@ -7151,7 +7758,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);
 
     }
 
@@ -7163,7 +7770,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);
 
     }
 
@@ -7175,7 +7782,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);
 
     }
 
@@ -7191,7 +7798,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);
 
     }
 
@@ -7203,7 +7810,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);
 
     }
 
@@ -7238,7 +7845,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);
 
     }
 
@@ -7250,7 +7857,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);
 
     }
 
@@ -7262,7 +7869,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);
 
     }
 
@@ -7274,7 +7881,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);
 
     }
 
@@ -7286,7 +7893,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);
 
     }
 
@@ -7298,7 +7905,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);
 
     }
 
@@ -7314,7 +7921,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);
 
     }
 
@@ -7328,7 +7935,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);
 
       }
 
@@ -7340,7 +7947,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);
 
       }
 
@@ -7352,7 +7959,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);
 
       }
 
@@ -7364,7 +7971,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);
 
       }
 
@@ -7376,7 +7983,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);
 
       }
 
@@ -7388,7 +7995,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);
 
       }
 
@@ -7402,7 +8009,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);
 
     }
 
@@ -7414,7 +8021,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);
 
     }
 
@@ -7439,7 +8046,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);
 
     }
 
@@ -7451,7 +8058,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);
 
     }
 
@@ -7467,7 +8074,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);
 
     }
 
@@ -7479,7 +8086,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);
 
     }
 
@@ -7517,7 +8124,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);
 
     }
 
@@ -7529,7 +8136,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);
 
     }
 
@@ -7541,7 +8148,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);
 
     }
 
@@ -7553,7 +8160,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);
 
     }
 
@@ -7569,7 +8176,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);
 
     }
 
@@ -7583,19 +8190,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"));
        
       }
@@ -7618,9 +8225,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, 2, "Last Write Time: %s", dissect_smbu_time(LastWriteDate, LastWriteTime));
 
       }
 
@@ -7632,7 +8239,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);
 
       }
 
@@ -7644,7 +8251,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);
 
       }
 
@@ -7656,7 +8263,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);
 
       }
 
@@ -7668,7 +8275,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);
 
       }
 
@@ -7680,7 +8287,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);
 
       }
 
@@ -7692,7 +8299,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);
 
       }
 
@@ -7706,7 +8313,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);
 
     }
 
@@ -7741,7 +8348,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);
 
     }
 
@@ -7753,7 +8360,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);
 
     }
 
@@ -7765,7 +8372,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);
 
     }
 
@@ -7777,7 +8384,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);
 
     }
 
@@ -7789,7 +8396,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);
 
     }
 
@@ -7801,7 +8408,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);
 
     }
 
@@ -7817,7 +8424,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);
 
     }
 
@@ -7831,7 +8438,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);
 
       }
 
@@ -7843,7 +8450,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);
 
       }
 
@@ -7855,7 +8462,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);
 
       }
 
@@ -7867,7 +8474,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);
 
       }
 
@@ -7879,7 +8486,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);
 
       }
 
@@ -7893,7 +8500,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);
 
     }
 
@@ -7905,7 +8512,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);
 
     }
 
@@ -7917,7 +8524,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);
 
     }
 
@@ -7954,7 +8561,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);
 
     }
 
@@ -7966,7 +8573,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);
 
     }
 
@@ -7978,7 +8585,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);
 
     }
 
@@ -7990,7 +8597,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);
 
     }
 
@@ -8002,7 +8609,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);
 
     }
 
@@ -8014,13 +8621,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"));
     
 }
@@ -8033,7 +8640,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);
 
     }
 
@@ -8045,7 +8652,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);
 
     }
 
@@ -8057,7 +8664,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);
 
     }
 
@@ -8069,7 +8676,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);
 
     }
 
@@ -8081,7 +8688,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);
 
     }
 
@@ -8097,7 +8704,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);
 
     }
 
@@ -8111,7 +8718,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);
 
       }
 
@@ -8123,7 +8730,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);
 
       }
 
@@ -8151,7 +8758,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);
 
     }
 
@@ -8163,7 +8770,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);
 
     }
 
@@ -8175,7 +8782,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);
 
     }
 
@@ -8191,7 +8798,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);
 
     }
 
@@ -8203,7 +8810,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);
 
     }
 
@@ -8218,6 +8825,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",
@@ -8245,9 +8853,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);
-
-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)
@@ -8259,8 +8864,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;
@@ -8296,11 +8899,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 */
@@ -8343,7 +8946,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);
 
     }
 
@@ -8355,7 +8958,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);
 
     }
 
@@ -8367,7 +8970,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);
 
     }
 
@@ -8379,7 +8982,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);
 
     }
 
@@ -8391,7 +8994,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);
 
     }
 
@@ -8403,7 +9006,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);
 
     }
 
@@ -8415,7 +9018,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);
 
     }
 
@@ -8427,11 +9030,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"));
     
 }
@@ -8444,7 +9047,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);
 
     }
 
@@ -8456,7 +9059,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);
 
     }
 
@@ -8468,7 +9071,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);
 
     }
 
@@ -8480,7 +9083,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);
 
     }
 
@@ -8492,7 +9095,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);
 
     }
 
@@ -8504,7 +9107,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);
 
     }
 
@@ -8516,7 +9119,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);
 
     }
 
@@ -8528,7 +9131,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);
 
     }
 
@@ -8557,7 +9160,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);
 
        }
 
@@ -8573,7 +9176,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);
 
     }
 
@@ -8583,23 +9186,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 */
 
     }
 
@@ -8609,7 +9211,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));
 
       }
 
@@ -8617,19 +9219,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 */
 
     }
 
@@ -8641,7 +9243,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));
 
       }
 
@@ -8666,7 +9268,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);
 
     }
 
@@ -8678,7 +9280,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);
 
     }
 
@@ -8690,7 +9292,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);
 
     }
 
@@ -8702,7 +9304,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);
 
     }
 
@@ -8714,7 +9316,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);
 
     }
 
@@ -8726,7 +9328,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);
 
     }
 
@@ -8738,7 +9340,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);
 
     }
 
@@ -8750,7 +9352,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);
 
     }
 
@@ -8762,7 +9364,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);
 
     }
 
@@ -8774,7 +9376,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);
 
     }
 
@@ -8786,7 +9388,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);
 
     }
 
@@ -8798,23 +9400,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);
 
-      proto_tree_add_text(tree, offset, 2, "Setup: %u", Setup);
+      for (i = 1; i <= SetupCount; i++) {
+       
+       Setup = GSHORT(pd, offset);
 
-    }
+       if (tree) {
+
+         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) */
 
@@ -8822,31 +9433,34 @@ 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 */
+
+      if (tree) {
+
+       proto_tree_add_text(tree, NullTVB, offset, pad1Count, "Pad1: %s", format_text(pd + offset, pad1Count));
+      }
 
-      proto_tree_add_text(tree, offset, 1, "Pad1: %u", Pad1);
+      offset += pad1Count; /* Skip Pad1 */
 
     }
 
-    offset += 1; /* Skip Pad1 */
-
     /* Build display for: Parameter */
 
     if (ParameterCount > 0) {
 
       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));
 
       }
 
@@ -8854,17 +9468,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 += 1; /* Skip Pad2 */
+      offset += pad2Count; /* Skip Pad2 */
+
+    }
 
     /* Build display for: Data */
 
@@ -8872,7 +9490,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));
 
       }
 
@@ -8884,195 +9502,26 @@ dissect_transact2_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
 }
 
-char *p_desc = NULL, *d_desc = NULL, *data = NULL, *params = NULL;
-int p_count, d_count, p_offset, d_offset, d_current = 0, p_current = 0;
-int pd_p_current = 0, pd_d_current = 0, in_params = 0, need_data = 0;
-
-/* Initialize the various data structure */
-void 
-dissect_transact_engine_init(const u_char *pd, const char *param_desc, const char *data_desc, 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;
-  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_byte_count(const u_char *pd)
-
-{
-  int count = 0;
-
-  while (pd[pd_p_current] && isdigit(pd[pd_p_current]))
-    count += (int)pd[pd_p_current++] - (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(u_char *pd, char *Name, int dirn, proto_tree *tree)
-{
-  /*  guint8        BParam; */
-  guint16       WParam = 0;
-  guint32       LParam;
-  const char    /**Bytes,*/ *AsciiZ;
-  int           bc;
-
-  while (1) {
-    switch (in_params) {
-
-    case 0:   /* We are in the params area ... */
-
-      switch (params[p_offset++]) {
-
-      case 'r':
-
-       break;   /* Do nothing about the above */
-
-      case 'W':  /* Word Parameter */
-
-       /* Insert a word param */
-
-       WParam = GSHORT(pd, pd_p_current);
-
-       proto_tree_add_text(tree, pd_p_current, 2, "Word Param: %u", WParam);
-
-       pd_p_current += 2;
-
-       break;
-
-      case 'D':  /* Double Word parameter */
-
-       LParam = GWORD(pd, pd_p_current);
-
-       proto_tree_add_text(tree, pd_p_current, 4, "DWord Param: %u", LParam);
-
-       pd_p_current += 2;
-
-
-       break;
-
-      case 'b':  /* A byte or series of bytes */
-
-       bc = get_byte_count(pd + pd_p_current);  /* This is not clean */
-
-       /*Bytes = g_malloc(bc + 1); / * Is this needed ? */
-
-       proto_tree_add_text(tree, pd_p_current, bc, "B%u: %s", format_text(pd + pd_p_current, (bc) ? bc : 1));
-
-       pd_p_current += (bc) ? bc : 1;
-
-       break;
-
-      case 'O': /* A null pointer */
-
-       proto_tree_add_text(tree, pd_p_current, 0, "Null Pointer");
-
-       break;
-
-      case 'z': /* An AsciiZ string */
-
-       AsciiZ = pd + pd_p_current;
-
-       proto_tree_add_text(tree, pd_p_current, strlen(AsciiZ) + 1, "AsciiZ: %s", AsciiZ);
-
-       pd_p_current += strlen(AsciiZ) + 1;
-
-       break;
-
-      case 'F': /* One or more pad bytes */
-
-       bc = get_byte_count(pd);
-
-       proto_tree_add_text(tree, pd_p_current, bc, "Pad%u: %s", format_text(pd + pd_p_current, bc));
-
-       pd_p_current += bc;
-
-       break;
-
-      case 'L': /* Receive buffer len: Short */
-
-       WParam = GSHORT(pd, pd_p_current);
-
-       proto_tree_add_text(tree, pd_p_current, 2, "Word: %u", WParam);
-
-       pd_p_current += 2;
-
-       break;
-
-      case 's': /* Send buf ... */
-
-       need_data = 1;
-
-       break;
-
-      case 'T':
-
-       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;
 
-  TransactNameCopy = g_malloc(strlen(TransactName) + 1);
+  if (!TransactName)
+         return;
+
+  TransactNameCopy = g_malloc(TransactName ? strlen(TransactName) + 1 : 1);
 
   /* Should check for error here ... */
 
-  strcpy(TransactNameCopy, TransactName);
+  strcpy(TransactNameCopy, TransactName ? TransactName : "");
   if (TransactNameCopy[0] == '\\') {
     trans_type = TransactNameCopy + 1;  /* Skip the slash */
-    loc_of_slash = strchr(trans_type, '\\');
+    loc_of_slash = trans_type ? strchr(trans_type, '\\') : NULL;
   }
 
   if (loc_of_slash) {
@@ -9084,9 +9533,9 @@ dissect_transact_params(const u_char *pd, int offset, frame_data *fd, proto_tree
     trans_cmd = NULL;
 
   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)) &&
-      ((strcmp(trans_type, "PIPE") != 0) ||
+      (((trans_type == NULL || strcmp(trans_type, "MAILSLOT") != 0) ||
+       !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)) &&
+      ((trans_type == NULL || 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)))) {
     
     if (ParameterCount > 0) {
@@ -9095,7 +9544,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));
          
       }
        
@@ -9103,19 +9552,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 */
 
     }
 
@@ -9127,7 +9576,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));
 
       }
 
@@ -9148,7 +9597,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;
@@ -9170,18 +9618,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);
 
   }
 
@@ -9221,7 +9672,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);
 
     }
 
@@ -9233,7 +9684,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);
 
     }
 
@@ -9245,7 +9696,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);
 
     }
 
@@ -9257,7 +9708,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);
 
     }
 
@@ -9269,7 +9720,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);
 
     }
 
@@ -9281,7 +9732,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);
 
     }
 
@@ -9293,7 +9744,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);
 
     }
 
@@ -9305,11 +9756,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"));
     
 }
@@ -9320,1480 +9771,419 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     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"));
-
-}
-
-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;
-
-  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:
-
-      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;
-
-      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 */
-
-      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;
-    
-    }
-  }
-  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;
-
-    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");
-
-      }
-
-      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, strlen(Share) + 1, "Share Name: %s", Share);
-
-       }
-
-       loc_offset += 13;
-
-       loc_offset += 1;  /* Skip the pad ... */
-
-       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);
-
-       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 (! BYTES_ARE_IN_FRAME(loc_offset, 26 * EntCount) ) {
-       return 1;
-      }
-
-      if (tree) {
-
-       ti = proto_tree_add_text(lanman_tree, loc_offset, 26 * EntCount, "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);
-
-      }
-
-      for (i = 1; i <= EntCount; 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) {
 
-       if (tree) {
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Timeout: %u", Timeout);
 
-         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);
+    }
 
+    offset += 4; /* Skip Timeout */
 
-       }
+    /* Build display for: Reserved2 */
 
-       if (tree) {
-         
-         proto_tree_add_text(server, loc_offset, strlen(Server) + 1, "Server Name: %s", Server);
+    Reserved2 = GSHORT(pd, offset);
 
-       }
+    if (tree) {
 
-       loc_offset += 16;
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved2: %u", Reserved2);
 
-       if (si.request_val -> last_level) { /* Print out the rest of the info */
+    }
 
-         ServerMajor = GBYTE(pd, loc_offset);
+    offset += 2; /* Skip Reserved2 */
 
-         if (tree) {
+    /* Build display for: Parameter Count */
 
-           proto_tree_add_text(server, loc_offset, 1, "Major Version: %u", ServerMajor);
+    ParameterCount = GSHORT(pd, offset);
 
-         }
+    if (tree) {
 
-         loc_offset += 1;
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Count: %u", ParameterCount);
 
-         ServerMinor = GBYTE(pd, loc_offset);
+    }
 
-         if (tree) {
+    offset += 2; /* Skip Parameter Count */
 
-           proto_tree_add_text(server, loc_offset, 1, "Minor Version: %u", ServerMinor);
+    /* Build display for: Parameter Offset */
 
-         }
+    ParameterOffset = GSHORT(pd, offset);
 
-         loc_offset += 1;
+    if (tree) {
 
-         ServerFlags = GWORD(pd, loc_offset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Offset: %u", ParameterOffset);
 
-         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);
+    offset += 2; /* Skip Parameter Offset */
 
-         }
+    /* Build display for: Data Count */
 
-         loc_offset += 4;
+    DataCount = GSHORT(pd, offset);
 
-         Comment = pd + SMB_offset + DataOffset + GWORD(pd, loc_offset);
+    if (tree) {
 
-         if (tree) {
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Count: %u", DataCount);
 
-           proto_tree_add_text(server, loc_offset, 4, "Server Comment: %s", Comment);
+    }
 
-         }
+    offset += 2; /* Skip Data Count */
 
-         loc_offset += 4;
+    /* Build display for: Data Offset */
 
-       }
+    DataOffset = GSHORT(pd, offset);
 
-      }
+    if (tree) {
 
-      return 1;
-      break;
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
     }
 
-  }
-
-  return 0;
-
-}
+    offset += 2; /* Skip Data 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)
-{
+    /* Build display for: Setup Count */
 
-  if (strcmp(command, "LANMAN") == 0) { /* Try to decode a LANMAN */
+    SetupCount = GBYTE(pd, offset);
 
-    return dissect_pipe_lanman(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, command, DataOffset, DataCount, ParameterOffset, ParameterCount);
+    if (tree) {
 
-  }
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Setup Count: %u", SetupCount);
 
-  return 0;
+    }
 
-}
+    offset += 1; /* Skip Setup 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 */
-};
+    /* Build display for: Reserved3 */
 
-#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"
-};
+    Reserved3 = GBYTE(pd, offset);
 
-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");
+    if (tree) {
 
-  /*
-   * Now, decode the browse request 
-   */
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Reserved3: %u", Reserved3);
+    }
 
-  OpCode = GBYTE(pd, loc_offset);
+    offset += 1; /* Skip Reserved3 */
+    SetupAreaOffset = offset;
 
-  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: Setup */
 
-    ti = proto_tree_add_item(parent, proto_browse, DataOffset, DataCount, NULL);
-    browse_tree = proto_item_add_subtree(ti, ett_browse);
+    if (SetupCount > 0) {
 
-    proto_tree_add_text(browse_tree, loc_offset, 1, "OpCode: %s", (OpCode > (sizeof(browse_commands)/sizeof(char *))) ? "Error, No Such Command" : browse_commands[OpCode]);
+      int i = SetupCount;
 
-  }
+      Setup = GSHORT(pd, offset);
 
-  loc_offset += 1;    /* Skip the OpCode */
+      for (i = 1; i <= SetupCount; i++) {
+       
+       Setup = GSHORT(pd, offset);
 
-  switch (OpCode) {
+       if (tree) {
 
-  case DOMAINANNOUNCEMENT:
-  case LOCALMASTERANNOUNC:
-  case HOST_ANNOUNCE:
+         proto_tree_add_text(tree, NullTVB, offset, 2, "Setup%i: %u", i, Setup);
 
-    UpdateCount = GBYTE(pd, loc_offset);
+       }
 
-    if (tree) {
+       offset += 2; /* Skip Setup */
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Update Count: %u", UpdateCount);
+      }
 
     }
 
-    loc_offset += 1;  /* Skip the Update Count */
+    /* Build display for: Byte Count (BCC) */
 
-    Periodicity = GWORD(pd, loc_offset);
+    ByteCount = GSHORT(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, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
-    loc_offset += 4;
-
-    ServerName = pd + loc_offset;
+    offset += 2; /* Skip Byte Count (BCC) */
 
-    if (check_col(fd, COL_INFO)) {
+    /* Build display for: Transact Name */
 
-      col_append_fstr(fd, COL_INFO, " %s", ServerName);
+    /* Watch out for Unicode names */
 
-    }
+    if (si.unicode) {
 
-    if (tree) {
+      if (offset % 2) offset++;   /* Looks like a pad byte there sometimes */
 
-      proto_tree_add_text(browse_tree, loc_offset, 16, (OpCode == DOMAINANNOUNCEMENT) ? "Domain/WorkGroup: %s": "Host Name: %s", ServerName);
+      TransactName = unicode_to_str(pd + offset, &TNlen);
+      TNlen += 2;
 
     }
+    else { 
+      TransactName = pd + offset;
+      TNlen = strlen(TransactName) + 1;
+    }
 
-    loc_offset += 16;
-
-    VersionMajor = GBYTE(pd, loc_offset);
+    if (request_val -> last_transact_command) g_free(request_val -> last_transact_command);
 
-    if (tree) {
+    request_val -> last_transact_command = g_malloc(strlen(TransactName) + 1);
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Major Version: %u", VersionMajor);
+    if (request_val -> last_transact_command) 
+      strcpy(request_val -> last_transact_command, TransactName);
 
-    }
+    if (check_col(fd, COL_INFO)) {
 
-    loc_offset += 1;
+      col_add_fstr(fd, COL_INFO, "%s %s", TransactName, (dirn ? "Request" : "Response"));
 
-    VersionMinor = GBYTE(pd, loc_offset);
+    }
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Minor Version: %u", VersionMinor);
+      proto_tree_add_text(tree, NullTVB, offset, TNlen, "Transact Name: %s", TransactName);
 
     }
 
-    loc_offset += 1;
+    offset += TNlen; /* Skip Transact Name */
+    if (si.unicode) offset += 2;   /* There are two more extraneous bytes there*/
 
-    ServerType = GWORD(pd, loc_offset);
+    if (offset < (SMB_offset + ParameterOffset)) {
 
-    if (check_col(fd, COL_INFO)) {
+      int pad1Count = SMB_offset + ParameterOffset - offset;
 
-      /* Append the type(s) of the system to the COL_INFO line ... */
+      /* Build display for: Pad1 */
 
-      for (i = 1; i <= 32; i++) {
+      if (tree) {
 
-       if (ServerType & (1 << (i - 1)) && (strcmp("Unused", svr_types[i]) != 0))
-           col_append_fstr(fd, COL_INFO, ", %s", svr_types[i - 1]);
-       
+       proto_tree_add_text(tree, NullTVB, offset, pad1Count, "Pad1: %s", format_text(pd + offset, pad1Count));
       }
-      
-    }
 
-    if (tree) {
-
-      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);
+      offset += pad1Count; /* Skip Pad1 */
 
     }
 
-    loc_offset += 2;
+    /* Let's see if we can decode this */
 
-    SigConstant = GSHORT(pd, loc_offset);
+    dissect_transact_params(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, DataOffset, DataCount, ParameterOffset, ParameterCount, SetupAreaOffset, SetupCount, TransactName);
 
-    if (tree) {
+  }
+
+  if (dirn == 0) { /* Response(s) dissect code */
 
-      proto_tree_add_text(browse_tree, loc_offset, 2, "Signature: %u (0x%04X)", SigConstant, SigConstant);
+    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 += 2;
+    /* Build display for: Word Count (WCT) */
 
-    ServerComment = pd + loc_offset;
+    WordCount = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, strlen(ServerComment) + 1, "Host Comment: %s", ServerComment);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
-    break;
+    offset += 1; /* Skip Word Count (WCT) */
 
-  case REQUEST_ANNOUNCE:
+    /* Build display for: Total Parameter Count */
 
-    Flags = GBYTE(pd, loc_offset);
+    TotalParameterCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Unused Flags: %u", Flags);
+      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 */
 
-    ServerName = pd + loc_offset;
+    TotalDataCount = GSHORT(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, 2, "Total Data Count: %u", TotalDataCount);
 
     }
 
-    break;
+    offset += 2; /* Skip Total Data Count */
 
-  case BROWSER_ELECTION:
+    /* Build display for: Reserved2 */
 
-    ElectionVersion = GBYTE(pd, loc_offset);
+    Reserved2 = 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, "Reserved2: %u", Reserved2);
 
     }
 
-    loc_offset += 1;
-
-    ElectionCriteria = GWORD(pd, loc_offset);
-    ElectionOS       = GBYTE(pd, loc_offset + 3);
-    ElectionRevision = GSHORT(pd, loc_offset + 1);
-    ElectionDesire   = GBYTE(pd, loc_offset);
-
-    if (tree) {
-
-      ti = proto_tree_add_text(browse_tree, loc_offset, 4, "Election Criteria = %u (0x%08X)", ElectionCriteria, ElectionCriteria);
-
-      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 Reserved2 */
 
-      OSflags = proto_item_add_subtree(ti, ett_browse_election_os);
+    /* Build display for: Parameter Count */
 
-      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"));
+    ParameterCount = 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, "Parameter Count: %u", ParameterCount);
 
-      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 Parameter Count */
 
-      proto_tree_add_text(ec, loc_offset + 1, 2, "Election Revision: %u (0x%04X)", ElectionRevision, ElectionRevision);
+    /* Build display for: Parameter Offset */
 
-      ti = proto_tree_add_text(ec, loc_offset, 1, "Election Desire Summary: %u (0x%02X)", ElectionDesire, ElectionDesire);
+    ParameterOffset = 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 Offset: %u", ParameterOffset);
 
-      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 Offset */
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x10, 8, "Unknown", "Not used"));
+    /* Build display for: Parameter Displacement */
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x20, 8, "WINS Client", "Not WINS Client"));
+    ParameterDisplacement = 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 Displacement: %u", ParameterDisplacement);
 
     }
 
-    loc_offset += 4;
+    offset += 2; /* Skip Parameter Displacement */
+
+    /* Build display for: Data Count */
 
-    ServerUpTime = GWORD(pd, loc_offset);
+    DataCount = 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, "Data Count: %u", DataCount);
 
     }
 
-    loc_offset += 4;
-
-    MBZ = GWORD(pd, loc_offset);
+    offset += 2; /* Skip Data Count */
 
-    loc_offset += 4;
+    /* Build display for: Data Offset */
 
-    ServerName = pd + loc_offset;
+    DataOffset = 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 Offset: %u", DataOffset);
 
     }
 
-    break;
+    offset += 2; /* Skip Data Offset */
 
-  case GETBACKUPLISTREQ:
+    /* Build display for: Data Displacement */
 
-    BackupServerCount = GBYTE(pd, loc_offset);
+    DataDisplacement = 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 Displacement: %u", DataDisplacement);
 
     }
 
-    loc_offset += 1;
+    offset += 2; /* Skip Data Displacement */
+
+    /* Build display for: Setup Count */
 
-    Token = GWORD(pd, loc_offset);
+    SetupCount = GBYTE(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, 1, "Setup Count: %u", SetupCount);
 
     }
 
-    break;
+    offset += 1; /* Skip Setup Count */
 
-  case GETBACKUPLISTRESP:
+    /* Build display for: Reserved3 */
 
-    BackupServerCount = GBYTE(pd, loc_offset);
+    Reserved3 = 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, "Reserved3: %u", Reserved3);
 
     }
 
-    loc_offset += 1;
+    offset += 1; /* Skip Reserved3 */
+    SetupAreaOffset = offset;  
 
-    Token = GWORD(pd, loc_offset);
+    /* Build display for: Setup */
 
-    if (tree) {
+    if (SetupCount > 0) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 4, "Backup Response Token: %u", Token);
+      int i = SetupCount;
 
-    }
+      Setup = GSHORT(pd, offset);
 
-    loc_offset += 4;
+      for (i = 1; i <= SetupCount; i++) {
+       
+       Setup = GSHORT(pd, offset);
 
-    ServerName = pd + loc_offset;
+       if (tree) {
 
-    for (count = 1; count <= BackupServerCount; count++) {
+         proto_tree_add_text(tree, NullTVB, offset, 2, "Setup%i: %u", i, Setup);
 
-      if (tree) {
+       }
 
-       proto_tree_add_text(browse_tree, loc_offset, strlen(ServerName) + 1, "Backup Server: %s", ServerName);
+       offset += 2; /* Skip Setup */
 
       }
 
-      loc_offset += strlen(ServerName) + 1;
-
-      ServerName = pd + loc_offset;
-
     }
 
-    break;
-
-  case BECOMEBACKUPBROWSER:
+    /* 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, "Browser to Promote: %s", ServerName);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
-    break;
+    offset += 2; /* Skip Byte Count (BCC) */
 
-  case MASTERANNOUNCEMENT:
+    /* Build display for: Pad1 */
 
-    ServerName = pd + loc_offset;
+    if (offset < (SMB_offset + ParameterOffset)) {
 
-    if (tree) {
+      int pad1Count = SMB_offset + ParameterOffset - offset;
 
-      proto_tree_add_text(browse_tree, loc_offset, strlen(ServerName) + 1, "Server Name: %s", ServerName);
+      /* Build display for: Pad1 */
 
-    }
+      if (tree) {
 
-    break;
+       proto_tree_add_text(tree, NullTVB, offset, pad1Count, "Pad1: %s", format_text(pd + offset, pad1Count));
+      }
 
-  default:
-    break;
-  }
-  
-  return 1;  /* Success */
+      offset += pad1Count; /* Skip 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)
-{
+    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;
+  }
 
 }
 
-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)
-{
-
-  if (strcmp(command, "BROWSE") == 0) { /* Decode a browse */
 
-    return dissect_mailslot_browse(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, command, DataOffset, DataCount);
 
-  }
 
-  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 */
@@ -10838,7 +10228,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 */
@@ -11138,7 +10528,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}
 };
 
@@ -11167,7 +10557,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) {
@@ -11209,15 +10599,18 @@ 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];
 
        if (check_col(fd, COL_PROTOCOL))
-               col_add_str(fd, COL_PROTOCOL, "SMB");
+               col_set_str(fd, COL_PROTOCOL, "SMB");
 
        /* Hmmm, poor coding here ... Also, should check the type */
 
@@ -11229,15 +10622,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");
 
        }
 
@@ -11245,46 +10638,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 */
 
@@ -11292,35 +10707,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"));
 
@@ -11332,38 +10747,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"));
@@ -11376,7 +10791,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");
 
        }
 
@@ -11389,7 +10804,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); 
 
        }
 
@@ -11402,7 +10817,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); 
 
        }
 
@@ -11415,7 +10830,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); 
 
        }
        
@@ -11428,7 +10843,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); 
 
        }
 
@@ -11442,13 +10857,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,
@@ -11467,22 +10894,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();
+
 }