aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ndps.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-04-08 00:56:17 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-04-08 00:56:17 +0000
commit137060ae7478e7f1151ec8f077c5b375696fd602 (patch)
treec3d0378c00d9078c83111f6b2403062460680846 /packet-ndps.c
parentd316035f9693c15726bdae808c177d4626469364 (diff)
From Greg Morris: update the introductory comment, add defragmentation
support, fix various bugs, and finish up the NDPS decodes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7417 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ndps.c')
-rw-r--r--packet-ndps.c8003
1 files changed, 7030 insertions, 973 deletions
diff --git a/packet-ndps.c b/packet-ndps.c
index 7090f770fd..72ec2ff528 100644
--- a/packet-ndps.c
+++ b/packet-ndps.c
@@ -1,8 +1,9 @@
/* packet-ndps.c
* Routines for NetWare's NDPS
* Greg Morris <gmorris@novell.com>
+ * Copyright (c) Novell, Inc. 2002-2003
*
- * $Id: packet-ndps.c,v 1.10 2002/12/02 23:43:27 guy Exp $
+ * $Id: packet-ndps.c,v 1.11 2003/04/08 00:56:17 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -35,13 +36,38 @@
#include "packet-tcp.h"
#include <epan/conversation.h>
#include "packet-ndps.h"
+#include "reassemble.h"
#define NDPS_PACKET_INIT_COUNT 200
+/* Tables for reassembly of fragments. */
+static GHashTable *ndps_fragment_table = NULL;
+static GHashTable *ndps_reassembled_table = NULL;
+
+/* desegmentation of ndps */
+static gboolean ndps_defragment = TRUE;
+static guint32 frag_number = 0;
+static guint32 save_frag_length=0;
+static guint32 save_frag_seq=0;
+static gboolean ndps_fragmented = FALSE;
+static gboolean more_fragment = FALSE;
+static guint32 tid = 1;
+
static void dissect_ndps_request(tvbuff_t*, packet_info*, proto_tree*, guint32, guint32, guint32, int);
static void dissect_ndps_reply(tvbuff_t *, packet_info*, proto_tree*, guint32, int);
+static int hf_ndps_segments = -1;
+static int hf_ndps_segment = -1;
+static int hf_ndps_segment_overlap = -1;
+static int hf_ndps_segment_overlap_conflict = -1;
+static int hf_ndps_segment_multiple_tails = -1;
+static int hf_ndps_segment_too_long_segment = -1;
+static int hf_ndps_segment_error = -1;
+
+static gint ett_ndps_segments = -1;
+static gint ett_ndps_segment = -1;
+
static int proto_ndps = -1;
static int hf_ndps_record_mark = -1;
static int hf_ndps_length = -1;
@@ -50,10 +76,13 @@ static int hf_ndps_packet_type = -1;
static int hf_ndps_rpc_version = -1;
static int hf_ndps_error = -1;
static int hf_ndps_items = -1;
+static int hf_ndps_objects = -1;
+static int hf_ndps_attributes = -1;
static int hf_ndps_sbuffer = -1;
static int hf_ndps_rbuffer = -1;
+static int hf_ndps_user_name = -1;
+static int hf_ndps_broker_name = -1;
static int hf_ndps_pa_name = -1;
-static int hf_ndps_context = -1;
static int hf_ndps_tree = -1;
static int hf_ndps_error_val = -1;
static int hf_ndps_ext_error = -1;
@@ -123,6 +152,137 @@ static int hf_ndps_event_type = -1;
static int hf_ndps_event_object_identifier = -1;
static int hf_ndps_octet_string = -1;
static int hf_ndps_scope = -1;
+static int hf_address_len = -1;
+static int hf_ndps_net = -1;
+static int hf_ndps_node = -1;
+static int hf_ndps_socket = -1;
+static int hf_ndps_port = -1;
+static int hf_ndps_ip = -1;
+static int hf_ndps_server_type = -1;
+static int hf_ndps_service_type = -1;
+static int hf_ndps_service_enabled = -1;
+static int hf_ndps_method_name = -1;
+static int hf_ndps_method_ver = -1;
+static int hf_ndps_file_name = -1;
+static int hf_ndps_admin_submit = -1;
+static int hf_ndps_oid = -1;
+static int hf_ndps_object_op = -1;
+static int hf_answer_time = -1;
+static int hf_oid_asn1_type = -1;
+static int hf_ndps_item_ptr = -1;
+static int hf_ndps_len = -1;
+static int hf_limit_enc = -1;
+static int hf_ndps_qualified_name2 = -1;
+static int hf_ndps_delivery_add_type = -1;
+static int hf_ndps_criterion_type = -1;
+static int hf_ndps_ignored_type = -1;
+static int hf_ndps_resource_type = -1;
+static int hf_ndps_identifier_type = -1;
+static int hf_ndps_page_flag = -1;
+static int hf_ndps_media_type = -1;
+static int hf_ndps_doc_content = -1;
+static int hf_ndps_page_size = -1;
+static int hf_ndps_direction = -1;
+static int hf_ndps_page_order = -1;
+static int hf_ndps_medium_size = -1;
+static int hf_ndps_long_edge_feeds = -1;
+static int hf_ndps_inc_across_feed = -1;
+static int hf_ndps_size_inc_in_feed = -1;
+static int hf_ndps_page_orientation = -1;
+static int hf_ndps_numbers_up = -1;
+static int hf_ndps_xdimension = -1;
+static int hf_ndps_ydimension = -1;
+static int hf_ndps_state_severity = -1;
+static int hf_ndps_training = -1;
+static int hf_ndps_colorant_set = -1;
+static int hf_ndps_card_enum_time = -1;
+static int hf_ndps_attrs_arg = -1;
+static int hf_ndps_context = -1;
+static int hf_ndps_filter = -1;
+static int hf_ndps_item_filter = -1;
+static int hf_ndps_substring_match = -1;
+static int hf_ndps_time_limit = -1;
+static int hf_ndps_count_limit = -1;
+static int hf_ndps_operator = -1;
+static int hf_ndps_password = -1;
+static int hf_ndps_retrieve_restrictions = -1;
+static int hf_bind_security = -1;
+static int hf_ndps_max_items = -1;
+static int hf_ndps_status_flags = -1;
+static int hf_ndps_resource_list_type = -1;
+static int hf_os_type = -1;
+static int hf_ndps_printer_type = -1;
+static int hf_ndps_printer_manuf = -1;
+static int hf_ndps_inf_file_name = -1;
+static int hf_ndps_vendor_dir = -1;
+static int hf_banner_type = -1;
+static int hf_font_type = -1;
+static int hf_printer_id = -1;
+static int hf_ndps_font_name = -1;
+static int hf_ndps_return_code = -1;
+static int hf_ndps_banner_name = -1;
+static int hf_font_type_name = -1;
+static int hf_font_file_name = -1;
+static int hf_ndps_prn_file_name = -1;
+static int hf_ndps_prn_dir_name = -1;
+static int hf_ndps_def_file_name = -1;
+static int hf_ndps_win31_items = -1;
+static int hf_ndps_win95_items = -1;
+static int hf_ndps_windows_key = -1;
+static int hf_archive_type = -1;
+static int hf_archive_file_size = -1;
+static int hf_ndps_data = -1;
+static int hf_get_status_flag = -1;
+static int hf_res_type = -1;
+static int hf_file_timestamp = -1;
+static int hf_sub_complete = -1;
+static int hf_doc_content = -1;
+static int hf_ndps_doc_name = -1;
+static int hf_print_arg = -1;
+static int hf_local_id = -1;
+static int hf_ndps_included_doc = -1;
+static int hf_ndps_ref_name = -1;
+static int hf_interrupt_job_type = -1;
+static int hf_pause_job_type = -1;
+static int hf_ndps_force = -1;
+static int hf_resubmit_op_type = -1;
+static int hf_shutdown_type = -1;
+static int hf_ndps_supplier_flag = -1;
+static int hf_ndps_language_flag = -1;
+static int hf_ndps_method_flag = -1;
+static int hf_ndps_delivery_address_flag = -1;
+static int hf_ndps_list_profiles_type = -1;
+static int hf_ndps_list_profiles_choice_type = -1;
+static int hf_ndps_list_profiles_result_type = -1;
+static int hf_ndps_integer_type_flag = -1;
+static int hf_ndps_integer_type_value = -1;
+static int hf_ndps_continuation_option = -1;
+static int hf_ndps_ds_info_type = -1;
+static int hf_ndps_guid = -1;
+static int hf_ndps_list_services_type = -1;
+static int hf_ndps_item_bytes = -1;
+static int hf_ndps_certified = -1;
+static int hf_ndps_attribute_set = -1;
+static int hf_ndps_data_item_type = -1;
+static int hf_info_int = -1;
+static int hf_info_int16 = -1;
+static int hf_info_int32 = -1;
+static int hf_info_boolean = -1;
+static int hf_info_string = -1;
+static int hf_info_bytes = -1;
+static int hf_ndps_list_local_servers_type = -1;
+static int hf_ndps_registry_name = -1;
+static int hf_ndps_client_server_type = -1;
+static int hf_ndps_session_type = -1;
+static int hf_time = -1;
+static int hf_ndps_supplier_name = -1;
+static int hf_ndps_message = -1;
+static int hf_delivery_method_type = -1;
+static int hf_ndps_get_session_type = -1;
+static int hf_packet_count = -1;
+static int hf_last_packet_flag = -1;
+static int hf_ndps_get_resman_session_type = -1;
+static int hf_problem_type = -1;
static int hf_spx_ndps_program = -1;
static int hf_spx_ndps_version = -1;
@@ -145,6 +305,19 @@ static const value_string true_false[] = {
{ 0, NULL }
};
+static const value_string ndps_limit_enc_enum[] = {
+ { 0x00000000, "Time" },
+ { 0x00000001, "Count" },
+ { 0x00000002, "Error" },
+ { 0, NULL }
+};
+
+static const value_string problem_type_enum[] = {
+ { 0x00000000, "Standard" },
+ { 0x00000001, "Extended" },
+ { 0, NULL }
+};
+
static const value_string accept_stat[] = {
{ 0x00000000, "Success" },
{ 0x00000001, "Program Unavailable" },
@@ -265,16 +438,15 @@ static const value_string update_problem_enum[] = {
};
static const value_string obj_identification_enum[] = {
- { 0x00000000, "None" },
- { 0x00000001, "Printer Contained Object ID" },
- { 0x00000002, "Document Identifier" },
- { 0x00000003, "Object Identifier" },
- { 0x00000004, "Object Name" },
- { 0x00000005, "Name or Object ID" },
- { 0x00000006, "Simple Name" },
- { 0x00000007, "Printer Configuration Object ID" },
- { 0x00000008, "Qualified Name" },
- { 0x00000009, "Event Object ID" },
+ { 0x00000000, "Printer Contained Object ID" },
+ { 0x00000001, "Document Identifier" },
+ { 0x00000002, "Object Identifier" },
+ { 0x00000003, "Object Name" },
+ { 0x00000004, "Name or Object ID" },
+ { 0x00000005, "Simple Name" },
+ { 0x00000006, "Printer Configuration Object ID" },
+ { 0x00000007, "Qualified Name" },
+ { 0x00000008, "Event Object ID" },
{ 0, NULL }
};
@@ -292,6 +464,10 @@ static const value_string qualified_name_enum[] = {
{ 0, NULL }
};
+static const value_string qualified_name_enum2[] = {
+ { 0x00000000, "NDS" },
+ { 0, NULL }
+};
static const value_string spx_ndps_program_vals[] = {
{ 0x00060976, "Print Program" },
@@ -304,6 +480,7 @@ static const value_string spx_ndps_program_vals[] = {
};
static const value_string spx_ndps_print_func_vals[] = {
+ { 0x00000000, "None" },
{ 0x00000001, "Bind PSM" },
{ 0x00000002, "Bind PA" },
{ 0x00000003, "Unbind" },
@@ -342,6 +519,7 @@ static const value_string spx_ndps_print_func_vals[] = {
};
static const value_string spx_ndps_notify_func_vals[] = {
+ { 0x00000000, "None" },
{ 0x00000001, "Notify Bind" },
{ 0x00000002, "Notify Unbind" },
{ 0x00000003, "Register Supplier" },
@@ -363,6 +541,7 @@ static const value_string spx_ndps_notify_func_vals[] = {
};
static const value_string spx_ndps_deliver_func_vals[] = {
+ { 0x00000000, "None" },
{ 0x00000001, "Delivery Bind" },
{ 0x00000002, "Delivery Unbind" },
{ 0x00000003, "Delivery Send" },
@@ -371,6 +550,7 @@ static const value_string spx_ndps_deliver_func_vals[] = {
};
static const value_string spx_ndps_registry_func_vals[] = {
+ { 0x00000000, "None" },
{ 0x00000001, "Bind" },
{ 0x00000002, "Unbind" },
{ 0x00000003, "Register Server" },
@@ -387,13 +567,14 @@ static const value_string spx_ndps_registry_func_vals[] = {
};
static const value_string spx_ndps_resman_func_vals[] = {
+ { 0x00000000, "None" },
{ 0x00000001, "Bind" },
{ 0x00000002, "Unbind" },
{ 0x00000003, "Add Resource File" },
{ 0x00000004, "Delete Resource File" },
{ 0x00000005, "List Resources" },
{ 0x00000006, "Get Resource File" },
- { 0x00000007, "Get Resource File Data" },
+ { 0x00000007, "Get Resource File Date" },
{ 0x00000008, "Get Resource Manager NDS Object Name" },
{ 0x00000009, "Get Resource Manager Session Information" },
{ 0x0000000a, "Set Resource Language Context" },
@@ -401,6 +582,7 @@ static const value_string spx_ndps_resman_func_vals[] = {
};
static const value_string spx_ndps_broker_func_vals[] = {
+ { 0x00000000, "None" },
{ 0x00000001, "Bind" },
{ 0x00000002, "Unbind" },
{ 0x00000003, "List Services" },
@@ -459,8 +641,8 @@ static const value_string ndps_card_or_oid_enum[] = {
};
static const value_string ndps_card_name_or_oid_enum[] = {
- { 0x00000000, "ID" },
- { 0x00000001, "Name" },
+ { 0x00000000, "Number" },
+ { 0x00000001, "ID" },
{ 0, NULL }
};
@@ -509,6 +691,16 @@ static const value_string ndps_address_enum[] = {
{ 0, NULL }
};
+
+static const value_string ndps_server_type_enum[] = {
+ { 0x00000000, "All" },
+ { 0x00000001, "Public Access Printer Agent" },
+ { 0x00000002, "Notification Server" },
+ { 0x00000003, "Resource Manager" },
+ { 0x00000004, "Network Port Handler" },
+ { 0, NULL }
+};
+
static const value_string ndps_event_object_enum[] = {
{ 0x00000000, "Object" },
{ 0x00000001, "Filter" },
@@ -516,6 +708,319 @@ static const value_string ndps_event_object_enum[] = {
{ 0, NULL }
};
+static const value_string ndps_service_type_enum[] = {
+ { 0x00000000, "SRS" },
+ { 0x00000001, "ENS" },
+ { 0x00000002, "RMS" },
+ { 0, NULL }
+};
+
+static const value_string ndps_delivery_add_enum[] = {
+ { 0x00000000, "MHS Address" },
+ { 0x00000001, "Distinguished Name" },
+ { 0x00000002, "Text" },
+ { 0x00000003, "Octet String" },
+ { 0x00000004, "Distinguished Name String" },
+ { 0x00000005, "RPC Address" },
+ { 0x00000006, "Qualified Name" },
+ { 0, NULL }
+};
+
+static const value_string ndps_resource_enum[] = {
+ { 0x00000000, "Name or ID" },
+ { 0x00000001, "Text" },
+ { 0, NULL }
+};
+
+
+static const value_string ndps_identifier_enum[] = {
+ { 0x00000000, "ID Nominal Number" },
+ { 0x00000001, "ID Alpha-numeric" },
+ { 0x00000002, "ID Tag" },
+ { 0, NULL }
+};
+
+static const value_string ndps_media_enum[] = {
+ { 0x00000000, "Select All Pages" },
+ { 0x00000001, "Selected Pages" },
+ { 0, NULL }
+};
+
+static const value_string ndps_page_size_enum[] = {
+ { 0x00000000, "ID" },
+ { 0x00000001, "Demensions" },
+ { 0, NULL }
+};
+
+static const value_string ndps_pres_direction_enum[] = {
+ { 0x00000000, "Right to Bottom" },
+ { 0x00000001, "Left to Bottom" },
+ { 0x00000002, "Bidirectional to Bottom" },
+ { 0x00000003, "Right to Top" },
+ { 0x00000004, "Left to Top" },
+ { 0x00000005, "Bidirectional to Top" },
+ { 0x00000006, "Bottom to Right" },
+ { 0x00000007, "Bottom to Left" },
+ { 0x00000008, "Top to Left" },
+ { 0x00000009, "Top to Right" },
+ { 0, NULL }
+};
+
+static const value_string ndps_page_order_enum[] = {
+ { 0x00000000, "Unknown" },
+ { 0x00000001, "First to Last" },
+ { 0x00000002, "Last to First" },
+ { 0, NULL }
+};
+
+static const value_string ndps_medium_size_enum[] = {
+ { 0x00000000, "Descrete" },
+ { 0x00000001, "Continuous" },
+ { 0, NULL }
+};
+
+static const value_string ndps_page_orientation_enum[] = {
+ { 0x00000000, "Unknown" },
+ { 0x00000001, "Face Up" },
+ { 0x00000002, "Face Down" },
+ { 0, NULL }
+};
+
+static const value_string ndps_numbers_up_enum[] = {
+ { 0x00000000, "Cardinal" },
+ { 0x00000001, "Name or Object ID" },
+ { 0x00000002, "Cardinal Range" },
+ { 0, NULL }
+};
+
+
+static const value_string ndps_state_severity_enum[] = {
+ { 0x00000001, "Other" },
+ { 0x00000002, "Warning" },
+ { 0x00000003, "Critical" },
+ { 0, NULL }
+};
+
+
+static const value_string ndps_training_enum[] = {
+ { 0x00000001, "Other" },
+ { 0x00000002, "Unknown" },
+ { 0x00000003, "Untrained" },
+ { 0x00000004, "Trained" },
+ { 0x00000005, "Field Service" },
+ { 0x00000006, "Management" },
+ { 0, NULL }
+};
+
+static const value_string ndps_colorant_set_enum[] = {
+ { 0x00000000, "Name" },
+ { 0x00000001, "Description" },
+ { 0, NULL }
+};
+
+static const value_string ndps_card_enum_time_enum[] = {
+ { 0x00000000, "Cardinal" },
+ { 0x00000001, "Enumeration" },
+ { 0x00000002, "Time" },
+ { 0, NULL }
+};
+
+static const value_string ndps_attrs_arg_enum[] = {
+ { 0x00000000, "Continuation" },
+ { 0x00000001, "Specification" },
+ { 0, NULL }
+};
+
+
+static const value_string ndps_filter_enum[] = {
+ { 0x00000000, "Item" },
+ { 0x00000001, "And" },
+ { 0x00000002, "Or" },
+ { 0x00000003, "Not" },
+ { 0, NULL }
+};
+
+
+static const value_string ndps_filter_item_enum[] = {
+ { 0x00000000, "Equality" },
+ { 0x00000001, "Substrings" },
+ { 0x00000002, "Greater then or Equal to" },
+ { 0x00000003, "Less then or Equal to" },
+ { 0x00000004, "Present" },
+ { 0x00000005, "Subset of" },
+ { 0x00000006, "Superset of" },
+ { 0x00000007, "Non NULL Set Intersect" },
+ { 0, NULL }
+};
+
+static const value_string ndps_match_criteria_enum[] = {
+ { 0x00000000, "Exact" },
+ { 0x00000001, "Case Insensitive" },
+ { 0x00000002, "Same Letter" },
+ { 0x00000003, "Approximate" },
+ { 0, NULL }
+};
+
+static const value_string ndps_operator_enum[] = {
+ { 0x00000000, "Attributes" },
+ { 0x00000002, "Ordered Jobs" },
+ { 0, NULL }
+};
+
+static const value_string ndps_resource_type_enum[] = {
+ { 0x00000000, "Printer Drivers" },
+ { 0x00000001, "Printer Definitions" },
+ { 0x00000002, "Printer Definitions Short" },
+ { 0x00000003, "Banner Page Files" },
+ { 0x00000004, "Font Types" },
+ { 0x00000005, "Printer Driver Files" },
+ { 0x00000006, "Printer Definition File" },
+ { 0x00000007, "Font Files" },
+ { 0x00000008, "Generic Type" },
+ { 0x00000009, "Generic Files" },
+ { 0x0000000a, "Printer Definition File 2" },
+ { 0x0000000b, "Printer Driver Types 2" },
+ { 0x0000000c, "Printer Driver Files 2" },
+ { 0x0000000d, "Printer Driver Types Archive" },
+ { 0x0000000e, "Languages Available" },
+ { 0, NULL }
+};
+
+static const value_string ndps_os_type_enum[] = {
+ { 0x00000000, "DOS" },
+ { 0x00000001, "Windows 31" },
+ { 0x00000002, "Windows 95" },
+ { 0x00000003, "Windows NT" },
+ { 0x00000004, "OS2" },
+ { 0x00000005, "MAC" },
+ { 0x00000006, "UNIX" },
+ { 0x00000007, "Windows NT4" },
+ { 0x00000008, "Windows 2000/XP" },
+ { 0x00000009, "Windows 98" },
+ { 0xffffffff, "None" },
+ { 0, NULL }
+};
+
+static const value_string ndps_banner_type_enum[] = {
+ { 0x00000000, "All" },
+ { 0x00000001, "PCL" },
+ { 0x00000002, "PostScript" },
+ { 0x00000003, "Ascii Text" },
+ { 0, NULL }
+};
+
+static const value_string ndps_font_type_enum[] = {
+ { 0x00000000, "True Type" },
+ { 0x00000001, "PostScript" },
+ { 0x00000002, "System" },
+ { 0x00000003, "SPD" },
+ { 0x00000004, "True Doc" },
+ { 0, NULL }
+};
+
+static const value_string ndps_archive_enum[] = {
+ { 0x00000000, "ZIP" },
+ { 0x00000001, "JAR" },
+ { 0, NULL }
+};
+
+
+static const value_string ndps_res_type_enum[] = {
+ { 0x00000000, "Printer Driver" },
+ { 0x00000001, "Printer Definition" },
+ { 0x00000002, "Banner Page" },
+ { 0x00000003, "Font" },
+ { 0x00000004, "Generic Resource" },
+ { 0x00000005, "Print Driver Archive" },
+ { 0, NULL }
+};
+
+static const value_string ndps_print_arg_enum[] = {
+ { 0x00000000, "Create Job" },
+ { 0x00000001, "Add Document" },
+ { 0x00000002, "Close Job" },
+ { 0, NULL }
+};
+
+static const value_string ndps_doc_content_enum[] = {
+ { 0x00000000, "Content Included" },
+ { 0x00000001, "Content Referenced" },
+ { 0, NULL }
+};
+
+static const value_string ndps_interrupt_job_enum[] = {
+ { 0x00000000, "Job ID" },
+ { 0x00000001, "Name" },
+ { 0, NULL }
+};
+
+static const value_string ndps_pause_job_enum[] = {
+ { 0x00000000, "Job ID" },
+ { 0x00000001, "Name" },
+ { 0, NULL }
+};
+
+static const value_string ndps_resubmit_op_enum[] = {
+ { 0x00000000, "Copy" },
+ { 0x00000001, "Move" },
+ { 0, NULL }
+};
+
+static const value_string ndps_shutdown_enum[] = {
+ { 0x00000000, "Do Current Jobs" },
+ { 0x00000001, "Immediate" },
+ { 0x00000002, "Do Pending Jobs" },
+ { 0, NULL }
+};
+
+static const value_string ndps_list_profiles_choice_enum[] = {
+ { 0x00000000, "ID" },
+ { 0x00000001, "Filter" },
+ { 0, NULL }
+};
+
+static const value_string ndps_list_profiles_result_enum[] = {
+ { 0x00000000, "Complete" },
+ { 0x00000001, "No Event Objects" },
+ { 0x00000002, "Profile ID's" },
+ { 0, NULL }
+};
+
+static const value_string ndps_ds_info_enum[] = {
+ { 0x00000000, "Add" },
+ { 0x00000001, "Remove" },
+ { 0x00000002, "Update" },
+ { 0, NULL }
+};
+
+static const value_string ndps_list_services_enum[] = {
+ { 0x00000000, "Supported" },
+ { 0x00000001, "Enabled" },
+ { 0, NULL }
+};
+
+static const value_string ndps_data_item_enum[] = {
+ { 0x00000000, "Int8" },
+ { 0x00000001, "Int16" },
+ { 0x00000002, "Int32" },
+ { 0x00000003, "Boolean" },
+ { 0x00000004, "Character String" },
+ { 0x00000005, "Byte String" },
+ { 0, NULL }
+};
+
+static const value_string ndps_list_local_servers_enum[] = {
+ { 0x00000000, "Specification" },
+ { 0x00000001, "Continuation" },
+ { 0, NULL }
+};
+
+static const value_string ndps_delivery_method_enum[] = {
+ { 0x00000000, "Specification" },
+ { 0x00000001, "Continuation" },
+ { 0, NULL }
+};
+
static const value_string ndps_attribute_enum[] = {
{ 0x00000000, "Null" },
{ 0x00000001, "Text" },
@@ -524,7 +1029,7 @@ static const value_string ndps_attribute_enum[] = {
{ 0x00000004, "Message" },
{ 0x00000005, "Error Message" },
{ 0x00000006, "Simple Name" },
- { 0x00000007, "Distinguished Name" },
+ { 0x00000007, "Distinguished Name String" },
{ 0x00000008, "Distinguished Name Seq" },
{ 0x00000009, "Delta Time" },
{ 0x0000000a, "Time" },
@@ -631,328 +1136,330 @@ static const value_string ndps_attribute_enum[] = {
};
static const value_string ndps_error_types[] = {
- { 0xFFFFFC18, "NWDP_OE_BK_OUT_OF_MEMORY" }, /* Broker Errors */
- { 0xFFFFFC17, "NWDP_OE_BK_BAD_NETWARE_VERSION" },
- { 0xFFFFFC16, "NWDP_OE_BK_WRONG_CMD_LINE_ARGS" },
- { 0xFFFFFC15, "NWDP_OE_BK_BROKER_NAME_NOT_GIVN" },
- { 0xFFFFFC14, "NWDP_OE_BK_NOT_BROKER_CLASS" },
- { 0xFFFFFC13, "NWDP_OE_BK_INVALID_BROKER_PWORD" },
- { 0xFFFFFC12, "NWDP_OE_BK_INVALID_BROKER_NAME" },
- { 0xFFFFFC11, "NWDP_OE_BK_FAILED_TO_CRTE_THRED" },
- { 0xFFFFFC10, "NWDP_OE_BK_FAILED_TO_INIT_NUT" },
- { 0xFFFFFC0F, "NWDP_OE_BK_FAILED_TO_GET_MSGS" },
- { 0xFFFFFC0E, "NWDP_OE_BK_FAILED_TO_ALLOC_RES" },
- { 0xFFFFFC0D, "NWDP_OE_BK_SVC_MUST_BE_FULL_DIS" },
- { 0xFFFFFC0C, "NWDP_OE_BK_UNINITIALIZED_MODULE" },
- { 0xFFFFFC0B, "NWDP_OE_BK_DS_VAL_SIZE_TOO_LARG" },
- { 0xFFFFFC0A, "NWDP_OE_BK_NO_ATTRIBUTE_VALUES" },
- { 0xFFFFFC09, "NWDP_OE_BK_UNKNOWN_SESSION" },
- { 0xFFFFFC08, "NWDP_OE_BK_SERVICE_DISABLED" },
- { 0xFFFFFC07, "NWDP_OE_BK_UNKNOWN_MODIFY_OPER" },
- { 0xFFFFFC06, "NWDP_OE_BK_INVALID_ARGUMENTS" },
- { 0xFFFFFC05, "NWDP_OE_BK_DUPLICATE_SESSION_ID" },
- { 0xFFFFFC04, "NWDP_OE_BK_UNKNOWN_SERVICE" },
- { 0xFFFFFC03, "NWDP_OE_BK_SRVC_ALREADY_ENABLED" },
- { 0xFFFFFC02, "NWDP_OE_BK_SRVC_ALREADY_DISABLD" },
- { 0xFFFFFC01, "NWDP_OE_BK_INVALID_CREDENTIAL" },
- { 0xFFFFFC00, "NWDP_OE_BK_UNKNOWN_DESIGNATOR" },
- { 0xFFFFFBFF, "NWDP_OE_BK_FAIL_MAKE_CHG_PERMNT" },
- { 0xFFFFFBFE, "NWDP_OE_BK_NOT_ADMIN_TYPE_SESN" },
- { 0xFFFFFBFD, "NWDP_OE_BK_OPTION_NOT_SUPPORTED" },
- { 0xFFFFFBFC, "NWDP_OE_BK_NO_EFFECTIVE_RIGHTS" },
- { 0xFFFFFBFB, "NWDP_OE_BK_COULD_NOT_FIND_FILE" },
- { 0xFFFFFBFA, "NWDP_OE_BK_ERROR_READING_FILE" },
- { 0xFFFFFBF9, "NWDP_OE_BK_NOT_NLM_FILE_FORMAT" },
- { 0xFFFFFBF8, "NWDP_OE_BK_WRONG_NLM_FILE_VER" },
- { 0xFFFFFBF7, "NWDP_OE_BK_REENTRANT_INIT_FAIL" },
- { 0xFFFFFBF6, "NWDP_OE_BK_ALREADY_IN_PROGRESS" },
- { 0xFFFFFBF5, "NWDP_OE_BK_INITIALIZE_FAILURE" },
- { 0xFFFFFBF4, "NWDP_OE_BK_INCONSISTNT_FILE_FMT" },
- { 0xFFFFFBF3, "NWDP_OE_BK_CANT_LOAD_AT_STARTUP" },
- { 0xFFFFFBF2, "NWDP_OE_BK_AUTO_MODULS_NOT_LOAD" },
- { 0xFFFFFBF1, "NWDP_OE_BK_UNRESOLVED_EXTERNAL" },
- { 0xFFFFFBF0, "NWDP_OE_BK_PUBLIC_ALREADY_DEFND" },
- { 0xFFFFFBEF, "NWDP_OE_BK_OTHER_BRKR_USING_OBJ" },
- { 0xFFFFFBEE, "NWDP_OE_BK_SRVC_FAILED_TO_INIT" },
- { 0xFFFFFBB4, "NWDP_OE_RG_OUT_OF_MEMORY" }, /* SRS Errors */
- { 0xFFFFFBB3, "NWDP_OE_RG_BAD_NETWARE_VERSION" },
- { 0xFFFFFBB2, "NWDP_OE_RG_FAIL_CREATE_CONTEXT" },
- { 0xFFFFFBB1, "NWDP_OE_RG_FAIL_LOGIN" },
- { 0xFFFFFBB0, "NWDP_OE_RG_FAIL_CREATE_THREAD" },
- { 0xFFFFFBAF, "NWDP_OE_RG_FAIL_GET_MSGS" },
- { 0xFFFFFBAE, "NWDP_OE_RG_SVC_MUST_BE_FULL_DIS" },
- { 0xFFFFFBAD, "NWDP_OE_RG_DS_VAL_SIZE_TOO_LARG" },
- { 0xFFFFFBAC, "NWDP_OE_RG_NO_ATTRIBUTE_VALUES" },
- { 0xFFFFFBAB, "NWDP_OE_RG_UNKNOWN_SESSION" },
- { 0xFFFFFBAA, "NWDP_OE_RG_SERVICE_DISABLED" },
- { 0xFFFFFBA9, "NWDP_OE_RG_UNKNOWN_MODIFY_OPER" },
- { 0xFFFFFBA8, "NWDP_OE_RG_CANT_START_ADVERTISE" },
- { 0xFFFFFBA7, "NWDP_OE_RG_DUP_SERVER_ENTRY" },
- { 0xFFFFFBA6, "NWDP_OE_RG_CANT_BIND_2_REGISTRY" },
- { 0xFFFFFBA5, "NWDP_OE_RG_CANT_CREATE_CLIENT" },
- { 0xFFFFFBA4, "NWDP_OE_RG_INVALID_ARGUMENTS" },
- { 0xFFFFFBA3, "NWDP_OE_RG_DUPLICATE_SESSION_ID" },
- { 0xFFFFFBA2, "NWDP_OE_RG_UNKNOWN_SERVER_ENTRY" },
- { 0xFFFFFBA1, "NWDP_OE_RG_INVALID_CREDENTIAL" },
- { 0xFFFFFBA0, "NWDP_OE_RG_REGIST_TYPE_SESN" },
- { 0xFFFFFB9F, "NWDP_OE_RG_SERVER_TYPE_SESN" },
- { 0xFFFFFB9E, "NWDP_OE_RG_NOT_SERVER_TYPE_SESN" },
- { 0xFFFFFB9D, "NWDP_OE_RG_NOT_REGIST_TYPE_SESN" },
- { 0xFFFFFB9C, "NWDP_OE_RG_UNKNOWN_DESIGNATOR" },
- { 0xFFFFFB9B, "NWDP_OE_RG_OPTION_NOT_SUPPORTED" },
- { 0xFFFFFB9A, "NWDP_OE_RG_NOT_IN_LST_ITERATION" },
- { 0xFFFFFB99, "NWDP_OE_RG_INVLD_CONTNUATN_HNDL" },
- { 0xFFFFFB50, "NWDP_OE_NF_OUT_OF_MEMORY" }, /* Notification Service Errors */
- { 0xFFFFFB4F, "NWDP_OE_NF_BAD_NETWARE_VERSION" },
- { 0xFFFFFB4E, "NWDP_OE_NF_FAIL_CREATE_THREAD" },
- { 0xFFFFFB4D, "NWDP_OE_NF_FAIL_GET_MSGS" },
- { 0xFFFFFB4C, "NWDP_OE_NF_FAIL_CREATE_CONTEXT" },
- { 0xFFFFFB4B, "NWDP_OE_NF_FAIL_LOGIN" },
- { 0xFFFFFB4A, "NWDP_OE_NF_SVC_MUST_BE_FULL_DIS" },
- { 0xFFFFFB49, "NWDP_OE_NF_DS_VAL_SIZE_TOO_LARG" },
- { 0xFFFFFB48, "NWDP_OE_NF_NO_ATTRIBUTE_VALUES" },
- { 0xFFFFFB47, "NWDP_OE_NF_UNKNOWN_SESSION" },
- { 0xFFFFFB46, "NWDP_OE_NF_UNKNOWN_NOTIFY_PROF" },
- { 0xFFFFFB45, "NWDP_OE_NF_ERROR_READING_FILE" },
- { 0xFFFFFB44, "NWDP_OE_NF_ERROR_WRITING_FILE" },
- { 0xFFFFFB43, "NWDP_OE_NF_WRONG_NOTIFY_DB_VERS" },
- { 0xFFFFFB42, "NWDP_OE_NF_CORRUPTED_NOTIFY_DB" },
- { 0xFFFFFB41, "NWDP_OE_NF_UNKNOWN_EVENT_OID" },
- { 0xFFFFFB40, "NWDP_OE_NF_METHOD_ALREADY_INST" },
- { 0xFFFFFB3F, "NWDP_OE_NF_UNKNOWN_METHOD" },
- { 0xFFFFFB3E, "NWDP_OE_NF_SERVICE_DISABLED" },
- { 0xFFFFFB3D, "NWDP_OE_NF_UNKNOWN_MODIFY_OP" },
- { 0xFFFFFB3C, "NWDP_OE_NF_OUT_OF_NOTIFY_ENTRYS" },
- { 0xFFFFFB3B, "NWDP_OE_NF_UNKNOWN_LANGUAGE_ID" },
- { 0xFFFFFB3A, "NWDP_OE_NF_NOTIFY_QUEUE_EMPTY" },
- { 0xFFFFFB39, "NWDP_OE_NF_CANT_LOAD_DELVR_METH" },
- { 0xFFFFFB38, "NWDP_OE_NF_INVALID_ARGUMENTS" },
- { 0xFFFFFB37, "NWDP_OE_NF_DUPLICATE_SESSION_ID" },
- { 0xFFFFFB36, "NWDP_OE_NF_INVALID_CREDENTIAL" },
- { 0xFFFFFB35, "NWDP_OE_NF_UNKNOWN_CHOICE" },
- { 0xFFFFFB34, "NWDP_OE_NF_UNKNOWN_ATTR_VALUE" },
- { 0xFFFFFB33, "NWDP_OE_NF_ERROR_WRITING_DB" },
- { 0xFFFFFB32, "NWDP_OE_NF_UNKNOWN_OBJECT_ID" },
- { 0xFFFFFB31, "NWDP_OE_NF_UNKNOWN_DESIGNATOR" },
- { 0xFFFFFB30, "NWDP_OE_NF_FAIL_MAKE_CHG_PERMNT" },
- { 0xFFFFFB2F, "NWDP_OE_NF_UI_NOT_SUPPORTED" },
- { 0xFFFFFB2E, "NWDP_OE_NF_NOT_SUPPLY_TYPE_SESN" },
- { 0xFFFFFB2D, "NWDP_OE_NF_NOT_ADMIN_TYPE_SESN" },
- { 0xFFFFFB2C, "NWDP_OE_NF_NO_SRVC_REGIST_AVAIL" },
- { 0xFFFFFB2B, "NWDP_OE_NF_FAIL_TO_REG_W_ANY_SR" },
- { 0xFFFFFB2A, "NWDP_OE_NF_EMPTY_EVENT_OBJ_SET" },
- { 0xFFFFFB29, "NWDP_OE_NF_UNKNOWN_NTFY_HANDLE" },
- { 0xFFFFFB28, "NWDP_OE_NF_OPTION_NOT_SUPPORTED" },
- { 0xFFFFFB27, "NWDP_OE_NF_UNKNOWN_RPC_SESSION" },
- { 0xFFFFFB26, "NWDP_OE_NF_INITIALIZATION_ERROR" },
- { 0xFFFFFB25, "NWDP_OE_NF_NO_EFFECTIVE_RIGHTS" },
- { 0xFFFFFB24, "NWDP_OE_NF_NO_PERSISTENT_STORAG" },
- { 0xFFFFFB23, "NWDP_OE_NF_BAD_METHOD_FILENAME" },
- { 0xFFFFFB22, "NWDP_OE_NF_UNKNOWN_CONT_HANDLE" },
- { 0xFFFFFB21, "NWDP_OE_NF_INVALID_CONT_HANDLE" },
- { 0xFFFFFB20, "NWDP_OE_NF_COULD_NOT_FIND_FILE" },
- { 0xFFFFFB1F, "NWDP_OE_NF_L_ERROR_READING_FILE" },
- { 0xFFFFFB1E, "NWDP_OE_NF_NOT_NLM_FILE_FORMAT" },
- { 0xFFFFFB1D, "NWDP_OE_NF_WRONG_NLM_FILE_VER" },
- { 0xFFFFFB1C, "NWDP_OE_NF_REENTRANT_INIT_FAIL" },
- { 0xFFFFFB1B, "NWDP_OE_NF_ALREADY_IN_PROGRESS" },
- { 0xFFFFFB1A, "NWDP_OE_NF_INITIALIZE_FAILURE" },
- { 0xFFFFFB19, "NWDP_OE_NF_INCONSISTNT_FILE_FMT" },
- { 0xFFFFFB18, "NWDP_OE_NF_CANT_LOAD_AT_STARTUP" },
- { 0xFFFFFB17, "NWDP_OE_NF_AUTO_MODULS_NOT_LOAD" },
- { 0xFFFFFB16, "NWDP_OE_NF_UNRESOLVED_EXTERNAL" },
- { 0xFFFFFB15, "NWDP_OE_NF_PUBLIC_ALREADY_DEFND" },
- { 0xFFFFFB14, "NWDP_OE_NF_USING_UNKNOWN_METHDS" },
- { 0xFFFFFB13, "NWDP_OE_NF_SRVC_NOT_FULL_ENABLD" },
- { 0xFFFFFB12, "NWDP_OE_NF_FOREIGN_NDS_TREE_NAM" },
- { 0xFFFFFB11, "NWDP_OE_NF_DLVYMETH_REJCTD_ADDR" },
- { 0xFFFFFB10, "NWDP_OE_NF_UNSUPRT_DLVYADDRTYPE" },
- { 0xFFFFFB0F, "NWDP_OE_NF_USR_OBJ_NO_DEFLTSERV" },
- { 0xFFFFFB0E, "NWDP_OE_NF_FAILED_TO_SEND_NOTIF" },
- { 0xFFFFFB0D, "NWDP_OE_NF_BAD_VOLUME_IN_ADDR" },
- { 0xFFFFFB0C, "NWDP_OE_NF_BROKER_NO_FILE_RIGHT" },
- { 0xFFFFFB0B, "NWDP_OE_NF_MAX_METHDS_SUPPORTED" },
- { 0xFFFFFB0A, "NWDP_OE_NF_NO_FILTER_PROVIDED" },
- { 0xFFFFFB09, "NE_IPX_NOT_SUPPORTED_BY_METHOD" },
- { 0xFFFFFB08, "NE_IP_NOT_SUPPORTED_BY_METHOD" },
- { 0xFFFFFB07, "NE_FAILED_TO_STARTUP_WINSOCK" },
- { 0xFFFFFB06, "NE_NO_PROTOCOLS_AVAILABLE" },
- { 0xFFFFFB05, "NE_FAILED_TO_LAUNCH_RPC_SERVER" },
- { 0xFFFFFB04, "NE_INVALID_SLP_ATTR_FORMAT" },
- { 0xFFFFFB03, "NE_INVALID_SLP_URL_FORMAT" },
- { 0xFFFFFB02, "NE_UNKNOWN_ATTRIBUTE_OID" },
- { 0xFFFFFB01, "NE_DUPLICATE_SESSION_ID" },
- { 0xFFFFFB00, "NE_FAILED_TO_AUTHENTICATE" },
- { 0xFFFFFAFF, "NE_FAILED_TO_AUTH_PROTOCOL_MISMATCH" },
- { 0xFFFFFAFE, "NE_FAILED_TO_AUTH_INTERNAL_ERROR" },
- { 0xFFFFFAFD, "NE_FAILED_TO_AUTH_CONNECTION_ERROR" },
- { 0xFFFFFC7C, "NWDP_OE_RM_OUT_OF_MEMORY" }, /* ResMan Errors */
- { 0xFFFFFC7B, "NWDP_OE_RM_BAD_NETWARE_VERSION" },
- { 0xFFFFFC7A, "NWDP_OE_RM_WRONG_CMD_LINE_ARGS" },
- { 0xFFFFFC79, "NWDP_OE_RM_BROKER_NAME_NOT_GIVN" },
- { 0xFFFFFC78, "NWDP_OE_RM_INVALID_BROKER_PWORD" },
- { 0xFFFFFC77, "NWDP_OE_RM_INVALID_BROKER_NAME" },
- { 0xFFFFFC76, "NWDP_OE_RM_FAILED_TO_CRTE_THRED" },
- { 0xFFFFFC75, "NWDP_OE_RM_SVC_MUST_BE_FULL_DIS" },
- { 0xFFFFFC74, "NWDP_OE_RM_DS_VAL_SIZE_TOO_LARG" },
- { 0xFFFFFC73, "NWDP_OE_RM_NO_ATTRIBUTE_VALUES" },
- { 0xFFFFFC72, "NWDP_OE_RM_UNKNOWN_SESSION" },
- { 0xFFFFFC71, "NWDP_OE_RM_ERROR_READING_FILE" },
- { 0xFFFFFC70, "NWDP_OE_RM_ERROR_WRITING_FILE" },
- { 0xFFFFFC6F, "NWDP_OE_RM_SERVICE_DISABLED" },
- { 0xFFFFFC6E, "NWDP_OE_RM_UNKNOWN_MODIFY_OPER" },
- { 0xFFFFFC6D, "NWDP_OE_RM_DUPLICATE_SESSION_ID" },
- { 0xFFFFFC6C, "NWDP_OE_RM_INVALID_CREDENTIAL" },
- { 0xFFFFFC6B, "NWDP_OE_RM_NO_SRVC_REGIST_AVAIL" },
- { 0xFFFFFC6A, "NWDP_OE_RM_FAIL_TO_REG_W_ANY_SR" },
- { 0xFFFFFC69, "NWDP_OE_RM_FAIL_TO_GET_MSGS" },
- { 0xFFFFFC68, "NWDP_OE_RM_FAIL_TO_CRTE_CONTEXT" },
- { 0xFFFFFC67, "NWDP_OE_RM_FAIL_TO_LOGIN" },
- { 0xFFFFFC66, "NWDP_OE_RM_NPD_FILE_GEN_ERR" },
- { 0xFFFFFC65, "NWDP_OE_RM_INF_FILE_FORMAT_ERR" },
- { 0xFFFFFC64, "NWDP_OE_RM_NO_PRT_TYPE_IN_INF" },
- { 0xFFFFFC63, "NWDP_OE_RM_NO_INF_FILES_PRESENT" },
- { 0xFFFFFC62, "NWDP_OE_RM_FILE_OPEN_ERROR" },
- { 0xFFFFFC61, "NWDP_OE_RM_READ_FILE_ERROR" },
- { 0xFFFFFC60, "NWDP_OE_RM_WRITE_FILE_ERROR" },
- { 0xFFFFFC5F, "NWDP_OE_RM_RESRC_TYPE_INVALID" },
- { 0xFFFFFC5E, "NWDP_OE_RM_NO_SUCH_FILENAME" },
- { 0xFFFFFC5D, "NWDP_OE_RM_BANR_TYPE_INVALID" },
- { 0xFFFFFC5C, "NWDP_OE_RM_LIST_TYPE_UNKNOWN" },
- { 0xFFFFFC5B, "NWDP_OE_RM_OS_NOT_SUPPORTED" },
- { 0xFFFFFC5A, "NWDP_OE_RM_NO_BANR_FILES_PRESNT" },
- { 0xFFFFFC59, "NWDP_OE_RM_PRN_DEF_TYPE_UNKNOWN" },
- { 0xFFFFFC58, "NWDP_OE_RM_NO_PRN_TYPES_IN_LIST" },
- { 0xFFFFFC57, "NWDP_OE_RM_OPTION_NOT_SUPPORTED" },
- { 0xFFFFFC56, "NWDP_OE_RM_UNICODE_CONV_ERR" },
- { 0xFFFFFC55, "NWDP_OE_RM_INVALID_ARGUMENTS" },
- { 0xFFFFFC54, "NWDP_OE_RM_INITIALIZATION_ERROR" },
- { 0xFFFFFC53, "NWDP_OE_RM_NO_SRV_REG_AVAILABLE" },
- { 0xFFFFFC52, "NWDP_OE_RM_FAIL_RGSTR_TO_ANY_SR" },
- { 0xFFFFFC51, "NWDP_OE_RM_UNKNOWN_DESIGNATOR" },
- { 0xFFFFFC50, "NWDP_OE_RM_NOT_ADMIN_SESSION" },
- { 0xFFFFFC4F, "NWDP_OE_RM_NO_EFFECTIVE_RIGHTS" },
- { 0xFFFFFC4E, "NWDP_OE_RM_BAD_FILE_ATTRIBUTE" },
- { 0xFFFFFC4D, "NWDP_OE_RM_DID_FORMAT_ERROR" },
- { 0xFFFFFC4C, "NWDP_OE_RM_UNKNOWN_RPC_SESSION" },
- { 0xFFFFFC4B, "NWDP_OE_RM_SESSN_BEING_REMOVED" },
- { 0xFFFFFC49, "NWDP_OE_RM_FMGR_IO_ERROR" },
- { 0xFFFFFC48, "NWDP_OE_RM_FMGR_REENTRANCY" },
- { 0xFFFFFC47, "NWDP_OE_RM_FMGR_SEQ_ERROR" },
- { 0xFFFFFC46, "NWDP_OE_RM_FMGR_CRPT_INDEX_FILE" },
- { 0xFFFFFC45, "NWDP_OE_RM_FMGR_NO_SUCH_FONT" },
- { 0xFFFFFC44, "NWDP_OE_RM_FMGR_NOT_INITIALIZED" },
- { 0xFFFFFC43, "NWDP_OE_RM_FMGR_SYSTEM_ERROR" },
- { 0xFFFFFC42, "NWDP_OE_RM_FMGR_BAD_PARM" },
- { 0xFFFFFC41, "NWDP_OE_RM_FMGR_PATH_TOO_LONG" },
- { 0xFFFFFC40, "NWDP_OE_RM_FMGR_FAILURE" },
- { 0xFFFFFC3F, "NWDP_OE_RM_DUP_TIRPC_SESSION" },
- { 0xFFFFFC3E, "NWDP_OE_RM_CONN_LOST_RMS_DATA" },
- { 0xFFFFFC3D, "NWDP_OE_RM_FAIL_START_WINSOCK" },
- { 0xFFFFFC3C, "NWDP_OE_RM_NO_PROTOCOLS_AVAIL" },
- { 0xFFFFFC3B, "NWDP_OE_RM_FAIL_LNCH_RPC_SRVR" },
- { 0xFFFFFC3A, "NWDP_OE_RM_INVALID_SLP_ATTR_FMT" },
- { 0xFFFFFC39, "NWDP_OE_RM_INVALID_SLP_URL_FMT" },
- { 0xFFFFFC38, "NWDP_OE_RM_UNRESOLVED_EXTERNAL" },
- { 0xFFFFFC37, "NWDP_OE_RM_FAILED_TO_AUTHENT" },
- { 0xFFFFFC36, "NWDP_OE_RM_FAIL_AUTH_PROT_MISMA" },
- { 0xFFFFFC35, "NWDP_OE_RM_FAIL_AUTH_INT_ERR" },
- { 0xFFFFFC34, "NWDP_OE_RM_FAIL_AUTH_CONN_ERR" },
- { 0xFFFFFC33, "NWDP_OE_RM_NO_RIGHTS_REM_RESDIR" },
- { 0xFFFFFC32, "NWDP_OE_RM_CANT_INIT_NDPS_LIB" },
- { 0xFFFFFC31, "NWDP_OE_RM_CANT_CREAT_RESREF" },
- { 0xFFFFFC30, "NWDP_OE_RM_FILE_ZERO_LENGTH" },
- { 0xFFFFFC2F, "NWDP_OE_RM_FAIL_WRI_INF_IN_ADD" },
- { 0xFFFFFCDF, "NDPS_E_NO_MEMORY" }, /* NDPSM Errors */
- { 0xFFFFFCDE, "NDPS_E_MEMORY_NOT_FOUND" },
- { 0xFFFFFCDD, "NDPS_E_JOB_STORAGE_LIMIT" },
- { 0xFFFFFCDC, "NDPS_E_JOB_RETENTION_LIMIT" },
- { 0xFFFFFCDB, "NDPS_E_UNSUPPORTED_TYPE" },
- { 0xFFFFFCDA, "NDPS_E_UNDEFINED_TYPE" },
- { 0xFFFFFCD9, "NDPS_E_UNSUPPORTED_OP" },
- { 0xFFFFFCD8, "NDPS_E_ACCESSING_DB" },
- { 0xFFFFFCD7, "NDPS_E_NO_PDS" },
- { 0xFFFFFCD6, "NDPS_E_INVALID_CLASS" },
- { 0xFFFFFCD5, "NDPS_E_BAD_PARAMETER" },
- { 0xFFFFFCD4, "NDPS_E_OBJECT_NOT_FOUND" },
- { 0xFFFFFCD3, "NDPS_E_ATTRIBUTE_NOT_FOUND" },
- { 0xFFFFFCD2, "NDPS_E_VALUE_NOT_FOUND" },
- { 0xFFFFFCD1, "NDPS_E_VALUES_NOT_COMPARABLE" },
- { 0xFFFFFCD0, "NDPS_E_INVALID_VALUE_SYNTAX" },
- { 0xFFFFFCCF, "NDPS_E_JOB_NOT_FOUND" },
- { 0xFFFFFCCE, "NDPS_E_COMMUNICATION" },
- { 0xFFFFFCCD, "NDPS_E_PA_INITIALIZING" },
- { 0xFFFFFCCC, "NDPS_E_PA_GOING_DOWN" },
- { 0xFFFFFCCB, "NDPS_E_PA_DISABLED" },
- { 0xFFFFFCCA, "NDPS_E_PA_PAUSED" },
- { 0xFFFFFCC9, "NDPS_E_BAD_PA_HANDLE" },
- { 0xFFFFFCC8, "NDPS_E_OBJECT_NOT_LOCKED" },
- { 0xFFFFFCC7, "NDPS_E_VERSION_INCOMPATIBLE" },
- { 0xFFFFFCC6, "NDPS_E_PSM_INITIALIZING" },
- { 0xFFFFFCC5, "NDPS_E_PSM_GOING_DOWN" },
- { 0xFFFFFCC4, "NDPS_E_NOTIF_SVC_ERROR" },
- { 0xFFFFFCC3, "NDPS_E_MEDIUM_NEEDS_MOUNTED" },
- { 0xFFFFFCC2, "NDPS_E_PDS_NOT_RESPONDING" },
- { 0xFFFFFCC1, "NDPS_E_SESSION_NOT_FOUND" },
- { 0xFFFFFCC0, "NDPS_E_RPC_FAILURE" },
- { 0xFFFFFCBF, "NDPS_E_DUPLICATE_VALUE" },
- { 0xFFFFFCBE, "NDPS_E_PDS_REFUSES_RENAME" },
- { 0xFFFFFCBD, "NDPS_E_NO_MANDATORY_ATTR" },
- { 0xFFFFFCBC, "NDPS_E_ALREADY_ATTACHED" },
- { 0xFFFFFCBB, "NDPS_E_CANT_ATTACH" },
- { 0xFFFFFCBA, "NDPS_E_TOO_MANY_NW_SERVERS" },
- { 0xFFFFFCB9, "NDPS_E_CANT_CREATE_DOC_FILE" },
- { 0xFFFFFCB8, "NDPS_E_CANT_DELETE_DOC_FILE" },
- { 0xFFFFFCB7, "NDPS_E_CANT_OPEN_DOC_FILE" },
- { 0xFFFFFCB6, "NDPS_E_CANT_WRITE_DOC_FILE" },
- { 0xFFFFFCB5, "NDPS_E_JOB_IS_ACTIVE" },
- { 0xFFFFFCB4, "NDPS_E_NO_SCHEDULER" },
- { 0xFFFFFCB3, "NDPS_E_CHANGING_CONNECTION" },
- { 0xFFFFFCB2, "NDPS_E_COULD_NOT_CREATE_ACC_REF" },
- { 0xFFFFFCB1, "NDPS_E_ACCTG_SVC_ERROR" },
- { 0xFFFFFCB0, "NDPS_E_RMS_SVC_ERROR" },
- { 0xFFFFFCAF, "NDPS_E_FAILED_VALIDATION" },
- { 0xFFFFFCAE, "NDPS_E_BROKER_SRVR_CONNECTING" },
- { 0xFFFFFCAD, "NDPS_E_SRS_SVC_ERROR" },
- { 0xFFFFFD44, "JPM_W_EXECUTE_REQUEST_LATER" },
- { 0xFFFFFD43, "JPM_E_FAILED_TO_OPEN_DOC" },
- { 0xFFFFFD42, "JPM_E_FAILED_READ_DOC_FILE" },
- { 0xFFFFFD41, "JPM_E_BAD_PA_HANDLE" },
- { 0xFFFFFD40, "JPM_E_BAD_JOB_HANDLE" },
- { 0xFFFFFD3F, "JPM_E_BAD_DOC_HANDLE" },
- { 0xFFFFFD3E, "JPM_E_UNSUPPORTED_OP" },
- { 0xFFFFFD3D, "JPM_E_REQUEST_QUEUE_FULL" },
- { 0xFFFFFD3C, "JPM_E_PA_NOT_FOUND" },
- { 0xFFFFFD3B, "JPM_E_INVALID_REQUEST" },
- { 0xFFFFFD3A, "JPM_E_NOT_ACCEPTING_REQ" },
- { 0xFFFFFD39, "JPM_E_PA_ALREADY_SERVICED_BY_PDS" },
- { 0xFFFFFD38, "JPM_E_NO_JOB" },
- { 0xFFFFFD37, "JPM_E_JOB_NOT_FOUND" },
- { 0xFFFFFD36, "JPM_E_COULD_NOT_ACCESS_DATA_BASE" },
- { 0xFFFFFD35, "JPM_E_BAD_OBJ_TYPE" },
- { 0xFFFFFD34, "JPM_E_JOB_ALREADY_CLOSED" },
- { 0xFFFFFD33, "JPM_E_DOC_ALREADY_CLOSED" },
- { 0xFFFFFD32, "JPM_E_PH_NOT_REGISTERED" },
- { 0xFFFFFD31, "JPM_E_VERSION_INCOMPATIBLE" },
- { 0xFFFFFD30, "JPM_E_PA_PAUSED" },
- { 0xFFFFFD2F, "JPM_E_PA_SHUTDOWN" },
- { 0xFFFFFD2E, "JPM_E_NO_CLIB_CONTEXT" },
- { 0xFFFFFD2D, "JPM_E_ACCOUNTING_ALREADY_SERVICE" },
- { 0xFFFFFC7B, "DB_E_CANT_CREATE_FILE" },
- { 0xFFFFFC7A, "DB_E_CANT_FIND_DATA_FILE" },
- { 0xFFFFFC79, "DB_E_CANT_OPEN_DATA_FILE" },
- { 0xFFFFFC78, "DB_E_CANT_OPEN_INDEX_FILE" },
- { 0xFFFFFC77, "DB_E_INDEX_FILE_NOT_OPEN" },
- { 0xFFFFFC76, "DB_E_CANT_RENAME_FILE" },
- { 0xFFFFFC75, "DB_E_CANT_READ_DATA_FILE" },
- { 0xFFFFFC74, "DB_E_CANT_READ_INDEX_FILE" },
- { 0xFFFFFC73, "DB_E_CANT_WRITE_DATA_FILE" },
- { 0xFFFFFC72, "DB_E_CANT_WRITE_INDEX_FILE" },
- { 0xFFFFFC71, "DB_E_CANT_DELETE_PA_DIR" },
- { 0xFFFFFC70, "DB_E_ALREADY_DELETED" },
- { 0xFFFFFC6F, "DB_E_OBJECT_EXISTS" },
- { 0xFFFFFC6E, "DB_E_DESCRIPTOR_IN_USE" },
- { 0xFFFFFC6D, "DB_E_DESCRIPTOR_BEING_DELETED" },
+ { 0x00000000, "Ok" },
+ { 0x00000001, "Error" },
+ { 0xFFFFFC18, "Broker Out of Memory" }, /* Broker Errors */
+ { 0xFFFFFC17, "Broker Bad NetWare Version" },
+ { 0xFFFFFC16, "Broker Wrong Command Line Arguments" },
+ { 0xFFFFFC15, "Broker Name Not Given" },
+ { 0xFFFFFC14, "Not Broker Class" },
+ { 0xFFFFFC13, "Invalid Broker Password" },
+ { 0xFFFFFC12, "Invalid Broker Name" },
+ { 0xFFFFFC11, "Broker Failed to Create Thread" },
+ { 0xFFFFFC10, "Broker Failed to Initialize NUT" },
+ { 0xFFFFFC0F, "Broker Failed to Get Messages" },
+ { 0xFFFFFC0E, "Broker Failed to Allocate Resources" },
+ { 0xFFFFFC0D, "Broker Service Name Must be Fully Distinguished" },
+ { 0xFFFFFC0C, "Broker Uninitialized Module" },
+ { 0xFFFFFC0B, "Broker DS Value Size Too Large" },
+ { 0xFFFFFC0A, "Broker No Attribute Values" },
+ { 0xFFFFFC09, "Broker Unknown Session" },
+ { 0xFFFFFC08, "Broker Service Disabled" },
+ { 0xFFFFFC07, "Broker Unknown Modify Operation" },
+ { 0xFFFFFC06, "Broker Invalid Arguments" },
+ { 0xFFFFFC05, "Broker Duplicate Session ID" },
+ { 0xFFFFFC04, "Broker Unknown Service" },
+ { 0xFFFFFC03, "Broker Service Already Enabled" },
+ { 0xFFFFFC02, "Broker Service Already Disabled" },
+ { 0xFFFFFC01, "Broker Invalid Credential" },
+ { 0xFFFFFC00, "Broker Unknown Designator" },
+ { 0xFFFFFBFF, "Broker Failed to Make Change Permanent" },
+ { 0xFFFFFBFE, "Broker Not Admin Type Session" },
+ { 0xFFFFFBFD, "Broker Option Not Supported" },
+ { 0xFFFFFBFC, "Broker No Effective Rights" },
+ { 0xFFFFFBFB, "Broker Could Not Find File" },
+ { 0xFFFFFBFA, "Broker Error Reading File" },
+ { 0xFFFFFBF9, "Broker Not NLM File Format" },
+ { 0xFFFFFBF8, "Broker Wrong NLM File Version" },
+ { 0xFFFFFBF7, "Broker Reentrant Initialization Failure" },
+ { 0xFFFFFBF6, "Broker Already in Progress" },
+ { 0xFFFFFBF5, "Broker Initialize Failure" },
+ { 0xFFFFFBF4, "Broker Inconsistent File Format" },
+ { 0xFFFFFBF3, "Broker Can't Load at Startup" },
+ { 0xFFFFFBF2, "Broker Autoload Modules Not Loaded" },
+ { 0xFFFFFBF1, "Broker Unresolved External" },
+ { 0xFFFFFBF0, "Broker Public Already Defined" },
+ { 0xFFFFFBEF, "Broker Other Broker Using Object" },
+ { 0xFFFFFBEE, "Broker Service Failed to Initialize" },
+ { 0xFFFFFBB4, "Registry Out of Memory" }, /* SRS Errors */
+ { 0xFFFFFBB3, "Registry Bad NetWare Version" },
+ { 0xFFFFFBB2, "Registry Failed to Create Context" },
+ { 0xFFFFFBB1, "Registry Failed Login" },
+ { 0xFFFFFBB0, "Registry Failed to Create Thread" },
+ { 0xFFFFFBAF, "Registry Failed to Get Messages" },
+ { 0xFFFFFBAE, "Registry Service Name Must Be Fully Distinguished" },
+ { 0xFFFFFBAD, "Registry DS Value Size Too Large" },
+ { 0xFFFFFBAC, "Registry No Attribute Values" },
+ { 0xFFFFFBAB, "Registry Unknown Session" },
+ { 0xFFFFFBAA, "Registry Service Disabled" },
+ { 0xFFFFFBA9, "Registry Unknown Modify Operation" },
+ { 0xFFFFFBA8, "Registry Can't Start Advertise" },
+ { 0xFFFFFBA7, "Registry Duplicate Server Entry" },
+ { 0xFFFFFBA6, "Registry Can't Bind to Registry" },
+ { 0xFFFFFBA5, "Registry Can't Create Client" },
+ { 0xFFFFFBA4, "Registry Invalid Arguments" },
+ { 0xFFFFFBA3, "Registry Duplicate Session ID" },
+ { 0xFFFFFBA2, "Registry Unknown Server Entry" },
+ { 0xFFFFFBA1, "Registry Invalid Credential" },
+ { 0xFFFFFBA0, "Registry Type Session" },
+ { 0xFFFFFB9F, "Registry Server Type Session" },
+ { 0xFFFFFB9E, "Registry Not Server Type Session" },
+ { 0xFFFFFB9D, "Not Registry Type Session" },
+ { 0xFFFFFB9C, "Registry Unknown Designator" },
+ { 0xFFFFFB9B, "Registry Option Not Supported" },
+ { 0xFFFFFB9A, "Registry Not in List Iteration" },
+ { 0xFFFFFB99, "Registry Invalid Continuation Handle" },
+ { 0xFFFFFB50, "Notify Out of Memory" }, /* Notification Service Errors */
+ { 0xFFFFFB4F, "Notify Bad NetWare Version" },
+ { 0xFFFFFB4E, "Notify Failed to Create Thread" },
+ { 0xFFFFFB4D, "Notify Failed to Get Messages" },
+ { 0xFFFFFB4C, "Notify Failed to Create Context" },
+ { 0xFFFFFB4B, "Notify Failed Login" },
+ { 0xFFFFFB4A, "Notify Service Name Must be Fully Distiguished" },
+ { 0xFFFFFB49, "Notify DS Value Size Too Large" },
+ { 0xFFFFFB48, "Notify No Attribute Values" },
+ { 0xFFFFFB47, "Notify Unknown Session" },
+ { 0xFFFFFB46, "Notify Unknown Notify Profile" },
+ { 0xFFFFFB45, "Notify Error Reading File" },
+ { 0xFFFFFB44, "Notify Error Writing File" },
+ { 0xFFFFFB43, "Wrong Notify Database Version" },
+ { 0xFFFFFB42, "Corrupted Notify Database" },
+ { 0xFFFFFB41, "Notify Unknown Event Object ID" },
+ { 0xFFFFFB40, "Notify Method Already Installed" },
+ { 0xFFFFFB3F, "Notify Unknown Method" },
+ { 0xFFFFFB3E, "Notify Service Disabled" },
+ { 0xFFFFFB3D, "Notify Unknown Modify Operation" },
+ { 0xFFFFFB3C, "Out of Notify Entries" },
+ { 0xFFFFFB3B, "Notify Unknown Language ID" },
+ { 0xFFFFFB3A, "Notify Queue Empty" },
+ { 0xFFFFFB39, "Notify Can't Load Delivery Method" },
+ { 0xFFFFFB38, "Notify Invalid Arguments" },
+ { 0xFFFFFB37, "Notify Duplicate Session ID" },
+ { 0xFFFFFB36, "Notify Invalid Credentials" },
+ { 0xFFFFFB35, "Notify Unknown Choice" },
+ { 0xFFFFFB34, "Notify Unknown Attribute Value" },
+ { 0xFFFFFB33, "Notify Error Writing Database" },
+ { 0xFFFFFB32, "Notify Unknown Object ID" },
+ { 0xFFFFFB31, "Notify Unknown Designator" },
+ { 0xFFFFFB30, "Notify Failed to Make Change Permanent" },
+ { 0xFFFFFB2F, "Notify User Interface Not Supported" },
+ { 0xFFFFFB2E, "Notify Not Supplied Type of Session" },
+ { 0xFFFFFB2D, "Notify Not Admin Type Session" },
+ { 0xFFFFFB2C, "Notify No Service Registry Available" },
+ { 0xFFFFFB2B, "Notify Failed to Register With Any Server" },
+ { 0xFFFFFB2A, "Notify Empty Event Object Set" },
+ { 0xFFFFFB29, "Notify Unknown Notify Handle" },
+ { 0xFFFFFB28, "Notify Option Not Supported" },
+ { 0xFFFFFB27, "Notify Unknown RPC Session" },
+ { 0xFFFFFB26, "Notify Initialization Error" },
+ { 0xFFFFFB25, "Notify No Effective Rights" },
+ { 0xFFFFFB24, "Notify No Persistent Storage" },
+ { 0xFFFFFB23, "Notify Bad Method Filename" },
+ { 0xFFFFFB22, "Notify Unknown Continuation Handle" },
+ { 0xFFFFFB21, "Notify Invalid Continuation Handle" },
+ { 0xFFFFFB20, "Notify Could Not Find File" },
+ { 0xFFFFFB1F, "Notify Error Reading File" },
+ { 0xFFFFFB1E, "Notify Not NLM File Format" },
+ { 0xFFFFFB1D, "Notify Wrong NLM File Version" },
+ { 0xFFFFFB1C, "Notify Reentrant Initialization Failure" },
+ { 0xFFFFFB1B, "Notify Already in Progress" },
+ { 0xFFFFFB1A, "Notify Initialization Failure" },
+ { 0xFFFFFB19, "Notify Inconsistent File Format" },
+ { 0xFFFFFB18, "Notify Can't Load at Startup" },
+ { 0xFFFFFB17, "Notify Autoload Modules Not Loaded" },
+ { 0xFFFFFB16, "Notify Unresolved External" },
+ { 0xFFFFFB15, "Notify Public Already Defined" },
+ { 0xFFFFFB14, "Notify Using Unknown Methods" },
+ { 0xFFFFFB13, "Notify Service Not Fully Enabled" },
+ { 0xFFFFFB12, "Notify Foreign NDS Tree Name" },
+ { 0xFFFFFB11, "Notify Delivery Method Rejected Address" },
+ { 0xFFFFFB10, "Notify Unsupported Delivery Address Type" },
+ { 0xFFFFFB0F, "Notify User Object No Default Server" },
+ { 0xFFFFFB0E, "Notify Failed to Send Notification" },
+ { 0xFFFFFB0D, "Notify Bad Volume in Address" },
+ { 0xFFFFFB0C, "Notify Broker Has No File Rights" },
+ { 0xFFFFFB0B, "Notify Maximum Methods Supported" },
+ { 0xFFFFFB0A, "Notify No Filter Provided" },
+ { 0xFFFFFB09, "Notify IPX Not Supported By Method" },
+ { 0xFFFFFB08, "Notify IP Not Supported By Method" },
+ { 0xFFFFFB07, "Notify Failed to Startup Winsock" },
+ { 0xFFFFFB06, "Notify No Protocols Available" },
+ { 0xFFFFFB05, "Notify Failed to Launch RPC Server" },
+ { 0xFFFFFB04, "Notify Invalid SLP Attribute Format" },
+ { 0xFFFFFB03, "Notify Invalid SLP URL Format" },
+ { 0xFFFFFB02, "Notify Unknown Attribute Object ID" },
+ { 0xFFFFFB01, "Notify Duplicate Session ID" },
+ { 0xFFFFFB00, "Notify Failed to Authenticate" },
+ { 0xFFFFFAFF, "Notify Failed to Authenticate Protocol Mismatch" },
+ { 0xFFFFFAFE, "Notify Failed to Authenticate Internal Error" },
+ { 0xFFFFFAFD, "Notify Failed to Authenticate Connection Error" },
+ { 0xFFFFFC7C, "Resource Manager Out of Memory" }, /* ResMan Errors */
+ { 0xFFFFFC7B, "Resource Manager Bad NetWare Version" },
+ { 0xFFFFFC7A, "Resource Manager Wrong Command Line Arguments" },
+ { 0xFFFFFC79, "Resource Manager Broker Name Not Given" },
+ { 0xFFFFFC78, "Resource Manager Invalid Broker Password" },
+ { 0xFFFFFC77, "Resource Manager Invalid Broker Name" },
+ { 0xFFFFFC76, "Resource Manager Failed to Create Thread" },
+ { 0xFFFFFC75, "Resource Manager Service Name Must be Fully Distinguished" },
+ { 0xFFFFFC74, "Resource Manager DS Value Size Too Large" },
+ { 0xFFFFFC73, "Resource Manager No Attribute Values" },
+ { 0xFFFFFC72, "Resource Manager Unknown Session" },
+ { 0xFFFFFC71, "Resource Manager Error Reading File" },
+ { 0xFFFFFC70, "Resource Manager Error Writing File" },
+ { 0xFFFFFC6F, "Resource Manager Service Disabled" },
+ { 0xFFFFFC6E, "Resource Manager Unknown Modify Operation" },
+ { 0xFFFFFC6D, "Resource Manager Duplicate Session ID" },
+ { 0xFFFFFC6C, "Resource Manager Invalid Credentials" },
+ { 0xFFFFFC6B, "Resource Manager No Service Registry Available" },
+ { 0xFFFFFC6A, "Resource Manager Failed to Register With any Server" },
+ { 0xFFFFFC69, "Resource Manager Failed to Get Messages" },
+ { 0xFFFFFC68, "Resource Manager Failed to Create Context" },
+ { 0xFFFFFC67, "Resource Manager Failed to Login" },
+ { 0xFFFFFC66, "Resource Manager NPD Files Generation Error" },
+ { 0xFFFFFC65, "Resource Manager INF File Format Error" },
+ { 0xFFFFFC64, "Resource Manager No Printer Type in INF File" },
+ { 0xFFFFFC63, "Resource Manager No INF Files Present" },
+ { 0xFFFFFC62, "Resource Manager File Open Error" },
+ { 0xFFFFFC61, "Resource Manager Read File Error" },
+ { 0xFFFFFC60, "Resource Manager Write File Error" },
+ { 0xFFFFFC5F, "Resource Manager Resource Type Invalid" },
+ { 0xFFFFFC5E, "Resource Manager No Such Filename" },
+ { 0xFFFFFC5D, "Resource Manager Banner Type Invalid" },
+ { 0xFFFFFC5C, "Resource Manager List Type Unknown" },
+ { 0xFFFFFC5B, "Resource Manager OS Not Supported" },
+ { 0xFFFFFC5A, "Resource Manager No Banner Files Present" },
+ { 0xFFFFFC59, "Resource Manager Printer Definition Type Unknown" },
+ { 0xFFFFFC58, "Resource Manager No Printer Types in List" },
+ { 0xFFFFFC57, "Resource Manager Option Not Supported" },
+ { 0xFFFFFC56, "Resource Manager Unicode Convention Error" },
+ { 0xFFFFFC55, "Resource Manager Invalid Arguments" },
+ { 0xFFFFFC54, "Resource Manager Initialization Error" },
+ { 0xFFFFFC53, "Resource Manager No Service Registry Available" },
+ { 0xFFFFFC52, "Resource Manager Failed to Register to Any Server" },
+ { 0xFFFFFC51, "Resource Manager Unknown Designator" },
+ { 0xFFFFFC50, "Resource Manager Not Admin Session" },
+ { 0xFFFFFC4F, "Resource Manager No Effective Rights" },
+ { 0xFFFFFC4E, "Resource Manager Bad File Attribute" },
+ { 0xFFFFFC4D, "Resource Manager Document ID Format Error" },
+ { 0xFFFFFC4C, "Resource Manager Unknown RPC Session" },
+ { 0xFFFFFC4B, "Resource Manager Session Being Removed" },
+ { 0xFFFFFC49, "Resource Manager Font Manager IO Error" },
+ { 0xFFFFFC48, "Resource Manager Font Manager Reentrancy" },
+ { 0xFFFFFC47, "Resource Manager Font Manager Sequence Error" },
+ { 0xFFFFFC46, "Resource Manager Font Manager Corrupt Index File" },
+ { 0xFFFFFC45, "Resource Manager Font Manager No Such Font" },
+ { 0xFFFFFC44, "Resource Manager Font Manager Not Initialized" },
+ { 0xFFFFFC43, "Resource Manager Font Manager System Error" },
+ { 0xFFFFFC42, "Resource Manager Font Manager Bad Parameter" },
+ { 0xFFFFFC41, "Resource Manager Font Manager Path Too Long" },
+ { 0xFFFFFC40, "Resource Manager Font Manager Failure" },
+ { 0xFFFFFC3F, "Resource Manager Duplicate TIRPC Session" },
+ { 0xFFFFFC3E, "Resource Manager Connection Lost RMS Data" },
+ { 0xFFFFFC3D, "Resource Manager Failed to Start Winsock" },
+ { 0xFFFFFC3C, "Resource Manager No Protocols Available" },
+ { 0xFFFFFC3B, "Resource Manager Failed to Launch RPC Server" },
+ { 0xFFFFFC3A, "Resource Manager Invalid SLP Attribute Format" },
+ { 0xFFFFFC39, "Resource Manager Invalid SLP URL Format" },
+ { 0xFFFFFC38, "Resource Manager Unresolved External" },
+ { 0xFFFFFC37, "Resource Manager Failed to Authenticate" },
+ { 0xFFFFFC36, "Resource Manager Failed to Authenticate Protocol Mismatch" },
+ { 0xFFFFFC35, "Resource Manager Failed to Authenticate Internal Error" },
+ { 0xFFFFFC34, "Resource Manager Failed to Authenticate Connection Error" },
+ { 0xFFFFFC33, "Resource Manager No Rights to Remote Resdir" },
+ { 0xFFFFFC32, "Resource Manager Can't Initialize NDPS Library" },
+ { 0xFFFFFC31, "Resource Manager Can't Create Resource Reference" },
+ { 0xFFFFFC30, "Resource Manager File is Zero Length" },
+ { 0xFFFFFC2F, "Resource Manager Failed to Write INF in Address" },
+ { 0xFFFFFCDF, "NDPSM No Memory" }, /* NDPSM Errors */
+ { 0xFFFFFCDE, "NDPSM Memory Not Found" },
+ { 0xFFFFFCDD, "NDPSM Job Storage Limit" },
+ { 0xFFFFFCDC, "NDPSM Job Retention Limit" },
+ { 0xFFFFFCDB, "NDPSM Unsupported Type" },
+ { 0xFFFFFCDA, "NDPSM Undefined Type" },
+ { 0xFFFFFCD9, "NDPSM Unsupported Operation" },
+ { 0xFFFFFCD8, "NDPSM Error Accessing Database" },
+ { 0xFFFFFCD7, "NDPSM No PDS" },
+ { 0xFFFFFCD6, "NDPSM Invalid Class" },
+ { 0xFFFFFCD5, "NDPSM Bad Parameter" },
+ { 0xFFFFFCD4, "NDPSM Object Not Found" },
+ { 0xFFFFFCD3, "NDPSM Attribute Not Found" },
+ { 0xFFFFFCD2, "NDPSM Value Not Found" },
+ { 0xFFFFFCD1, "NDPSM Values Not Comparable" },
+ { 0xFFFFFCD0, "NDPSM Invalid Value Syntax" },
+ { 0xFFFFFCCF, "NDPSM Job Not Found" },
+ { 0xFFFFFCCE, "NDPSM Communications Error" },
+ { 0xFFFFFCCD, "NDPSM Printer Agent Initializing" },
+ { 0xFFFFFCCC, "NDPSM Printer Agent Going Down" },
+ { 0xFFFFFCCB, "NDPSM Printer Agent Disabled" },
+ { 0xFFFFFCCA, "NDPSM Printer Agent Paused" },
+ { 0xFFFFFCC9, "NDPSM Bad Printer Agent Handle" },
+ { 0xFFFFFCC8, "NDPSM Object Not Locked" },
+ { 0xFFFFFCC7, "NDPSM Version Incompatible" },
+ { 0xFFFFFCC6, "NDPSM PSM Initializing" },
+ { 0xFFFFFCC5, "NDPSM PSM Going Down" },
+ { 0xFFFFFCC4, "NDPSM Notification Service Error" },
+ { 0xFFFFFCC3, "NDPSM Medium Needs Mounted" },
+ { 0xFFFFFCC2, "NDPSM PDS Not Responding" },
+ { 0xFFFFFCC1, "NDPSM Session Not Found" },
+ { 0xFFFFFCC0, "NDPSM RPC Failure" },
+ { 0xFFFFFCBF, "NDPSM Duplicate Value" },
+ { 0xFFFFFCBE, "NDPSM PDS Refuses Rename" },
+ { 0xFFFFFCBD, "NDPSM No Mandatory Attribute" },
+ { 0xFFFFFCBC, "NDPSM Already Attached" },
+ { 0xFFFFFCBB, "NDPSM Can't Attach" },
+ { 0xFFFFFCBA, "NDPSM Too Many NetWare Servers" },
+ { 0xFFFFFCB9, "NDPSM Can't Create Document File" },
+ { 0xFFFFFCB8, "NDPSM Can't Delete Document File" },
+ { 0xFFFFFCB7, "NDPSM Can't Open Document File" },
+ { 0xFFFFFCB6, "NDPSM Can't Write Document File" },
+ { 0xFFFFFCB5, "NDPSM Job is Active" },
+ { 0xFFFFFCB4, "NDPSM No Scheduler" },
+ { 0xFFFFFCB3, "NDPSM Changing Connection" },
+ { 0xFFFFFCB2, "NDPSM Could not Create Account Reference" },
+ { 0xFFFFFCB1, "NDPSM Accounting Service Error" },
+ { 0xFFFFFCB0, "NDPSM RMS Service Error" },
+ { 0xFFFFFCAF, "NDPSM Failed Validation" },
+ { 0xFFFFFCAE, "NDPSM Broker Server Connecting" },
+ { 0xFFFFFCAD, "NDPSM SRS Service Error" },
+ { 0xFFFFFD44, "JPM Execute Request Later" },
+ { 0xFFFFFD43, "JPM Failed to Open Document" },
+ { 0xFFFFFD42, "JPM Failed to Read Document File" },
+ { 0xFFFFFD41, "JPM Bad Printer Agent Handle" },
+ { 0xFFFFFD40, "JPM Bad Job Handle" },
+ { 0xFFFFFD3F, "JPM Bad Document Handle" },
+ { 0xFFFFFD3E, "JPM Unsupported Operation" },
+ { 0xFFFFFD3D, "JPM Request Queue Full" },
+ { 0xFFFFFD3C, "JPM Printer Agent Not Found" },
+ { 0xFFFFFD3B, "JPM Invalid Request" },
+ { 0xFFFFFD3A, "JPM Not Accepting Requests" },
+ { 0xFFFFFD39, "JPM Printer Agent Already Serviced By PDS" },
+ { 0xFFFFFD38, "JPM No Job" },
+ { 0xFFFFFD37, "JPM Job Not Found" },
+ { 0xFFFFFD36, "JPM Could not Access Database" },
+ { 0xFFFFFD35, "JPM Bad Object Type" },
+ { 0xFFFFFD34, "JPM Job Already Closed" },
+ { 0xFFFFFD33, "JPM Document Already Closed" },
+ { 0xFFFFFD32, "JPM Print Handler Not Registered" },
+ { 0xFFFFFD31, "JPM Version Incompatible" },
+ { 0xFFFFFD30, "JPM Printer Agent Paused" },
+ { 0xFFFFFD2F, "JPM Printer Agent Shutdown" },
+ { 0xFFFFFD2E, "JPM No CLIB Context" },
+ { 0xFFFFFD2D, "JPM Accounting Already Serviced" },
+ { 0xFFFFFC7B, "Database Can't Create File" },
+ { 0xFFFFFC7A, "Database Can't Find Data File" },
+ { 0xFFFFFC79, "Database Can't Open Data File" },
+ { 0xFFFFFC78, "Database Can't Open Index File" },
+ { 0xFFFFFC77, "Database Index File Not Open" },
+ { 0xFFFFFC76, "Database Can't Rename File" },
+ { 0xFFFFFC75, "Database Can't Read Data File" },
+ { 0xFFFFFC74, "Database Can't Read Index File" },
+ { 0xFFFFFC73, "Database Can't Write Data File" },
+ { 0xFFFFFC72, "Database Can't Write Index File" },
+ { 0xFFFFFC71, "Database Can't Delete Printer Agent Directory" },
+ { 0xFFFFFC70, "Database Already Deleted" },
+ { 0xFFFFFC6F, "Database Object Exists" },
+ { 0xFFFFFC6E, "Database Descriptor In Use" },
+ { 0xFFFFFC6D, "Database Descriptor Being Deleted" },
{ 0, NULL }
};
@@ -965,6 +1472,45 @@ static const value_string ndps_credential_enum[] = {
{ 0, NULL }
};
+static const value_string ndps_object_op_enum[] = {
+ { 0, "None" },
+ { 1, "Add" },
+ { 2, "Delete" },
+ { 3, "Delete Object" },
+ { 0, NULL }
+};
+
+static const value_string ndps_client_server_enum[] = {
+ { 0, "Client" },
+ { 1, "Server" },
+ { 2, "Client and Server" },
+ { 0, NULL }
+};
+
+static const value_string ndps_session_type_enum[] = {
+ { 0, "Unknown" },
+ { 1, "User" },
+ { 2, "Admin" },
+ { 3, "Server" },
+ { 4, "Registry" },
+ { 0, NULL }
+};
+
+static const value_string ndps_get_session_type_enum[] = {
+ { 0, "Unknown" },
+ { 1, "User" },
+ { 2, "Admin" },
+ { 3, "Supplier" },
+ { 0, NULL }
+};
+
+static const value_string ndps_get_resman_session_type_enum[] = {
+ { 0, "Unknown" },
+ { 1, "User" },
+ { 2, "Admin" },
+ { 0, NULL }
+};
+
static int
align_4(tvbuff_t *tvb, int aoffset)
{
@@ -991,7 +1537,7 @@ ndps_string(tvbuff_t* tvb, int hfinfo, proto_tree *ndps_tree, int offset)
g_assert(length_remaining > 0);
if(str_length > (guint)length_remaining || str_length > 1024)
{
- proto_tree_add_string(ndps_tree, hfinfo, tvb, offset,
+ proto_tree_add_string(ndps_tree, hfinfo, tvb, foffset,
length_remaining + 4, "<String too long to process>");
foffset += length_remaining;
return foffset;
@@ -1032,96 +1578,107 @@ ndps_string(tvbuff_t* tvb, int hfinfo, proto_tree *ndps_tree, int offset)
}
}
buffer[i] = '\0';
- proto_tree_add_string(ndps_tree, hfinfo, tvb, offset,
- str_length + 4, buffer);
+
+ str_length = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_string(ndps_tree, hfinfo, tvb, offset+4,
+ str_length, buffer);
foffset += align_4(tvb, foffset);
return foffset;
}
static int
-objectident(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
+objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
{
- guint8 h;
- guint8 object_count;
- guint32 object_type=0;
- guint32 qualified_name_type;
- proto_tree *atree;
- proto_item *aitem;
+ guint32 length=0;
+
+ if (tvb_get_ntohl(tvb, foffset)==0)
+ {
+ return foffset;
+ }
+ proto_tree_add_item(ndps_tree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_oid_asn1_type, tvb, foffset, 1, FALSE);
+ foffset += 1;
+ length = tvb_get_guint8(tvb, foffset);
+ foffset += 1;
+ proto_tree_add_item(ndps_tree, hf_ndps_oid, tvb, foffset, length, FALSE);
+ foffset += length;
+ return foffset+(length%2);
+}
- /*proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);*/
- object_count = tvb_get_ntohl(tvb, foffset);
-
+static int
+name_or_id(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
+{
+ guint8 length=0;
+ proto_tree_add_item(ndps_tree, hf_ndps_nameorid, tvb, foffset, 4, FALSE);
foffset += 4;
+ if(tvb_get_ntohl(tvb, foffset-4)==1) /* Global */
+ {
+ foffset = objectidentifier(tvb, ndps_tree, foffset);
+ }
+ else
+ {
+ if(tvb_get_ntohl(tvb, foffset-4)==2) /* Local */
+ {
+ foffset = ndps_string(tvb, hf_local_object_name, ndps_tree, foffset);
+ }
+ }
+ return foffset;
+}
+
+static int
+objectidentification(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
+{
+ guint32 h=0;
+ guint32 object_count=0;
+ guint32 object_type=0;
+ guint32 qualified_name_type=0;
+ guint32 length=0;
+ proto_tree *atree;
+ proto_item *aitem;
+
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;
- for (h = 1 ; h <= object_count; h++ )
+ switch(object_type)
{
- switch(object_type)
- {
- case 0: /* None */
- break;
- case 1: /* Printer Contained Object ID */
+ case 0: /* Printer Contained Object ID */
foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
proto_tree_add_item(atree, hf_ndps_object, tvb, foffset,
4, FALSE);
foffset += 4;
break;
- case 2: /* Document Identifier */
+ case 1: /* Document Identifier */
foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
- proto_tree_add_item(atree, hf_ndps_object, tvb, foffset,
+ /*proto_tree_add_item(atree, hf_ndps_object, tvb, foffset,
4, FALSE);
- foffset += 4;
+ foffset += 4;*/
proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset,
4, FALSE);
foffset += 4;
break;
- case 3: /* Object Identifier */
- proto_tree_add_item(atree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- if (foffset > tvb_length_remaining(tvb, foffset)) {
- return foffset;
- }
- foffset += 4;
+ case 2: /* Object Identifier */
+ foffset = objectidentifier(tvb, atree, foffset);
break;
- case 4: /* Object Name */
+ case 3: /* Object Name */
foffset = ndps_string(tvb, hf_object_name, atree, foffset);
if (foffset > tvb_length_remaining(tvb, foffset)) {
return foffset;
}
- proto_tree_add_item(atree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
- foffset = ndps_string(tvb, hf_local_object_name, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
break;
- case 5: /* Name or Object ID */
- proto_tree_add_item(atree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
- foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, atree, foffset);
+ case 4: /* Name or Object ID */
+ foffset = name_or_id(tvb, atree, foffset);
break;
- case 6: /* Simple Name */
+ case 5: /* Simple Name */
foffset = ndps_string(tvb, hf_object_name, atree, foffset);
break;
- case 7: /* Printer Configuration Object ID */
+ case 6: /* Printer Configuration Object ID */
foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
- qualified_name_type = tvb_get_ntohl(tvb, foffset);
- proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
- 4, qualified_name_type);
- foffset += 4;
- if (qualified_name_type != 0) {
- if (qualified_name_type == 1) {
- foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
- }
- else
- {
- foffset = ndps_string(tvb, hf_ndps_context, atree, foffset);
- foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
- }
- }
break;
- case 8: /* Qualified Name */
+ case 7: /* Qualified Name */
qualified_name_type = tvb_get_ntohl(tvb, foffset);
proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
4, qualified_name_type);
@@ -1132,22 +1689,19 @@ objectident(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
}
else
{
- foffset = ndps_string(tvb, hf_ndps_context, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
}
}
break;
- case 9: /* Event Object ID */
+ case 8: /* Event Object ID */
foffset = ndps_string(tvb, hf_object_name, atree, foffset);
- proto_tree_add_item(atree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- if (foffset > tvb_length_remaining(tvb, foffset)) {
- return foffset;
- }
+ foffset = objectidentifier(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset,
+ 4, FALSE);
foffset += 4;
default:
break;
- }
}
return foffset;
}
@@ -1183,7 +1737,7 @@ address_item(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
}
else
{
- foffset = ndps_string(tvb, hf_ndps_context, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
}
}
@@ -1221,6 +1775,41 @@ address_item(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
}
static int
+print_address(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
+{
+ guint32 address_type=0;
+ guint32 address=0;
+ guint32 address_len=0;
+
+ 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);
+ proto_tree_add_item(ndps_tree, hf_address_len, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ switch(address_type)
+ {
+ case 0x00000000:
+ proto_tree_add_item(ndps_tree, hf_ndps_net, tvb, foffset, 4, FALSE);
+ proto_tree_add_item(ndps_tree, hf_ndps_node, tvb, foffset+4, 6, FALSE);
+ proto_tree_add_item(ndps_tree, hf_ndps_socket, tvb, foffset+10, 2, FALSE);
+ foffset += address_len;
+ break;
+ case 0x00000001:
+ proto_tree_add_item(ndps_tree, hf_ndps_port, tvb, foffset, 2, FALSE);
+ address = tvb_get_letohl(tvb, foffset+2);
+ proto_tree_add_ipv4(ndps_tree, hf_ndps_ip, tvb, foffset+2, 4, address);
+ foffset += address_len;
+ break;
+ default:
+ foffset += tvb_get_ntohl(tvb, foffset -4);
+ break;
+ }
+ return foffset+(address_len%4);
+}
+
+
+static int
attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
{
guint8 h;
@@ -1230,9 +1819,21 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
guint8 number_of_items=0;
guint8 number_of_items2=0;
guint32 attribute_type=0;
- guint32 qualified_name_type;
- guint32 integer_or_oid;
- guint32 event_object_type;
+ guint32 qualified_name_type=0;
+ guint32 integer_or_oid=0;
+ guint32 event_object_type=0;
+ guint32 ignored_type=0;
+ guint32 resource_type=0;
+ guint32 identifier_type=0;
+ guint32 criterion_type=0;
+ guint32 card_enum_time=0;
+ guint32 media_type=0;
+ guint32 doc_content=0;
+ guint32 page_size=0;
+ guint32 medium_size=0;
+ guint32 numbers_up=0;
+ guint32 colorant_set=0;
+ guint32 length=0;
proto_tree *atree;
proto_item *aitem;
proto_tree *btree;
@@ -1240,23 +1841,20 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
proto_tree *ctree;
proto_item *citem;
- number_of_values = tvb_get_ntohl(tvb, foffset);
- foffset += 4;
attribute_type = tvb_get_ntohl(tvb, foffset);
aitem = proto_tree_add_item(ndps_tree, hf_obj_attribute_type, tvb, foffset, 4, FALSE);
atree = proto_item_add_subtree(aitem, ett_ndps);
foffset += 4;
- for (h = 1 ; h <= number_of_values; h++ )
+ switch(attribute_type)
{
- switch(attribute_type)
- {
case 0: /* Null */
+ proto_tree_add_item(atree, hf_ndps_data, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), FALSE);
break;
case 1: /* Text */
case 2: /* Descriptive Name */
case 3: /* Descriptor */
case 6: /* Simple Name */
- case 40: /* Distinguished Name */
+ case 40: /* Distinguished Name*/
case 50: /* Font Reference */
case 58: /* Locale */
case 102: /* File Path */
@@ -1267,34 +1865,33 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
case 4: /* Message */
case 5: /* Error Message */
case 38: /* Name or OID */
- proto_tree_add_item(atree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
+ foffset = name_or_id(tvb, atree, foffset);
+ break;
+ case 39: /* Name or OID Seq */
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, atree, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = name_or_id(tvb, atree, foffset);
+ }
break;
- case 7: /* Distinguished Name */
+ case 7: /* Distinguished Name String*/
+ case 79: /* File Reference */
foffset = ndps_string(tvb, hf_object_name, atree, foffset);
- proto_tree_add_item(atree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
- foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
break;
- case 8: /* Distinguished Name Seq */
- case 39: /* Name or OID Seq */
- bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
- btree = proto_item_add_subtree(bitem, ett_ndps);
+ case 8: /* Distinguished Name String Seq */
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
number_of_items = tvb_get_ntohl(tvb, foffset);
foffset += 4;
for (i = 1 ; i <= number_of_items; i++ )
{
- foffset = ndps_string(tvb, hf_object_name, btree, foffset);
+ foffset = ndps_string(tvb, hf_object_name, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
}
- proto_tree_add_item(atree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
- foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, atree, foffset);
break;
- case 9: /* Delta Time */
+ case 9: /* Delta Time */
case 10: /* Time */
case 11: /* Integer */
case 13: /* Cardinal */
@@ -1302,7 +1899,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
case 18: /* Maximum Integer */
case 19: /* Minimum Integer */
case 35: /* Percent */
- case 57: /* Priority */
+ case 57: /* Job Priority */
case 72: /* Sides */
case 95: /* Enumeration */
proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
@@ -1310,15 +1907,10 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
break;
case 12: /* Integer Seq */
case 14: /* Cardinal Seq */
- bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
- btree = proto_item_add_subtree(bitem, ett_ndps);
- number_of_items = tvb_get_ntohl(tvb, foffset);
+ length = tvb_get_ntohl(tvb, foffset);
foffset += 4;
- for (i = 1 ; i <= number_of_items; i++ )
- {
- proto_tree_add_item(btree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
- foffset += 4;
- }
+ proto_tree_add_item(ndps_tree, hf_info_int32, tvb, foffset, length, FALSE);
+ foffset += length;
break;
case 16: /* Integer Range */
case 17: /* Cardinal Range */
@@ -1338,13 +1930,12 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
case 21: /* Integer 64 Seq */
case 23: /* Cardinal 64 Seq */
case 30: /* Real Seq */
- bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
- btree = proto_item_add_subtree(bitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
number_of_items = tvb_get_ntohl(tvb, foffset);
foffset += 4;
for (i = 1 ; i <= number_of_items; i++ )
{
- proto_tree_add_item(btree, hf_ndps_n64, tvb, foffset, 8, FALSE);
+ proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
foffset += 8;
}
break;
@@ -1352,17 +1943,17 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
case 26: /* Cardinal 64 Range */
case 32: /* Real Range */
case 33: /* Non-Negative Real Range */
- proto_tree_add_item(atree, hf_ndps_lower_range_n64, tvb, foffset, 4, FALSE);
+ proto_tree_add_item(atree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
foffset += 8;
- proto_tree_add_item(atree, hf_ndps_upper_range_n64, tvb, foffset, 4, FALSE);
+ proto_tree_add_item(atree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
foffset += 8;
break;
case 27: /* Maximum Integer 64 */
- proto_tree_add_item(atree, hf_ndps_lower_range_n64, tvb, foffset, 4, FALSE);
+ proto_tree_add_item(atree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
foffset += 8;
break;
case 28: /* Minimum Integer 64 */
- proto_tree_add_item(atree, hf_ndps_upper_range_n64, tvb, foffset, 4, FALSE);
+ proto_tree_add_item(atree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
foffset += 8;
break;
case 34: /* Boolean */
@@ -1370,36 +1961,24 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
foffset += 4;
break;
case 36: /* Object Identifier */
- proto_tree_add_item(atree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- if (foffset > tvb_length_remaining(tvb, foffset)) {
- break;
- }
- foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
break;
case 37: /* Object Identifier Seq */
- bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
- btree = proto_item_add_subtree(bitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
number_of_items = tvb_get_ntohl(tvb, foffset);
foffset += 4;
for (i = 1 ; i <= number_of_items; i++ )
{
- proto_tree_add_item(btree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- if (foffset > tvb_length_remaining(tvb, foffset)) {
- break;
- }
- foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
}
break;
case 41: /* Relative Distinguished Name Seq */
- bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
- btree = proto_item_add_subtree(bitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
number_of_items = tvb_get_ntohl(tvb, foffset);
foffset += 4;
for (i = 1 ; i <= number_of_items; i++ )
{
- foffset = ndps_string(tvb, hf_object_name, btree, foffset);
+ foffset = ndps_string(tvb, hf_object_name, atree, foffset);
}
break;
case 42: /* Realization */
@@ -1407,9 +1986,9 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
foffset += 4;
break;
case 43: /* Medium Dimensions */
- proto_tree_add_item(atree, hf_ndps_xdimension_n64, tvb, foffset, 4, FALSE);
+ proto_tree_add_item(atree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
foffset += 8;
- proto_tree_add_item(atree, hf_ndps_ydimension_n64, tvb, foffset, 4, FALSE);
+ proto_tree_add_item(atree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
foffset += 8;
break;
case 44: /* Dimension */
@@ -1421,10 +2000,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
}
else
{
- proto_tree_add_item(atree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
- foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
}
proto_tree_add_item(atree, hf_ndps_dim_flag, tvb, foffset, 8, FALSE);
foffset += 4;
@@ -1435,16 +2011,13 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
proto_tree_add_item(atree, hf_ndps_xydim_value, tvb, foffset, 8, FALSE);
foffset += 4;
if (tvb_get_ntohl(tvb, foffset-4) == 1) {
- proto_tree_add_item(atree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
- foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
}
else
{
- proto_tree_add_item(atree, hf_ndps_xdimension_n64, tvb, foffset, 4, FALSE);
+ proto_tree_add_item(atree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
foffset += 8;
- proto_tree_add_item(atree, hf_ndps_ydimension_n64, tvb, foffset, 4, FALSE);
+ proto_tree_add_item(atree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
foffset += 8;
}
proto_tree_add_item(atree, hf_ndps_dim_flag, tvb, foffset, 8, FALSE);
@@ -1456,22 +2029,18 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
proto_tree_add_item(atree, hf_ndps_location_value, tvb, foffset, 8, FALSE);
foffset += 4;
if (tvb_get_ntohl(tvb, foffset-4) == 0) {
- bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
- btree = proto_item_add_subtree(bitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
number_of_items = tvb_get_ntohl(tvb, foffset);
foffset += 4;
for (i = 1 ; i <= number_of_items; i++ )
{
- proto_tree_add_item(btree, hf_ndps_n64, tvb, foffset, 8, FALSE);
+ proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
foffset += 8;
}
}
else
{
- proto_tree_add_item(atree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
- foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
}
proto_tree_add_item(atree, hf_ndps_dim_flag, tvb, foffset, 8, FALSE);
foffset += 4;
@@ -1489,19 +2058,18 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
foffset += 8;
break;
case 48: /* Area Seq */
- bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
- btree = proto_item_add_subtree(bitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
number_of_items = tvb_get_ntohl(tvb, foffset);
foffset += 4;
for (i = 1 ; i <= number_of_items; i++ )
{
- proto_tree_add_item(btree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
+ proto_tree_add_item(atree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
foffset += 8;
- proto_tree_add_item(btree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
+ proto_tree_add_item(atree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
foffset += 8;
- proto_tree_add_item(btree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
+ proto_tree_add_item(atree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
foffset += 8;
- proto_tree_add_item(btree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
+ proto_tree_add_item(atree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
foffset += 8;
}
break;
@@ -1518,21 +2086,11 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
}
else
{
- proto_tree_add_item(atree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- if (foffset > tvb_length_remaining(tvb, foffset)) {
- break;
- }
- foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
}
break;
case 52: /* OID Cardinal Map */
- proto_tree_add_item(atree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- if (foffset > tvb_length_remaining(tvb, foffset)) {
- break;
- }
- foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
foffset += 4;
break;
@@ -1545,10 +2103,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
}
else
{
- proto_tree_add_item(atree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
- foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
}
break;
case 54: /* Positive Integer or OID */
@@ -1556,12 +2111,7 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
proto_tree_add_uint(atree, hf_ndps_integer_or_oid, tvb, foffset, 4, integer_or_oid);
foffset += 4;
if (integer_or_oid==0) {
- proto_tree_add_item(atree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- if (foffset > tvb_length_remaining(tvb, foffset)) {
- break;
- }
- foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
}
else
{
@@ -1584,134 +2134,891 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
}
else
{
- foffset = ndps_string(tvb, hf_ndps_context, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
}
}
- bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
- btree = proto_item_add_subtree(bitem, ett_ndps);
- number_of_items = tvb_get_ntohl(tvb, foffset);
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
foffset += 4;
+ foffset = name_or_id(tvb, atree, foffset);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
for (i = 1 ; i <= number_of_items; i++ )
{
- proto_tree_add_item(btree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
- foffset += 4;
- proto_tree_add_item(btree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
- foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, btree, foffset);
+ foffset += address_item(tvb, atree, foffset);
}
- bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
- btree = proto_item_add_subtree(bitem, ett_ndps);
number_of_items = tvb_get_ntohl(tvb, foffset);
- foffset += 4;
for (i = 1 ; i <= number_of_items; i++ )
{
- foffset += address_item(tvb, btree, foffset);
- /*proto_tree_add_item(btree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
- foffset += 4;*/
- proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
+ foffset = objectidentification(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
foffset += 4;
+
event_object_type = tvb_get_ntohl(tvb, foffset);
- proto_tree_add_uint(btree, hf_ndps_event_object_identifier, tvb, foffset, 4, event_object_type);
+ proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, event_object_type);
foffset += 4;
- if(event_object_type==0)
+ if(event_object_type==1)
{
- proto_tree_add_item(btree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- if (foffset > tvb_length_remaining(tvb, foffset)) {
- break;
- }
- foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
}
else
{
- number_of_items2 = tvb_get_ntohl(tvb, foffset);
- citem = proto_tree_add_uint(btree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
- ctree = proto_item_add_subtree(citem, ett_ndps);
- foffset += 4;
- for (j = 1 ; j <= number_of_items2; j++ )
+ if(event_object_type==0)
{
- proto_tree_add_item(ctree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- if (foffset > tvb_length_remaining(tvb, foffset)) {
- break;
- }
- foffset += 4;
- qualified_name_type = tvb_get_ntohl(tvb, foffset);
- proto_tree_add_uint(ctree, hf_ndps_qualified_name, tvb, foffset,
- 4, qualified_name_type);
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
foffset += 4;
- if (qualified_name_type != 0) {
- if (qualified_name_type == 1) {
- foffset = ndps_string(tvb, hf_printer_name, ctree, foffset);
- }
- else
- {
- foffset = ndps_string(tvb, hf_ndps_context, ctree, foffset);
- foffset = ndps_string(tvb, hf_ndps_tree, ctree, foffset);
- }
+ for (j = 1 ; j <= number_of_items2; j++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
}
}
}
}
break;
case 56: /* Octet String */
- proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, 4, FALSE);
+ case 63: /* Job Password */
+ case 66: /* Print Checkpoint */
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
break;
case 59: /* Method Delivery Address */
+ proto_tree_add_item(atree, hf_ndps_delivery_add_type, tvb, foffset, 4, FALSE);
+ event_object_type = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ switch(event_object_type)
+ {
+ case 0: /*MHS ADDR*/
+ case 1: /*DISTINGUISHED_NAME*/
+ case 2: /*TEXT*/
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ break;
+ case 3: /*OCTET_STRING*/
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ break;
+ case 4: /*DIST_NAME_STRING*/
+ foffset = ndps_string(tvb, hf_object_name, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
+ break;
+ case 5: /*RPC_ADDRESS*/
+ case 6: /*QUALIFIED_NAME*/
+ foffset = objectidentifier(tvb, atree, foffset);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ break;
case 60: /* Object Identification */
+ foffset = objectidentification(tvb, atree, foffset);
+ break;
case 61: /* Results Profile */
+ foffset = objectidentifier(tvb, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
+ foffset = address_item(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = name_or_id(tvb, atree, foffset);
+ break;
case 62: /* Criteria */
- case 63: /* Job Password */
+ foffset = objectidentifier(tvb, atree, foffset);
+ criterion_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_criterion_type, tvb, foffset, 4, criterion_type);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 64: /* Job Level */
+ foffset = objectidentifier(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 65: /* Job Categories */
- case 66: /* Print Checkpoint */
+ foffset = objectidentifier(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ }
+ break;
case 67: /* Ignored Attribute */
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ ignored_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_ignored_type, tvb, foffset, 4, ignored_type);
+ foffset += 4;
+ if (ignored_type == 38)
+ {
+ foffset = name_or_id(tvb, atree, foffset);
+ }
+ else
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ }
+ break;
case 68: /* Resource */
+ resource_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_resource_type, tvb, foffset, 4, resource_type);
+ foffset += 4;
+ if (resource_type == 0)
+ {
+ foffset = name_or_id(tvb, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ break;
case 69: /* Medium Substitution */
+ foffset = name_or_id(tvb, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
+ break;
case 70: /* Font Substitution */
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ break;
case 71: /* Resource Context Seq */
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ resource_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_resource_type, tvb, foffset, 4, resource_type);
+ foffset += 4;
+ if (resource_type == 0)
+ {
+ foffset = name_or_id(tvb, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ break;
case 73: /* Page Select Seq */
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ identifier_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
+ foffset += 4;
+ if (identifier_type == 0)
+ {
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ if (identifier_type == 1)
+ {
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ if (identifier_type == 2)
+ {
+ foffset = name_or_id(tvb, atree, foffset);
+ }
+ proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ identifier_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
+ foffset += 4;
+ if (identifier_type == 0)
+ {
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ if (identifier_type == 1)
+ {
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ if (identifier_type == 2)
+ {
+ foffset = name_or_id(tvb, atree, foffset);
+ }
+ }
+ break;
case 74: /* Page Media Select */
+ media_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_media_type, tvb, foffset, 4, media_type);
+ foffset += 4;
+ if (media_type == 0)
+ {
+ foffset = name_or_id(tvb, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ identifier_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
+ foffset += 4;
+ if (identifier_type == 0)
+ {
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ if (identifier_type == 1)
+ {
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ if (identifier_type == 2)
+ {
+ foffset = name_or_id(tvb, atree, foffset);
+ }
+ }
+ }
+ break;
case 75: /* Document Content */
+ doc_content = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_doc_content, tvb, foffset, 4, doc_content);
+ foffset += 4;
+ if (doc_content == 0)
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_object_name, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
+ }
+ break;
case 76: /* Page Size */
+ page_size = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_page_size, tvb, foffset, 4, page_size);
+ foffset += 4;
+ if (page_size == 0)
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ else
+ {
+ proto_tree_add_item(atree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ }
+ break;
case 77: /* Presentation Direction */
+ proto_tree_add_uint(atree, hf_ndps_direction, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 78: /* Page Order */
- case 79: /* File Reference */
+ proto_tree_add_uint(atree, hf_ndps_page_order, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 80: /* Medium Source Size */
+ foffset = name_or_id(tvb, atree, foffset);
+ medium_size = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_medium_size, tvb, foffset, 4, medium_size);
+ foffset += 4;
+ if (medium_size == 0)
+ {
+ page_size = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_page_size, tvb, foffset, 4, page_size);
+ foffset += 4;
+ if (page_size == 0)
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ else
+ {
+ proto_tree_add_item(atree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ }
+ proto_tree_add_item(atree, hf_ndps_long_edge_feeds, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ }
+ else
+ {
+ proto_tree_add_item(atree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_inc_across_feed, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_size_inc_in_feed, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_long_edge_feeds, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ }
+ break;
case 81: /* Input Tray Medium */
- case 82: /* Output Bins Chars */
+ foffset = name_or_id(tvb, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
+ break;
+ case 82: /* Output Bins Characteristics */
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ proto_tree_add_uint(atree, hf_ndps_page_order, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_uint(atree, hf_ndps_page_orientation, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ break;
case 83: /* Page ID Type */
+ proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 84: /* Level Range */
+ foffset = objectidentifier(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_lower_range, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_upper_range, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 85: /* Category Set */
+ foffset = objectidentifier(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ }
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ }
+ break;
case 86: /* Numbers Up Supported */
+ proto_tree_add_uint(atree, hf_ndps_numbers_up, tvb, foffset, 4, FALSE);
+ numbers_up=tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ switch(numbers_up)
+ {
+ case 0: /*Cardinal*/
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 1: /*Name or OID*/
+ foffset = name_or_id(tvb, atree, foffset);
+ break;
+ case 2: /*Cardinal Range*/
+ proto_tree_add_item(atree, hf_ndps_lower_range, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_upper_range, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ default:
+ break;
+ }
+ break;
case 87: /* Finishing */
case 88: /* Print Contained Object ID */
+ foffset = ndps_string(tvb, hf_object_name, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 89: /* Print Config Object ID */
+ foffset = ndps_string(tvb, hf_object_name, atree, foffset);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ break;
case 90: /* Typed Name */
+ foffset = ndps_string(tvb, hf_object_name, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 91: /* Network Address */
+ proto_tree_add_item(atree, hf_ndps_address, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_add_bytes, tvb, foffset, 4, FALSE);
+ foffset += length;
+ break;
case 92: /* XY Dimensions Value */
+ proto_tree_add_item(atree, hf_ndps_xydim_value, tvb, foffset, 8, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 1) {
+ foffset = name_or_id(tvb, atree, foffset);
+ }
+ else
+ {
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
+ proto_tree_add_item(atree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ proto_tree_add_item(atree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ }
+ else
+ {
+ proto_tree_add_item(atree, hf_ndps_xdimension, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_ydimension, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ }
+ break;
case 93: /* Name or OID Dimensions Map */
+ foffset = name_or_id(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_xdimension, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_ydimension, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 94: /* Printer State Reason */
+ foffset = name_or_id(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_state_severity, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_training, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
+ foffset = objectidentification(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = name_or_id(tvb, atree, foffset);
+ break;
case 96: /* Qualified Name */
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ break;
case 97: /* Qualified Name Set */
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ }
+ break;
case 98: /* Colorant Set */
+ colorant_set = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(atree, hf_ndps_colorant_set, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (colorant_set==0)
+ {
+ foffset = name_or_id(tvb, atree, foffset);
+ }
+ else
+ {
+
+ foffset = objectidentifier(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = name_or_id(tvb, atree, foffset);
+ }
+ }
+ break;
case 99: /* Resource Printer ID */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset);
+ }
+ proto_tree_add_item(atree, hf_os_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 100: /* Event Object ID */
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = objectidentifier(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
+ foffset +=4;
+ break;
case 101: /* Qualified Name Map */
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ break;
case 104: /* Cardinal or Enum or Time */
+ card_enum_time = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(atree, hf_ndps_card_enum_time, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (card_enum_time==0)
+ {
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ else
+ {
+ if (card_enum_time==1)
+ {
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ else
+ {
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ }
+ break;
case 105: /* Print Contained Object ID Set */
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ break;
case 106: /* Octet String Pair */
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ break;
case 107: /* Octet String Integer Pair */
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 109: /* Event Handling Profile 2 */
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = name_or_id(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_delivery_add_type, tvb, foffset, 4, FALSE);
+ event_object_type = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ switch(event_object_type)
+ {
+ case 0: /*MHS ADDR*/
+ case 1: /*DISTINGUISHED_NAME*/
+ case 2: /*TEXT*/
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ break;
+ case 3: /*OCTET_STRING*/
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ break;
+ case 4: /*DIST_NAME_STRING*/
+ foffset = ndps_string(tvb, hf_object_name, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
+ break;
+ case 5: /*RPC_ADDRESS*/
+ case 6: /*QUALIFIED_NAME*/
+ foffset = objectidentifier(tvb, atree, foffset);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = ndps_string(tvb, hf_object_name, atree, foffset);
+ foffset = objectidentifier(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset,
+ 4, FALSE);
+ foffset += 4;
+ }
+ foffset = objectidentifier(tvb, atree, foffset);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ break;
default:
break;
+ }
+ return foffset;
+}
+
+static int
+filteritem(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
+{
+ guint32 filter_op=0;
+ guint32 number_of_items=0;
+ guint32 i;
+
+ proto_tree_add_item(ndps_tree, hf_ndps_item_filter, tvb, foffset, 4, FALSE);
+ filter_op = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ switch(filter_op)
+ {
+ case 0: /* Equality */
+ case 2: /* Greater or Equal */
+ case 3: /* Less or Equal */
+ case 5: /* Subset of */
+ case 6: /* Superset of */
+ case 7: /* Non NULL Set Intersect */
+ foffset = objectidentifier(tvb, ndps_tree, 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++ )
+ {
+ foffset = attribute_value(tvb, ndps_tree, foffset);
}
+ proto_tree_add_item(ndps_tree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 1: /* Substrings */
+ foffset = objectidentifier(tvb, ndps_tree, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_substring_match, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = attribute_value(tvb, ndps_tree, foffset); /* initial value */
+ 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++ )
+ {
+ foffset = attribute_value(tvb, ndps_tree, foffset); /* Any Value Set Option */
+ }
+ foffset = attribute_value(tvb, ndps_tree, foffset); /* Final Value */
+ break;
+ case 4: /* Present */
+ foffset = objectidentifier(tvb, ndps_tree, foffset);
+ default:
+ break;
}
return foffset;
}
+static const fragment_items ndps_frag_items = {
+ &ett_ndps_segment,
+ &ett_ndps_segments,
+ &hf_ndps_segments,
+ &hf_ndps_segment,
+ &hf_ndps_segment_overlap,
+ &hf_ndps_segment_overlap_conflict,
+ &hf_ndps_segment_multiple_tails,
+ &hf_ndps_segment_too_long_segment,
+ &hf_ndps_segment_error,
+ "segments"
+};
+
+
+static dissector_table_t ddp_dissector_table;
+
+static dissector_handle_t ndps_data_handle;
/* NDPS packets come in request/reply pairs. The request packets tell the
* Function and Program numbers. The response, unfortunately, only
@@ -1734,12 +3041,13 @@ attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
*/
typedef struct {
conversation_t *conversation;
- guint32 ndps_xid;
+ guint32 ndps_xport;
} ndps_req_hash_key;
typedef struct {
guint32 ndps_prog;
guint32 ndps_func;
+ guint32 ndps_frame_num;
} ndps_req_hash_value;
static GHashTable *ndps_req_hash = NULL;
@@ -1754,7 +3062,7 @@ ndps_equal(gconstpointer v, gconstpointer v2)
const ndps_req_hash_key *val2 = (const ndps_req_hash_key*)v2;
if (val1->conversation == val2->conversation &&
- val1->ndps_xid == val2->ndps_xid ) {
+ val1->ndps_xport == val2->ndps_xport ) {
return 1;
}
return 0;
@@ -1764,7 +3072,7 @@ guint
ndps_hash(gconstpointer v)
{
const ndps_req_hash_key *ndps_key = (const ndps_req_hash_key*)v;
- return GPOINTER_TO_UINT(ndps_key->conversation) + ndps_key->ndps_xid;
+ return GPOINTER_TO_UINT(ndps_key->conversation) + ndps_key->ndps_xport;
}
/* Frees memory used by the ndps_req_hash_value's */
@@ -1773,9 +3081,6 @@ ndps_req_hash_cleanup(gpointer key _U_, gpointer value, gpointer user_data _U_)
{
ndps_req_hash_value *request_value = (ndps_req_hash_value*) value;
- /*if (request_value->ndps_func) {
- g_free(request_value->ndps_func);
- }*/
}
/* Initializes the hash table and the mem_chunk area each time a new
@@ -1783,6 +3088,10 @@ ndps_req_hash_cleanup(gpointer key _U_, gpointer value, gpointer user_data _U_)
static void
ndps_init_protocol(void)
{
+ /* fragment */
+ fragment_table_init(&ndps_fragment_table);
+ reassembled_table_init(&ndps_reassembled_table);
+
if (ndps_req_hash) {
g_hash_table_foreach(ndps_req_hash, ndps_req_hash_cleanup, NULL);
g_hash_table_destroy(ndps_req_hash);
@@ -1823,7 +3132,7 @@ ndps_postseq_cleanup(void)
}
ndps_req_hash_value*
-ndps_hash_insert(conversation_t *conversation, guint32 ndps_xid)
+ndps_hash_insert(conversation_t *conversation, guint32 ndps_xport)
{
ndps_req_hash_key *request_key;
ndps_req_hash_value *request_value;
@@ -1832,11 +3141,12 @@ ndps_hash_insert(conversation_t *conversation, guint32 ndps_xid)
a reply to it. */
request_key = g_mem_chunk_alloc(ndps_req_hash_keys);
request_key->conversation = conversation;
- request_key->ndps_xid = ndps_xid;
+ request_key->ndps_xport = ndps_xport;
request_value = g_mem_chunk_alloc(ndps_req_hash_values);
request_value->ndps_prog = 0;
request_value->ndps_func = 0;
+ request_value->ndps_frame_num = 0;
g_hash_table_insert(ndps_req_hash, request_key, request_value);
@@ -1845,12 +3155,12 @@ ndps_hash_insert(conversation_t *conversation, guint32 ndps_xid)
/* Returns the ncp_rec*, or NULL if not found. */
ndps_req_hash_value*
-ndps_hash_lookup(conversation_t *conversation, guint32 ndps_xid)
+ndps_hash_lookup(conversation_t *conversation, guint32 ndps_xport)
{
ndps_req_hash_key request_key;
request_key.conversation = conversation;
- request_key.ndps_xid = ndps_xid;
+ request_key.ndps_xport = ndps_xport;
return g_hash_table_lookup(ndps_req_hash, &request_key);
}
@@ -1860,152 +3170,126 @@ ndps_hash_lookup(conversation_t *conversation, guint32 ndps_xid)
/* ================================================================= */
static void
-dissect_ndps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+dissect_ndps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree)
{
- proto_tree *ndps_tree = NULL;
- proto_item *ti;
-
- guint16 record_mark;
- guint16 ndps_length;
guint32 ndps_xid;
guint32 ndps_prog;
guint32 ndps_packet_type;
guint32 ndps_rpc_version;
+ guint32 frame_num;
int foffset;
guint32 ndps_hfname;
guint32 ndps_func;
const char *ndps_program_string;
const char *ndps_func_string;
- if (check_col(pinfo->cinfo, COL_PROTOCOL))
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS");
- if (check_col(pinfo->cinfo, COL_INFO))
- col_clear(pinfo->cinfo, COL_INFO);
-
+ ndps_packet_type = tvb_get_ntohl(tvb, 8);
+ if (ndps_packet_type != 0 && ndps_packet_type != 1) { /* Packet Type */
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "(Continuation Data)");
+ proto_tree_add_text(ndps_tree, tvb, 0, tvb_length_remaining(tvb, 0), "Data - (%d Bytes)", tvb_length_remaining(tvb, 0));
+ return;
+ }
foffset = 0;
- if (tree) {
- ti = proto_tree_add_item(tree, proto_ndps, tvb, foffset, -1, FALSE);
- ndps_tree = proto_item_add_subtree(ti, ett_ndps);
+ proto_tree_add_item(ndps_tree, hf_ndps_record_mark, tvb,
+ foffset, 2, FALSE);
+ foffset += 2;
+ proto_tree_add_item(ndps_tree, hf_ndps_length, tvb,
+ foffset, 2, FALSE);
+ foffset += 2;
+
+ ndps_xid = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(ndps_tree, hf_ndps_xid, tvb, foffset, 4, ndps_xid);
+ foffset += 4;
+ ndps_packet_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(ndps_tree, hf_ndps_packet_type, tvb, foffset, 4, ndps_packet_type);
+ foffset += 4;
+ if(ndps_packet_type == 0x00000001) /* Reply packet */
+ {
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "R NDPS ");
+ proto_tree_add_item(ndps_tree, hf_ndps_rpc_accept, tvb, foffset, 4, FALSE);
+ if (tvb_get_ntohl(tvb, foffset)==0) {
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 8, FALSE);
+ foffset += 8;
+ }
+ else
+ {
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_rpc_rej_stat, tvb, foffset+4, 4, FALSE);
+ foffset += 4;
+ }
+ dissect_ndps_reply(tvb, pinfo, ndps_tree, ndps_xid, foffset);
}
- if (tvb_length_remaining(tvb, foffset) >= 28)
+ else
{
- record_mark = tvb_get_ntohs(tvb, foffset);
- if (tvb_get_ntohl(tvb, foffset+4) == 0x00000065) /* Check xid if not 65 then fragment packet */
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "C NDPS ");
+ ndps_rpc_version = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_rpc_version, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ ndps_prog = tvb_get_ntohl(tvb, foffset);
+ ndps_program_string = match_strval(ndps_prog, spx_ndps_program_vals);
+ if( ndps_program_string != NULL)
{
- /*
- * XXX - what is the significance of the record mark?
- * Are the first 4 bytes a 31-bit record length plus a
- * 1-bit record mark of some sort? Is that used in case
- * something has to be transferred over SPX that's
- * bigger than the biggest SPX frame, with the record
- * mark being a "last fragment" indication?
- */
- proto_tree_add_uint(ndps_tree, hf_ndps_record_mark, tvb,
- foffset, 2, record_mark);
- foffset += 2;
- ndps_length = tvb_get_ntohs(tvb, foffset);
- proto_tree_add_uint(ndps_tree, hf_ndps_length, tvb,
- foffset, 2, ndps_length);
- foffset += 2;
- ndps_xid = tvb_get_ntohl(tvb, foffset);
- proto_tree_add_uint(ndps_tree, hf_ndps_xid, tvb, foffset, 4, ndps_xid);
+ proto_tree_add_item(ndps_tree, hf_spx_ndps_program, tvb, foffset, 4, FALSE);
foffset += 4;
- ndps_packet_type = tvb_get_ntohl(tvb, foffset);
- proto_tree_add_uint(ndps_tree, hf_ndps_packet_type, tvb, foffset, 4, ndps_packet_type);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ {
+ col_append_str(pinfo->cinfo, COL_INFO, (const gchar*) ndps_program_string);
+ col_append_str(pinfo->cinfo, COL_INFO, ", ");
+ }
+ proto_tree_add_item(ndps_tree, hf_spx_ndps_version, tvb, foffset, 4, FALSE);
foffset += 4;
- if(ndps_packet_type == 0x00000001) /* Reply packet */
+ ndps_func = tvb_get_ntohl(tvb, foffset);
+ switch(ndps_prog)
{
- if (check_col(pinfo->cinfo, COL_INFO))
- col_set_str(pinfo->cinfo, COL_INFO, "R NDPS ");
- proto_tree_add_item(ndps_tree, hf_ndps_rpc_accept, tvb, foffset, 4, FALSE);
- if (tvb_get_ntohl(tvb, foffset)==0) {
- foffset += 4;
- proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 8, FALSE);
- foffset += 8;
- }
- else
- {
- foffset += 4;
- proto_tree_add_item(ndps_tree, hf_ndps_rpc_rej_stat, tvb, foffset+4, 4, FALSE);
- foffset += 4;
- }
- dissect_ndps_reply(tvb, pinfo, ndps_tree, ndps_xid, foffset);
+ case 0x060976:
+ ndps_hfname = hf_spx_ndps_func_print;
+ ndps_func_string = match_strval(ndps_func, spx_ndps_print_func_vals);
+ break;
+ case 0x060977:
+ ndps_hfname = hf_spx_ndps_func_broker;
+ ndps_func_string = match_strval(ndps_func, spx_ndps_broker_func_vals);
+ break;
+ case 0x060978:
+ ndps_hfname = hf_spx_ndps_func_registry;
+ ndps_func_string = match_strval(ndps_func, spx_ndps_registry_func_vals);
+ break;
+ case 0x060979:
+ ndps_hfname = hf_spx_ndps_func_notify;
+ ndps_func_string = match_strval(ndps_func, spx_ndps_notify_func_vals);
+ break;
+ case 0x06097a:
+ ndps_hfname = hf_spx_ndps_func_resman;
+ ndps_func_string = match_strval(ndps_func, spx_ndps_resman_func_vals);
+ break;
+ case 0x06097b:
+ ndps_hfname = hf_spx_ndps_func_delivery;
+ ndps_func_string = match_strval(ndps_func, spx_ndps_deliver_func_vals);
+ break;
+ default:
+ ndps_hfname = 0;
+ ndps_func_string = NULL;
+ break;
}
- else
+ if(ndps_hfname != 0)
{
- if (check_col(pinfo->cinfo, COL_INFO))
- col_set_str(pinfo->cinfo, COL_INFO, "C NDPS ");
- ndps_rpc_version = tvb_get_ntohl(tvb, foffset);
- proto_tree_add_item(ndps_tree, hf_ndps_rpc_version, tvb, foffset, 4, FALSE);
- foffset += 4;
- ndps_prog = tvb_get_ntohl(tvb, foffset);
- ndps_program_string = match_strval(ndps_prog, spx_ndps_program_vals);
- if( ndps_program_string != NULL)
+ proto_tree_add_item(ndps_tree, ndps_hfname, tvb, foffset, 4, FALSE);
+ if (ndps_func_string != NULL)
{
- proto_tree_add_item(ndps_tree, hf_spx_ndps_program, tvb, foffset, 4, FALSE);
- foffset += 4;
if (check_col(pinfo->cinfo, COL_INFO))
- {
- col_append_str(pinfo->cinfo, COL_INFO, (const gchar*) ndps_program_string);
- col_append_str(pinfo->cinfo, COL_INFO, ", ");
- }
- proto_tree_add_item(ndps_tree, hf_spx_ndps_version, tvb, foffset, 4, FALSE);
- foffset += 4;
- ndps_func = tvb_get_ntohl(tvb, foffset);
- switch(ndps_prog)
- {
- case 0x060976:
- ndps_hfname = hf_spx_ndps_func_print;
- ndps_func_string = match_strval(ndps_func, spx_ndps_print_func_vals);
- break;
- case 0x060977:
- ndps_hfname = hf_spx_ndps_func_broker;
- ndps_func_string = match_strval(ndps_func, spx_ndps_broker_func_vals);
- break;
- case 0x060978:
- ndps_hfname = hf_spx_ndps_func_registry;
- ndps_func_string = match_strval(ndps_func, spx_ndps_registry_func_vals);
- break;
- case 0x060979:
- ndps_hfname = hf_spx_ndps_func_notify;
- ndps_func_string = match_strval(ndps_func, spx_ndps_notify_func_vals);
- break;
- case 0x06097a:
- ndps_hfname = hf_spx_ndps_func_resman;
- ndps_func_string = match_strval(ndps_func, spx_ndps_resman_func_vals);
- break;
- case 0x06097b:
- ndps_hfname = hf_spx_ndps_func_delivery;
- ndps_func_string = match_strval(ndps_func, spx_ndps_deliver_func_vals);
- break;
- default:
- ndps_hfname = 0;
- ndps_func_string = NULL;
- break;
- }
- if(ndps_hfname != 0)
- {
- proto_tree_add_item(ndps_tree, ndps_hfname, tvb, foffset, 4, FALSE);
- if (ndps_func_string != NULL)
- {
- if (check_col(pinfo->cinfo, COL_INFO))
- col_append_str(pinfo->cinfo, COL_INFO, (const gchar*) ndps_func_string);
+ col_append_str(pinfo->cinfo, COL_INFO, (const gchar*) ndps_func_string);
- foffset += 4;
- proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 16, FALSE);
- foffset+=16;
- dissect_ndps_request(tvb, pinfo, ndps_tree, ndps_xid, ndps_prog, ndps_func, foffset);
- }
- }
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 16, FALSE);
+ foffset+=16;
+ dissect_ndps_request(tvb, pinfo, ndps_tree, ndps_xid, ndps_prog, ndps_func, foffset);
}
}
}
- else
- {
- if (check_col(pinfo->cinfo, COL_INFO))
- col_append_str(pinfo->cinfo, COL_INFO, "Continuation Fragment");
- }
}
}
@@ -2029,10 +3313,177 @@ get_ndps_pdu_len(tvbuff_t *tvb, int offset)
}
static void
+ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint16 record_mark=0;
+ guint16 ndps_length=0;
+ guint32 id=0;
+ int len=0;
+ tvbuff_t *next_tvb = NULL;
+ fragment_data *fd_head;
+ spx_info *spx_data;
+
+ if (!pinfo->fd->flags.visited) {
+ spx_data = pinfo->private_data;
+ }
+ if (!ndps_defragment || spx_data->retransmission == TRUE) {
+ if (spx_data->retransmission == TRUE) {
+ if (check_col(pinfo->cinfo, COL_INFO))
+ {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "[Retransmission] Original Packet %d", spx_data->num);
+ }
+ return;
+ }
+ dissect_ndps(tvb, pinfo, tree);
+ return;
+ }
+ record_mark = tvb_get_ntohs(tvb, 0);
+ ndps_length = tvb_get_ntohs(tvb, 2);
+
+ if (ndps_length > tvb_length_remaining(tvb, 0) || ndps_fragmented || ndps_length==0)
+ {
+ more_fragment = TRUE;
+ ndps_fragmented = TRUE;
+
+ /*
+ * Fragment
+ */
+ tid = (pinfo->srcport+pinfo->destport);
+ len = tvb_reported_length_remaining(tvb, 0);
+ if ((frag_number + tvb_length_remaining(tvb, 0)-save_frag_length)<=10)
+ {
+ more_fragment = FALSE;
+ }
+ if (tvb_bytes_exist(tvb, 0, len))
+ {
+ fd_head = fragment_add_seq_next(tvb, 0, pinfo, tid, ndps_fragment_table, ndps_reassembled_table, len, more_fragment);
+ if (fd_head != NULL)
+ {
+ if (fd_head->next != NULL)
+ {
+ next_tvb = tvb_new_real_data(fd_head->data,
+ fd_head->len, fd_head->len);
+ tvb_set_child_real_data_tvbuff(tvb,
+ next_tvb);
+ add_new_data_source(pinfo,
+ next_tvb,
+ "Reassembled NDPS");
+ /* Show all fragments. */
+ if (tree)
+ {
+ show_fragment_seq_tree(fd_head,
+ &ndps_frag_items,
+ tree, pinfo,
+ next_tvb);
+ tid++;
+ }
+ more_fragment = FALSE;
+ save_frag_length = 0;
+ frag_number=0;
+ ndps_fragmented=FALSE;
+ }
+ else
+ {
+ next_tvb = tvb_new_subset(tvb, 0, -1, -1);
+ }
+ }
+ else
+ {
+ if (save_frag_length == 0)
+ {
+ save_frag_length = ndps_length; /* First Fragment */
+ save_frag_seq = tid;
+ }
+ if ((pinfo->srcport+pinfo->destport) == save_frag_seq)
+ {
+ if (!pinfo->fd->flags.visited)
+ {
+ frag_number += tvb_length_remaining(tvb, 0); /* Current offset */
+ }
+ if (check_col(pinfo->cinfo, COL_INFO))
+ {
+ if (more_fragment)
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, " [NDPS Fragment]");
+ }
+ }
+ }
+ next_tvb = NULL;
+ }
+ }
+ else
+ {
+ /*
+ * Dissect this
+ */
+ next_tvb = tvb_new_subset(tvb, 0, -1, -1);
+ }
+ if (next_tvb == NULL)
+ {
+ if ((pinfo->srcport+pinfo->destport) == save_frag_seq)
+ {
+ next_tvb = tvb_new_subset (tvb, 0, -1, -1);
+ call_dissector(ndps_data_handle, next_tvb, pinfo, tree);
+ }
+ else
+ {
+ dissect_ndps(tvb, pinfo, tree);
+ }
+ }
+ else
+ {
+ dissect_ndps(next_tvb, pinfo, tree);
+ }
+ }
+ else
+ {
+ dissect_ndps(tvb, pinfo, tree);
+ }
+}
+
+static void
dissect_ndps_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- tcp_dissect_pdus(tvb, pinfo, tree, ndps_desegment, 4, get_ndps_pdu_len,
+ proto_tree *ndps_tree = NULL;
+ proto_item *ti;
+
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS");
+
+ 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);
+ }
+ tcp_dissect_pdus(tvb, pinfo, ndps_tree, ndps_desegment, 4, get_ndps_pdu_len,
dissect_ndps);
+ if (tvb_length_remaining(tvb, 0) < 8)
+ {
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_set_str(pinfo->cinfo, COL_INFO, "Ack");
+ }
+}
+
+
+static void
+dissect_ndps_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ proto_tree *ndps_tree = NULL;
+ proto_item *ti;
+
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS");
+
+ 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);
+ }
+ ndps_defrag(tvb, pinfo, ndps_tree);
}
static void
@@ -2040,8 +3491,25 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
{
ndps_req_hash_value *request_value = NULL;
conversation_t *conversation;
- guint32 name_len;
- guint32 cred_type;
+ guint32 i=0;
+ guint32 j=0;
+ guint32 name_len=0;
+ guint32 field_len=0;
+ guint32 cred_type=0;
+ guint32 resource_type=0;
+ guint32 filter_type=0;
+ guint32 print_type=0;
+ guint32 qualified_name_type=0;
+ guint32 data_type=0;
+ guint32 length=0;
+ guint32 number_of_items=0;
+ guint32 number_of_items2=0;
+ proto_tree *atree;
+ proto_item *aitem;
+ proto_tree *btree;
+ proto_item *bitem;
+ proto_tree *ctree;
+ proto_item *citem;
if (!pinfo->fd->flags.visited)
{
@@ -2054,20 +3522,21 @@ 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->src, &pinfo->dst,
- PT_NCP, ndps_xid, ndps_xid, 0);
+ PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
if (conversation == NULL)
{
/* It's not part of any conversation - create a new one. */
conversation = conversation_new(&pinfo->src, &pinfo->dst,
- PT_NONE, ndps_xid, ndps_xid, 0);
+ PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
}
- request_value = ndps_hash_insert(conversation, ndps_xid);
+ request_value = ndps_hash_insert(conversation, (guint32) pinfo->srcport);
request_value->ndps_prog = ndps_prog;
request_value->ndps_func = ndps_func;
+ request_value->ndps_frame_num = pinfo->fd->num;
}
switch(ndps_prog)
{
@@ -2075,79 +3544,1217 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
switch(ndps_func)
{
case 0x00000001: /* Bind PSM */
+ proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
+ 4, FALSE);
+ foffset += 4;
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ /*if(name_len == 0)
+ {
+ foffset += 2;
+ }
+ 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);
break;
case 0x00000002: /* Bind PA */
+ /* Start of credentials */
cred_type = tvb_get_ntohl(tvb, foffset);
proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
foffset += 4;
- name_len = tvb_get_ntohl(tvb, foffset);
- foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
- if(name_len == 0)
+ switch (cred_type)
{
+ case 0:
+ foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_password, tvb, foffset, length, FALSE);
+ foffset += length;
+ }
+ break;
+ case 1:
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
+ foffset += length;
+ break;
+ case 2:
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ foffset += 2;
+ proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
+ 2, FALSE);
+ foffset += 2;
+ break;
+ case 3:
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ 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);
+ break;
+ case 4:
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ 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);
+ foffset += 8; /* Don't know what these 8 bytes signify */
+ proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
+ 4, FALSE);
+ foffset += 4;
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
+ break;
+ default:
+ break;
}
- else
+ /* End of credentials */
+ proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
{
-#if 0
+ length = tvb_get_ntohl(tvb, foffset);
foffset += 4;
-#else
- /*
- * In at least one capture I've seen, this is the correct
- * thing to do.
- */
- foffset += 2;
-#endif
+ proto_tree_add_item(ndps_tree, hf_bind_security, tvb, foffset, length, FALSE);
}
- proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
- 2, FALSE);
- foffset += 2;
- foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
- foffset += 8; /* Don't know what these 8 bytes signify */
- proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
- 4, FALSE);
+ /* Start of QualifiedName */
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(ndps_tree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
foffset += 4;
- foffset = ndps_string(tvb, hf_ndps_context, ndps_tree, foffset);
- foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
+ }
+ }
+ /* End of QualifiedName */
break;
case 0x00000003: /* Unbind */
proto_tree_add_item(ndps_tree, hf_ndps_object, tvb, foffset,
4, FALSE);
break;
case 0x00000004: /* Print */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_print_arg, tvb, foffset, 4, FALSE);
+ print_type = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ switch (print_type)
+ {
+ case 0: /* Create Job */
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Transfer Method");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ bitem = proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items2; j++ )
+ {
+ foffset = attribute_value(tvb, btree, foffset);
+ }
+ proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Document Content");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ foffset += align_4(tvb, foffset);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_doc_content, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ if (tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ if (tvb_get_ntohl(tvb, foffset) > tvb_length_remaining(tvb, foffset)) /* Segmented Data */
+ {
+ proto_tree_add_item(atree, hf_ndps_data, tvb, foffset, tvb_length_remaining(tvb, foffset), FALSE);
+ return;
+ }
+ proto_tree_add_item(atree, hf_ndps_included_doc, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), FALSE);
+ foffset += tvb_get_ntohl(tvb, foffset)+4;
+ foffset += (length%2);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_ref_name, atree, foffset);
+ foffset = name_or_id(tvb, atree, foffset);
+ }
+ }
+ foffset += 4;
+ if (align_4(tvb, foffset)>0) {
+ foffset += align_4(tvb, foffset);
+ foffset += 2;
+ }
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Document Type");
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ bitem = proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items2; j++ )
+ {
+ foffset = attribute_value(tvb, btree, foffset);
+ }
+ proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Document Attributes");
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset); /* Document Attributes */
+ }
+ break;
+ case 1: /* Add Job */
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ 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);
+ foffset += 4;
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Transfer Method");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset); /* Transfer Method */
+ }
+ proto_tree_add_item(ndps_tree, hf_doc_content, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Document Type");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset); /* Document Type */
+ }
+ foffset += align_4(tvb, foffset);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Document Attributes");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset); /* Document Attributes */
+ }
+ break;
+ case 2: /* Close Job */
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ default:
+ break;
+ }
+ 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);
+ 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);
+ foffset += 4;
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job Modifications");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset); /* Job Modifications */
+ }
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Document Modifications");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset); /* Document Modifications */
+ }
+ break;
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);
+ 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);
+ foffset += 4;
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ /* Start of nameorid */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Cancel Message");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of nameorid */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Retention Period");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+
break;
case 0x00000007: /* List Object Attributes */
- proto_tree_add_item(ndps_tree, hf_ndps_object, tvb, foffset,
- 4, FALSE);
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_attrs_arg, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Continuation */
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ }
+ }
+ else /* Specification */
+ {
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ foffset += 4;
+ foffset += align_4(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_scope, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)!=0) /* Scope Does not equal 0 */
+ {
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPSelector */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Selector Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = objectidentification(tvb, atree, foffset);
+ }
+ foffset += align_4(tvb, foffset);
+ /*foffset += 4;*/
+ proto_tree_add_item(ndps_tree, hf_ndps_filter, tvb, foffset, 4, FALSE);
+ filter_type = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ /*if (filter_type == 0 || filter_type == 3 )
+ {
+ foffset = filteritem(tvb, ndps_tree, foffset);
+ }
+ else
+ {
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = filteritem(tvb, ndps_tree, foffset);
+ }
+ }*/
+ proto_tree_add_item(ndps_tree, hf_ndps_time_limit, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_count_limit, tvb, foffset, 4, FALSE);
+ foffset += 4; /* End of NWDPSelector */
+ }
+ foffset += 4; /* Don't know what this is */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPObjectIdentifierSet */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Requested Attributes");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ } /* End of NWDPObjectIdentifierSet */
+ proto_tree_add_item(ndps_tree, hf_ndps_operator, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ }
break;
case 0x00000008: /* Promote Job */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NWDPPrtContainedObjectId */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPPrtContainedObjectId */
+ /* Start of nameorid */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of nameorid */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x00000009: /* Interrupt */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_interrupt_job_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ /* Start of NWDPPrtContainedObjectId */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPPrtContainedObjectId */
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ }
+ /* Start of nameorid */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Interrupt Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of nameorid */
+ /* Start of NWDPPrtContainedObjectId */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Interrupting Job");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPPrtContainedObjectId */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x0000000a: /* Pause */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_pause_job_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ /* Start of NWDPPrtContainedObjectId */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPPrtContainedObjectId */
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ }
+ /* Start of nameorid */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Pause Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of nameorid */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x0000000b: /* Resume */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NWDPPrtContainedObjectId */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPPrtContainedObjectId */
+ /* Start of nameorid */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Resume Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of nameorid */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x0000000c: /* Clean */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of nameorid */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Clean Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of nameorid */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x0000000d: /* Create */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentification(tvb, atree, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_force, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Reference Object Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentification(tvb, atree, foffset);
+ /* Start of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Attribute");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
+ }
+ /* End of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x0000000e: /* Delete */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentification(tvb, atree, foffset);
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x0000000f: /* Disable PA */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Disable PA Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x00000010: /* Enable PA */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Enable PA Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x00000011: /* Resubmit Jobs */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of QualifiedName */
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(ndps_tree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ foffset = address_item(tvb, ndps_tree, foffset);
+ proto_tree_add_item(ndps_tree, hf_resubmit_op_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of ResubmitJob Set */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Resubmit Job");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ /* Start of NWDPPrtContainedObjectId */
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Job ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset);
+ proto_tree_add_item(btree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPPrtContainedObjectId */
+ proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Job Attributes");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ proto_tree_add_item(btree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
+ }
+ /* End of AttributeSet */
+ /* Start of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Document Attributes");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ proto_tree_add_item(btree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
+ }
+ /* End of AttributeSet */
+ } /* End of ResubmitJob Set */
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Resubmit Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x00000012: /* Set */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentification(tvb, atree, foffset);
+ /* Start of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Attribute Modifications");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
+ }
+ /* End of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x00000013: /* Shutdown PA */
+ case 0x0000001e: /* Shutdown PSM */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ 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);
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Shutdown Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
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);
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Startup Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x00000015: /* Reorder Job */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NWDPPrtContainedObjectId */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job Identification");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPPrtContainedObjectId */
+ /* Start of NWDPPrtContainedObjectId */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Reference Job ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPPrtContainedObjectId */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x00000016: /* Pause PA */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Pause Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x00000017: /* Resume PA */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Resume Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x00000018: /* Transfer Data */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), FALSE);
+ break;
case 0x00000019: /* Device Control */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of Object Identifier */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Operation ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ /* End of Object Identifier */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x0000001a: /* Add Event Profile */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of Eventhandling */
+ proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Consumer Name");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Delivery Address");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset += address_item(tvb, atree, foffset);
+ }
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
+ foffset = objectidentification(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
+ foffset += 4;
+
+ proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if(tvb_get_ntohl(tvb, foffset-4)==1)
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ else
+ {
+ if(tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items2; j++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ }
+ }
+ }
+ /* End of Eventhandling */
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Account");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ break;
case 0x0000001b: /* Remove Event Profile */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 0x0000001c: /* Modify Event Profile */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
+ {
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ }
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
+ {
+ proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
+ {
+ /* Start of NameorID */
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Method ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = name_or_id(tvb, btree, foffset);
+ /* End of NameorID */
+ }
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
+ {
+ foffset = print_address(tvb, atree, foffset);
+ }
+ /* Start of EventObjectSet */
+ length = tvb_get_ntohl(tvb, foffset); /* Len of record */
+ if (length > 0)
+ {
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of objectidentifier */
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Class ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentifier(tvb, btree, foffset);
+ /* End of objectidentifier */
+ /* Start of objectidentification */
+ bitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentification(tvb, btree, foffset);
+ /* End of objectidentification */
+ proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of ObjectItem */
+ proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if(tvb_get_ntohl(tvb, foffset-4)==1)
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ else
+ {
+ if(tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items; j++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ }
+ }
+ /* End of ObjectItem */
+ }
+ /* End of EventObjectSet */
+ break;
case 0x0000001d: /* List Event Profiles */
- case 0x0000001e: /* Shutdown PSM */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Spec */
+ {
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier Alias");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Choice */
+ {
+ /* Start of CardinalSeq */
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ }
+ /* End of CardinalSeq */
+ }
+ else
+ {
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Consumer");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of integeroption */
+ proto_tree_add_item(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)!=0)
+ {
+ proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ /* End of integeroption */
+ }
+ else /* Cont */
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ break;
case 0x0000001f: /* Cancel PSM Shutdown */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Cancel Shutdown Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x00000020: /* Set Printer DS Information */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ 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);
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "DS Object Name");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ break;
case 0x00000021: /* Clean User Jobs */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Clean Message Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ } /* NWDPCommonArguments */
+ break;
case 0x00000022: /* Map GUID to NDS Name */
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_guid, tvb, foffset, length, FALSE);
+ foffset += length;
+ break;
default:
break;
}
@@ -2156,10 +4763,106 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
switch(ndps_func)
{
case 0x00000001: /* Bind */
+ /* Start of credentials */
+ cred_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ switch (cred_type)
+ {
+ case 0:
+ foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_password, tvb, foffset, length, FALSE);
+ foffset += length;
+ }
+ break;
+ case 1:
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
+ foffset += length;
+ break;
+ case 2:
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ foffset += 2;
+ proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
+ 2, FALSE);
+ foffset += 2;
+ break;
+ case 3:
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ 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);
+ break;
+ case 4:
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ 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);
+ foffset += 8; /* Don't know what these 8 bytes signify */
+ proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
+ 4, FALSE);
+ foffset += 4;
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
+ break;
+ default:
+ break;
+ }
+ /* End of credentials */
+ proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_bind_security, tvb, foffset, length, FALSE);
+ }
+ break;
case 0x00000002: /* Unbind */
+ break;
case 0x00000003: /* List Services */
+ proto_tree_add_item(ndps_tree, hf_ndps_list_services_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 0x00000004: /* Enable Service */
+ proto_tree_add_item(ndps_tree, hf_ndps_service_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Parameters");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_item_bytes, tvb, foffset, length, FALSE);
+ foffset += length;
+ }
+ break;
case 0x00000005: /* Disable Service */
+ proto_tree_add_item(ndps_tree, hf_ndps_list_services_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 0x00000006: /* Down Broker */
case 0x00000007: /* Get Broker NDS Object Name */
case 0x00000008: /* Get Broker Session Information */
@@ -2171,17 +4874,285 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
switch(ndps_func)
{
case 0x00000001: /* Bind */
+ /* Start of credentials */
+ cred_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ switch (cred_type)
+ {
+ case 0:
+ foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_password, tvb, foffset, length, FALSE);
+ foffset += length;
+ }
+ break;
+ case 1:
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
+ foffset += length;
+ break;
+ case 2:
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ foffset += 2;
+ proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
+ 2, FALSE);
+ foffset += 2;
+ break;
+ case 3:
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ 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);
+ break;
+ case 4:
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ 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);
+ foffset += 8; /* Don't know what these 8 bytes signify */
+ proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
+ 4, FALSE);
+ foffset += 4;
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
+ break;
+ default:
+ break;
+ }
+ /* End of credentials */
+ proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_bind_security, tvb, foffset, length, FALSE);
+ }
+ break;
case 0x00000002: /* Unbind */
+ break;
case 0x00000003: /* Register Server */
+ /* Start of Server Entry */
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_server_type, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ foffset = print_address(tvb, atree, foffset);
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Server Info");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(btree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items2; j++ )
+ {
+ 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)
+ {
+ case 0: /* Int8 */
+ proto_tree_add_item(btree, hf_info_int, tvb, foffset, 1, FALSE);
+ foffset++;
+ break;
+ case 1: /* Int16 */
+ proto_tree_add_item(btree, hf_info_int16, tvb, foffset, 2, FALSE);
+ foffset += 2;
+ break;
+ case 2: /* Int32 */
+ proto_tree_add_item(btree, hf_info_int32, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 3: /* Boolean */
+ proto_tree_add_item(btree, hf_info_boolean, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 4: /* String */
+ case 5: /* Bytes */
+ foffset = ndps_string(tvb, hf_info_string, btree, foffset);
+ break;
+ /*length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(btree, hf_info_bytes, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%4);*/
+ break;
+ default:
+ break;
+ }
+ }
+ /* End of Server Entry */
+ break;
case 0x00000004: /* Deregister Server */
- case 0x00000005: /* Register Registry */
case 0x00000006: /* Deregister Registry */
+ case 0x0000000b: /* Get Registry NDS Object Name */
+ case 0x0000000c: /* Get Registry Session Information */
+ /* NoOp */
+ break;
+ case 0x00000005: /* Register Registry */
+ foffset = ndps_string(tvb, hf_ndps_registry_name, ndps_tree, foffset);
+ foffset = print_address(tvb, ndps_tree, foffset);
+ break;
case 0x00000007: /* Registry Update */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Add");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ /* Start of Server Entry */
+ foffset = ndps_string(tvb, hf_ndps_server_name, atree, foffset);
+ bitem = proto_tree_add_item(atree, hf_ndps_server_type, tvb, foffset, 4, FALSE);
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset += 4;
+ foffset = print_address(tvb, btree, foffset);
+ citem = proto_tree_add_text(btree, tvb, foffset, 0, "Server Info");
+ ctree = proto_item_add_subtree(citem, ett_ndps);
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ctree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items2; j++ )
+ {
+ data_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ctree, hf_ndps_data_item_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ switch (data_type)
+ {
+ case 0: /* Int8 */
+ proto_tree_add_item(ctree, hf_info_int, tvb, foffset, 1, FALSE);
+ foffset++;
+ break;
+ case 1: /* Int16 */
+ proto_tree_add_item(ctree, hf_info_int16, tvb, foffset, 2, FALSE);
+ foffset += 2;
+ break;
+ case 2: /* Int32 */
+ proto_tree_add_item(ctree, hf_info_int32, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 3: /* Boolean */
+ proto_tree_add_item(ctree, hf_info_boolean, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 4: /* String */
+ case 5: /* Bytes */
+ foffset = ndps_string(tvb, hf_info_string, ctree, foffset);
+ break;
+ /*length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ctree, hf_info_bytes, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%4);*/
+ break;
+ default:
+ break;
+ }
+ }
+ /* End of Server Entry */
+ }
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Remove");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ /* Start of Server Entry */
+ foffset = ndps_string(tvb, hf_ndps_server_name, atree, foffset);
+ bitem = proto_tree_add_item(atree, hf_ndps_server_type, tvb, foffset, 4, FALSE);
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset += 4;
+ foffset = print_address(tvb, btree, foffset);
+ citem = proto_tree_add_text(btree, tvb, foffset, 0, "Server Info");
+ ctree = proto_item_add_subtree(citem, ett_ndps);
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ctree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items2; j++ )
+ {
+ data_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ctree, hf_ndps_data_item_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ switch (data_type)
+ {
+ case 0: /* Int8 */
+ proto_tree_add_item(ctree, hf_info_int, tvb, foffset, 1, FALSE);
+ foffset++;
+ break;
+ case 1: /* Int16 */
+ proto_tree_add_item(ctree, hf_info_int16, tvb, foffset, 2, FALSE);
+ foffset += 2;
+ break;
+ case 2: /* Int32 */
+ proto_tree_add_item(ctree, hf_info_int32, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 3: /* Boolean */
+ proto_tree_add_item(ctree, hf_info_boolean, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 4: /* String */
+ case 5: /* Bytes */
+ foffset = ndps_string(tvb, hf_info_string, ctree, foffset);
+ break;
+ /*length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ctree, hf_info_bytes, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%4);*/
+ break;
+ default:
+ break;
+ }
+ }
+ /* End of Server Entry */
+ }
+ break;
case 0x00000008: /* List Local Servers */
case 0x00000009: /* List Servers */
case 0x0000000a: /* List Known Registries */
- case 0x0000000b: /* Get Registry NDS Object Name */
- case 0x0000000c: /* Get Registry Session Information */
+ proto_tree_add_item(ndps_tree, hf_ndps_list_local_servers_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ /* Start of integeroption */
+ proto_tree_add_item(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)!=0)
+ {
+ proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ /* End of integeroption */
+ }
+ else
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ break;
default:
break;
}
@@ -2190,22 +5161,574 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
switch(ndps_func)
{
case 0x00000001: /* Notify Bind */
+ /* Start of credentials */
+ cred_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ switch (cred_type)
+ {
+ case 0:
+ foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_password, tvb, foffset, length, FALSE);
+ foffset += length;
+ }
+ break;
+ case 1:
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
+ foffset += length;
+ break;
+ case 2:
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ foffset += 2;
+ proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
+ 2, FALSE);
+ foffset += 2;
+ break;
+ case 3:
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ 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);
+ break;
+ case 4:
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ 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);
+ foffset += 8; /* Don't know what these 8 bytes signify */
+ proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
+ 4, FALSE);
+ foffset += 4;
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
+ break;
+ default:
+ break;
+ }
+ /* End of credentials */
+ proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_bind_security, tvb, foffset, length, FALSE);
+ }
+ break;
case 0x00000002: /* Notify Unbind */
+ case 0x0000000a: /* List Supported Languages */
+ case 0x00000010: /* Get Notify NDS Object Name */
+ case 0x00000011: /* Get Notify Session Information */
+ /* NoOp */
+ break;
case 0x00000003: /* Register Supplier */
+ foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset);
+ /* Start of QualifiedName Set*/
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ /* Start of QualifiedName */
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Supplier Alias");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(btree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, btree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, btree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ }
+ /* End of QualifiedName Set*/
+ break;
case 0x00000004: /* Deregister Supplier */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 0x00000005: /* Add Profile */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier Alias");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ /* Start of Eventhandling */
+ proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Consumer Name");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Delivery Address");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset += address_item(tvb, atree, foffset);
+ }
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
+ foffset = objectidentification(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
+ foffset += 4;
+
+ proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if(tvb_get_ntohl(tvb, foffset-4)==1)
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ else
+ {
+ if(tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items2; j++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ }
+ }
+ }
+ /* End of Eventhandling */
+ break;
case 0x00000006: /* Remove Profile */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
case 0x00000007: /* Modify Profile */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
+ {
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ }
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
+ {
+ proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
+ {
+ /* Start of NameorID */
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Method ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = name_or_id(tvb, btree, foffset);
+ /* End of NameorID */
+ }
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
+ {
+ foffset = print_address(tvb, atree, foffset);
+ }
+ /* Start of EventObjectSet */
+ length = tvb_get_ntohl(tvb, foffset); /* Len of record */
+ if (length > 0)
+ {
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of objectidentifier */
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Class ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentifier(tvb, btree, foffset);
+ /* End of objectidentifier */
+ /* Start of objectidentification */
+ bitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentification(tvb, btree, foffset);
+ /* End of objectidentification */
+ proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of ObjectItem */
+ proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if(tvb_get_ntohl(tvb, foffset-4)==1)
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ else
+ {
+ if(tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items; j++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ }
+ }
+ /* End of ObjectItem */
+ }
+ /* End of EventObjectSet */
+ break;
case 0x00000008: /* List Profiles */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Spec */
+ {
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier Alias");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Choice */
+ {
+ /* Start of CardinalSeq */
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ }
+ /* End of CardinalSeq */
+ }
+ else
+ {
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Consumer");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of integeroption */
+ proto_tree_add_item(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)!=0)
+ {
+ proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ /* End of integeroption */
+ }
+ else /* Cont */
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ break;
case 0x00000009: /* Report Event */
- case 0x0000000a: /* List Supported Languages */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of ReportEventItemSet */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Items");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ /* Start of ReportEventItem */
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Containing Class");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentifier(tvb, btree, foffset);
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Containing Object");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentification(tvb, btree, foffset);
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Filter Class");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentifier(tvb, btree, foffset);
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Object Class");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentifier(tvb, btree, foffset);
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Object ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentification(tvb, btree, foffset);
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Event Object ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentifier(tvb, btree, foffset);
+ /* Start of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Attribute Modifications");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ proto_tree_add_item(btree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
+ }
+ /* End of AttributeSet */
+ foffset = ndps_string(tvb, hf_ndps_message, atree, foffset);
+ proto_tree_add_item(atree, hf_time, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of ReportEventItem */
+ }
+ /* End of ReportEventItemSet */
+ break;
case 0x0000000b: /* Report Notification */
+ /* Start of DestinationSet */
+ proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ /* Start of Destination */
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ /* Start of NotifyDeliveryAddr */
+ proto_tree_add_item(atree, hf_address_len, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = print_address(tvb, atree, foffset);
+ /* End of NotifyDeliveryAddr */
+ /* End of Destination */
+ }
+ /* End of DestinationSet */
+ foffset = ndps_string(tvb, hf_ndps_supplier_name, 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, 0, "Containing Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Containing Object");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentification(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Filter Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentification(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ /* Start of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Attribute");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ }
+ /* End of AttributeSet */
+ foffset = ndps_string(tvb, hf_ndps_message, ndps_tree, foffset);
+ proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Account");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ break;
case 0x0000000c: /* Add Delivery Method */
+ foffset = ndps_string(tvb, hf_ndps_file_name, ndps_tree, foffset);
+ break;
case 0x0000000d: /* Remove Delivery Method */
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ break;
case 0x0000000e: /* List Delivery Methods */
+ cred_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_delivery_method_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ switch (cred_type)
+ {
+ case 0: /* Specification */
+ /* Start of integeroption */
+ proto_tree_add_item(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)!=0)
+ {
+ proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ /* End of integeroption */
+ proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 1: /* Continuation */
+ length = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%2);
+ proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ default:
+ break;
+ }
+ break;
case 0x0000000f: /* Get Delivery Method Information */
- case 0x00000010: /* Get Notify NDS Object Name */
- case 0x00000011: /* Get Notify Session Information */
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
default:
break;
}
@@ -2214,29 +5737,342 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
switch(ndps_func)
{
case 0x00000001: /* Bind */
- proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset,
- 4, FALSE);
+ /* Start of credentials */
+ cred_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
foffset += 4;
- name_len = tvb_get_ntohl(tvb, foffset);
- foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
- if(name_len == 0)
+ switch (cred_type)
{
+ case 0:
+ foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_password, tvb, foffset, length, FALSE);
+ foffset += length;
+ }
+ break;
+ case 1:
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
+ foffset += length;
+ break;
+ case 2:
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ foffset += 2;
+ proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
+ 2, FALSE);
+ foffset += 2;
+ break;
+ case 3:
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ 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);
+ break;
+ case 4:
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ 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);
+ foffset += 8; /* Don't know what these 8 bytes signify */
+ proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
+ 4, FALSE);
+ foffset += 4;
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
+ break;
+ default:
+ break;
+ }
+ /* End of credentials */
+ proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_bind_security, tvb, foffset, length, FALSE);
}
- foffset += 2;
- proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
- 2, FALSE);
- foffset += 2;
- foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
break;
case 0x00000002: /* Unbind */
+ case 0x00000008: /* Get Resource Manager NDS Object Name */
+ case 0x00000009: /* Get Resource Manager Session Information */
+ /* NoOp */
+ break;
case 0x00000003: /* Add Resource File */
+ proto_tree_add_item(ndps_tree, hf_packet_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_last_packet_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NWDPResAddInputData */
+ 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)
+ {
+ 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);
+ foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
+ break;
+ case 1: /* Printer Definitions */
+ foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
+ break;
+ case 2: /* Banner Page Files */
+ foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset);
+ 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);
+ 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);
+ proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ default:
+ break;
+ }
+ /* End of NWDPResAddInputData */
+ proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items=tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length=tvb_get_ntohl(tvb, foffset);
+ if(tvb_length_remaining(tvb, foffset) < length)
+ {
+ return;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_item_ptr, tvb, foffset, length, FALSE);
+ foffset += length;
+ }
+ break;
case 0x00000004: /* Delete Resource File */
+ /* Start of NWDPResAddInputData */
+ 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)
+ {
+ 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);
+ foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
+ break;
+ case 1: /* Printer Definitions */
+ foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
+ break;
+ case 2: /* Banner Page Files */
+ foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset);
+ 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);
+ 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);
+ proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ default:
+ break;
+ }
+ /* End of NWDPResAddInputData */
+ break;
case 0x00000005: /* List Resources */
+ proto_tree_add_item(ndps_tree, hf_ndps_max_items, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_status_flags, 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)
+ {
+ case 0: /* Print Drivers */
+ proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 1: /* Printer Definitions */
+ case 2: /* Printer Definitions Short */
+ foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset);
+ break;
+ case 3: /* Banner Page Files */
+ proto_tree_add_item(ndps_tree, hf_banner_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 4: /* Font Types */
+ proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 5: /* Printer Driver Files */
+ case 12: /* Printer Driver Files 2 */
+ 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);
+ foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset);
+ 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);
+ foffset += 4;
+ foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset);
+ 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 7: /* Font Files */
+ 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_font_name, ndps_tree, foffset);
+ 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);
+ foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset);
+ break;
+ case 14: /* Languages Available */
+ break;
+ default:
+ break;
+ }
+ break;
case 0x00000006: /* Get Resource File */
- case 0x00000007: /* Get Resource File Data */
- case 0x00000008: /* Get Resource Manager NDS Object Name */
- case 0x00000009: /* Get Resource Manager Session Information */
+ proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ 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)
+ {
+ 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);
+ foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
+ break;
+ case 1: /* Printer Definitions */
+ foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
+ break;
+ case 2: /* Banner Page Files */
+ foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset);
+ 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);
+ 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);
+ proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ default:
+ break;
+ }
+ break;
+ case 0x00000007: /* Get Resource File Date */
+ proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NWDPResAddInputData */
+ 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)
+ {
+ 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);
+ foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
+ break;
+ case 1: /* Printer Definitions */
+ foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
+ break;
+ case 2: /* Banner Page Files */
+ foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset);
+ 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);
+ 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);
+ proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ default:
+ break;
+ }
+ /* End of NWDPResAddInputData */
+ break;
+ case 0x0000000a: /* Set Resource Language Context */
+ proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
default:
break;
}
@@ -2245,9 +6081,199 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
switch(ndps_func)
{
case 0x00000001: /* Delivery Bind */
+ /* Start of credentials */
+ cred_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ switch (cred_type)
+ {
+ case 0:
+ foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_password, tvb, foffset, length, FALSE);
+ foffset += length;
+ }
+ break;
+ case 1:
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
+ foffset += length;
+ break;
+ case 2:
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ foffset += 2;
+ proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
+ 2, FALSE);
+ foffset += 2;
+ break;
+ case 3:
+ name_len = tvb_get_ntohl(tvb, foffset);
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ 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);
+ break;
+ case 4:
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ foffset += align_4(tvb, foffset);
+ 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);
+ foffset += 8; /* Don't know what these 8 bytes signify */
+ proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
+ 4, FALSE);
+ foffset += 4;
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
+ break;
+ default:
+ break;
+ }
+ /* End of credentials */
+ break;
case 0x00000002: /* Delivery Unbind */
+ /* NoOp */
+ break;
case 0x00000003: /* Delivery Send */
+ proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ 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, 0, "Containing Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Containing Object");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentification(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Filter Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentification(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ foffset = attribute_value(tvb, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_message, ndps_tree, foffset);
+ proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Account");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ }
+ break;
case 0x00000004: /* Delivery Send2 */
+ proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ 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, 0, "Containing Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Containing Object");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentification(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Filter Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentification(tvb, atree, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ /* Start of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Attribute");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset);
+ }
+ /* End of AttributeSet */
+ foffset = ndps_string(tvb, hf_ndps_message, ndps_tree, foffset);
+ proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Account");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ }
+ break;
default:
break;
}
@@ -2260,6 +6286,195 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
return;
}
+static int
+ndps_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
+{
+ guint32 number_of_items=0;
+ guint32 problem_type=0;
+ int i;
+ proto_tree *atree;
+ proto_item *aitem;
+
+ problem_type = tvb_get_ntohl(tvb, foffset);
+ /*if (problem_type == 0)
+ {
+ return FALSE;
+ }*/
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "- Error");
+ proto_tree_add_item(ndps_tree, hf_ndps_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ switch(problem_type)
+ {
+ case 0: /* Security Error */
+ proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
+ {
+ proto_tree_add_item(ndps_tree, hf_security_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ else /* Extended Error */
+ {
+ /* Start of objectidentifier */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ /* End of objectidentifier */
+ }
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Message");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ break;
+ case 1: /* Service Error */
+ proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
+ {
+ proto_tree_add_item(ndps_tree, hf_service_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ else /* Extended Error */
+ {
+ /* Start of objectidentifier */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ /* End of objectidentifier */
+ }
+ foffset = objectidentification(tvb, ndps_tree, foffset);
+ foffset = attribute_value(tvb, ndps_tree, foffset); /* Object Attribute Set */
+ proto_tree_add_item(ndps_tree, hf_ndps_lib_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_other_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_other_error_2, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 2: /* Access Error */
+ proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
+ {
+ proto_tree_add_item(ndps_tree, hf_access_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ else /* Extended Error */
+ {
+ /* Start of objectidentifier */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ /* End of objectidentifier */
+ }
+ foffset = objectidentification(tvb, ndps_tree, foffset);
+ break;
+ case 3: /* Printer Error */
+ proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
+ {
+ proto_tree_add_item(ndps_tree, hf_printer_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ else /* Extended Error */
+ {
+ /* Start of objectidentifier */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ /* End of objectidentifier */
+ }
+ foffset = objectidentification(tvb, ndps_tree, foffset);
+ break;
+ case 4: /* Selection Error */
+ proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
+ {
+ proto_tree_add_item(ndps_tree, hf_selection_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ else /* Extended Error */
+ {
+ /* Start of objectidentifier */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ /* End of objectidentifier */
+ }
+ foffset = objectidentification(tvb, ndps_tree, foffset);
+ foffset = attribute_value(tvb, ndps_tree, foffset); /* Object Attribute Set */
+ break;
+ case 5: /* Document Access Error */
+ proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
+ {
+ proto_tree_add_item(ndps_tree, hf_doc_access_problem_type, tvb, foffset, 4, FALSE);
+ foffset = objectidentifier(tvb, ndps_tree, foffset);
+ }
+ else /* Extended Error */
+ {
+ /* Start of objectidentifier */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ /* End of objectidentifier */
+ }
+ foffset = objectidentification(tvb, ndps_tree, foffset);
+ break;
+ case 6: /* Attribute Error */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
+ {
+ proto_tree_add_item(ndps_tree, hf_attribute_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ else /* Extended Error */
+ {
+ /* Start of objectidentifier */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ /* End of objectidentifier */
+ }
+ foffset = attribute_value(tvb, ndps_tree, foffset); /* Object Attribute Set */
+ }
+ break;
+ case 7: /* Update Error */
+ proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
+ {
+ proto_tree_add_item(ndps_tree, hf_update_problem_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ else /* Extended Error */
+ {
+ /* Start of objectidentifier */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = objectidentifier(tvb, atree, foffset);
+ /* End of objectidentifier */
+ }
+ foffset = objectidentification(tvb, ndps_tree, foffset);
+ break;
+ default:
+ break;
+ }
+ return foffset;
+}
+
static void
dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, guint32 ndps_xid, int foffset)
{
@@ -2267,21 +6482,35 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, gui
ndps_req_hash_value *request_value = NULL;
proto_tree *atree;
proto_item *aitem;
- guint8 i;
- guint8 number_of_items=0;
+ proto_tree *btree;
+ proto_item *bitem;
+ proto_tree *ctree;
+ proto_item *citem;
+ guint32 i;
+ guint32 j;
+ guint32 k;
+ guint32 number_of_items=0;
+ guint32 number_of_items2=0;
+ guint32 number_of_items3=0;
+ guint32 length=0;
guint32 ndps_func=0;
guint32 ndps_prog=0;
guint32 error_val=0;
guint32 problem_type=0;
+ guint32 frame_num=0;
+ guint32 field_len=0;
+ guint32 resource_type=0;
+ guint32 qualified_name_type=0;
+ guint32 data_type=0;
if (!pinfo->fd->flags.visited) {
/* Find the conversation whence the request would have come. */
conversation = find_conversation(&pinfo->src, &pinfo->dst,
- PT_NONE, ndps_xid, ndps_xid, 0);
+ PT_NCP, (guint32) pinfo->destport, (guint32) pinfo->destport, 0);
if (conversation != NULL) {
/* find the record telling us the request made that caused
this reply */
- request_value = ndps_hash_lookup(conversation, ndps_xid);
+ request_value = ndps_hash_lookup(conversation, (guint32) pinfo->destport);
p_add_proto_data(pinfo->fd, proto_ndps, (void*) request_value);
}
/* else... we haven't seen an NDPS Request for that conversation. */
@@ -2292,326 +6521,1456 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, gui
if (request_value) {
ndps_prog = request_value->ndps_prog;
ndps_func = request_value->ndps_func;
+ frame_num = request_value->ndps_frame_num;
}
- if (tvb_length_remaining(tvb, foffset) < 12)
+
+ proto_tree_add_uint_format(ndps_tree, hf_ndps_xid, tvb, 0,
+ 0, ndps_xid, "Response to Request in Frame Number: %d", frame_num);
+
+ if (tvb_length_remaining(tvb, foffset) < 12 && tvb_get_ntohl(tvb, foffset) == 0) /* No error and no return data */
{
+ proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, "- Ok");
return;
}
- if(ndps_func != 7 && ndps_func != 4 && ndps_func != 8 )
+ if(ndps_func == 1 || ndps_func == 2)
{
proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_stat, tvb, foffset, 4, FALSE);
foffset += 4;
+ if (tvb_length_remaining(tvb,foffset) < 4 ) {
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "- Error");
+ return;
+ }
proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_results, tvb, foffset, 4, FALSE);
foffset += 4;
+ if (tvb_length_remaining(tvb,foffset) < 4) {
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "- Error");
+ return;
+ }
}
error_val = tvb_get_ntohl(tvb, foffset);
proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
foffset += 4;
- if (error_val == 0) {
- if (check_col(pinfo->cinfo, COL_INFO))
- col_append_str(pinfo->cinfo, COL_INFO, "- Ok");
- switch(ndps_prog)
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_str(pinfo->cinfo, COL_INFO, "- Ok");
+ switch(ndps_prog)
+ {
+ case 0x060976: /* Print */
+ switch(ndps_func)
{
- case 0x060976: /* Print */
- switch(ndps_func)
+ case 0x00000001: /* Bind PSM */
+ proto_tree_add_item(ndps_tree, hf_ndps_oid, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if(error_val != 0)
{
- case 0x00000001: /* Bind PSM */
- break;
- case 0x00000002: /* Bind PA */
- proto_tree_add_item(ndps_tree, hf_ndps_object, tvb, foffset, 4, FALSE);
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ if(tvb_length_remaining(tvb, foffset) < 4)
+ {
+ break;
+ }
+ 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);
- break;
- case 0x00000003: /* Unbind */
- case 0x00000004: /* Print */
- case 0x00000005: /* Modify Job */
- case 0x00000006: /* Cancel Job */
- break;
- case 0x00000007: /* List Object Attributes */
+ }
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "PSM Name");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ break;
+ case 0x00000002: /* Bind PA */
+ proto_tree_add_item(ndps_tree, hf_ndps_oid, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if(error_val != 0)
+ {
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ if(tvb_length_remaining(tvb, foffset) < 4)
+ {
+ break;
+ }
proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
foffset += 4;
- proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
- number_of_items=tvb_get_ntohl(tvb, foffset);
+ }
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ break;
+ case 0x00000003: /* Unbind */
+ break;
+ case 0x00000004: /* Print */
+ foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
+ proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if(error_val != 0)
+ {
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ }
+ break;
+ case 0x00000005: /* Modify Job */
+ case 0x00000006: /* Cancel Job */
+ case 0x00000008: /* Promote Job */
+ case 0x0000000b: /* Resume */
+ case 0x0000000d: /* Create */
+ /* Start of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Attribute Set");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
+ }
+ /* End of AttributeSet */
+ if(error_val != 0)
+ {
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ }
+ break;
+ case 0x00000007: /* List Object Attributes */
+ proto_tree_add_item(ndps_tree, hf_answer_time, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Continuation Option */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Continuation Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items=tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length=tvb_get_ntohl(tvb, foffset);
+ if(tvb_length_remaining(tvb, foffset) < length)
+ {
+ return;
+ }
+ proto_tree_add_item(atree, hf_ndps_item_ptr, tvb, foffset, length, FALSE);
+ foffset += length;
+ }
+ /* Limit Encountered Option */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Limit Encountered Option");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_len, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(atree, hf_limit_enc, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Object Results Set */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Results Set");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items=tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = objectidentification(tvb, atree, foffset);
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ bitem = proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset += 4;
+ foffset = objectidentifier(tvb, btree, foffset);
+ for (j = 1 ; j <= number_of_items2; j++ )
+ {
+ number_of_items3 = tvb_get_ntohl(tvb, foffset);
+ citem = proto_tree_add_item(btree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ ctree = proto_item_add_subtree(citem, ett_ndps);
+ foffset += 4;
+ for (k = 1 ; k <= number_of_items3; k++ )
+ {
+ foffset = attribute_value(tvb, ctree, foffset);
+ }
+ foffset += align_4(tvb, foffset);
+ proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = objectidentifier(tvb, btree, foffset);
+ }
+ foffset += 2;
+ }
+ if(error_val != 0)
+ {
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ }
+ break;
+ case 0x00000009: /* Interrupt */
+ case 0x0000000a: /* Pause */
+ /* Start of NWDPPrtContainedObjectId */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPPrtContainedObjectId */
+ /* Start of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Attribute Set");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
+ }
+ /* End of AttributeSet */
+ if(error_val != 0)
+ {
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ }
+ break;
+ case 0x0000000c: /* Clean */
+ case 0x0000000e: /* Delete */
+ case 0x0000000f: /* Disable PA */
+ case 0x00000010: /* Enable PA */
+ case 0x00000012: /* Set */
+ case 0x00000013: /* Shutdown PA */
+ case 0x00000014: /* Startup PA */
+ case 0x00000018: /* Transfer Data */
+ case 0x00000019: /* Device Control */
+ case 0x0000001b: /* Remove Event Profile */
+ case 0x0000001c: /* Modify Event Profile */
+ case 0x0000001e: /* Shutdown PSM */
+ case 0x0000001f: /* Cancel PSM Shutdown */
+ case 0x00000020: /* Set Printer DS Information */
+ case 0x00000021: /* Clean User Jobs */
+ if(error_val != 0)
+ {
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ }
+ break;
+ case 0x00000011: /* Resubmit Jobs */
+ number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of ResubmitJob Set */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Resubmit Job");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ /* Start of NWDPPrtContainedObjectId */
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Old Job");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset);
+ proto_tree_add_item(btree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPPrtContainedObjectId */
+ /* Start of NWDPPrtContainedObjectId */
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "New Job");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset);
+ proto_tree_add_item(btree, hf_local_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPPrtContainedObjectId */
+ /* Start of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Job Status");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ proto_tree_add_item(btree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
foffset += 4;
for (i = 1 ; i <= number_of_items; i++ )
{
- foffset += 1;
+ foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
}
- foffset += align_4(tvb, foffset);
+ /* End of AttributeSet */
+ } /* End of ResubmitJob Set */
+ if(error_val != 0)
+ {
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ }
+ break;
+ case 0x00000015: /* Reorder Job */
+ /* Start of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job Status");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
+ }
+ /* End of AttributeSet */
+ if(error_val != 0)
+ {
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ }
+ break;
+ case 0x00000016: /* Pause PA */
+ case 0x00000017: /* Resume PA */
+ /* Start of AttributeSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Printer Status");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
+ }
+ /* End of AttributeSet */
+ if(error_val != 0)
+ {
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ }
+ break;
+ case 0x0000001a: /* Add Event Profile */
+ proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if(error_val != 0)
+ {
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ }
+ break;
+ case 0x0000001d: /* List Event Profiles */
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ /* Start of Eventhandling */
+ proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Consumer Name");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Delivery Address");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset += address_item(tvb, atree, foffset);
+ }
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
foffset += 4;
- proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
+ foffset = objectidentifier(tvb, atree, foffset);
+ foffset = objectidentification(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
foffset += 4;
- foffset = objectident(tvb, ndps_tree, foffset);
- foffset = attribute_value(tvb, ndps_tree, foffset);
- proto_tree_add_item(ndps_tree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
+
+ proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
foffset += 4;
- /*foffset = attribute_value(tvb, ndps_tree, foffset);
- proto_tree_add_item(ndps_tree, hf_ndps_scope, tvb, foffset, 4, FALSE);
+ if(tvb_get_ntohl(tvb, foffset-4)==1)
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ else
+ {
+ if(tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items2; j++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ }
+ }
+ }
+ /* End of Eventhandling */
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
+ foffset += length;
+ if(error_val != 0)
+ {
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ }
+ break;
+ case 0x00000022: /* Map GUID to NDS Name */
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "NDS Printer Name");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ if(error_val != 0)
+ {
+ foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+ case 0x060977: /* Broker */
+ switch(ndps_func)
+ {
+ case 0x00000001: /* Bind */
+ case 0x00000002: /* Unbind */
+ case 0x00000004: /* Enable Service */
+ case 0x00000005: /* Disable Service */
+ case 0x00000006: /* Down Broker */
+ /* Start of NWDPBrokerReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPBrokerReturnCode */
+ break;
+ case 0x00000003: /* List Services */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ bitem = proto_tree_add_item(atree, hf_ndps_service_type, tvb, foffset, 4, FALSE);
+ btree = proto_item_add_subtree(bitem, ett_ndps);
foffset += 4;
- foffset = objectident(tvb, ndps_tree, foffset);*/
- break;
- case 0x00000008: /* Promote Job */
- case 0x00000009: /* Interrupt */
- case 0x0000000a: /* Pause */
- case 0x0000000b: /* Resume */
- case 0x0000000c: /* Clean */
- case 0x0000000d: /* Create */
- case 0x0000000e: /* Delete */
- case 0x0000000f: /* Disable PA */
- case 0x00000010: /* Enable PA */
- case 0x00000011: /* Resubmit Jobs */
- case 0x00000012: /* Set */
- case 0x00000013: /* Shutdown PA */
- case 0x00000014: /* Startup PA */
- case 0x00000015: /* Reorder Job */
- case 0x00000016: /* Pause PA */
- case 0x00000017: /* Resume PA */
- case 0x00000018: /* Transfer Data */
- case 0x00000019: /* Device Control */
- case 0x0000001a: /* Add Event Profile */
- case 0x0000001b: /* Remove Event Profile */
- case 0x0000001c: /* Modify Event Profile */
- case 0x0000001d: /* List Event Profiles */
- case 0x0000001e: /* Shutdown PSM */
- case 0x0000001f: /* Cancel PSM Shutdown */
- case 0x00000020: /* Set Printer DS Information */
- case 0x00000021: /* Clean User Jobs */
- case 0x00000022: /* Map GUID to NDS Name */
- default:
+ proto_tree_add_item(btree, hf_ndps_service_enabled, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ /* Start of NWDPBrokerReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPBrokerReturnCode */
+ break;
+ case 0x00000007: /* Get Broker NDS Object Name */
+ proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
+ 4, FALSE);
+ foffset += 4;
+ foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
+ /* Start of NWDPBrokerReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
break;
}
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPBrokerReturnCode */
+ break;
+ case 0x00000008: /* Get Broker Session Information */
+ default:
break;
- case 0x060977: /* Broker */
- switch(ndps_func)
+ }
+ break;
+ case 0x060978: /* Registry */
+ switch(ndps_func)
+ {
+ case 0x00000001: /* Bind */
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_attribute_set, tvb, foffset, length, FALSE);
+ }
+ /* Start of NWDPRegReturnCode */
+ /*proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
{
- case 0x00000001: /* Bind */
- case 0x00000002: /* Unbind */
- case 0x00000003: /* List Services */
- case 0x00000004: /* Enable Service */
- case 0x00000005: /* Disable Service */
- case 0x00000006: /* Down Broker */
- case 0x00000007: /* Get Broker NDS Object Name */
- case 0x00000008: /* Get Broker Session Information */
- default:
break;
}
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;*/
+ /* End of NWDPRegReturnCode */
+ break;
+ case 0x00000002: /* Unbind */
+ /* NoOp */
break;
- case 0x060978: /* Registry */
- switch(ndps_func)
+ case 0x00000003: /* Register Server */
+ case 0x00000004: /* Deregister Server */
+ case 0x00000005: /* Register Registry */
+ case 0x00000006: /* Deregister Registry */
+ case 0x00000007: /* Registry Update */
+ /* Start of NWDPRegReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
{
- case 0x00000001: /* Bind */
- case 0x00000002: /* Unbind */
- case 0x00000003: /* Register Server */
- case 0x00000004: /* Deregister Server */
- case 0x00000005: /* Register Registry */
- case 0x00000006: /* Deregister Registry */
- case 0x00000007: /* Registry Update */
- case 0x00000008: /* List Local Servers */
- case 0x00000009: /* List Servers */
- case 0x0000000a: /* List Known Registries */
- case 0x0000000b: /* Get Registry NDS Object Name */
- case 0x0000000c: /* Get Registry Session Information */
- default:
break;
}
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPRegReturnCode */
break;
- case 0x060979: /* Notify */
- switch(ndps_func)
- {
- case 0x00000001: /* Notify Bind */
- case 0x00000002: /* Notify Unbind */
- case 0x00000003: /* Register Supplier */
- case 0x00000004: /* Deregister Supplier */
- case 0x00000005: /* Add Profile */
- case 0x00000006: /* Remove Profile */
- case 0x00000007: /* Modify Profile */
- case 0x00000008: /* List Profiles */
- case 0x00000009: /* Report Event */
- case 0x0000000a: /* List Supported Languages */
- case 0x0000000b: /* Report Notification */
- case 0x0000000c: /* Add Delivery Method */
- case 0x0000000d: /* Remove Delivery Method */
- case 0x0000000e: /* List Delivery Methods */
- case 0x0000000f: /* Get Delivery Method Information */
- case 0x00000010: /* Get Notify NDS Object Name */
- case 0x00000011: /* Get Notify Session Information */
- default:
+ case 0x00000008: /* List Local Servers */
+ case 0x00000009: /* List Servers */
+ 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++ )
+ {
+ /* Start of Server Entry */
+ foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_server_type, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ foffset = print_address(tvb, atree, foffset);
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Server Info");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_item(btree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items2; j++ )
+ {
+ 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)
+ {
+ case 0: /* Int8 */
+ proto_tree_add_item(btree, hf_info_int, tvb, foffset, 1, FALSE);
+ foffset++;
+ break;
+ case 1: /* Int16 */
+ proto_tree_add_item(btree, hf_info_int16, tvb, foffset, 2, FALSE);
+ foffset += 2;
+ break;
+ case 2: /* Int32 */
+ proto_tree_add_item(btree, hf_info_int32, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 3: /* Boolean */
+ proto_tree_add_item(btree, hf_info_boolean, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 4: /* String */
+ case 5: /* Bytes */
+ foffset = ndps_string(tvb, hf_info_string, btree, foffset);
+ break;
+ /*length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(btree, hf_info_bytes, tvb, foffset, length, FALSE);
+ foffset += length;
+ foffset += (length%4);*/
+ break;
+ default:
+ break;
+ }
+ }
+ /* End of Server Entry */
+ }
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
+ foffset += length;
+ /* Start of NWDPRegReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
break;
}
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPRegReturnCode */
break;
- case 0x06097a: /* Resman */
- switch(ndps_func)
+ case 0x0000000a: /* List Known Registries */
+ 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);
+ foffset = print_address(tvb, atree, foffset);
+ }
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
+ foffset += length;
+ /* Start of NWDPRegReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
{
- case 0x00000001: /* Bind */
break;
- case 0x00000002: /* Unbind */
- case 0x00000003: /* Add Resource File */
- case 0x00000004: /* Delete Resource File */
- case 0x00000005: /* List Resources */
- case 0x00000006: /* Get Resource File */
- case 0x00000007: /* Get Resource File Data */
- case 0x00000008: /* Get Resource Manager NDS Object Name */
- case 0x00000009: /* Get Resource Manager Session Information */
- default:
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPRegReturnCode */
+ break;
+ case 0x0000000b: /* Get Registry NDS Object Name */
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "NDS Printer Name");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ /* Start of NWDPRegReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
break;
}
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPRegReturnCode */
break;
- case 0x06097b: /* Delivery */
- switch(ndps_func)
+ case 0x0000000c: /* Get Registry Session Information */
+ proto_tree_add_item(ndps_tree, hf_ndps_session_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NWDPRegReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
{
- case 0x00000001: /* Delivery Bind */
- case 0x00000002: /* Delivery Unbind */
- case 0x00000003: /* Delivery Send */
- case 0x00000004: /* Delivery Send2 */
- default:
break;
}
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPRegReturnCode */
break;
default:
break;
}
- }
- else
- {
- if (check_col(pinfo->cinfo, COL_INFO))
- col_append_str(pinfo->cinfo, COL_INFO, "- Error");
- problem_type = tvb_get_ntohl(tvb, foffset);
- proto_tree_add_item(ndps_tree, hf_ndps_problem_type, tvb, foffset, 4, FALSE);
- foffset += 4;
- proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
- foffset += 4;
- switch(problem_type)
+ break;
+ case 0x060979: /* Notify */
+ switch(ndps_func)
{
- case 0: /* Security Error */
- proto_tree_add_item(ndps_tree, hf_security_problem_type, tvb, foffset, 4, FALSE);
+ case 0x00000001: /* Notify Bind */
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
foffset += 4;
- foffset = objectident(tvb, ndps_tree, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_attribute_set, tvb, foffset, length, FALSE);
+ }
+ /* Start of NWDPNotifyReturnCode */
+ /*proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;*/
+ /* End of NWDPNotifyReturnCode */
break;
- case 1: /* Service Error */
- proto_tree_add_item(ndps_tree, hf_service_problem_type, tvb, foffset, 4, FALSE);
+ case 0x00000002: /* Notify Unbind */
+ /* NoOp */
+ break;
+ case 0x00000003: /* Register Supplier */
+ proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
foffset += 4;
- proto_tree_add_item(ndps_tree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- foffset += 8;
- if (tvb_get_ntohl(tvb, foffset-4) != 0) {
- foffset = objectident(tvb, ndps_tree, foffset);
+ /* Start of EventObjectSet */
+ length = tvb_get_ntohl(tvb, foffset); /* Len of record */
+ if (length > 0)
+ {
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of objectidentifier */
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Class ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentifier(tvb, btree, foffset);
+ /* End of objectidentifier */
+ /* Start of objectidentification */
+ bitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentification(tvb, btree, foffset);
+ /* End of objectidentification */
+ proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of ObjectItem */
+ proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if(tvb_get_ntohl(tvb, foffset-4)==1)
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ else
+ {
+ if(tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items; j++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ }
+ }
+ /* End of ObjectItem */
}
- proto_tree_add_item(ndps_tree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
+ /* End of EventObjectSet */
+ /* Start of NWDPNotifyReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
foffset += 4;
- proto_tree_add_item(ndps_tree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
foffset += 4;
- proto_tree_add_item(ndps_tree, hf_ndps_lib_error, tvb, foffset, 4, FALSE);
+ /* End of NWDPNotifyReturnCode */
+ break;
+ case 0x00000004: /* Deregister Supplier */
+ case 0x0000000b: /* Report Notification */
+ case 0x0000000d: /* Remove Delivery Method */
+ /* Start of NWDPNotifyReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
foffset += 4;
- proto_tree_add_item(ndps_tree, hf_ndps_other_error, tvb, foffset, 4, FALSE);
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
foffset += 4;
- proto_tree_add_item(ndps_tree, hf_ndps_other_error_2, tvb, foffset, 4, FALSE);
+ /* End of NWDPNotifyReturnCode */
+ break;
+ case 0x00000005: /* Add Profile */
+ proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of EventObjectSet */
+ length = tvb_get_ntohl(tvb, foffset); /* Len of record */
+ if (length > 0)
+ {
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of objectidentifier */
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Class ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentifier(tvb, btree, foffset);
+ /* End of objectidentifier */
+ /* Start of objectidentification */
+ bitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentification(tvb, btree, foffset);
+ /* End of objectidentification */
+ proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of ObjectItem */
+ proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if(tvb_get_ntohl(tvb, foffset-4)==1)
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ else
+ {
+ if(tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items; j++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ }
+ }
+ /* End of ObjectItem */
+ }
+ /* End of EventObjectSet */
+ /* Start of NWDPNotifyReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPNotifyReturnCode */
break;
- case 2: /* Access Error */
- proto_tree_add_item(ndps_tree, hf_access_problem_type, tvb, foffset, 4, FALSE);
+ case 0x00000006: /* Remove Profile */
+ case 0x00000007: /* Modify Profile */
+ case 0x00000009: /* Report Event */
+ /* Start of EventObjectSet */
+ length = tvb_get_ntohl(tvb, foffset); /* Len of record */
+ if (length > 0)
+ {
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of objectidentifier */
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Class ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentifier(tvb, btree, foffset);
+ /* End of objectidentifier */
+ /* Start of objectidentification */
+ bitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = objectidentification(tvb, btree, foffset);
+ /* End of objectidentification */
+ proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of ObjectItem */
+ proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if(tvb_get_ntohl(tvb, foffset-4)==1)
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ else
+ {
+ if(tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items; j++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ }
+ }
+ /* End of ObjectItem */
+ }
+ /* End of EventObjectSet */
+ /* Start of NWDPNotifyReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
foffset += 4;
- proto_tree_add_item(ndps_tree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- if (foffset > tvb_length_remaining(tvb, foffset)) {
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
break;
}
- foffset += 4;
- foffset = objectident(tvb, ndps_tree, foffset);
- if (foffset > tvb_length_remaining(tvb, foffset)) {
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPNotifyReturnCode */
+ break;
+ case 0x00000008: /* List Profiles */
+ /* Start of ProfileResultSet */
+ proto_tree_add_item(ndps_tree, hf_ndps_len, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of Eventhandling */
+ proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of QualifiedName */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Consumer Name");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
+ }
+ }
+ /* End of QualifiedName */
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
+ foffset += length;
+ proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Delivery Address");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset += address_item(tvb, atree, foffset);
+ }
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ foffset = objectidentifier(tvb, atree, foffset);
+ foffset = objectidentification(tvb, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
+ foffset += 4;
+
+ proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if(tvb_get_ntohl(tvb, foffset-4)==1)
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ else
+ {
+ if(tvb_get_ntohl(tvb, foffset-4)==0)
+ {
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
+ foffset += 4;
+ for (j = 1 ; j <= number_of_items2; j++ )
+ {
+ foffset = objectidentifier(tvb, atree, foffset);
+ }
+ }
+ }
+ }
+ /* End of Eventhandling */
+ /* End of ProfileResultSet */
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
+ foffset += length;
+ /* Start of NWDPNotifyReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
break;
}
- proto_tree_add_item(ndps_tree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
- foffset = ndps_string(tvb, hf_local_object_name, ndps_tree, foffset);
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPNotifyReturnCode */
break;
- case 3: /* Printer Error */
- proto_tree_add_item(ndps_tree, hf_printer_problem_type, tvb, foffset, 4, FALSE);
+ case 0x0000000a: /* List Supported Languages */
+ /* Start of IntegerSeq */
+ length = tvb_get_ntohl(tvb, foffset);
foffset += 4;
- foffset = objectident(tvb, ndps_tree, foffset);
- if (foffset > tvb_length_remaining(tvb, foffset)) {
+ proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, length, FALSE);
+ foffset += length;
+ /* End of IntegerSeq */
+ /* Start of NWDPNotifyReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
break;
}
- proto_tree_add_item(ndps_tree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, ndps_tree, foffset);
+ /* End of NWDPNotifyReturnCode */
break;
- case 4: /* Selection Error */
- proto_tree_add_item(ndps_tree, hf_selection_problem_type, tvb, foffset, 4, FALSE);
+ case 0x0000000c: /* Add Delivery Method */
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset = name_or_id(tvb, atree, foffset);
+ /* End of NameorID */
+ /* Start of NWDPNotifyReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
foffset += 4;
- foffset = objectident(tvb, ndps_tree, foffset);
- /*if (foffset > tvb_length_remaining(tvb, foffset)) {
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
break;
}
- proto_tree_add_item(ndps_tree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset);*/ /* Need to decode later */
- /*if (foffset > tvb_length_remaining(tvb, foffset)) {
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPNotifyReturnCode */
+ break;
+ case 0x0000000e: /* List Delivery Methods */
+ /* Start of DeliveryMethodSet */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ /* Start of DeliveryMethod */
+ /* Start of NameorID */
+ bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Method ID");
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset = name_or_id(tvb, btree, foffset);
+ foffset += align_4(tvb, foffset);
+ /* End of NameorID */
+ foffset = ndps_string(tvb, hf_ndps_method_name, btree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_method_ver, btree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_file_name, btree, foffset);
+ proto_tree_add_item(btree, hf_ndps_admin_submit, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of DeliveryMethod */
+ }
+ /* End of DeliveryMethodSet */
+ /* Start of NWDPNotifyReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
break;
}
- foffset += 4;
- proto_tree_add_item(ndps_tree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, ndps_tree, foffset); */
+ /* End of NWDPNotifyReturnCode */
break;
- case 5: /* Document Access Error */
- proto_tree_add_item(ndps_tree, hf_doc_access_problem_type, tvb, foffset, 4, FALSE);
- foffset = objectident(tvb, ndps_tree, foffset);
- if (foffset > tvb_length_remaining(tvb, foffset)) {
+ case 0x0000000f: /* Get Delivery Method Information */
+ /* Start of DeliveryMethod */
+ /* Start of NameorID */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
+ 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);
+ foffset = ndps_string(tvb, hf_ndps_method_ver, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_file_name, atree, foffset);
+ proto_tree_add_item(atree, hf_ndps_admin_submit, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of DeliveryMethod */
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Delivery Address");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset += address_item(tvb, atree, foffset);
+ }
+ /* Start of NWDPNotifyReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
break;
}
- proto_tree_add_item(ndps_tree, hf_ndps_nameorid, tvb, foffset,
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPNotifyReturnCode */
+ break;
+ case 0x00000010: /* Get Notify NDS Object Name */
+ proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
4, FALSE);
foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
+ /* Start of NWDPNotifyReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPNotifyReturnCode */
break;
- case 6: /* Attribute Error */
- proto_tree_add_item(ndps_tree, hf_attribute_problem_type, tvb, foffset, 4, FALSE);
+ case 0x00000011: /* Get Notify Session Information */
+ proto_tree_add_item(ndps_tree, hf_ndps_get_session_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NWDPNotifyReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPNotifyReturnCode */
+ break;
+ default:
+ break;
+ }
+ break;
+ case 0x06097a: /* Resman */
+ switch(ndps_func)
+ {
+ case 0x00000001: /* Bind */
aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
atree = proto_item_add_subtree(aitem, ett_ndps);
foffset += 4;
for (i = 1 ; i <= number_of_items; i++ )
{
- proto_tree_add_item(atree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- if (foffset > tvb_length_remaining(tvb, foffset)) {
- break;
+ length = tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_attribute_set, tvb, foffset, length, FALSE);
+ }
+ /* Start of NWDPResManReturnCode */
+ /*proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;*/
+ /* End of NWDPResManReturnCode */
+ break;
+ case 0x00000002: /* Unbind */
+ /* NoOp */
+ break;
+ case 0x00000003: /* Add Resource File */
+ case 0x00000004: /* Delete Resource File */
+ /* Start of NWDPResManReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPResManReturnCode */
+ break;
+ case 0x00000005: /* List Resources */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) != 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_status_flags, 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)
+ {
+ case 0: /* Print Drivers */
+ case 1: /* Printer Definitions */
+ case 2: /* Printer Definitions Short */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ if (tvb_get_ntohl(tvb, foffset)==0) { /* Offset for old type support */
+ foffset += 2;
+ }
+ foffset += 4; /* Item always == 1 */
+ foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset);
+ if (tvb_get_ntohl(tvb, foffset)==0) {
+ foffset += 2;
+ }
+ foffset += 4;
+ foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset);
+ if (tvb_get_ntohl(tvb, foffset)==0) {
+ foffset += 2;
+ }
+ foffset += 4;
+ foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset);
}
- foffset += 4;
- proto_tree_add_item(atree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
+ break;
+ case 3: /* Banner Page Files */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = ndps_string(tvb, hf_ndps_banner_name, atree, foffset);
+ }
+ break;
+ case 4: /* Font Types */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = ndps_string(tvb, hf_font_type_name, atree, foffset);
+ }
+ break;
+ case 7: /* Font Files */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = ndps_string(tvb, hf_font_file_name, atree, foffset);
+ }
+ break;
+ case 5: /* Printer Driver Files */
+ case 12: /* Printer Driver Files 2 */
+ case 9: /* Generic Files */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset);
+ }
+ break;
+ case 6: /* Printer Definition File */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset);
+ }
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = ndps_string(tvb, hf_ndps_def_file_name, btree, foffset);
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ citem = proto_tree_add_item(btree, hf_ndps_win31_items, tvb, foffset, 4, FALSE);
+ ctree = proto_item_add_subtree(citem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items2; i++ )
+ {
+ foffset = ndps_string(tvb, hf_ndps_windows_key, ctree, foffset);
+ }
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ citem = proto_tree_add_item(btree, hf_ndps_win95_items, tvb, foffset, 4, FALSE);
+ ctree = proto_item_add_subtree(citem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items2; i++ )
+ {
+ foffset = ndps_string(tvb, hf_ndps_windows_key, ctree, foffset);
+ }
+ }
+ break;
+ case 10: /* Printer Definition File 2 */
+ foffset = ndps_string(tvb, hf_ndps_def_file_name, ndps_tree, foffset);
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ number_of_items2 = tvb_get_ntohl(tvb, foffset);
+ bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ btree = proto_item_add_subtree(bitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items2; i++ )
+ {
+ foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset);
+ }
+ }
+ break;
+ case 8: /* Generic Type */
+ case 11: /* Printer Driver Types 2 */
+ case 13: /* Printer Driver Types Archive */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset);
+ 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;
+ }
+ break;
+ case 14: /* Languages Available */
+ number_of_items = tvb_get_ntohl(tvb, foffset);
+ aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ atree = proto_item_add_subtree(aitem, ett_ndps);
foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, atree, foffset);
- foffset = objectident(tvb, atree, foffset);
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ }
+ break;
+ default:
+ break;
}
break;
- case 7: /* Update Error */
- proto_tree_add_item(ndps_tree, hf_update_problem_type, tvb, foffset, 4, FALSE);
- proto_tree_add_item(ndps_tree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
- foffset += tvb_get_ntohl(tvb, foffset); /* Need to decode later */
- if (foffset > tvb_length_remaining(tvb, foffset)) {
+ case 0x00000006: /* Get Resource File */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) != 0)
+ {
break;
}
- foffset += 4;
- foffset = objectident(tvb, ndps_tree, foffset);
- if (foffset > tvb_length_remaining(tvb, foffset)) {
+ proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset, -1, FALSE);
+ break;
+ case 0x00000007: /* Get Resource File Date */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) != 0)
+ {
break;
}
- proto_tree_add_item(ndps_tree, hf_ndps_nameorid, tvb, foffset,
- 4, FALSE);
+ proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 0x00000008: /* Get Resource Manager NDS Object Name */
+ qualified_name_type = tvb_get_ntohl(tvb, foffset);
+ proto_tree_add_uint(ndps_tree, hf_ndps_qualified_name, tvb, foffset,
+ 4, qualified_name_type);
+ foffset += 4;
+ if (qualified_name_type != 0) {
+ if (qualified_name_type == 1) {
+ foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset);
+ }
+ else
+ {
+ foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset);
+ foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
+ }
+ }
+ proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
+ foffset += 4;
+ break;
+ case 0x00000009: /* Get Resource Manager Session Information */
+ proto_tree_add_item(ndps_tree, hf_ndps_get_resman_session_type, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* Start of NWDPResManReturnCode */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) == 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ /* End of NWDPResManReturnCode */
+ break;
+ case 0x0000000a: /* Set Resource Language Context */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) != 0)
+ {
+ break;
+ }
+ proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
foffset += 4;
- foffset = ndps_string(tvb, hf_local_object_name, ndps_tree, foffset);
break;
default:
break;
}
+ break;
+ case 0x06097b: /* Delivery */
+ switch(ndps_func)
+ {
+ case 0x00000001: /* Delivery Bind */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ break;
+ case 0x00000002: /* Delivery Unbind */
+ /* NoOp */
+ break;
+ case 0x00000003: /* Delivery Send */
+ case 0x00000004: /* Delivery Send2 */
+ proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
+ foffset += 4;
+ if (tvb_get_ntohl(tvb, foffset-4) != 0)
+ {
+ break;
+ }
+ aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Failed Items");
+ atree = proto_item_add_subtree(aitem, ett_ndps);
+ proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
+ number_of_items=tvb_get_ntohl(tvb, foffset);
+ foffset += 4;
+ for (i = 1 ; i <= number_of_items; i++ )
+ {
+ length=tvb_get_ntohl(tvb, foffset);
+ if(tvb_length_remaining(tvb, foffset) < length)
+ {
+ return;
+ }
+ proto_tree_add_item(atree, hf_ndps_item_ptr, tvb, foffset, length, FALSE);
+ foffset += length;
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
}
- proto_tree_add_uint_format(ndps_tree, hf_ndps_xid, tvb, 0,
- 0, ndps_xid, "This is a Reply Packet, XID %08x, Prog %08x, Func %08x", ndps_xid, ndps_prog, ndps_func);
return;
}
@@ -2693,6 +8052,16 @@ proto_register_ndps(void)
FT_UINT32, BASE_DEC, NULL, 0x0,
"Number of Items", HFILL }},
+ { &hf_ndps_objects,
+ { "Number of Objects", "ndps.objects",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Number of Obejcts", HFILL }},
+
+ { &hf_ndps_attributes,
+ { "Number of Attributes", "ndps.attributes",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Number of Attributes", HFILL }},
+
{ &hf_ndps_sbuffer,
{ "Server", "ndps.sbuffer",
FT_UINT32, BASE_DEC, NULL, 0x0,
@@ -2703,13 +8072,18 @@ proto_register_ndps(void)
FT_UINT32, BASE_DEC, NULL, 0x0,
"Connection", HFILL }},
- { &hf_ndps_pa_name,
- { "Trustee Name", "ndps.pa_name",
+ { &hf_ndps_user_name,
+ { "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,
+ "Broker Name", HFILL }},
- { &hf_ndps_context,
- { "Printer Name", "ndps.context",
+ { &hf_ndps_pa_name,
+ { "Printer Name", "ndps.pa_name",
FT_STRING, BASE_NONE, NULL, 0x0,
"Printer Name", HFILL }},
@@ -2720,7 +8094,7 @@ proto_register_ndps(void)
{ &hf_ndps_error_val,
{ "Return Status", "ndps.error_val",
- FT_UINT32, BASE_HEX, NULL, 0x0,
+ FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
"Return Status", HFILL }},
{ &hf_ndps_object,
@@ -2744,9 +8118,9 @@ proto_register_ndps(void)
"Connection", HFILL }},
{ &hf_ndps_ext_error,
- { "Extended Return Status", "ndps.ext_error",
+ { "Extended Error Code", "ndps.ext_error",
FT_UINT32, BASE_HEX, NULL, 0x0,
- "Extended Return Status", HFILL }},
+ "Extended Error Code", HFILL }},
{ &hf_ndps_auth_null,
{ "Auth Null", "ndps.auth_null",
@@ -2825,7 +8199,7 @@ proto_register_ndps(void)
{ &hf_oid_struct_size,
{ "OID Struct Size", "ndps.rpc_oid_struct_size",
- FT_UINT32, BASE_HEX, NULL, 0x0,
+ FT_UINT16, BASE_HEX, NULL, 0x0,
"OID Struct Size", HFILL }},
{ &hf_object_name,
@@ -2858,9 +8232,15 @@ proto_register_ndps(void)
FT_UINT32, BASE_HEX, VALS(qualified_name_enum), 0x0,
"Qualified Name Type", HFILL }},
+ { &hf_ndps_qualified_name2,
+ { "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_HEX, NULL, 0x0,
+ FT_UINT32, BASE_DEC, NULL, 0x0,
"Number of Items", HFILL }},
{ &hf_ndps_qualifier,
@@ -2884,9 +8264,9 @@ proto_register_ndps(void)
"Other Error 2", HFILL }},
{ &hf_ndps_session,
- { "Session", "ndps.ndps_session",
+ { "Session Handle", "ndps.ndps_session",
FT_UINT32, BASE_HEX, NULL, 0x0,
- "Session", HFILL }},
+ "Session Handle", HFILL }},
{ &hf_ndps_abort_flag,
{ "Abort?", "ndps.ndps_abort",
@@ -3019,7 +8399,7 @@ proto_register_ndps(void)
"Persistence", HFILL }},
{ &hf_ndps_language_id,
- { "Lanuage ID", "ndps.ndps_lang_id",
+ { "Language ID", "ndps.ndps_lang_id",
FT_UINT32, BASE_HEX, NULL, 0x0,
"Language ID", HFILL }},
@@ -3035,7 +8415,7 @@ proto_register_ndps(void)
{ &hf_ndps_add_bytes,
{ "Address Bytes", "ndps.add_bytes",
- FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
+ FT_BYTES, BASE_NONE, NULL, 0x0,
"Address Bytes", HFILL }},
{ &hf_ndps_event_type,
@@ -3050,19 +8430,692 @@ proto_register_ndps(void)
{ &hf_ndps_octet_string,
{ "Octet String", "ndps.octet_string",
- FT_UINT_BYTES, BASE_NONE, NULL, 0x0,
+ FT_BYTES, BASE_NONE, NULL, 0x0,
"Octet String", HFILL }},
{ &hf_ndps_scope,
{ "Scope", "ndps.scope",
FT_UINT32, BASE_HEX, NULL, 0x0,
"Scope", HFILL }},
+
+ { &hf_address_len,
+ { "Address Length", "ndps.addr_len",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Address Length", HFILL }},
+
+ { &hf_ndps_net,
+ { "IPX Network", "ndps.net",
+ FT_IPXNET, BASE_NONE, NULL, 0x0,
+ "Scope", HFILL }},
+
+ { &hf_ndps_node,
+ { "Node", "ndps.node",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ "Node", HFILL }},
+
+ { &hf_ndps_socket,
+ { "IPX Socket", "ndps.socket",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ "IPX Socket", HFILL }},
+
+ { &hf_ndps_port,
+ { "IP Port", "ndps.port",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "IP Port", HFILL }},
+
+ { &hf_ndps_ip,
+ { "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,
+ "NDPS Server Type", 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,
+ "Service Enabled?", HFILL }},
+
+ { &hf_ndps_method_name,
+ { "Method Name", "ndps.method_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Method Name", HFILL }},
+
+ { &hf_ndps_method_ver,
+ { "Method Version", "ndps.method_ver",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Method Version", HFILL }},
+
+ { &hf_ndps_file_name,
+ { "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,
+ "Admin Submit Flag?", HFILL }},
+
+ { &hf_ndps_oid,
+ { "Object ID", "ndps.oid",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Object ID", HFILL }},
+
+ { &hf_ndps_object_op,
+ { "Operation", "ndps.ndps_object_op",
+ FT_UINT32, BASE_HEX, VALS(ndps_object_op_enum), 0x0,
+ "Operation", HFILL }},
+
+ { &hf_answer_time,
+ { "Answer Time", "ndps.answer_time",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Answer Time", HFILL }},
+
+ { &hf_oid_asn1_type,
+ { "ASN1 Type", "ndps.asn1_type",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "ASN1 Type", HFILL }},
+
+ { &hf_ndps_item_ptr,
+ { "Item Pointer", "ndps.item_ptr",
+ FT_BYTES, BASE_DEC, NULL, 0x0,
+ "Item Pointer", HFILL }},
+
+ { &hf_ndps_len,
+ { "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_type,
+ { "Delivery Address Type", "ndps.ndps_delivery_add_type",
+ FT_UINT32, BASE_HEX, VALS(ndps_delivery_add_enum), 0x0,
+ "Delivery Address Type", HFILL }},
+
+ { &hf_ndps_criterion_type,
+ { "Criterion Type", "ndps.ndps_criterion_type",
+ FT_UINT32, BASE_HEX, VALS(ndps_attribute_enum), 0x0,
+ "Criterion Type", HFILL }},
+
+ { &hf_ndps_ignored_type,
+ { "Ignored Type", "ndps.ndps_ignored_type",
+ FT_UINT32, BASE_HEX, VALS(ndps_attribute_enum), 0x0,
+ "Ignored Type", HFILL }},
+
+ { &hf_ndps_resource_type,
+ { "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,
+ "Identifier Type", HFILL }},
+
+ { &hf_ndps_page_flag,
+ { "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,
+ "Media Type", HFILL }},
+
+ { &hf_ndps_page_size,
+ { "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,
+ "Page Order", HFILL }},
+
+ { &hf_ndps_medium_size,
+ { "Medium Size", "ndps.ndps_medium_size",
+ FT_UINT32, BASE_HEX, VALS(ndps_medium_size_enum), 0x0,
+ "Medium Size", HFILL }},
+
+ { &hf_ndps_long_edge_feeds,
+ { "Long Edge Feeds?", "ndps.ndps_long_edge_feeds",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "Long Edge Feeds?", HFILL }},
+
+ { &hf_ndps_inc_across_feed,
+ { "Increment Across Feed", "ndps.inc_across_feed",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Increment Across Feed", HFILL }},
+
+ { &hf_ndps_size_inc_in_feed,
+ { "Size Increment in Feed", "ndps.size_inc_in_feed",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Size Increment in Feed", HFILL }},
+ { &hf_ndps_page_orientation,
+ { "Page Orientation", "ndps.ndps_page_orientation",
+ FT_UINT32, BASE_HEX, VALS(ndps_page_orientation_enum), 0x0,
+ "Page Orientation", HFILL }},
+
+ { &hf_ndps_numbers_up,
+ { "Numbers Up", "ndps.ndps_numbers_up",
+ FT_UINT32, BASE_HEX, VALS(ndps_numbers_up_enum), 0x0,
+ "Numbers Up", HFILL }},
+
+ { &hf_ndps_xdimension,
+ { "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,
+ "State Severity", HFILL }},
+
+ { &hf_ndps_training,
+ { "Training", "ndps.ndps_training",
+ FT_UINT32, BASE_HEX, VALS(ndps_training_enum), 0x0,
+ "Training", HFILL }},
+
+ { &hf_ndps_colorant_set,
+ { "Colorant Set", "ndps.ndps_colorant_set",
+ FT_UINT32, BASE_HEX, VALS(ndps_colorant_set_enum), 0x0,
+ "Colorant Set", HFILL }},
+
+ { &hf_ndps_card_enum_time,
+ { "Cardinal, Enum, or Time", "ndps.ndps_card_enum_time",
+ FT_UINT32, BASE_HEX, VALS(ndps_card_enum_time_enum), 0x0,
+ "Cardinal, Enum, or Time", HFILL }},
+
+ { &hf_ndps_attrs_arg,
+ { "List Attribute Operation", "ndps.ndps_attrs_arg",
+ FT_UINT32, BASE_HEX, VALS(ndps_attrs_arg_enum), 0x0,
+ "List Attribute Operation", HFILL }},
+
+ { &hf_ndps_context,
+ { "Context", "ndps.context",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Context", HFILL }},
+
+ { &hf_ndps_filter,
+ { "Filter Type", "ndps.ndps_filter",
+ FT_UINT32, BASE_HEX, VALS(ndps_filter_enum), 0x0,
+ "Filter Type", HFILL }},
+
+ { &hf_ndps_item_filter,
+ { "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,
+ "Substring Match", HFILL }},
+
+ { &hf_ndps_time_limit,
+ { "Time Limit", "ndps.ndps_time_limit",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Time Limit", HFILL }},
+
+ { &hf_ndps_count_limit,
+ { "Count Limit", "ndps.ndps_count_limit",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Count Limit", HFILL }},
+
+ { &hf_ndps_operator,
+ { "Operator Type", "ndps.ndps_operator",
+ FT_UINT32, BASE_DEC, VALS(ndps_operator_enum), 0x0,
+ "Operator Type", HFILL }},
+
+ { &hf_ndps_password,
+ { "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_bind_security,
+ { "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,
+ "Maximum Items in List", HFILL }},
+
+ { &hf_ndps_status_flags,
+ { "Status Flag", "ndps.ndps_status_flags",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Status Flag", HFILL }},
+
+ { &hf_ndps_resource_list_type,
+ { "Resource Type", "ndps.ndps_resource_type",
+ FT_UINT32, BASE_DEC, VALS(ndps_resource_type_enum), 0x0,
+ "Resource Type", HFILL }},
+
+ { &hf_os_type,
+ { "OS Type", "ndps.os_type",
+ FT_UINT32, BASE_DEC, VALS(ndps_os_type_enum), 0x0,
+ "OS Type", HFILL }},
+
+ { &hf_ndps_printer_type,
+ { "Printer Type", "ndps.prn_type",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Printer Type", HFILL }},
+
+ { &hf_ndps_printer_manuf,
+ { "Printer Manufacturer", "ndps.prn_manuf",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Printer Manufacturer", HFILL }},
+
+ { &hf_ndps_inf_file_name,
+ { "INF File Name", "ndps.inf_file_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "INF File Name", HFILL }},
+
+ { &hf_ndps_vendor_dir,
+ { "Vendor Directory", "ndps.vendor_dir",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Vendor Directory", HFILL }},
+
+ { &hf_banner_type,
+ { "Banner Type", "ndps.banner_type",
+ FT_UINT32, BASE_DEC, VALS(ndps_banner_type_enum), 0x0,
+ "Banner Type", HFILL }},
+
+ { &hf_font_type,
+ { "Font Type", "ndps.font_type",
+ FT_UINT32, BASE_DEC, VALS(ndps_font_type_enum), 0x0,
+ "Font Type", HFILL }},
+
+ { &hf_printer_id,
+ { "Printer ID", "ndps.printer_id",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Printer ID", HFILL }},
+
+ { &hf_ndps_font_name,
+ { "Font Name", "ndps.font_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Font Name", HFILL }},
+
+ { &hf_ndps_return_code,
+ { "Return Code", "ndps.ret_code",
+ FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
+ "Return Code", HFILL }},
+
+ { &hf_ndps_banner_name,
+ { "Banner Name", "ndps.banner_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Banner Name", HFILL }},
+
+ { &hf_font_type_name,
+ { "Font Type Name", "ndps.font_type_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Font Type Name", HFILL }},
+
+ { &hf_font_file_name,
+ { "Font File Name", "ndps.font_file_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Font File Name", HFILL }},
+
+ { &hf_ndps_prn_file_name,
+ { "Printer File Name", "ndps.print_file_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Printer File Name", HFILL }},
+
+ { &hf_ndps_prn_dir_name,
+ { "Printer Directory Name", "ndps.print_dir_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Printer Directory Name", HFILL }},
+
+ { &hf_ndps_def_file_name,
+ { "Printer Definition Name", "ndps.print_def_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Printer Definition Name", HFILL }},
+
+ { &hf_ndps_win31_items,
+ { "Windows 31 Keys", "ndps.win31_keys",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Windows 31 Keys", HFILL }},
+
+ { &hf_ndps_win95_items,
+ { "Windows 95 Keys", "ndps.win95_keys",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Windows 95 Keys", HFILL }},
+
+ { &hf_ndps_windows_key,
+ { "Windows Key", "ndps.windows_key",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Windows Key", HFILL }},
+
+ { &hf_archive_type,
+ { "Archive Type", "ndps.archive_type",
+ FT_UINT32, BASE_DEC, VALS(ndps_archive_enum), 0x0,
+ "Archive Type", HFILL }},
+
+ { &hf_archive_file_size,
+ { "Archive File Size", "ndps.archive_size",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Archive File Size", HFILL }},
+
+ { &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 }},
+
+ { &hf_ndps_data,
+ { "[Data]", "ndps.data", FT_NONE, BASE_NONE,
+ NULL, 0x0, "[Data]", HFILL }},
+
+ { &hf_get_status_flag,
+ { "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,
+ "File Time Stamp", HFILL }},
+
+ { &hf_print_arg,
+ { "Print Type", "ndps.print_arg",
+ FT_UINT32, BASE_DEC, VALS(ndps_print_arg_enum), 0x0,
+ "Print Type", HFILL }},
+
+ { &hf_sub_complete,
+ { "Submission Complete?", "ndps.sub_complete", FT_BOOLEAN, BASE_NONE,
+ NULL, 0x0, "Submission Complete?", HFILL }},
+
+ { &hf_doc_content,
+ { "Document Content", "ndps.doc_content",
+ FT_UINT32, BASE_DEC, VALS(ndps_doc_content_enum), 0x0,
+ "Document Content", HFILL }},
+
+ { &hf_ndps_doc_name,
+ { "Document Name", "ndps.doc_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Document Name", HFILL }},
+
+ { &hf_local_id,
+ { "Local ID", "ndps.local_id",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Local ID", HFILL }},
+
+ { &hf_ndps_included_doc,
+ { "Included Document", "ndps.included_doc",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Included Document", HFILL }},
+
+ { &hf_ndps_ref_name,
+ { "Referenced Document Name", "ndps.ref_doc_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Referenced Document Name", HFILL }},
+
+ { &hf_interrupt_job_type,
+ { "Interrupt Job Identifier", "ndps.interrupt_job_type",
+ FT_UINT32, BASE_DEC, VALS(ndps_interrupt_job_enum), 0x0,
+ "Interrupt Job Identifier", HFILL }},
+
+ { &hf_pause_job_type,
+ { "Pause Job Identifier", "ndps.pause_job_type",
+ FT_UINT32, BASE_DEC, VALS(ndps_pause_job_enum), 0x0,
+ "Pause Job Identifier", HFILL }},
+
+ { &hf_ndps_force,
+ { "Force?", "ndps.ndps_force",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "Force?", HFILL }},
+
+ { &hf_resubmit_op_type,
+ { "Resubmit Operation Type", "ndps.resubmit_op_type",
+ FT_UINT32, BASE_DEC, VALS(ndps_resubmit_op_enum), 0x0,
+ "Resubmit Operation Type", HFILL }},
+
+ { &hf_shutdown_type,
+ { "Shutdown Type", "ndps.shutdown_type",
+ FT_UINT32, BASE_DEC, VALS(ndps_shutdown_enum), 0x0,
+ "Shutdown Type", HFILL }},
+
+ { &hf_ndps_supplier_flag,
+ { "Supplier Data?", "ndps.supplier_flag",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "Supplier Data?", HFILL }},
+
+ { &hf_ndps_language_flag,
+ { "Language Data?", "ndps.language_flag",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "Language Data?", HFILL }},
+
+ { &hf_ndps_method_flag,
+ { "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,
+ "Continuation Option", HFILL }},
+
+ { &hf_ndps_ds_info_type,
+ { "DS Info Type", "ndps.ndps_ds_info_type",
+ FT_UINT32, BASE_HEX, VALS(ndps_ds_info_enum), 0x0,
+ "DS Info Type", HFILL }},
+
+ { &hf_ndps_guid,
+ { "GUID", "ndps.guid",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "GUID", HFILL }},
+
+ { &hf_ndps_list_services_type,
+ { "Services Type", "ndps.ndps_list_services_type",
+ FT_UINT32, BASE_HEX, VALS(ndps_list_services_enum), 0x0,
+ "Services Type", HFILL }},
+
+ { &hf_ndps_item_bytes,
+ { "Item Ptr", "ndps.item_bytes",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Item Ptr", HFILL }},
+
+ { &hf_ndps_certified,
+ { "Certified", "ndps.certified",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Certified", HFILL }},
+
+ { &hf_ndps_attribute_set,
+ { "Attribute Set", "ndps.attribute_set",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Attribute Set", HFILL }},
+
+ { &hf_ndps_data_item_type,
+ { "Item Type", "ndps.ndps_data_item_type",
+ FT_UINT32, BASE_HEX, VALS(ndps_data_item_enum), 0x0,
+ "Item Type", HFILL }},
+
+ { &hf_info_int,
+ { "Integer Value", "ndps.info_int",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ "Integer Value", HFILL }},
+
+ { &hf_info_int16,
+ { "16 Bit Integer Value", "ndps.info_int16",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ "16 Bit Integer Value", HFILL }},
+
+ { &hf_info_int32,
+ { "32 Bit Integer Value", "ndps.info_int32",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ "32 Bit Integer Value", HFILL }},
+
+ { &hf_info_boolean,
+ { "Boolean Value", "ndps.info_boolean",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "Boolean Value", HFILL }},
+
+ { &hf_info_string,
+ { "String Value", "ndps.info_string",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "String Value", HFILL }},
+
+ { &hf_info_bytes,
+ { "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,
+ "Server Type", HFILL }},
+
+ { &hf_ndps_registry_name,
+ { "Registry Name", "ndps.registry_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Registry Name", HFILL }},
+
+ { &hf_ndps_client_server_type,
+ { "Client/Server Type", "ndps.ndps_client_server_type",
+ FT_UINT32, BASE_HEX, VALS(ndps_client_server_enum), 0x0,
+ "Client/Server Type", HFILL }},
+
+ { &hf_ndps_session_type,
+ { "Session Type", "ndps.ndps_session_type",
+ FT_UINT32, BASE_HEX, VALS(ndps_session_type_enum), 0x0,
+ "Session Type", HFILL }},
+
+ { &hf_time,
+ { "Time", "ndps.time",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Time", HFILL }},
+
+ { &hf_ndps_supplier_name,
+ { "Supplier Name", "ndps.supplier_name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Supplier Name", HFILL }},
+
+ { &hf_ndps_message,
+ { "Message", "ndps.message",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Message", HFILL }},
+
+ { &hf_delivery_method_type,
+ { "Delivery Method Type", "ndps.delivery_method_type",
+ FT_UINT32, BASE_HEX, VALS(ndps_delivery_method_enum), 0x0,
+ "Delivery Method Type", HFILL }},
+
+ { &hf_ndps_get_session_type,
+ { "Session Type", "ndps.ndps_get_session_type",
+ FT_UINT32, BASE_HEX, VALS(ndps_get_session_type_enum), 0x0,
+ "Session Type", HFILL }},
+
+ { &hf_packet_count,
+ { "Packet Count", "ndps.packet_count",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Packet Count", HFILL }},
+
+ { &hf_last_packet_flag,
+ { "Last Packet Flag", "ndps.last_packet_flag",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Last Packet Flag", HFILL }},
+
+ { &hf_ndps_get_resman_session_type,
+ { "Session Type", "ndps.ndps_get_resman_session_type",
+ FT_UINT32, BASE_HEX, VALS(ndps_get_resman_session_type_enum), 0x0,
+ "Session Type", HFILL }},
+
+ { &hf_problem_type,
+ { "Problem Type", "ndps.ndps_get_resman_session_type",
+ FT_UINT32, BASE_HEX, VALS(problem_type_enum), 0x0,
+ "Problem Type", HFILL }},
+ };
static gint *ett[] = {
&ett_ndps,
+ &ett_ndps_segments,
+ &ett_ndps_segment,
};
module_t *ndps_module;
@@ -3075,6 +9128,10 @@ proto_register_ndps(void)
"Desegment all NDPS messages spanning multiple TCP segments",
"Whether the NDPS dissector should desegment all messages spanning multiple TCP segments",
&ndps_desegment);
+ prefs_register_bool_preference(ndps_module, "desegment_spx",
+ "Desegment all NDPS messages spanning multiple SPX packets",
+ "Whether the NDPS dissector should desegment all messages spanning multiple SPX packets",
+ &ndps_defragment);
register_init_routine(&ndps_init_protocol);
register_postseq_cleanup_routine(&ndps_postseq_cleanup);
@@ -3085,7 +9142,7 @@ proto_reg_handoff_ndps(void)
{
dissector_handle_t ndps_handle, ndps_tcp_handle;
- ndps_handle = create_dissector_handle(dissect_ndps, proto_ndps);
+ 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);