Updates from Ed Warnicke.
[obnox/wireshark/wip.git] / packet-smb.c
index 123dbeea462a155c5cabe007f8b5ae5d091d37a5..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.45 1999/11/21 11:17:13 deniel 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 <time.h>
 #include <string.h>
 #include <glib.h>
+#include <ctype.h>
 #include "packet.h"
 #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;
@@ -67,18 +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;
 
 /*
  * Struct passed to each SMB decode routine of info it may need
@@ -93,20 +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;
-};
-
-struct smb_info {
-  int tid, uid, mid, pid;   /* Any more?  */
-  conversation_t *conversation;
-  struct smb_request_val *request_val;
-};
 
 GHashTable *smb_request_hash = NULL;
 GMemChunk *smb_request_keys = NULL;
@@ -180,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",
@@ -445,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); 
 
   }
@@ -456,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;
 
@@ -480,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;
 
@@ -580,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);
 
     }
 
@@ -592,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);
 
     }
 
@@ -604,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);
 
     }
 
@@ -620,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);
 
     }
 
@@ -632,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);
 
     }
 
@@ -662,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);
 
     }
 
@@ -674,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);
 
     }
 
@@ -690,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);
 
     }
 
@@ -704,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);
 
       }
 
@@ -716,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);
 
       }
 
@@ -728,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);
 
       }
 
@@ -740,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);
 
       }
 
@@ -752,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);
 
       }
 
@@ -766,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);
 
     }
 
@@ -803,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);
 
     }
 
@@ -817,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"));
        
       }
@@ -842,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));
 
       }
 
@@ -854,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));
 
       }
 
@@ -866,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);
 
       }
 
@@ -878,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);
 
       }
 
@@ -890,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);
 
       }
 
@@ -902,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);
 
       }
 
@@ -914,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);
 
       }
 
@@ -928,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);
 
     }
 
@@ -940,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);
 
     }
 
@@ -952,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);
 
     }
 
@@ -968,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);
 
     }
 
@@ -980,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);
 
     }
 
@@ -1011,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);
 
     }
 
@@ -1023,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);
 
     }
 
@@ -1035,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);
 
     }
 
@@ -1047,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);
 
     }
 
@@ -1059,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);
 
     }
 
@@ -1071,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);
 
     }
 
@@ -1083,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);
 
     }
 
@@ -1095,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 */
@@ -1111,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);
 
     }
 
@@ -1123,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);
 
     }
 
@@ -1135,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);
 
     }
 
@@ -1172,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);
 
     }
 
@@ -1184,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);
 
     }
 
@@ -1196,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);
 
     }
 
@@ -1208,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);
 
     }
 
@@ -1220,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);
 
     }
 
@@ -1232,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);
 
     }
 
@@ -1244,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);
 
     }
 
@@ -1256,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);
 
     }
 
@@ -1272,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);
 
     }
 
@@ -1286,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);
 
       }
 
@@ -1298,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);
 
       }
 
@@ -1310,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);
 
       }
 
@@ -1322,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);
 
       }
 
@@ -1334,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);
 
       }
 
@@ -1346,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);
 
       }
 
@@ -1358,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);
 
       }
 
@@ -1372,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);
 
     }
 
@@ -1384,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);
 
     }
 
@@ -1400,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;
 
@@ -1411,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);
 
     }
 
@@ -1435,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);
 
     }
 
@@ -1447,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);
 
     }
 
@@ -1463,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);
 
     }
 
@@ -1475,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);
 
     }
 
@@ -1512,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);
 
     }
 
@@ -1524,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);
 
     }
 
@@ -1536,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);
 
     }
 
@@ -1552,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);
 
     }
 
@@ -1566,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));
 
       }
 
@@ -1578,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));
 
       }
 
@@ -1590,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));
 
       }
 
@@ -1602,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));
 
       }
 
@@ -1614,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));
 
       }
 
@@ -1626,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));
 
       }
 
@@ -1638,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);
 
       }
 
@@ -1650,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);
 
       }
 
@@ -1662,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"));
     
       }
@@ -1689,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);
 
     }
 
@@ -1722,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);
 
     }
 
@@ -1734,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);
 
     }
 
@@ -1746,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);
 
     }
 
@@ -1758,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);
 
     }
 
@@ -1770,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);
 
     }
 
@@ -1782,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);
 
     }
 
@@ -1794,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);
 
     }
 
@@ -1806,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);
 
     }
 
@@ -1822,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);
 
     }
 
@@ -1836,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);
 
     }
 
@@ -1848,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);
 
     }
 
@@ -1860,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);
 
     }
 
@@ -1915,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);
 
       }
 
@@ -1927,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)));
 
       }
@@ -1940,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);
 
       }
 
@@ -1952,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);
 
       }
 
@@ -1964,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);
 
       }
 
@@ -1976,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);
 
       }
 
@@ -1988,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);
 
       }
 
@@ -2000,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);
 
       }
 
@@ -2012,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);
 
       }
 
@@ -2024,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);
 
       }
 
@@ -2036,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);
 
       }
 
@@ -2050,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);
 
        }
 
@@ -2062,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);
 
        }
 
@@ -2074,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);
 
        }
 
@@ -2086,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);
 
        }
 
@@ -2098,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);
 
        }
 
@@ -2116,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);
 
       }
 
@@ -2128,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)));
 
       }
@@ -2141,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);
 
       }
 
@@ -2153,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);
 
       }
 
@@ -2165,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);
 
       }
 
@@ -2177,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);
 
       }
 
@@ -2189,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);
 
       }
 
@@ -2201,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);
 
       }
 
@@ -2213,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);
 
       }
 
@@ -2225,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);
 
       }
 
@@ -2237,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);
 
       }
 
@@ -2249,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"));
       
 }
@@ -2290,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);
 
       }
 
@@ -2298,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 */
 
@@ -2319,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 */
 
        }
 
@@ -2333,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);
 
        }
 
@@ -2345,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);
 
        }
 
@@ -2357,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);
 
        }
 
@@ -2369,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);
 
        }
 
@@ -2398,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);
 
     }
 
@@ -2412,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)));
 
       }
@@ -2425,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);
 
       }
 
@@ -2437,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);
 
       }
 
@@ -2450,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);
 
       }
 
@@ -2464,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);
 
     }
 
@@ -2480,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);
 
       }
 
@@ -2492,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);
 
       }
 
@@ -2504,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);
 
       }
 
@@ -2543,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;
 
@@ -2555,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);
 
   }
 
@@ -2567,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]);
 
     }
 
@@ -2581,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);
 
     }
 
@@ -2597,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);
 
     }
 
@@ -2609,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"));
@@ -2624,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);
 
     }
 
@@ -2634,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);
 
     }
 
@@ -2644,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));
 
     }
 
@@ -2654,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);
 
     }
 
@@ -2664,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);
 
     }
 
@@ -2676,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);
 
     }
 
@@ -2686,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);
 
     }
@@ -2701,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);
 
     }
@@ -2712,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);
 
     }
 
@@ -2722,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);
 
     }
 
@@ -2732,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);
 
     }
 
@@ -2770,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;
     }
@@ -2780,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);
 
   }
 
@@ -2798,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);
 
     }
 
@@ -2806,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);
 
     }
@@ -2816,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]);
 
       }
 
@@ -2826,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);
 
       }
 
@@ -2843,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);
 
       }
 
@@ -2860,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);
 
     }
 
@@ -2870,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));
 
     }
 
@@ -2882,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"));
@@ -2899,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));
 
     }
 
@@ -2907,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));
 
     }
     
@@ -2915,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));
 
     }
 
@@ -2925,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"));
@@ -2942,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));
 
     }
 
@@ -2952,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)));
 
     }
@@ -2965,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));
 
     }
@@ -2978,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);
 
     }
 
@@ -2986,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));
 
     }
 
@@ -2996,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);
 
     }
 
@@ -3008,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));
       }
 
@@ -3022,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);
 
     }
 
@@ -3032,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));
 
     }
 
@@ -3042,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"));
@@ -3067,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));
 
     }
     
@@ -3075,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));
 
     }
 
@@ -3083,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));
 
     }
 
@@ -3091,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));
 
     }
 
@@ -3099,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));
 
     }
 
@@ -3109,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"));
@@ -3175,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)); 
 
     }
 
@@ -3186,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));
 
     }
@@ -3199,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);
 
     }
 
@@ -3209,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);
 
     }
 
@@ -3223,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));
 
       }
@@ -3242,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);
       }
 
     }
@@ -3254,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;
 
   }
@@ -3278,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);
 
     }
 
@@ -3290,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);
 
     }
 
@@ -3302,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);
 
     }
 
@@ -3314,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);
 
     }
 
@@ -3330,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);
 
     }
 
@@ -3342,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);
 
     }
 
@@ -3369,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);
 
     }
 
@@ -3381,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);
 
     }
 
@@ -3393,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);
 
     }
 
@@ -3405,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);
 
     }
 
@@ -3421,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);
 
     }
 
@@ -3433,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);
 
     }
 
@@ -3443,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)
 
@@ -3460,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);
 
     }
 
@@ -3472,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);
 
     }
 
@@ -3484,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);
 
     }
 
@@ -3496,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);
 
     }
 
@@ -3512,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);
 
     }
 
@@ -3524,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);
 
     }
 
@@ -3645,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);
 
     }
 
@@ -3657,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)));
 
     }
@@ -3670,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);
 
     }
 
@@ -3682,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);
 
     }
 
@@ -3694,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"));
     
 }
@@ -3713,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"));
     
 }
@@ -3736,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"));
     
 }
@@ -3761,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"));
     
 }
@@ -3797,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));
 
     }
 
@@ -3810,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"));
     
 }
@@ -3827,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);
 
     }
 
@@ -3839,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);
 
     }
 
@@ -3851,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);
 
     }
 
@@ -3863,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);
 
     }
 
@@ -3875,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);
 
     }
 
@@ -3898,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);
 
     }
 
@@ -3912,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)));
 
       }
@@ -3925,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);
 
       }
 
@@ -3937,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);
 
       }
 
@@ -3949,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);
 
       }
 
@@ -3961,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"));
     
       }
@@ -3996,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));
 
 
       }
@@ -4010,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);
 
       }
 
@@ -4022,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);
 
       }
 
@@ -4034,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"));
     
       }
@@ -4049,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);
 
       }
 
@@ -4061,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"));
        
       }
@@ -4078,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);
 
       }
 
@@ -4090,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);
 
       }
 
@@ -4104,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);
 
     }
 
@@ -4155,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);
 
       }
 
@@ -4167,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);
 
       }
 
@@ -4179,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);
 
       }
 
@@ -4191,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);
 
       }
 
@@ -4203,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);
 
       }
 
@@ -4215,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);
 
       }
 
@@ -4227,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)"));
       
 }
@@ -4244,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);
 
       }
 
@@ -4256,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);
 
       }
 
@@ -4268,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);
 
       }
 
@@ -4280,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);
 
       }
 
@@ -4292,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);
 
       }
 
