QSIG fully implemented
[obnox/wireshark/wip.git] / epan / dissectors / packet-ndps.c
index 13f92d64ebfefbcda2a3d96b58507d2470c362a4..3cdcab7555ae297195aaef634ea02116342dd432 100644 (file)
@@ -5,8 +5,8 @@
  *
  * $Id$
  *
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
  * This program is free software; you can redistribute it and/or
 #include <glib.h>
 #include <epan/packet.h>
 #include <epan/prefs.h>
+#include <epan/emem.h>
+#include <epan/strutil.h>
 #include "packet-ipx.h"
 #include "packet-tcp.h"
 #include <epan/conversation.h>
 #include "packet-ndps.h"
 #include <epan/reassemble.h>
-#include <epan/emem.h>
 #include <epan/expert.h>
 
 /* Limit the number of items we can add to the tree. */
@@ -1999,74 +2000,50 @@ align_4(tvbuff_t *tvb, int aoffset)
        return 0;
 }
 
+/*
+ * XXX - is there something in the packet to indicate whether a string
+ * is ASCII or Unicode, or is it a characteristic of the attribute?
+ * Currently, we use a heuristic - if the length is odd, we assume
+ * it's ASCII (as it's a length in bytes, not characters), otherwise if
+ * if the length is 2, we assume it's ASCII (as strings are null-
+ * terminated, so a Unicode string would have to be at least 4 bytes),
+ * otherwise if the second byte of the string is 0, we assume it's
+ * Unicode (as an ASCII string would, in that case, have at least two
+ * characters before the terminating NUL).
+ */
 static int
-ndps_string(tvbuff_t* tvb, int hfinfo, proto_tree *ndps_tree, int offset, char *stringval, size_t buflen)
+ndps_string(tvbuff_t* tvb, int hfinfo, proto_tree *ndps_tree, int offset, char **stringval)
 {
-        int     foffset = offset;
-        guint32 str_length;
-        char    buffer[1024];
-        guint32 i;
-        guint16 c_char;
-        guint32 length_remaining = 0;
-        
-        if (stringval == NULL) {
-                stringval = buffer;
-                buflen = sizeof buffer;
-        }
-        str_length = tvb_get_ntohl(tvb, foffset);
-        foffset += 4;
-        length_remaining = tvb_length_remaining(tvb, foffset);
-        if(str_length > (guint)length_remaining || str_length > 1024)
-        {
-                proto_tree_add_string(ndps_tree, hfinfo, tvb, foffset,
-                    length_remaining + 4, "<String too long to process>");
-                foffset += length_remaining;
-                return foffset;
-        }
-        if(str_length == 0)
-        {
-                   proto_tree_add_string(ndps_tree, hfinfo, tvb, offset,
-                4, "<Not Specified>");
-            return foffset;
-        }
-        for ( i = 0; i < str_length; i++ )
-        {
-                c_char = tvb_get_guint8(tvb, foffset );
-                if (c_char<0x20 || c_char>0x7e)
-                {
-                        if (c_char != 0x00)
-                        { 
-                                c_char = 0x2e;
-                                if (i < buflen - 1)
-                                       stringval[i] = c_char & 0xff;
-                        }
-                        else
-                        {
-                                i--;
-                                str_length--;
-                        }
-                }
-                else
-                {
-                       if (i < buflen - 1)
-                               stringval[i] = c_char & 0xff;
-                }
-                foffset++;
-                length_remaining--;
-                
-                if(length_remaining==1)
-                {
-                       i++;
-                       break;
-                }        
-        }
-        stringval[i] = '\0';
-        
-        str_length = tvb_get_ntohl(tvb, offset);
-        proto_tree_add_string(ndps_tree, hfinfo, tvb, offset+4,
-                str_length, stringval);
-        foffset += align_4(tvb, foffset);
+    int     foffset = offset;
+    guint32 str_length;
+    char *string;
+
+    str_length = tvb_get_ntohl(tvb, foffset);
+    foffset += 4;
+    if(str_length == 0)
+    {
+        proto_tree_add_string(ndps_tree, hfinfo, tvb, offset, 4, "<Not Specified>");
+        if (stringval != NULL)
+          *stringval = ep_strdup("");
         return foffset;
+    }
+    if (str_length <= 2 || (str_length & 0x01) || tvb_get_guint8(tvb, foffset + 1) != 0) {
+        /*
+         * ASCII.
+         */
+        string = tvb_get_string(tvb, foffset, str_length);
+    } else {
+        /*
+         * Unicode.
+         */
+        string = tvb_get_ephemeral_faked_unicode(tvb, foffset, str_length/2, TRUE);
+    }
+    foffset += str_length;
+    proto_tree_add_string(ndps_tree, hfinfo, tvb, offset, str_length + 4, string);
+    foffset += align_4(tvb, foffset);
+    if (stringval != NULL)
+        *stringval = string;
+    return foffset;
 }
 
 static int
@@ -2078,7 +2055,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     proto_tree  *atree;
     proto_item  *aitem;
     gboolean    found=TRUE;
