*
* $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. */
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
proto_tree *atree;
proto_item *aitem;
gboolean found=TRUE;
-
+
length = tvb_get_ntohl(tvb, foffset);
if (length==0)
{
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
found=FALSE;
break;
}
- if (!found)
+ if (!found)
{
label_value = 1;
label = match_strval(label_value, object_ids_7);
}
else
{
- if (!found)
+ if (!found)
{
tvb_ensure_bytes_exist(tvb, foffset, length);
foffset += length;
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);
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;
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;
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;
}
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:
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);
{
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)
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);
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;
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;
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;
}
}
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;
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;
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++ )
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);
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;
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);
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 */
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 */
}
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);
}
}
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;
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);
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*/
}
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 */
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);
}
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);
}
}
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)
{
}
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)
{
}
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;
}
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)
{
}
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;
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);
}
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;
}
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);
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);
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*/
}
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;
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;
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++ )
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;
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.
*
}
/* 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)
{
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;
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);
}
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;
}
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);
}
/*
- * 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
* 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)
{
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,
}
/* 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);
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);
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;
next_tvb,
"Reassembled NDPS");
/* Show all fragments. */
- if (tree)
+ if (tree)
{
show_fragment_seq_tree(fd_head,
&ndps_frag_items,
/* 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);
}
}
}
- else
+ else
{
/* Fragment from first pass of dissection */
if (check_col(pinfo->cinfo, COL_INFO))
next_tvb = NULL;
}
}
- else
+ else
{
/*
* There are no bytes so Dissect this
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);
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
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,
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 */
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");
}
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);
}
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);
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;
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);
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);
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);
}
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;
}
/* 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);
/* 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);
}
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");
/* 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);
/* 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);
}
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");
/* 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);
/* 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);
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);
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);
/* 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);
/* 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);
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 */
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;
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);
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 */
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 */
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;
/* 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 */
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;
/* 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);
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;
}
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);
/* 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");
}
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");
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 */
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;
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);
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);
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);
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;
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;
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);
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");
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);
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++ )
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;
}
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,
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);
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);
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)
{
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)
{
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)
/* 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);
/* 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);
/* 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);
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);
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 */
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++ )
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 */
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++ )
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++ )
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);
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);
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);
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 */
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;
}
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 */
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;
}
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;
}
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;
}
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;
}
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;
}
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);
}
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");
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);
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;
}
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);
}
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);
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;
}
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;
}
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;
}
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;
}
{ "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,
{ "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,
{ "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,
{ "Server", "ndps.sbuffer",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Server", HFILL }},
-
+
{ &hf_ndps_rbuffer,
{ "Connection", "ndps.rbuffer",
FT_UINT32, BASE_DEC, NULL, 0x0,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ &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 }},
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
&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));
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);