@@ -4308,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);
 
       }
 
@@ -4320,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);
 
       }
 
@@ -4332,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);
 
       }
 
@@ -4344,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);
 
       }
 
@@ -4356,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);
 
       }
 
@@ -4368,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)"));
       
 }
@@ -4385,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);
 
       }
 
@@ -4397,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);
 
       }
 
@@ -4409,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);
 
       }
 
@@ -4421,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);
 
       }
 
@@ -4433,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);
 
       }
 
@@ -4453,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);
 
     }
 
@@ -4467,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);
 
       }
 
@@ -4481,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);
 
     }
 
@@ -4506,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);
 
     }
 
@@ -4518,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);
 
     }
 
@@ -4534,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);
 
     }
 
@@ -4546,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);
 
     }
 
@@ -4587,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);
 
     }
 
@@ -4599,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);
 
     }
 
@@ -4611,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);
 
     }
 
@@ -4623,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"));
     
 }
@@ -4642,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);
 
     }
 
@@ -4656,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);
 
       }
 
@@ -4670,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);
 
     }
 
@@ -4682,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);
 
     }
 
@@ -4694,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);
 
     }
 
@@ -4724,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);
 
     }
 
@@ -4736,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);
 
     }
 
@@ -4748,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);
 
     }
 
@@ -4760,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);
 
     }
 
@@ -4772,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);
 
     }
 
@@ -4784,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);
 
     }
 
@@ -4796,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);
 
     }
 
@@ -4812,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);
 
     }
 
@@ -4824,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);
 
     }
 
@@ -4861,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);
 
     }
 
@@ -4873,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);
 
     }
 
@@ -4885,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"));
     
 }
@@ -4900,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);
 
     }
 
@@ -4912,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);
 
     }
 
@@ -4924,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);
 
     }
 
@@ -4940,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);
 
     }
 
@@ -4952,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);
 
     }
 
@@ -4964,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);
 
     }
 
@@ -4990,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);
 
     }
 
@@ -5002,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);
 
     }
 
@@ -5014,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);
 
     }
 
@@ -5030,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);
 
     }
 
@@ -5042,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);
 
     }
 
@@ -5080,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);
 
       }
 
@@ -5092,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);
 
       }
 
@@ -5104,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);
 
       }
 
@@ -5116,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);
 
       }
 
@@ -5128,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);
 
       }
 
@@ -5140,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);
 
       }
 
@@ -5152,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);
 
       }
 
@@ -5164,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);
 
       }
 
@@ -5180,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);
 
       }
 
@@ -5192,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);
 
       }
 
@@ -5204,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);
 
       }
 
@@ -5216,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);
 
       }
 
@@ -5228,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);
 
       }
 
@@ -5240,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);
 
       }
 
@@ -5252,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);
 
       }
 
@@ -5264,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);
 
       }
 
@@ -5276,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);
 
       }
 
@@ -5295,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;
@@ -5303,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 */
 
@@ -5312,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);
 
     }
 
@@ -5324,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);
 
     }
 
@@ -5336,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);
 
     }
 
@@ -5348,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) */
 
@@ -5431,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);
 
     }
 
@@ -5446,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) */
 
@@ -5474,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) */
 
@@ -5565,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 */
 
@@ -5596,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) */
 
@@ -5720,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 */
 
@@ -5764,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) */
 
@@ -5876,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);
 
     }
 
@@ -5887,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 */
@@ -5904,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);
 
     }
 
@@ -5916,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);
 
     }
 
@@ -5924,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 */
 
@@ -5940,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 */
@@ -5968,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);
 
     }
 
@@ -5991,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 */
@@ -6011,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);
 
     }
 
@@ -6164,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);
 
     }
 
@@ -6176,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);
 
     }
 
@@ -6188,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);
 
     }
 
@@ -6200,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);
 
     }
 
@@ -6212,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);
 
     }
 
@@ -6224,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"));
     
 }
@@ -6247,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);
 
     }
 
@@ -6259,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);
 
     }
 
@@ -6271,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);
 
     }
 
@@ -6283,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);
 
     }
 
@@ -6295,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);
 
     }
 
@@ -6318,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);
 
     }
 
@@ -6332,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)));
 
       }
@@ -6345,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);
 
       }
 
@@ -6357,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);
 
       }
 
@@ -6371,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);
 
     }
 
@@ -6406,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);
 
     }
 
@@ -6418,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);
 
     }
 
@@ -6430,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);
 
     }
 
@@ -6442,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);
 
     }
 
@@ -6454,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);
 
     }
 
@@ -6470,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);
 
     }
 
@@ -6482,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);
 
     }
 
@@ -6514,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);
 
     }
 
@@ -6526,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"));
     
 }
@@ -6551,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));
 
     }
 
@@ -6563,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);
 
     }
 
@@ -6575,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);
 
     }
 
@@ -6587,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);
 
     }
 
@@ -6603,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);
 
     }
 
@@ -6617,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);
 
       }
 
@@ -6631,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);
 
     }
 
@@ -6665,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);
 
     }
 
@@ -6677,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);
 
     }
 
@@ -6689,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);
 
     }
 
@@ -6701,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);
 
     }
 
@@ -6713,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);
 
     }
 
@@ -6725,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);
 
     }
 
@@ -6737,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);
 
     }
 
@@ -6749,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);
 
     }
 
@@ -6765,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);
 
     }
 
@@ -6779,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);
 
       }
 
@@ -6793,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);
 
     }
 
@@ -6805,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);
 
     }
 
@@ -6817,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);
 
     }
 
@@ -6849,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);
 
     }
 
@@ -6861,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);
 
     }
 
@@ -6873,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));
 
     }
 
@@ -6885,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));
 
     }
 
@@ -6897,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);
 
     }
 
@@ -6909,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);
 
     }
 
@@ -6921,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);
 
     }
 
@@ -6937,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);
 
     }
 
@@ -6951,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);
 
       }
 
@@ -6965,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);
 
     }
 
@@ -6977,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);
 
     }
 
@@ -6989,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);
 
     }
 
@@ -7017,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);
 
     }
 
@@ -7029,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);
 
     }
 
@@ -7041,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));
 
     }
 
@@ -7053,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));
 
     }
 
@@ -7065,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);
 
     }
 
@@ -7081,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);
 
     }
 
@@ -7093,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);
 
     }
 
@@ -7121,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);
 
     }
 
@@ -7133,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);
 
     }
 
@@ -7145,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);
 
     }
 
@@ -7157,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);
 
     }
 
@@ -7169,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);
 
     }
 
@@ -7185,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);
 
     }
 
@@ -7197,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);
 
     }
 
@@ -7232,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);
 
     }
 
@@ -7244,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);
 
     }
 
@@ -7256,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);
 
     }
 
@@ -7268,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);
 
     }
 
@@ -7280,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);
 
     }
 
@@ -7292,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);
 
     }
 
@@ -7308,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);
 
     }
 
@@ -7322,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);
 
       }
 
@@ -7334,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);
 
       }
 
@@ -7346,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);
 
       }
 
@@ -7358,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);
 
       }
 
@@ -7370,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);
 
       }
 
@@ -7382,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);
 
       }
 
@@ -7396,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);
 
     }
 
@@ -7408,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);
 
     }
 
@@ -7433,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);
 
     }
 
@@ -7445,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);
 
     }
 
@@ -7461,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);
 
     }
 
@@ -7473,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);
 
     }
 
@@ -7511,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);
 
     }
 
@@ -7523,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);
 
     }
 
@@ -7535,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);
 
     }
 
@@ -7547,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);
 
     }
 
@@ -7563,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);
 
     }
 
@@ -7577,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"));
        
       }
@@ -7612,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));
 
       }
 
@@ -7626,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);
 
       }
 
@@ -7638,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);
 
       }
 
@@ -7650,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);
 
       }
 
@@ -7662,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);
 
       }
 
@@ -7674,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);
 
       }
 
@@ -7686,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);
 
       }
 
@@ -7700,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);
 
     }
 
@@ -7735,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);
 
     }
 
@@ -7747,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);
 
     }
 
@@ -7759,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);
 
     }
 
@@ -7771,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);
 
     }
 
@@ -7783,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);
 
     }
 
@@ -7795,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);
 
     }
 
@@ -7811,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);
 
     }
 
@@ -7825,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);
 
       }
 
@@ -7837,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);
 
       }
 
@@ -7849,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);
 
       }
 
@@ -7861,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);
 
       }
 
@@ -7873,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);
 
       }
 
@@ -7887,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);
 
     }
 
@@ -7899,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);
 
     }
 
@@ -7911,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);
 
     }
 
@@ -7948,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);
 
     }
 
@@ -7956,799 +8569,94 @@ dissect_write_mpx_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *
 
     /* Build display for: FID */
 