+
     length = tvb_get_ntohl(tvb, foffset);
     if (length==0)
     {
@@ -2094,7 +2071,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     case 9:
         label_value = tvb_get_ntohl(tvb, foffset+5);
         label = match_strval(label_value, object_ids_7);
-        if (label==NULL) 
+        if (label==NULL)
         {
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
             found=FALSE;
@@ -2105,7 +2082,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     case 10:
         label_value = tvb_get_ntohl(tvb, foffset+6);
         label = match_strval(label_value, object_ids_8);
-        if (label==NULL) 
+        if (label==NULL)
         {
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
             found=FALSE;
@@ -2116,7 +2093,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     case 11:
         label_value = tvb_get_ntohl(tvb, foffset+7);
         label = match_strval(label_value, object_ids_9);
-        if (label==NULL) 
+        if (label==NULL)
         {
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
             found=FALSE;
@@ -2127,7 +2104,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     case 12:
         label_value = tvb_get_ntohl(tvb, foffset+8);
         label = match_strval(label_value, object_ids_10);
-        if (label==NULL) 
+        if (label==NULL)
         {
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
             found=FALSE;
@@ -2138,7 +2115,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     case 13:
         label_value = tvb_get_ntohl(tvb, foffset+9);
         label = match_strval(label_value, object_ids_11);
-        if (label==NULL) 
+        if (label==NULL)
         {
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
             found=FALSE;
@@ -2149,7 +2126,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     case 14:
         label_value = tvb_get_ntohl(tvb, foffset+10);
         label = match_strval(label_value, object_ids_12);
-        if (label==NULL) 
+        if (label==NULL)
         {
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
             found=FALSE;
@@ -2160,7 +2137,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     case 15:
         label_value = tvb_get_ntohl(tvb, foffset+11);
         label = match_strval(label_value, object_ids_13);
-        if (label==NULL) 
+        if (label==NULL)
         {
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
             found=FALSE;
@@ -2171,7 +2148,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     case 16:
         label_value = tvb_get_ntohl(tvb, foffset+12);
         label = match_strval(label_value, object_ids_14);
-        if (label==NULL) 
+        if (label==NULL)
         {
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
             found=FALSE;
@@ -2182,7 +2159,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     case 17:
         label_value = tvb_get_ntohl(tvb, foffset+13);
         label = match_strval(label_value, object_ids_15);
-        if (label==NULL) 
+        if (label==NULL)
         {
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
             found=FALSE;
@@ -2193,7 +2170,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     case 18:
         label_value = tvb_get_ntohl(tvb, foffset+14);
         label = match_strval(label_value, object_ids_16);
-        if (label==NULL) 
+        if (label==NULL)
         {
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
             found=FALSE;
@@ -2206,7 +2183,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
         found=FALSE;
         break;
     }
-    if (!found) 
+    if (!found)
     {
         label_value = 1;
         label = match_strval(label_value, object_ids_7);
@@ -2224,7 +2201,7 @@ objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     }
     else
     {
-        if (!found) 
+        if (!found)
         {
             tvb_ensure_bytes_exist(tvb, foffset, length);
             foffset += length;
@@ -2261,7 +2238,7 @@ name_or_id(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
             break;
 
         case 2: /* Local */
-            foffset = ndps_string(tvb, hf_local_object_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_local_object_name, ndps_tree, foffset, NULL);
             break;
     }
     foffset += align_4(tvb, foffset);
@@ -2278,12 +2255,12 @@ qualifiedname(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     foffset += 4;
     if (qualified_name_type != 0) {
         if (qualified_name_type == 1) {
-            foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset, NULL);
         }
         else
         {
-            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
-            foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
+            foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
         }
     }
     return foffset;
@@ -2295,22 +2272,22 @@ objectidentification(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     guint32     object_type=0;
     proto_tree  *atree;
     proto_item  *aitem;
-      
-    object_type = tvb_get_ntohl(tvb, foffset); 
+
+    object_type = tvb_get_ntohl(tvb, foffset);
     aitem = proto_tree_add_item(ndps_tree, hf_obj_id_type, tvb, foffset, 4, FALSE);
     atree = proto_item_add_subtree(aitem, ett_ndps);
     foffset += 4;
     switch(object_type)
     {
         case 0:         /* Printer Contained Object ID */
-            foffset = ndps_string(tvb, hf_printer_name, atree, foffset, NULL, 0);
-            proto_tree_add_item(atree, hf_ndps_object, tvb, foffset, 
+            foffset = ndps_string(tvb, hf_printer_name, atree, foffset, NULL);
+            proto_tree_add_item(atree, hf_ndps_object, tvb, foffset,
             4, FALSE);
             foffset += 4;
             break;
         case 1:         /* Document Identifier */
-            foffset = ndps_string(tvb, hf_printer_name, atree, foffset, NULL, 0);
-            proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset, 
+            foffset = ndps_string(tvb, hf_printer_name, atree, foffset, NULL);
+            proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset,
             4, FALSE);
             foffset += 4;
             break;
@@ -2318,7 +2295,7 @@ objectidentification(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
             foffset = objectidentifier(tvb, atree, foffset);
             break;
         case 3:         /* Object Name */
-            foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
             if (foffset > tvb_length_remaining(tvb, foffset)) {
                 return foffset;
             }
@@ -2328,18 +2305,18 @@ objectidentification(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
             foffset = name_or_id(tvb, atree, foffset);
             break;
         case 5:         /* Simple Name */
-            foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
             break;
         case 6:         /* Printer Configuration Object ID */
-            foffset = ndps_string(tvb, hf_printer_name, atree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_printer_name, atree, foffset, NULL);
             break;
         case 7:         /* Qualified Name */
             foffset = qualifiedname(tvb, ndps_tree, foffset);
             break;
         case 8:         /* Event Object ID */
-            foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
             foffset = objectidentifier(tvb, atree, foffset);
-            proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 
+            proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset,
             4, FALSE);
             foffset += 4;
         default:
@@ -2354,7 +2331,7 @@ print_address(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     guint32     address_type=0;
     guint32     address_len=0;
 
-    address_type = tvb_get_ntohl(tvb, foffset); 
+    address_type = tvb_get_ntohl(tvb, foffset);
     proto_tree_add_uint(ndps_tree, hf_ndps_address, tvb, foffset, 4, address_type);
     foffset += 4;
     address_len = tvb_get_ntohl(tvb, foffset);
@@ -2391,7 +2368,7 @@ address_item(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
 {
     guint32     address_type=0;
 
-    address_type = tvb_get_ntohl(tvb, foffset); 
+    address_type = tvb_get_ntohl(tvb, foffset);
     proto_tree_add_uint(ndps_tree, hf_address_type, tvb, foffset, 4, address_type);
     foffset += 4;
     switch(address_type)
@@ -2411,7 +2388,7 @@ address_item(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     case 10:
     case 11:
     case 12:
-        foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
         break;
     case 13:
         proto_tree_add_item(ndps_tree, hf_ndps_attrib_boolean, tvb, foffset, 4, FALSE);
@@ -2427,7 +2404,7 @@ address_item(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     case 16:
     case 17:
     default:
-        foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
         break;
     }
     return foffset;
@@ -2449,7 +2426,7 @@ credentials(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     switch (cred_type)
     {
     case 0:
-        foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL);
         number_of_items=tvb_get_ntohl(tvb, foffset);
         proto_tree_add_uint(ndps_tree, hf_ndps_num_passwords, tvb, foffset, 4, number_of_items);
         foffset += 4;
@@ -2483,15 +2460,15 @@ credentials(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
         foffset += length;
         break;
     case 2:
-        foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL);
         foffset += 2;
         proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, FALSE);
         foffset += 2;
         break;
     case 3:
         length=tvb_get_ntohl(tvb, foffset);
-        foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL, 0);
-        if (length == 0) 
+        foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL);
+        if (length == 0)
         {
             foffset += 2;
         }
@@ -2505,19 +2482,19 @@ credentials(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
         }
         proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, FALSE);
         foffset += 2;
-        foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL);
         break;
     case 4:
-        foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL);
         foffset += 2;
         proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, FALSE);
         foffset += 2;
-        foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL);
         foffset += 8;   /* Don't know what these 8 bytes signify */
         proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
         foffset += 4;  /* XXX - what does this count? */
-        foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
-        foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
+        foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
         break;
     default:
         break;
@@ -2637,7 +2614,7 @@ cardinal_seq(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
 static int
 server_entry(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
 {
-    char        server_name[1024];
+    char        *server_name;
     guint32     number_of_items;
     guint32     i;
     guint32     data_type;
@@ -2648,12 +2625,12 @@ server_entry(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
 
     aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Server Info");
     atree = proto_item_add_subtree(aitem, ett_ndps);
-    foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, server_name, sizeof server_name);
-    proto_item_append_text(aitem, ": %s", server_name);
+    foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, &server_name);
+    proto_item_append_text(aitem, ": %s", format_text(server_name, strlen(server_name)));
     proto_tree_add_item(atree, hf_ndps_server_type, tvb, foffset, 4, FALSE);
     foffset += 4;
     foffset = print_address(tvb, atree, foffset);
-    number_of_items = tvb_get_ntohl(tvb, foffset); 
+    number_of_items = tvb_get_ntohl(tvb, foffset);
     proto_tree_add_uint(atree, hf_ndps_num_servers, tvb, foffset, 4, number_of_items);
     foffset += 4;
     for (i = 1 ; i <= number_of_items; i++ )
@@ -2667,7 +2644,7 @@ server_entry(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
         data_type = tvb_get_ntohl(tvb, foffset);
         proto_tree_add_item(btree, hf_ndps_data_item_type, tvb, foffset, 4, FALSE);
         foffset += 4;
-        switch (data_type) 
+        switch (data_type)
         {
         case 0:   /* Int8 */
             proto_tree_add_item(btree, hf_info_int, tvb, foffset, 1, FALSE);
@@ -2687,7 +2664,7 @@ server_entry(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
             break;
         case 4:   /* String */
         case 5:   /* Bytes */
-            foffset = ndps_string(tvb, hf_info_string, btree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_info_string, btree, foffset, NULL);
             break;
         default:
             break;
@@ -2737,7 +2714,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
         label = match_strval(label_value, object_ids_7);
         global_attribute_name = label;
     }
-    attribute_type = tvb_get_ntohl(tvb, foffset); 
+    attribute_type = tvb_get_ntohl(tvb, foffset);
     if (ndps_show_oids)
     {
         proto_tree_add_item(ndps_tree, hf_obj_attribute_type, tvb, foffset, 4, FALSE);
@@ -2758,7 +2735,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
         case 102:         /* File Path */
         case 103:         /* Uniform Resource Identifier */
         case 108:         /* Extended Resource Identifier */
-            foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
             break;
         case 4:         /* Message */
         case 5:         /* Error Message */
@@ -2783,7 +2760,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
             break;
         case 7:         /* Distinguished Name String*/
         case 79:         /* File Reference */
-            foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
             foffset = name_or_id(tvb, ndps_tree, foffset);
             break;
         case 8:         /* Distinguished Name String Seq */
@@ -2798,7 +2775,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
                }
                 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Name %u", i);
                 atree = proto_item_add_subtree(aitem, ett_ndps);
-                foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
                 foffset = name_or_id(tvb, atree, foffset);
                 proto_item_set_end(aitem, tvb, foffset);
             }
@@ -2923,7 +2900,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
                }
                 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Name %u", i);
                 atree = proto_item_add_subtree(aitem, ett_ndps);
-                foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
                 proto_item_set_end(aitem, tvb, foffset);
             }
             break;
@@ -3181,7 +3158,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
         case 56:         /* Octet String */
         case 63:         /* Job Password */
         case 66:         /* Print Checkpoint */
-            foffset = ndps_string(tvb, hf_info_string, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_info_string, ndps_tree, foffset, NULL);
             break;
         case 59:         /* Method Delivery Address */
             proto_tree_add_item(ndps_tree, hf_ndps_delivery_add_type, tvb, foffset, 4, FALSE);
@@ -3193,10 +3170,10 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
                 case 1:     /*DISTINGUISHED_NAME*/
                 case 2:     /*TEXT*/
                 case 3:     /*OCTET_STRING*/
-                    foffset = ndps_string(tvb, hf_info_string, ndps_tree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_info_string, ndps_tree, foffset, NULL);
                     break;
                 case 4:     /*DIST_NAME_STRING*/
-                    foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
                     foffset = name_or_id(tvb, ndps_tree, foffset);
                     break;
                 case 5:     /*RPC_ADDRESS*/
@@ -3297,7 +3274,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
             }
             else
             {
-                foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
             }
             break;
         case 69:         /* Medium Substitution */
@@ -3305,8 +3282,8 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
             foffset = name_or_id(tvb, ndps_tree, foffset);
             break;
         case 70:         /* Font Substitution */
-            foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
-            foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
+            foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
             break;
         case 71:         /* Resource Context Seq */
             number_of_items = tvb_get_ntohl(tvb, foffset);
@@ -3329,7 +3306,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
                 }
                 else
                 {
-                    foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL);
                 }
                 proto_item_set_end(aitem, tvb, foffset);
             }
@@ -3358,7 +3335,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
                 }
                 if (identifier_type == 1)
                 {
-                    foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL);
                 }
                 if (identifier_type == 2)
                 {
@@ -3376,7 +3353,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
                 }
                 if (identifier_type == 1)
                 {
-                    foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL);
                 }
                 if (identifier_type == 2)
                 {
@@ -3395,7 +3372,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
             }
             else
             {
-                foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
                 number_of_items = tvb_get_ntohl(tvb, foffset);
                 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
                 foffset += 4;
@@ -3419,7 +3396,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
                     }
                     if (identifier_type == 1)
                     {
-                        foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL, 0);
+                        foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL);
                     }
                     if (identifier_type == 2)
                     {
@@ -3448,7 +3425,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
             }
             else
             {
-                foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
                 foffset = name_or_id(tvb, ndps_tree, foffset);
             }
             break;
@@ -3641,16 +3618,16 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
             break;
         case 87:         /* Finishing */
         case 88:         /* Print Contained Object ID */
-            foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
             proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
             foffset += 4;
             break;
         case 89:         /* Print Config Object ID */
-            foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
             foffset = qualifiedname(tvb, ndps_tree, foffset);
             break;
         case 90:         /* Typed Name */
-            foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
             proto_tree_add_item(ndps_tree, hf_level, tvb, foffset, 4, FALSE);
             foffset += 4;
             proto_tree_add_item(ndps_tree, hf_interval, tvb, foffset, 4, FALSE);
@@ -3772,16 +3749,16 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
                }
                 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Printer %u", i);
                 atree = proto_item_add_subtree(aitem, ett_ndps);
-                foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL, 0);
-                foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL, 0);
-                foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL);
+                foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL);
+                foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL);
                 proto_item_set_end(aitem, tvb, foffset);
             }
             proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
             foffset += 4;
             break;
         case 100:         /* Event Object ID */
-            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
             foffset = objectidentifier(tvb, ndps_tree, foffset);
             proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
             foffset += 4;
@@ -3824,7 +3801,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
                }
                 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object %u", i);
                 atree = proto_item_add_subtree(aitem, ett_ndps);
-                foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
                 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 proto_item_set_end(aitem, tvb, foffset);
@@ -3893,7 +3870,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
                 case 0:     /*MHS ADDR*/
                 case 1:     /*DISTINGUISHED_NAME*/
                 case 2:     /*TEXT*/
-                    foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
                     break;
                 case 3:     /*OCTET_STRING*/
                     length = tvb_get_ntohl(tvb, foffset);
@@ -3909,7 +3886,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
                         THROW(ReportedBoundsError);
                     break;
                 case 4:     /*DIST_NAME_STRING*/
-                    foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
                     foffset = name_or_id(tvb, ndps_tree, foffset);
                     break;
                 case 5:     /*RPC_ADDRESS*/