-    FID = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
-
-    }
-
-    offset += 2; /* Skip FID */
-
-    /* Build display for: Count */
-
-    Count = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Count: %u", Count);
-
-    }
-
-    offset += 2; /* Skip Count */
-
-    /* Build display for: Reserved 1 */
-
-    Reserved1 = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Reserved 1: %u", Reserved1);
-
-    }
-
-    offset += 2; /* Skip Reserved 1 */
-
-    /* Build display for: Timeout */
-
-    Timeout = GWORD(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 4, "Timeout: %u", Timeout);
-
-    }
-
-    offset += 4; /* Skip Timeout */
-
-    /* Build display for: WriteMode */
-
-    WriteMode = GSHORT(pd, offset);
-
-    if (tree) {
-
-      ti = proto_tree_add_text(tree, 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",
-                          decode_boolean_bitfield(WriteMode, 0x01, 16, "Write through requested", "Write through not requested"));
-      proto_tree_add_text(WriteMode_tree, offset, 2, "%s",
-                          decode_boolean_bitfield(WriteMode, 0x02, 16, "Return Remaining", "Dont return Remaining"));
-      proto_tree_add_text(WriteMode_tree, offset, 2, "%s",
-                          decode_boolean_bitfield(WriteMode, 0x40, 16, "Connectionless mode requested", "Connectionless mode not requested"));
-    
-}
-
-    offset += 2; /* Skip WriteMode */
-
-    /* Build display for: Request Mask */
-
-    RequestMask = GWORD(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 4, "Request Mask: %u", RequestMask);
-
-    }
-
-    offset += 4; /* Skip Request Mask */
-
-    /* Build display for: Data Length */
-
-    DataLength = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Data Length: %u", DataLength);
-
-    }
-
-    offset += 2; /* Skip Data Length */
-
-    /* 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: 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: Pad */
-
-    Pad = GBYTE(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 1, "Pad: %u", Pad);
-
-    }
-
-    offset += 1; /* Skip Pad */
-
-  }
-
-  if (dirn == 0) { /* Response(s) dissect code */
-
-    /* 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) */
-
-    if (WordCount > 0) {
-
-      /* Build display for: Response Mask */
-
-      ResponseMask = GWORD(pd, offset);
-
-      if (tree) {
-
-       proto_tree_add_text(tree, offset, 4, "Response Mask: %u", ResponseMask);
-
-      }
-
-      offset += 4; /* Skip Response Mask */
-
-      /* 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) */
-
-  }
-
-}
-
-void
-dissect_find_close2_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        ByteCount;
-  guint16       FID;
-
-  if (dirn == 1) { /* Request(s) dissect code */
-
-    /* Build display for: Word Count (WTC) */
-
-    WordCount = GBYTE(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 1, "Word Count (WTC): %u", WordCount);
-
-    }
-
-    offset += 1; /* Skip Word Count (WTC) */
-
-    /* Build display for: FID */
-
-    FID = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "FID: %u", FID);
-
-    }
-
-    offset += 2; /* Skip FID */
-
-    /* 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) */
-
-  }
-
-  if (dirn == 0) { /* Response(s) dissect code */
-
-    /* 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: Byte Count (BCC) */
-
-    ByteCount = GBYTE(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 1, "Byte Count (BCC): %u", ByteCount);
-
-    }
-
-    offset += 1; /* Skip Byte Count (BCC) */
-
-  }
-
-}
-
-char *trans2_cmd_names[] = {
-  "TRANS2_OPEN",
-  "TRANS2_FIND_FIRST2",
-  "TRANS2_FIND_NEXT2",
-  "TRANS2_QUERY_FS_INFORMATION",
-  "TRANS2_QUERY_PATH_INFORMATION",
-  "TRANS2_SET_PATH_INFORMATION",
-  "TRANS2_QUERY_FILE_INFORMATION",
-  "TRANS2_SET_FILE_INFORMATION",
-  "TRANS2_FSCTL",
-  "TRANS2_IOCTL2",
-  "TRANS2_FIND_NOTIFY_FIRST",
-  "TRANS2_FIND_NOTIFY_NEXT",
-  "TRANS2_CREATE_DIRECTORY",
-  "TRANS2_SESSION_SETUP",
-  "TRANS2_GET_DFS_REFERRAL",
-  "no such command",
-  "TRANS2_REPORT_DFS_INCONSISTENCY"};
-
-char *decode_trans2_name(int code)
-{
-
-  if (code > 17 || code < 0) {
-
-    return("no such command");
-
-  }
-
-  return trans2_cmd_names[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)
-
-{
-  proto_tree    *Flags_tree;
-  proto_item    *ti;
-  guint8        WordCount;
-  guint8        SetupCount;
-  guint8        Reserved3;
-  guint8        Reserved1;
-  guint8        Pad2;
-  guint8        Pad1;
-  guint8        MaxSetupCount;
-  guint8        Data;
-  guint32       Timeout;
-  guint16       TotalParameterCount;
-  guint16       TotalDataCount;
-  guint16       Setup = 0;
-  guint16       Reserved2;
-  guint16       ParameterOffset;
-  guint16       ParameterDisplacement;
-  guint16       ParameterCount;
-  guint16       MaxParameterCount;
-  guint16       MaxDataCount;
-  guint16       Flags;
-  guint16       DataOffset;
-  guint16       DataDisplacement;
-  guint16       DataCount;
-  guint16       ByteCount;
-  conversation_t *conversation;
-  struct smb_request_key      request_key, *new_request_key;
-  struct smb_request_val      *request_val;
-
-  /*
-   * Find out what conversation this packet is part of.
-   * XXX - this should really be done by the transport-layer protocol,
-   * although for connectionless transports, we may not want to do that
-   * unless we know some higher-level protocol will want it - or we
-   * may want to do it, so you can say e.g. "show only the packets in
-   * this UDP 'connection'".
-   *
-   * Note that we don't have to worry about the direction this packet
-   * was going - the conversation code handles that for us, treating
-   * packets from A:X to B:Y as being part of the same conversation as
-   * packets from B:Y to A:X.
-   */
-  conversation = find_conversation(&pi.src, &pi.dst, pi.ptype,
-                               pi.srcport, pi.destport);
-  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);
-  }
-
-  si.conversation = conversation;  /* Save this for later */
-
-  /*
-   * Check for and insert entry in request hash table if does not exist
-   */
-  request_key.conversation = conversation->index;
-  request_key.mid          = si.mid;
-
-  request_val = (struct smb_request_val *) g_hash_table_lookup(smb_request_hash, &request_key);
-
-  if (!request_val) { /* Create one */
-
-    new_request_key = g_mem_chunk_alloc(smb_request_keys);
-    new_request_key -> conversation = conversation->index;
-    new_request_key -> mid          = si.mid;
-
-    request_val = g_mem_chunk_alloc(smb_request_vals);
-    request_val -> mid = si.mid;
-    request_val -> last_transact2_command = 0xFFFF;
-
-    g_hash_table_insert(smb_request_hash, new_request_key, request_val);
-    
-  }
-  else { /* Update the transact request */
-
-    request_val -> mid = si.mid;
-
-  }
-
-  si.request_val = request_val;  /* Save this for later */
-
-
-  if (dirn == 1) { /* Request(s) dissect code */
-  
-    /* 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: Max Parameter Count */
-
-    MaxParameterCount = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Max Parameter Count: %u", MaxParameterCount);
-
-    }
-
-    offset += 2; /* Skip Max Parameter Count */
-
-    /* Build display for: Max Data Count */
-
-    MaxDataCount = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Max Data Count: %u", MaxDataCount);
-
-    }
-
-    offset += 2; /* Skip Max Data Count */
-
-    /* Build display for: Max Setup Count */
-
-    MaxSetupCount = GBYTE(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 1, "Max Setup Count: %u", MaxSetupCount);
-
-    }
-
-    offset += 1; /* Skip Max Setup Count */
-
-    /* Build display for: Reserved1 */
-
-    Reserved1 = GBYTE(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 1, "Reserved1: %u", Reserved1);
-
-    }
-
-    offset += 1; /* Skip Reserved1 */
-
-    /* Build display for: Flags */
-
-    Flags = GSHORT(pd, offset);
-
-    if (tree) {
-
-      ti = proto_tree_add_text(tree, 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",
-                          decode_boolean_bitfield(Flags, 0x01, 16, "Also disconnect TID", "Dont disconnect TID"));
-      proto_tree_add_text(Flags_tree, offset, 2, "%s",
-                          decode_boolean_bitfield(Flags, 0x02, 16, "One way transaction", "Two way transaction"));
-    
-}
-
-    offset += 2; /* Skip Flags */
-
-    /* Build display for: Timeout */
-
-    Timeout = GWORD(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 4, "Timeout: %u", Timeout);
-
-    }
-
-    offset += 4; /* Skip Timeout */
-
-    /* Build display for: Reserved2 */
-
-    Reserved2 = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Reserved2: %u", Reserved2);
-
-    }
-
-    offset += 2; /* Skip Reserved2 */
-
-    /* Build display for: Parameter Count */
-
-    ParameterCount = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Parameter Count: %u", ParameterCount);
-
-    }
-
-    offset += 2; /* Skip Parameter Count */
-
-    /* Build display for: Parameter Offset */
-
-    ParameterOffset = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Parameter Offset: %u", ParameterOffset);
-
-    }
-
-    offset += 2; /* Skip Parameter Offset */
-
-    /* Build display for: Data Count */
-
-    DataCount = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Data Count: %u", DataCount);
-
-    }
-
-    offset += 2; /* Skip Data Count */
-
-    /* Build display for: Data Offset */
-
-    DataOffset = GSHORT(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Data Offset: %u", DataOffset);
-
-    }
-
-    offset += 2; /* Skip Data Offset */
-
-    /* Build display for: Setup Count */
-
-    SetupCount = GBYTE(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 1, "Setup Count: %u", SetupCount);
-
-    }
-
-    offset += 1; /* Skip Setup Count */
-
-    /* Build display for: Reserved3 */
-
-    Reserved3 = GBYTE(pd, offset);
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 1, "Reserved3: %u", Reserved3);
-
-    }
-
-    offset += 1; /* Skip Reserved3 */
-
-    /* Build display for: Setup */
-
-    if (SetupCount > 0) {
-
-      int i = SetupCount;
-
-      Setup = GSHORT(pd, offset);
-
-      request_val -> last_transact2_command = Setup;  /* Save for later */
-
-      if (check_col(fd, COL_INFO)) {
-
-       col_add_fstr(fd, COL_INFO, "%s %s", decode_trans2_name(Setup), (dirn ? "Request" : "Response"));
-
-      }
-
-      for (i = 1; i <= SetupCount; i++) {
-       int Setup1;
-
-       Setup1 = GSHORT(pd, offset);
-
-       if (tree) {
-
-         proto_tree_add_text(tree, offset, 2, "Setup%i: %u", i, Setup1);
-
-       }
-
-       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 */
-
-    if (tree) {
-
-      proto_tree_add_text(tree, offset, 2, "Transact Name: %s", decode_trans2_name(Setup));
-
-    }
-
-    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 */
-
-    }
-
-    if (ParameterCount > 0) {
-
-      /* Build display for: Parameters */
-
-      if (tree) {
-
-       proto_tree_add_text(tree, SMB_offset + ParameterOffset, ParameterCount, "Parameters: %s", format_text(pd + SMB_offset + ParameterOffset, ParameterCount));
-
-      }
-
-      offset += ParameterCount; /* Skip Parameters */
-
-    }
-
-    if (offset % 2) {
-       
-      /* Build display for: Pad2 */
-
-      Pad2 = GBYTE(pd, offset);
-
-      if (tree) {
-
-       proto_tree_add_text(tree, offset, 1, "Pad2: %u", Pad2);
-
-      }
-
-      offset += 1; /* Skip Pad2 */
-
-    }
-
-    if (DataCount > 0) {
-
-      /* Build display for: Data */
-
-      Data = GBYTE(pd, offset);
-
-      if (tree) {
-
-       proto_tree_add_text(tree, SMB_offset + DataOffset, DataCount, "Data: %s", format_text(&pd[offset], DataCount));
-
-      }
-
-      offset += DataCount; /* Skip Data */
-
-    }
-  }
-
-  if (dirn == 0) { /* Response(s) dissect code */
-
-    /* Pick up the last transact2 command and put it in the right places */
-
-    if (check_col(fd, COL_INFO)) {
-
-      col_add_fstr(fd, COL_INFO, "%s %s", decode_trans2_name(request_val -> last_transact2_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);
+    FID = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Total Parameter Count: %u", TotalParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "FID: %u", FID);
 
     }
 
-    offset += 2; /* Skip Total Parameter Count */
+    offset += 2; /* Skip FID */
 
-    /* Build display for: Total Data Count */
+    /* Build display for: Count */
 
-    TotalDataCount = GSHORT(pd, offset);
+    Count = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Total Data Count: %u", TotalDataCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Count: %u", Count);
 
     }
 
-    offset += 2; /* Skip Total Data Count */
+    offset += 2; /* Skip Count */
 
-    /* Build display for: Reserved2 */
+    /* Build display for: Reserved 1 */
 
-    Reserved2 = GSHORT(pd, offset);
+    Reserved1 = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Reserved2: %u", Reserved2);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved 1: %u", Reserved1);
 
     }
 
-    offset += 2; /* Skip Reserved2 */
+    offset += 2; /* Skip Reserved 1 */
 
-    /* Build display for: Parameter Count */
+    /* Build display for: Timeout */
 
-    ParameterCount = GSHORT(pd, offset);
+    Timeout = GWORD(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Parameter Count: %u", ParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Timeout: %u", Timeout);
 
     }
 
-    offset += 2; /* Skip Parameter Count */
+    offset += 4; /* Skip Timeout */
 
-    /* Build display for: Parameter Offset */
+    /* Build display for: WriteMode */
 
-    ParameterOffset = GSHORT(pd, offset);
+    WriteMode = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Parameter Offset: %u", ParameterOffset);
-
-    }
+      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, NullTVB, offset, 2, "%s",
+                          decode_boolean_bitfield(WriteMode, 0x01, 16, "Write through requested", "Write through not requested"));
+      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, NullTVB, offset, 2, "%s",
+                          decode_boolean_bitfield(WriteMode, 0x40, 16, "Connectionless mode requested", "Connectionless mode not requested"));
+    
+}
 
-    offset += 2; /* Skip Parameter Offset */
+    offset += 2; /* Skip WriteMode */
 
-    /* Build display for: Parameter Displacement */
+    /* Build display for: Request Mask */
 
-    ParameterDisplacement = GSHORT(pd, offset);
+    RequestMask = GWORD(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Parameter Displacement: %u", ParameterDisplacement);
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Request Mask: %u", RequestMask);
 
     }
 
-    offset += 2; /* Skip Parameter Displacement */
+    offset += 4; /* Skip Request Mask */
 
-    /* Build display for: Data Count */
+    /* Build display for: Data Length */
 
-    DataCount = GSHORT(pd, offset);
+    DataLength = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Count: %u", DataCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Length: %u", DataLength);
 
     }
 
-    offset += 2; /* Skip Data Count */
+    offset += 2; /* Skip Data Length */
 
     /* Build display for: Data Offset */
 
@@ -8756,209 +8664,198 @@ 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);
 
     }
 
     offset += 2; /* Skip Data Offset */
 
-    /* Build display for: Data Displacement */
+    /* Build display for: Byte Count (BCC) */
 
-    DataDisplacement = GSHORT(pd, offset);
+    ByteCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Data Displacement: %u", DataDisplacement);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
-    offset += 2; /* Skip Data Displacement */
+    offset += 2; /* Skip Byte Count (BCC) */
 
-    /* Build display for: Setup Count */
+    /* Build display for: Pad */
 
-    SetupCount = GBYTE(pd, offset);
+    Pad = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Setup Count: %u", SetupCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Pad: %u", Pad);
 
     }
 
-    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 Pad */
 
-    }
+  }
 
-    offset += 1; /* Skip Reserved3 */
+  if (dirn == 0) { /* Response(s) dissect code */
 
-    /* Build display for: Setup */
+    /* Build display for: Word Count (WCT) */
 
-    Setup = GSHORT(pd, offset);
+    WordCount = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 2, "Setup: %u", Setup);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
-    offset += 2; /* Skip Setup */
+    offset += 1; /* Skip Word Count (WCT) */
 
-    /* Build display for: Byte Count (BCC) */
+    if (WordCount > 0) {
 
-    ByteCount = GSHORT(pd, offset);
+      /* Build display for: Response Mask */
 
-    if (tree) {
+      ResponseMask = GWORD(pd, offset);
 
-      proto_tree_add_text(tree, offset, 2, "Byte Count (BCC): %u", ByteCount);
+      if (tree) {
 
-    }
+       proto_tree_add_text(tree, NullTVB, offset, 4, "Response Mask: %u", ResponseMask);
 
-    offset += 2; /* Skip Byte Count (BCC) */
+      }
 
-    /* Build display for: Pad1 */
+      offset += 4; /* Skip Response Mask */
 
-    Pad1 = GBYTE(pd, offset);
+      /* Build display for: Byte Count (BCC) */
 
-    if (tree) {
+      ByteCount = GSHORT(pd, offset);
 
-      proto_tree_add_text(tree, offset, 1, "Pad1: %u", Pad1);
+      if (tree) {
 
-    }
+       proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
-    offset += 1; /* Skip Pad1 */
+      }
 
-    /* Build display for: Parameter */
+    }
 
-    if (ParameterCount > 0) {
+    offset += 2; /* Skip Byte Count (BCC) */
 
-      if (tree) {
+  }
 
-       proto_tree_add_text(tree, offset, ParameterCount, "Parameter: %s", format_text(pd + SMB_offset + ParameterOffset, ParameterCount));
+}
 
-      }
+void
+dissect_find_close2_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)
 
-      offset += ParameterCount; /* Skip Parameter */
+{
+  guint8        WordCount;
+  guint8        ByteCount;
+  guint16       FID;
 
-    }
+  if (dirn == 1) { /* Request(s) dissect code */
 
-    /* Build display for: Pad2 */
+    /* Build display for: Word Count (WTC) */
 
-    Pad2 = GBYTE(pd, offset);
+    WordCount = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(tree, offset, 1, "Pad2: %u", Pad2);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WTC): %u", WordCount);
 
     }
 
-    offset += 1; /* Skip Pad2 */
+    offset += 1; /* Skip Word Count (WTC) */
 
-    /* Build display for: Data */
+    /* Build display for: FID */
 
-    if (DataCount > 0) {
+    FID = GSHORT(pd, offset);
 
-      if (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, 2, "FID: %u", FID);
 
-      }
+    }
 
-      offset += DataCount; /* Skip Data */
+    offset += 2; /* Skip FID */
 
-    }
+    /* Build display for: Byte Count (BCC) */
 
-  }
+    ByteCount = GSHORT(pd, offset);
 
-}
+    if (tree) {
 
-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, char *TransactName)
-{
-  char             *TransactNameCopy;
-  char             *trans_type = NULL, *trans_cmd, *loc_of_slash;
-  int              index;
-  guint8           Pad2;
-  gchar            *Data;
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
-  TransactNameCopy = g_malloc(strlen(TransactName) + 1);
+    }
 
-  /* Should check for error here ... */
+    offset += 2; /* Skip Byte Count (BCC) */
 
-  strcpy(TransactNameCopy, TransactName);
-  if (TransactNameCopy[0] == '\\')
-    trans_type = TransactNameCopy + 1;  /* Skip the slash */
-  loc_of_slash = strchr(trans_type, '\\');
-  if (loc_of_slash) {
-    index = loc_of_slash - trans_type;  /* Make it a real index */
-    trans_cmd = trans_type + index + 1;
-    trans_type[index] = '\0';
   }
-  else
-    trans_cmd = NULL;
 
-  if (((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) ||
-       !dissect_pipe_smb(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, trans_cmd, DataOffset, DataCount, ParameterOffset, ParameterCount))) {
-    
-    if (ParameterCount > 0) {
+  if (dirn == 0) { /* Response(s) dissect code */
 
-      /* Build display for: Parameters */
-      
-      if (tree) {
+    /* Build display for: Word Count (WCT) */
 
-       proto_tree_add_text(tree, SMB_offset + ParameterOffset, ParameterCount, "Parameters: %s", format_text(pd + SMB_offset + ParameterOffset, ParameterCount));
-         
-      }
-       
-      offset = SMB_offset + ParameterOffset + ParameterCount; /* Skip Parameters */
+    WordCount = GBYTE(pd, offset);
 
-    }
+    if (tree) {
 
-    if (offset % 2) {
-       
-      /* Build display for: Pad2 */
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
-      Pad2 = GBYTE(pd, offset);
+    }
 
-      if (tree) {
+    offset += 1; /* Skip Word Count (WCT) */
 
-       proto_tree_add_text(tree, offset, 1, "Pad2: %u: %u", Pad2, offset);
+    /* Build display for: Byte Count (BCC) */
 
-      }
+    ByteCount = GBYTE(pd, offset);
 
-      offset += 1; /* Skip Pad2 */
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Byte Count (BCC): %u", ByteCount);
 
     }
 
-    if (DataCount > 0) {
+    offset += 1; /* Skip Byte Count (BCC) */
 
-      /* Build display for: Data */
+  }
 
-      Data = GBYTE(pd, offset);
+}
 
-      if (tree) {
+char *trans2_cmd_names[] = {
+  "TRANS2_OPEN",
+  "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",
+  "TRANS2_SET_FILE_INFORMATION",
+  "TRANS2_FSCTL",
+  "TRANS2_IOCTL2",
+  "TRANS2_FIND_NOTIFY_FIRST",
+  "TRANS2_FIND_NOTIFY_NEXT",
+  "TRANS2_CREATE_DIRECTORY",
+  "TRANS2_SESSION_SETUP",
+  "TRANS2_GET_DFS_REFERRAL",
+  "no such command",
+  "TRANS2_REPORT_DFS_INCONSISTENCY"};
 
-       proto_tree_add_text(tree, SMB_offset + DataOffset, DataCount, "Data: %s", format_text(pd + SMB_offset + DataOffset, DataCount));
+char *decode_trans2_name(int code)
+{
 
-      }
+  if (code > 17 || code < 0) {
 
-      offset += DataCount; /* Skip Data */
+    return("no such command");
 
-    }
   }
 
+  return trans2_cmd_names[code];
+
 }
 
+
 void
-dissect_transact_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_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)
 
 {
   proto_tree    *Flags_tree;
@@ -8967,8 +8864,8 @@ 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;
+  guint8        Data;
   guint32       Timeout;
   guint16       TotalParameterCount;
   guint16       TotalDataCount;
@@ -8984,26 +8881,32 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
   guint16       DataDisplacement;
   guint16       DataCount;
   guint16       ByteCount;
-  const char    *TransactName;
   conversation_t *conversation;
-  struct smb_request_key   request_key, *new_request_key;
-  struct smb_request_val   *request_val;
+  struct smb_request_key      request_key, *new_request_key;
+  struct smb_request_val      *request_val;
 
   /*
-   * Find out what conversation this packet is part of
+   * Find out what conversation this packet is part of.
+   * XXX - this should really be done by the transport-layer protocol,
+   * although for connectionless transports, we may not want to do that
+   * unless we know some higher-level protocol will want it - or we
+   * may want to do it, so you can say e.g. "show only the packets in
+   * this UDP 'connection'".
+   *
+   * Note that we don't have to worry about the direction this packet
+   * was going - the conversation code handles that for us, treating
+   * packets from A:X to B:Y as being part of the same conversation as
+   * packets from B:Y to A:X.
    */
-
   conversation = find_conversation(&pi.src, &pi.dst, pi.ptype,
-                                  pi.srcport, pi.destport);
-
-  if (conversation == NULL) {  /* Create a new conversation */
-
+                               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 */
+  si.conversation = conversation;  /* Save this for later */
 
   /*
    * Check for and insert entry in request hash table if does not exist
@@ -9016,30 +8919,34 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
   if (!request_val) { /* Create one */
 
     new_request_key = g_mem_chunk_alloc(smb_request_keys);
-    new_request_key -> conversation = conversation -> index;
+    new_request_key -> conversation = conversation->index;
     new_request_key -> mid          = si.mid;
 
     request_val = g_mem_chunk_alloc(smb_request_vals);
     request_val -> mid = si.mid;
-    request_val -> last_transact_command = NULL;
-    request_val -> last_param_descrip = NULL;
-    request_val -> last_data_descrip = NULL;
+    request_val -> last_transact2_command = 0xFFFF;
 
     g_hash_table_insert(smb_request_hash, new_request_key, request_val);
+    
+  }
+  else { /* Update the transact request */
+
+    request_val -> mid = si.mid;
 
   }
 
   si.request_val = request_val;  /* Save this for later */
 
-  if (dirn == 1) { /* Request(s) dissect code */
 
+  if (dirn == 1) { /* Request(s) dissect code */
+  
     /* Build display for: Word Count (WCT) */
 
     WordCount = 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, "Word Count (WCT): %u", WordCount);
 
     }
 
@@ -9051,7 +8958,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);
 
     }
 