@@ -3931,7 +3908,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
                }
                 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event %u", i);
                 atree = proto_item_add_subtree(aitem, ett_ndps);
-                foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
                 foffset = objectidentifier(tvb, atree, foffset);
                 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
                 foffset += 4;
@@ -3959,7 +3936,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
             foffset += 4;
             proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
             foffset += 4;
-            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
             break;
         default:
             break;
@@ -3980,7 +3957,7 @@ commonarguments(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
 
     aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Common Arguments");
     atree = proto_item_add_subtree(aitem, ett_ndps);
-    number_of_items = tvb_get_ntohl(tvb, foffset); 
+    number_of_items = tvb_get_ntohl(tvb, foffset);
     proto_tree_add_uint(atree, hf_ndps_num_args, tvb, foffset, 4, number_of_items);
     foffset += 4;
     for (i = 1 ; i <= number_of_items; i++ )
@@ -4006,33 +3983,33 @@ res_add_input_data(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     resource_type = tvb_get_ntohl(tvb, foffset);
     proto_tree_add_uint(ndps_tree, hf_res_type, tvb, foffset, 4, resource_type);
     foffset += 4;
-    switch (resource_type) 
+    switch (resource_type)
     {
     case 0:     /* Print Drivers */
         proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
         foffset += 4;
-        foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL, 0);
-        foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL);
+        foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL);
         break;
     case 1:     /* Printer Definitions */
-        foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL, 0);
-        foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL);
+        foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL);
         break;
     case 2:     /* Banner Page Files */
-        foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset, NULL);
         break;
     case 3:     /* Font Types */
         proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
         foffset += 4;
         proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
         foffset += 4;
-        foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL);
         break;
     case 4:     /* Generic Files/ Archive */
     case 5:     /* Printer Driver Archive */
         proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
         foffset += 4;
-        foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL);
         proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
         foffset += 4;
         break;
@@ -4059,11 +4036,11 @@ static const fragment_items ndps_frag_items = {
 
 static dissector_handle_t ndps_data_handle;
 
-/* NDPS packets come in request/reply pairs. The request packets tell the 
+/* NDPS packets come in request/reply pairs. The request packets tell the
  * Function and Program numbers. The response, unfortunately, only
  * identifies itself via the Exchange ID; you have to know what type of NDPS
- * request the request packet contained in order to successfully parse the 
- * response. A global method for doing this does not exist in ethereal yet
+ * request the request packet contained in order to successfully parse the
+ * response. A global method for doing this does not exist in wireshark yet
  * (NFS also requires it), so for now the NDPS section will keep its own hash
  * table keeping track of NDPS packets.
  *
@@ -4115,7 +4092,7 @@ ndps_hash(gconstpointer v)
 }
 
 /* Initializes the hash table and the mem_chunk area each time a new
- * file is loaded or re-loaded in ethereal */
+ * file is loaded or re-loaded in wireshark */
 static void
 ndps_init_protocol(void)
 {
@@ -4162,7 +4139,7 @@ ndps_hash_insert(conversation_t *conversation, guint32 ndps_xport)
        request_value->ndps_frame_num = 0;
     request_value->ndps_frag = FALSE;
     request_value->ndps_end_frag = 0;
-       
+
        g_hash_table_insert(ndps_req_hash, request_key, request_value);
 
        return request_value;
@@ -4292,7 +4269,7 @@ dissect_ndps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree)
             if(ndps_hfname != 0)
             {
                 proto_tree_add_item(ndps_tree, ndps_hfname, tvb, foffset, 4, FALSE);
-                if (ndps_func_string != NULL) 
+                if (ndps_func_string != NULL)
                 {
                     if (check_col(pinfo->cinfo, COL_INFO))
                         col_append_str(pinfo->cinfo, COL_INFO, (const gchar*) ndps_func_string);
@@ -4308,7 +4285,7 @@ dissect_ndps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree)
 }
 
 static guint
-get_ndps_pdu_len(tvbuff_t *tvb, int offset)
+get_ndps_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
 {
     return tvb_get_ntohs(tvb, offset +2) + 4;
 }
@@ -4324,7 +4301,7 @@ dissect_ndps_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     if (check_col(pinfo->cinfo, COL_INFO))
         col_clear(pinfo->cinfo, COL_INFO);
-       
+
     if (tree) {
         ti = proto_tree_add_item(tree, proto_ndps, tvb, 0, -1, FALSE);
         ndps_tree = proto_item_add_subtree(ti, ett_ndps);
@@ -4333,14 +4310,14 @@ dissect_ndps_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 }
 
 /*
- * Defrag logic 
+ * Defrag logic
  *
- * SPX EOM not being set indicates we are inside or at the 
- * beginning of a fragment. But when the end of the fragment 
+ * SPX EOM not being set indicates we are inside or at the
+ * beginning of a fragment. But when the end of the fragment
  * is encounterd the flag is set. So we must mark what the
  * frame number is of the end fragment so that we will be
  * able to redissect if the user clicks on the packet
- * or resorts/filters the trace. 
+ * or resorts/filters the trace.
  *
  * Once we are certain that we are in a fragment sequence
  * then we can just process each fragment in this conversation
@@ -4350,7 +4327,7 @@ dissect_ndps_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
  * We will be able to easily determine if a conversation is a fragment
  * with the exception of the last packet in the fragment. So remember
  * the last fragment packet number.
- */         
+ */
 static void
 ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
@@ -4369,13 +4346,13 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         return;
     }
     /* Has this already been dissected? */
-    if (!pinfo->fd->flags.visited) 
+    if (!pinfo->fd->flags.visited)
     {
         /* Lets see if this is a new conversation */
         conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
             PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
-    
-        if (conversation == NULL) 
+
+        if (conversation == NULL)
         {
             /* It's not part of any conversation - create a new one. */
             conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
@@ -4385,7 +4362,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         }
         /* So now we need to get the request info for this conversation */
         request_value = ndps_hash_lookup(conversation, (guint32) pinfo->srcport);
-        if (request_value == NULL) 
+        if (request_value == NULL)
         {
             /* We haven't seen a packet with this conversation yet so create one. */
             request_value = ndps_hash_insert(conversation, (guint32) pinfo->srcport);
@@ -4409,9 +4386,9 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         request_value->ndps_frag = TRUE;
     }
     /* Now we process the fragments */
-    if (request_value->ndps_frag || (request_value->ndps_end_frag == pinfo->fd->num)) 
+    if (request_value->ndps_frag || (request_value->ndps_end_frag == pinfo->fd->num))
     {
-        /*   
+        /*
          * Fragment
          */
         tid = (pinfo->srcport+pinfo->destport);
@@ -4419,10 +4396,10 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         if (tvb_bytes_exist(tvb, 0, len))
         {
             fd_head = fragment_add_seq_next(tvb, 0, pinfo, tid, ndps_fragment_table, ndps_reassembled_table, len, !spx_info->eom);
-            if (fd_head != NULL) 
+            if (fd_head != NULL)
             {
                 /* Is this the last fragment? EOM will indicate */
-                if (fd_head->next != NULL && spx_info->eom) 
+                if (fd_head->next != NULL && spx_info->eom)
                 {
                     proto_item *frag_tree_item;
 
@@ -4434,7 +4411,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                         next_tvb,
                         "Reassembled NDPS");
                     /* Show all fragments. */
-                    if (tree) 
+                    if (tree)
                     {
                         show_fragment_seq_tree(fd_head,
                             &ndps_frag_items,
@@ -4445,8 +4422,8 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                     /* Remember this fragment number so we can dissect again */
                     request_value->ndps_end_frag = pinfo->fd->num;
 
-                } 
-                else 
+                }
+                else
                 {
                     /* This is either a beggining or middle fragment on second dissection */
                     next_tvb = tvb_new_subset(tvb, 0, -1, -1);
@@ -4459,7 +4436,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                     }
                 }
             }
-            else 
+            else
             {
                 /* Fragment from first pass of dissection */
                 if (check_col(pinfo->cinfo, COL_INFO))
@@ -4472,7 +4449,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                 next_tvb = NULL;
             }
         }
-        else 
+        else
         {
             /*
              * There are no bytes so Dissect this
@@ -4521,7 +4498,7 @@ dissect_ndps_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     if (check_col(pinfo->cinfo, COL_INFO))
         col_clear(pinfo->cinfo, COL_INFO);
-       
+
     if (tree) {
         ti = proto_tree_add_item(tree, proto_ndps, tvb, 0, -1, FALSE);
         ndps_tree = proto_item_add_subtree(ti, ett_ndps);
@@ -4566,7 +4543,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
     proto_tree          *dtree;
     proto_item          *ditem;
 
-    if (!pinfo->fd->flags.visited) 
+    if (!pinfo->fd->flags.visited)
     {
         /* This is the first time we've looked at this packet.
         Keep track of the Program and connection whence the request
@@ -4576,11 +4553,11 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
         to have all packets over the same connection treated
         as being part of a single conversation so that we can
         let the user select that conversation to be displayed.) */
-        
+
         conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
             PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
 
-        if (conversation == NULL) 
+        if (conversation == NULL)
         {
             /* It's not part of any conversation - create a new one. */
             conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
@@ -4626,7 +4603,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             foffset = qualifiedname(tvb, ndps_tree, foffset);
             break;
         case 0x00000003:    /* Unbind */
-            proto_tree_add_item(ndps_tree, hf_ndps_object, tvb, foffset, 
+            proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset,
             4, FALSE);
             break;
         case 0x00000004:    /* Print */
@@ -4635,10 +4612,10 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             print_type = tvb_get_ntohl(tvb, foffset);
             proto_tree_add_uint(ndps_tree, hf_print_arg, tvb, foffset, 4, print_type);
             foffset += 4;
-            switch (print_type) 
+            switch (print_type)
             {
             case 0:     /* Create Job */
-                foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
                 proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Transfer Method");
@@ -4727,7 +4704,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                     }
                     else
                     {
-                        foffset = ndps_string(tvb, hf_ndps_ref_name, btree, foffset, NULL, 0);
+                        foffset = ndps_string(tvb, hf_ndps_ref_name, btree, foffset, NULL);
                         foffset = name_or_id(tvb, btree, foffset);
                     }
                     proto_item_set_end(bitem, tvb, foffset);
@@ -4788,7 +4765,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 }
                 break;
             case 1:     /* Add Job */
-                foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
                 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, FALSE);
@@ -4849,7 +4826,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 proto_item_set_end(aitem, tvb, foffset);
                 break;
             case 2:     /* Close Job */
-                foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
                 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 break;
@@ -4860,7 +4837,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
         case 0x00000005:    /* Modify Job */
             proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
             foffset += 4;
-            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
             proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
             foffset += 4;
             proto_tree_add_item(ndps_tree, hf_ndps_document_number, tvb, foffset, 4, FALSE);
@@ -4903,7 +4880,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
         case 0x00000006:    /* Cancel Job */
             proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
             foffset += 4;
-            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
             proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
             foffset += 4;
             proto_tree_add_item(ndps_tree, hf_ndps_document_number, tvb, foffset, 4, FALSE);
@@ -4995,7 +4972,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                     filter_type = tvb_get_ntohl(tvb, foffset);
                     proto_tree_add_uint(ndps_tree, hf_ndps_filter, tvb, foffset, 4, filter_type);
                     foffset += 4;
-                    /*if (filter_type == 0 || filter_type == 3 ) 
+                    /*if (filter_type == 0 || filter_type == 3 )
                     {
                         foffset = filteritem(tvb, ndps_tree, foffset);
                     }
@@ -5039,7 +5016,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                     proto_item_set_end(bitem, tvb, foffset);
                 }
                 proto_item_set_end(aitem, tvb, foffset); /* End of NWDPObjectIdentifierSet */
-                if (number_of_items == 0) 
+                if (number_of_items == 0)
                 {
                     break;
                 }
@@ -5054,7 +5031,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             /* Start of NWDPPrtContainedObjectId */
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
             atree = proto_item_add_subtree(aitem, ett_ndps);
-            foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
             proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
             foffset += 4;
             proto_item_set_end(aitem, tvb, foffset);
@@ -5078,7 +5055,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 /* Start of NWDPPrtContainedObjectId */
                 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
                 atree = proto_item_add_subtree(aitem, ett_ndps);
-                foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
                 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 proto_item_set_end(aitem, tvb, foffset);
@@ -5086,7 +5063,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             }
             else
             {
-                foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
             }
             /* Start of nameorid */
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Interrupt Message Option");
@@ -5097,7 +5074,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             /* Start of NWDPPrtContainedObjectId */
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Interrupting Job");
             atree = proto_item_add_subtree(aitem, ett_ndps);
-            foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
             proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
             foffset += 4;
             proto_item_set_end(aitem, tvb, foffset);
@@ -5115,7 +5092,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 /* Start of NWDPPrtContainedObjectId */
                 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
                 atree = proto_item_add_subtree(aitem, ett_ndps);
-                foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
                 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 proto_item_set_end(aitem, tvb, foffset);
@@ -5123,7 +5100,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             }
             else
             {
-                foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
             }
             /* Start of nameorid */
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Pause Message Option");
@@ -5139,7 +5116,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             /* Start of NWDPPrtContainedObjectId */
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
             atree = proto_item_add_subtree(aitem, ett_ndps);
-            foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
             proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
             foffset += 4;
             proto_item_set_end(aitem, tvb, foffset);
@@ -5257,7 +5234,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 /* Start of NWDPPrtContainedObjectId */
                 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Job ID");
                 btree = proto_item_add_subtree(bitem, ett_ndps);
-                foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset, NULL);
                 proto_tree_add_item(btree, hf_local_id, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 proto_item_set_end(bitem, tvb, foffset);
@@ -5349,7 +5326,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             foffset += 4;
             proto_tree_add_item(ndps_tree, hf_shutdown_type, tvb, foffset, 4, FALSE);
             foffset += 4;
-            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
             /* Start of NameorID */
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Shutdown Message Option");
             atree = proto_item_add_subtree(aitem, ett_ndps);
@@ -5360,7 +5337,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
         case 0x00000014:    /* Startup PA */
             proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
             foffset += 4;
-            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
             /* Start of NameorID */
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Startup Message Option");
             atree = proto_item_add_subtree(aitem, ett_ndps);
@@ -5375,7 +5352,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             /* Start of NWDPPrtContainedObjectId */
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job Identification");
             atree = proto_item_add_subtree(aitem, ett_ndps);
-            foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
             proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
             foffset += 4;
             proto_item_set_end(aitem, tvb, foffset);
@@ -5383,7 +5360,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             /* Start of NWDPPrtContainedObjectId */
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Reference Job ID");
             atree = proto_item_add_subtree(aitem, ett_ndps);
-            foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
             proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
             foffset += 4;
             proto_item_set_end(aitem, tvb, foffset);
@@ -5439,7 +5416,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
             foffset += 4;
             foffset = qualifiedname(tvb, ndps_tree, foffset);
-            foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL);
             proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
             foffset += 4;
             /* Start of NameorID */
@@ -5566,7 +5543,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 integer_type_flag = tvb_get_ntohl(tvb, foffset);
                 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
                 foffset += 4;
-                if (integer_type_flag!=0) 
+                if (integer_type_flag!=0)
                 {
                     proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
                     foffset += 4;
@@ -5605,7 +5582,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             foffset += 4;
             proto_tree_add_item(ndps_tree, hf_ndps_ds_info_type, tvb, foffset, 4, FALSE);
             foffset += 4;
-            foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset, NULL);
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "DS Object Name");
             atree = proto_item_add_subtree(aitem, ett_ndps);
             foffset = qualifiedname(tvb, atree, foffset);
@@ -5644,7 +5621,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             atree = proto_item_add_subtree(aitem, ett_ndps);
             foffset = qualifiedname(tvb, atree, foffset);
             proto_item_set_end(aitem, tvb, foffset);
-            foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL);
             proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
             foffset += 4;
             /* Start of NameorID */
@@ -5701,7 +5678,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             foffset += 4;
             proto_tree_add_item(ndps_tree, hf_notify_lease_exp_time, tvb, foffset, 4, FALSE);
             foffset += 4;
-            foffset = ndps_string(tvb, hf_notify_printer_uri, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_notify_printer_uri, ndps_tree, foffset, NULL);
             /* End of Eventhandling2 */
             break;
         case 0x00000024:    /* ListEventProfiles2 */
@@ -5744,7 +5721,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 integer_type_flag = tvb_get_ntohl(tvb, foffset);
                 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
                 foffset += 4;
-                if (integer_type_flag!=0) 
+                if (integer_type_flag!=0)
                 {
                     proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
                     foffset += 4;
@@ -5879,7 +5856,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             /* NoOp */
             break;
         case 0x00000005:    /* Register Registry */
-            foffset = ndps_string(tvb, hf_ndps_registry_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_registry_name, ndps_tree, foffset, NULL);
             foffset = print_address(tvb, ndps_tree, foffset);
             break;
         case 0x00000007:    /* Registry Update */
@@ -5924,13 +5901,13 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             local_servers_type = tvb_get_ntohl(tvb, foffset);
             proto_tree_add_uint(ndps_tree, hf_ndps_list_local_servers_type, tvb, foffset, 4, local_servers_type);
             foffset += 4;
-            if (local_servers_type==0) 
+            if (local_servers_type==0)
             {
                 /* Start of integeroption */
                 integer_type_flag = tvb_get_ntohl(tvb, foffset);
                 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
                 foffset += 4;
-                if (integer_type_flag!=0) 
+                if (integer_type_flag!=0)
                 {
                     proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
                     foffset += 4;
@@ -5990,7 +5967,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             /* NoOp */
             break;
         case 0x00000003:    /* Register Supplier */
-            foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL);
             /* Start of QualifiedName Set*/
             number_of_items = tvb_get_ntohl(tvb, foffset);
             proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
@@ -6160,7 +6137,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 integer_type_flag = tvb_get_ntohl(tvb, foffset);
                 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
                 foffset += 4;
-                if (integer_type_flag!=0) 
+                if (integer_type_flag!=0)
                 {
                     proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
                     foffset += 4;
@@ -6245,7 +6222,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 }
                 proto_item_set_end(citem, tvb, foffset);
                 /* End of AttributeSet */
-                foffset = ndps_string(tvb, hf_ndps_message, btree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_message, btree, foffset, NULL);
                 proto_tree_add_item(btree, hf_time, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 proto_item_set_end(bitem, tvb, foffset);
@@ -6283,7 +6260,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 /* End of Destination */
             }
             /* End of DestinationSet */
-            foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL);
             proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
             foffset += 4;
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Containing Class");
@@ -6324,12 +6301,12 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                }
                 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %d", i);
                 btree = proto_item_add_subtree(bitem, ett_ndps);
-                foffset = attribute_value(tvb, btree, foffset);  
+                foffset = attribute_value(tvb, btree, foffset);
                 proto_item_set_end(bitem, tvb, foffset);
             }
             proto_item_set_end(aitem, tvb, foffset);
             /* End of AttributeSet */
-            foffset = ndps_string(tvb, hf_ndps_message, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_message, ndps_tree, foffset, NULL);
             proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
             foffset += 4;
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Account");
@@ -6338,7 +6315,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             proto_item_set_end(aitem, tvb, foffset);
             break;
         case 0x0000000c:    /* Add Delivery Method */
-            foffset = ndps_string(tvb, hf_ndps_file_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_file_name, ndps_tree, foffset, NULL);
             break;
         case 0x0000000d:    /* Remove Delivery Method */
             /* Start of NameorID */
@@ -6359,7 +6336,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 integer_type_flag = tvb_get_ntohl(tvb, foffset);
                 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
                 foffset += 4;
-                if (integer_type_flag!=0) 
+                if (integer_type_flag!=0)
                 {
                     proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
                     foffset += 4;
@@ -6473,7 +6450,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             proto_tree_add_item(ndps_tree, hf_ndps_resource_list_type, tvb, foffset, 4, FALSE);
             resource_type = tvb_get_ntohl(tvb, foffset);
             foffset += 4;
-            switch (resource_type) 
+            switch (resource_type)
             {
             case 0:     /* Print Drivers */
                 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
@@ -6481,7 +6458,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 break;
             case 1:     /* Printer Definitions */
             case 2:     /* Printer Definitions Short */
-                foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL);
                 break;
             case 3:     /* Banner Page Files */
                 proto_tree_add_item(ndps_tree, hf_banner_type, tvb, foffset, 4, FALSE);
@@ -6498,20 +6475,20 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             case 9:     /* Generic Files */
                 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
                 foffset += 4;
-                foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL, 0);
-                foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL, 0);
-                foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL);
+                foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL);
+                foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL);
                 field_len = tvb_get_ntohl(tvb, foffset);
                 foffset += 4;
                 proto_tree_add_item(ndps_tree, hf_printer_id, tvb, foffset, field_len, FALSE);
                 break;
             case 6:     /* Printer Definition File */
             case 10:    /* Printer Definition File 2 */