@@ -9063,7 +8970,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);
 
     }
 
@@ -9075,7 +8982,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);
 
     }
 
@@ -9087,7 +8994,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);
 
     }
 
@@ -9099,7 +9006,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);
 
     }
 
@@ -9111,7 +9018,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);
 
     }
 
@@ -9123,11 +9030,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"));
     
 }
@@ -9140,7 +9047,7 @@ dissect_transact_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);
 
     }
 
@@ -9152,7 +9059,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, "Reserved2: %u", Reserved2);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved2: %u", Reserved2);
 
     }
 
@@ -9164,7 +9071,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, "Parameter Count: %u", ParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Count: %u", ParameterCount);
 
     }
 
@@ -9176,7 +9083,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, "Parameter Offset: %u", ParameterOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Offset: %u", ParameterOffset);
 
     }
 
@@ -9188,7 +9095,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, "Data Count: %u", DataCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Count: %u", DataCount);
 
     }
 
@@ -9200,7 +9107,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, "Data Offset: %u", DataOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
     }
 
@@ -9212,7 +9119,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, "Setup Count: %u", SetupCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Setup Count: %u", SetupCount);
 
     }
 
@@ -9224,7 +9131,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, "Reserved3: %u", Reserved3);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Reserved3: %u", Reserved3);
 
     }
 
@@ -9238,13 +9145,22 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
       Setup = GSHORT(pd, offset);
 
+      request_val -> last_transact2_command = Setup;  /* Save for later */
+
+      if (check_col(fd, COL_INFO)) {
+
+       col_add_fstr(fd, COL_INFO, "%s %s", decode_trans2_name(Setup), (dirn ? "Request" : "Response"));
+
+      }
+
       for (i = 1; i <= SetupCount; i++) {
-       
-       Setup = GSHORT(pd, offset);
+       int Setup1;
+
+       Setup1 = GSHORT(pd, offset);
 
        if (tree) {
 
-         proto_tree_add_text(tree, offset, 2, "Setup%i: %u", i, Setup);
+         proto_tree_add_text(tree, NullTVB, offset, 2, "Setup%i: %u", i, Setup1);
 
        }
 
@@ -9260,7 +9176,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, "Byte Count (BCC): %u", ByteCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
@@ -9268,56 +9184,81 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     /* Build display for: Transact Name */
 
-    TransactName = pd + offset;
+    if (tree) {
 
-    if (request_val -> last_transact_command) g_free(request_val -> last_transact_command);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Transact Name: %s", decode_trans2_name(Setup));
 
-    request_val -> last_transact_command = g_malloc(strlen(TransactName) + 1);
+    }
 
-    if (request_val -> last_transact_command) 
-      strcpy(request_val -> last_transact_command, TransactName);
+    if (offset < (SMB_offset + ParameterOffset)) {
 
-    if (check_col(fd, COL_INFO)) {
+      int pad1Count = SMB_offset + ParameterOffset - offset;
 
-      col_add_fstr(fd, COL_INFO, "%s %s", TransactName, (dirn ? "Request" : "Response"));
+      /* Build display for: Pad1 */
 
-    }
+      if (tree) {
 
-    if (tree) {
+       proto_tree_add_text(tree, NullTVB, offset, pad1Count, "Pad1: %s", format_text(pd + offset, pad1Count));
+      }
 
-      proto_tree_add_text(tree, offset, strlen(TransactName) + 1, "Transact Name: %s", TransactName);
+      offset += pad1Count; /* Skip Pad1 */
 
     }
 
-    offset += strlen(TransactName) + 1; /* Skip Transact Name */
+    if (ParameterCount > 0) {
+
+      /* Build display for: Parameters */
 
-    if (offset % 2) {
+      if (tree) {
 
-      /* Build display for: Pad1 */
+       proto_tree_add_text(tree, NullTVB, SMB_offset + ParameterOffset, ParameterCount, "Parameters: %s", format_text(pd + SMB_offset + ParameterOffset, ParameterCount));
+
+      }
+
+      offset += ParameterCount; /* Skip Parameters */
 
-      Pad1 = GBYTE(pd, offset);
+    }
+
+    if (DataCount > 0 && offset < (SMB_offset + DataOffset)) {
+
+      int pad2Count = SMB_offset + DataOffset - offset;
+       
+      /* Build display for: Pad2 */
 
       if (tree) {
 
-       proto_tree_add_text(tree, offset, 1, "Pad1: %u", Pad1);
+       proto_tree_add_text(tree, NullTVB, offset, pad2Count, "Pad2: %s", format_text(pd + offset, pad2Count));
 
       }
-    
-      offset += 1; /* Skip Pad1 */
+
+      offset += pad2Count; /* Skip Pad2 */
 
     }
 
-    /* Let's see if we can decode this */
+    if (DataCount > 0) {
+
+      /* Build display for: Data */
+
+      Data = GBYTE(pd, offset);
+
+      if (tree) {
+
+       proto_tree_add_text(tree, NullTVB, SMB_offset + DataOffset, DataCount, "Data: %s", format_text(&pd[offset], DataCount));
 
-    dissect_transact_params(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, DataOffset, DataCount, ParameterOffset, ParameterCount, TransactName);
+      }
+
+      offset += DataCount; /* Skip Data */
 
+    }
   }
 
   if (dirn == 0) { /* Response(s) dissect code */
 
+    /* Pick up the last transact2 command and put it in the right places */
+
     if (check_col(fd, COL_INFO)) {
 
-      col_add_fstr(fd, COL_INFO, "%s %s", request_val -> last_transact_command, "Response");
+      col_add_fstr(fd, COL_INFO, "%s %s", decode_trans2_name(request_val -> last_transact2_command), "response");
 
     }
 
@@ -9327,7 +9268,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);
 
     }
 
@@ -9339,7 +9280,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);
 
     }
 
@@ -9351,7 +9292,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);
 
     }
 
@@ -9363,7 +9304,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, "Reserved2: %u", Reserved2);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved2: %u", Reserved2);
 
     }
 
@@ -9375,7 +9316,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, "Parameter Count: %u", ParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Count: %u", ParameterCount);
 
     }
 
@@ -9387,7 +9328,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, "Parameter Offset: %u", ParameterOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Offset: %u", ParameterOffset);
 
     }
 
@@ -9399,7 +9340,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, "Parameter Displacement: %u", ParameterDisplacement);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Displacement: %u", ParameterDisplacement);
 
     }
 
@@ -9411,7 +9352,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, "Data Count: %u", DataCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Count: %u", DataCount);
 
     }
 
@@ -9423,7 +9364,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, "Data Offset: %u", DataOffset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
     }
 
@@ -9435,7 +9376,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, "Data Displacement: %u", DataDisplacement);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Displacement: %u", DataDisplacement);
 
     }
 
@@ -9447,7 +9388,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, "Setup Count: %u", SetupCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Setup Count: %u", SetupCount);
 
     }
 
@@ -9459,28 +9400,31 @@ dissect_transact_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *p
 
     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) {
 
-      /* Hmmm, should code for all setup words ... */
+      int i = SetupCount;
 
       Setup = GSHORT(pd, offset);
 
-      if (tree) {
+      for (i = 1; i <= SetupCount; i++) {
+       
+       Setup = GSHORT(pd, offset);
 
-       proto_tree_add_text(tree, offset, 2, "Setup: %u", Setup);
+       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) */
@@ -9489,908 +9433,757 @@ dissect_transact_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);
 
     }
 
     offset += 2; /* Skip Byte Count (BCC) */
 
-    /* Build display for: Pad1 */
+    if (offset < (SMB_offset + ParameterOffset)) {
 
-    if (offset % 2) {
+      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 */
 
     }
 
-    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);
-
-  }
+    /* Build display for: Parameter */
 
-}
+    if (ParameterCount > 0) {
 
-/*
- * The routines for mailslot and pipe dissecting should be migrated to another 
- * file soon?
- */
+      if (tree) {
 
-#define NETSHAREENUM   0x00  /* 00  */
-#define NETSERVERENUM2 0x68  /* 104 */
+       proto_tree_add_text(tree, NullTVB, offset, ParameterCount, "Parameter: %s", format_text(pd + SMB_offset + ParameterOffset, ParameterCount));
 
-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"));
+      }
 
-}
+      offset += ParameterCount; /* Skip Parameter */
 
-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;
-  char                *ParameterDescriptor;
-  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 (DataCount > 0 && offset < (SMB_offset + DataOffset)) {
 
-  if (dirn == 1) { /* The request side */
+      int pad2Count = SMB_offset + DataOffset - offset;
+       
+      /* Build display for: Pad2 */
 
-    FunctionCode = GSHORT(pd, loc_offset);
+      if (tree) {
 
-    si.request_val -> last_lanman_cmd = FunctionCode;
+       proto_tree_add_text(tree, NullTVB, offset, pad2Count, "Pad2: %s", format_text(pd + offset, pad2Count));
 
-    switch (FunctionCode) {
+      }
 
-    case NETSERVERENUM2:  /* Process a NetServerEnum2 */
+      offset += pad2Count; /* Skip Pad2 */
 
-      if (check_col(fd, COL_INFO)) {
+    }
 
-       col_add_fstr(fd, COL_INFO, "NetServerEnum2 %s", dirn ? "Request" : "Response");
+    /* Build display for: Data */
 
-      }
+    if (DataCount > 0) {
 
       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");
+       proto_tree_add_text(tree, NullTVB, offset, DataCount, "Data: %s", format_text(pd + SMB_offset + DataOffset, DataCount));
 
       }
 
-      loc_offset += 2;
+      offset += DataCount; /* Skip Data */
+
+    }
 
-      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) {
+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, int SetupAreaOffset, int SetupCount, const char *TransactName)
+{
+  char             *TransactNameCopy;
+  char             *trans_type = NULL, *trans_cmd, *loc_of_slash = NULL;
+  int              index;
+  const gchar      *Data;
 
-       proto_tree_add_text(lanman_tree, loc_offset, strlen(ParameterDescriptor) + 1, "Parameter Descriptor: %s", ParameterDescriptor);
+  if (!TransactName)
+         return;
 
-      }
+  TransactNameCopy = g_malloc(TransactName ? strlen(TransactName) + 1 : 1);
+
+  /* Should check for error here ... */
 