-                foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL);
                 foffset += 4;
-                foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL, 0);
-                foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL, 0);
-                foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL);
+                foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL);
+                foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL);
                 field_len = tvb_get_ntohl(tvb, foffset);
                 foffset += 4;
                 proto_tree_add_item(ndps_tree, hf_printer_id, tvb, foffset, field_len, FALSE);
@@ -6521,14 +6498,14 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 foffset += 4;
                 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
                 foffset += 4;
-                foffset = ndps_string(tvb, hf_ndps_font_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_font_name, ndps_tree, foffset, NULL);
                 break;
             case 8:     /* Generic Type */
             case 11:    /* Printer Driver Types 2 */
             case 13:    /* Printer Driver Types Archive */
-                foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL, 0);
-                foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL, 0);
-                foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL);
+                foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL);
+                foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL);
                 break;
             case 14:    /* Languages Available */
                 break;
@@ -6542,33 +6519,33 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
             proto_tree_add_item(ndps_tree, hf_res_type, tvb, foffset, 4, FALSE);
             resource_type = tvb_get_ntohl(tvb, foffset);
             foffset += 4;
-            switch (resource_type) 
+            switch (resource_type)
             {
             case 0:     /* Print Drivers */
                 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
                 foffset += 4;
-                foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL, 0);
-                foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL);
+                foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL);
                 break;
             case 1:     /* Printer Definitions */
-                foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL, 0);
-                foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL);
+                foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL);
                 break;
             case 2:     /* Banner Page Files */
-                foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset, NULL);
                 break;
             case 3:     /* Font Types */
                 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
                 foffset += 4;
-                foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL);
                 break;
             case 4:     /* Generic Files/ Archive */
             case 5:     /* Printer Driver Archive */
                 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
                 foffset += 4;
-                foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL);
                 proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 break;
@@ -6648,7 +6625,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                 btree = proto_item_add_subtree(bitem, ett_ndps);
                 foffset = objectidentifier(tvb, btree, foffset);
                 foffset = attribute_value(tvb, atree, foffset);
-                foffset = ndps_string(tvb, hf_ndps_message, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_message, atree, foffset, NULL);
                 proto_tree_add_item(atree, hf_time, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 proto_item_set_end(bitem, tvb, foffset);
@@ -6721,11 +6698,11 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
                        proto_tree_add_text(btree, tvb, foffset, -1, "[Truncated]");
                        break;
                    }
-                    foffset = attribute_value(tvb, btree, foffset);  
+                    foffset = attribute_value(tvb, btree, foffset);
                 }
                 proto_item_set_end(bitem, tvb, foffset);
                 /* End of AttributeSet */
-                foffset = ndps_string(tvb, hf_ndps_message, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_message, atree, foffset, NULL);
                 proto_tree_add_item(atree, hf_time, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Account");
@@ -6815,7 +6792,7 @@ ndps_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset
         foffset += 4;
         proto_tree_add_item(ndps_tree, hf_ndps_other_error_2, tvb, foffset, 4, FALSE);
         foffset += 4;
-        foffset = ndps_string(tvb, hf_ndps_other_error_string, ndps_tree, foffset, NULL, 0);
+        foffset = ndps_string(tvb, hf_ndps_other_error_string, ndps_tree, foffset, NULL);
         break;
     case 2:                 /* Access Error */
         proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
@@ -6895,7 +6872,7 @@ ndps_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset
         foffset = objectidentification(tvb, ndps_tree, foffset);
         break;
     case 6:                 /* Attribute Error */
-        number_of_items = tvb_get_ntohl(tvb, foffset); 
+        number_of_items = tvb_get_ntohl(tvb, foffset);
         proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
         foffset += 4;
         for (i = 1 ; i <= number_of_items; i++ )
@@ -6962,7 +6939,7 @@ return_code(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffse
     foffset += 4;
     if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
         col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
-    if (tvb_get_ntohl(tvb, foffset-4) == 0) 
+    if (tvb_get_ntohl(tvb, foffset-4) == 0)
     {
         return foffset;
     }
@@ -6996,7 +6973,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
     guint32                 error_val=0;
     guint32                 resource_type=0;
     gint                   length_remaining;
-    
+
     if (!pinfo->fd->flags.visited) {
         /* Find the conversation whence the request would have come. */
         conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
@@ -7015,7 +6992,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
     if (request_value) {
         ndps_prog = request_value->ndps_prog;
         ndps_func = request_value->ndps_func;
-        proto_tree_add_uint_format(ndps_tree, hf_ndps_reqframe, tvb, 0, 
+        proto_tree_add_uint_format(ndps_tree, hf_ndps_reqframe, tvb, 0,
            0, request_value->ndps_frame_num,
            "Response to Request in Frame Number: %u",
            request_value->ndps_frame_num);
@@ -7053,7 +7030,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
     proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
     foffset += 4;
     /* Some functions return an error with no data, 0 is ok */
-    if (match_strval(tvb_get_ntohl(tvb, foffset), ndps_error_types) && tvb_length_remaining(tvb,foffset) < 8 && (tvb_get_ntohl(tvb, foffset)!=0))  
+    if (match_strval(tvb_get_ntohl(tvb, foffset), ndps_error_types) && tvb_length_remaining(tvb,foffset) < 8 && (tvb_get_ntohl(tvb, foffset)!=0))
     {
         expert_status = tvb_get_ntohl(tvb, foffset);
         expert_item = proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
@@ -7070,7 +7047,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
         switch(ndps_func)
         {
         case 0x00000001:    /* Bind PSM */
-            proto_tree_add_item(ndps_tree, hf_ndps_oid, tvb, foffset, 4, FALSE);
+            proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
             foffset += 4;
             if(error_val != 0)
             {
@@ -7088,7 +7065,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             proto_item_set_end(aitem, tvb, foffset);
             break;
         case 0x00000002:    /* Bind PA */
-            proto_tree_add_item(ndps_tree, hf_ndps_oid, tvb, foffset, 4, FALSE);
+            proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
             foffset += 4;
             if(error_val != 0)
             {
@@ -7100,12 +7077,12 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
                 foffset += 4;
             }
-                foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
             break;
         case 0x00000003:    /* Unbind */
             break;
         case 0x00000004:    /* Print */
-            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
             proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
             foffset += 4;
             if(error_val != 0)
@@ -7240,7 +7217,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             /* Start of NWDPPrtContainedObjectId */
             aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
             atree = proto_item_add_subtree(aitem, ett_ndps);
-            foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
             proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
             foffset += 4;
             proto_item_set_end(aitem, tvb, foffset);
@@ -7306,7 +7283,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                 /* Start of NWDPPrtContainedObjectId */
                 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Old Job");
                 ctree = proto_item_add_subtree(citem, ett_ndps);
-                foffset = ndps_string(tvb, hf_ndps_pa_name, ctree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_pa_name, ctree, foffset, NULL);
                 proto_tree_add_item(ctree, hf_local_id, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 proto_item_set_end(citem, tvb, foffset);
@@ -7314,7 +7291,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                 /* Start of NWDPPrtContainedObjectId */
                 citem = proto_tree_add_text(btree, tvb, foffset, -1, "New Job");
                 ctree = proto_item_add_subtree(citem, ett_ndps);
-                foffset = ndps_string(tvb, hf_ndps_pa_name, ctree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_pa_name, ctree, foffset, NULL);
                 proto_tree_add_item(ctree, hf_local_id, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 proto_item_set_end(citem, tvb, foffset);
@@ -7510,7 +7487,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Consumer Name");
                 btree = proto_item_add_subtree(bitem, ett_ndps);
                 foffset = qualifiedname(tvb, btree, foffset);
-                foffset = ndps_string(tvb, hf_ndps_supplier_name, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_supplier_name, atree, foffset, NULL);
                 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 proto_item_set_end(bitem, tvb, foffset);
@@ -7568,7 +7545,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                 foffset += 4;
                 proto_tree_add_item(atree, hf_notify_lease_exp_time, tvb, foffset, 4, FALSE);
                 foffset += 4;
-                foffset = ndps_string(tvb, hf_notify_printer_uri, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_notify_printer_uri, atree, foffset, NULL);
                 proto_item_set_end(aitem, tvb, foffset);
                 /* End of Eventhandling2 */
                 length = tvb_get_ntohl(tvb, foffset); /* Added on 10-17-03 */
@@ -7600,7 +7577,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             foffset = return_code(tvb, pinfo, ndps_tree, foffset);
             break;
         case 0x00000003:    /* List Services */
-            number_of_items = tvb_get_ntohl(tvb, foffset); 
+            number_of_items = tvb_get_ntohl(tvb, foffset);
             proto_tree_add_uint(ndps_tree, hf_ndps_num_services, tvb, foffset, 4, number_of_items);
             foffset += 4;
             for (i = 1 ; i <= number_of_items; i++ )
@@ -7623,8 +7600,8 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset,
             4, FALSE); /* XXX - what does this count? */
             foffset += 4;
-            foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset, NULL, 0);
-            foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset, NULL);
+            foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
             foffset = return_code(tvb, pinfo, ndps_tree, foffset);
             break;
         case 0x00000008:    /* Get Broker Session Information */
@@ -7669,7 +7646,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             break;
         case 0x00000008:    /* List Local Servers */
         case 0x00000009:    /* List Servers */
-            number_of_items = tvb_get_ntohl(tvb, foffset); 
+            number_of_items = tvb_get_ntohl(tvb, foffset);
             proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
             foffset += 4;
             for (i = 1 ; i <= number_of_items; i++ )
@@ -7694,7 +7671,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             foffset = return_code(tvb, pinfo, ndps_tree, foffset);
             break;
         case 0x0000000a:    /* List Known Registries */
-            number_of_items = tvb_get_ntohl(tvb, foffset); 
+            number_of_items = tvb_get_ntohl(tvb, foffset);
             proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
             foffset += 4;
             for (i = 1 ; i <= number_of_items; i++ )
@@ -7706,7 +7683,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                 aitem = proto_tree_add_item(ndps_tree, hf_ndps_client_server_type, tvb, foffset, 4, FALSE);
                 atree = proto_item_add_subtree(aitem, ett_ndps);
                 foffset += 4;
-                foffset = ndps_string(tvb, hf_ndps_registry_name, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_registry_name, atree, foffset, NULL);
                 foffset = print_address(tvb, atree, foffset);
             }
             length = tvb_get_ntohl(tvb, foffset);
@@ -7888,9 +7865,9 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                 foffset += align_4(tvb, foffset);
                 proto_item_set_end(bitem, tvb, foffset);
                 /* End of NameorID */
-                foffset = ndps_string(tvb, hf_ndps_method_name, atree, foffset, NULL, 0);
-                foffset = ndps_string(tvb, hf_ndps_method_ver, atree, foffset, NULL, 0);
-                foffset = ndps_string(tvb, hf_ndps_file_name, atree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_method_name, atree, foffset, NULL);
+                foffset = ndps_string(tvb, hf_ndps_method_ver, atree, foffset, NULL);
+                foffset = ndps_string(tvb, hf_ndps_file_name, atree, foffset, NULL);
                 proto_tree_add_item(atree, hf_ndps_admin_submit, tvb, foffset, 4, FALSE);
                 foffset += 4;
                 proto_item_set_end(aitem, tvb, foffset);
@@ -7906,9 +7883,9 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             atree = proto_item_add_subtree(aitem, ett_ndps);
             foffset = name_or_id(tvb, atree, foffset);
             /* End of NameorID */
-            foffset = ndps_string(tvb, hf_ndps_method_name, atree, foffset, NULL, 0);
-            foffset = ndps_string(tvb, hf_ndps_method_ver, atree, foffset, NULL, 0);
-            foffset = ndps_string(tvb, hf_ndps_file_name, atree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_method_name, atree, foffset, NULL);
+            foffset = ndps_string(tvb, hf_ndps_method_ver, atree, foffset, NULL);
+            foffset = ndps_string(tvb, hf_ndps_file_name, atree, foffset, NULL);
             proto_tree_add_item(atree, hf_ndps_admin_submit, tvb, foffset, 4, FALSE);
             foffset += 4;
             proto_item_set_end(aitem, tvb, foffset);
@@ -7936,8 +7913,8 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset,
             4, FALSE); /* XXX - what does this count? */
             foffset += 4;
-            foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset, NULL, 0);
-            foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
+            foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset, NULL);
+            foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
             foffset = return_code(tvb, pinfo, ndps_tree, foffset);
             break;
         case 0x00000011:    /* Get Notify Session Information */
@@ -7975,7 +7952,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             foffset += 4;
             if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
                 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
-            if (tvb_get_ntohl(tvb, foffset-4) != 0) 
+            if (tvb_get_ntohl(tvb, foffset-4) != 0)
             {
                 break;
             }
@@ -7984,7 +7961,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             proto_tree_add_item(ndps_tree, hf_ndps_resource_list_type, tvb, foffset, 4, FALSE);
             resource_type = tvb_get_ntohl(tvb, foffset);
             foffset += 4;
-            switch (resource_type) 
+            switch (resource_type)
             {
             case 0:     /* Print Drivers */
             case 1:     /* Printer Definitions */
@@ -8004,17 +7981,17 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                         foffset += 2;
                     }
                     foffset += 4; /* Item always == 1 */
-                    foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL);
                     if (tvb_get_ntohl(tvb, foffset)==0) {
                         foffset += 2;
                     }
                     foffset += 4;
-                    foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL);
                     if (tvb_get_ntohl(tvb, foffset)==0) {
                         foffset += 2;
                     }
                     foffset += 4;
-                    foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL);
                     proto_item_set_end(aitem, tvb, foffset);
                 }
                 break;