-      loc_offset += strlen(ParameterDescriptor) + 1;
+  strcpy(TransactNameCopy, TransactName ? TransactName : "");
+  if (TransactNameCopy[0] == '\\') {
+    trans_type = TransactNameCopy + 1;  /* Skip the slash */
+    loc_of_slash = trans_type ? strchr(trans_type, '\\') : NULL;
+  }
 
-      ReturnDescriptor = pd + loc_offset;
+  if (loc_of_slash) {
+    index = loc_of_slash - trans_type;  /* Make it a real index */
+    trans_cmd = trans_type + index + 1;
+    trans_type[index] = '\0';
+  }
+  else
+    trans_cmd = NULL;
 
-      if (si.request_val -> last_data_descrip) g_free(si.request_val -> last_data_descrip);
+  if ((trans_cmd == NULL) ||
+      (((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) {
 
-      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);
+      /* Build display for: Parameters */
       
       if (tree) {
 
-       proto_tree_add_text(lanman_tree, loc_offset, strlen(ReturnDescriptor) + 1, "Return Descriptor: %s", ReturnDescriptor);
-
+       proto_tree_add_text(tree, NullTVB, SMB_offset + ParameterOffset, ParameterCount, "Parameters: %s", format_text(pd + SMB_offset + ParameterOffset, ParameterCount));
+         
       }
+       
+      offset = SMB_offset + ParameterOffset + ParameterCount; /* Skip Parameters */
 
-      loc_offset += strlen(ReturnDescriptor) + 1;
+    }
+
+    if (DataCount > 0 && offset < (SMB_offset + DataOffset)) {
 
-      Level = GSHORT(pd, loc_offset);
+      int pad2Count = SMB_offset + DataOffset - offset;
+       
+      /* Build display for: Pad2 */
 
       if (tree) {
 
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Info Detail Level: %u", Level);
+       proto_tree_add_text(tree, NullTVB, offset, pad2Count, "Pad2: %s", format_text(pd + offset, pad2Count));
 
       }
 
-      loc_offset += 2;
-      
-      RecvBufLen = GSHORT(pd, loc_offset);
-      
-      if (tree) {
+      offset += pad2Count; /* Skip Pad2 */
 
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Receive Buffer Length: %u", RecvBufLen);
+    }
 
-      }
+    if (DataCount > 0) {
 
-      loc_offset += 2;
+      /* Build display for: Data */
 
-      Flags = GWORD(pd, loc_offset);
+      Data = pd + SMB_offset + DataOffset;
 
       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);
+       proto_tree_add_text(tree, NullTVB, SMB_offset + DataOffset, DataCount, "Data: %s", format_text(pd + SMB_offset + DataOffset, DataCount));
 
       }
 
-      loc_offset += 4;
+      offset += DataCount; /* Skip Data */
 
-      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;
 
-    FunctionCode = si.request_val -> last_lanman_cmd;
+}
 
-    switch (FunctionCode) {
+void
+dissect_transact_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)
 
-    case NETSERVERENUM2:
+{
+  proto_tree    *Flags_tree;
+  proto_item    *ti;
+  guint8        WordCount;
+  guint8        SetupCount;
+  guint8        Reserved3;
+  guint8        Reserved1;
+  guint8        MaxSetupCount;
+  guint32       Timeout;
+  guint16       TotalParameterCount;
+  guint16       TotalDataCount;
+  guint16       Setup = 0;
+  guint16       Reserved2;
+  guint16       ParameterOffset;
+  guint16       ParameterDisplacement;
+  guint16       ParameterCount;
+  guint16       MaxParameterCount;
+  guint16       MaxDataCount;
+  guint16       Flags;
+  guint16       DataOffset;
+  guint16       DataDisplacement;
+  guint16       DataCount;
+  guint16       ByteCount;
+  int           TNlen;
+  const char    *TransactName;
+  conversation_t *conversation;
+  struct smb_request_key   request_key, *new_request_key;
+  struct smb_request_val   *request_val;
+  guint16      SetupAreaOffset;
 
-      if (check_col(fd, COL_INFO)) {
 
-       col_add_fstr(fd, COL_INFO, "NetServerEnum2 %s", dirn ? "Request" : "Response");
+  /*
+   * Find out what conversation this packet is part of
+   */
 
-      }
+  conversation = find_conversation(&pi.src, &pi.dst, pi.ptype,
+                                  pi.srcport, pi.destport, 0);
 
-      if (tree) {
+  if (conversation == NULL) {  /* Create a new conversation */
 
-       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");
+    conversation = conversation_new(&pi.src, &pi.dst, pi.ptype,
+                                   pi.srcport, pi.destport, NULL, 0);
 
-      }
+  }
 
-      loc_offset = SMB_offset + ParameterOffset;
-      Status = GSHORT(pd, loc_offset);
+  si.conversation = conversation;  /* Save this */
 
-      if (tree) {
+  /*
+   * Check for and insert entry in request hash table if does not exist
+   */
+  request_key.conversation = conversation->index;
+  request_key.mid          = si.mid;
 
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Status: %u", Status);
+  request_val = (struct smb_request_val *) g_hash_table_lookup(smb_request_hash, &request_key);
 
-      }
+  if (!request_val) { /* Create one */
 
-      loc_offset += 2;
+    new_request_key = g_mem_chunk_alloc(smb_request_keys);
+    new_request_key -> conversation = conversation -> index;
+    new_request_key -> mid          = si.mid;
 
-      Convert = GSHORT(pd, loc_offset);
+    request_val = g_mem_chunk_alloc(smb_request_vals);
+    request_val -> mid = si.mid;
+    request_val -> last_transact_command = NULL;
+    request_val -> last_param_descrip = NULL;
+    request_val -> last_data_descrip = NULL;
 
-      if (tree) {
+    g_hash_table_insert(smb_request_hash, new_request_key, request_val);
 
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Convert: %u", Convert);
+  }
 
-      }
+  si.request_val = request_val;  /* Save this for later */
 
-      loc_offset += 2;
+  if (dirn == 1) { /* Request(s) dissect code */
 
-      EntCount = GSHORT(pd, loc_offset);
+    /* Build display for: Word Count (WCT) */
 
-      if (tree) {
+    WordCount = GBYTE(pd, offset);
 
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Entry Count: %u", EntCount);
+    if (tree) {
 
-      }
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
-      loc_offset += 2;
+    }
 
-      AvailCount = GSHORT(pd, loc_offset);
+    offset += 1; /* Skip Word Count (WCT) */
 
-      if (tree) {
+    /* Build display for: Total Parameter Count */
 
-       proto_tree_add_text(lanman_tree, loc_offset, 2, "Available Entries: %u", AvailCount);
+    TotalParameterCount = GSHORT(pd, offset);
 
-      }
+    if (tree) {
 
-      loc_offset += 2;
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Total Parameter Count: %u", TotalParameterCount);
 
-      if (tree) {
+    }
 
-       ti = proto_tree_add_text(lanman_tree, loc_offset, 38 * EntCount, "Servers");
-       if (ti == NULL) { 
+    offset += 2; /* Skip Total Parameter Count */
 
-         printf("Null value returned from proto_tree_add_text\n");
-         exit(1);
+    /* Build display for: Total Data Count */
 
-       }
+    TotalDataCount = GSHORT(pd, offset);
 
-       server_tree = proto_item_add_subtree(ti, ett_lanman_servers);
+    if (tree) {
 
-      }
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Total Data Count: %u", TotalDataCount);
 
-      for (i = 1; i <= EntCount; i++) {
-       gchar       *Server = pd + loc_offset;
-       gint8       ServerMajor;
-       guint       ServerMinor;
-       guint32     ServerFlags;
-       gchar       *Comment;
+    }
 
-       if (tree) {
-         
-         proto_tree_add_text(server_tree, loc_offset, strlen(Server) + 1, "Server Name: %s", Server);
+    offset += 2; /* Skip Total Data Count */
+
+    /* Build display for: Max Parameter Count */
+
+    MaxParameterCount = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max Parameter Count: %u", MaxParameterCount);
+
+    }
+
+    offset += 2; /* Skip Max Parameter Count */
+
+    /* Build display for: Max Data Count */
+
+    MaxDataCount = GSHORT(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Max Data Count: %u", MaxDataCount);
+
+    }
+
+    offset += 2; /* Skip Max Data Count */
+
+    /* Build display for: Max Setup Count */
+
+    MaxSetupCount = GBYTE(pd, offset);
+
+    if (tree) {
+
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Max Setup Count: %u", MaxSetupCount);
+
+    }
+
+    offset += 1; /* Skip Max Setup Count */
+
+    /* Build display for: Reserved1 */
+
+    Reserved1 = GBYTE(pd, offset);
 
+    if (tree) {
 
-       }
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Reserved1: %u", Reserved1);
 
-       loc_offset += 16;
+    }
 
-       ServerMajor = GBYTE(pd, loc_offset);
+    offset += 1; /* Skip Reserved1 */
 
-       if (tree) {
+    /* Build display for: Flags */
 
-         proto_tree_add_text(server_tree, loc_offset, 1, "Major Version: %u", ServerMajor);
+    Flags = GSHORT(pd, offset);
 
-       }
+    if (tree) {
 
-       loc_offset += 1;
+      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, NullTVB, offset, 2, "%s",
+                          decode_boolean_bitfield(Flags, 0x01, 16, "Also disconnect TID", "Dont disconnect TID"));
+      proto_tree_add_text(Flags_tree, NullTVB, offset, 2, "%s",
+                          decode_boolean_bitfield(Flags, 0x02, 16, "One way transaction", "Two way transaction"));
+    
+}
 
-       ServerMinor = GBYTE(pd, loc_offset);
+    offset += 2; /* Skip Flags */
 
-       if (tree) {
+    /* Build display for: Timeout */
 
-         proto_tree_add_text(server_tree, loc_offset, 1, "Minor Version: %u", ServerMinor);
+    Timeout = GWORD(pd, offset);
 
-       }
+    if (tree) {
 
-       loc_offset += 1;
+      proto_tree_add_text(tree, NullTVB, offset, 4, "Timeout: %u", Timeout);
 
-       ServerFlags = GWORD(pd, loc_offset);
+    }
 
-       if (tree) {
+    offset += 4; /* Skip Timeout */
 
-         ti = proto_tree_add_text(server_tree, 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);
+    /* Build display for: Reserved2 */
 
-       }
+    Reserved2 = GSHORT(pd, offset);
 
-       loc_offset += 4;
+    if (tree) {
 
-       Comment = pd + SMB_offset + DataOffset + GWORD(pd, loc_offset);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved2: %u", Reserved2);
 
-       if (tree) {
+    }
 
-         proto_tree_add_text(server_tree, loc_offset, 4, "Server Comment: %s", Comment);
+    offset += 2; /* Skip Reserved2 */
 
-       }
+    /* Build display for: Parameter Count */
 
-       loc_offset += 4;
+    ParameterCount = GSHORT(pd, offset);
 
-      }
+    if (tree) {
 
-      return 1;
-      break;
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Count: %u", ParameterCount);
 
     }
 
-  }
-
-  return 0;
+    offset += 2; /* Skip Parameter Count */
 
-}
+    /* Build display for: Parameter Offset */
 
-guint32
-dissect_pipe_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn, const u_char *command, int DataOffset, int DataCount, int ParameterOffset, int ParameterCount)
-{
+    ParameterOffset = GSHORT(pd, offset);
 
-  if (strcmp(command, "LANMAN") == 0) { /* Try to decode a LANMAN */
+    if (tree) {
 
-    return dissect_pipe_lanman(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, command, DataOffset, DataCount, ParameterOffset, ParameterCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Offset: %u", ParameterOffset);
 
-  }
+    }
 
-  return 0;
+    offset += 2; /* Skip Parameter Offset */
 
-}
+    /* Build display for: Data Count */
 
-char *browse_commands[] = 
-{ "Error, No such command!",       /* Value 0 */
-  "Host Announcement",             /* Value 1 */
-  "Request Announcement",          /* Value 2 */
-  "Error, No such command!",       /* Value 3 */
-  "Error, No such command!",       /* Value 4 */
-  "Error, No such command!",       /* Value 5 */
-  "Error, No such command!",       /* Value 6 */
-  "Error, No such command!",       /* Value 7 */
-  "Browser Election Request",      /* Value 8 */
-  "Get Backup List Request",       /* Value 9 */
-  "Get Backup List Response",      /* Value 10 */
-  "Become Backup Browser",         /* Value 11 */
-  "Domain/Workgroup Announcement", /* Value 12 */
-  "Master Announcement",           /* Value 13 */
-  "Error! No such command",        /* Value 14 */
-  "Local Master Announcement"      /* Value 15 */
-};
+    DataCount = GSHORT(pd, offset);
 
-#define HOST_ANNOUNCE        1
-#define REQUEST_ANNOUNCE     2
-#define BROWSER_ELECTION     8
-#define GETBACKUPLISTREQ     9
-#define GETBACKUPLISTRESP   10
-#define BECOMEBACKUPBROWSER 11
-#define DOMAINANNOUNCEMENT  12
-#define MASTERANNOUNCEMENT  13
-#define LOCALMASTERANNOUNC  15
-
-char *svr_types[32] = {
-  "Workstation",
-  "Server",
-  "SQL Server",
-  "Domain Controller",
-  "Backup Controller",
-  "Time Source",
-  "Apple Server",
-  "Novell Server",
-  "Domain Member Server",
-  "Print Queue Server",
-  "Dialin Server",
-  "Xenix Server",
-  "NT Workstation",
-  "Windows for Workgroups",
-  "Unknown Server - FIXME",
-  "NT Server",
-  "Potential Browser",
-  "Backup Browser",
-  "Master Browser",
-  "Domain Master Browser",
-  "OSF",
-  "VMS",
-  "Windows 95 or above",
-  "Unused",
-  "Unused",
-  "Unused",
-  "Unused",
-  "Unused",
-  "Unused",
-  "Unused",
-  "Local List Only",
-  "Domain Enum"
-};
+    if (tree) {
 
-guint32 
-dissect_mailslot_browse(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn, const u_char *command, int DataOffset, int DataCount)
-{
-  guint8               OpCode;
-  guint8               UpdateCount;
-  guint8               VersionMajor;
-  guint8               VersionMinor;
-  guint32              Periodicity;
-  guint32              ServerType;
-  guint16              SigConstant;
-  guint32              Token;
-  guint8               BackupServerCount;
-  guint8               Flags;
-  guint32              MBZ;
-  guint8               ElectionVersion;
-  guint32              ElectionCriteria;
-  guint8               ElectionOS;
-  guint8               ElectionDesire;
-  guint16              ElectionRevision;
-  guint32              ServerUpTime;
-  const char           *ServerName;
-  const char           *ServerComment;
-  proto_tree           *browse_tree = NULL, *flags_tree = NULL, 
-                       *OSflags = NULL, *DesireFlags = NULL;
-  proto_item           *ti, *ec;
-  guint32              loc_offset = DataOffset, count = 0;
-  int                  i;
-
-  if (check_col(fd, COL_PROTOCOL))
-    col_add_str(fd, COL_PROTOCOL, "BROWSER");
-
-  if (check_col(fd, COL_INFO)) /* Put in something, and replace it later */
-    col_add_str(fd, COL_INFO, "Browse Announcement");
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Count: %u", DataCount);
 
-  /*
-   * Now, decode the browse request 
-   */
+    }
 
-  OpCode = GBYTE(pd, loc_offset);
+    offset += 2; /* Skip Data Count */
 
-  if (check_col(fd, COL_INFO))
-    col_add_fstr(fd, COL_INFO, (OpCode > (sizeof(browse_commands)/sizeof(char *))) ? "Error, No Such Command:%u" : browse_commands[OpCode], OpCode);
-    
-  if (tree) {  /* Add the browse tree */
+    /* Build display for: Data Offset */
 
-    ti = proto_tree_add_item(parent, proto_browse, DataOffset, DataCount, NULL);
-    browse_tree = proto_item_add_subtree(ti, ett_browse);
+    DataOffset = GSHORT(pd, offset);
 
-    proto_tree_add_text(browse_tree, loc_offset, 1, "OpCode: %s", (OpCode > (sizeof(browse_commands)/sizeof(char *))) ? "Error, No Such Command" : browse_commands[OpCode]);
+    if (tree) {
 
-  }
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
-  loc_offset += 1;    /* Skip the OpCode */
+    }
 
-  switch (OpCode) {
+    offset += 2; /* Skip Data Offset */
 
-  case DOMAINANNOUNCEMENT:
-  case LOCALMASTERANNOUNC:
-  case HOST_ANNOUNCE:
+    /* Build display for: Setup Count */
 
-    UpdateCount = GBYTE(pd, loc_offset);
+    SetupCount = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Update Count: %u", UpdateCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Setup Count: %u", SetupCount);
 
     }
 
-    loc_offset += 1;  /* Skip the Update Count */
+    offset += 1; /* Skip Setup Count */
+
+    /* Build display for: Reserved3 */
 
-    Periodicity = GWORD(pd, loc_offset);
+    Reserved3 = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 4, "Update Periodicity: %u Sec", Periodicity/1000 );
-
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Reserved3: %u", Reserved3);
     }
 
-    loc_offset += 4;
-
-    ServerName = pd + loc_offset;
+    offset += 1; /* Skip Reserved3 */
+    SetupAreaOffset = offset;
 
-    if (check_col(fd, COL_INFO)) {
+    /* Build display for: Setup */
 
-      col_append_fstr(fd, COL_INFO, " %s", ServerName);
+    if (SetupCount > 0) {
 
-    }
+      int i = SetupCount;
 
-    if (tree) {
+      Setup = GSHORT(pd, offset);
 
-      proto_tree_add_text(browse_tree, loc_offset, 16, (OpCode == DOMAINANNOUNCEMENT) ? "Domain/WorkGroup: %s": "Host Name: %s", ServerName);
+      for (i = 1; i <= SetupCount; i++) {
+       
+       Setup = GSHORT(pd, offset);
 
-    }
+       if (tree) {
 
-    loc_offset += 16;
+         proto_tree_add_text(tree, NullTVB, offset, 2, "Setup%i: %u", i, Setup);
 
-    VersionMajor = GBYTE(pd, loc_offset);
+       }
 
-    if (tree) {
+       offset += 2; /* Skip Setup */
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Major Version: %u", VersionMajor);
+      }
 
     }
 
-    loc_offset += 1;
+    /* Build display for: Byte Count (BCC) */
 
-    VersionMinor = GBYTE(pd, loc_offset);
+    ByteCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Minor Version: %u", VersionMinor);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Byte Count (BCC): %u", ByteCount);
 
     }
 
-    loc_offset += 1;
+    offset += 2; /* Skip Byte Count (BCC) */
+
+    /* Build display for: Transact Name */
 
-    ServerType = GWORD(pd, loc_offset);
+    /* Watch out for Unicode names */
 
-    if (check_col(fd, COL_INFO)) {
+    if (si.unicode) {
 
-      /* Append the type(s) of the system to the COL_INFO line ... */
+      if (offset % 2) offset++;   /* Looks like a pad byte there sometimes */
 
-      for (i = 1; i <= 32; i++) {
+      TransactName = unicode_to_str(pd + offset, &TNlen);
+      TNlen += 2;
 
-       if (ServerType & (1 << (i - 1)) && (strcmp("Unused", svr_types[i]) != 0))
-           col_append_fstr(fd, COL_INFO, ", %s", svr_types[i - 1]);
-       
-      }
-      
+    }
+    else { 
+      TransactName = pd + offset;
+      TNlen = strlen(TransactName) + 1;
     }
 
-    if (tree) {
+    if (request_val -> last_transact_command) g_free(request_val -> last_transact_command);
 
-      ti = proto_tree_add_text(browse_tree, loc_offset, 4, "Server Type: 0x%04x", ServerType);
-      flags_tree = proto_item_add_subtree(ti, ett_browse_flags);
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0001, 32, "Workstation", "Not Workstation"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0002, 32, "Server", "Not Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0004, 32, "SQL Server", "Not SQL Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0008, 32, "Domain Controller", "Not Domain Controller"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0010, 32, "Backup Controller", "Not Backup Controller"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0020, 32, "Time Source", "Not Time Source"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0040, 32, "Apple Server", "Not Apple Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0080, 32, "Novell Server", "Not Novell Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0100, 32, "Domain Member Server", "Not Domain Member Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0200, 32, "Print Queue Server", "Not Print Queue Server"));      
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0400, 32, "Dialin Server", "Not Dialin Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x0800, 32, "Xenix Server", "Not Xenix Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x1000, 32, "NT Workstation", "Not NT Workstation"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x2000, 32, "Windows for Workgroups", "Not Windows for Workgroups"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x8000, 32, "NT Server", "Not NT Server"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x10000, 32, "Potential Browser", "Not Potential Browser"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x20000, 32, "Backup Browser", "Not Backup Browser"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x40000, 32, "Master Browser", "Not Master Browser"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x80000, 32, "Domain Master Browser", "Not Domain Master Browser"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x100000, 32, "OSF", "Not OSF"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x200000, 32, "VMS", "Not VMS"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x400000, 32, "Windows 95 or above", "Not Windows 95 or above"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x40000000, 32, "Local List Only", "Not Local List Only"));
-      proto_tree_add_text(flags_tree, loc_offset, 4, "%s",
-                         decode_boolean_bitfield(ServerType, 0x80000000, 32, "Domain Enum", "Not Domain Enum"));
-    }
-    loc_offset += 4;
-    
-    ElectionVersion = GSHORT(pd, loc_offset);
-    
-    if (tree) {
-      
-      proto_tree_add_text(browse_tree, loc_offset, 2, "Election Version: %u", ElectionVersion);
+    request_val -> last_transact_command = g_malloc(strlen(TransactName) + 1);
 
-    }
+    if (request_val -> last_transact_command) 
+      strcpy(request_val -> last_transact_command, TransactName);
+
+    if (check_col(fd, COL_INFO)) {
 
-    loc_offset += 2;
+      col_add_fstr(fd, COL_INFO, "%s %s", TransactName, (dirn ? "Request" : "Response"));
 
-    SigConstant = GSHORT(pd, loc_offset);
+    }
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 2, "Signature: %u (0x%04X)", SigConstant, SigConstant);
+      proto_tree_add_text(tree, NullTVB, offset, TNlen, "Transact Name: %s", TransactName);
 
     }
 