@@ -8030,7 +8007,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                    }
                     aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Banner %d", i);
                     atree = proto_item_add_subtree(aitem, ett_ndps);
-                    foffset = ndps_string(tvb, hf_ndps_banner_name, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_ndps_banner_name, atree, foffset, NULL);
                     proto_item_set_end(aitem, tvb, foffset);
                 }
                 break;
@@ -8046,7 +8023,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                    }
                     aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Font %d", i);
                     atree = proto_item_add_subtree(aitem, ett_ndps);
-                    foffset = ndps_string(tvb, hf_font_type_name, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_font_type_name, atree, foffset, NULL);
                     proto_item_set_end(aitem, tvb, foffset);
                 }
                 break;
@@ -8062,7 +8039,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                    }
                     aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Font File %d", i);
                     atree = proto_item_add_subtree(aitem, ett_ndps);
-                    foffset = ndps_string(tvb, hf_font_file_name, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_font_file_name, atree, foffset, NULL);
                     proto_item_set_end(aitem, tvb, foffset);
                 }
                 break;
@@ -8080,9 +8057,9 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                    }
                     aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "File %d", i);
                     atree = proto_item_add_subtree(aitem, ett_ndps);
-                    foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL, 0);
-                    foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL, 0);
-                    foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL);
+                    foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL);
+                    foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL);
                     proto_item_set_end(aitem, tvb, foffset);
                 }
                 break;
@@ -8098,9 +8075,9 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                    }
                     aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Definition %d", i);
                     atree = proto_item_add_subtree(aitem, ett_ndps);
-                    foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL, 0);
-                    foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL, 0);
-                    foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL);
+                    foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL);
+                    foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL);
                     proto_item_set_end(aitem, tvb, foffset);
                 }
                 number_of_items = tvb_get_ntohl(tvb, foffset);
@@ -8114,7 +8091,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                    }
                     aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
                     atree = proto_item_add_subtree(aitem, ett_ndps);
-                    foffset = ndps_string(tvb, hf_ndps_def_file_name, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_ndps_def_file_name, atree, foffset, NULL);
                     number_of_items2 = tvb_get_ntohl(tvb, foffset);
                     proto_tree_add_uint(atree, hf_ndps_num_win31_keys, tvb, foffset, 4, number_of_items2);
                     bitem = proto_tree_add_text(atree, tvb, foffset, 4, "Windows 3.1 Keys");
@@ -8126,7 +8103,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                            proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
                            break;
                        }
-                        foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL, 0);
+                        foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL);
                     }
                     proto_item_set_end(bitem, tvb, foffset);
                     number_of_items2 = tvb_get_ntohl(tvb, foffset);
@@ -8140,14 +8117,14 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                            proto_tree_add_text(btree, tvb, foffset, -1, "[Truncated]");
                            break;
                        }
-                        foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL, 0);
+                        foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL);
                     }
                     proto_item_set_end(bitem, tvb, foffset);
                     proto_item_set_end(aitem, tvb, foffset);
                 }
                 break;
             case 10:    /* Printer Definition File 2 */
-                foffset = ndps_string(tvb, hf_ndps_def_file_name, ndps_tree, foffset, NULL, 0);
+                foffset = ndps_string(tvb, hf_ndps_def_file_name, ndps_tree, foffset, NULL);
                 number_of_items = tvb_get_ntohl(tvb, foffset);
                 proto_tree_add_uint(ndps_tree, hf_os_count, tvb, foffset, 4, number_of_items);
                 foffset += 4;
@@ -8172,7 +8149,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                        }
                         bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Key %d", i);
                         btree = proto_item_add_subtree(bitem, ett_ndps);
-                        foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL, 0);
+                        foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL);
                         proto_item_set_end(bitem, tvb, foffset);
                     }
                     proto_item_set_end(aitem, tvb, foffset);
@@ -8192,10 +8169,10 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
                    }
                     aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Type %d", i);
                     atree = proto_item_add_subtree(aitem, ett_ndps);
-                    foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL, 0);
-                    foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL, 0);
-                    foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL, 0);
-                    foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL, 0);
+                    foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL);
+                    foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL);
+                    foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL);
+                    foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL);
                     proto_tree_add_item(atree, hf_archive_type, tvb, foffset, 4, FALSE);
                     foffset += 4;
                     proto_tree_add_item(atree, hf_archive_file_size, tvb, foffset, 4, FALSE);
@@ -8229,7 +8206,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             foffset += 4;
             if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
                 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
-            if (tvb_get_ntohl(tvb, foffset-4) != 0) 
+            if (tvb_get_ntohl(tvb, foffset-4) != 0)
             {
                 break;
             }
@@ -8244,7 +8221,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             foffset += 4;
             if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
                 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
-            if (tvb_get_ntohl(tvb, foffset-4) != 0) 
+            if (tvb_get_ntohl(tvb, foffset-4) != 0)
             {
                 break;
             }
@@ -8268,7 +8245,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             foffset += 4;
             if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
                 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
-            if (tvb_get_ntohl(tvb, foffset-4) != 0) 
+            if (tvb_get_ntohl(tvb, foffset-4) != 0)
             {
                 break;
             }
@@ -8297,7 +8274,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
             foffset += 4;
             if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
                 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
-            if (tvb_get_ntohl(tvb, foffset-4) != 0) 
+            if (tvb_get_ntohl(tvb, foffset-4) != 0)
             {
                 break;
             }
@@ -8353,7 +8330,7 @@ proto_register_ndps(void)
         { "Record Length",    "ndps.record_length",
            FT_UINT16,    BASE_DEC,   NULL,   0x0,
            "Record Length", HFILL }},