-    loc_offset += 2;
+    offset += TNlen; /* Skip Transact Name */
+    if (si.unicode) offset += 2;   /* There are two more extraneous bytes there*/
 
-    ServerComment = pd + loc_offset;
+    if (offset < (SMB_offset + ParameterOffset)) {
 
-    if (tree) {
+      int pad1Count = SMB_offset + ParameterOffset - offset;
+
+      /* Build display for: Pad1 */
 
-      proto_tree_add_text(browse_tree, loc_offset, strlen(ServerComment) + 1, "Host Comment: %s", ServerComment);
+      if (tree) {
+
+       proto_tree_add_text(tree, NullTVB, offset, pad1Count, "Pad1: %s", format_text(pd + offset, pad1Count));
+      }
+
+      offset += pad1Count; /* Skip Pad1 */
 
     }
 
-    break;
+    /* Let's see if we can decode this */
 
-  case REQUEST_ANNOUNCE:
+    dissect_transact_params(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, DataOffset, DataCount, ParameterOffset, ParameterCount, SetupAreaOffset, SetupCount, TransactName);
 
-    Flags = GBYTE(pd, loc_offset);
+  }
 
-    if (tree) {
+  if (dirn == 0) { /* Response(s) dissect code */
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Unused Flags: %u", Flags);
+    if (check_col(fd, COL_INFO)) {
+      if ( request_val -> last_transact_command )
+        col_add_fstr(fd, COL_INFO, "%s %s", request_val -> last_transact_command, "Response");
+      else col_add_fstr(fd, COL_INFO, "Response to unknown message");
 
     }
 
-    loc_offset += 1;
+    /* Build display for: Word Count (WCT) */
 
-    ServerName = pd + loc_offset;
+    WordCount = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, strlen(ServerName) + 1, "Send List To: %s", ServerName);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Word Count (WCT): %u", WordCount);
 
     }
 
-    break;
+    offset += 1; /* Skip Word Count (WCT) */
 
-  case BROWSER_ELECTION:
+    /* Build display for: Total Parameter Count */
 
-    ElectionVersion = GBYTE(pd, loc_offset);
+    TotalParameterCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Election Version = %u", ElectionVersion);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Total Parameter Count: %u", TotalParameterCount);
 
     }
 
-    loc_offset += 1;
+    offset += 2; /* Skip Total Parameter Count */
+
+    /* Build display for: Total Data Count */
 
-    ElectionCriteria = GWORD(pd, loc_offset);
-    ElectionOS       = GBYTE(pd, loc_offset + 3);
-    ElectionRevision = GSHORT(pd, loc_offset + 1);
-    ElectionDesire   = GBYTE(pd, loc_offset);
+    TotalDataCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      ti = proto_tree_add_text(browse_tree, loc_offset, 4, "Election Criteria = %u (0x%08X)", ElectionCriteria, ElectionCriteria);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Total Data Count: %u", TotalDataCount);
 
-      ec = proto_item_add_subtree(ti, ett_browse_election_criteria);
+    }
 
-      ti = proto_tree_add_text(ec, loc_offset + 3, 1, "Election OS Summary: %u (0x%02X)", ElectionOS, ElectionOS);
+    offset += 2; /* Skip Total Data Count */
 
-      OSflags = proto_item_add_subtree(ti, ett_browse_election_os);
+    /* Build display for: Reserved2 */
 
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                           decode_boolean_bitfield(ElectionOS, 0x01, 8, "Windows for Workgroups", "Not Windows for Workgroups"));
-      
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x02, 8, "Unknown", "Not used"));
+    Reserved2 = GSHORT(pd, offset);
 
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x04, 8, "Unknown", "Not used"));
+    if (tree) {
 
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x08, 8, "Unknown", "Not used"));
-      
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x10, 8, "Windows NT Workstation", "Not Windows NT Workstation"));
-      
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x20, 8, "Windows NT Server", "Not Windows NT Server"));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Reserved2: %u", Reserved2);
 
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x40, 8, "Unknown", "Not used"));
+    }
 
-      proto_tree_add_text(OSflags, loc_offset + 3, 1, "%s",
-                         decode_boolean_bitfield(ElectionOS, 0x80, 8, "Unknown", "Not used"));
+    offset += 2; /* Skip Reserved2 */
 
-      proto_tree_add_text(ec, loc_offset + 1, 2, "Election Revision: %u (0x%04X)", ElectionRevision, ElectionRevision);
+    /* Build display for: Parameter Count */
 
-      ti = proto_tree_add_text(ec, loc_offset, 1, "Election Desire Summary: %u (0x%02X)", ElectionDesire, ElectionDesire);
+    ParameterCount = GSHORT(pd, offset);
 
-      DesireFlags = proto_item_add_subtree(ti, ett_browse_election_desire);
+    if (tree) {
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x01, 8, "Backup Browse Server", "Not Backup Browse Server"));
-      
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x02, 8, "Standby Browse Server", "Not Standby Browse Server"));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Count: %u", ParameterCount);
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x04, 8, "Master Browser", "Not Master Browser"));
+    }
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x08, 8, "Domain Master Browse Server", "Not Domain Master Browse Server"));
+    offset += 2; /* Skip Parameter Count */
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x10, 8, "Unknown", "Not used"));
+    /* Build display for: Parameter Offset */
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x20, 8, "WINS Client", "Not WINS Client"));
+    ParameterOffset = GSHORT(pd, offset);
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x40, 8, "Unknown", "Not used"));
+    if (tree) {
 
-      proto_tree_add_text(DesireFlags, loc_offset, 1, "%s",
-                         decode_boolean_bitfield(ElectionDesire, 0x80, 8, "Windows NT Advanced Server", "Not Windows NT Advanced Server"));
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Offset: %u", ParameterOffset);
 
     }
 
-    loc_offset += 4;
+    offset += 2; /* Skip Parameter Offset */
+
+    /* Build display for: Parameter Displacement */
 
-    ServerUpTime = GWORD(pd, loc_offset);
+    ParameterDisplacement = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 4, "Server Up Time: %u Sec", ServerUpTime/1000);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Parameter Displacement: %u", ParameterDisplacement);
 
     }
 
-    loc_offset += 4;
-
-    MBZ = GWORD(pd, loc_offset);
+    offset += 2; /* Skip Parameter Displacement */
 
-    loc_offset += 4;
+    /* Build display for: Data Count */
 
-    ServerName = pd + loc_offset;
+    DataCount = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, strlen(ServerName) + 1, "Election Server Name: %s", ServerName);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Count: %u", DataCount);
 
     }
 
-    break;
+    offset += 2; /* Skip Data Count */
 
-  case GETBACKUPLISTREQ:
+    /* Build display for: Data Offset */
 
-    BackupServerCount = GBYTE(pd, loc_offset);
+    DataOffset = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Backup List Requested Count: %u", BackupServerCount);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Offset: %u", DataOffset);
 
     }
 
-    loc_offset += 1;
+    offset += 2; /* Skip Data Offset */
+
+    /* Build display for: Data Displacement */
 
-    Token = GWORD(pd, loc_offset);
+    DataDisplacement = GSHORT(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 4, "Backup Request Token: %u", Token);
+      proto_tree_add_text(tree, NullTVB, offset, 2, "Data Displacement: %u", DataDisplacement);
 
     }
 
-    break;
+    offset += 2; /* Skip Data Displacement */
 
-  case GETBACKUPLISTRESP:
+    /* Build display for: Setup Count */
 
-    BackupServerCount = GBYTE(pd, loc_offset);
+    SetupCount = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 1, "Backup Server Count: %u", BackupServerCount);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Setup Count: %u", SetupCount);
 
     }
 
-    loc_offset += 1;
+    offset += 1; /* Skip Setup Count */
+
+    /* Build display for: Reserved3 */
 
-    Token = GWORD(pd, loc_offset);
+    Reserved3 = GBYTE(pd, offset);
 
     if (tree) {
 
-      proto_tree_add_text(browse_tree, loc_offset, 4, "Backup Response Token: %u", Token);
+      proto_tree_add_text(tree, NullTVB, offset, 1, "Reserved3: %u", Reserved3);
 
     }
 
-    loc_offset += 4;
+    offset += 1; /* Skip Reserved3 */
+    SetupAreaOffset = offset;  
 
-    ServerName = pd + loc_offset;
+    /* Build display for: Setup */
 
-    for (count = 1; count <= BackupServerCount; count++) {
+    if (SetupCount > 0) {
 
-      if (tree) {
+      int i = SetupCount;
 
-       proto_tree_add_text(browse_tree, loc_offset, strlen(ServerName) + 1, "Backup Server: %s", ServerName);
+      Setup = GSHORT(pd, offset);
 
-      }
+      for (i = 1; i <= SetupCount; i++) {
+       
+       Setup = GSHORT(pd, offset);
 
-      loc_offset += strlen(ServerName) + 1;
+       if (tree) {
 
-      ServerName = pd + loc_offset;
+         proto_tree_add_text(tree, NullTVB, offset, 2, "Setup%i: %u", i, Setup);
 
-    }
+       }
 
-    break;
+       offset += 2; /* Skip Setup */
+
+      }
 
-  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 */
@@ -10435,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 */
@@ -10735,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}
 };
 
@@ -10764,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) {
@@ -10806,13 +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 */
 
@@ -10824,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");
 
        }
 
@@ -10840,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 */
 
@@ -10887,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"));
 
@@ -10927,49 +10747,51 @@ 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"));
 
        }
 
+       if (flags2 & 0x8000) si.unicode = 1; /* Mark them as Unicode */
+
        offset += 2;
 
        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");
 
        }
 
@@ -10982,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); 
 
        }
 
@@ -10995,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); 
 
        }
 
@@ -11008,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); 
 
        }
        
@@ -11021,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); 
 
        }
 
@@ -11035,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,
@@ -11060,19 +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
        };
 
-        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();
+
 }