-        
+
         { &hf_ndps_xid,
         { "Exchange ID",    "ndps.xid",
            FT_UINT32,    BASE_HEX,   NULL,   0x0,
@@ -8368,12 +8345,12 @@ proto_register_ndps(void)
         { "NDPS Program Number",    "spx.ndps_program",
           FT_UINT32,    BASE_HEX,   VALS(spx_ndps_program_vals),   0x0,
           "NDPS Program Number", HFILL }},
-       
+
         { &hf_spx_ndps_version,
         { "Program Version",    "spx.ndps_version",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
-          "Program Version", HFILL }}, 
-    
+          "Program Version", HFILL }},
+
         { &hf_ndps_error,
         { "NDPS Error",    "spx.ndps_error",
           FT_UINT32,    BASE_HEX,   NULL,   0x0,
@@ -8383,37 +8360,37 @@ proto_register_ndps(void)
         { "Extended Error String",    "ndps.ext_err_string",
           FT_STRING,    BASE_NONE,   NULL,   0x0,
           "Extended Error String", HFILL }},
-        
+
         { &hf_spx_ndps_func_print,
         { "Print Program",    "spx.ndps_func_print",
           FT_UINT32,    BASE_HEX,   VALS(spx_ndps_print_func_vals),   0x0,
           "Print Program", HFILL }},
-        
+
         { &hf_spx_ndps_func_notify,
         { "Notify Program",    "spx.ndps_func_notify",
           FT_UINT32,    BASE_HEX,   VALS(spx_ndps_notify_func_vals),   0x0,
           "Notify Program", HFILL }},
-        
+
         { &hf_spx_ndps_func_delivery,
         { "Delivery Program",    "spx.ndps_func_delivery",
           FT_UINT32,    BASE_HEX,   VALS(spx_ndps_deliver_func_vals),   0x0,
           "Delivery Program", HFILL }},
-        
+
         { &hf_spx_ndps_func_registry,
         { "Registry Program",    "spx.ndps_func_registry",
           FT_UINT32,    BASE_HEX,   VALS(spx_ndps_registry_func_vals),   0x0,
           "Registry Program", HFILL }},
-        
+
         { &hf_spx_ndps_func_resman,
         { "ResMan Program",    "spx.ndps_func_resman",
           FT_UINT32,    BASE_HEX,   VALS(spx_ndps_resman_func_vals),   0x0,
           "ResMan Program", HFILL }},
-        
+
         { &hf_spx_ndps_func_broker,
         { "Broker Program",    "spx.ndps_func_broker",
           FT_UINT32,    BASE_HEX,   VALS(spx_ndps_broker_func_vals),   0x0,
           "Broker Program", HFILL }},
-        
+
         { &hf_ndps_num_objects,
         { "Number of Objects",    "ndps.num_objects",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
@@ -8428,7 +8405,7 @@ proto_register_ndps(void)
         { "Server",    "ndps.sbuffer",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Server", HFILL }},
-        
+
         { &hf_ndps_rbuffer,
         { "Connection",    "ndps.rbuffer",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
@@ -8438,7 +8415,7 @@ proto_register_ndps(void)
         { "Trustee Name",    "ndps.user_name",
           FT_STRING,    BASE_NONE,   NULL,   0x0,
           "Trustee Name", HFILL }},
-        
+
         { &hf_ndps_broker_name,
         { "Broker Name",    "ndps.broker_name",
           FT_STRING,    BASE_NONE,   NULL,   0x0,
@@ -8463,7 +8440,7 @@ proto_register_ndps(void)
         { "Printer Name",    "ndps.pa_name",
           FT_STRING,    BASE_NONE,   NULL,   0x0,
           "Printer Name", HFILL }},
-        
+
         { &hf_ndps_tree,
         { "Tree",    "ndps.tree",
           FT_STRING,    BASE_NONE,   NULL,   0x0,
@@ -8518,12 +8495,12 @@ proto_register_ndps(void)
         { "RPC Accept Status",    "ndps.rpc_acc_stat",
           FT_UINT32,    BASE_HEX,   VALS(accept_stat),   0x0,
           "RPC Accept Status", HFILL }},
-        
+
         { &hf_ndps_rpc_rej_stat,
         { "RPC Reject Status",    "ndps.rpc_rej_stat",
           FT_UINT32,    BASE_HEX,   VALS(reject_stat),   0x0,
           "RPC Reject Status", HFILL }},
-        
+
         { &hf_ndps_rpc_acc_results,
         { "RPC Accept Results",    "ndps.rpc_acc_res",
           FT_UINT32,    BASE_HEX,   NULL,   0x0,
@@ -8533,7 +8510,7 @@ proto_register_ndps(void)
         { "Problem Type",    "ndps.rpc_prob_type",
           FT_UINT32,    BASE_HEX,   VALS(error_type_enum),   0x0,
           "Problem Type", HFILL }},
-    
+
         { &hf_security_problem_type,
         { "Security Problem",    "ndps.rpc_sec_prob",
           FT_UINT32,    BASE_HEX,   VALS(security_problem_enum),   0x0,
@@ -8543,27 +8520,27 @@ proto_register_ndps(void)
         { "Service Problem",    "ndps.rpc_serv_prob",
           FT_UINT32,    BASE_HEX,   VALS(service_problem_enum),   0x0,
           "Service Problem", HFILL }},
-        
+
         { &hf_access_problem_type,
         { "Access Problem",    "ndps.rpc_acc_prob",
           FT_UINT32,    BASE_HEX,   VALS(access_problem_enum),   0x0,
           "Access Problem", HFILL }},
-        
+
         { &hf_printer_problem_type,
         { "Printer Problem",    "ndps.rpc_print_prob",
           FT_UINT32,    BASE_HEX,   VALS(printer_problem_enum),   0x0,
           "Printer Problem", HFILL }},
-        
+
         { &hf_selection_problem_type,
         { "Selection Problem",    "ndps.rpc_sel_prob",
           FT_UINT32,    BASE_HEX,   VALS(selection_problem_enum),   0x0,
           "Selection Problem", HFILL }},
-        
+
         { &hf_doc_access_problem_type,
         { "Document Access Problem",    "ndps.rpc_doc_acc_prob",
           FT_UINT32,    BASE_HEX,   VALS(doc_access_problem_enum),   0x0,
           "Document Access Problem", HFILL }},
-        
+
         { &hf_attribute_problem_type,
         { "Attribute Problem",    "ndps.rpc_attr_prob",
           FT_UINT32,    BASE_HEX,   VALS(attribute_problem_enum),   0x0,
@@ -8573,7 +8550,7 @@ proto_register_ndps(void)
         { "Update Problem",    "ndps.rpc_update_prob",
           FT_UINT32,    BASE_HEX,   VALS(update_problem_enum),   0x0,
           "Update Problem", HFILL }},
-        
+
         { &hf_obj_id_type,
         { "Object ID Type",    "ndps.rpc_obj_id_type",
           FT_UINT32,    BASE_HEX,   VALS(obj_identification_enum),   0x0,
@@ -8583,7 +8560,7 @@ proto_register_ndps(void)
         { "OID Struct Size",    "ndps.rpc_oid_struct_size",
           FT_UINT16,    BASE_DEC,   NULL,   0x0,
           "OID Struct Size", HFILL }},
-        
+
         { &hf_object_name,
         { "Object Name",    "ndps.ndps_object_name",
           FT_STRING,    BASE_NONE,   NULL,   0x0,
@@ -8623,7 +8600,7 @@ proto_register_ndps(void)
         { "Qualified Name Type",    "ndps.ndps_qual_name_type2",
           FT_UINT32,    BASE_HEX,   VALS(qualified_name_enum2),   0x0,
           "Qualified Name Type", HFILL }},
-        
+
         { &hf_ndps_item_count,
         { "Number of Items",    "ndps.ndps_item_count",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
@@ -8693,22 +8670,22 @@ proto_register_ndps(void)
         { "Number of Arguments",    "ndps.num_argss",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Number of Arguments", HFILL }},
-        
+
         { &hf_ndps_num_transfer_methods,
         { "Number of Transfer Methods",    "ndps.num_transfer_methods",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Number of Transfer Methods", HFILL }},
-        
+
         { &hf_ndps_num_doc_types,
         { "Number of Document Types",    "ndps.num_doc_types",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Number of Document Types", HFILL }},
-        
+
         { &hf_ndps_num_destinations,
         { "Number of Destinations",    "ndps.num_destinations",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Number of Destinations", HFILL }},
-        
+
         { &hf_ndps_qualifier,
         { "Qualifier",    "ndps.ndps_qual",
           FT_UINT32,    BASE_HEX,   NULL,   0x0,
@@ -8938,7 +8915,7 @@ proto_register_ndps(void)
         { "IP Address",    "ndps.ip",
           FT_IPv4,    BASE_DEC,   NULL,   0x0,
           "IP Address", HFILL }},
-        
+
         { &hf_ndps_server_type,
         { "NDPS Server Type",    "ndps.ndps_server_type",
           FT_UINT32,    BASE_HEX,   VALS(ndps_server_type_enum),   0x0,
@@ -8948,12 +8925,12 @@ proto_register_ndps(void)
         { "Number of Services",    "ndps.ndps_num_services",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Number of Services", HFILL }},
-        
+
         { &hf_ndps_service_type,
         { "NDPS Service Type",    "ndps.ndps_service_type",
           FT_UINT32,    BASE_HEX,   VALS(ndps_service_type_enum),   0x0,
           "NDPS Service Type", HFILL }},
-    
+
         { &hf_ndps_service_enabled,
         { "Service Enabled?",    "ndps.ndps_service_enabled",
           FT_BOOLEAN,    BASE_NONE,   NULL,   0x0,
@@ -8973,7 +8950,7 @@ proto_register_ndps(void)
         { "File Name",    "ndps.file_name",
           FT_STRING,    BASE_NONE,   NULL,   0x0,
           "File Name", HFILL }},
-        
+
         { &hf_ndps_admin_submit,
         { "Admin Submit Flag?",    "ndps.admin_submit_flag",
           FT_BOOLEAN,    BASE_NONE,   NULL,   0x0,
@@ -8993,7 +8970,7 @@ proto_register_ndps(void)
         { "Answer Time",    "ndps.answer_time",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Answer Time", HFILL }},
-        
+
         { &hf_oid_asn1_type,
         { "ASN.1 Type",    "ndps.asn1_type",
           FT_UINT16,    BASE_DEC,   NULL,   0x0,
@@ -9008,17 +8985,17 @@ proto_register_ndps(void)
         { "Length",    "ndps.ndps_len",
           FT_UINT16,    BASE_DEC,   NULL,   0x0,
           "Length", HFILL }},
-     
+
         { &hf_limit_enc,
         { "Limit Encountered",    "ndps.ndps_limit_enc",
           FT_UINT32,    BASE_HEX,   VALS(ndps_limit_enc_enum),   0x0,
           "Limit Encountered", HFILL }},
-        
+
         { &hf_ndps_delivery_add_count,
         { "Number of Delivery Addresses",    "ndps.delivery_add_count",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Number of Delivery Addresses", HFILL }},
-        
+
         { &hf_ndps_delivery_add_type,
         { "Delivery Address Type",    "ndps.ndps_delivery_add_type",
           FT_UINT32,    BASE_HEX,   VALS(ndps_delivery_add_enum),   0x0,
@@ -9048,7 +9025,7 @@ proto_register_ndps(void)
         { "Resource Type",    "ndps.ndps_resource_type",
           FT_UINT32,    BASE_HEX,   VALS(ndps_resource_enum),   0x0,
           "Resource Type", HFILL }},
-      
+
         { &hf_ndps_identifier_type,
         { "Identifier Type",    "ndps.ndps_identifier_type",
           FT_UINT32,    BASE_HEX,   VALS(ndps_identifier_enum),   0x0,
@@ -9058,7 +9035,7 @@ proto_register_ndps(void)
         { "Page Flag",    "ndps.ndps_page_flag",
           FT_UINT32,    BASE_HEX,   NULL,   0x0,
           "Page Flag", HFILL }},
-        
+
         { &hf_ndps_media_type,
         { "Media Type",    "ndps.ndps_media_type",
           FT_UINT32,    BASE_HEX,   VALS(ndps_media_enum),   0x0,
@@ -9068,12 +9045,12 @@ proto_register_ndps(void)
         { "Page Size",    "ndps.ndps_page_size",
           FT_UINT32,    BASE_HEX,   VALS(ndps_page_size_enum),   0x0,
           "Page Size", HFILL }},
-     
+
         { &hf_ndps_direction,
         { "Direction",    "ndps.ndps_direction",
           FT_UINT32,    BASE_HEX,   VALS(ndps_pres_direction_enum),   0x0,
           "Direction", HFILL }},
-       
+
         { &hf_ndps_page_order,
         { "Page Order",    "ndps.ndps_page_order",
           FT_UINT32,    BASE_HEX,   VALS(ndps_page_order_enum),   0x0,
@@ -9113,12 +9090,12 @@ proto_register_ndps(void)
         { "X Dimension",    "ndps.ndps_xdimension",
           FT_UINT32,    BASE_HEX,   NULL,   0x0,
           "X Dimension", HFILL }},
-        
+
         { &hf_ndps_ydimension,
         { "Y Dimension",    "ndps.ndps_ydimension",
           FT_UINT32,    BASE_HEX,   NULL,   0x0,
           "Y Dimension", HFILL }},
-        
+
         { &hf_ndps_state_severity,
         { "State Severity",    "ndps.ndps_state_severity",
           FT_UINT32,    BASE_HEX,   VALS(ndps_state_severity_enum),   0x0,
@@ -9143,7 +9120,7 @@ proto_register_ndps(void)
         { "List Attribute Operation",    "ndps.ndps_attrs_arg",
           FT_UINT32,    BASE_HEX,   VALS(ndps_attrs_arg_enum),   0x0,
           "List Attribute Operation", HFILL }},
-        
+
         { &hf_ndps_context_len,
         { "Context Length",    "ndps.context_len",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
@@ -9163,7 +9140,7 @@ proto_register_ndps(void)
         { "Filter Item Operation",    "ndps.ndps_filter_item",
           FT_UINT32,    BASE_HEX,   VALS(ndps_filter_item_enum),   0x0,
           "Filter Item Operation", HFILL }},
-        
+
         { &hf_ndps_substring_match,
         { "Substring Match",    "ndps.ndps_substring_match",
           FT_UINT32,    BASE_HEX,   VALS(ndps_match_criteria_enum),   0x0,
@@ -9188,12 +9165,12 @@ proto_register_ndps(void)
         { "Password",    "ndps.password",
           FT_BYTES,    BASE_NONE,   NULL,   0x0,
           "Password", HFILL }},
-        
+
         { &hf_ndps_retrieve_restrictions,
         { "Retrieve Restrictions",    "ndps.ndps_ret_restrict",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Retrieve Restrictions", HFILL }},
-    
+
         { &hf_ndps_bind_security_option_count,
         { "Number of Bind Security Options",    "ndps.ndps_bind_security_count",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
@@ -9203,7 +9180,7 @@ proto_register_ndps(void)
         { "Bind Security Options",    "ndps.ndps_bind_security",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Bind Security Options", HFILL }},
-        
+
         { &hf_ndps_max_items,
         { "Maximum Items in List",    "ndps.ndps_max_items",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
@@ -9362,29 +9339,29 @@ proto_register_ndps(void)
         { &hf_ndps_segment_overlap,
           { "Segment overlap", "ndps.segment.overlap", FT_BOOLEAN, BASE_NONE,
                NULL, 0x0, "Segment overlaps with other segments", HFILL }},
-    
+
         { &hf_ndps_segment_overlap_conflict,
           { "Conflicting data in segment overlap", "ndps.segment.overlap.conflict",
        FT_BOOLEAN, BASE_NONE,
                NULL, 0x0, "Overlapping segments contained conflicting data", HFILL }},
-    
+
         { &hf_ndps_segment_multiple_tails,
           { "Multiple tail segments found", "ndps.segment.multipletails",
        FT_BOOLEAN, BASE_NONE,
                NULL, 0x0, "Several tails were found when desegmenting the packet", HFILL }},
-    
+
         { &hf_ndps_segment_too_long_segment,
           { "Segment too long",        "ndps.segment.toolongsegment", FT_BOOLEAN, BASE_NONE,
                NULL, 0x0, "Segment contained data past end of packet", HFILL }},
-    
+
         { &hf_ndps_segment_error,
           {"Desegmentation error",     "ndps.segment.error", FT_FRAMENUM, BASE_NONE,
                NULL, 0x0, "Desegmentation error due to illegal segments", HFILL }},
-    
+
         { &hf_ndps_segment,
           { "NDPS Fragment",           "ndps.fragment", FT_FRAMENUM, BASE_NONE,
                NULL, 0x0, "NDPS Fragment", HFILL }},
-    
+
         { &hf_ndps_segments,
           { "NDPS Fragments",  "ndps.fragments", FT_NONE, BASE_NONE,
                NULL, 0x0, "NDPS Fragments", HFILL }},
@@ -9397,12 +9374,12 @@ proto_register_ndps(void)
         { "Get Status Flag",    "ndps.get_status_flags",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Get Status Flag", HFILL }},
-        
+
         { &hf_res_type,
         { "Resource Type",    "ndps.res_type",
           FT_UINT32,    BASE_DEC,   VALS(ndps_res_type_enum),   0x0,
           "Resource Type", HFILL }},
-              
+
         { &hf_file_timestamp,
         { "File Time Stamp",    "ndps.file_time_stamp",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
@@ -9486,37 +9463,37 @@ proto_register_ndps(void)
         { "Method Data?",    "ndps.method_flag",
           FT_BOOLEAN,    BASE_NONE,   NULL,   0x0,
           "Method Data?", HFILL }},
-        
+
         { &hf_ndps_delivery_address_flag,
         { "Delivery Address Data?",    "ndps.delivery_flag",
           FT_BOOLEAN,    BASE_NONE,   NULL,   0x0,
           "Delivery Address Data?", HFILL }},
-       
+
         { &hf_ndps_list_profiles_type,
         { "List Profiles Type",    "ndps.ndps_list_profiles_type",
           FT_UINT32,    BASE_HEX,   VALS(ndps_attrs_arg_enum),   0x0,
           "List Profiles Type", HFILL }},
-    
+
         { &hf_ndps_list_profiles_choice_type,
         { "List Profiles Choice Type",    "ndps.ndps_list_profiles_choice_type",
           FT_UINT32,    BASE_HEX,   VALS(ndps_list_profiles_choice_enum),   0x0,
           "List Profiles Choice Type", HFILL }},
-        
+
         { &hf_ndps_list_profiles_result_type,
         { "List Profiles Result Type",    "ndps.ndps_list_profiles_result_type",
           FT_UINT32,    BASE_HEX,   VALS(ndps_list_profiles_result_enum),   0x0,
           "List Profiles Result Type", HFILL }},
-        
+
         { &hf_ndps_integer_type_flag,
         { "Integer Type Flag",    "ndps.ndps_integer_type_flag",
           FT_UINT32,    BASE_HEX,   NULL,   0x0,
           "Integer Type Flag", HFILL }},
-        
+
         { &hf_ndps_integer_type_value,
         { "Integer Type Value",    "ndps.ndps_integer_type_value",
           FT_UINT32,    BASE_HEX,   NULL,   0x0,
           "Integer Type Value", HFILL }},
-        
+
         { &hf_ndps_continuation_option,
         { "Continuation Option",    "ndps.ndps_continuation_option",
           FT_BYTES,    BASE_HEX,   NULL,   0x0,
@@ -9586,7 +9563,7 @@ proto_register_ndps(void)
         { "Byte Value",    "ndps.info_bytes",
           FT_BYTES,    BASE_NONE,   NULL,   0x0,
           "Byte Value", HFILL }},
-       
+
         { &hf_ndps_list_local_servers_type,
         { "Server Type",    "ndps.ndps_list_local_server_type",
           FT_UINT32,    BASE_HEX,   VALS(ndps_list_local_servers_enum),   0x0,
@@ -9626,7 +9603,7 @@ proto_register_ndps(void)
         { "Number of Delivery Methods",    "ndps.delivery_method_count",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Number of Delivery Methods", HFILL }},
-        
+
         { &hf_delivery_method_type,
         { "Delivery Method Type",    "ndps.delivery_method_type",
           FT_UINT32,    BASE_HEX,   VALS(ndps_delivery_method_enum),   0x0,
@@ -9661,12 +9638,12 @@ proto_register_ndps(void)
         { "Number of Values",    "ndps.num_values",
           FT_UINT32,    BASE_DEC,   NULL,   0x0,
           "Number of Values", HFILL }},
-        
+
         { &hf_ndps_object_ids_7,
         { "Object ID Definition",    "ndps.objectid_def7",
           FT_NONE,    BASE_HEX,   NULL,
           0x0, "Object ID Definition", HFILL }},
-        
+
         { &hf_ndps_object_ids_8,
         { "Object ID Definition",    "ndps.objectid_def8",
           FT_NONE,    BASE_HEX,   NULL,
@@ -9721,7 +9698,7 @@ proto_register_ndps(void)
         { "Printer Security",    "ndps.print_security",
           FT_UINT32,    BASE_HEX,   VALS(ndps_print_security),   0x0,
           "Printer Security", HFILL }},
-        
+
         { &hf_notify_time_interval,
         { "Notify Time Interval",    "ndps.notify_time_interval",
           FT_UINT32,    BASE_HEX,   NULL,   0x0,
@@ -9759,7 +9736,7 @@ proto_register_ndps(void)
                &ett_ndps_segment,
        };
        module_t *ndps_module;
-       
+
        proto_ndps = proto_register_protocol("Novell Distributed Print System", "NDPS", "ndps");
        proto_register_field_array(proto_ndps, hf_ndps, array_length(hf_ndps));
        proto_register_subtree_array(ett, array_length(ett));
@@ -9790,7 +9767,7 @@ proto_reg_handoff_ndps(void)
 
        ndps_handle = create_dissector_handle(dissect_ndps_ipx, proto_ndps);
        ndps_tcp_handle = create_dissector_handle(dissect_ndps_tcp, proto_ndps);
-       
+
        dissector_add("spx.socket", SPX_SOCKET_PA, ndps_handle);
        dissector_add("spx.socket", SPX_SOCKET_BROKER, ndps_handle);
        dissector_add("spx.socket", SPX_SOCKET_SRS, ndps_handle);