Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-ndps.c
blob94d258b0d28cd7225e1131dc57e5deeae9d1e438
1 /* packet-ndps.c
2 * Routines for NetWare's NDPS
3 * Greg Morris <gmorris@novell.com>
4 * Copyright (c) Novell, Inc. 2002-2003
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 #include "config.h"
15 #include <epan/packet.h>
16 #include <epan/exceptions.h>
17 #include <epan/prefs.h>
18 #include <epan/reassemble.h>
19 #include <epan/expert.h>
20 #include <epan/strutil.h>
21 #include <epan/proto_data.h>
22 #include <epan/wmem_scopes.h>
24 #include "packet-ipx.h"
25 #include "packet-tcp.h"
26 #include "packet-ndps.h"
28 void proto_register_ndps(void);
29 void proto_reg_handoff_ndps(void);
31 static dissector_handle_t ndps_handle, ndps_tcp_handle;
33 /* Limit the number of items we can add to the tree. */
34 #define NDPS_MAX_ITEMS 100
36 /* Table for reassembly of fragments. */
37 static reassembly_table ndps_reassembly_table;
39 /* desegmentation of ndps */
40 static bool ndps_defragment = true;
42 static uint32_t tid = 1;
44 /* Show ID's value */
45 static bool ndps_show_oids=false;
47 /* Global Attribute for evaluation of Values */
48 static const char *global_attribute_name;
50 static int dissect_ndps_request(tvbuff_t*, packet_info*, proto_tree*, uint32_t, uint32_t, int);
52 static int dissect_ndps_reply(tvbuff_t *, packet_info*, proto_tree*, int);
54 static int hf_ndps_segments;
55 static int hf_ndps_segment;
56 static int hf_ndps_segment_overlap;
57 static int hf_ndps_segment_overlap_conflict;
58 static int hf_ndps_segment_multiple_tails;
59 static int hf_ndps_segment_too_long_segment;
60 static int hf_ndps_segment_error;
61 static int hf_ndps_segment_count;
62 static int hf_ndps_reassembled_length;
64 static int ett_ndps_segments;
65 static int ett_ndps_segment;
67 static int proto_ndps;
68 static int hf_ndps_record_mark;
69 static int hf_ndps_length;
70 static int hf_ndps_xid;
71 static int hf_ndps_packet_type;
72 static int hf_ndps_rpc_version;
73 /* static int hf_ndps_error; */
74 static int hf_ndps_num_objects;
75 static int hf_ndps_num_attributes;
76 /* static int hf_ndps_sbuffer; */
77 /* static int hf_ndps_rbuffer; */
78 static int hf_ndps_user_name;
79 static int hf_ndps_broker_name;
80 static int hf_ndps_num_results;
81 static int hf_ndps_num_options;
82 static int hf_ndps_num_jobs;
83 static int hf_ndps_pa_name;
84 static int hf_ndps_tree;
85 static int hf_ndps_reqframe;
86 static int hf_ndps_error_val;
87 static int hf_ndps_ext_error;
88 static int hf_ndps_object;
89 static int hf_ndps_cred_type;
90 static int hf_ndps_server_name;
91 static int hf_ndps_connection;
92 static int hf_ndps_auth_null;
93 static int hf_ndps_rpc_accept;
94 static int hf_ndps_rpc_acc_stat;
95 static int hf_ndps_rpc_rej_stat;
96 static int hf_ndps_rpc_acc_results;
97 static int hf_ndps_problem_type;
98 static int hf_security_problem_type;
99 static int hf_service_problem_type;
100 static int hf_access_problem_type;
101 static int hf_printer_problem_type;
102 static int hf_selection_problem_type;
103 static int hf_doc_access_problem_type;
104 static int hf_attribute_problem_type;
105 static int hf_update_problem_type;
106 static int hf_obj_id_type;
107 static int hf_oid_struct_size;
108 static int hf_object_name;
109 static int hf_ndps_document_number;
110 static int hf_ndps_nameorid;
111 static int hf_ndps_local_object_name;
112 static int hf_ndps_printer_name;
113 static int hf_ndps_qualified_name;
114 static int hf_ndps_item_count;
115 static int hf_ndps_num_passwords;
116 static int hf_ndps_num_servers;
117 static int hf_ndps_num_locations;
118 static int hf_ndps_num_areas;
119 static int hf_ndps_num_address_items;
120 static int hf_ndps_num_job_categories;
121 static int hf_ndps_num_page_selects;
122 static int hf_ndps_num_page_informations;
123 static int hf_ndps_num_names;
124 static int hf_ndps_num_categories;
125 static int hf_ndps_num_colorants;
126 static int hf_ndps_num_events;
127 static int hf_ndps_num_args;
128 static int hf_ndps_num_transfer_methods;
129 static int hf_ndps_num_doc_types;
130 static int hf_ndps_num_destinations;
131 static int hf_ndps_qualifier;
132 static int hf_ndps_lib_error;
133 static int hf_ndps_other_error;
134 static int hf_ndps_other_error_2;
135 static int hf_ndps_session;
136 static int hf_ndps_abort_flag;
137 static int hf_ndps_obj_attribute_type;
138 static int hf_ndps_attribute_value;
139 static int hf_ndps_lower_range;
140 static int hf_ndps_upper_range;
141 static int hf_ndps_n64;
142 static int hf_ndps_lower_range_n64;
143 static int hf_ndps_upper_range_n64;
144 static int hf_ndps_attrib_boolean;
145 static int hf_ndps_realization;
146 static int hf_ndps_xdimension_n64;
147 static int hf_ndps_ydimension_n64;
148 static int hf_ndps_dim_value;
149 static int hf_ndps_dim_flag;
150 static int hf_ndps_xydim_value;
151 static int hf_ndps_location_value;
152 static int hf_ndps_xmin_n64;
153 static int hf_ndps_xmax_n64;
154 static int hf_ndps_ymin_n64;
155 static int hf_ndps_ymax_n64;
156 static int hf_ndps_edge_value;
157 static int hf_ndps_cardinal_or_oid;
158 static int hf_ndps_cardinal_name_or_oid;
159 static int hf_ndps_integer_or_oid;
160 static int hf_ndps_profile_id;
161 static int hf_ndps_persistence;
162 static int hf_ndps_language_count;
163 static int hf_ndps_language_id;
164 static int hf_address_type;
165 static int hf_ndps_address;
166 static int hf_ndps_add_bytes;
167 static int hf_ndps_event_type;
168 static int hf_ndps_event_object_identifier;
169 static int hf_ndps_octet_string;
170 static int hf_ndps_scope;
171 static int hf_address_len;
172 static int hf_ndps_net;
173 static int hf_ndps_node;
174 static int hf_ndps_socket;
175 static int hf_ndps_port;
176 static int hf_ndps_ip;
177 static int hf_ndps_server_type;
178 static int hf_ndps_num_services;
179 static int hf_ndps_service_type;
180 static int hf_ndps_service_enabled;
181 static int hf_ndps_method_name;
182 static int hf_ndps_method_ver;
183 static int hf_ndps_file_name;
184 static int hf_ndps_admin_submit;
185 static int hf_ndps_oid;
186 static int hf_ndps_object_op;
187 static int hf_answer_time;
188 static int hf_oid_asn1_type;
189 static int hf_ndps_item_ptr;
190 static int hf_ndps_len;
191 static int hf_ndps_limit_enc;
192 static int hf_ndps_delivery_add_count;
193 /* static int hf_ndps_qualified_name2; */
194 static int hf_ndps_delivery_add_type;
195 static int hf_ndps_criterion_type;
196 static int hf_ndps_num_ignored_attributes;
197 static int hf_ndps_ignored_type;
198 static int hf_ndps_num_resources;
199 static int hf_ndps_resource_type;
200 static int hf_ndps_identifier_type;
201 static int hf_ndps_page_flag;
202 static int hf_ndps_media_type;
203 static int hf_ndps_doc_content;
204 static int hf_ndps_page_size;
205 static int hf_ndps_direction;
206 static int hf_ndps_page_order;
207 static int hf_ndps_medium_size;
208 static int hf_ndps_long_edge_feeds;
209 static int hf_ndps_inc_across_feed;
210 static int hf_ndps_size_inc_in_feed;
211 static int hf_ndps_page_orientation;
212 static int hf_ndps_numbers_up;
213 static int hf_ndps_xdimension;
214 static int hf_ndps_ydimension;
215 static int hf_ndps_state_severity;
216 static int hf_ndps_training;
217 static int hf_ndps_colorant_set;
218 static int hf_ndps_card_enum_time;
219 static int hf_ndps_attrs_arg;
220 static int hf_ndps_context_len;
221 static int hf_ndps_context;
222 static int hf_ndps_filter;
223 /* static int hf_ndps_item_filter; */
224 /* static int hf_ndps_substring_match; */
225 static int hf_ndps_time_limit;
226 static int hf_ndps_count_limit;
227 static int hf_ndps_operator;
228 static int hf_ndps_password;
229 static int hf_ndps_retrieve_restrictions;
230 static int hf_ndps_bind_security_option_count;
231 static int hf_bind_security;
232 static int hf_ndps_max_items;
233 static int hf_ndps_status_flags;
234 static int hf_ndps_resource_list_type;
235 static int hf_os_count;
236 static int hf_os_type;
237 static int hf_ndps_printer_type_count;
238 static int hf_ndps_printer_type;
239 static int hf_ndps_printer_manuf;
240 static int hf_ndps_inf_file_name;
241 static int hf_ndps_vendor_dir;
242 static int hf_banner_type;
243 static int hf_font_type;
244 static int hf_printer_id;
245 static int hf_ndps_font_name;
246 static int hf_ndps_return_code;
247 /* static int hf_ndps_banner_count; */
248 static int hf_ndps_banner_name;
249 static int hf_ndps_font_type_count;
250 static int hf_font_type_name;
251 static int hf_ndps_font_file_count;
252 static int hf_font_file_name;
253 static int hf_ndps_printer_def_count;
254 static int hf_ndps_prn_file_name;
255 static int hf_ndps_prn_dir_name;
256 static int hf_ndps_def_file_name;
257 static int hf_ndps_num_win31_keys;
258 static int hf_ndps_num_win95_keys;
259 static int hf_ndps_num_windows_keys;
260 static int hf_ndps_windows_key;
261 static int hf_archive_type;
262 static int hf_archive_file_size;
263 static int hf_ndps_data;
264 static int hf_get_status_flag;
265 static int hf_res_type;
266 static int hf_file_timestamp;
267 static int hf_sub_complete;
268 static int hf_doc_content;
269 /* static int hf_ndps_doc_name; */
270 static int hf_print_arg;
271 static int hf_local_id;
272 static int hf_ndps_included_doc_len;
273 static int hf_ndps_included_doc;
274 static int hf_ndps_ref_name;
275 static int hf_interrupt_job_type;
276 static int hf_pause_job_type;
277 static int hf_ndps_force;
278 static int hf_resubmit_op_type;
279 static int hf_shutdown_type;
280 static int hf_ndps_supplier_flag;
281 static int hf_ndps_language_flag;
282 static int hf_ndps_method_flag;
283 static int hf_ndps_delivery_address_flag;
284 static int hf_ndps_list_profiles_type;
285 static int hf_ndps_list_profiles_choice_type;
286 static int hf_ndps_list_profiles_result_type;
287 static int hf_ndps_integer_type_flag;
288 static int hf_ndps_integer_type_value;
289 static int hf_ndps_continuation_option;
290 static int hf_ndps_ds_info_type;
291 static int hf_ndps_guid;
292 static int hf_ndps_list_services_type;
293 static int hf_ndps_item_bytes;
294 static int hf_ndps_certified;
295 static int hf_ndps_attribute_set;
296 static int hf_ndps_data_item_type;
297 static int hf_info_int;
298 static int hf_info_int16;
299 static int hf_info_int32;
300 static int hf_info_boolean;
301 static int hf_info_string;
302 /* static int hf_info_bytes; */
303 static int hf_ndps_list_local_servers_type;
304 static int hf_ndps_registry_name;
305 static int hf_ndps_client_server_type;
306 static int hf_ndps_session_type;
307 static int hf_time;
308 static int hf_ndps_supplier_name;
309 static int hf_ndps_message;
310 static int hf_ndps_delivery_method_count;
311 static int hf_delivery_method_type;
312 static int hf_ndps_get_session_type;
313 static int hf_packet_count;
314 static int hf_last_packet_flag;
315 static int hf_ndps_get_resman_session_type;
316 static int hf_problem_type;
317 static int hf_ndps_num_values;
318 static int hf_ndps_object_ids_7;
319 static int hf_ndps_object_ids_8;
320 static int hf_ndps_object_ids_9;
321 static int hf_ndps_object_ids_10;
322 static int hf_ndps_object_ids_11;
323 static int hf_ndps_object_ids_12;
324 static int hf_ndps_object_ids_13;
325 static int hf_ndps_object_ids_14;
326 static int hf_ndps_object_ids_15;
327 static int hf_ndps_object_ids_16;
328 /* static int hf_ndps_attribute_time; */
329 static int hf_print_security;
330 static int hf_notify_time_interval;
331 static int hf_notify_sequence_number;
332 static int hf_notify_lease_exp_time;
333 static int hf_notify_printer_uri;
334 static int hf_level;
335 static int hf_interval;
336 static int hf_ndps_other_error_string;
338 static int hf_spx_ndps_program;
339 static int hf_spx_ndps_version;
340 static int hf_spx_ndps_func_print;
341 static int hf_spx_ndps_func_registry;
342 static int hf_spx_ndps_func_notify;
343 static int hf_spx_ndps_func_resman;
344 static int hf_spx_ndps_func_delivery;
345 static int hf_spx_ndps_func_broker;
347 static int ett_ndps;
349 static expert_field ei_ndps_problem_type;
350 static expert_field ei_ndps_return_code;
351 static expert_field ei_ndps_rpc_acc_stat;
352 static expert_field ei_ndps_truncated;
355 /* desegmentation of NDPS over TCP */
356 static bool ndps_desegment = true;
358 static const value_string true_false[] = {
359 { 0x00000000, "Accept" },
360 { 0x00000001, "Deny" },
361 { 0, NULL }
364 static const value_string ndps_limit_enc_enum[] = {
365 { 0x00000000, "Time" },
366 { 0x00000001, "Count" },
367 { 0x00000002, "Error" },
368 { 0, NULL }
371 static const value_string problem_type_enum[] = {
372 { 0x00000000, "Standard" },
373 { 0x00000001, "Extended" },
374 { 0, NULL }
377 static const value_string accept_stat[] = {
378 { 0x00000000, "Success" },
379 { 0x00000001, "Program Unavailable" },
380 { 0x00000002, "Program Mismatch" },
381 { 0x00000003, "Procedure Unavailable" },
382 { 0x00000004, "Garbage Arguments" },
383 { 0x00000005, "System Error" },
384 { 0, NULL }
387 static const value_string reject_stat[] = {
388 { 0x00000000, "RPC Mismatch" },
389 { 0x00000001, "Authentication Error" },
390 { 0, NULL }
393 static const value_string error_type_enum[] = {
394 { 0x00000000, "Security Error" },
395 { 0x00000001, "Service Error" },
396 { 0x00000002, "Access Error" },
397 { 0x00000003, "Printer Error" },
398 { 0x00000004, "Selection Error" },
399 { 0x00000005, "Document Access Error" },
400 { 0x00000006, "Attribute Error" },
401 { 0x00000007, "Update Error" },
402 { 0, NULL }
405 static const value_string security_problem_enum[] = {
406 { 0x00000000, "Authentication" },
407 { 0x00000001, "Credentials" },
408 { 0x00000002, "Rights" },
409 { 0x00000003, "Invalid PAC" },
410 { 0, NULL }
413 static const value_string service_problem_enum[] = {
414 { 0x00000000, "Sever Busy" },
415 { 0x00000001, "Server Unavailable" },
416 { 0x00000002, "Complex Operation" },
417 { 0x00000003, "Resource Limit" },
418 { 0x00000004, "Unclassified Server Error" },
419 { 0x00000005, "Too Many Items in List" },
420 { 0x00000006, "Resource not Available" },
421 { 0x00000007, "Cancel Document Support" },
422 { 0x00000008, "Modify Document Support" },
423 { 0x00000009, "Multiple Document Support" },
424 { 0x0000000a, "Parameter Valid Support" },
425 { 0x0000000b, "Invalid Checkpoint" },
426 { 0x0000000c, "Continuation Context" },
427 { 0x0000000d, "Pause Limit Exceeded" },
428 { 0x0000000e, "Unsupported Operation" },
429 { 0x0000000f, "Notify Service Error" },
430 { 0x00000010, "Accounting Service Error" },
431 { 0, NULL }
433 static value_string_ext service_problem_enum_ext = VALUE_STRING_EXT_INIT(service_problem_enum);
435 static const value_string access_problem_enum[] = {
436 { 0x00000000, "Wrong Object Class" },
437 { 0x00000001, "Lack of Access Rights" },
438 { 0x00000002, "Can't Interrupt Job" },
439 { 0x00000003, "Wrong Object State" },
440 { 0x00000004, "Client Not Bound" },
441 { 0x00000005, "Not Available" },
442 { 0x00000006, "Notify Service Not Connected" },
443 { 0x00000007, "PDS Not Connected" },
444 { 0, NULL }
447 static const value_string printer_problem_enum[] = {
448 { 0x00000000, "Printer Error" },
449 { 0x00000001, "Printer Needs Attention" },
450 { 0x00000002, "Printer Needs Key Operator" },
451 { 0, NULL }
454 static const value_string selection_problem_enum[] = {
455 { 0x00000000, "Invalid ID" },
456 { 0x00000001, "Unknown ID" },
457 { 0x00000002, "Object Exists" },
458 { 0x00000003, "ID Changed" },
459 { 0, NULL }
462 static const value_string doc_access_problem_enum[] = {
463 { 0x00000000, "Access Not Available" },
464 { 0x00000001, "Time Expired" },
465 { 0x00000002, "Access Denied" },
466 { 0x00000003, "Unknown Document" },
467 { 0x00000004, "No Documents in Job" },
468 { 0, NULL }
471 static const value_string attribute_problem_enum[] = {
472 { 0x00000000, "Invalid Syntax" },
473 { 0x00000001, "Undefined Type" },
474 { 0x00000002, "Wrong Matching" },
475 { 0x00000003, "Constraint Violated" },
476 { 0x00000004, "Unsupported Type" },
477 { 0x00000005, "Illegal Modification" },
478 { 0x00000006, "Consists With Other Attribute" },
479 { 0x00000007, "Undefined Attribute Value" },
480 { 0x00000008, "Unsupported Value" },
481 { 0x00000009, "Invalid Noncompulsed Modification" },
482 { 0x0000000a, "Per Job Inadmissible" },
483 { 0x0000000b, "Not Multivalued" },
484 { 0x0000000c, "Mandatory Omitted" },
485 { 0x0000000d, "Illegal For Class" },
486 { 0, NULL }
488 static value_string_ext attribute_problem_enum_ext = VALUE_STRING_EXT_INIT(attribute_problem_enum);
490 static const value_string update_problem_enum[] = {
491 { 0x00000000, "No Modifications Allowed" },
492 { 0x00000001, "Insufficient Rights" },
493 { 0x00000002, "Previous Operation Incomplete" },
494 { 0x00000003, "Cancel Not Possible" },
495 { 0, NULL }
498 static const value_string obj_identification_enum[] = {
499 { 0x00000000, "Printer Contained Object ID" },
500 { 0x00000001, "Document Identifier" },
501 { 0x00000002, "Object Identifier" },
502 { 0x00000003, "Object Name" },
503 { 0x00000004, "Name or Object ID" },
504 { 0x00000005, "Simple Name" },
505 { 0x00000006, "Printer Configuration Object ID" },
506 { 0x00000007, "Qualified Name" },
507 { 0x00000008, "Event Object ID" },
508 { 0, NULL }
511 static const value_string nameorid_enum[] = {
512 { 0x00000000, "None" },
513 { 0x00000001, "Global" },
514 { 0x00000002, "Local" },
515 { 0, NULL }
518 static const value_string qualified_name_enum[] = {
519 { 0x00000000, "None" },
520 { 0x00000001, "Simple" },
521 { 0x00000002, "NDS" },
522 { 0, NULL }
525 #if 0
526 static const value_string qualified_name_enum2[] = {
527 { 0x00000000, "NDS" },
528 { 0, NULL }
530 #endif
532 static const value_string spx_ndps_program_vals[] = {
533 { 0x00060976, "Print Program" },
534 { 0x00060977, "Broker Program" },
535 { 0x00060978, "Registry Program" },
536 { 0x00060979, "Notify Program" },
537 { 0x0006097a, "Resource Manager Program" },
538 { 0x0006097b, "Programmatic Delivery Program" },
539 { 0, NULL }
542 static const value_string spx_ndps_print_func_vals[] = {
543 { 0x00000000, "None" },
544 { 0x00000001, "Bind PSM" },
545 { 0x00000002, "Bind PA" },
546 { 0x00000003, "Unbind" },
547 { 0x00000004, "Print" },
548 { 0x00000005, "Modify Job" },
549 { 0x00000006, "Cancel Job" },
550 { 0x00000007, "List Object Attributes" },
551 { 0x00000008, "Promote Job" },
552 { 0x00000009, "Interrupt" },
553 { 0x0000000a, "Pause" },
554 { 0x0000000b, "Resume" },
555 { 0x0000000c, "Clean" },
556 { 0x0000000d, "Create" },
557 { 0x0000000e, "Delete" },
558 { 0x0000000f, "Disable PA" },
559 { 0x00000010, "Enable PA" },
560 { 0x00000011, "Resubmit Jobs" },
561 { 0x00000012, "Set" },
562 { 0x00000013, "Shutdown PA" },
563 { 0x00000014, "Startup PA" },
564 { 0x00000015, "Reorder Job" },
565 { 0x00000016, "Pause PA" },
566 { 0x00000017, "Resume PA" },
567 { 0x00000018, "Transfer Data" },
568 { 0x00000019, "Device Control" },
569 { 0x0000001a, "Add Event Profile" },
570 { 0x0000001b, "Remove Event Profile" },
571 { 0x0000001c, "Modify Event Profile" },
572 { 0x0000001d, "List Event Profiles" },
573 { 0x0000001e, "Shutdown PSM" },
574 { 0x0000001f, "Cancel PSM Shutdown" },
575 { 0x00000020, "Set Printer DS Information" },
576 { 0x00000021, "Clean User Jobs" },
577 { 0x00000022, "Map GUID to NDS Name" },
578 { 0x00000023, "Add Event Profile 2" },
579 { 0x00000024, "List Event Profile 2" },
580 { 0, NULL }
582 static value_string_ext spx_ndps_print_func_vals_ext = VALUE_STRING_EXT_INIT(spx_ndps_print_func_vals);
584 static const value_string spx_ndps_notify_func_vals[] = {
585 { 0x00000000, "None" },
586 { 0x00000001, "Notify Bind" },
587 { 0x00000002, "Notify Unbind" },
588 { 0x00000003, "Register Supplier" },
589 { 0x00000004, "Deregister Supplier" },
590 { 0x00000005, "Add Profile" },
591 { 0x00000006, "Remove Profile" },
592 { 0x00000007, "Modify Profile" },
593 { 0x00000008, "List Profiles" },
594 { 0x00000009, "Report Event" },
595 { 0x0000000a, "List Supported Languages" },
596 { 0x0000000b, "Report Notification" },
597 { 0x0000000c, "Add Delivery Method" },
598 { 0x0000000d, "Remove Delivery Method" },
599 { 0x0000000e, "List Delivery Methods" },
600 { 0x0000000f, "Get Delivery Method Information" },
601 { 0x00000010, "Get Notify NDS Object Name" },
602 { 0x00000011, "Get Notify Session Information" },
603 { 0, NULL }
605 static value_string_ext spx_ndps_notify_func_vals_ext = VALUE_STRING_EXT_INIT(spx_ndps_notify_func_vals);
607 static const value_string spx_ndps_deliver_func_vals[] = {
608 { 0x00000000, "None" },
609 { 0x00000001, "Delivery Bind" },
610 { 0x00000002, "Delivery Unbind" },
611 { 0x00000003, "Delivery Send" },
612 { 0x00000004, "Delivery Send2" },
613 { 0, NULL }
616 static const value_string spx_ndps_registry_func_vals[] = {
617 { 0x00000000, "None" },
618 { 0x00000001, "Bind" },
619 { 0x00000002, "Unbind" },
620 { 0x00000003, "Register Server" },
621 { 0x00000004, "Deregister Server" },
622 { 0x00000005, "Register Registry" },
623 { 0x00000006, "Deregister Registry" },
624 { 0x00000007, "Registry Update" },
625 { 0x00000008, "List Local Servers" },
626 { 0x00000009, "List Servers" },
627 { 0x0000000a, "List Known Registries" },
628 { 0x0000000b, "Get Registry NDS Object Name" },
629 { 0x0000000c, "Get Registry Session Information" },
630 { 0, NULL }
632 static value_string_ext spx_ndps_registry_func_vals_ext = VALUE_STRING_EXT_INIT(spx_ndps_registry_func_vals);
634 static const value_string spx_ndps_resman_func_vals[] = {
635 { 0x00000000, "None" },
636 { 0x00000001, "Bind" },
637 { 0x00000002, "Unbind" },
638 { 0x00000003, "Add Resource File" },
639 { 0x00000004, "Delete Resource File" },
640 { 0x00000005, "List Resources" },
641 { 0x00000006, "Get Resource File" },
642 { 0x00000007, "Get Resource File Date" },
643 { 0x00000008, "Get Resource Manager NDS Object Name" },
644 { 0x00000009, "Get Resource Manager Session Information" },
645 { 0x0000000a, "Set Resource Language Context" },
646 { 0, NULL }
648 static value_string_ext spx_ndps_resman_func_vals_ext = VALUE_STRING_EXT_INIT(spx_ndps_resman_func_vals);
650 static const value_string spx_ndps_broker_func_vals[] = {
651 { 0x00000000, "None" },
652 { 0x00000001, "Bind" },
653 { 0x00000002, "Unbind" },
654 { 0x00000003, "List Services" },
655 { 0x00000004, "Enable Service" },
656 { 0x00000005, "Disable Service" },
657 { 0x00000006, "Down Broker" },
658 { 0x00000007, "Get Broker NDS Object Name" },
659 { 0x00000008, "Get Broker Session Information" },
660 { 0, NULL }
662 static value_string_ext spx_ndps_broker_func_vals_ext = VALUE_STRING_EXT_INIT(spx_ndps_broker_func_vals);
664 static const value_string ndps_packet_types[] = {
665 { 0x00000000, "Request" },
666 { 0x00000001, "Reply" },
667 { 0, NULL }
670 static const value_string ndps_realization_enum[] = {
671 { 0x00000000, "Logical" },
672 { 0x00000001, "Physical" },
673 { 0x00000002, "Logical & Physical" },
674 { 0, NULL }
677 static const value_string ndps_dim_value_enum[] = {
678 { 0x00000000, "Numeric" },
679 { 0x00000001, "Named" },
680 { 0, NULL }
683 static const value_string ndps_xydim_value_enum[] = {
684 { 0x00000000, "Real" },
685 { 0x00000001, "Named" },
686 { 0x00000002, "Cardinal" },
687 { 0, NULL }
690 static const value_string ndps_location_value_enum[] = {
691 { 0x00000000, "Numeric" },
692 { 0x00000001, "Named" },
693 { 0, NULL }
696 static const value_string ndps_edge_value_enum[] = {
697 { 0x00000000, "Bottom" },
698 { 0x00000001, "Right" },
699 { 0x00000002, "Top" },
700 { 0x00000003, "Left" },
701 { 0, NULL }
704 static const value_string ndps_card_or_oid_enum[] = {
705 { 0x00000000, "Number" },
706 { 0x00000001, "ID" },
707 { 0, NULL }
710 static const value_string ndps_card_name_or_oid_enum[] = {
711 { 0x00000000, "Number" },
712 { 0x00000001, "ID" },
713 { 0, NULL }
716 static const value_string ndps_integer_or_oid_enum[] = {
717 { 0x00000000, "ID" },
718 { 0x00000001, "Number" },
719 { 0, NULL }
722 static const value_string ndps_persistence_enum[] = {
723 { 0x00000000, "Permanent" },
724 { 0x00000001, "Volatile" },
725 { 0, NULL }
728 static const value_string ndps_address_type_enum[] = {
729 { 0x00000000, "User" },
730 { 0x00000001, "Server" },
731 { 0x00000002, "Volume" },
732 { 0x00000003, "Organization Unit" },
733 { 0x00000004, "Organization" },
734 { 0x00000005, "Group" },
735 { 0x00000006, "Distinguished Name" },
736 { 0x00000007, "User or Container" },
737 { 0x00000008, "Case Exact String" },
738 { 0x00000009, "Case Ignore String" },
739 { 0x0000000a, "Numeric String" },
740 { 0x0000000b, "DOS File Name" },
741 { 0x0000000c, "Phone Number" },
742 { 0x0000000d, "Boolean" },
743 { 0x0000000e, "Integer" },
744 { 0x0000000f, "Network Address" },
745 { 0x00000010, "Choice" },
746 { 0x00000011, "GroupWise User" },
747 { 0, NULL }
749 static value_string_ext ndps_address_type_enum_ext = VALUE_STRING_EXT_INIT(ndps_address_type_enum);
751 static const value_string ndps_address_enum[] = {
752 { 0x00000000, "IPX" },
753 { 0x00000001, "IP" },
754 { 0x00000002, "SDLC" },
755 { 0x00000003, "Token Ring to Ethernet" },
756 { 0x00000004, "OSI" },
757 { 0x00000005, "AppleTalk" },
758 { 0x00000006, "Count" },
759 { 0, NULL }
763 static const value_string ndps_server_type_enum[] = {
764 { 0x00000000, "All" },
765 { 0x00000001, "Public Access Printer Agent" },
766 { 0x00000002, "Notification Server" },
767 { 0x00000003, "Resource Manager" },
768 { 0x00000004, "Network Port Handler" },
769 { 0, NULL }
772 static const value_string ndps_event_object_enum[] = {
773 { 0x00000000, "Object" },
774 { 0x00000001, "Filter" },
775 { 0x00000002, "Detail" },
776 { 0, NULL }
779 static const value_string ndps_service_type_enum[] = {
780 { 0x00000000, "SRS" },
781 { 0x00000001, "ENS" },
782 { 0x00000002, "RMS" },
783 { 0, NULL }
786 static const value_string ndps_delivery_add_enum[] = {
787 { 0x00000000, "MHS Address" },
788 { 0x00000001, "Distinguished Name" },
789 { 0x00000002, "Text" },
790 { 0x00000003, "Octet String" },
791 { 0x00000004, "Distinguished Name String" },
792 { 0x00000005, "RPC Address" },
793 { 0x00000006, "Qualified Name" },
794 { 0, NULL }
797 static const value_string ndps_resource_enum[] = {
798 { 0x00000000, "Name or ID" },
799 { 0x00000001, "Text" },
800 { 0, NULL }
804 static const value_string ndps_identifier_enum[] = {
805 { 0x00000000, "ID Nominal Number" },
806 { 0x00000001, "ID Alpha-numeric" },
807 { 0x00000002, "ID Tag" },
808 { 0, NULL }
811 static const value_string ndps_media_enum[] = {
812 { 0x00000000, "Select All Pages" },
813 { 0x00000001, "Selected Pages" },
814 { 0, NULL }
817 static const value_string ndps_page_size_enum[] = {
818 { 0x00000000, "ID" },
819 { 0x00000001, "Dimensions" },
820 { 0, NULL }
823 static const value_string ndps_pres_direction_enum[] = {
824 { 0x00000000, "Right to Bottom" },
825 { 0x00000001, "Left to Bottom" },
826 { 0x00000002, "Bidirectional to Bottom" },
827 { 0x00000003, "Right to Top" },
828 { 0x00000004, "Left to Top" },
829 { 0x00000005, "Bidirectional to Top" },
830 { 0x00000006, "Bottom to Right" },
831 { 0x00000007, "Bottom to Left" },
832 { 0x00000008, "Top to Left" },
833 { 0x00000009, "Top to Right" },
834 { 0, NULL }
836 static value_string_ext ndps_pres_direction_enum_ext = VALUE_STRING_EXT_INIT(ndps_pres_direction_enum);
838 static const value_string ndps_page_order_enum[] = {
839 { 0x00000000, "Unknown" },
840 { 0x00000001, "First to Last" },
841 { 0x00000002, "Last to First" },
842 { 0, NULL }
845 static const value_string ndps_medium_size_enum[] = {
846 { 0x00000000, "Discrete" },
847 { 0x00000001, "Continuous" },
848 { 0, NULL }
851 static const value_string ndps_page_orientation_enum[] = {
852 { 0x00000000, "Unknown" },
853 { 0x00000001, "Face Up" },
854 { 0x00000002, "Face Down" },
855 { 0, NULL }
858 static const value_string ndps_print_security[] = {
859 { 0x00000001, "Low" },
860 { 0x00000002, "Medium" },
861 { 0x00000003, "High" },
862 { 0, NULL }
865 static const value_string ndps_numbers_up_enum[] = {
866 { 0x00000000, "Cardinal" },
867 { 0x00000001, "Name or Object ID" },
868 { 0x00000002, "Cardinal Range" },
869 { 0, NULL }
873 static const value_string ndps_state_severity_enum[] = {
874 { 0x00000001, "Other" },
875 { 0x00000002, "Warning" },
876 { 0x00000003, "Critical" },
877 { 0, NULL }
881 static const value_string ndps_training_enum[] = {
882 { 0x00000001, "Other" },
883 { 0x00000002, "Unknown" },
884 { 0x00000003, "Untrained" },
885 { 0x00000004, "Trained" },
886 { 0x00000005, "Field Service" },
887 { 0x00000006, "Management" },
888 { 0, NULL }
891 static const value_string ndps_colorant_set_enum[] = {
892 { 0x00000000, "Name" },
893 { 0x00000001, "Description" },
894 { 0, NULL }
897 static const value_string ndps_card_enum_time_enum[] = {
898 { 0x00000000, "Cardinal" },
899 { 0x00000001, "Enumeration" },
900 { 0x00000002, "Time" },
901 { 0, NULL }
904 static const value_string ndps_attrs_arg_enum[] = {
905 { 0x00000000, "Continuation" },
906 { 0x00000001, "Specification" },
907 { 0, NULL }
911 static const value_string ndps_filter_enum[] = {
912 { 0x00000000, "Item" },
913 { 0x00000001, "And" },
914 { 0x00000002, "Or" },
915 { 0x00000003, "Not" },
916 { 0, NULL }
920 #if 0
921 static const value_string ndps_filter_item_enum[] = {
922 { 0x00000000, "Equality" },
923 { 0x00000001, "Substrings" },
924 { 0x00000002, "Greater then or Equal to" },
925 { 0x00000003, "Less then or Equal to" },
926 { 0x00000004, "Present" },
927 { 0x00000005, "Subset of" },
928 { 0x00000006, "Superset of" },
929 { 0x00000007, "Non NULL Set Intersect" },
930 { 0, NULL }
933 static const value_string ndps_match_criteria_enum[] = {
934 { 0x00000000, "Exact" },
935 { 0x00000001, "Case Insensitive" },
936 { 0x00000002, "Same Letter" },
937 { 0x00000003, "Approximate" },
938 { 0, NULL }
940 #endif
942 static const value_string ndps_operator_enum[] = {
943 { 0x00000000, "Attributes" },
944 { 0x00000002, "Ordered Jobs" },
945 { 0, NULL }
948 static const value_string ndps_resource_type_enum[] = {
949 { 0x00000000, "Printer Drivers" },
950 { 0x00000001, "Printer Definitions" },
951 { 0x00000002, "Printer Definitions Short" },
952 { 0x00000003, "Banner Page Files" },
953 { 0x00000004, "Font Types" },
954 { 0x00000005, "Printer Driver Files" },
955 { 0x00000006, "Printer Definition File" },
956 { 0x00000007, "Font Files" },
957 { 0x00000008, "Generic Type" },
958 { 0x00000009, "Generic Files" },
959 { 0x0000000a, "Printer Definition File 2" },
960 { 0x0000000b, "Printer Driver Types 2" },
961 { 0x0000000c, "Printer Driver Files 2" },
962 { 0x0000000d, "Printer Driver Types Archive" },
963 { 0x0000000e, "Languages Available" },
964 { 0, NULL }
966 static value_string_ext ndps_resource_type_enum_ext = VALUE_STRING_EXT_INIT(ndps_resource_type_enum);
968 static const value_string ndps_os_type_enum[] = {
969 { 0x00000000, "DOS" },
970 { 0x00000001, "Windows 3.1" },
971 { 0x00000002, "Windows 95" },
972 { 0x00000003, "Windows NT" },
973 { 0x00000004, "OS2" },
974 { 0x00000005, "MAC" },
975 { 0x00000006, "UNIX" },
976 { 0x00000007, "Windows NT 4.0" },
977 { 0x00000008, "Windows 2000/XP" },
978 { 0x00000009, "Windows 98" },
979 { 0xffffffff, "None" },
980 { 0, NULL }
982 static value_string_ext ndps_os_type_enum_ext = VALUE_STRING_EXT_INIT(ndps_os_type_enum);
984 static const value_string ndps_banner_type_enum[] = {
985 { 0x00000000, "All" },
986 { 0x00000001, "PCL" },
987 { 0x00000002, "PostScript" },
988 { 0x00000003, "ASCII Text" },
989 { 0, NULL }
992 static const value_string ndps_font_type_enum[] = {
993 { 0x00000000, "TrueType" },
994 { 0x00000001, "PostScript" },
995 { 0x00000002, "System" },
996 { 0x00000003, "SPD" },
997 { 0x00000004, "True Doc" },
998 { 0, NULL }
1001 static const value_string ndps_archive_enum[] = {
1002 { 0x00000000, "ZIP" },
1003 { 0x00000001, "JAR" },
1004 { 0, NULL }
1008 static const value_string ndps_res_type_enum[] = {
1009 { 0x00000000, "Printer Driver" },
1010 { 0x00000001, "Printer Definition" },
1011 { 0x00000002, "Banner Page" },
1012 { 0x00000003, "Font" },
1013 { 0x00000004, "Generic Resource" },
1014 { 0x00000005, "Print Driver Archive" },
1015 { 0, NULL }
1018 static const value_string ndps_print_arg_enum[] = {
1019 { 0x00000000, "Create Job" },
1020 { 0x00000001, "Add Document" },
1021 { 0x00000002, "Close Job" },
1022 { 0, NULL }
1025 static const value_string ndps_doc_content_enum[] = {
1026 { 0x00000000, "Content Included" },
1027 { 0x00000001, "Content Referenced" },
1028 { 0, NULL }
1031 static const value_string ndps_interrupt_job_enum[] = {
1032 { 0x00000000, "Job ID" },
1033 { 0x00000001, "Name" },
1034 { 0, NULL }
1037 static const value_string ndps_pause_job_enum[] = {
1038 { 0x00000000, "Job ID" },
1039 { 0x00000001, "Name" },
1040 { 0, NULL }
1043 static const value_string ndps_resubmit_op_enum[] = {
1044 { 0x00000000, "Copy" },
1045 { 0x00000001, "Move" },
1046 { 0, NULL }
1049 static const value_string ndps_shutdown_enum[] = {
1050 { 0x00000000, "Do Current Jobs" },
1051 { 0x00000001, "Immediate" },
1052 { 0x00000002, "Do Pending Jobs" },
1053 { 0, NULL }
1056 static const value_string ndps_list_profiles_choice_enum[] = {
1057 { 0x00000000, "ID" },
1058 { 0x00000001, "Filter" },
1059 { 0, NULL }
1062 static const value_string ndps_list_profiles_result_enum[] = {
1063 { 0x00000000, "Complete" },
1064 { 0x00000001, "No Event Objects" },
1065 { 0x00000002, "Profile ID's" },
1066 { 0, NULL }
1069 static const value_string ndps_ds_info_enum[] = {
1070 { 0x00000000, "Add" },
1071 { 0x00000001, "Remove" },
1072 { 0x00000002, "Update" },
1073 { 0, NULL }
1076 static const value_string ndps_list_services_enum[] = {
1077 { 0x00000000, "Supported" },
1078 { 0x00000001, "Enabled" },
1079 { 0, NULL }
1082 static const value_string ndps_data_item_enum[] = {
1083 { 0x00000000, "Int8" },
1084 { 0x00000001, "Int16" },
1085 { 0x00000002, "Int32" },
1086 { 0x00000003, "Boolean" },
1087 { 0x00000004, "Character String" },
1088 { 0x00000005, "Byte String" },
1089 { 0, NULL }
1092 static const value_string ndps_list_local_servers_enum[] = {
1093 { 0x00000000, "Specification" },
1094 { 0x00000001, "Continuation" },
1095 { 0, NULL }
1098 static const value_string ndps_delivery_method_enum[] = {
1099 { 0x00000000, "Specification" },
1100 { 0x00000001, "Continuation" },
1101 { 0, NULL }
1104 static const value_string ndps_attribute_enum[] = {
1105 { 0x00000000, "Null" },
1106 { 0x00000001, "Text" },
1107 { 0x00000002, "Descriptive Name" },
1108 { 0x00000003, "Descriptor" },
1109 { 0x00000004, "Message" },
1110 { 0x00000005, "Error Message" },
1111 { 0x00000006, "Simple Name" },
1112 { 0x00000007, "Distinguished Name String" },
1113 { 0x00000008, "Distinguished Name Seq" },
1114 { 0x00000009, "Delta Time" },
1115 { 0x0000000a, "Time" },
1116 { 0x0000000b, "Integer" },
1117 { 0x0000000c, "Integer Seq" },
1118 { 0x0000000d, "Cardinal" },
1119 { 0x0000000e, "Cardinal Seq" },
1120 { 0x0000000f, "Positive Integer" },
1121 { 0x00000010, "Integer Range" },
1122 { 0x00000011, "Cardinal Range" },
1123 { 0x00000012, "Maximum Integer" },
1124 { 0x00000013, "Minimum Integer" },
1125 { 0x00000014, "Integer 64" },
1126 { 0x00000015, "Integer 64 Seq" },
1127 { 0x00000016, "Cardinal 64" },
1128 { 0x00000017, "Cardinal 64 Seq" },
1129 { 0x00000018, "Positive Integer 64" },
1130 { 0x00000019, "Integer 64 Range" },
1131 { 0x0000001a, "Cardinal 64 Range" },
1132 { 0x0000001b, "Maximum Integer 64" },
1133 { 0x0000001c, "Minimum Integer 64" },
1134 { 0x0000001d, "Real" },
1135 { 0x0000001e, "Real Seq" },
1136 { 0x0000001f, "Non-Negative Real" },
1137 { 0x00000020, "Real Range" },
1138 { 0x00000021, "Non-Negative Real Range" },
1139 { 0x00000022, "Boolean" },
1140 { 0x00000023, "Percent" },
1141 { 0x00000024, "Object Identifier" },
1142 { 0x00000025, "Object Identifier Seq" },
1143 { 0x00000026, "Name or OID" },
1144 { 0x00000027, "Name or OID Seq" },
1145 { 0x00000028, "Distinguished Name" },
1146 { 0x00000029, "Relative Distinguished Name Seq" },
1147 { 0x0000002a, "Realization" },
1148 { 0x0000002b, "Medium Dimensions" },
1149 { 0x0000002c, "Dimension" },
1150 { 0x0000002d, "XY Dimensions" },
1151 { 0x0000002e, "Locations" },
1152 { 0x0000002f, "Area" },
1153 { 0x00000030, "Area Seq" },
1154 { 0x00000031, "Edge" },
1155 { 0x00000032, "Font Reference" },
1156 { 0x00000033, "Cardinal or OID" },
1157 { 0x00000034, "OID Cardinal Map" },
1158 { 0x00000035, "Cardinal or Name or OID" },
1159 { 0x00000036, "Positive Integer or OID" },
1160 { 0x00000037, "Event Handling Profile" },
1161 { 0x00000038, "Octet String" },
1162 { 0x00000039, "Priority" },
1163 { 0x0000003a, "Locale" },
1164 { 0x0000003b, "Method Delivery Address" },
1165 { 0x0000003c, "Object Identification" },
1166 { 0x0000003d, "Results Profile" },
1167 { 0x0000003e, "Criteria" },
1168 { 0x0000003f, "Job Password" },
1169 { 0x00000040, "Job Level" },
1170 { 0x00000041, "Job Categories" },
1171 { 0x00000042, "Print Checkpoint" },
1172 { 0x00000043, "Ignored Attribute" },
1173 { 0x00000044, "Resource" },
1174 { 0x00000045, "Medium Substitution" },
1175 { 0x00000046, "Font Substitution" },
1176 { 0x00000047, "Resource Context Seq" },
1177 { 0x00000048, "Sides" },
1178 { 0x00000049, "Page Select Seq" },
1179 { 0x0000004a, "Page Media Select" },
1180 { 0x0000004b, "Document Content" },
1181 { 0x0000004c, "Page Size" },
1182 { 0x0000004d, "Presentation Direction" },
1183 { 0x0000004e, "Page Order" },
1184 { 0x0000004f, "File Reference" },
1185 { 0x00000050, "Medium Source Size" },
1186 { 0x00000051, "Input Tray Medium" },
1187 { 0x00000052, "Output Bins Chars" },
1188 { 0x00000053, "Page ID Type" },
1189 { 0x00000054, "Level Range" },
1190 { 0x00000055, "Category Set" },
1191 { 0x00000056, "Numbers Up Supported" },
1192 { 0x00000057, "Finishing" },
1193 { 0x00000058, "Print Contained Object ID" },
1194 { 0x00000059, "Print Config Object ID" },
1195 { 0x0000005a, "Typed Name" },
1196 { 0x0000005b, "Network Address" },
1197 { 0x0000005c, "XY Dimensions Value" },
1198 { 0x0000005d, "Name or OID Dimensions Map" },
1199 { 0x0000005e, "Printer State Reason" },
1200 { 0x0000005f, "Enumeration" },
1201 { 0x00000060, "Qualified Name" },
1202 { 0x00000061, "Qualified Name Set" },
1203 { 0x00000062, "Colorant Set" },
1204 { 0x00000063, "Resource Printer ID" },
1205 { 0x00000064, "Event Object ID" },
1206 { 0x00000065, "Qualified Name Map" },
1207 { 0x00000066, "File Path" },
1208 { 0x00000067, "Uniform Resource Identifier" },
1209 { 0x00000068, "Cardinal or Enum or Time" },
1210 { 0x00000069, "Print Contained Object ID Set" },
1211 { 0x0000006a, "Octet String Pair" },
1212 { 0x0000006b, "Octet String Integer Pair" },
1213 { 0x0000006c, "Extended Resource Identifier" },
1214 { 0x0000006d, "Event Handling Profile 2" },
1215 { 0, NULL }
1217 static value_string_ext ndps_attribute_enum_ext = VALUE_STRING_EXT_INIT(ndps_attribute_enum);
1219 /* XXX: There are a number of duplicate values in the following. */
1220 /* (I've commented out the duplicate values which would not have
1221 been found via a linear search in the original (unsorted)
1222 version of this value_string array). */
1223 /* ToDo: Fixme */
1224 static const value_string ndps_error_types[] = {
1225 { 0x00000000, "Ok" },
1226 { 0x00000001, "Error" },
1227 /* { 0x01000001, "Invalid Parameter" },*/ /* Dup */
1228 { 0x01000002, "Parameter Value Unrecognized" },
1229 { 0x01000003, "Call Back Error" },
1230 { 0x01000004, "Standard IO Error" },
1231 { 0x01000005, "NDS Error" },
1232 { 0x01000006, "Unicode Error" },
1233 { 0x01000007, "Invalid Operator" },
1234 { 0x01000009, "Parameter Value Unsupported" },
1235 { 0x0100000a, "Windows Error" },
1236 { 0x0100000b, "WSA Last Error" },
1237 { 0x0100000c, "SLP Error" },
1238 { 0x0100000d, "NetWare Client Error" },
1239 { 0x03000005, "NDS Error with Position" },
1240 { 0x030a0001, "No Memory" },
1241 { 0x030a0009, "Artificial Memory Limit" },
1242 { 0x030a000c, "Memory Allocated with Wrong NLM ID" },
1244 { 0xffffe872, "(-6030) Error Abort Transaction" },
1245 { 0xffffe873, "(-6029) Attribute Maintenance in Progress" },
1246 { 0xffffe874, "(-6028) Error Must Wait Checkpoint" },
1247 { 0xffffe875, "(-6027) Unsupported Version" },
1248 { 0xffffe876, "(-6026) Referral Device Full" },
1249 { 0xffffe877, "(-6025) Error Backup Active" },
1250 { 0xffffe878, "(-6024) Referral File Not Found" },
1251 { 0xffffe879, "(-6023) Bad Referral File Number" },
1252 { 0xffffe87a, "(-6022) Error Referral Trans Gap" },
1253 { 0xffffe87b, "(-6021) Invalid File Sequence" },
1254 { 0xffffe87c, "(-6020) Bad Referral Serial Number" },
1255 { 0xffffe87d, "(-6019) Bad Referral Database Serial Number" },
1256 { 0xffffe87e, "(-6018) Serial Number Mismatch" },
1257 { 0xffffe87f, "(-6017) No Such Schema" },
1258 { 0xffffe880, "(-6016) Error Returning Partial Results" },
1259 { 0xffffe881, "(-6015) Server in Skulk" },
1260 { 0xffffe882, "(-6014) Error Old View" },
1261 { 0xffffe883, "(-6013) Error Setting up for Write" },
1262 { 0xffffe884, "(-6012) Error Setting Up for Read" },
1263 { 0xffffe885, "(-6011) Error Flushing File" },
1264 { 0xffffe886, "(-6010) Error Initializing IO System" },
1265 { 0xffffe887, "(-6009) Error Renaming File" },
1266 { 0xffffe888, "(-6008) Error Deleting File" },
1267 { 0xffffe889, "(-6007) Error Checking File Existence" },
1268 { 0xffffe88a, "(-6006) Error Getting Free Blocks" },
1269 { 0xffffe88b, "(-6005) Error Expanding File" },
1270 { 0xffffe88c, "(-6004) Error Getting File Info" },
1271 { 0xffffe88d, "(-6003) Error Closing File" },
1272 { 0xffffe88e, "(-6002) Error Parsing File Name" },
1273 { 0xffffe88f, "(-6001) Error Truncating File" },
1275 { 0xFFFFFAFD, "Notify Failed to Authenticate Connection Error" },
1276 { 0xFFFFFAFE, "Notify Failed to Authenticate Internal Error" },
1277 { 0xFFFFFAFF, "Notify Failed to Authenticate Protocol Mismatch" },
1279 { 0xFFFFFB00, "Notify Failed to Authenticate" },
1280 { 0xFFFFFB01, "Notify Duplicate Session ID" },
1281 { 0xFFFFFB02, "Notify Unknown Attribute Object ID" },
1282 { 0xFFFFFB03, "Notify Invalid SLP URL Format" },
1283 { 0xFFFFFB04, "Notify Invalid SLP Attribute Format" },
1284 { 0xFFFFFB05, "Notify Failed to Launch RPC Server" },
1285 { 0xFFFFFB06, "Notify No Protocols Available" },
1286 { 0xFFFFFB07, "Notify Failed to Startup Winsock" },
1287 { 0xFFFFFB08, "Notify IP Not Supported By Method" },
1288 { 0xFFFFFB09, "Notify IPX Not Supported By Method" },
1289 { 0xFFFFFB0A, "Notify No Filter Provided" },
1290 { 0xFFFFFB0B, "Notify Maximum Methods Supported" },
1291 { 0xFFFFFB0C, "Notify Broker Has No File Rights" },
1292 { 0xFFFFFB0D, "Notify Bad Volume in Address" },
1293 { 0xFFFFFB0E, "Notify Failed to Send Notification" },
1294 { 0xFFFFFB0F, "Notify User Object No Default Server" },
1295 { 0xFFFFFB10, "Notify Unsupported Delivery Address Type" },
1296 { 0xFFFFFB11, "Notify Delivery Method Rejected Address" },
1297 { 0xFFFFFB12, "Notify Foreign NDS Tree Name" },
1298 { 0xFFFFFB13, "Notify Service Not Fully Enabled" },
1299 { 0xFFFFFB14, "Notify Using Unknown Methods" },
1300 { 0xFFFFFB15, "Notify Public Already Defined" },
1301 { 0xFFFFFB16, "Notify Unresolved External" },
1302 { 0xFFFFFB17, "Notify Autoload Modules Not Loaded" },
1303 { 0xFFFFFB18, "Notify Can't Load at Startup" },
1304 { 0xFFFFFB19, "Notify Inconsistent File Format" },
1305 { 0xFFFFFB1A, "Notify Initialization Failure" },
1306 { 0xFFFFFB1B, "Notify Already in Progress" },
1307 { 0xFFFFFB1C, "Notify Reentrant Initialization Failure" },
1308 { 0xFFFFFB1D, "Notify Wrong NLM File Version" },
1309 { 0xFFFFFB1E, "Notify Not NLM File Format" },
1310 { 0xFFFFFB1F, "Notify Error Reading File" },
1311 { 0xFFFFFB20, "Notify Could Not Find File" },
1312 { 0xFFFFFB21, "Notify Invalid Continuation Handle" },
1313 { 0xFFFFFB22, "Notify Unknown Continuation Handle" },
1314 { 0xFFFFFB23, "Notify Bad Method Filename" },
1315 { 0xFFFFFB24, "Notify No Persistent Storage" },
1316 { 0xFFFFFB25, "Notify No Effective Rights" },
1317 { 0xFFFFFB26, "Notify Initialization Error" },
1318 { 0xFFFFFB27, "Notify Unknown RPC Session" },
1319 { 0xFFFFFB28, "Notify Option Not Supported" },
1320 { 0xFFFFFB29, "Notify Unknown Notify Handle" },
1321 { 0xFFFFFB2A, "Notify Empty Event Object Set" },
1322 { 0xFFFFFB2B, "Notify Failed to Register With Any Server" },
1323 { 0xFFFFFB2C, "Notify No Service Registry Available" },
1324 { 0xFFFFFB2D, "Notify Not Admin Type Session" },
1325 { 0xFFFFFB2E, "Notify Not Supplied Type of Session" },
1326 { 0xFFFFFB2F, "Notify User Interface Not Supported" },
1327 { 0xFFFFFB30, "Notify Failed to Make Change Permanent" },
1328 { 0xFFFFFB31, "Notify Unknown Designator" },
1329 { 0xFFFFFB32, "Notify Unknown Object ID" },
1330 { 0xFFFFFB33, "Notify Error Writing Database" },
1331 { 0xFFFFFB34, "Notify Unknown Attribute Value" },
1332 { 0xFFFFFB35, "Notify Unknown Choice" },
1333 { 0xFFFFFB36, "Notify Invalid Credentials" },
1334 { 0xFFFFFB37, "Notify Duplicate Session ID" },
1335 { 0xFFFFFB38, "Notify Invalid Arguments" },
1336 { 0xFFFFFB39, "Notify Can't Load Delivery Method" },
1337 { 0xFFFFFB3A, "Notify Queue Empty" },
1338 { 0xFFFFFB3B, "Notify Unknown Language ID" },
1339 { 0xFFFFFB3C, "Out of Notify Entries" },
1340 { 0xFFFFFB3D, "Notify Unknown Modify Operation" },
1341 { 0xFFFFFB3E, "Notify Service Disabled" },
1342 { 0xFFFFFB3F, "Notify Unknown Method" },
1343 { 0xFFFFFB40, "Notify Method Already Installed" },
1344 { 0xFFFFFB41, "Notify Unknown Event Object ID" },
1345 { 0xFFFFFB42, "Corrupted Notify Database" },
1346 { 0xFFFFFB43, "Wrong Notify Database Version" },
1347 { 0xFFFFFB44, "Notify Error Writing File" },
1348 { 0xFFFFFB45, "Notify Error Reading File" },
1349 { 0xFFFFFB46, "Notify Unknown Notify Profile" },
1350 { 0xFFFFFB47, "Notify Unknown Session" },
1351 { 0xFFFFFB48, "Notify No Attribute Values" },
1352 { 0xFFFFFB49, "Notify DS Value Size Too Large" },
1353 { 0xFFFFFB4A, "Notify Service Name Must be Fully Distinguished" },
1354 { 0xFFFFFB4B, "Notify Failed Login" },
1355 { 0xFFFFFB4C, "Notify Failed to Create Context" },
1356 { 0xFFFFFB4D, "Notify Failed to Get Messages" },
1357 { 0xFFFFFB4E, "Notify Failed to Create Thread" },
1358 { 0xFFFFFB4F, "Notify Bad NetWare Version" },
1359 { 0xFFFFFB50, "Notify Out of Memory" }, /* Notification Service Errors */
1360 { 0xFFFFFB99, "Registry Invalid Continuation Handle" },
1361 { 0xFFFFFB9A, "Registry Not in List Iteration" },
1362 { 0xFFFFFB9B, "Registry Option Not Supported" },
1363 { 0xFFFFFB9C, "Registry Unknown Designator" },
1364 { 0xFFFFFB9D, "Not Registry Type Session" },
1365 { 0xFFFFFB9E, "Registry Not Server Type Session" },
1366 { 0xFFFFFB9F, "Registry Server Type Session" },
1367 { 0xFFFFFBA0, "Registry Type Session" },
1368 { 0xFFFFFBA1, "Registry Invalid Credential" },
1369 { 0xFFFFFBA2, "Registry Unknown Server Entry" },
1370 { 0xFFFFFBA3, "Registry Duplicate Session ID" },
1371 { 0xFFFFFBA4, "Registry Invalid Arguments" },
1372 { 0xFFFFFBA5, "Registry Can't Create Client" },
1373 { 0xFFFFFBA6, "Registry Can't Bind to Registry" },
1374 { 0xFFFFFBA7, "Registry Duplicate Server Entry" },
1375 { 0xFFFFFBA8, "Registry Can't Start Advertise" },
1376 { 0xFFFFFBA9, "Registry Unknown Modify Operation" },
1377 { 0xFFFFFBAA, "Registry Service Disabled" },
1378 { 0xFFFFFBAB, "Registry Unknown Session" },
1379 { 0xFFFFFBAC, "Registry No Attribute Values" },
1380 { 0xFFFFFBAD, "Registry DS Value Size Too Large" },
1381 { 0xFFFFFBAE, "Registry Service Name Must Be Fully Distinguished" },
1382 { 0xFFFFFBAF, "Registry Failed to Get Messages" },
1383 { 0xFFFFFBB0, "Registry Failed to Create Thread" },
1384 { 0xFFFFFBB1, "Registry Failed Login" },
1385 { 0xFFFFFBB2, "Registry Failed to Create Context" },
1386 { 0xFFFFFBB3, "Registry Bad NetWare Version" },
1387 { 0xFFFFFBB4, "Registry Out of Memory" }, /* SRS Errors */
1388 { 0xFFFFFBEE, "Broker Service Failed to Initialize" },
1389 { 0xFFFFFBEF, "Broker Other Broker Using Object" },
1390 { 0xFFFFFBF0, "Broker Public Already Defined" },
1391 { 0xFFFFFBF1, "Broker Unresolved External" },
1392 { 0xFFFFFBF2, "Broker Autoload Modules Not Loaded" },
1393 { 0xFFFFFBF3, "Broker Can't Load at Startup" },
1394 { 0xFFFFFBF4, "Broker Inconsistent File Format" },
1395 { 0xFFFFFBF5, "Broker Initialize Failure" },
1396 { 0xFFFFFBF6, "Broker Already in Progress" },
1397 { 0xFFFFFBF7, "Broker Reentrant Initialization Failure" },
1398 { 0xFFFFFBF8, "Broker Wrong NLM File Version" },
1399 { 0xFFFFFBF9, "Broker Not NLM File Format" },
1400 { 0xFFFFFBFA, "Broker Error Reading File" },
1401 { 0xFFFFFBFB, "Broker Could Not Find File" },
1402 { 0xFFFFFBFC, "Broker No Effective Rights" },
1403 { 0xFFFFFBFD, "Broker Option Not Supported" },
1404 { 0xFFFFFBFE, "Broker Not Admin Type Session" },
1405 { 0xFFFFFBFF, "Broker Failed to Make Change Permanent" },
1407 { 0xFFFFFC00, "Broker Unknown Designator" },
1408 { 0xFFFFFC01, "Broker Invalid Credential" },
1409 { 0xFFFFFC02, "Broker Service Already Disabled" },
1410 { 0xFFFFFC03, "Broker Service Already Enabled" },
1411 { 0xFFFFFC04, "Broker Unknown Service" },
1412 { 0xFFFFFC05, "Broker Duplicate Session ID" },
1413 { 0xFFFFFC06, "Broker Invalid Arguments" },
1414 { 0xFFFFFC07, "Broker Unknown Modify Operation" },
1415 { 0xFFFFFC08, "Broker Service Disabled" },
1416 { 0xFFFFFC09, "Broker Unknown Session" },
1417 { 0xFFFFFC0A, "Broker No Attribute Values" },
1418 { 0xFFFFFC0B, "Broker DS Value Size Too Large" },
1419 { 0xFFFFFC0C, "Broker Uninitialized Module" },
1420 { 0xFFFFFC0D, "Broker Service Name Must be Fully Distinguished" },
1421 { 0xFFFFFC0E, "Broker Failed to Allocate Resources" },
1422 { 0xFFFFFC0F, "Broker Failed to Get Messages" },
1423 { 0xFFFFFC10, "Broker Failed to Initialize NUT" },
1424 { 0xFFFFFC11, "Broker Failed to Create Thread" },
1425 { 0xFFFFFC12, "Invalid Broker Name" },
1426 { 0xFFFFFC13, "Invalid Broker Password" },
1427 { 0xFFFFFC14, "Not Broker Class" },
1428 { 0xFFFFFC15, "Broker Name Not Given" },
1429 { 0xFFFFFC16, "Broker Wrong Command Line Arguments" },
1430 { 0xFFFFFC17, "Broker Bad NetWare Version" },
1431 { 0xFFFFFC18, "Broker Out of Memory" }, /* Broker Errors */
1432 { 0xFFFFFC2F, "Resource Manager Failed to Write INF in Address" },
1433 { 0xFFFFFC30, "Resource Manager File is Zero Length" },
1434 { 0xFFFFFC31, "Resource Manager Can't Create Resource Reference" },
1435 { 0xFFFFFC32, "Resource Manager Can't Initialize NDPS Library" },
1436 { 0xFFFFFC33, "Resource Manager No Rights to Remote Resdir" },
1437 { 0xFFFFFC34, "Resource Manager Failed to Authenticate Connection Error" },
1438 { 0xFFFFFC35, "Resource Manager Failed to Authenticate Internal Error" },
1439 { 0xFFFFFC36, "Resource Manager Failed to Authenticate Protocol Mismatch" },
1440 { 0xFFFFFC37, "Resource Manager Failed to Authenticate" },
1441 { 0xFFFFFC38, "Resource Manager Unresolved External" },
1442 { 0xFFFFFC39, "Resource Manager Invalid SLP URL Format" },
1443 { 0xFFFFFC3A, "Resource Manager Invalid SLP Attribute Format" },
1444 { 0xFFFFFC3B, "Resource Manager Failed to Launch RPC Server" },
1445 { 0xFFFFFC3C, "Resource Manager No Protocols Available" },
1446 { 0xFFFFFC3D, "Resource Manager Failed to Start Winsock" },
1447 { 0xFFFFFC3E, "Resource Manager Connection Lost RMS Data" },
1448 { 0xFFFFFC3F, "Resource Manager Duplicate TIRPC Session" },
1449 { 0xFFFFFC40, "Resource Manager Font Manager Failure" },
1450 { 0xFFFFFC41, "Resource Manager Font Manager Path Too Long" },
1451 { 0xFFFFFC42, "Resource Manager Font Manager Bad Parameter" },
1452 { 0xFFFFFC43, "Resource Manager Font Manager System Error" },
1453 { 0xFFFFFC44, "Resource Manager Font Manager Not Initialized" },
1454 { 0xFFFFFC45, "Resource Manager Font Manager No Such Font" },
1455 { 0xFFFFFC46, "Resource Manager Font Manager Corrupt Index File" },
1456 { 0xFFFFFC47, "Resource Manager Font Manager Sequence Error" },
1457 { 0xFFFFFC48, "Resource Manager Font Manager Reentrancy" },
1458 { 0xFFFFFC49, "Resource Manager Font Manager IO Error" },
1459 { 0xFFFFFC4B, "Resource Manager Session Being Removed" },
1460 { 0xFFFFFC4C, "Resource Manager Unknown RPC Session" },
1461 { 0xFFFFFC4D, "Resource Manager Document ID Format Error" },
1462 { 0xFFFFFC4E, "Resource Manager Bad File Attribute" },
1463 { 0xFFFFFC4F, "Resource Manager No Effective Rights" },
1464 { 0xFFFFFC50, "Resource Manager Not Admin Session" },
1465 { 0xFFFFFC51, "Resource Manager Unknown Designator" },
1466 { 0xFFFFFC52, "Resource Manager Failed to Register to Any Server" },
1467 { 0xFFFFFC53, "Resource Manager No Service Registry Available" },
1468 { 0xFFFFFC54, "Resource Manager Initialization Error" },
1469 { 0xFFFFFC55, "Resource Manager Invalid Arguments" },
1470 { 0xFFFFFC56, "Resource Manager Unicode Convention Error" },
1471 { 0xFFFFFC57, "Resource Manager Option Not Supported" },
1472 { 0xFFFFFC58, "Resource Manager No Printer Types in List" },
1473 { 0xFFFFFC59, "Resource Manager Printer Definition Type Unknown" },
1474 { 0xFFFFFC5A, "Resource Manager No Banner Files Present" },
1475 { 0xFFFFFC5B, "Resource Manager OS Not Supported" },
1476 { 0xFFFFFC5C, "Resource Manager List Type Unknown" },
1477 { 0xFFFFFC5D, "Resource Manager Banner Type Invalid" },
1478 { 0xFFFFFC5E, "Resource Manager No Such Filename" },
1479 { 0xFFFFFC5F, "Resource Manager Resource Type Invalid" },
1480 { 0xFFFFFC60, "Resource Manager Write File Error" },
1481 { 0xFFFFFC61, "Resource Manager Read File Error" },
1482 { 0xFFFFFC62, "Resource Manager File Open Error" },
1483 { 0xFFFFFC63, "Resource Manager No INF Files Present" },
1484 { 0xFFFFFC64, "Resource Manager No Printer Type in INF File" },
1485 { 0xFFFFFC65, "Resource Manager INF File Format Error" },
1486 { 0xFFFFFC66, "Resource Manager NPD Files Generation Error" },
1487 { 0xFFFFFC67, "Resource Manager Failed to Login" },
1488 { 0xFFFFFC68, "Resource Manager Failed to Create Context" },
1489 { 0xFFFFFC69, "Resource Manager Failed to Get Messages" },
1490 { 0xFFFFFC6A, "Resource Manager Failed to Register With any Server" },
1491 { 0xFFFFFC6B, "Resource Manager No Service Registry Available" },
1492 { 0xFFFFFC6C, "Resource Manager Invalid Credentials" },
1493 { 0xFFFFFC6D, "Resource Manager Duplicate Session ID" },
1494 { 0xFFFFFC6E, "Resource Manager Unknown Modify Operation" },
1495 { 0xFFFFFC6F, "Resource Manager Service Disabled" },
1496 { 0xFFFFFC70, "Resource Manager Error Writing File" },
1497 { 0xFFFFFC71, "Resource Manager Error Reading File" },
1498 { 0xFFFFFC72, "Resource Manager Unknown Session" },
1499 { 0xFFFFFC73, "Resource Manager No Attribute Values" },
1500 { 0xFFFFFC74, "Resource Manager DS Value Size Too Large" },
1501 { 0xFFFFFC75, "Resource Manager Service Name Must be Fully Distinguished" },
1502 { 0xFFFFFC76, "Resource Manager Failed to Create Thread" },
1503 { 0xFFFFFC77, "Resource Manager Invalid Broker Name" },
1504 { 0xFFFFFC78, "Resource Manager Invalid Broker Password" },
1505 { 0xFFFFFC79, "Resource Manager Broker Name Not Given" },
1506 { 0xFFFFFC7A, "Resource Manager Wrong Command Line Arguments" },
1507 { 0xFFFFFC7B, "Resource Manager Bad NetWare Version" },
1508 { 0xFFFFFC7C, "Resource Manager Out of Memory" }, /* ResMan Errors */
1509 #if 0 /* Dups */
1510 { 0xFFFFFC6D, "Database Descriptor Being Deleted" },
1511 { 0xFFFFFC6E, "Database Descriptor In Use" },
1512 { 0xFFFFFC6F, "Database Object Exists" },
1513 { 0xFFFFFC70, "Database Already Deleted" },
1514 { 0xFFFFFC71, "Database Can't Delete Printer Agent Directory" },
1515 { 0xFFFFFC72, "Database Can't Write Index File" },
1516 { 0xFFFFFC73, "Database Can't Write Data File" },
1517 { 0xFFFFFC74, "Database Can't Read Index File" },
1518 { 0xFFFFFC75, "Database Can't Read Data File" },
1519 { 0xFFFFFC76, "Database Can't Rename File" },
1520 { 0xFFFFFC77, "Database Index File Not Open" },
1521 { 0xFFFFFC78, "Database Can't Open Index File" },
1522 { 0xFFFFFC79, "Database Can't Open Data File" },
1523 { 0xFFFFFC7A, "Database Can't Find Data File" },
1524 { 0xFFFFFC7B, "Database Can't Create File" },
1525 #endif
1526 { 0xFFFFFCAD, "NDPSM SRS Service Error" },
1527 { 0xFFFFFCAE, "NDPSM Broker Server Connecting" },
1528 { 0xFFFFFCAF, "NDPSM Failed Validation" },
1529 { 0xFFFFFCB0, "NDPSM RMS Service Error" },
1530 { 0xFFFFFCB1, "NDPSM Accounting Service Error" },
1531 { 0xFFFFFCB2, "NDPSM Could not Create Account Reference" },
1532 { 0xFFFFFCB3, "NDPSM Changing Connection" },
1533 { 0xFFFFFCB4, "NDPSM No Scheduler" },
1534 { 0xFFFFFCB5, "NDPSM Job is Active" },
1535 { 0xFFFFFCB6, "NDPSM Can't Write Document File" },
1536 { 0xFFFFFCB7, "NDPSM Can't Open Document File" },
1537 { 0xFFFFFCB8, "NDPSM Can't Delete Document File" },
1538 { 0xFFFFFCB9, "NDPSM Can't Create Document File" },
1539 { 0xFFFFFCBA, "NDPSM Too Many NetWare Servers" },
1540 { 0xFFFFFCBB, "NDPSM Can't Attach" },
1541 { 0xFFFFFCBC, "NDPSM Already Attached" },
1542 { 0xFFFFFCBD, "NDPSM No Mandatory Attribute" },
1543 { 0xFFFFFCBE, "NDPSM PDS Refuses Rename" },
1544 { 0xFFFFFCBF, "NDPSM Duplicate Value" },
1545 { 0xFFFFFCC0, "NDPSM RPC Failure" },
1546 { 0xFFFFFCC1, "NDPSM Session Not Found" },
1547 { 0xFFFFFCC2, "NDPSM PDS Not Responding" },
1548 { 0xFFFFFCC3, "NDPSM Medium Needs Mounted" },
1549 { 0xFFFFFCC4, "NDPSM Notification Service Error" },
1550 { 0xFFFFFCC5, "NDPSM PSM Going Down" },
1551 { 0xFFFFFCC6, "NDPSM PSM Initializing" },
1552 { 0xFFFFFCC7, "NDPSM Version Incompatible" },
1553 { 0xFFFFFCC8, "NDPSM Object Not Locked" },
1554 { 0xFFFFFCC9, "NDPSM Bad Printer Agent Handle" },
1555 { 0xFFFFFCCA, "NDPSM Printer Agent Paused" },
1556 { 0xFFFFFCCB, "NDPSM Printer Agent Disabled" },
1557 { 0xFFFFFCCC, "NDPSM Printer Agent Going Down" },
1558 { 0xFFFFFCCD, "NDPSM Printer Agent Initializing" },
1559 { 0xFFFFFCCE, "NDPSM Communications Error" },
1560 { 0xFFFFFCCF, "NDPSM Job Not Found" },
1561 { 0xFFFFFCD0, "NDPSM Invalid Value Syntax" },
1562 { 0xFFFFFCD1, "NDPSM Values Not Comparable" },
1563 { 0xFFFFFCD2, "NDPSM Value Not Found" },
1564 { 0xFFFFFCD3, "NDPSM Attribute Not Found" },
1565 { 0xFFFFFCD4, "NDPSM Object Not Found" },
1566 { 0xFFFFFCD5, "NDPSM Bad Parameter" },
1567 { 0xFFFFFCD6, "NDPSM Invalid Class" },
1568 { 0xFFFFFCD7, "NDPSM No PDS" },
1569 { 0xFFFFFCD8, "NDPSM Error Accessing Database" },
1570 { 0xFFFFFCD9, "NDPSM Unsupported Operation" },
1571 { 0xFFFFFCDA, "NDPSM Undefined Type" },
1572 { 0xFFFFFCDB, "NDPSM Unsupported Type" },
1573 { 0xFFFFFCDC, "NDPSM Job Retention Limit" },
1574 { 0xFFFFFCDD, "NDPSM Job Storage Limit" },
1575 { 0xFFFFFCDE, "NDPSM Memory Not Found" },
1576 { 0xFFFFFCDF, "NDPSM No Memory" }, /* NDPSM Errors */
1577 { 0xfffffce1, "(-799) Error Getting File Size" },
1578 { 0xfffffce2, "(-798) Error Positioning in File" },
1579 { 0xfffffce3, "(-797) Error Direct Writing File" },
1580 { 0xfffffce4, "(-796) Error Writing File" },
1581 { 0xfffffce5, "(-795) Error Direct Reading File" },
1582 { 0xfffffce6, "(-794) Error Reading File" },
1583 { 0xfffffce7, "(-793) Error Direct Creating File" },
1584 { 0xfffffce8, "(-792) Error Creating File" },
1585 { 0xfffffce9, "(-791) Error Direct Opening File" },
1586 { 0xfffffcea, "(-790) Error Opening File" },
1587 { 0xfffffceb, "(-789) Invalid Template" },
1588 { 0xfffffcec, "(-788) Error Schema Partition" },
1589 { 0xfffffced, "(-787) Illegal Schema Attribute" },
1590 { 0xfffffcee, "(-786) DIB IO Failure" },
1591 { 0xfffffcef, "(-785) DIB Error" },
1592 { 0xfffffcf0, "(-784) Wait Timeout" },
1593 { 0xfffffcf1, "(-783) VRDIM Not Initialized" },
1594 { 0xfffffcf2, "(-782) Root Unreachable" },
1595 { 0xfffffcf3, "(-781) Entry Not Local" },
1596 { 0xfffffcf4, "(-780) Request not Supported" },
1597 { 0xfffffcf5, "(-779) Error Cannot Go Remote" },
1598 { 0xfffffcf6, "(-778) VpVector and VpvUser which must be correlated, are out of sync" },
1599 { 0xfffffcf7, "(-777) Attempted to modify an object's attribute that is not stored on the sparse replica" },
1600 { 0xfffffcf8, "(-776) Attempted to perform an NDS operation, and the DS agent on this server is closing" },
1601 { 0xfffffcf9, "(-775) Invalid OID Format" },
1602 { 0xfffffcfa, "(-774) Repairing DIB" },
1603 { 0xfffffcfb, "(-773) Iterator Syntax" },
1604 { 0xfffffcfc, "(-772) Illegal Transaction Operation" },
1605 { 0xfffffcfd, "(-771) Transaction Active" },
1606 { 0xfffffcfe, "(-770) No Transaction Active" },
1607 { 0xfffffcff, "(-769) Duplicate Naming" },
1609 { 0xfffffd00, "(-768) Query Maximum Count" },
1610 { 0xfffffd01, "(-767) Query Timeout" },
1611 { 0xfffffd02, "(-766) Incompatible Replica Version" },
1612 { 0xfffffd03, "(-765) EOF Hit" },
1613 { 0xfffffd04, "(-764) BOF Hit" },
1614 { 0xfffffd05, "(-763) Verb Exceeds Table Length" },
1615 { 0xfffffd06, "(-762) Verb Locked" },
1616 { 0xfffffd07, "(-761) Have Seen State" },
1617 { 0xfffffd08, "(-760) Auxiliary On Alias" },
1618 { 0xfffffd09, "(-759) Auxiliary Not Effective" },
1619 { 0xfffffd0a, "(-758) Auxiliary Not Container" },
1620 { 0xfffffd0b, "(-757) Auxiliary Has Containment" },
1621 { 0xfffffd0c, "(-756) Stream Exists" },
1622 { 0xfffffd0d, "(-755) Invalid Synchronization Data" },
1623 { 0xfffffd0e, "(-754) Callback Cancel" },
1624 { 0xfffffd0f, "(-753) Incompatible OS" },
1625 { 0xfffffd10, "(-752) GUID Failure" },
1626 { 0xfffffd11, "(-751) Unknown Target" },
1627 { 0xfffffd12, "(-750) Operation Cancelled" },
1628 { 0xfffffd13, "(-749) Too Many Referrals" },
1629 { 0xfffffd14, "(-748) Connection Timeout" },
1630 { 0xfffffd15, "(-747) Would Block" },
1631 { 0xfffffd16, "(-746) Zero Creation Time" },
1632 { 0xfffffd17, "(-745) Cache in Use" },
1633 { 0xfffffd18, "(-744) Invalid Control State" },
1634 { 0xfffffd19, "(-743) Invalid Control Function" },
1635 { 0xfffffd1a, "(-742) Wrong DS Version" },
1636 { 0xfffffd1b, "(-741) Name Type Not Supported" },
1637 { 0xfffffd1c, "(-740) SAS Already Registered" },
1638 { 0xfffffd1d, "(-739) Invalid SAS Version" },
1639 { 0xfffffd1e, "(-738) SAS Locked" },
1640 { 0xfffffd1f, "(-737) No Such Template" },
1641 { 0xfffffd20, "(-736) End of Stream" },
1642 { 0xfffffd21, "(-735) Nothing to Abort" },
1643 { 0xfffffd24, "(-732) Database Locked" },
1644 { 0xfffffd25, "(-731) Value Data" },
1645 { 0xfffffd26, "(-730) MASV Bad Range" },
1646 { 0xfffffd27, "(-729) MASV Not Found" },
1647 { 0xfffffd28, "(-728) MASV Already Exists" },
1648 { 0xfffffd29, "(-727) MASV Failure" },
1649 { 0xfffffd2a, "(-726) MASV Invalid Request" },
1650 { 0xfffffd2b, "(-725) MASV No Access" },
1651 { 0xfffffd2c, "(-724) DClient Unavailable" },
1652 { 0xFFFFFD2D, "JPM Accounting Already Serviced" },
1653 { 0xFFFFFD2E, "JPM No CLIB Context" },
1654 { 0xFFFFFD2F, "JPM Printer Agent Shutdown" },
1655 { 0xFFFFFD30, "JPM Printer Agent Paused" },
1656 { 0xFFFFFD31, "JPM Version Incompatible" },
1657 { 0xFFFFFD32, "JPM Print Handler Not Registered" },
1658 { 0xFFFFFD33, "JPM Document Already Closed" },
1659 { 0xFFFFFD34, "JPM Job Already Closed" },
1660 { 0xFFFFFD35, "JPM Bad Object Type" },
1661 { 0xFFFFFD36, "JPM Could not Access Database" },
1662 { 0xFFFFFD37, "JPM Job Not Found" },
1663 { 0xFFFFFD38, "JPM No Job" },
1664 { 0xFFFFFD39, "JPM Printer Agent Already Serviced By PDS" },
1665 { 0xFFFFFD3A, "JPM Not Accepting Requests" },
1666 { 0xFFFFFD3B, "JPM Invalid Request" },
1667 { 0xFFFFFD3C, "JPM Printer Agent Not Found" },
1668 { 0xFFFFFD3D, "JPM Request Queue Full" },
1669 { 0xFFFFFD3E, "JPM Unsupported Operation" },
1670 { 0xFFFFFD3F, "JPM Bad Document Handle" },
1671 { 0xFFFFFD40, "JPM Bad Job Handle" },
1672 { 0xFFFFFD41, "JPM Bad Printer Agent Handle" },
1673 { 0xFFFFFD42, "JPM Failed to Read Document File" },
1674 { 0xFFFFFD43, "JPM Failed to Open Document" },
1675 { 0xFFFFFD44, "JPM Execute Request Later" },
1676 #if 0 /* dups */
1677 { 0xfffffd2d, "(-723) Stream Not Found" },
1678 { 0xfffffd2e, "(-722) Operational Schema Mismatch" },
1679 { 0xfffffd2f, "(-721) No Such Federation Link" },
1680 { 0xfffffd30, "(-720) Connection Denied" },
1681 { 0xfffffd31, "(-719) Invalid Value Handle" },
1682 { 0xfffffd32, "(-718) Invalid Entry Handle" },
1683 { 0xfffffd33, "(-717) CRC Failure" },
1684 { 0xfffffd34, "(-716) Checksumming Not Supported" },
1685 { 0xfffffd35, "(-715) Checksum Failure" },
1686 { 0xfffffd36, "(-714) Not Implemented" },
1687 { 0xfffffd37, "(-713) Invalid Delimiters" },
1688 { 0xfffffd38, "(-712) Invalid Escape Character" },
1689 { 0xfffffd39, "(-711) Invalid Code Page" },
1690 { 0xfffffd3a, "(-710) Database Read Fail" },
1691 { 0xfffffd3b, "(-709) Insufficient Sockets" },
1692 { 0xfffffd3c, "(-708) Invalid Response" },
1693 { 0xfffffd3d, "(-707) Invalid Signature" },
1694 { 0xfffffd3e, "(-706) Not a Sibling" },
1695 { 0xfffffd3f, "(-705) Duplicate Containment" },
1696 { 0xfffffd40, "(-704) No Master Replica" },
1697 { 0xfffffd41, "(-703) Duplicate Template" },
1698 { 0xfffffd42, "(-702) Invalid Parameter" },
1699 { 0xfffffd43, "(-701) Synchronization Disabled" },
1700 { 0xfffffd44, "(-700) Obsolete API" },
1701 #endif
1702 { 0xfffffd45, "(-699) Fatal" },
1703 { 0xfffffd46, "(-698) Replica in Skulk" },
1704 { 0xfffffd47, "(-697) DS Cannot Reload" },
1705 { 0xfffffd48, "(-696) DS Loader Busy" },
1706 { 0xfffffd49, "(-695) Agent Already Registered" },
1707 { 0xfffffd4a, "(-694) Lost Entry" },
1708 { 0xfffffd4b, "(-693) Missing Reference" },
1709 { 0xfffffd4c, "(-692) Incorrect Base Class" },
1710 { 0xfffffd4d, "(-691) Modification Time Not Current" },
1711 { 0xfffffd4e, "(-690) Invalid RDN" },
1712 { 0xfffffd4f, "(-689) Invalid Subordinate Count" },
1713 { 0xfffffd50, "(-688) Cache Overflow" },
1714 { 0xfffffd51, "(-687) Cannot Abort" },
1715 { 0xfffffd52, "(-686) Not a Leaf Partition" },
1716 { 0xfffffd53, "(-685) Move in Progress" },
1717 { 0xfffffd54, "(-684) Secure NCP Violation" },
1718 { 0xfffffd55, "(-683) Invalid API Version" },
1719 { 0xfffffd56, "(-682) Auditing Failed" },
1720 { 0xfffffd57, "(-681) Alias of an Alias" },
1721 { 0xfffffd58, "(-680) Transport Modified" },
1722 { 0xfffffd59, "(-679) Partition Already Exists" },
1723 { 0xfffffd5a, "(-678) Duplicate ACL" },
1724 { 0xfffffd5b, "(-677) Invalid Identity" },
1725 { 0xfffffd5c, "(-676) Invalid Connection Handle" },
1726 { 0xfffffd5d, "(-675) Invalid Task" },
1727 { 0xfffffd5e, "(-674) Invalid Name Service" },
1728 { 0xfffffd5f, "(-673) Replica Not On" },
1729 { 0xfffffd60, "(-672) No Access" },
1730 { 0xfffffd61, "(-671) No Such Parent" },
1731 { 0xfffffd62, "(-670) Invalid Context" },
1732 { 0xfffffd63, "(-669) Failed Authentication" },
1733 { 0xfffffd64, "(-668) Entry Not Container" },
1734 { 0xfffffd65, "(-667) Partition Root" },
1735 { 0xfffffd66, "(-666) Incompatible DS Version" },
1736 { 0xfffffd67, "(-665) New Epoch" },
1737 { 0xfffffd68, "(-664) Old Epoch" },
1738 { 0xfffffd69, "(-663) DS Locked" },
1739 { 0xfffffd6a, "(-662) DS Volume IO Failure" },
1740 { 0xfffffd6b, "(-661) DS Volume Not Mounted" },
1741 { 0xfffffd6c, "(-660) Record in Use" },
1742 { 0xfffffd6d, "(-659) Time Not Synchronized" },
1743 { 0xfffffd6e, "(-658) Skulk in Progress" },
1744 { 0xfffffd6f, "(-657) Schema Sync in Progress" },
1745 { 0xfffffd70, "(-656) Crucial Replica" },
1746 { 0xfffffd71, "(-655) Multiple Replicas" },
1747 { 0xfffffd72, "(-654) Partition Busy" },
1748 { 0xfffffd73, "(-653) Duplicate Optional" },
1749 { 0xfffffd74, "(-652) Duplicate Mandatory" },
1750 { 0xfffffd75, "(-651) Ambiguous Naming" },
1751 { 0xfffffd76, "(-650) Ambiguous Containment" },
1752 { 0xfffffd77, "(-649) Insufficient Buffer" },
1753 { 0xfffffd78, "(-648) Insufficient Stack" },
1754 { 0xfffffd79, "(-647) Not Root Partition" },
1755 { 0xfffffd7a, "(-646) Bad Naming Attributes" },
1756 { 0xfffffd7b, "(-645) Class Already Exists" },
1757 { 0xfffffd7c, "(-644) Schema is in Use" },
1758 { 0xfffffd7d, "(-643) Schema is Non-removable" },
1759 { 0xfffffd7e, "(-642) Invalid Iteration" },
1760 { 0xfffffd7f, "(-641) Invalid Request" },
1761 { 0xfffffd80, "(-640) Invalid Certificate" },
1762 { 0xfffffd81, "(-639) Incomplete Authentication" },
1763 { 0xfffffd82, "(-638) No Character Mapping" },
1764 { 0xfffffd83, "(-637) Previous Move in Progress" },
1765 { 0xfffffd84, "(-636) Unreachable Server" },
1766 { 0xfffffd85, "(-635) Remote Failure" },
1767 { 0xfffffd86, "(-634) No Referrals" },
1768 { 0xfffffd87, "(-633) Invalid Entry for Root" },
1769 { 0xfffffd88, "(-632) System Failure" },
1770 { 0xfffffd89, "(-631) Illegal Replica Type" },
1771 { 0xfffffd8a, "(-630) Different Tree" },
1772 { 0xfffffd8b, "(-629) Entry is Not Leaf" },
1773 { 0xfffffd8c, "(-628) Object Class Violation" },
1774 { 0xfffffd8d, "(-627) Can't Remove Naming Value" },
1775 { 0xfffffd8e, "(-626) All Referrals Failed" },
1776 { 0xfffffd8f, "(-625) Transport Failure" },
1777 { 0xfffffd90, "(-624) Replica Already Exists" },
1778 { 0xfffffd91, "(-623) Syntax Invalid in Name" },
1779 { 0xfffffd92, "(-622) Invalid Transport" },
1780 { 0xfffffd93, "(-621) Transaction Tracking Disabled" },
1781 { 0xfffffd94, "(-620) Comparison Failed" },
1782 { 0xfffffd95, "(-619) Invalid Comparison" },
1783 { 0xfffffd96, "(-618) Inconsistent Database" },
1784 { 0xfffffd97, "(-617) Database Format" },
1785 { 0xfffffd98, "(-616) Maximum Entries Exist" },
1786 { 0xfffffd99, "(-615) Attribute Already Exists" },
1787 { 0xfffffd9a, "(-614) Duplicate Value" },
1788 { 0xfffffd9b, "(-613) Syntax Violation" },
1789 { 0xfffffd9c, "(-612) Can't Have Multiple Values" },
1790 { 0xfffffd9d, "(-611) Illegal Containment" },
1791 { 0xfffffd9e, "(-610) Illegal DS Name" },
1792 { 0xfffffd9f, "(-609) Missing Mandatory" },
1793 { 0xfffffda0, "(-608) Illegal Attribute" },
1794 { 0xfffffda1, "(-607) Not Effective Class" },
1795 { 0xfffffda2, "(-606) Entry Already Exists" },
1796 { 0xfffffda3, "(-605) No Such Partition" },
1797 { 0xfffffda4, "(-604) No Such Class" },
1798 { 0xfffffda5, "(-603) No Such Attribute" },
1799 { 0xfffffda6, "(-602) No Such Value" },
1800 { 0xfffffda7, "(-601) No Such Entry" },
1802 { 0xfffffe97, "(-361) Iterator Invalid Scope" },
1803 { 0xfffffe98, "(-360) Iterator Invalid Search Data" },
1804 { 0xfffffe99, "(-359) Iterator Invalid Position" },
1805 { 0xfffffe9a, "(-358) Iterator Invalid Handle" },
1806 { 0xfffffe9b, "(-357) NDS for NT - Sync Disabled" },
1807 { 0xfffffe9c, "(-356) NDS for NT - No Domain" },
1808 { 0xfffffe9d, "(-355) Not NDS for NT" },
1809 { 0xfffffe9e, "(-354) Rename Not Allowed" },
1810 { 0xfffffe9f, "(-353) DN Too Long" },
1811 { 0xfffffea0, "(-352) No Writable Replicas" },
1812 { 0xfffffea1, "(-351) Attempt to Authenticate" },
1813 { 0xfffffea2, "(-350) Not Context Owner" },
1814 { 0xfffffea3, "(-349) Unicode Already Loaded" },
1815 { 0xfffffea4, "(-348) Unicode File Not Found" },
1816 { 0xfffffea5, "(-347) Schema Name Too Long" },
1817 { 0xfffffea6, "(-346) Unicode Translation" },
1818 { 0xfffffea7, "(-345) Invalid DS Version" },
1819 { 0xfffffea8, "(-344) Invalid TDS" },
1820 { 0xfffffea9, "(-343) Attribute Name Too Long" },
1821 { 0xfffffeaa, "(-342) Invalid DS Name" },
1822 { 0xfffffeab, "(-341) No Such Syntax" },
1823 { 0xfffffeac, "(-340) Transport Failed" },
1824 { 0xfffffead, "(-339) Failed Server Authentication" },
1825 { 0xfffffeae, "(-338) Invalid Password Characters" },
1826 { 0xfffffeaf, "(-337) Not Logged In" },
1827 { 0xfffffeb0, "(-336) Data Store Failure" },
1828 { 0xfffffeb1, "(-335) Duplicate Type" },
1829 { 0xfffffeb2, "(-334) RDN Too Long" },
1830 { 0xfffffeb3, "(-333) No Connection" },
1831 { 0xfffffeb4, "(-332) No Server Found" },
1832 { 0xfffffeb5, "(-331) Null Pointer" },
1833 { 0xfffffeb6, "(-330) Invalid Server Response" },
1834 { 0xfffffeb7, "(-329) Invalid Union Tag" },
1835 { 0xfffffeb8, "(-328) Unicode Error during Context Creation" },
1836 { 0xfffffeba, "(-326) Invalid Filter Syntax" },
1837 { 0xfffffebb, "(-325) Invalid Attribute Syntax" },
1838 { 0xfffffebc, "(-324) Invalid Replica Type" },
1839 { 0xfffffebd, "(-323) Buffer Zero Length" },
1840 { 0xfffffebe, "(-322) Invalid Iteration Handle" },
1841 { 0xfffffebf, "(-321) Unable to Attach" },
1842 { 0xfffffec0, "(-320) Can't Add Root" },
1843 { 0xfffffec1, "(-319) Internal Error" },
1844 { 0xfffffec2, "(-318) Country Name Too Long" },
1845 { 0xfffffec3, "(-317) Inconsistent MultiAVA" },
1846 { 0xfffffec4, "(-316) Too Many Tokens" },
1847 { 0xfffffec5, "(-315) Expected RDN Delimiter" },
1848 { 0xfffffec6, "(-314) Invalid Object Name" },
1849 { 0xfffffec7, "(-313) Filter Tree Empty" },
1850 { 0xfffffec8, "(-312) Attribute Type Not Expected" },
1851 { 0xfffffec9, "(-311) Attribute Type Expected" },
1852 { 0xfffffeca, "(-310) Expected Equals" },
1853 { 0xfffffecb, "(-309) Expected Identifier" },
1854 { 0xfffffecc, "(-308) Bad Verb" },
1855 { 0xfffffecd, "(-307) Buffer Empty" },
1856 { 0xfffffece, "(-306) Bad Syntax" },
1857 { 0xfffffecf, "(-305) List Empty" },
1858 { 0xfffffed0, "(-304) Buffer Full" },
1859 { 0xfffffed1, "(-303) Bad Context" },
1860 { 0xfffffed2, "(-302) Bad Key" },
1861 { 0xfffffed3, "(-301) Not Enough Memory" },
1863 { 0xffffff01, "(-255) Hard Failure" },
1864 { 0xffffff02, "(-254) Bindery Locked/Directory Locked/Spool Delete/Trustee not Found/Timeout" },
1865 { 0xffffff03, "(-253) Bad Station Number" },
1866 { 0xffffff04, "(-252) Message Queue Full/Target Already Has Message/No Such Object" },
1867 { 0xffffff05, "(-251) Unknown Request/No Such Property" },
1868 { 0xffffff06, "(-250) Temp Remap" },
1869 { 0xffffff07, "(-249) No Property Read Rights" },
1870 { 0xffffff08, "(-248) No Property Write Rights" },
1871 { 0xffffff09, "(-247) No Property Create Rights" },
1872 { 0xffffff0a, "(-246) No Property Delete Rights" },
1873 { 0xffffff0b, "(-245) No Object Create Rights" },
1874 { 0xffffff0c, "(-244) No Object Delete Rights" },
1875 { 0xffffff0d, "(-243) No Object Rename Rights" },
1876 { 0xffffff0e, "(-242) No Object Read Rights" },
1877 { 0xffffff0f, "(-241) Bindery Security" },
1878 { 0xffffff10, "(-240) Illegal Wildcard" },
1879 { 0xffffff11, "(-239) Illegal Name" },
1880 { 0xffffff12, "(-238) Object Already Exists" },
1881 { 0xffffff13, "(-237) Property Already Exists" },
1882 { 0xffffff14, "(-236) No Such Value Set" },
1883 { 0xffffff15, "(-235) Property Not Group" },
1884 { 0xffffff16, "(-234) No Such Member" },
1885 { 0xffffff17, "(-233) Member Already Exists" },
1886 { 0xffffff18, "(-232) Write to Group Property" },
1887 { 0xffffff20, "(-224) No Login Connection Available" },
1888 { 0xffffff21, "(-223) Password Expired" },
1889 { 0xffffff22, "(-222) Bad Password" },
1890 { 0xffffff24, "(-220) Login Account Expired" },
1891 { 0xffffff25, "(-219) Queue Maximum Servers/Node Address Violation" },
1892 { 0xffffff26, "(-218) Queue Halted/Bad Login Time" },
1893 { 0xffffff27, "(-217) Queue Station Not Server/Maximum Logins Exceeded" },
1894 { 0xffffff28, "(-216) Queue Not Active/Password Too Short" },
1895 { 0xffffff29, "(-215) Queue In Service/Duplicate Password" },
1896 { 0xffffff2a, "(-214) No Queue Job Rights/Unencrypted Not Allowed" },
1897 { 0xffffff2b, "(-213) No Queue Job" },
1898 { 0xffffff2c, "(-212) Queue Full" },
1899 { 0xffffff2d, "(-211) No Queue Rights" },
1900 { 0xffffff2e, "(-210) No Queue Server" },
1901 { 0xffffff2f, "(-209) No Queue" },
1902 { 0xffffff30, "(-208) Queue IO Failure" },
1903 { 0xffffff3a, "(-198) No Console Rights" },
1904 { 0xffffff3b, "(-197) Intruder Login Lockout" },
1905 { 0xffffff3c, "(-196) Accounting Disabled" },
1906 { 0xffffff3d, "(-195) Too Many Holds" },
1907 { 0xffffff3e, "(-194) Credit Limit Exceeded" },
1908 { 0xffffff3f, "(-193) No Account Balance" },
1909 { 0xffffff40, "(-192) No Accounting Privileges" },
1910 { 0xffffff41, "(-191) Invalid Name Space" },
1911 { 0xffffff42, "(-190) Invalid Data Stream" },
1912 { 0xffffff43, "(-189) Login Encryption Required" },
1913 { 0xffffff44, "(-188) Login Signing Required" },
1914 { 0xffffff58, "(-168) Access Denied" },
1915 { 0xffffff59, "(-167) Invalid Resource Tag" },
1916 { 0xffffff5a, "(-166) Already in Use" },
1917 { 0xffffff5b, "(-165) Invalid Open/Create Mode" },
1918 { 0xffffff5c, "(-164) Rename Directory Invalid" },
1919 { 0xffffff5d, "(-163) Transaction Restarted" },
1920 { 0xffffff5e, "(-162) IO Locked" },
1921 { 0xffffff5f, "(-161) Directory IO Error" },
1922 { 0xffffff60, "(-160) Directory Not Empty" },
1923 { 0xffffff61, "(-159) Directory Active" },
1924 { 0xffffff62, "(-158) Bad File Name" },
1925 { 0xffffff63, "(-157) No Directory Handles" },
1926 { 0xffffff64, "(-156) Invalid Path/No Such Extension" },
1927 { 0xffffff65, "(-155) Bad Directory Handle" },
1928 { 0xffffff66, "(-154) Rename Across Volume" },
1929 { 0xffffff67, "(-153) Directory Full" },
1930 { 0xffffff68, "(-152) Invalid Volume" },
1931 { 0xffffff69, "(-151) No Spool Space" },
1932 { 0xffffff6a, "(-150) No Alloc Space/Target Not a Subdirectory/Insufficient Memory" },
1933 { 0xffffff6b, "(-149) File Detached" },
1934 { 0xffffff6c, "(-148) No Write Privilege" },
1935 { 0xffffff6d, "(-147) No Read Privilege" },
1936 { 0xffffff6e, "(-146) All Names Exist" },
1937 { 0xffffff6f, "(-145) Some names Exist" },
1938 { 0xffffff70, "(-144) All Read Only" },
1939 { 0xffffff71, "(-143) Some Read Only" },
1940 { 0xffffff72, "(-142) All File in Use" },
1941 { 0xffffff73, "(-141) Some File in Use" },
1942 { 0xffffff74, "(-140) No Set Privilege" },
1943 { 0xffffff75, "(-139) No Rename Privilege" },
1944 { 0xffffff76, "(-138) No Delete Privilege" },
1945 { 0xffffff77, "(-137) No Search Privilege" },
1946 { 0xffffff78, "(-136) Invalid File Handle" },
1947 { 0xffffff79, "(-135) Create File with Invalid Name" },
1948 { 0xffffff7a, "(-134) Create Duplicate When Read Only" },
1949 { 0xffffff7b, "(-133) No Create Delete Privilege" },
1950 { 0xffffff7c, "(-132) No Create Privilege" },
1951 { 0xffffff7d, "(-131) Hard IO Error" },
1952 { 0xffffff7e, "(-130) No Open Privilege" },
1953 { 0xffffff7f, "(-129) Out of Handles" },
1954 { 0xffffff80, "(-128) Lock Fail" },
1955 { 0xffffff81, "(-127) Lock Waiting" },
1956 { 0xffffff82, "(-126) NCP Boundary Check Failed" },
1957 { 0xffffff83, "(-125) Connection Not Logged In" },
1958 { 0xffffff84, "(-124) Connection Not Authenticated" },
1959 { 0xffffff85, "(-123) Connection Already Logged In" },
1960 { 0xffffff86, "(-122) Connection Already Temporary" },
1961 { 0xffffff87, "(-121) No Items Found" },
1962 { 0xffffff88, "(-120) RR Volume Flag Not Set" },
1963 { 0xffffff89, "(-119) Buffer too Small" },
1965 { 0xffffffff, "(-1) Insufficient Space" },
1966 { 0, NULL }
1968 static value_string_ext ndps_error_types_ext = VALUE_STRING_EXT_INIT(ndps_error_types);
1970 static const value_string ndps_credential_enum[] = {
1971 { 0, "SIMPLE" },
1972 { 1, "CERTIFIED" },
1973 { 2, "NDPS 0" },
1974 { 3, "NDPS 1" },
1975 { 4, "NDPS 2" },
1976 { 0, NULL }
1979 static const value_string ndps_object_op_enum[] = {
1980 { 0, "None" },
1981 { 1, "Add" },
1982 { 2, "Delete" },
1983 { 3, "Delete Object" },
1984 { 0, NULL }
1987 static const value_string ndps_client_server_enum[] = {
1988 { 0, "Client" },
1989 { 1, "Server" },
1990 { 2, "Client and Server" },
1991 { 0, NULL }
1994 static const value_string ndps_session_type_enum[] = {
1995 { 0, "Unknown" },
1996 { 1, "User" },
1997 { 2, "Admin" },
1998 { 3, "Server" },
1999 { 4, "Registry" },
2000 { 0, NULL }
2003 static const value_string ndps_get_session_type_enum[] = {
2004 { 0, "Unknown" },
2005 { 1, "User" },
2006 { 2, "Admin" },
2007 { 3, "Supplier" },
2008 { 0, NULL }
2011 static const value_string ndps_get_resman_session_type_enum[] = {
2012 { 0, "Unknown" },
2013 { 1, "User" },
2014 { 2, "Admin" },
2015 { 0, NULL }
2018 static int
2019 align_4(tvbuff_t *tvb, int aoffset)
2021 if(tvb_captured_length_remaining(tvb, aoffset) > 4 )
2023 return (aoffset%4);
2025 return 0;
2029 * XXX - is there something in the packet to indicate whether a string
2030 * is ASCII or Unicode, or is it a characteristic of the attribute?
2031 * Currently, we use a heuristic - if the length is odd, we assume
2032 * it's ASCII (as it's a length in bytes, not characters), otherwise if
2033 * if the length is 2, we assume it's ASCII (as strings are null-
2034 * terminated, so a Unicode string would have to be at least 4 bytes),
2035 * otherwise if the second byte of the string is 0, we assume it's
2036 * Unicode (as an ASCII string would, in that case, have at least two
2037 * characters before the terminating NUL).
2039 static int
2040 ndps_string(tvbuff_t* tvb, int hfinfo, proto_tree *ndps_tree, int offset, char **stringval)
2042 int foffset = offset;
2043 uint32_t str_length;
2044 char *string;
2046 str_length = tvb_get_ntohl(tvb, foffset);
2047 foffset += 4;
2048 if(str_length == 0)
2050 proto_tree_add_string(ndps_tree, hfinfo, tvb, offset, 4, "<Not Specified>");
2051 if (stringval != NULL)
2052 *stringval = wmem_strdup(wmem_packet_scope(), "");
2053 return foffset;
2055 if (str_length <= 2 || (str_length & 0x01) || tvb_get_uint8(tvb, foffset + 1) != 0) {
2057 * ASCII.
2059 string = tvb_get_string_enc(wmem_packet_scope(), tvb, foffset, str_length, ENC_ASCII|ENC_NA); /* XXX - extended ASCII? */;
2060 } else {
2062 * Unicode.
2064 string = tvb_get_string_enc(wmem_packet_scope(), tvb, foffset, str_length, ENC_UTF_16|ENC_LITTLE_ENDIAN);
2066 foffset += str_length;
2067 proto_tree_add_string(ndps_tree, hfinfo, tvb, offset, str_length + 4, string);
2068 foffset += align_4(tvb, foffset);
2069 if (stringval != NULL)
2070 *stringval = string;
2071 return foffset;
2074 static int
2075 objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2077 uint32_t length;
2078 const char *label=NULL;
2079 uint32_t label_value=0;
2080 proto_tree *atree;
2081 proto_item *aitem;
2082 bool found=true;
2084 length = tvb_get_ntohl(tvb, foffset);
2085 if (length==0)
2087 return foffset;
2089 if (ndps_show_oids)
2091 proto_tree_add_uint(ndps_tree, hf_oid_struct_size, tvb, foffset, 4, length);
2093 foffset += 4;
2094 switch (length)
2096 case 9:
2097 label_value = tvb_get_ntohl(tvb, foffset+5);
2098 label = try_val_to_str(label_value, object_ids_7);
2099 if (label==NULL)
2101 label = wmem_strdup(wmem_packet_scope(), "Unknown ID");
2102 found=false;
2104 aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_7, tvb, foffset, length, label_value, "%s", label);
2105 break;
2106 case 10:
2107 label_value = tvb_get_ntohl(tvb, foffset+6);
2108 label = try_val_to_str(label_value, object_ids_8);
2109 if (label==NULL)
2111 label = wmem_strdup(wmem_packet_scope(), "Unknown ID");
2112 found=false;
2114 aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_8, tvb, foffset, length, label_value, "%s", label);
2115 break;
2116 case 11:
2117 label_value = tvb_get_ntohl(tvb, foffset+7);
2118 label = try_val_to_str(label_value, object_ids_9);
2119 if (label==NULL)
2121 label = wmem_strdup(wmem_packet_scope(), "Unknown ID");
2122 found=false;
2124 aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_9, tvb, foffset, length, label_value, "%s", label);
2125 break;
2126 case 12:
2127 label_value = tvb_get_ntohl(tvb, foffset+8);
2128 label = try_val_to_str(label_value, object_ids_10);
2129 if (label==NULL)
2131 label = wmem_strdup(wmem_packet_scope(), "Unknown ID");
2132 found=false;
2134 aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_10, tvb, foffset, length, label_value, "%s", label);
2135 break;
2136 case 13:
2137 label_value = tvb_get_ntohl(tvb, foffset+9);
2138 label = try_val_to_str(label_value, object_ids_11);
2139 if (label==NULL)
2141 label = wmem_strdup(wmem_packet_scope(), "Unknown ID");
2142 found=false;
2144 aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_11, tvb, foffset, length, label_value, "%s", label);
2145 break;
2146 case 14:
2147 label_value = tvb_get_ntohl(tvb, foffset+10);
2148 label = try_val_to_str(label_value, object_ids_12);
2149 if (label==NULL)
2151 label = wmem_strdup(wmem_packet_scope(), "Unknown ID");
2152 found=false;
2154 aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_12, tvb, foffset, length, label_value, "%s", label);
2155 break;
2156 case 15:
2157 label_value = tvb_get_ntohl(tvb, foffset+11);
2158 label = try_val_to_str(label_value, object_ids_13);
2159 if (label==NULL)
2161 label = wmem_strdup(wmem_packet_scope(), "Unknown ID");
2162 found=false;
2164 aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_13, tvb, foffset, length, label_value, "%s", label);
2165 break;
2166 case 16:
2167 label_value = tvb_get_ntohl(tvb, foffset+12);
2168 label = try_val_to_str(label_value, object_ids_14);
2169 if (label==NULL)
2171 label = wmem_strdup(wmem_packet_scope(), "Unknown ID");
2172 found=false;
2174 aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_14, tvb, foffset, length, label_value, "%s", label);
2175 break;
2176 case 17:
2177 label_value = tvb_get_ntohl(tvb, foffset+13);
2178 label = try_val_to_str(label_value, object_ids_15);
2179 if (label==NULL)
2181 label = wmem_strdup(wmem_packet_scope(), "Unknown ID");
2182 found=false;
2184 aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_15, tvb, foffset, length, label_value, "%s", label);
2185 break;
2186 case 18:
2187 label_value = tvb_get_ntohl(tvb, foffset+14);
2188 label = try_val_to_str(label_value, object_ids_16);
2189 if (label==NULL)
2191 label = wmem_strdup(wmem_packet_scope(), "Unknown ID");
2192 found=false;
2194 aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_16, tvb, foffset, length, label_value, "%s", label);
2195 break;
2196 default:
2197 aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_7, tvb, foffset, length, 1, "Unknown ID");
2198 found=false;
2199 break;
2201 if (!found)
2203 label_value = 1;
2204 label = try_val_to_str(label_value, object_ids_7);
2206 if (ndps_show_oids)
2208 atree = proto_item_add_subtree(aitem, ett_ndps);
2209 proto_tree_add_item(atree, hf_oid_asn1_type, tvb, foffset, 1, ENC_BIG_ENDIAN);
2210 foffset += 1;
2211 length = tvb_get_uint8(tvb, foffset);
2212 foffset += 1;
2213 proto_tree_add_item(atree, hf_ndps_oid, tvb, foffset, length, ENC_NA);
2214 foffset += length;
2216 else
2218 if (!found)
2220 tvb_ensure_bytes_exist(tvb, foffset, length);
2221 foffset += length;
2223 else
2225 foffset += 1;
2226 length = tvb_get_uint8(tvb, foffset);
2227 foffset += 1;
2228 tvb_ensure_bytes_exist(tvb, foffset, length);
2229 foffset += length;
2232 global_attribute_name = label;
2233 return foffset+(length%2);
2236 static int
2237 name_or_id(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2239 uint32_t name_or_id_val;
2241 name_or_id_val = tvb_get_ntohl(tvb, foffset);
2242 proto_tree_add_uint(ndps_tree, hf_ndps_nameorid, tvb, foffset, 4, name_or_id_val);
2243 foffset += 4;
2244 switch (name_or_id_val)
2246 case 1: /* Global */
2247 foffset = objectidentifier(tvb, ndps_tree, foffset);
2248 break;
2250 case 2: /* Local */
2251 foffset = ndps_string(tvb, hf_ndps_local_object_name, ndps_tree, foffset, NULL);
2252 break;
2254 foffset += align_4(tvb, foffset);
2255 return foffset;
2258 static int
2259 qualifiedname(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2261 uint32_t qualified_name_type=0;
2263 qualified_name_type = tvb_get_ntohl(tvb, foffset);
2264 proto_tree_add_uint(ndps_tree, hf_ndps_qualified_name, tvb, foffset, 4, qualified_name_type);
2265 foffset += 4;
2266 if (qualified_name_type != 0) {
2267 if (qualified_name_type == 1) {
2268 foffset = ndps_string(tvb, hf_ndps_printer_name, ndps_tree, foffset, NULL);
2270 else
2272 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
2273 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
2276 return foffset;
2279 static int
2280 objectidentification(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2282 uint32_t object_type=0;
2283 proto_tree *atree;
2284 proto_item *aitem;
2286 object_type = tvb_get_ntohl(tvb, foffset);
2287 aitem = proto_tree_add_item(ndps_tree, hf_obj_id_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
2288 atree = proto_item_add_subtree(aitem, ett_ndps);
2289 foffset += 4;
2290 switch(object_type)
2292 case 0: /* Printer Contained Object ID */
2293 foffset = ndps_string(tvb, hf_ndps_printer_name, atree, foffset, NULL);
2294 proto_tree_add_item(atree, hf_ndps_object, tvb, foffset,
2295 4, ENC_BIG_ENDIAN);
2296 foffset += 4;
2297 break;
2298 case 1: /* Document Identifier */
2299 foffset = ndps_string(tvb, hf_ndps_printer_name, atree, foffset, NULL);
2300 proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset,
2301 4, ENC_BIG_ENDIAN);
2302 foffset += 4;
2303 break;
2304 case 2: /* Object Identifier */
2305 foffset = objectidentifier(tvb, atree, foffset);
2306 break;
2307 case 3: /* Object Name */
2308 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
2309 if (foffset > tvb_captured_length_remaining(tvb, foffset)) {
2310 return foffset;
2312 foffset = name_or_id(tvb, atree, foffset);
2313 break;
2314 case 4: /* Name or Object ID */
2315 foffset = name_or_id(tvb, atree, foffset);
2316 break;
2317 case 5: /* Simple Name */
2318 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
2319 break;
2320 case 6: /* Printer Configuration Object ID */
2321 foffset = ndps_string(tvb, hf_ndps_printer_name, atree, foffset, NULL);
2322 break;
2323 case 7: /* Qualified Name */
2324 foffset = qualifiedname(tvb, ndps_tree, foffset);
2325 break;
2326 case 8: /* Event Object ID */
2327 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
2328 foffset = objectidentifier(tvb, atree, foffset);
2329 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset,
2330 4, ENC_BIG_ENDIAN);
2331 foffset += 4;
2332 default:
2333 break;
2335 return foffset;
2338 static int
2339 print_address(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2341 uint32_t addr_type=0;
2342 uint32_t addr_len=0;
2344 addr_type = tvb_get_ntohl(tvb, foffset);
2345 proto_tree_add_uint(ndps_tree, hf_ndps_address, tvb, foffset, 4, addr_type);
2346 foffset += 4;
2347 addr_len = tvb_get_ntohl(tvb, foffset);
2348 proto_tree_add_item(ndps_tree, hf_address_len, tvb, foffset, 4, ENC_BIG_ENDIAN);
2349 foffset += 4;
2351 * XXX - are these address types the same as the NDS_PTYPE_ #defines
2352 * in packet-ncp2222.inc?
2354 * XXX - should this code - and the code in packet-ncp2222.inc to
2355 * dissect addresses - check the length for the types it supports?
2357 switch(addr_type)
2359 case 0x00000000:
2360 proto_tree_add_item(ndps_tree, hf_ndps_net, tvb, foffset, 4, ENC_NA);
2361 proto_tree_add_item(ndps_tree, hf_ndps_node, tvb, foffset+4, 6, ENC_NA);
2362 proto_tree_add_item(ndps_tree, hf_ndps_socket, tvb, foffset+10, 2, ENC_BIG_ENDIAN);
2363 break;
2364 case 0x00000001:
2365 proto_tree_add_item(ndps_tree, hf_ndps_port, tvb, foffset, 2, ENC_BIG_ENDIAN);
2366 proto_tree_add_item(ndps_tree, hf_ndps_ip, tvb, foffset+2, 4, ENC_BIG_ENDIAN);
2367 break;
2368 default:
2369 break;
2371 tvb_ensure_bytes_exist(tvb, foffset, addr_len);
2372 foffset += addr_len;
2373 return foffset+(addr_len%4);
2376 static int
2377 address_item(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2379 uint32_t addr_type=0;
2381 addr_type = tvb_get_ntohl(tvb, foffset);
2382 proto_tree_add_uint(ndps_tree, hf_address_type, tvb, foffset, 4, addr_type);
2383 foffset += 4;
2384 switch(addr_type)
2386 case 0:
2387 case 1:
2388 case 2:
2389 case 3:
2390 case 4:
2391 case 5:
2392 case 6:
2393 case 7:
2394 foffset = qualifiedname(tvb, ndps_tree, foffset);
2395 break;
2396 case 8:
2397 case 9:
2398 case 10:
2399 case 11:
2400 case 12:
2401 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
2402 break;
2403 case 13:
2404 proto_tree_add_item(ndps_tree, hf_ndps_attrib_boolean, tvb, foffset, 4, ENC_BIG_ENDIAN);
2405 foffset += 4;
2406 break;
2407 case 14:
2408 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
2409 foffset += 4;
2410 break;
2411 case 15:
2412 foffset = print_address(tvb, ndps_tree, foffset);
2413 break;
2414 case 16:
2415 case 17:
2416 default:
2417 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
2418 break;
2420 return foffset;
2423 static int
2424 credentials(tvbuff_t* tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
2426 uint32_t cred_type=0;
2427 uint32_t length=0;
2428 uint32_t number_of_items;
2429 uint32_t ii;
2430 proto_tree *atree;
2431 proto_item *aitem, *expert_item;
2433 cred_type = tvb_get_ntohl(tvb, foffset);
2434 proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
2435 foffset += 4;
2436 switch (cred_type)
2438 case 0:
2439 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL);
2440 number_of_items=tvb_get_ntohl(tvb, foffset);
2441 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_passwords, tvb, foffset, 4, number_of_items);
2442 foffset += 4;
2443 for (ii = 0; ii < number_of_items; ii++ )
2445 if (ii >= NDPS_MAX_ITEMS) {
2446 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
2447 break;
2449 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Password %d", ii+1);
2450 length = tvb_get_ntohl(tvb, foffset);
2451 foffset += 4;
2452 if (length!=0)
2454 proto_tree_add_item(atree, hf_ndps_password, tvb, foffset, length, ENC_NA);
2456 proto_item_set_end(aitem, tvb, foffset);
2457 foffset += length;
2459 break;
2460 case 1:
2461 length = tvb_get_ntohl(tvb, foffset);
2462 foffset += 4;
2463 if (length!=0)
2465 proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, ENC_NA);
2467 foffset += length;
2468 break;
2469 case 2:
2470 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL);
2471 foffset += 2;
2472 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, ENC_BIG_ENDIAN);
2473 foffset += 2;
2474 break;
2475 case 3:
2476 length=tvb_get_ntohl(tvb, foffset);
2477 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL);
2478 if (length == 0)
2480 foffset += 2;
2482 if (tvb_get_ntohs(tvb, foffset)==0) /* NDPS 1.0 */
2484 foffset+=2;
2485 if (tvb_get_ntohs(tvb, foffset)==0) /* NDPS 1.1 */
2487 foffset += 2;
2490 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, ENC_BIG_ENDIAN);
2491 foffset += 2;
2492 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL);
2493 break;
2494 case 4:
2495 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL);
2496 foffset += 2;
2497 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, ENC_BIG_ENDIAN);
2498 foffset += 2;
2499 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL);
2500 foffset += 8; /* Don't know what these 8 bytes signify */
2501 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN);
2502 foffset += 4; /* XXX - what does this count? */
2503 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
2504 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
2505 break;
2506 default:
2507 break;
2509 return foffset;
2513 static int
2514 event_object_set(tvbuff_t* tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
2516 uint32_t number_of_items;
2517 uint32_t number_of_items2;
2518 uint32_t ii;
2519 uint32_t jj;
2520 uint32_t object_identifier;
2521 proto_tree *atree, *btree, *ctree;
2522 proto_item *aitem, *bitem, *citem, *expert_item;
2524 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Event");
2525 number_of_items = tvb_get_ntohl(tvb, foffset);
2526 expert_item = proto_tree_add_uint(atree, hf_ndps_num_events, tvb, foffset, 4, number_of_items);
2527 foffset += 4;
2528 for (ii = 0; ii < number_of_items; ii++ )
2530 if (ii >= NDPS_MAX_ITEMS) {
2531 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
2532 break;
2534 btree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &bitem, "Event %u", ii+1);
2535 proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
2536 foffset += 4;
2537 foffset = objectidentifier(tvb, btree, foffset);
2538 foffset += align_4(tvb, foffset);
2539 foffset = objectidentification(tvb, btree, foffset);
2540 foffset += align_4(tvb, foffset);
2541 proto_tree_add_item(btree, hf_ndps_object_op, tvb, foffset, 4, ENC_BIG_ENDIAN);
2542 foffset += 4;
2543 object_identifier = tvb_get_ntohl(tvb, foffset);
2544 proto_tree_add_uint(btree, hf_ndps_event_object_identifier, tvb, foffset, 4, object_identifier);
2545 foffset += 4;
2546 switch (object_identifier)
2548 case 1:
2549 foffset = objectidentifier(tvb, btree, foffset);
2550 foffset += align_4(tvb, foffset);
2551 break;
2553 case 2:
2554 number_of_items2 = tvb_get_ntohl(tvb, foffset);
2555 expert_item = proto_tree_add_uint(btree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
2556 foffset += 4;
2557 for (jj = 0; jj < number_of_items2; jj++ )
2559 if (jj >= NDPS_MAX_ITEMS) {
2560 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
2561 break;
2563 ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Item %u", jj+1);
2564 foffset = objectidentifier(tvb, ctree, foffset);
2565 foffset += align_4(tvb, foffset);
2566 proto_item_set_end(citem, tvb, foffset);
2568 break;
2570 proto_item_set_end(bitem, tvb, foffset);
2572 proto_item_set_end(aitem, tvb, foffset);
2573 return foffset;
2577 static int
2578 cardinal_seq(tvbuff_t* tvb, packet_info* pinfo, proto_tree *ndps_tree, int foffset)
2580 uint32_t number_of_items;
2581 uint32_t length;
2582 uint32_t ii;
2583 proto_tree *atree;
2584 proto_item *aitem, *expert_item;
2586 number_of_items = tvb_get_ntohl(tvb, foffset);
2587 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2588 foffset += 4;
2589 for (ii = 0; ii < number_of_items; ii++ )
2591 if (ii >= NDPS_MAX_ITEMS) {
2592 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
2593 break;
2595 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Cardinal %u", ii+1);
2596 length = tvb_get_ntohl(tvb, foffset);
2597 foffset += 4;
2598 if (length==4)
2600 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
2602 tvb_ensure_bytes_exist(tvb, foffset, length+length%2);
2603 foffset += length;
2604 foffset += (length%2);
2605 proto_item_set_end(aitem, tvb, foffset);
2607 return foffset;
2611 static int
2612 server_entry(tvbuff_t* tvb, packet_info* pinfo, proto_tree *ndps_tree, int foffset)
2614 char *server_name;
2615 uint32_t number_of_items;
2616 uint32_t ii;
2617 uint32_t data_type;
2618 proto_tree *atree, *btree;
2619 proto_item *aitem, *bitem, *expert_item;
2621 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Server Info");
2622 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, &server_name);
2623 proto_item_append_text(aitem, ": %s", format_text(pinfo->pool, server_name, strlen(server_name)));
2624 proto_tree_add_item(atree, hf_ndps_server_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
2625 foffset += 4;
2626 foffset = print_address(tvb, atree, foffset);
2627 number_of_items = tvb_get_ntohl(tvb, foffset);
2628 expert_item = proto_tree_add_uint(atree, hf_ndps_num_servers, tvb, foffset, 4, number_of_items);
2629 foffset += 4;
2630 for (ii = 0; ii < number_of_items; ii++ )
2632 if (ii >= NDPS_MAX_ITEMS) {
2633 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
2634 break;
2636 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Info %u", ii+1);
2637 data_type = tvb_get_ntohl(tvb, foffset);
2638 proto_tree_add_item(btree, hf_ndps_data_item_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
2639 foffset += 4;
2640 switch (data_type)
2642 case 0: /* Int8 */
2643 proto_tree_add_item(btree, hf_info_int, tvb, foffset, 1, ENC_BIG_ENDIAN);
2644 foffset++;
2645 break;
2646 case 1: /* Int16 */
2647 proto_tree_add_item(btree, hf_info_int16, tvb, foffset, 2, ENC_BIG_ENDIAN);
2648 foffset += 2;
2649 break;
2650 case 2: /* Int32 */
2651 proto_tree_add_item(btree, hf_info_int32, tvb, foffset, 4, ENC_BIG_ENDIAN);
2652 foffset += 4;
2653 break;
2654 case 3: /* Boolean */
2655 proto_tree_add_item(btree, hf_info_boolean, tvb, foffset, 4, ENC_BIG_ENDIAN);
2656 foffset += 4;
2657 break;
2658 case 4: /* String */
2659 case 5: /* Bytes */
2660 foffset = ndps_string(tvb, hf_info_string, btree, foffset, NULL);
2661 break;
2662 default:
2663 break;
2665 proto_item_set_end(bitem, tvb, foffset);
2667 proto_item_set_end(aitem, tvb, foffset);
2668 return foffset;
2672 static int
2673 attribute_value(tvbuff_t* tvb, packet_info* pinfo, proto_tree *ndps_tree, int foffset)
2675 uint32_t ii;
2676 uint32_t jj;
2677 uint32_t number_of_items;
2678 uint32_t number_of_items2;
2679 uint32_t attribute_type;
2680 uint32_t integer_or_oid;
2681 uint32_t event_object_type;
2682 uint32_t ignored_type;
2683 uint32_t resource_type;
2684 uint32_t identifier_type;
2685 uint32_t criterion_type;
2686 uint32_t card_enum_time;
2687 uint32_t media_type;
2688 uint32_t doc_content;
2689 uint32_t page_size;
2690 uint32_t medium_size;
2691 uint32_t numbers_up;
2692 uint32_t colorant_set;
2693 uint32_t length;
2694 uint32_t dimension;
2695 uint32_t location;
2696 uint32_t cardinal;
2697 const char *label;
2698 uint32_t label_value;
2699 proto_tree *atree, *btree;
2700 proto_item *aitem, *bitem, *expert_item;
2702 if (global_attribute_name==NULL)
2704 label_value = 1;
2705 label = try_val_to_str(label_value, object_ids_7);
2706 global_attribute_name = label;
2708 attribute_type = tvb_get_ntohl(tvb, foffset);
2709 if (ndps_show_oids)
2711 proto_tree_add_item(ndps_tree, hf_ndps_obj_attribute_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
2713 foffset += 4;
2714 switch(attribute_type)
2716 case 0: /* Null */
2717 proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), ENC_NA);
2718 break;
2719 case 1: /* Text */
2720 case 2: /* Descriptive Name */
2721 case 3: /* Descriptor */
2722 case 6: /* Simple Name */
2723 case 40: /* Distinguished Name*/
2724 case 50: /* Font Reference */
2725 case 58: /* Locale */
2726 case 102: /* File Path */
2727 case 103: /* Uniform Resource Identifier */
2728 case 108: /* Extended Resource Identifier */
2729 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
2730 break;
2731 case 4: /* Message */
2732 case 5: /* Error Message */
2733 case 38: /* Name or OID */
2734 foffset = name_or_id(tvb, ndps_tree, foffset);
2735 break;
2736 case 39: /* Name or OID Seq */
2737 number_of_items = tvb_get_ntohl(tvb, foffset);
2738 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2739 foffset += 4;
2740 for (ii = 0; ii < number_of_items; ii++ )
2742 if (ii >= NDPS_MAX_ITEMS) {
2743 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
2744 break;
2746 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %d", ii+1);
2747 foffset = name_or_id(tvb, atree, foffset);
2748 proto_item_set_end(aitem, tvb, foffset);
2750 break;
2751 case 7: /* Distinguished Name String*/
2752 case 79: /* File Reference */
2753 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
2754 foffset = name_or_id(tvb, ndps_tree, foffset);
2755 break;
2756 case 8: /* Distinguished Name String Seq */
2757 number_of_items = tvb_get_ntohl(tvb, foffset);
2758 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2759 foffset += 4;
2760 for (ii = 0; ii < number_of_items; ii++ )
2762 if (ii >= NDPS_MAX_ITEMS) {
2763 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
2764 break;
2766 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Name %u", ii+1);
2767 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
2768 foffset = name_or_id(tvb, atree, foffset);
2769 proto_item_set_end(aitem, tvb, foffset);
2771 break;
2772 case 9: /* Delta Time */
2773 case 10: /* Time */
2774 case 11: /* Integer */
2775 case 13: /* Cardinal */
2776 case 15: /* Positive Integer */
2777 case 18: /* Maximum Integer */
2778 case 19: /* Minimum Integer */
2779 case 35: /* Percent */
2780 case 57: /* Job Priority */
2781 case 72: /* Sides */
2782 case 95: /* Enumeration */
2783 if (global_attribute_name != NULL &&
2784 strcmp(global_attribute_name,"(Novell) Attribute PRINTER SECURITY LEVEL")==0)
2786 proto_tree_add_item(ndps_tree, hf_print_security, tvb, foffset, 4, ENC_BIG_ENDIAN);
2787 foffset += 4;
2789 else
2791 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
2792 foffset += 4;
2794 break;
2795 case 12: /* Integer Seq */
2796 case 14: /* Cardinal Seq */
2797 length = tvb_get_ntohl(tvb, foffset);
2798 foffset += 4;
2799 if (length==4)
2801 proto_tree_add_item(ndps_tree, hf_info_int32, tvb, foffset, length, ENC_BIG_ENDIAN);
2803 tvb_ensure_bytes_exist(tvb, foffset, length);
2804 foffset += length;
2805 break;
2806 case 16: /* Integer Range */
2807 case 17: /* Cardinal Range */
2808 proto_tree_add_item(ndps_tree, hf_ndps_lower_range, tvb, foffset, 4, ENC_BIG_ENDIAN);
2809 foffset += 4;
2810 proto_tree_add_item(ndps_tree, hf_ndps_upper_range, tvb, foffset, 4, ENC_BIG_ENDIAN);
2811 foffset += 4;
2812 break;
2813 case 20: /* Integer 64 */
2814 case 22: /* Cardinal 64 */
2815 case 24: /* Positive Integer 64 */
2816 case 31: /* Non-Negative Real */
2817 case 29: /* Real */
2818 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, ENC_NA);
2819 foffset += 8;
2820 break;
2821 case 21: /* Integer 64 Seq */
2822 case 23: /* Cardinal 64 Seq */
2823 case 30: /* Real Seq */
2824 number_of_items = tvb_get_ntohl(tvb, foffset);
2825 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2826 foffset += 4;
2827 for (ii = 0; ii < number_of_items; ii++ )
2829 if (ii >= NDPS_MAX_ITEMS) {
2830 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
2831 break;
2833 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %u", ii+1);
2834 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, ENC_NA);
2835 foffset += 8;
2836 proto_item_set_end(aitem, tvb, foffset);
2838 break;
2839 case 25: /* Integer 64 Range */
2840 case 26: /* Cardinal 64 Range */
2841 case 32: /* Real Range */
2842 case 33: /* Non-Negative Real Range */
2843 proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, ENC_NA);
2844 foffset += 8;
2845 proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, ENC_NA);
2846 foffset += 8;
2847 break;
2848 case 27: /* Maximum Integer 64 */
2849 proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, ENC_NA);
2850 foffset += 8;
2851 break;
2852 case 28: /* Minimum Integer 64 */
2853 proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, ENC_NA);
2854 foffset += 8;
2855 break;
2856 case 34: /* Boolean */
2857 proto_tree_add_item(ndps_tree, hf_ndps_attrib_boolean, tvb, foffset, 4, ENC_BIG_ENDIAN);
2858 foffset += 4;
2859 break;
2860 case 36: /* Object Identifier */
2861 foffset = objectidentifier(tvb, ndps_tree, foffset);
2862 break;
2863 case 37: /* Object Identifier Seq */
2864 number_of_items = tvb_get_ntohl(tvb, foffset);
2865 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
2866 foffset += 4;
2867 for (ii = 0; ii < number_of_items; ii++ )
2869 if (ii >= NDPS_MAX_ITEMS) {
2870 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
2871 break;
2873 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object %d", ii+1);
2874 foffset = objectidentifier(tvb, atree, foffset);
2875 proto_item_set_end(aitem, tvb, foffset);
2877 break;
2878 case 41: /* Relative Distinguished Name Seq */
2879 number_of_items = tvb_get_ntohl(tvb, foffset);
2880 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_names, tvb, foffset, 4, number_of_items);
2881 foffset += 4;
2882 for (ii = 0; ii < number_of_items; ii++ )
2884 if (ii >= NDPS_MAX_ITEMS) {
2885 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
2886 break;
2888 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Name %u", ii+1);
2889 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
2890 proto_item_set_end(aitem, tvb, foffset);
2892 break;
2893 case 42: /* Realization */
2894 proto_tree_add_item(ndps_tree, hf_ndps_realization, tvb, foffset, 4, ENC_BIG_ENDIAN);
2895 foffset += 4;
2896 break;
2897 case 43: /* Medium Dimensions */
2898 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, ENC_NA);
2899 foffset += 8;
2900 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, ENC_NA);
2901 foffset += 8;
2902 break;
2903 case 44: /* Dimension */
2904 dimension = tvb_get_ntohl(tvb, foffset);
2905 proto_tree_add_uint(ndps_tree, hf_ndps_dim_value, tvb, foffset, 4, dimension);
2906 foffset += 4;
2907 if (dimension == 0) {
2908 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, ENC_NA);
2909 foffset += 8;
2911 else
2913 foffset = name_or_id(tvb, ndps_tree, foffset);
2915 proto_tree_add_item(ndps_tree, hf_ndps_dim_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
2916 foffset += 4;
2917 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, ENC_NA);
2918 foffset += 8;
2919 break;
2920 case 45: /* XY Dimensions */
2921 dimension = tvb_get_ntohl(tvb, foffset);
2922 proto_tree_add_uint(ndps_tree, hf_ndps_xydim_value, tvb, foffset, 4, dimension);
2923 foffset += 4;
2924 if (dimension == 1) {
2925 foffset = name_or_id(tvb, ndps_tree, foffset);
2927 else
2929 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, ENC_NA);
2930 foffset += 8;
2931 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, ENC_NA);
2932 foffset += 8;
2934 proto_tree_add_item(ndps_tree, hf_ndps_dim_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
2935 foffset += 4;
2936 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, ENC_NA);
2937 foffset += 8;
2938 break;
2939 case 46: /* Locations */
2940 location = tvb_get_ntohl(tvb, foffset);
2941 proto_tree_add_uint(ndps_tree, hf_ndps_location_value, tvb, foffset, 4, location);
2942 foffset += 4;
2943 if (location == 0) {
2944 number_of_items = tvb_get_ntohl(tvb, foffset);
2945 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_locations, tvb, foffset, 4, number_of_items);
2946 foffset += 4;
2947 for (ii = 0; ii < number_of_items; ii++ )
2949 if (ii >= NDPS_MAX_ITEMS) {
2950 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
2951 break;
2953 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Location %u", ii+1);
2954 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, ENC_NA);
2955 foffset += 8;
2956 proto_item_set_end(aitem, tvb, foffset);
2959 else
2961 foffset = name_or_id(tvb, ndps_tree, foffset);
2963 proto_tree_add_item(ndps_tree, hf_ndps_dim_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
2964 foffset += 4;
2965 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, ENC_NA);
2966 foffset += 8;
2967 break;
2968 case 47: /* Area */
2969 proto_tree_add_item(ndps_tree, hf_ndps_xmin_n64, tvb, foffset, 8, ENC_NA);
2970 foffset += 8;
2971 proto_tree_add_item(ndps_tree, hf_ndps_xmax_n64, tvb, foffset, 8, ENC_NA);
2972 foffset += 8;
2973 proto_tree_add_item(ndps_tree, hf_ndps_ymin_n64, tvb, foffset, 8, ENC_NA);
2974 foffset += 8;
2975 proto_tree_add_item(ndps_tree, hf_ndps_ymax_n64, tvb, foffset, 8, ENC_NA);
2976 foffset += 8;
2977 break;
2978 case 48: /* Area Seq */
2979 number_of_items = tvb_get_ntohl(tvb, foffset);
2980 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_areas, tvb, foffset, 4, number_of_items);
2981 foffset += 4;
2982 for (ii = 0; ii < number_of_items; ii++ )
2984 if (ii >= NDPS_MAX_ITEMS) {
2985 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
2986 break;
2988 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Area %u", ii+1);
2989 proto_tree_add_item(atree, hf_ndps_xmin_n64, tvb, foffset, 8, ENC_NA);
2990 foffset += 8;
2991 proto_tree_add_item(atree, hf_ndps_xmax_n64, tvb, foffset, 8, ENC_NA);
2992 foffset += 8;
2993 proto_tree_add_item(atree, hf_ndps_ymin_n64, tvb, foffset, 8, ENC_NA);
2994 foffset += 8;
2995 proto_tree_add_item(atree, hf_ndps_ymax_n64, tvb, foffset, 8, ENC_NA);
2996 foffset += 8;
2997 proto_item_set_end(aitem, tvb, foffset);
2999 break;
3000 case 49: /* Edge */
3001 proto_tree_add_item(ndps_tree, hf_ndps_edge_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3002 foffset += 4;
3003 break;
3004 case 51: /* Cardinal or OID */
3005 cardinal = tvb_get_ntohl(tvb, foffset);
3006 proto_tree_add_uint(ndps_tree, hf_ndps_cardinal_or_oid, tvb, foffset, 4, cardinal);
3007 foffset += 4;
3008 if (cardinal==0) {
3009 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3010 foffset += 4;
3012 else
3014 foffset = objectidentifier(tvb, ndps_tree, foffset);
3016 break;
3017 case 52: /* OID Cardinal Map */
3018 foffset = objectidentifier(tvb, ndps_tree, foffset);
3019 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3020 foffset += 4;
3021 break;
3022 case 53: /* Cardinal or Name or OID */
3023 cardinal = tvb_get_ntohl(tvb, foffset);
3024 proto_tree_add_uint(ndps_tree, hf_ndps_cardinal_name_or_oid, tvb, foffset, 4, cardinal);
3025 foffset += 4;
3026 if (cardinal==0) {
3027 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3028 foffset += 4;
3030 else
3032 foffset = name_or_id(tvb, ndps_tree, foffset);
3034 break;
3035 case 54: /* Positive Integer or OID */
3036 integer_or_oid = tvb_get_ntohl(tvb, foffset);
3037 proto_tree_add_uint(ndps_tree, hf_ndps_integer_or_oid, tvb, foffset, 4, integer_or_oid);
3038 foffset += 4;
3039 if (integer_or_oid==0) {
3040 foffset = objectidentifier(tvb, ndps_tree, foffset);
3042 else
3044 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3045 foffset += 4;
3047 break;
3048 case 55: /* Event Handling Profile */
3049 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
3050 foffset += 4;
3051 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN);
3052 foffset += 4;
3053 foffset = qualifiedname(tvb, ndps_tree, foffset);
3054 length = tvb_get_ntohl(tvb, foffset);
3055 foffset += 4;
3056 if (length==4)
3058 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
3060 foffset += length;
3061 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
3062 foffset += 4;
3063 foffset = name_or_id(tvb, ndps_tree, foffset);
3065 number_of_items = tvb_get_ntohl(tvb, foffset);
3066 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_address_items, tvb, foffset, 4, number_of_items);
3067 foffset += 4;
3068 for (ii = 0; ii < number_of_items; ii++ )
3070 if (ii >= NDPS_MAX_ITEMS) {
3071 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3072 break;
3074 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Address Item %u", ii+1);
3075 foffset = address_item(tvb, atree, foffset);
3076 proto_item_set_end(aitem, tvb, foffset);
3078 number_of_items = tvb_get_ntohl(tvb, foffset);
3079 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_events, tvb, foffset, 4, number_of_items);
3080 foffset += 4;
3081 for (ii = 0; ii < number_of_items; ii++ )
3083 if (ii >= NDPS_MAX_ITEMS) {
3084 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3085 break;
3087 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Event %u", ii+1);
3088 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
3089 foffset += 4;
3090 foffset = objectidentifier(tvb, atree, foffset);
3091 foffset += align_4(tvb, foffset);
3092 foffset = objectidentification(tvb, atree, foffset);
3093 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, ENC_BIG_ENDIAN);
3094 foffset += 4;
3095 event_object_type = tvb_get_ntohl(tvb, foffset);
3096 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, event_object_type);
3097 foffset += 4;
3098 switch (event_object_type)
3100 case 2:
3101 /* Number of Objects */
3102 number_of_items2 = tvb_get_ntohl(tvb, foffset);
3103 expert_item = proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items2);
3104 foffset += 4;
3105 for (jj = 0; jj < number_of_items2; jj++ )
3107 if (jj >= NDPS_MAX_ITEMS) {
3108 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3109 break;
3111 foffset = objectidentifier(tvb, atree, foffset);
3113 foffset += 4;
3114 break;
3116 case 1:
3117 foffset = objectidentifier(tvb, atree, foffset);
3118 break;
3120 case 0:
3121 number_of_items2 = tvb_get_ntohl(tvb, foffset);
3122 expert_item = proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items2);
3123 foffset += 4;
3124 for (jj = 0; jj < number_of_items2; jj++ )
3126 if (jj >= NDPS_MAX_ITEMS) {
3127 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3128 break;
3130 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object %u", jj+1);
3131 foffset = objectidentifier(tvb, btree, foffset);
3132 proto_item_set_end(bitem, tvb, foffset);
3134 break;
3136 proto_item_set_end(aitem, tvb, foffset);
3138 break;
3139 case 56: /* Octet String */
3140 case 63: /* Job Password */
3141 case 66: /* Print Checkpoint */
3142 length = tvb_get_ntohl(tvb, foffset);
3143 ndps_string(tvb, hf_info_string, ndps_tree, foffset, NULL);
3144 foffset += length+2;
3145 foffset += align_4(tvb, foffset);
3146 break;
3147 case 59: /* Method Delivery Address */
3148 proto_tree_add_item(ndps_tree, hf_ndps_delivery_add_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
3149 event_object_type = tvb_get_ntohl(tvb, foffset);
3150 foffset += 4;
3151 switch(event_object_type)
3153 case 0: /*MHS ADDR*/
3154 case 1: /*DISTINGUISHED_NAME*/
3155 case 2: /*TEXT*/
3156 case 3: /*OCTET_STRING*/
3157 foffset = ndps_string(tvb, hf_info_string, ndps_tree, foffset, NULL);
3158 break;
3159 case 4: /*DIST_NAME_STRING*/
3160 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
3161 foffset = name_or_id(tvb, ndps_tree, foffset);
3162 break;
3163 case 5: /*RPC_ADDRESS*/
3164 case 6: /*QUALIFIED_NAME*/
3165 foffset = objectidentifier(tvb, ndps_tree, foffset);
3166 foffset = qualifiedname(tvb, ndps_tree, foffset);
3167 break;
3168 default:
3169 break;
3171 break;
3172 case 60: /* Object Identification */
3173 foffset = objectidentification(tvb, ndps_tree, foffset);
3174 break;
3175 case 61: /* Results Profile */
3176 foffset = objectidentifier(tvb, ndps_tree, foffset);
3177 foffset = name_or_id(tvb, ndps_tree, foffset);
3178 foffset = address_item(tvb, ndps_tree, foffset);
3179 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3180 foffset += 4;
3181 foffset = name_or_id(tvb, ndps_tree, foffset);
3182 break;
3183 case 62: /* Criteria */
3184 foffset = objectidentifier(tvb, ndps_tree, foffset);
3185 criterion_type = tvb_get_ntohl(tvb, foffset);
3186 proto_tree_add_uint(ndps_tree, hf_ndps_criterion_type, tvb, foffset, 4, criterion_type);
3187 foffset += 4;
3188 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3189 foffset += 4;
3190 break;
3191 case 64: /* Job Level */
3192 foffset = objectidentifier(tvb, ndps_tree, foffset);
3193 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3194 foffset += 4;
3195 break;
3196 case 65: /* Job Categories */
3197 foffset = objectidentifier(tvb, ndps_tree, foffset);
3198 number_of_items = tvb_get_ntohl(tvb, foffset);
3199 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_job_categories, tvb, foffset, 4, number_of_items);
3200 foffset += 4;
3201 for (ii = 0; ii < number_of_items; ii++ )
3203 if (ii >= NDPS_MAX_ITEMS) {
3204 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3205 break;
3207 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job %u", ii+1);
3208 length = tvb_get_ntohl(tvb, foffset);
3209 foffset += 4;
3210 if (length==4)
3212 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
3214 tvb_ensure_bytes_exist(tvb, foffset, length+length%2);
3215 foffset += length;
3216 foffset += (length%2);
3217 proto_item_set_end(aitem, tvb, foffset);
3219 break;
3220 case 67: /* Ignored Attribute */
3221 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3222 foffset += 4;
3223 foffset = objectidentifier(tvb, ndps_tree, foffset);
3224 number_of_items = tvb_get_ntohl(tvb, foffset);
3225 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_ignored_attributes, tvb, foffset, 4, number_of_items);
3226 foffset += 4;
3227 for (ii = 0; ii < number_of_items; ii++ )
3229 if (ii >= NDPS_MAX_ITEMS) {
3230 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3231 break;
3233 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Ignored Attribute %u", ii+1);
3234 ignored_type = tvb_get_ntohl(tvb, foffset);
3235 proto_tree_add_uint(atree, hf_ndps_ignored_type, tvb, foffset, 4, ignored_type);
3236 foffset += 4;
3237 if (ignored_type == 38)
3239 foffset = name_or_id(tvb, atree, foffset);
3241 else
3243 foffset = objectidentifier(tvb, atree, foffset);
3245 proto_item_set_end(aitem, tvb, foffset);
3247 break;
3248 case 68: /* Resource */
3249 resource_type = tvb_get_ntohl(tvb, foffset);
3250 proto_tree_add_uint(ndps_tree, hf_ndps_resource_type, tvb, foffset, 4, resource_type);
3251 foffset += 4;
3252 if (resource_type == 0)
3254 foffset = name_or_id(tvb, ndps_tree, foffset);
3256 else
3258 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
3260 break;
3261 case 69: /* Medium Substitution */
3262 foffset = name_or_id(tvb, ndps_tree, foffset);
3263 foffset = name_or_id(tvb, ndps_tree, foffset);
3264 break;
3265 case 70: /* Font Substitution */
3266 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
3267 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
3268 break;
3269 case 71: /* Resource Context Seq */
3270 number_of_items = tvb_get_ntohl(tvb, foffset);
3271 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_resources, tvb, foffset, 4, number_of_items);
3272 foffset += 4;
3273 for (ii = 0; ii < number_of_items; ii++ )
3275 if (ii >= NDPS_MAX_ITEMS) {
3276 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3277 break;
3279 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Resource %u", ii+1);
3280 resource_type = tvb_get_ntohl(tvb, foffset);
3281 proto_tree_add_uint(atree, hf_ndps_resource_type, tvb, foffset, 4, resource_type);
3282 foffset += 4;
3283 if (resource_type == 0)
3285 foffset = name_or_id(tvb, atree, foffset);
3287 else
3289 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL);
3291 proto_item_set_end(aitem, tvb, foffset);
3293 break;
3294 case 73: /* Page Select Seq */
3295 number_of_items = tvb_get_ntohl(tvb, foffset);
3296 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_page_selects, tvb, foffset, 4, number_of_items);
3297 foffset += 4;
3298 for (ii = 0; ii < number_of_items; ii++ )
3300 if (ii >= NDPS_MAX_ITEMS) {
3301 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3302 break;
3304 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Page Select %u", ii+1);
3305 proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
3306 foffset += 4;
3307 identifier_type = tvb_get_ntohl(tvb, foffset);
3308 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
3309 foffset += 4;
3310 if (identifier_type == 0)
3312 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3313 foffset += 4;
3315 if (identifier_type == 1)
3317 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL);
3319 if (identifier_type == 2)
3321 foffset = name_or_id(tvb, atree, foffset);
3323 proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
3324 foffset += 4;
3325 identifier_type = tvb_get_ntohl(tvb, foffset);
3326 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
3327 foffset += 4;
3328 if (identifier_type == 0)
3330 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3331 foffset += 4;
3333 if (identifier_type == 1)
3335 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL);
3337 if (identifier_type == 2)
3339 foffset = name_or_id(tvb, atree, foffset);
3341 proto_item_set_end(aitem, tvb, foffset);
3343 break;
3344 case 74: /* Page Media Select */
3345 media_type = tvb_get_ntohl(tvb, foffset);
3346 proto_tree_add_uint(ndps_tree, hf_ndps_media_type, tvb, foffset, 4, media_type);
3347 foffset += 4;
3348 if (media_type == 0)
3350 foffset = name_or_id(tvb, ndps_tree, foffset);
3352 else
3354 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
3355 number_of_items = tvb_get_ntohl(tvb, foffset);
3356 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
3357 foffset += 4;
3358 for (ii = 0; ii < number_of_items; ii++ )
3360 if (ii >= NDPS_MAX_ITEMS) {
3361 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3362 break;
3364 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %u", ii+1);
3365 proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
3366 foffset += 4;
3367 identifier_type = tvb_get_ntohl(tvb, foffset);
3368 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
3369 foffset += 4;
3370 if (identifier_type == 0)
3372 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3373 foffset += 4;
3375 if (identifier_type == 1)
3377 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL);
3379 if (identifier_type == 2)
3381 foffset = name_or_id(tvb, atree, foffset);
3383 proto_item_set_end(aitem, tvb, foffset);
3386 break;
3387 case 75: /* Document Content */
3388 doc_content = tvb_get_ntohl(tvb, foffset);
3389 proto_tree_add_uint(ndps_tree, hf_ndps_doc_content, tvb, foffset, 4, doc_content);
3390 foffset += 4;
3391 if (doc_content == 0)
3393 length = tvb_get_ntohl(tvb, foffset);
3394 foffset += 4;
3395 if (length!=0)
3397 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, ENC_NA);
3399 foffset += length;
3400 foffset += (length%2);
3402 else
3404 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
3405 foffset = name_or_id(tvb, ndps_tree, foffset);
3407 break;
3408 case 76: /* Page Size */
3409 page_size = tvb_get_ntohl(tvb, foffset);
3410 proto_tree_add_uint(ndps_tree, hf_ndps_page_size, tvb, foffset, 4, page_size);
3411 foffset += 4;
3412 if (page_size == 0)
3414 foffset = objectidentifier(tvb, ndps_tree, foffset);
3416 else
3418 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, ENC_NA);
3419 foffset += 8;
3420 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, ENC_NA);
3421 foffset += 8;
3423 break;
3424 case 77: /* Presentation Direction */
3425 proto_tree_add_item(ndps_tree, hf_ndps_direction, tvb, foffset, 4, ENC_BIG_ENDIAN);
3426 foffset += 4;
3427 break;
3428 case 78: /* Page Order */
3429 proto_tree_add_item(ndps_tree, hf_ndps_page_order, tvb, foffset, 4, ENC_BIG_ENDIAN);
3430 foffset += 4;
3431 break;
3432 case 80: /* Medium Source Size */
3433 foffset = name_or_id(tvb, ndps_tree, foffset);
3434 medium_size = tvb_get_ntohl(tvb, foffset);
3435 proto_tree_add_uint(ndps_tree, hf_ndps_medium_size, tvb, foffset, 4, medium_size);
3436 foffset += 4;
3437 if (medium_size == 0)
3439 page_size = tvb_get_ntohl(tvb, foffset);
3440 proto_tree_add_uint(ndps_tree, hf_ndps_page_size, tvb, foffset, 4, page_size);
3441 foffset += 4;
3442 if (page_size == 0)
3444 foffset = objectidentifier(tvb, ndps_tree, foffset);
3446 else
3448 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, ENC_NA);
3449 foffset += 8;
3450 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, ENC_NA);
3451 foffset += 8;
3453 proto_tree_add_item(ndps_tree, hf_ndps_long_edge_feeds, tvb, foffset, 4, ENC_BIG_ENDIAN);
3454 foffset += 4;
3455 proto_tree_add_item(ndps_tree, hf_ndps_xmin_n64, tvb, foffset, 8, ENC_NA);
3456 foffset += 8;
3457 proto_tree_add_item(ndps_tree, hf_ndps_xmax_n64, tvb, foffset, 8, ENC_NA);
3458 foffset += 8;
3459 proto_tree_add_item(ndps_tree, hf_ndps_ymin_n64, tvb, foffset, 8, ENC_NA);
3460 foffset += 8;
3461 proto_tree_add_item(ndps_tree, hf_ndps_ymax_n64, tvb, foffset, 8, ENC_NA);
3462 foffset += 8;
3464 else
3466 proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, ENC_NA);
3467 foffset += 8;
3468 proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, ENC_NA);
3469 foffset += 8;
3470 proto_tree_add_item(ndps_tree, hf_ndps_inc_across_feed, tvb, foffset, 8, ENC_NA);
3471 foffset += 8;
3472 proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, ENC_NA);
3473 foffset += 8;
3474 proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, ENC_NA);
3475 foffset += 8;
3476 proto_tree_add_item(ndps_tree, hf_ndps_size_inc_in_feed, tvb, foffset, 8, ENC_NA);
3477 foffset += 8;
3478 proto_tree_add_item(ndps_tree, hf_ndps_long_edge_feeds, tvb, foffset, 4, ENC_BIG_ENDIAN);
3479 foffset += 4;
3480 proto_tree_add_item(ndps_tree, hf_ndps_xmin_n64, tvb, foffset, 8, ENC_NA);
3481 foffset += 8;
3482 proto_tree_add_item(ndps_tree, hf_ndps_xmax_n64, tvb, foffset, 8, ENC_NA);
3483 foffset += 8;
3484 proto_tree_add_item(ndps_tree, hf_ndps_ymin_n64, tvb, foffset, 8, ENC_NA);
3485 foffset += 8;
3486 proto_tree_add_item(ndps_tree, hf_ndps_ymax_n64, tvb, foffset, 8, ENC_NA);
3487 foffset += 8;
3489 break;
3490 case 81: /* Input Tray Medium */
3491 foffset = name_or_id(tvb, ndps_tree, foffset);
3492 foffset = name_or_id(tvb, ndps_tree, foffset);
3493 break;
3494 case 82: /* Output Bins Characteristics */
3495 number_of_items = tvb_get_ntohl(tvb, foffset);
3496 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_page_informations, tvb, foffset, 4, number_of_items);
3497 foffset += 4;
3498 for (ii = 0; ii < number_of_items; ii++ )
3500 if (ii >= NDPS_MAX_ITEMS) {
3501 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3502 break;
3504 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Page Information %u", ii+1);
3505 proto_tree_add_item(atree, hf_ndps_page_order, tvb, foffset, 4, ENC_BIG_ENDIAN);
3506 foffset += 4;
3507 proto_tree_add_item(atree, hf_ndps_page_orientation, tvb, foffset, 4, ENC_BIG_ENDIAN);
3508 foffset += 4;
3509 proto_item_set_end(aitem, tvb, foffset);
3511 break;
3512 case 83: /* Page ID Type */
3513 proto_tree_add_item(ndps_tree, hf_ndps_identifier_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
3514 foffset += 4;
3515 break;
3516 case 84: /* Level Range */
3517 foffset = objectidentifier(tvb, ndps_tree, foffset);
3518 proto_tree_add_item(ndps_tree, hf_ndps_lower_range, tvb, foffset, 4, ENC_BIG_ENDIAN);
3519 foffset += 4;
3520 proto_tree_add_item(ndps_tree, hf_ndps_upper_range, tvb, foffset, 4, ENC_BIG_ENDIAN);
3521 foffset += 4;
3522 break;
3523 case 85: /* Category Set */
3524 foffset = objectidentifier(tvb, ndps_tree, foffset);
3525 number_of_items = tvb_get_ntohl(tvb, foffset);
3526 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_categories, tvb, foffset, 4, number_of_items);
3527 foffset += 4;
3528 for (ii = 0; ii < number_of_items; ii++ )
3530 if (ii >= NDPS_MAX_ITEMS) {
3531 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3532 break;
3534 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Category %u", ii+1);
3535 length = tvb_get_ntohl(tvb, foffset);
3536 foffset += 4;
3537 if (length==4)
3539 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
3541 foffset += length;
3542 foffset += (length%2);
3544 number_of_items = tvb_get_ntohl(tvb, foffset);
3545 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_values, tvb, foffset, 4, number_of_items);
3546 foffset += 4;
3547 for (ii = 0; ii < number_of_items; ii++ )
3549 if (ii >= NDPS_MAX_ITEMS) {
3550 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3551 break;
3553 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Value %d", ii+1);
3554 length = tvb_get_ntohl(tvb, foffset);
3555 foffset += 4;
3556 if (length==4)
3558 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
3560 tvb_ensure_bytes_exist(tvb, foffset, length+length%2);
3561 foffset += length;
3562 foffset += (length%2);
3563 proto_item_set_end(aitem, tvb, foffset);
3565 break;
3566 case 86: /* Numbers Up Supported */
3567 numbers_up=tvb_get_ntohl(tvb, foffset);
3568 proto_tree_add_uint(ndps_tree, hf_ndps_numbers_up, tvb, foffset, 4, numbers_up);
3569 foffset += 4;
3570 switch(numbers_up)
3572 case 0: /*Cardinal*/
3573 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3574 foffset += 4;
3575 break;
3576 case 1: /*Name or OID*/
3577 foffset = name_or_id(tvb, ndps_tree, foffset);
3578 break;
3579 case 2: /*Cardinal Range*/
3580 proto_tree_add_item(ndps_tree, hf_ndps_lower_range, tvb, foffset, 4, ENC_BIG_ENDIAN);
3581 foffset += 4;
3582 proto_tree_add_item(ndps_tree, hf_ndps_upper_range, tvb, foffset, 4, ENC_BIG_ENDIAN);
3583 foffset += 4;
3584 break;
3585 default:
3586 break;
3588 break;
3589 case 87: /* Finishing */
3590 case 88: /* Print Contained Object ID */
3591 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
3592 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3593 foffset += 4;
3594 break;
3595 case 89: /* Print Config Object ID */
3596 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
3597 foffset = qualifiedname(tvb, ndps_tree, foffset);
3598 break;
3599 case 90: /* Typed Name */
3600 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
3601 proto_tree_add_item(ndps_tree, hf_level, tvb, foffset, 4, ENC_BIG_ENDIAN);
3602 foffset += 4;
3603 proto_tree_add_item(ndps_tree, hf_interval, tvb, foffset, 4, ENC_BIG_ENDIAN);
3604 foffset += 4;
3605 break;
3606 case 91: /* Network Address */
3607 proto_tree_add_item(ndps_tree, hf_ndps_address, tvb, foffset, 4, ENC_BIG_ENDIAN);
3608 foffset += 4;
3609 length = tvb_get_ntohl(tvb, foffset);
3610 foffset += 4;
3611 if (length!=0)
3613 proto_tree_add_item(ndps_tree, hf_ndps_add_bytes, tvb, foffset, 4, ENC_NA);
3615 foffset += length;
3616 break;
3617 case 92: /* XY Dimensions Value */
3618 dimension = tvb_get_ntohl(tvb, foffset);
3619 proto_tree_add_uint(ndps_tree, hf_ndps_xydim_value, tvb, foffset, 4, dimension);
3620 foffset += 4;
3621 switch (dimension)
3623 case 1:
3624 foffset = name_or_id(tvb, ndps_tree, foffset);
3625 break;
3627 case 0:
3628 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, ENC_NA);
3629 foffset += 8;
3630 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, ENC_NA);
3631 foffset += 8;
3632 break;
3634 default:
3635 proto_tree_add_item(ndps_tree, hf_ndps_xdimension, tvb, foffset, 4, ENC_BIG_ENDIAN);
3636 foffset += 4;
3637 proto_tree_add_item(ndps_tree, hf_ndps_ydimension, tvb, foffset, 4, ENC_BIG_ENDIAN);
3638 foffset += 4;
3639 break;
3641 break;
3642 case 93: /* Name or OID Dimensions Map */
3643 foffset = name_or_id(tvb, ndps_tree, foffset);
3644 proto_tree_add_item(ndps_tree, hf_ndps_xdimension, tvb, foffset, 4, ENC_BIG_ENDIAN);
3645 foffset += 4;
3646 proto_tree_add_item(ndps_tree, hf_ndps_ydimension, tvb, foffset, 4, ENC_BIG_ENDIAN);
3647 foffset += 4;
3648 break;
3649 case 94: /* Printer State Reason */
3650 foffset += 4;
3651 foffset = name_or_id(tvb, ndps_tree, foffset);
3652 proto_tree_add_item(ndps_tree, hf_ndps_state_severity, tvb, foffset, 4, ENC_BIG_ENDIAN);
3653 foffset += 4;
3654 proto_tree_add_item(ndps_tree, hf_ndps_training, tvb, foffset, 4, ENC_BIG_ENDIAN);
3655 foffset += 4;
3656 foffset = objectidentifier(tvb, ndps_tree, foffset);
3657 foffset += align_4(tvb, foffset);
3658 foffset = objectidentification(tvb, ndps_tree, foffset);
3659 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3660 foffset += 4;
3661 number_of_items = tvb_get_ntohl(tvb, foffset);
3662 foffset += 4*number_of_items;
3663 /*foffset += align_4(tvb, foffset);*/
3664 foffset = name_or_id(tvb, ndps_tree, foffset);
3666 break;
3667 case 96: /* Qualified Name */
3668 foffset = qualifiedname(tvb, ndps_tree, foffset);
3669 break;
3670 case 97: /* Qualified Name Set */
3671 number_of_items = tvb_get_ntohl(tvb, foffset);
3672 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_names, tvb, foffset, 4, number_of_items);
3673 foffset += 4;
3674 for (ii = 0; ii < number_of_items; ii++ )
3676 if (ii >= NDPS_MAX_ITEMS) {
3677 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3678 break;
3680 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Name %u", ii+1);
3681 foffset = qualifiedname(tvb, atree, foffset);
3682 proto_item_set_end(aitem, tvb, foffset);
3684 break;
3685 case 98: /* Colorant Set */
3686 colorant_set = tvb_get_ntohl(tvb, foffset);
3687 proto_tree_add_item(ndps_tree, hf_ndps_colorant_set, tvb, foffset, 4, ENC_BIG_ENDIAN);
3688 foffset += 4;
3689 if (colorant_set==0)
3691 foffset = name_or_id(tvb, ndps_tree, foffset);
3693 else
3696 foffset = objectidentifier(tvb, ndps_tree, foffset);
3697 number_of_items = tvb_get_ntohl(tvb, foffset);
3698 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_colorants, tvb, foffset, 4, number_of_items);
3699 foffset += 4;
3700 for (ii = 0; ii < number_of_items; ii++ )
3702 if (ii >= NDPS_MAX_ITEMS) {
3703 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3704 break;
3706 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Colorant %u", ii+1);
3707 foffset = name_or_id(tvb, atree, foffset);
3708 proto_item_set_end(aitem, tvb, foffset);
3711 break;
3712 case 99: /* Resource Printer ID */
3713 number_of_items = tvb_get_ntohl(tvb, foffset);
3714 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items);
3715 foffset += 4;
3716 for (ii = 0; ii < number_of_items; ii++ )
3718 if (ii >= NDPS_MAX_ITEMS) {
3719 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3720 break;
3722 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Printer %u", ii+1);
3723 foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL);
3724 foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL);
3725 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL);
3726 proto_item_set_end(aitem, tvb, foffset);
3728 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
3729 foffset += 4;
3730 break;
3731 case 100: /* Event Object ID */
3732 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
3733 foffset = objectidentifier(tvb, ndps_tree, foffset);
3734 proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
3735 foffset += 4;
3736 break;
3737 case 101: /* Qualified Name Map */
3738 foffset = qualifiedname(tvb, ndps_tree, foffset);
3739 foffset = qualifiedname(tvb, ndps_tree, foffset);
3740 break;
3741 case 104: /* Cardinal or Enum or Time */
3742 card_enum_time = tvb_get_ntohl(tvb, foffset);
3743 proto_tree_add_item(ndps_tree, hf_ndps_card_enum_time, tvb, foffset, 4, ENC_BIG_ENDIAN);
3744 foffset += 4;
3745 switch (card_enum_time)
3747 case 0:
3748 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3749 foffset += 4;
3750 break;
3752 case 1:
3753 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3754 foffset += 4;
3755 break;
3757 default:
3758 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3759 foffset += 4;
3760 break;
3762 break;
3763 case 105: /* Print Contained Object ID Set */
3764 number_of_items = tvb_get_ntohl(tvb, foffset);
3765 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
3766 foffset += 4;
3767 for (ii = 0; ii < number_of_items; ii++ )
3769 if (ii >= NDPS_MAX_ITEMS) {
3770 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3771 break;
3773 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object %u", ii+1);
3774 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
3775 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3776 foffset += 4;
3777 proto_item_set_end(aitem, tvb, foffset);
3779 break;
3780 case 106: /* Octet String Pair */
3781 length = tvb_get_ntohl(tvb, foffset);
3782 foffset += 4;
3783 if (length!=0)
3785 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, ENC_NA);
3787 foffset += length;
3788 foffset += (length%2);
3789 length = tvb_get_ntohl(tvb, foffset);
3790 foffset += 4;
3791 if (length!=0)
3793 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, ENC_NA);
3795 foffset += length;
3796 foffset += (length%2);
3797 break;
3798 case 107: /* Octet String Integer Pair */
3799 length = tvb_get_ntohl(tvb, foffset);
3800 foffset += 4;
3801 if (length!=0)
3803 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, ENC_NA);
3805 foffset += length;
3806 foffset += (length%2);
3807 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3808 foffset += 4;
3809 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3810 foffset += 4;
3811 break;
3812 case 109: /* Event Handling Profile 2 */
3813 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3814 foffset += 4;
3815 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN);
3816 foffset += 4;
3817 foffset = qualifiedname(tvb, ndps_tree, foffset);
3818 length = tvb_get_ntohl(tvb, foffset);
3819 foffset += 4;
3820 if (length!=0)
3822 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, ENC_NA);
3824 foffset += length;
3825 foffset += (length%2);
3826 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3827 foffset += 4;
3828 foffset = name_or_id(tvb, ndps_tree, foffset);
3829 proto_tree_add_item(ndps_tree, hf_ndps_delivery_add_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
3830 event_object_type = tvb_get_ntohl(tvb, foffset);
3831 foffset += 4;
3832 switch(event_object_type)
3834 case 0: /*MHS ADDR*/
3835 case 1: /*DISTINGUISHED_NAME*/
3836 case 2: /*TEXT*/
3837 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
3838 break;
3839 case 3: /*OCTET_STRING*/
3840 length = tvb_get_ntohl(tvb, foffset);
3841 foffset += 4;
3842 if (length!=0)
3844 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, ENC_NA);
3846 foffset += length;
3847 foffset += (length%2);
3848 break;
3849 case 4: /*DIST_NAME_STRING*/
3850 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL);
3851 foffset = name_or_id(tvb, ndps_tree, foffset);
3852 break;
3853 case 5: /*RPC_ADDRESS*/
3854 case 6: /*QUALIFIED_NAME*/
3855 foffset = objectidentifier(tvb, ndps_tree, foffset);
3856 foffset = qualifiedname(tvb, ndps_tree, foffset);
3857 break;
3858 default:
3859 break;
3861 number_of_items = tvb_get_ntohl(tvb, foffset);
3862 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_events, tvb, foffset, 4, number_of_items);
3863 foffset += 4;
3864 for (ii = 0; ii < number_of_items; ii++ )
3866 if (ii >= NDPS_MAX_ITEMS) {
3867 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3868 break;
3870 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Event %u", ii+1);
3871 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
3872 foffset = objectidentifier(tvb, atree, foffset);
3873 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
3874 foffset += 4;
3875 proto_item_set_end(aitem, tvb, foffset);
3877 foffset = objectidentifier(tvb, ndps_tree, foffset);
3878 foffset = qualifiedname(tvb, ndps_tree, foffset);
3879 number_of_items = tvb_get_ntohl(tvb, foffset);
3880 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
3881 foffset += 4;
3882 for (ii = 0; ii < number_of_items; ii++ )
3884 if (ii >= NDPS_MAX_ITEMS) {
3885 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3886 break;
3888 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object %u", ii+1);
3889 foffset = objectidentifier(tvb, atree, foffset);
3890 proto_item_set_end(aitem, tvb, foffset);
3892 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3893 foffset += 4;
3894 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3895 foffset += 4;
3896 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
3897 foffset += 4;
3898 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
3899 break;
3900 default:
3901 break;
3903 return foffset;
3907 static int
3908 commonarguments(tvbuff_t* tvb, packet_info* pinfo, proto_tree *ndps_tree, int foffset)
3910 uint32_t number_of_items;
3911 uint32_t ii;
3912 proto_tree *atree, *btree;
3913 proto_item *aitem, *bitem, *expert_item;
3915 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Common Arguments");
3916 number_of_items = tvb_get_ntohl(tvb, foffset);
3917 expert_item = proto_tree_add_uint(atree, hf_ndps_num_args, tvb, foffset, 4, number_of_items);
3918 foffset += 4;
3919 for (ii = 0; ii < number_of_items; ii++ )
3921 if (ii >= NDPS_MAX_ITEMS) {
3922 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
3923 break;
3925 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Argument %u", ii+1);
3926 foffset = attribute_value(tvb, pinfo, btree, foffset);
3927 proto_item_set_end(bitem, tvb, foffset);
3929 proto_item_set_end(aitem, tvb, foffset);
3930 return foffset;
3933 static int
3934 res_add_input_data(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
3936 uint32_t resource_type=0;
3938 resource_type = tvb_get_ntohl(tvb, foffset);
3939 proto_tree_add_uint(ndps_tree, hf_res_type, tvb, foffset, 4, resource_type);
3940 foffset += 4;
3941 switch (resource_type)
3943 case 0: /* Print Drivers */
3944 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
3945 foffset += 4;
3946 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL);
3947 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL);
3948 break;
3949 case 1: /* Printer Definitions */
3950 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL);
3951 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL);
3952 break;
3953 case 2: /* Banner Page Files */
3954 foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset, NULL);
3955 break;
3956 case 3: /* Font Types */
3957 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
3958 foffset += 4;
3959 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
3960 foffset += 4;
3961 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL);
3962 break;
3963 case 4: /* Generic Files/ Archive */
3964 case 5: /* Printer Driver Archive */
3965 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
3966 foffset += 4;
3967 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL);
3968 proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
3969 foffset += 4;
3970 break;
3971 default:
3972 break;
3974 return foffset;
3978 static const fragment_items ndps_frag_items = {
3979 &ett_ndps_segment,
3980 &ett_ndps_segments,
3981 &hf_ndps_segments,
3982 &hf_ndps_segment,
3983 &hf_ndps_segment_overlap,
3984 &hf_ndps_segment_overlap_conflict,
3985 &hf_ndps_segment_multiple_tails,
3986 &hf_ndps_segment_too_long_segment,
3987 &hf_ndps_segment_error,
3988 &hf_ndps_segment_count,
3989 NULL,
3990 &hf_ndps_reassembled_length,
3991 /* Reassembled data field */
3992 NULL,
3993 "segments"
3996 /* NDPS packets come in request/reply pairs. The request packets tell the
3997 * Function and Program numbers. The response, unfortunately, only
3998 * identifies itself via the Exchange ID; you have to know what type of NDPS
3999 * request the request packet contained in order to successfully parse the
4000 * response. A global method for doing this does not exist in wireshark yet
4001 * (NFS also requires it), so for now the NDPS section will keep its own hash
4002 * table keeping track of NDPS packets.
4004 * We construct a conversation specified by the client and server
4005 * addresses and the connection number; the key representing the unique
4006 * NDPS request then is composed of the pointer to the conversation
4007 * structure, cast to a "uint" (which may throw away the upper 32
4008 * bits of the pointer on a P64 platform, but the low-order 32 bits
4009 * are more likely to differ between conversations than the upper 32 bits),
4010 * and the sequence number.
4012 * The value stored in the hash table is the ncp_req_hash_value pointer. This
4013 * struct tells us the NDPS Program and Function and gives the NDPS_record pointer.
4015 typedef struct {
4016 conversation_t *conversation;
4017 uint32_t ndps_xport;
4018 } ndps_req_hash_key;
4020 typedef struct {
4021 uint32_t ndps_prog;
4022 uint32_t ndps_func;
4023 uint32_t ndps_frame_num;
4024 bool ndps_frag;
4025 uint32_t ndps_end_frag;
4026 } ndps_req_hash_value;
4028 static wmem_map_t *ndps_req_hash;
4030 /* Hash Functions */
4031 static int
4032 ndps_equal(const void *v, const void *v2)
4034 const ndps_req_hash_key *val1 = (const ndps_req_hash_key*)v;
4035 const ndps_req_hash_key *val2 = (const ndps_req_hash_key*)v2;
4037 if (val1->conversation == val2->conversation &&
4038 val1->ndps_xport == val2->ndps_xport ) {
4039 return 1;
4041 return 0;
4044 static unsigned
4045 ndps_hash(const void *v)
4047 const ndps_req_hash_key *ndps_key = (const ndps_req_hash_key*)v;
4048 return GPOINTER_TO_UINT(ndps_key->conversation) + ndps_key->ndps_xport;
4051 static ndps_req_hash_value*
4052 ndps_hash_insert(conversation_t *conversation, uint32_t ndps_xport)
4054 ndps_req_hash_key *request_key;
4055 ndps_req_hash_value *request_value;
4057 /* Now remember the request, so we can find it if we later
4058 a reply to it. */
4059 request_key = wmem_new(wmem_file_scope(), ndps_req_hash_key);
4060 request_key->conversation = conversation;
4061 request_key->ndps_xport = ndps_xport;
4063 request_value = wmem_new(wmem_file_scope(), ndps_req_hash_value);
4064 request_value->ndps_prog = 0;
4065 request_value->ndps_func = 0;
4066 request_value->ndps_frame_num = 0;
4067 request_value->ndps_frag = false;
4068 request_value->ndps_end_frag = 0;
4070 wmem_map_insert(ndps_req_hash, request_key, request_value);
4072 return request_value;
4075 /* Returns the ncp_rec*, or NULL if not found. */
4076 static ndps_req_hash_value*
4077 ndps_hash_lookup(conversation_t *conversation, uint32_t ndps_xport)
4079 ndps_req_hash_key request_key;
4081 request_key.conversation = conversation;
4082 request_key.ndps_xport = ndps_xport;
4084 return (ndps_req_hash_value *)wmem_map_lookup(ndps_req_hash, &request_key);
4087 /* ================================================================= */
4088 /* NDPS */
4089 /* ================================================================= */
4091 static void
4092 dissect_ndps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree)
4094 uint32_t ndps_xid;
4095 uint32_t ndps_prog;
4096 uint32_t ndps_packet_type;
4097 int foffset;
4098 uint32_t ndps_hfname;
4099 uint32_t ndps_func;
4100 const char *ndps_program_string;
4101 const char *ndps_func_string;
4104 ndps_packet_type = tvb_get_ntohl(tvb, 8);
4105 if (ndps_packet_type != 0 && ndps_packet_type != 1) { /* Packet Type */
4106 col_set_str(pinfo->cinfo, COL_INFO, "(Continuation Data)");
4107 proto_tree_add_bytes_format(ndps_tree, hf_ndps_data, tvb, 0, -1, NULL, "Data - (%d Bytes)", tvb_reported_length(tvb));
4108 return;
4110 foffset = 0;
4111 proto_tree_add_item(ndps_tree, hf_ndps_record_mark, tvb,
4112 foffset, 2, ENC_BIG_ENDIAN);
4113 foffset += 2;
4114 proto_tree_add_item(ndps_tree, hf_ndps_length, tvb,
4115 foffset, 2, ENC_BIG_ENDIAN);
4116 foffset += 2;
4118 ndps_xid = tvb_get_ntohl(tvb, foffset);
4119 proto_tree_add_uint(ndps_tree, hf_ndps_xid, tvb, foffset, 4, ndps_xid);
4120 foffset += 4;
4121 ndps_packet_type = tvb_get_ntohl(tvb, foffset);
4122 proto_tree_add_uint(ndps_tree, hf_ndps_packet_type, tvb, foffset, 4, ndps_packet_type);
4123 foffset += 4;
4124 if(ndps_packet_type == 0x00000001) /* Reply packet */
4126 col_set_str(pinfo->cinfo, COL_INFO, "R NDPS ");
4127 proto_tree_add_item(ndps_tree, hf_ndps_rpc_accept, tvb, foffset, 4, ENC_BIG_ENDIAN);
4128 if (tvb_get_ntohl(tvb, foffset)==0) {
4129 foffset += 4;
4130 proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 8, ENC_NA);
4131 foffset += 8;
4133 else
4135 foffset += 4;
4136 proto_tree_add_item(ndps_tree, hf_ndps_rpc_rej_stat, tvb, foffset+4, 4, ENC_BIG_ENDIAN);
4137 foffset += 4;
4139 dissect_ndps_reply(tvb, pinfo, ndps_tree, foffset);
4141 else
4143 col_set_str(pinfo->cinfo, COL_INFO, "C NDPS ");
4144 proto_tree_add_item(ndps_tree, hf_ndps_rpc_version, tvb, foffset, 4, ENC_BIG_ENDIAN);
4145 foffset += 4;
4146 ndps_prog = tvb_get_ntohl(tvb, foffset);
4147 ndps_program_string = try_val_to_str(ndps_prog, spx_ndps_program_vals);
4148 if( ndps_program_string != NULL)
4150 proto_tree_add_item(ndps_tree, hf_spx_ndps_program, tvb, foffset, 4, ENC_BIG_ENDIAN);
4151 foffset += 4;
4152 col_append_str(pinfo->cinfo, COL_INFO, (const char*) ndps_program_string);
4153 col_append_str(pinfo->cinfo, COL_INFO, ", ");
4155 proto_tree_add_item(ndps_tree, hf_spx_ndps_version, tvb, foffset, 4, ENC_BIG_ENDIAN);
4156 foffset += 4;
4157 ndps_func = tvb_get_ntohl(tvb, foffset);
4158 switch(ndps_prog)
4160 case 0x060976:
4161 ndps_hfname = hf_spx_ndps_func_print;
4162 ndps_func_string = try_val_to_str_ext(ndps_func, &spx_ndps_print_func_vals_ext);
4163 break;
4164 case 0x060977:
4165 ndps_hfname = hf_spx_ndps_func_broker;
4166 ndps_func_string = try_val_to_str_ext(ndps_func, &spx_ndps_broker_func_vals_ext);
4167 break;
4168 case 0x060978:
4169 ndps_hfname = hf_spx_ndps_func_registry;
4170 ndps_func_string = try_val_to_str_ext(ndps_func, &spx_ndps_registry_func_vals_ext);
4171 break;
4172 case 0x060979:
4173 ndps_hfname = hf_spx_ndps_func_notify;
4174 ndps_func_string = try_val_to_str_ext(ndps_func, &spx_ndps_notify_func_vals_ext);
4175 break;
4176 case 0x06097a:
4177 ndps_hfname = hf_spx_ndps_func_resman;
4178 ndps_func_string = try_val_to_str_ext(ndps_func, &spx_ndps_resman_func_vals_ext);
4179 break;
4180 case 0x06097b:
4181 ndps_hfname = hf_spx_ndps_func_delivery;
4182 ndps_func_string = try_val_to_str(ndps_func, spx_ndps_deliver_func_vals);
4183 break;
4184 default:
4185 ndps_hfname = 0;
4186 ndps_func_string = NULL;
4187 break;
4189 if(ndps_hfname != 0)
4191 proto_tree_add_item(ndps_tree, ndps_hfname, tvb, foffset, 4, ENC_BIG_ENDIAN);
4192 if (ndps_func_string != NULL)
4194 col_append_str(pinfo->cinfo, COL_INFO, (const char*) ndps_func_string);
4196 foffset += 4;
4197 proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 16, ENC_NA);
4198 foffset+=16;
4199 dissect_ndps_request(tvb, pinfo, ndps_tree, ndps_prog, ndps_func, foffset);
4206 static unsigned
4207 get_ndps_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
4209 return tvb_get_ntohs(tvb, offset +2) + 4;
4212 static int
4213 dissect_ndps_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
4215 proto_tree *ndps_tree;
4216 proto_item *ti;
4218 col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS");
4220 col_clear(pinfo->cinfo, COL_INFO);
4222 ti = proto_tree_add_item(tree, proto_ndps, tvb, 0, -1, ENC_NA);
4223 ndps_tree = proto_item_add_subtree(ti, ett_ndps);
4225 dissect_ndps(tvb, pinfo, ndps_tree);
4226 return tvb_captured_length(tvb);
4230 * Defrag logic
4232 * SPX EOM not being set indicates we are inside or at the
4233 * beginning of a fragment. But when the end of the fragment
4234 * is encountered the flag is set. So we must mark what the
4235 * frame number is of the end fragment so that we will be
4236 * able to redissect if the user clicks on the packet
4237 * or resorts/filters the trace.
4239 * Once we are certain that we are in a fragment sequence
4240 * then we can just process each fragment in this conversation
4241 * until we reach the eom message packet. We can tell we are at
4242 * the final fragment because it is flagged as SPX EOM.
4244 * We will be able to easily determine if a conversation is a fragment
4245 * with the exception of the last packet in the fragment. So remember
4246 * the last fragment packet number.
4248 static void
4249 ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, spx_info *spx_info_p)
4251 unsigned len=0;
4252 tvbuff_t *next_tvb = NULL;
4253 fragment_head *fd_head;
4254 ndps_req_hash_value *request_value = NULL;
4255 conversation_t *conversation;
4257 /* Check to see if defragmentation is enabled in the dissector */
4258 if (!ndps_defragment) {
4259 dissect_ndps(tvb, pinfo, tree);
4260 return;
4262 /* Has this already been dissected? */
4263 if (!pinfo->fd->visited)
4265 /* Lets see if this is a new conversation */
4266 conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
4267 CONVERSATION_NCP, (uint32_t) pinfo->srcport, (uint32_t) pinfo->srcport, 0);
4269 if (conversation == NULL)
4271 /* It's not part of any conversation - create a new one. */
4272 conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst,
4273 CONVERSATION_NCP, (uint32_t) pinfo->srcport, (uint32_t) pinfo->srcport, 0);
4276 /* So now we need to get the request info for this conversation */
4277 request_value = ndps_hash_lookup(conversation, (uint32_t) pinfo->srcport);
4278 if (request_value == NULL)
4280 /* We haven't seen a packet with this conversation yet so create one. */
4281 request_value = ndps_hash_insert(conversation, (uint32_t) pinfo->srcport);
4283 /* Add it to pinfo so we can get it on further dissection requests */
4284 p_add_proto_data(wmem_file_scope(), pinfo, proto_ndps, 0, (void*) request_value);
4286 else
4288 /* Get request value data */
4289 request_value = (ndps_req_hash_value *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ndps, 0);
4291 if (!request_value)
4293 /* Can't find the original request packet so this is not any fragment packet */
4294 dissect_ndps(tvb, pinfo, tree);
4295 return;
4297 /* Check to see of this is a fragment. If so then mark as a fragment. */
4298 if (!spx_info_p->eom) {
4299 request_value->ndps_frag = true;
4301 /* Now we process the fragments */
4302 if (request_value->ndps_frag || (request_value->ndps_end_frag == pinfo->num))
4305 * Fragment
4307 tid = (pinfo->srcport+pinfo->destport);
4308 len = tvb_reported_length(tvb);
4309 if (tvb_captured_length(tvb) >= len)
4311 fd_head = fragment_add_seq_next(&ndps_reassembly_table, tvb, 0, pinfo, tid, NULL, len, !spx_info_p->eom);
4312 if (fd_head != NULL)
4314 /* Is this the last fragment? EOM will indicate */
4315 if (fd_head->next != NULL && spx_info_p->eom)
4317 proto_item *frag_tree_item;
4319 next_tvb = tvb_new_chain(tvb, fd_head->tvb_data);
4320 add_new_data_source(pinfo,
4321 next_tvb,
4322 "Reassembled NDPS");
4323 /* Show all fragments. */
4324 if (tree)
4326 show_fragment_seq_tree(fd_head,
4327 &ndps_frag_items,
4328 tree, pinfo,
4329 next_tvb, &frag_tree_item);
4330 tid++;
4332 /* Remember this fragment number so we can dissect again */
4333 request_value->ndps_end_frag = pinfo->num;
4336 else
4338 /* This is either a beginning or middle fragment on second dissection */
4339 next_tvb = tvb_new_subset_remaining(tvb, 0);
4340 if (!spx_info_p->eom)
4342 col_append_str(pinfo->cinfo, COL_INFO, "[NDPS Fragment]");
4346 else
4348 /* Fragment from first pass of dissection */
4349 if (!spx_info_p->eom)
4351 col_append_str(pinfo->cinfo, COL_INFO, "[NDPS Fragment]");
4354 next_tvb = NULL;
4357 else
4360 * There are no bytes so Dissect this
4362 next_tvb = tvb_new_subset_remaining(tvb, 0);
4364 if (next_tvb == NULL)
4366 /* This is a fragment packet */
4367 next_tvb = tvb_new_subset_remaining (tvb, 0);
4368 call_data_dissector(next_tvb, pinfo, tree);
4370 else
4372 /* This is the end fragment so dissect and mark end */
4373 if (spx_info_p->eom) {
4374 request_value->ndps_frag = false;
4375 dissect_ndps(next_tvb, pinfo, tree);
4379 else
4381 /* This is not any fragment packet */
4382 request_value->ndps_frag = false;
4383 dissect_ndps(tvb, pinfo, tree);
4387 static int
4388 dissect_ndps_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
4390 tcp_dissect_pdus(tvb, pinfo, tree, ndps_desegment, 4, get_ndps_pdu_len, dissect_ndps_pdu, data);
4391 return tvb_captured_length(tvb);
4395 static int
4396 dissect_ndps_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
4398 proto_tree *ndps_tree;
4399 proto_item *ti;
4401 /* Reject the packet if data is NULL */
4402 if (data == NULL)
4403 return 0;
4405 col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS");
4407 col_clear(pinfo->cinfo, COL_INFO);
4409 ti = proto_tree_add_item(tree, proto_ndps, tvb, 0, -1, ENC_NA);
4410 ndps_tree = proto_item_add_subtree(ti, ett_ndps);
4412 ndps_defrag(tvb, pinfo, ndps_tree, (spx_info*)data);
4413 return tvb_captured_length(tvb);
4416 static int
4417 dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, uint32_t ndps_prog, uint32_t ndps_func, int foffset)
4419 ndps_req_hash_value *request_value = NULL;
4420 conversation_t *conversation;
4421 uint32_t ii;
4422 uint32_t jj;
4423 uint32_t field_len;
4424 uint32_t cred_type;
4425 uint32_t resource_type;
4426 uint32_t filter_type;
4427 uint32_t print_type;
4428 uint32_t length;
4429 uint32_t number_of_items;
4430 uint32_t number_of_items2;
4431 uint32_t doc_content;
4432 uint32_t list_attr_op;
4433 uint32_t scope;
4434 uint32_t job_type;
4435 uint32_t supplier_flag;
4436 bool language_flag;
4437 bool method_flag;
4438 bool delivery_address_flag;
4439 uint32_t profiles_type;
4440 uint32_t profiles_choice_type;
4441 uint32_t integer_type_flag;
4442 uint32_t local_servers_type;
4443 int length_remaining;
4444 proto_tree *atree, *btree, *ctree, *dtree;
4445 proto_item *aitem, *bitem, *citem, *ditem, *expert_item;
4447 if (!pinfo->fd->visited)
4449 /* This is the first time we've looked at this packet.
4450 Keep track of the Program and connection whence the request
4451 came, and the address and connection to which the request
4452 is being sent, so that we can match up calls with replies.
4453 (We don't include the sequence number, as we may want
4454 to have all packets over the same connection treated
4455 as being part of a single conversation so that we can
4456 let the user select that conversation to be displayed.) */
4458 conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
4459 CONVERSATION_NCP, (uint32_t) pinfo->srcport, (uint32_t) pinfo->srcport, 0);
4461 if (conversation == NULL)
4463 /* It's not part of any conversation - create a new one. */
4464 conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst,
4465 CONVERSATION_NCP, (uint32_t) pinfo->srcport, (uint32_t) pinfo->srcport, 0);
4468 request_value = ndps_hash_insert(conversation, (uint32_t) pinfo->srcport);
4469 request_value->ndps_prog = ndps_prog;
4470 request_value->ndps_func = ndps_func;
4471 request_value->ndps_frame_num = pinfo->num;
4473 switch(ndps_prog)
4475 case 0x060976: /* Print */
4476 switch(ndps_func)
4478 case 0x00000001: /* Bind PSM */
4479 foffset = credentials(tvb, pinfo, ndps_tree, foffset);
4480 break;
4481 case 0x00000002: /* Bind PA */
4482 foffset = credentials(tvb, pinfo, ndps_tree, foffset);
4483 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, ENC_BIG_ENDIAN);
4484 foffset += 4;
4485 number_of_items=tvb_get_ntohl(tvb, foffset);
4486 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items);
4487 foffset += 4;
4488 for (ii = 0; ii < number_of_items; ii++ )
4490 if (ii >= NDPS_MAX_ITEMS) {
4491 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4492 break;
4494 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Security %u", ii+1);
4495 length = tvb_get_ntohl(tvb, foffset);
4496 if (length==4)
4498 proto_tree_add_uint(atree, hf_bind_security, tvb, foffset, 4, length);
4500 foffset += 4;
4501 proto_item_set_end(aitem, tvb, foffset);
4503 foffset = qualifiedname(tvb, ndps_tree, foffset);
4504 break;
4505 case 0x00000003: /* Unbind */
4506 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset,
4507 4, ENC_BIG_ENDIAN);
4508 break;
4509 case 0x00000004: /* Print */
4510 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
4511 foffset += 4;
4512 print_type = tvb_get_ntohl(tvb, foffset);
4513 proto_tree_add_uint(ndps_tree, hf_print_arg, tvb, foffset, 4, print_type);
4514 foffset += 4;
4515 switch (print_type)
4517 case 0: /* Create Job */
4518 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
4519 proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, ENC_BIG_ENDIAN);
4520 foffset += 4;
4521 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Transfer Method");
4522 number_of_items = tvb_get_ntohl(tvb, foffset);
4523 expert_item = proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4524 foffset += 4;
4525 for (ii = 0; ii < number_of_items; ii++ )
4527 if (ii >= NDPS_MAX_ITEMS) {
4528 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4529 break;
4531 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1);
4532 foffset = objectidentifier(tvb, btree, foffset);
4533 number_of_items2 = tvb_get_ntohl(tvb, foffset);
4534 expert_item = proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
4535 foffset += 4;
4536 for (jj = 0; jj < number_of_items2; jj++ )
4538 if (jj >= NDPS_MAX_ITEMS) {
4539 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4540 break;
4542 ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Value %u", jj+1);
4543 foffset = attribute_value(tvb, pinfo, ctree, foffset);
4544 proto_item_set_end(citem, tvb, foffset);
4546 proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, ENC_BIG_ENDIAN);
4547 foffset += 4;
4548 proto_item_set_end(bitem, tvb, foffset);
4550 proto_item_set_end(aitem, tvb, foffset);
4551 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Document Content");
4552 number_of_items = tvb_get_ntohl(tvb, foffset);
4553 expert_item = proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4554 foffset += 4;
4555 for (ii = 0; ii < number_of_items; ii++ )
4557 if (ii >= NDPS_MAX_ITEMS) {
4558 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4559 break;
4561 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Type %u", ii+1);
4562 foffset = objectidentifier(tvb, btree, foffset);
4563 proto_item_set_end(bitem, tvb, foffset);
4565 foffset += align_4(tvb, foffset);
4566 number_of_items = tvb_get_ntohl(tvb, foffset);
4567 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4568 foffset += 4;
4569 doc_content = tvb_get_ntohl(tvb, foffset);
4570 expert_item = proto_tree_add_uint(atree, hf_doc_content, tvb, foffset, 4, doc_content);
4571 foffset += 4;
4572 for (ii = 0; ii < number_of_items; ii++ )
4574 if (ii >= NDPS_MAX_ITEMS) {
4575 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4576 break;
4578 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Value %u", ii+1);
4579 if (doc_content==0)
4581 length = tvb_get_ntohl(tvb, foffset);
4582 proto_tree_add_uint(btree, hf_ndps_included_doc_len, tvb, foffset, 4, length);
4583 foffset += 4;
4584 length_remaining = tvb_reported_length_remaining(tvb, foffset);
4585 if (length_remaining == -1 || length > (uint32_t) length_remaining) /* Segmented Data */
4587 proto_tree_add_item(btree, hf_ndps_data, tvb, foffset, -1, ENC_NA);
4588 return foffset;
4590 if (length==4)
4592 proto_tree_add_item(btree, hf_ndps_included_doc, tvb, foffset, length, ENC_NA);
4594 foffset += length;
4595 foffset += (length%2);
4597 else
4599 foffset = ndps_string(tvb, hf_ndps_ref_name, btree, foffset, NULL);
4600 foffset = name_or_id(tvb, btree, foffset);
4602 proto_item_set_end(bitem, tvb, foffset);
4604 proto_item_set_end(aitem, tvb, foffset);
4605 foffset += 4;
4606 if (align_4(tvb, foffset)>0) {
4607 foffset += align_4(tvb, foffset);
4609 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Document Type");
4610 number_of_items = tvb_get_ntohl(tvb, foffset);
4611 expert_item = proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4612 foffset += 4;
4613 for (ii = 0; ii < number_of_items; ii++ )
4615 if (ii >= NDPS_MAX_ITEMS) {
4616 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4617 break;
4619 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1);
4620 foffset = objectidentifier(tvb, btree, foffset);
4621 number_of_items2 = tvb_get_ntohl(tvb, foffset);
4622 expert_item = proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
4623 foffset += 4;
4624 for (jj = 0; jj < number_of_items2; jj++ )
4626 if (jj >= NDPS_MAX_ITEMS) {
4627 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4628 break;
4630 ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Value %u", jj+1);
4631 foffset = attribute_value(tvb, pinfo, ctree, foffset);
4632 proto_item_set_end(citem, tvb, foffset);
4634 proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, ENC_BIG_ENDIAN);
4635 foffset += 4;
4636 proto_item_set_end(bitem, tvb, foffset);
4638 proto_item_set_end(aitem, tvb, foffset);
4639 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Document Attributes");
4640 number_of_items = tvb_get_ntohl(tvb, foffset);
4641 expert_item = proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4642 foffset += 4;
4643 for (ii = 0; ii < number_of_items; ii++ )
4645 if (ii >= NDPS_MAX_ITEMS) {
4646 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4647 break;
4649 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1);
4650 foffset = attribute_value(tvb, pinfo, btree, foffset); /* Document Attributes */
4651 proto_item_set_end(bitem, tvb, foffset);
4653 break;
4654 case 1: /* Add Job */
4655 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
4656 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
4657 foffset += 4;
4658 proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, ENC_BIG_ENDIAN);
4659 foffset += 4;
4660 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Transfer Method");
4661 number_of_items = tvb_get_ntohl(tvb, foffset);
4662 expert_item = proto_tree_add_uint(atree, hf_ndps_num_transfer_methods, tvb, foffset, 4, number_of_items);
4663 foffset += 4;
4664 for (ii = 0; ii < number_of_items; ii++ )
4666 if (ii >= NDPS_MAX_ITEMS) {
4667 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4668 break;
4670 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Method %u", ii+1);
4671 foffset = objectidentifier(tvb, btree, foffset); /* Transfer Method */
4672 proto_item_set_end(bitem, tvb, foffset);
4674 proto_tree_add_item(ndps_tree, hf_doc_content, tvb, foffset, 4, ENC_BIG_ENDIAN);
4675 foffset += 4;
4676 proto_item_set_end(aitem, tvb, foffset);
4677 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Document Type");
4678 number_of_items = tvb_get_ntohl(tvb, foffset);
4679 expert_item = proto_tree_add_uint(atree, hf_ndps_num_doc_types, tvb, foffset, 4, number_of_items);
4680 foffset += 4;
4681 for (ii = 0; ii < number_of_items; ii++ )
4683 if (ii >= NDPS_MAX_ITEMS) {
4684 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4685 break;
4687 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Type %u", ii+1);
4688 foffset = objectidentifier(tvb, btree, foffset); /* Document Type */
4689 proto_item_set_end(bitem, tvb, foffset);
4691 foffset += align_4(tvb, foffset);
4692 proto_item_set_end(aitem, tvb, foffset);
4693 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Document Attributes");
4694 number_of_items = tvb_get_ntohl(tvb, foffset);
4695 expert_item = proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4696 foffset += 4;
4697 for (ii = 0; ii < number_of_items; ii++ )
4699 if (ii >= NDPS_MAX_ITEMS) {
4700 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4701 break;
4703 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1);
4704 foffset = attribute_value(tvb, pinfo, btree, foffset); /* Document Attributes */
4705 proto_item_set_end(bitem, tvb, foffset);
4707 proto_item_set_end(aitem, tvb, foffset);
4708 break;
4709 case 2: /* Close Job */
4710 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
4711 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
4712 foffset += 4;
4713 break;
4714 default:
4715 break;
4717 break;
4718 case 0x00000005: /* Modify Job */
4719 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
4720 foffset += 4;
4721 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
4722 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
4723 foffset += 4;
4724 proto_tree_add_item(ndps_tree, hf_ndps_document_number, tvb, foffset, 4, ENC_BIG_ENDIAN);
4725 foffset += 4;
4726 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job Modifications");
4727 number_of_items = tvb_get_ntohl(tvb, foffset);
4728 expert_item = proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4729 foffset += 4;
4730 for (ii = 0; ii < number_of_items; ii++ )
4732 if (ii >= NDPS_MAX_ITEMS) {
4733 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4734 break;
4736 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Modification %u", ii+1);
4737 foffset = attribute_value(tvb, pinfo, btree, foffset); /* Job Modifications */
4738 proto_item_set_end(bitem, tvb, foffset);
4740 proto_item_set_end(aitem, tvb, foffset);
4741 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Document Modifications");
4742 number_of_items = tvb_get_ntohl(tvb, foffset);
4743 expert_item = proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4744 foffset += 4;
4745 for (ii = 0; ii < number_of_items; ii++ )
4747 if (ii >= NDPS_MAX_ITEMS) {
4748 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4749 break;
4751 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Modification %u", ii+1);
4752 foffset = attribute_value(tvb, pinfo, btree, foffset); /* Document Modifications */
4753 proto_item_set_end(bitem, tvb, foffset);
4755 proto_item_set_end(aitem, tvb, foffset);
4756 break;
4757 case 0x00000006: /* Cancel Job */
4758 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
4759 foffset += 4;
4760 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
4761 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
4762 foffset += 4;
4763 proto_tree_add_item(ndps_tree, hf_ndps_document_number, tvb, foffset, 4, ENC_BIG_ENDIAN);
4764 foffset += 4;
4765 /* XXX - what does this count? */
4766 number_of_items = tvb_get_ntohl(tvb, foffset);
4767 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
4768 foffset += 4;
4769 /* Start of nameorid */
4770 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Cancel Message");
4771 foffset = name_or_id(tvb, atree, foffset);
4772 proto_item_set_end(aitem, tvb, foffset);
4773 /* End of nameorid */
4774 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Retention Period");
4775 proto_tree_add_item(atree, hf_ndps_status_flags, tvb, foffset, 4, ENC_BIG_ENDIAN);
4776 foffset += 4;
4777 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
4778 foffset += 4;
4779 proto_item_set_end(aitem, tvb, foffset);
4780 break;
4781 case 0x00000007: /* List Object Attributes */
4782 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
4783 foffset += 4;
4784 list_attr_op = tvb_get_ntohl(tvb, foffset);
4785 proto_tree_add_uint(ndps_tree, hf_ndps_attrs_arg, tvb, foffset, 4, list_attr_op);
4786 foffset += 4;
4787 if (list_attr_op==0) /* Continuation */
4789 length = tvb_get_ntohl(tvb, foffset);
4790 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
4791 foffset += 4;
4792 if (length!=0)
4794 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, ENC_NA);
4796 foffset += length;
4797 foffset += (length%2);
4798 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
4799 foffset += 4;
4800 number_of_items = tvb_get_ntohl(tvb, foffset);
4801 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4802 foffset += 4;
4803 for (ii = 0; ii < number_of_items; ii++ )
4805 if (ii >= NDPS_MAX_ITEMS) {
4806 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4807 break;
4809 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Attribute %u", ii+1);
4810 foffset = attribute_value(tvb, pinfo, atree, foffset);
4811 proto_item_set_end(aitem, tvb, foffset);
4814 else /* Specification */
4816 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Class");
4817 foffset = objectidentifier(tvb, atree, foffset);
4818 proto_item_set_end(aitem, tvb, foffset);
4819 foffset += 4;
4820 foffset += align_4(tvb, foffset);
4821 scope = tvb_get_ntohl(tvb, foffset);
4822 proto_tree_add_uint(ndps_tree, hf_ndps_scope, tvb, foffset, 4, scope);
4823 foffset += 4;
4824 if (scope!=0) /* Scope Does not equal 0 */
4826 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Selector Option");
4827 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPSelector */
4828 expert_item = proto_tree_add_uint(atree, hf_ndps_num_options, tvb, foffset, 4, number_of_items);
4829 foffset += 4;
4830 for (ii = 0; ii < number_of_items; ii++ )
4832 if (ii >= NDPS_MAX_ITEMS) {
4833 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4834 break;
4836 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Option %u", ii+1);
4837 foffset = objectidentification(tvb, btree, foffset);
4838 proto_item_set_end(bitem, tvb, foffset);
4840 proto_item_set_end(aitem, tvb, foffset);
4841 foffset += align_4(tvb, foffset);
4842 filter_type = tvb_get_ntohl(tvb, foffset);
4843 proto_tree_add_uint(ndps_tree, hf_ndps_filter, tvb, foffset, 4, filter_type);
4844 foffset += 4;
4845 #if 0
4846 if (filter_type == 0 || filter_type == 3 )
4848 foffset = filteritem(tvb, ndps_tree, foffset);
4850 else
4852 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Filter Items");
4853 number_of_items = tvb_get_ntohl(tvb, foffset);
4854 expert_item = proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
4855 foffset += 4;
4856 for (ii = 0; ii < number_of_items; ii++ )
4858 if (ii >= NDPS_MAX_ITEMS) {
4859 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4860 break;
4862 foffset = filteritem(tvb, ndps_tree, foffset);
4864 proto_item_set_end(aitem, tvb, foffset);
4866 #endif
4867 proto_tree_add_item(ndps_tree, hf_ndps_time_limit, tvb, foffset, 4, ENC_BIG_ENDIAN);
4868 foffset += 4;
4869 proto_tree_add_item(ndps_tree, hf_ndps_count_limit, tvb, foffset, 4, ENC_BIG_ENDIAN);
4870 foffset += 4; /* End of NWDPSelector */
4872 foffset += 4; /* Don't know what this is */
4873 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Requested Attributes");
4874 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPObjectIdentifierSet */
4875 expert_item = proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4876 foffset += 4;
4877 for (ii = 0; ii < number_of_items; ii++ )
4879 if (ii >= NDPS_MAX_ITEMS) {
4880 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
4881 break;
4883 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1);
4884 foffset = objectidentifier(tvb, btree, foffset);
4885 proto_item_set_end(bitem, tvb, foffset);
4887 proto_item_set_end(aitem, tvb, foffset); /* End of NWDPObjectIdentifierSet */
4888 if (number_of_items == 0)
4890 break;
4892 proto_tree_add_item(ndps_tree, hf_ndps_operator, tvb, foffset, 4, ENC_BIG_ENDIAN);
4893 foffset += 4;
4894 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
4896 break;
4897 case 0x00000008: /* Promote Job */
4898 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
4899 foffset += 4;
4900 /* Start of NWDPPrtContainedObjectId */
4901 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job ID");
4902 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
4903 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
4904 foffset += 4;
4905 proto_item_set_end(aitem, tvb, foffset);
4906 /* End of NWDPPrtContainedObjectId */
4907 /* Start of nameorid */
4908 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Message Option");
4909 foffset = name_or_id(tvb, atree, foffset);
4910 proto_item_set_end(aitem, tvb, foffset);
4911 /* End of nameorid */
4912 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
4913 break;
4914 case 0x00000009: /* Interrupt */
4915 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
4916 foffset += 4;
4917 job_type = tvb_get_ntohl(tvb, foffset);
4918 proto_tree_add_uint(ndps_tree, hf_interrupt_job_type, tvb, foffset, 4, job_type);
4919 foffset += 4;
4920 if (job_type==0)
4922 /* Start of NWDPPrtContainedObjectId */
4923 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job ID");
4924 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
4925 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
4926 foffset += 4;
4927 proto_item_set_end(aitem, tvb, foffset);
4928 /* End of NWDPPrtContainedObjectId */
4930 else
4932 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
4934 /* Start of nameorid */
4935 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Interrupt Message Option");
4936 foffset = name_or_id(tvb, atree, foffset);
4937 proto_item_set_end(aitem, tvb, foffset);
4938 /* End of nameorid */
4939 /* Start of NWDPPrtContainedObjectId */
4940 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Interrupting Job");
4941 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
4942 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
4943 foffset += 4;
4944 proto_item_set_end(aitem, tvb, foffset);
4945 /* End of NWDPPrtContainedObjectId */
4946 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
4947 break;
4948 case 0x0000000a: /* Pause */
4949 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
4950 foffset += 4;
4951 job_type = tvb_get_ntohl(tvb, foffset);
4952 proto_tree_add_uint(ndps_tree, hf_pause_job_type, tvb, foffset, 4, job_type);
4953 foffset += 4;
4954 if (job_type==0)
4956 /* Start of NWDPPrtContainedObjectId */
4957 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job ID");
4958 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
4959 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
4960 foffset += 4;
4961 proto_item_set_end(aitem, tvb, foffset);
4962 /* End of NWDPPrtContainedObjectId */
4964 else
4966 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
4968 /* Start of nameorid */
4969 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Pause Message Option");
4970 foffset = name_or_id(tvb, atree, foffset);
4971 proto_item_set_end(aitem, tvb, foffset);
4972 /* End of nameorid */
4973 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
4974 break;
4975 case 0x0000000b: /* Resume */
4976 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
4977 foffset += 4;
4978 /* Start of NWDPPrtContainedObjectId */
4979 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job ID");
4980 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
4981 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
4982 foffset += 4;
4983 proto_item_set_end(aitem, tvb, foffset);
4984 /* End of NWDPPrtContainedObjectId */
4985 /* Start of nameorid */
4986 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Resume Message Option");
4987 foffset = name_or_id(tvb, atree, foffset);
4988 proto_item_set_end(aitem, tvb, foffset);
4989 /* End of nameorid */
4990 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
4991 break;
4992 case 0x0000000c: /* Clean */
4993 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
4994 foffset += 4;
4995 /* Start of nameorid */
4996 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Clean Message Option");
4997 foffset = name_or_id(tvb, atree, foffset);
4998 proto_item_set_end(aitem, tvb, foffset);
4999 /* End of nameorid */
5000 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5001 break;
5002 case 0x0000000d: /* Create */
5003 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5004 foffset += 4;
5005 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Class");
5006 foffset = objectidentifier(tvb, atree, foffset);
5007 proto_item_set_end(aitem, tvb, foffset);
5008 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object ID");
5009 foffset = objectidentification(tvb, atree, foffset);
5010 proto_item_set_end(aitem, tvb, foffset);
5011 proto_tree_add_item(ndps_tree, hf_ndps_force, tvb, foffset, 4, ENC_BIG_ENDIAN);
5012 foffset += 4;
5013 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Reference Object Option");
5014 foffset = objectidentification(tvb, atree, foffset);
5015 proto_item_set_end(aitem, tvb, foffset);
5016 /* Start of AttributeSet */
5017 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Attribute");
5018 number_of_items = tvb_get_ntohl(tvb, foffset);
5019 expert_item = proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
5020 foffset += 4;
5021 for (ii = 0; ii < number_of_items; ii++ )
5023 if (ii >= NDPS_MAX_ITEMS) {
5024 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5025 break;
5027 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1);
5028 foffset = attribute_value(tvb, pinfo, btree, foffset); /* Object Attribute Set */
5029 proto_item_set_end(bitem, tvb, foffset);
5031 proto_item_set_end(aitem, tvb, foffset);
5032 /* End of AttributeSet */
5033 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5034 break;
5035 case 0x0000000e: /* Delete */
5036 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5037 foffset += 4;
5038 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Class");
5039 foffset = objectidentifier(tvb, atree, foffset);
5040 proto_item_set_end(aitem, tvb, foffset);
5041 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object ID");
5042 foffset = objectidentification(tvb, atree, foffset);
5043 proto_item_set_end(aitem, tvb, foffset);
5044 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5045 break;
5046 case 0x0000000f: /* Disable PA */
5047 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5048 foffset += 4;
5049 /* Start of NameorID */
5050 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Disable PA Message Option");
5051 foffset = name_or_id(tvb, atree, foffset);
5052 proto_item_set_end(aitem, tvb, foffset);
5053 /* End of NameorID */
5054 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5055 break;
5056 case 0x00000010: /* Enable PA */
5057 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5058 foffset += 4;
5059 /* Start of NameorID */
5060 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Enable PA Message Option");
5061 foffset = name_or_id(tvb, atree, foffset);
5062 proto_item_set_end(aitem, tvb, foffset);
5063 /* End of NameorID */
5064 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5065 break;
5066 case 0x00000011: /* Resubmit Jobs */
5067 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5068 foffset += 4;
5069 foffset = qualifiedname(tvb, ndps_tree, foffset);
5070 foffset = address_item(tvb, ndps_tree, foffset);
5071 proto_tree_add_item(ndps_tree, hf_resubmit_op_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
5072 foffset += 4;
5073 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Resubmit Job");
5074 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of ResubmitJob Set */
5075 expert_item = proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5076 foffset += 4;
5077 for (ii = 0; ii < number_of_items; ii++ )
5079 if (ii >= NDPS_MAX_ITEMS) {
5080 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5081 break;
5083 /* Start of NWDPPrtContainedObjectId */
5084 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Job ID");
5085 foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset, NULL);
5086 proto_tree_add_item(btree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5087 foffset += 4;
5088 proto_item_set_end(bitem, tvb, foffset);
5089 /* End of NWDPPrtContainedObjectId */
5090 proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset, 4, ENC_BIG_ENDIAN);
5091 foffset += 4;
5092 /* Start of AttributeSet */
5093 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Job Attributes");
5094 number_of_items2 = tvb_get_ntohl(tvb, foffset);
5095 expert_item = proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
5096 foffset += 4;
5097 for (jj = 0; jj < number_of_items2; jj++ )
5099 if (jj >= NDPS_MAX_ITEMS) {
5100 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5101 break;
5103 ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Attribute %u", jj+1);
5104 foffset = attribute_value(tvb, pinfo, ctree, foffset); /* Object Attribute Set */
5105 proto_item_set_end(citem, tvb, foffset);
5107 proto_item_set_end(bitem, tvb, foffset);
5108 /* End of AttributeSet */
5109 /* Start of AttributeSet */
5110 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Document Attributes");
5111 number_of_items2 = tvb_get_ntohl(tvb, foffset);
5112 expert_item = proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
5113 foffset += 4;
5114 for (jj = 0; jj < number_of_items2; jj++ )
5116 if (jj >= NDPS_MAX_ITEMS) {
5117 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5118 break;
5120 ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Attribute %u", jj+1);
5121 foffset = attribute_value(tvb, pinfo, ctree, foffset); /* Object Attribute Set */
5122 proto_item_set_end(citem, tvb, foffset);
5124 proto_item_set_end(bitem, tvb, foffset);
5125 /* End of AttributeSet */
5127 proto_item_set_end(aitem, tvb, foffset); /* End of ResubmitJob Set */
5128 /* Start of NameorID */
5129 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Resubmit Message Option");
5130 foffset = name_or_id(tvb, atree, foffset);
5131 proto_item_set_end(aitem, tvb, foffset);
5132 /* End of NameorID */
5133 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5134 break;
5135 case 0x00000012: /* Set */
5136 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5137 foffset += 4;
5138 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Class");
5139 foffset = objectidentifier(tvb, atree, foffset);
5140 proto_item_set_end(aitem, tvb, foffset);
5141 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object ID");
5142 foffset = objectidentification(tvb, atree, foffset);
5143 /* Start of AttributeSet */
5144 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Attribute Modifications");
5145 number_of_items = tvb_get_ntohl(tvb, foffset);
5146 expert_item = proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
5147 foffset += 4;
5148 for (ii = 0; ii < number_of_items; ii++ )
5150 if (ii >= NDPS_MAX_ITEMS) {
5151 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5152 break;
5154 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Modification `%d", ii+1);
5155 foffset = attribute_value(tvb, pinfo, btree, foffset); /* Object Attribute Set */
5156 proto_item_set_end(bitem, tvb, foffset);
5158 proto_item_set_end(aitem, tvb, foffset);
5159 /* End of AttributeSet */
5160 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5161 break;
5162 case 0x00000013: /* Shutdown PA */
5163 case 0x0000001e: /* Shutdown PSM */
5164 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5165 foffset += 4;
5166 proto_tree_add_item(ndps_tree, hf_shutdown_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
5167 foffset += 4;
5168 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
5169 /* Start of NameorID */
5170 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Shutdown Message Option");
5171 foffset = name_or_id(tvb, atree, foffset);
5172 proto_item_set_end(aitem, tvb, foffset);
5173 /* End of NameorID */
5174 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5175 break;
5176 case 0x00000014: /* Startup PA */
5177 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5178 foffset += 4;
5179 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
5180 /* Start of NameorID */
5181 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Startup Message Option");
5182 foffset = name_or_id(tvb, atree, foffset);
5183 proto_item_set_end(aitem, tvb, foffset);
5184 /* End of NameorID */
5185 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5186 break;
5187 case 0x00000015: /* Reorder Job */
5188 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5189 foffset += 4;
5190 /* Start of NWDPPrtContainedObjectId */
5191 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job Identification");
5192 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
5193 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5194 foffset += 4;
5195 proto_item_set_end(aitem, tvb, foffset);
5196 /* End of NWDPPrtContainedObjectId */
5197 /* Start of NWDPPrtContainedObjectId */
5198 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Reference Job ID");
5199 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
5200 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5201 foffset += 4;
5202 proto_item_set_end(aitem, tvb, foffset);
5203 /* End of NWDPPrtContainedObjectId */
5204 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5205 break;
5206 case 0x00000016: /* Pause PA */
5207 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5208 foffset += 4;
5209 /* Start of NameorID */
5210 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Pause Message Option");
5211 foffset = name_or_id(tvb, atree, foffset);
5212 proto_item_set_end(aitem, tvb, foffset);
5213 /* End of NameorID */
5214 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5215 break;
5216 case 0x00000017: /* Resume PA */
5217 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5218 foffset += 4;
5219 /* Start of NameorID */
5220 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Resume Message Option");
5221 foffset = name_or_id(tvb, atree, foffset);
5222 proto_item_set_end(aitem, tvb, foffset);
5223 /* End of NameorID */
5224 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5225 break;
5226 case 0x00000018: /* Transfer Data */
5227 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5228 foffset += 4;
5229 proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
5230 foffset += 4;
5231 proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), ENC_NA);
5232 break;
5233 case 0x00000019: /* Device Control */
5234 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5235 foffset += 4;
5236 /* Start of Object Identifier */
5237 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Operation ID");
5238 foffset = objectidentifier(tvb, atree, foffset);
5239 proto_item_set_end(aitem, tvb, foffset);
5240 /* End of Object Identifier */
5241 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5242 break;
5243 case 0x0000001a: /* Add Event Profile */
5244 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5245 foffset += 4;
5246 /* Start of Eventhandling2 */
5247 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5248 foffset += 4;
5249 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN);
5250 foffset += 4;
5251 foffset = qualifiedname(tvb, ndps_tree, foffset);
5252 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL);
5253 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5254 foffset += 4;
5255 /* Start of NameorID */
5256 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
5257 foffset = name_or_id(tvb, atree, foffset);
5258 foffset += align_4(tvb, foffset);
5259 proto_item_set_end(aitem, tvb, foffset);
5260 /* End of NameorID */
5261 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Address");
5262 number_of_items = tvb_get_ntohl(tvb, foffset);
5263 expert_item = proto_tree_add_uint(atree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
5264 foffset += 4;
5265 for (ii = 0; ii < number_of_items; ii++ )
5267 if (ii >= NDPS_MAX_ITEMS) {
5268 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5269 break;
5271 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Address %u", ii+1);
5272 foffset = address_item(tvb, btree, foffset);
5273 proto_item_set_end(bitem, tvb, foffset);
5275 proto_item_set_end(aitem, tvb, foffset);
5276 foffset = event_object_set(tvb, pinfo, ndps_tree, foffset);
5277 foffset = qualifiedname(tvb, ndps_tree, foffset);
5278 break;
5279 case 0x0000001b: /* Remove Event Profile */
5280 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5281 foffset += 4;
5282 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5283 foffset += 4;
5284 break;
5285 case 0x0000001c: /* Modify Event Profile */
5286 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5287 foffset += 4;
5288 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5289 foffset += 4;
5290 proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &supplier_flag);
5291 foffset += 4;
5292 if (supplier_flag)
5294 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Supplier ID");
5295 length = tvb_get_ntohl(tvb, foffset);
5296 foffset += 4;
5297 if (length==4)
5299 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
5301 tvb_ensure_bytes_exist(tvb, foffset, length);
5302 foffset += length;
5303 proto_item_set_end(aitem, tvb, foffset);
5305 proto_tree_add_item_ret_boolean(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &language_flag);
5306 foffset += 4;
5307 if (language_flag)
5309 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5310 foffset += 4;
5312 proto_tree_add_item_ret_boolean(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &method_flag);
5313 foffset += 4;
5314 if (method_flag)
5316 /* Start of NameorID */
5317 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
5318 foffset = name_or_id(tvb, atree, foffset);
5319 proto_item_set_end(aitem, tvb, foffset);
5320 /* End of NameorID */
5322 proto_tree_add_item_ret_boolean(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &delivery_address_flag);
5323 foffset += 4;
5324 if (delivery_address_flag)
5326 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Address");
5327 foffset = print_address(tvb, atree, foffset);
5328 proto_item_set_end(aitem, tvb, foffset);
5330 foffset = event_object_set(tvb, pinfo, ndps_tree, foffset);
5331 break;
5332 case 0x0000001d: /* List Event Profiles */
5333 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5334 foffset += 4;
5335 profiles_type = tvb_get_ntohl(tvb, foffset);
5336 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, profiles_type);
5337 foffset += 4;
5338 if (profiles_type==0) /* Spec */
5340 foffset = qualifiedname(tvb, ndps_tree, foffset);
5341 profiles_choice_type = tvb_get_ntohl(tvb, foffset);
5342 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, profiles_choice_type);
5343 foffset += 4;
5344 if (profiles_choice_type==0) /* Choice */
5346 foffset = cardinal_seq(tvb, pinfo, ndps_tree, foffset);
5348 else
5350 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer");
5351 foffset = qualifiedname(tvb, atree, foffset);
5352 proto_item_set_end(aitem, tvb, foffset);
5353 /* Start of NameorID */
5354 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
5355 foffset = name_or_id(tvb, atree, foffset);
5356 /* End of NameorID */
5357 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5358 foffset += 4;
5359 proto_item_set_end(aitem, tvb, foffset);
5361 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
5362 foffset += 4;
5363 /* Start of integeroption */
5364 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5365 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5366 foffset += 4;
5367 if (integer_type_flag!=0)
5369 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
5370 foffset += 4;
5372 /* End of integeroption */
5374 else /* Cont */
5376 length = tvb_get_ntohl(tvb, foffset);
5377 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5378 foffset += 4;
5379 if (length!=0)
5381 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, ENC_NA);
5383 foffset += length;
5384 foffset += (length%2);
5385 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
5386 foffset += 4;
5388 break;
5389 case 0x0000001f: /* Cancel PSM Shutdown */
5390 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5391 foffset += 4;
5392 /* Start of NameorID */
5393 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Cancel Shutdown Message Option");
5394 foffset = name_or_id(tvb, atree, foffset);
5395 proto_item_set_end(aitem, tvb, foffset);
5396 /* End of NameorID */
5397 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5398 break;
5399 case 0x00000020: /* Set Printer DS Information */
5400 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5401 foffset += 4;
5402 proto_tree_add_item(ndps_tree, hf_ndps_ds_info_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
5403 foffset += 4;
5404 foffset = ndps_string(tvb, hf_ndps_printer_name, ndps_tree, foffset, NULL);
5405 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "DS Object Name");
5406 foffset = qualifiedname(tvb, atree, foffset);
5407 proto_item_set_end(aitem, tvb, foffset);
5408 break;
5409 case 0x00000021: /* Clean User Jobs */
5410 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5411 foffset += 4;
5412 /* Start of NameorID */
5413 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Clean Message Option");
5414 foffset = name_or_id(tvb, atree, foffset);
5415 proto_item_set_end(aitem, tvb, foffset);
5416 /* End of NameorID */
5417 foffset = commonarguments(tvb, pinfo, ndps_tree, foffset);
5418 break;
5419 case 0x00000022: /* Map GUID to NDS Name */
5420 length = tvb_get_ntohl(tvb, foffset);
5421 foffset += 4;
5422 if (length!=0)
5424 proto_tree_add_item(ndps_tree, hf_ndps_guid, tvb, foffset, length, ENC_NA);
5426 foffset += length;
5427 break;
5428 case 0x00000023: /* AddEventProfile2 */
5429 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5430 foffset += 4;
5431 /* Start of Eventhandling2 */
5432 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5433 foffset += 4;
5434 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN);
5435 foffset += 4;
5436 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer Name");
5437 foffset = qualifiedname(tvb, atree, foffset);
5438 proto_item_set_end(aitem, tvb, foffset);
5439 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL);
5440 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5441 foffset += 4;
5442 /* Start of NameorID */
5443 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
5444 foffset = name_or_id(tvb, atree, foffset);
5445 foffset += align_4(tvb, foffset);
5446 proto_item_set_end(aitem, tvb, foffset);
5447 /* End of NameorID */
5448 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Address");
5449 number_of_items = tvb_get_ntohl(tvb, foffset);
5450 expert_item = proto_tree_add_uint(atree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
5451 foffset += 4;
5452 for (ii = 0; ii < number_of_items; ii++ )
5454 if (ii >= NDPS_MAX_ITEMS) {
5455 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5456 break;
5458 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Address %u", ii+1);
5459 foffset = address_item(tvb, btree, foffset);
5460 proto_item_set_end(bitem, tvb, foffset);
5462 proto_item_set_end(aitem, tvb, foffset);
5463 foffset = event_object_set(tvb, pinfo, ndps_tree, foffset);
5464 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Account");
5465 foffset = qualifiedname(tvb, atree, foffset);
5466 proto_item_set_end(aitem, tvb, foffset);
5467 /* Start of object identifier set */
5468 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Notify Attributes");
5469 number_of_items = tvb_get_ntohl(tvb, foffset);
5470 expert_item = proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
5471 foffset += 4;
5472 for (ii = 0; ii < number_of_items; ii++ )
5474 if (ii >= NDPS_MAX_ITEMS) {
5475 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5476 break;
5478 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1);
5479 foffset = objectidentifier(tvb, btree, foffset);
5480 proto_item_set_end(bitem, tvb, foffset);
5482 proto_item_set_end(aitem, tvb, foffset);
5483 /* End of object identifier set */
5484 proto_tree_add_item(ndps_tree, hf_notify_time_interval, tvb, foffset, 4, ENC_BIG_ENDIAN);
5485 foffset += 4;
5486 proto_tree_add_item(ndps_tree, hf_notify_sequence_number, tvb, foffset, 4, ENC_BIG_ENDIAN);
5487 foffset += 4;
5488 proto_tree_add_item(ndps_tree, hf_notify_lease_exp_time, tvb, foffset, 4, ENC_BIG_ENDIAN);
5489 foffset += 4;
5490 foffset = ndps_string(tvb, hf_notify_printer_uri, ndps_tree, foffset, NULL);
5491 /* End of Eventhandling2 */
5492 break;
5493 case 0x00000024: /* ListEventProfiles2 */
5494 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5495 foffset += 4;
5496 profiles_type = tvb_get_ntohl(tvb, foffset);
5497 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, profiles_type);
5498 foffset += 4;
5499 if (profiles_type==0) /* Spec */
5501 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Supplier Alias");
5502 foffset = qualifiedname(tvb, atree, foffset);
5503 proto_item_set_end(aitem, tvb, foffset);
5504 profiles_choice_type = tvb_get_ntohl(tvb, foffset);
5505 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, profiles_choice_type);
5506 foffset += 4;
5507 if (profiles_choice_type==0) /* Choice */
5509 foffset = cardinal_seq(tvb, pinfo, ndps_tree, foffset);
5511 else
5513 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer");
5514 foffset = qualifiedname(tvb, atree, foffset);
5515 proto_item_set_end(aitem, tvb, foffset);
5516 /* Start of NameorID */
5517 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
5518 foffset = name_or_id(tvb, atree, foffset);
5519 proto_item_set_end(aitem, tvb, foffset);
5520 /* End of NameorID */
5521 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5522 foffset += 4;
5524 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
5525 foffset += 4;
5526 /* Start of integeroption */
5527 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5528 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5529 foffset += 4;
5530 if (integer_type_flag!=0)
5532 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
5533 foffset += 4;
5535 /* End of integeroption */
5537 else /* Cont */
5539 length = tvb_get_ntohl(tvb, foffset);
5540 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5541 foffset += 4;
5542 if (length!=0)
5544 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, ENC_NA);
5546 foffset += length;
5547 foffset += (length%2);
5548 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
5549 foffset += 4;
5551 break;
5552 default:
5553 break;
5555 break;
5556 case 0x060977: /* Broker */
5557 switch(ndps_func)
5559 case 0x00000001: /* Bind */
5560 foffset = credentials(tvb, pinfo, ndps_tree, foffset);
5561 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, ENC_BIG_ENDIAN);
5562 foffset += 4;
5563 number_of_items=tvb_get_ntohl(tvb, foffset);
5564 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items);
5565 foffset += 4;
5566 for (ii = 0; ii < number_of_items; ii++ )
5568 if (ii >= NDPS_MAX_ITEMS) {
5569 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5570 break;
5572 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Security %u", ii+1);
5573 length = tvb_get_ntohl(tvb, foffset);
5574 foffset += 4;
5575 if (length==4)
5577 proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, ENC_BIG_ENDIAN);
5579 proto_item_set_end(aitem, tvb, foffset);
5581 break;
5582 case 0x00000002: /* Unbind */
5583 break;
5584 case 0x00000003: /* List Services */
5585 proto_tree_add_item(ndps_tree, hf_ndps_list_services_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
5586 foffset += 4;
5587 break;
5588 case 0x00000004: /* Enable Service */
5589 proto_tree_add_item(ndps_tree, hf_ndps_service_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
5590 foffset += 4;
5591 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Parameters");
5592 number_of_items=tvb_get_ntohl(tvb, foffset);
5593 expert_item = proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5594 foffset += 4;
5595 for (ii = 0; ii < number_of_items; ii++ )
5597 if (ii >= NDPS_MAX_ITEMS) {
5598 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5599 break;
5601 length = tvb_get_ntohl(tvb, foffset);
5602 foffset += 4;
5603 if (length!=0)
5605 proto_tree_add_item(atree, hf_ndps_item_bytes, tvb, foffset, length, ENC_NA);
5607 foffset += length;
5609 proto_item_set_end(aitem, tvb, foffset);
5610 break;
5611 case 0x00000005: /* Disable Service */
5612 proto_tree_add_item(ndps_tree, hf_ndps_list_services_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
5613 foffset += 4;
5614 break;
5615 case 0x00000006: /* Down Broker */
5616 case 0x00000007: /* Get Broker NDS Object Name */
5617 case 0x00000008: /* Get Broker Session Information */
5618 default:
5619 break;
5621 break;
5622 case 0x060978: /* Registry */
5623 switch(ndps_func)
5625 case 0x00000001: /* Bind */
5626 foffset = credentials(tvb, pinfo, ndps_tree, foffset);
5627 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, ENC_BIG_ENDIAN);
5628 foffset += 4;
5629 number_of_items=tvb_get_ntohl(tvb, foffset);
5630 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items);
5631 foffset += 4;
5632 for (ii = 0; ii < number_of_items; ii++ )
5634 if (ii >= NDPS_MAX_ITEMS) {
5635 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5636 break;
5638 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Security %d", ii+1);
5639 length = tvb_get_ntohl(tvb, foffset);
5640 foffset += 4;
5641 if (length==4)
5643 proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, ENC_BIG_ENDIAN);
5645 proto_item_set_end(aitem, tvb, foffset);
5647 break;
5648 case 0x00000002: /* Unbind */
5649 break;
5650 case 0x00000003: /* Register Server */
5651 foffset = server_entry(tvb, pinfo, ndps_tree, foffset);
5652 break;
5653 case 0x00000004: /* Deregister Server */
5654 case 0x00000006: /* Deregister Registry */
5655 case 0x0000000b: /* Get Registry NDS Object Name */
5656 case 0x0000000c: /* Get Registry Session Information */
5657 /* NoOp */
5658 break;
5659 case 0x00000005: /* Register Registry */
5660 foffset = ndps_string(tvb, hf_ndps_registry_name, ndps_tree, foffset, NULL);
5661 foffset = print_address(tvb, ndps_tree, foffset);
5662 break;
5663 case 0x00000007: /* Registry Update */
5664 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Add");
5665 number_of_items = tvb_get_ntohl(tvb, foffset);
5666 expert_item = proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5667 foffset += 4;
5668 for (ii = 0; ii < number_of_items; ii++ )
5670 if (ii >= NDPS_MAX_ITEMS) {
5671 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5672 break;
5674 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Entry %u", ii+1);
5675 foffset = server_entry(tvb, pinfo, btree, foffset);
5676 proto_item_set_end(bitem, tvb, foffset);
5678 proto_item_set_end(aitem, tvb, foffset);
5679 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Remove");
5680 number_of_items = tvb_get_ntohl(tvb, foffset);
5681 expert_item = proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5682 foffset += 4;
5683 for (ii = 0; ii < number_of_items; ii++ )
5685 if (ii >= NDPS_MAX_ITEMS) {
5686 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5687 break;
5689 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Entry %u", ii+1);
5690 foffset = server_entry(tvb, pinfo, btree, foffset);
5691 proto_item_set_end(bitem, tvb, foffset);
5693 proto_item_set_end(aitem, tvb, foffset);
5694 break;
5695 case 0x00000008: /* List Local Servers */
5696 case 0x00000009: /* List Servers */
5697 case 0x0000000a: /* List Known Registries */
5698 local_servers_type = tvb_get_ntohl(tvb, foffset);
5699 proto_tree_add_uint(ndps_tree, hf_ndps_list_local_servers_type, tvb, foffset, 4, local_servers_type);
5700 foffset += 4;
5701 if (local_servers_type==0)
5703 /* Start of integeroption */
5704 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5705 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5706 foffset += 4;
5707 if (integer_type_flag!=0)
5709 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
5710 foffset += 4;
5712 /* End of integeroption */
5714 else
5716 length = tvb_get_ntohl(tvb, foffset);
5717 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5718 foffset += 4;
5719 if (length!=0)
5721 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, ENC_NA);
5723 foffset += length;
5724 foffset += (length%2);
5725 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
5726 foffset += 4;
5728 break;
5729 default:
5730 break;
5732 break;
5733 case 0x060979: /* Notify */
5734 switch(ndps_func)
5736 case 0x00000001: /* Notify Bind */
5737 foffset = credentials(tvb, pinfo, ndps_tree, foffset);
5738 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, ENC_BIG_ENDIAN);
5739 foffset += 4;
5740 number_of_items=tvb_get_ntohl(tvb, foffset);
5741 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5742 foffset += 4;
5743 for (ii = 0; ii < number_of_items; ii++ )
5745 if (ii >= NDPS_MAX_ITEMS) {
5746 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5747 break;
5749 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Security %d", ii+1);
5750 length = tvb_get_ntohl(tvb, foffset);
5751 foffset += 4;
5752 if (length==4)
5754 proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, ENC_BIG_ENDIAN);
5756 proto_item_set_end(aitem, tvb, foffset);
5758 break;
5759 case 0x00000002: /* Notify Unbind */
5760 case 0x0000000a: /* List Supported Languages */
5761 case 0x00000010: /* Get Notify NDS Object Name */
5762 case 0x00000011: /* Get Notify Session Information */
5763 /* NoOp */
5764 break;
5765 case 0x00000003: /* Register Supplier */
5766 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL);
5767 /* Start of QualifiedName Set*/
5768 number_of_items = tvb_get_ntohl(tvb, foffset);
5769 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5770 foffset += 4;
5771 for (ii = 0; ii < number_of_items; ii++ )
5773 if (ii >= NDPS_MAX_ITEMS) {
5774 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
5775 break;
5777 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Supplier Alias %u", ii+1);
5778 foffset = qualifiedname(tvb, atree, foffset);
5779 proto_item_set_end(aitem, tvb, foffset);
5781 /* End of QualifiedName Set*/
5782 break;
5783 case 0x00000004: /* Deregister Supplier */
5784 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5785 foffset += 4;
5786 break;
5787 case 0x00000005: /* Add Profile */
5788 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5789 foffset += 4;
5790 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Supplier Alias");
5791 foffset = qualifiedname(tvb, atree, foffset);
5792 proto_item_set_end(aitem, tvb, foffset);
5793 /* Start of Eventhandling */
5794 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5795 foffset += 4;
5796 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN);
5797 foffset += 4;
5798 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer Name");
5799 foffset = qualifiedname(tvb, atree, foffset);
5800 proto_item_set_end(aitem, tvb, foffset);
5801 length = tvb_get_ntohl(tvb, foffset);
5802 foffset += 4;
5803 if (length==4)
5805 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
5807 foffset += length;
5808 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5809 foffset += 4;
5810 /* Start of NameorID */
5811 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
5812 foffset = name_or_id(tvb, atree, foffset);
5813 proto_item_set_end(aitem, tvb, foffset);
5814 /* End of NameorID */
5815 number_of_items = tvb_get_ntohl(tvb, foffset);
5816 proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
5817 foffset += 4;
5818 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Addresses");
5819 for (ii = 0; ii < number_of_items; ii++ )
5821 if (ii >= NDPS_MAX_ITEMS) {
5822 expert_add_info(pinfo, aitem, &ei_ndps_truncated);
5823 break;
5825 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Address %d", ii+1);
5826 foffset = address_item(tvb, btree, foffset);
5827 proto_item_set_end(bitem, tvb, foffset);
5829 proto_item_set_end(aitem, tvb, foffset);
5830 foffset = event_object_set(tvb, pinfo, ndps_tree, foffset);
5831 /* End of Eventhandling */
5832 break;
5833 case 0x00000006: /* Remove Profile */
5834 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5835 foffset += 4;
5836 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5837 foffset += 4;
5838 break;
5839 case 0x00000007: /* Modify Profile */
5840 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5841 foffset += 4;
5842 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5843 foffset += 4;
5844 proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &supplier_flag);
5845 foffset += 4;
5846 if (supplier_flag)
5848 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Supplier ID");
5849 length = tvb_get_ntohl(tvb, foffset);
5850 foffset += 4;
5851 if (length==4)
5853 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
5855 tvb_ensure_bytes_exist(tvb, foffset, length);
5856 foffset += length;
5857 proto_item_set_end(aitem, tvb, foffset);
5859 proto_tree_add_item_ret_boolean(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &language_flag);
5860 foffset += 4;
5861 if (language_flag)
5863 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5864 foffset += 4;
5866 proto_tree_add_item_ret_boolean(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &method_flag);
5867 foffset += 4;
5868 if (method_flag)
5870 /* Start of NameorID */
5871 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
5872 foffset = name_or_id(tvb, atree, foffset);
5873 proto_item_set_end(aitem, tvb, foffset);
5874 /* End of NameorID */
5876 proto_tree_add_item_ret_boolean(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &delivery_address_flag);
5877 foffset += 4;
5878 if (delivery_address_flag)
5880 foffset = print_address(tvb, ndps_tree, foffset);
5882 foffset = event_object_set(tvb, pinfo, ndps_tree, foffset);
5883 break;
5884 case 0x00000008: /* List Profiles */
5885 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5886 foffset += 4;
5887 profiles_type = tvb_get_ntohl(tvb, foffset);
5888 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, profiles_type);
5889 foffset += 4;
5890 if (profiles_type==0) /* Spec */
5892 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Supplier Alias");
5893 foffset = qualifiedname(tvb, atree, foffset);
5894 profiles_choice_type = tvb_get_ntohl(tvb, foffset);
5895 proto_tree_add_uint(atree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, profiles_choice_type);
5896 foffset += 4;
5897 proto_item_set_end(aitem, tvb, foffset);
5898 if (profiles_choice_type==0) /* Choice */
5900 foffset = cardinal_seq(tvb, pinfo, ndps_tree, foffset);
5902 else
5904 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer");
5905 foffset = qualifiedname(tvb, atree, foffset);
5906 proto_item_set_end(aitem, tvb, foffset);
5907 /* Start of NameorID */
5908 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
5909 foffset = name_or_id(tvb, atree, foffset);
5910 /* End of NameorID */
5911 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
5912 foffset += 4;
5913 proto_item_set_end(aitem, tvb, foffset);
5915 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
5916 foffset += 4;
5917 /* Start of integeroption */
5918 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5919 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5920 foffset += 4;
5921 if (integer_type_flag!=0)
5923 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
5924 foffset += 4;
5926 /* End of integeroption */
5928 else /* Cont */
5930 length = tvb_get_ntohl(tvb, foffset);
5931 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5932 foffset += 4;
5933 if (length!=0)
5935 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, ENC_NA);
5937 foffset += length;
5938 foffset += (length%2);
5939 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
5940 foffset += 4;
5942 break;
5943 case 0x00000009: /* Report Event */
5944 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
5945 foffset += 4;
5946 /* Start of ReportEventItemSet */
5947 number_of_items = tvb_get_ntohl(tvb, foffset);
5948 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5949 foffset += 4;
5950 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Event Items");
5951 for (ii = 0; ii < number_of_items; ii++ )
5953 if (ii >= NDPS_MAX_ITEMS) {
5954 expert_add_info(pinfo, aitem, &ei_ndps_truncated);
5955 break;
5957 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Item %d", ii+1);
5958 /* Start of ReportEventItem */
5959 proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
5960 foffset += 4;
5961 ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Containing Class");
5962 foffset = objectidentifier(tvb, ctree, foffset);
5963 proto_item_set_end(citem, tvb, foffset);
5964 ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Containing Object");
5965 foffset = objectidentification(tvb, ctree, foffset);
5966 proto_item_set_end(citem, tvb, foffset);
5967 ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Filter Class");
5968 foffset = objectidentifier(tvb, ctree, foffset);
5969 ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Object Class");
5970 foffset = objectidentifier(tvb, ctree, foffset);
5971 proto_item_set_end(citem, tvb, foffset);
5972 ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Object ID");
5973 foffset = objectidentification(tvb, ctree, foffset);
5974 proto_item_set_end(citem, tvb, foffset);
5975 ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Event Object ID");
5976 foffset = objectidentifier(tvb, ctree, foffset);
5977 proto_item_set_end(citem, tvb, foffset);
5978 /* Start of AttributeSet */
5979 number_of_items = tvb_get_ntohl(tvb, foffset);
5980 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
5981 foffset += 4;
5982 ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Attribute Modifications");
5983 for (jj = 0; jj < number_of_items; jj++ )
5985 if (jj >= NDPS_MAX_ITEMS) {
5986 expert_add_info(pinfo, citem, &ei_ndps_truncated);
5987 break;
5989 dtree = proto_tree_add_subtree_format(ctree, tvb, foffset, -1, ett_ndps, &ditem, "Modification %d", jj+1);
5990 foffset = attribute_value(tvb, pinfo, dtree, foffset); /* Object Attribute Set */
5991 proto_item_set_end(ditem, tvb, foffset);
5993 proto_item_set_end(citem, tvb, foffset);
5994 /* End of AttributeSet */
5995 foffset = ndps_string(tvb, hf_ndps_message, btree, foffset, NULL);
5996 proto_tree_add_item(btree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN);
5997 foffset += 4;
5998 proto_item_set_end(bitem, tvb, foffset);
5999 /* End of ReportEventItem */
6001 proto_item_set_end(aitem, tvb, foffset);
6002 /* End of ReportEventItemSet */
6003 break;
6004 case 0x0000000b: /* Report Notification */
6005 /* Start of DestinationSet */
6006 number_of_items = tvb_get_ntohl(tvb, foffset);
6007 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_destinations, tvb, foffset, 4, number_of_items);
6008 foffset += 4;
6009 for (ii = 0; ii < number_of_items; ii++ )
6011 if (ii >= NDPS_MAX_ITEMS) {
6012 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
6013 break;
6015 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Destination %d", ii+1);
6016 /* Start of Destination */
6017 /* Start of NameorID */
6018 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Method ID");
6019 foffset = name_or_id(tvb, btree, foffset);
6020 proto_item_set_end(bitem, tvb, foffset);
6021 /* End of NameorID */
6022 /* Start of NotifyDeliveryAddr */
6023 proto_tree_add_item(atree, hf_address_len, tvb, foffset, 4, ENC_BIG_ENDIAN);
6024 foffset += 4;
6025 foffset = print_address(tvb, atree, foffset);
6026 /* End of NotifyDeliveryAddr */
6027 proto_item_set_end(aitem, tvb, foffset);
6028 /* End of Destination */
6030 /* End of DestinationSet */
6031 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL);
6032 proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6033 foffset += 4;
6034 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Containing Class");
6035 foffset = objectidentifier(tvb, atree, foffset);
6036 proto_item_set_end(aitem, tvb, foffset);
6037 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Containing Object");
6038 foffset = objectidentification(tvb, atree, foffset);
6039 proto_item_set_end(aitem, tvb, foffset);
6040 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Filter Class");
6041 foffset = objectidentifier(tvb, atree, foffset);
6042 proto_item_set_end(aitem, tvb, foffset);
6043 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Class");
6044 foffset = objectidentifier(tvb, atree, foffset);
6045 proto_item_set_end(aitem, tvb, foffset);
6046 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object ID");
6047 foffset = objectidentification(tvb, atree, foffset);
6048 proto_item_set_end(aitem, tvb, foffset);
6049 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Event Object ID");
6050 foffset = objectidentifier(tvb, atree, foffset);
6051 proto_item_set_end(aitem, tvb, foffset);
6052 /* Start of AttributeSet */
6053 number_of_items = tvb_get_ntohl(tvb, foffset);
6054 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6055 foffset += 4;
6056 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Attributes");
6057 for (ii = 0; ii < number_of_items; ii++ )
6059 if (ii >= NDPS_MAX_ITEMS) {
6060 expert_add_info(pinfo, aitem, &ei_ndps_truncated);
6061 break;
6063 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %d", ii+1);
6064 foffset = attribute_value(tvb, pinfo, btree, foffset);
6065 proto_item_set_end(bitem, tvb, foffset);
6067 proto_item_set_end(aitem, tvb, foffset);
6068 /* End of AttributeSet */
6069 foffset = ndps_string(tvb, hf_ndps_message, ndps_tree, foffset, NULL);
6070 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN);
6071 foffset += 4;
6072 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Account");
6073 foffset = qualifiedname(tvb, atree, foffset);
6074 proto_item_set_end(aitem, tvb, foffset);
6075 break;
6076 case 0x0000000c: /* Add Delivery Method */
6077 foffset = ndps_string(tvb, hf_ndps_file_name, ndps_tree, foffset, NULL);
6078 break;
6079 case 0x0000000d: /* Remove Delivery Method */
6080 /* Start of NameorID */
6081 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
6082 foffset = name_or_id(tvb, atree, foffset);
6083 proto_item_set_end(aitem, tvb, foffset);
6084 /* End of NameorID */
6085 break;
6086 case 0x0000000e: /* List Delivery Methods */
6087 cred_type = tvb_get_ntohl(tvb, foffset);
6088 proto_tree_add_item(ndps_tree, hf_delivery_method_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6089 foffset += 4;
6090 switch (cred_type)
6092 case 0: /* Specification */
6093 /* Start of integeroption */
6094 integer_type_flag = tvb_get_ntohl(tvb, foffset);
6095 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
6096 foffset += 4;
6097 if (integer_type_flag!=0)
6099 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, ENC_BIG_ENDIAN);
6100 foffset += 4;
6102 /* End of integeroption */
6103 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
6104 foffset += 4;
6105 break;
6106 case 1: /* Continuation */
6107 length = tvb_get_ntohl(tvb, foffset);
6108 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
6109 foffset += 4;
6110 if (length!=0)
6112 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, ENC_NA);
6114 foffset += length;
6115 foffset += (length%2);
6116 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
6117 foffset += 4;
6118 break;
6119 default:
6120 break;
6122 break;
6123 case 0x0000000f: /* Get Delivery Method Information */
6124 /* Start of NameorID */
6125 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
6126 foffset = name_or_id(tvb, atree, foffset);
6127 proto_item_set_end(aitem, tvb, foffset);
6128 /* End of NameorID */
6129 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
6130 foffset += 4;
6131 break;
6132 default:
6133 break;
6135 break;
6136 case 0x06097a: /* Resman */
6137 switch(ndps_func)
6139 case 0x00000001: /* Bind */
6140 foffset = credentials(tvb, pinfo, ndps_tree, foffset);
6141 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, ENC_BIG_ENDIAN);
6142 foffset += 4;
6143 number_of_items=tvb_get_ntohl(tvb, foffset);
6144 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items);
6145 foffset += 4;
6146 for (ii = 0; ii < number_of_items; ii++ )
6148 if (ii >= NDPS_MAX_ITEMS) {
6149 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
6150 break;
6152 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Security %d", ii+1);
6153 length = tvb_get_ntohl(tvb, foffset);
6154 foffset += 4;
6155 if (length==4)
6157 proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, ENC_BIG_ENDIAN);
6159 proto_item_set_end(aitem, tvb, foffset);
6161 break;
6162 case 0x00000002: /* Unbind */
6163 case 0x00000008: /* Get Resource Manager NDS Object Name */
6164 case 0x00000009: /* Get Resource Manager Session Information */
6165 /* NoOp */
6166 break;
6167 case 0x00000003: /* Add Resource File */
6168 proto_tree_add_item(ndps_tree, hf_packet_count, tvb, foffset, 4, ENC_BIG_ENDIAN);
6169 foffset += 4;
6170 proto_tree_add_item(ndps_tree, hf_last_packet_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
6171 foffset += 4;
6172 proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, ENC_BIG_ENDIAN);
6173 foffset += 4;
6174 foffset = res_add_input_data(tvb, ndps_tree, foffset);
6175 number_of_items=tvb_get_ntohl(tvb, foffset);
6176 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
6177 foffset += 4;
6178 for (ii = 0; ii < number_of_items; ii++ )
6180 if (ii >= NDPS_MAX_ITEMS) {
6181 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
6182 break;
6184 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %d", ii+1);
6185 length=tvb_get_ntohl(tvb, foffset);
6186 length_remaining = tvb_reported_length_remaining(tvb, foffset);
6187 if(length_remaining == -1 || (uint32_t) length_remaining < length)
6189 return foffset;
6191 proto_tree_add_item(atree, hf_ndps_item_ptr, tvb, foffset, length, ENC_NA);
6192 foffset += length;
6193 proto_item_set_end(aitem, tvb, foffset);
6195 break;
6196 case 0x00000004: /* Delete Resource File */
6197 foffset = res_add_input_data(tvb, ndps_tree, foffset);
6198 break;
6199 case 0x00000005: /* List Resources */
6200 proto_tree_add_item(ndps_tree, hf_ndps_max_items, tvb, foffset, 4, ENC_BIG_ENDIAN);
6201 foffset += 4;
6202 proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, ENC_BIG_ENDIAN);
6203 foffset += 4;
6204 proto_tree_add_item(ndps_tree, hf_ndps_resource_list_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6205 resource_type = tvb_get_ntohl(tvb, foffset);
6206 foffset += 4;
6207 switch (resource_type)
6209 case 0: /* Print Drivers */
6210 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6211 foffset += 4;
6212 break;
6213 case 1: /* Printer Definitions */
6214 case 2: /* Printer Definitions Short */
6215 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL);
6216 break;
6217 case 3: /* Banner Page Files */
6218 proto_tree_add_item(ndps_tree, hf_banner_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6219 foffset += 4;
6220 break;
6221 case 4: /* Font Types */
6222 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6223 foffset += 4;
6224 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6225 foffset += 4;
6226 break;
6227 case 5: /* Printer Driver Files */
6228 case 12: /* Printer Driver Files 2 */
6229 case 9: /* Generic Files */
6230 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6231 foffset += 4;
6232 foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL);
6233 foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL);
6234 foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL);
6235 field_len = tvb_get_ntohl(tvb, foffset);
6236 foffset += 4;
6237 proto_tree_add_item(ndps_tree, hf_printer_id, tvb, foffset, field_len, ENC_NA);
6238 break;
6239 case 6: /* Printer Definition File */
6240 case 10: /* Printer Definition File 2 */
6241 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL);
6242 foffset += 4;
6243 foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL);
6244 foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL);
6245 foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL);
6246 field_len = tvb_get_ntohl(tvb, foffset);
6247 foffset += 4;
6248 proto_tree_add_item(ndps_tree, hf_printer_id, tvb, foffset, field_len, ENC_NA);
6249 break;
6250 case 7: /* Font Files */
6251 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6252 foffset += 4;
6253 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6254 foffset += 4;
6255 foffset = ndps_string(tvb, hf_ndps_font_name, ndps_tree, foffset, NULL);
6256 break;
6257 case 8: /* Generic Type */
6258 case 11: /* Printer Driver Types 2 */
6259 case 13: /* Printer Driver Types Archive */
6260 foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL);
6261 foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL);
6262 foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL);
6263 break;
6264 case 14: /* Languages Available */
6265 break;
6266 default:
6267 break;
6269 break;
6270 case 0x00000006: /* Get Resource File */
6271 proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
6272 foffset += 4;
6273 proto_tree_add_item(ndps_tree, hf_res_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6274 resource_type = tvb_get_ntohl(tvb, foffset);
6275 foffset += 4;
6276 switch (resource_type)
6278 case 0: /* Print Drivers */
6279 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6280 foffset += 4;
6281 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL);
6282 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL);
6283 break;
6284 case 1: /* Printer Definitions */
6285 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL);
6286 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL);
6287 break;
6288 case 2: /* Banner Page Files */
6289 foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset, NULL);
6290 break;
6291 case 3: /* Font Types */
6292 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6293 foffset += 4;
6294 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6295 foffset += 4;
6296 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL);
6297 break;
6298 case 4: /* Generic Files/ Archive */
6299 case 5: /* Printer Driver Archive */
6300 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6301 foffset += 4;
6302 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL);
6303 proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6304 foffset += 4;
6305 break;
6306 default:
6307 break;
6309 break;
6310 case 0x00000007: /* Get Resource File Date */
6311 proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, ENC_BIG_ENDIAN);
6312 foffset += 4;
6313 foffset = res_add_input_data(tvb, ndps_tree, foffset);
6314 break;
6315 case 0x0000000a: /* Set Resource Language Context */
6316 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
6317 foffset += 4;
6318 break;
6319 default:
6320 break;
6322 break;
6323 case 0x06097b: /* Delivery */
6324 switch(ndps_func)
6326 case 0x00000001: /* Delivery Bind */
6327 foffset = credentials(tvb, pinfo, ndps_tree, foffset);
6328 break;
6329 case 0x00000002: /* Delivery Unbind */
6330 /* NoOp */
6331 break;
6332 case 0x00000003: /* Delivery Send */
6333 number_of_items = tvb_get_ntohl(tvb, foffset);
6334 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
6335 foffset += 4;
6336 for (ii = 0; ii < number_of_items; ii++ )
6338 if (ii >= NDPS_MAX_ITEMS) {
6339 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
6340 break;
6342 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %d", ii+1);
6343 proto_tree_add_item(atree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
6344 foffset += 4;
6345 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Supplier ID");
6346 length = tvb_get_ntohl(tvb, foffset);
6347 foffset += 4;
6348 if (length==4)
6350 proto_tree_add_item(btree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
6352 foffset += length;
6353 proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6354 foffset += 4;
6355 proto_item_set_end(bitem, tvb, foffset);
6356 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Containing Class");
6357 foffset = objectidentifier(tvb, btree, foffset);
6358 proto_item_set_end(bitem, tvb, foffset);
6359 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Containing Object");
6360 foffset = objectidentification(tvb, btree, foffset);
6361 proto_item_set_end(bitem, tvb, foffset);
6362 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Filter Class");
6363 foffset = objectidentifier(tvb, btree, foffset);
6364 proto_item_set_end(bitem, tvb, foffset);
6365 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object Class");
6366 foffset = objectidentifier(tvb, btree, foffset);
6367 proto_item_set_end(bitem, tvb, foffset);
6368 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object ID");
6369 foffset = objectidentification(tvb, btree, foffset);
6370 proto_item_set_end(bitem, tvb, foffset);
6371 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Event Object ID");
6372 foffset = objectidentifier(tvb, btree, foffset);
6373 foffset = attribute_value(tvb, pinfo, atree, foffset);
6374 foffset = ndps_string(tvb, hf_ndps_message, atree, foffset, NULL);
6375 proto_tree_add_item(atree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN);
6376 foffset += 4;
6377 proto_item_set_end(bitem, tvb, foffset);
6378 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Account");
6379 foffset = qualifiedname(tvb, btree, foffset);
6380 proto_item_set_end(bitem, tvb, foffset);
6381 proto_item_set_end(aitem, tvb, foffset);
6383 break;
6384 case 0x00000004: /* Delivery Send2 */
6385 number_of_items = tvb_get_ntohl(tvb, foffset);
6386 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
6387 foffset += 4;
6388 for (ii = 0; ii < number_of_items; ii++ )
6390 if (ii >= NDPS_MAX_ITEMS) {
6391 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
6392 break;
6394 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object %d", ii+1);
6395 proto_tree_add_item(atree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
6396 foffset += 4;
6397 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Supplier ID");
6398 length = tvb_get_ntohl(tvb, foffset);
6399 foffset += 4;
6400 if (length==4)
6402 proto_tree_add_item(btree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
6404 foffset += length;
6405 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6406 foffset += 4;
6407 proto_item_set_end(bitem, tvb, foffset);
6408 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Containing Class");
6409 foffset = objectidentifier(tvb, btree, foffset);
6410 proto_item_set_end(bitem, tvb, foffset);
6411 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Containing Object");
6412 foffset = objectidentification(tvb, btree, foffset);
6413 proto_item_set_end(bitem, tvb, foffset);
6414 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Filter Class");
6415 foffset = objectidentifier(tvb, btree, foffset);
6416 proto_item_set_end(bitem, tvb, foffset);
6417 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object Class");
6418 foffset = objectidentifier(tvb, btree, foffset);
6419 proto_item_set_end(bitem, tvb, foffset);
6420 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object ID");
6421 foffset = objectidentification(tvb, btree, foffset);
6422 proto_item_set_end(bitem, tvb, foffset);
6423 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Event Object ID");
6424 foffset = objectidentifier(tvb, btree, foffset);
6425 proto_item_set_end(bitem, tvb, foffset);
6426 /* Start of AttributeSet */
6427 number_of_items2 = tvb_get_ntohl(tvb, foffset);
6428 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
6429 foffset += 4;
6430 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute");
6431 for (jj = 0; jj < number_of_items2; jj++ )
6433 if (jj >= NDPS_MAX_ITEMS) {
6434 expert_add_info(pinfo, bitem, &ei_ndps_truncated);
6435 break;
6437 foffset = attribute_value(tvb, pinfo, btree, foffset);
6439 proto_item_set_end(bitem, tvb, foffset);
6440 /* End of AttributeSet */
6441 foffset = ndps_string(tvb, hf_ndps_message, atree, foffset, NULL);
6442 proto_tree_add_item(atree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN);
6443 foffset += 4;
6444 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Account");
6445 foffset = qualifiedname(tvb, btree, foffset);
6446 proto_item_set_end(bitem, tvb, foffset);
6447 proto_item_set_end(aitem, tvb, foffset);
6449 break;
6450 default:
6451 break;
6453 break;
6454 default:
6455 break;
6457 return foffset;
6460 static int
6461 ndps_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
6463 uint32_t number_of_items;
6464 uint32_t ndps_problem_type;
6465 uint32_t problem_type;
6466 uint32_t ii;
6467 proto_tree *atree;
6468 proto_item *aitem;
6469 proto_tree *btree;
6470 proto_item *bitem;
6471 proto_item *expert_item;
6473 ndps_problem_type = tvb_get_ntohl(tvb, foffset);
6474 col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error");
6475 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_problem_type, tvb, foffset, 4, ndps_problem_type);
6476 expert_add_info_format(pinfo, expert_item, &ei_ndps_problem_type, "Fault: %s", val_to_str(ndps_problem_type, error_type_enum, "Unknown NDPS Error (0x%08x)"));
6477 foffset += 4;
6478 switch(ndps_problem_type)
6480 case 0: /* Security Error */
6481 problem_type = tvb_get_ntohl(tvb, foffset);
6482 proto_tree_add_uint(ndps_tree, hf_problem_type, tvb, foffset, 4, problem_type);
6483 foffset += 4;
6484 if (problem_type==0) /* Standard Error */
6486 proto_tree_add_item(ndps_tree, hf_security_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6487 foffset += 4;
6489 else /* Extended Error */
6491 /* Start of objectidentifier */
6492 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error");
6493 foffset = objectidentifier(tvb, atree, foffset);
6494 proto_item_set_end(aitem, tvb, foffset);
6495 /* End of objectidentifier */
6497 /* Start of NameorID */
6498 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Message");
6499 foffset = name_or_id(tvb, atree, foffset);
6500 proto_item_set_end(aitem, tvb, foffset);
6501 /* End of NameorID */
6502 break;
6503 case 1: /* Service Error */
6504 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6505 foffset += 4;
6506 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6508 proto_tree_add_item(ndps_tree, hf_service_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6509 foffset += 4;
6511 else /* Extended Error */
6513 /* Start of objectidentifier */
6514 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error");
6515 foffset = objectidentifier(tvb, atree, foffset);
6516 proto_item_set_end(aitem, tvb, foffset);
6517 /* End of objectidentifier */
6519 foffset = objectidentification(tvb, ndps_tree, foffset);
6520 foffset = attribute_value(tvb, pinfo, ndps_tree, foffset); /* Object Attribute Set */
6521 proto_tree_add_item(ndps_tree, hf_ndps_lib_error, tvb, foffset, 4, ENC_BIG_ENDIAN);
6522 foffset += 4;
6523 proto_tree_add_item(ndps_tree, hf_ndps_other_error, tvb, foffset, 4, ENC_BIG_ENDIAN);
6524 foffset += 4;
6525 proto_tree_add_item(ndps_tree, hf_ndps_other_error_2, tvb, foffset, 4, ENC_BIG_ENDIAN);
6526 foffset += 4;
6527 if (tvb_reported_length_remaining(tvb, foffset) >= 4) {
6528 foffset = ndps_string(tvb, hf_ndps_other_error_string, ndps_tree, foffset, NULL);
6530 break;
6531 case 2: /* Access Error */
6532 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6533 foffset += 4;
6534 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6536 proto_tree_add_item(ndps_tree, hf_access_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6537 foffset += 4;
6539 else /* Extended Error */
6541 /* Start of objectidentifier */
6542 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error");
6543 foffset = objectidentifier(tvb, atree, foffset);
6544 proto_item_set_end(aitem, tvb, foffset);
6545 /* End of objectidentifier */
6547 foffset = objectidentification(tvb, ndps_tree, foffset);
6548 break;
6549 case 3: /* Printer Error */
6550 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6551 foffset += 4;
6552 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6554 proto_tree_add_item(ndps_tree, hf_printer_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6555 foffset += 4;
6557 else /* Extended Error */
6559 /* Start of objectidentifier */
6560 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error");
6561 foffset = objectidentifier(tvb, atree, foffset);
6562 proto_item_set_end(aitem, tvb, foffset);
6563 /* End of objectidentifier */
6565 foffset = objectidentification(tvb, ndps_tree, foffset);
6566 break;
6567 case 4: /* Selection Error */
6568 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6569 foffset += 4;
6570 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6572 proto_tree_add_item(ndps_tree, hf_selection_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6573 foffset += 4;
6575 else /* Extended Error */
6577 /* Start of objectidentifier */
6578 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error");
6579 foffset = objectidentifier(tvb, atree, foffset);
6580 proto_item_set_end(aitem, tvb, foffset);
6581 /* End of objectidentifier */
6583 foffset = objectidentification(tvb, ndps_tree, foffset);
6584 foffset = attribute_value(tvb, pinfo, ndps_tree, foffset); /* Object Attribute Set */
6585 break;
6586 case 5: /* Document Access Error */
6587 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6588 foffset += 4;
6589 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6591 proto_tree_add_item(ndps_tree, hf_doc_access_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6592 foffset = objectidentifier(tvb, ndps_tree, foffset);
6594 else /* Extended Error */
6596 /* Start of objectidentifier */
6597 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error");
6598 foffset = objectidentifier(tvb, atree, foffset);
6599 proto_item_set_end(aitem, tvb, foffset);
6600 /* End of objectidentifier */
6602 foffset = objectidentification(tvb, ndps_tree, foffset);
6603 break;
6604 case 6: /* Attribute Error */
6605 number_of_items = tvb_get_ntohl(tvb, foffset);
6606 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6607 foffset += 4;
6608 for (ii = 0; ii < number_of_items; ii++ )
6610 if (ii >= NDPS_MAX_ITEMS) {
6611 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
6612 break;
6614 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %d", ii+1);
6615 proto_tree_add_item(atree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6616 foffset += 4;
6617 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6619 proto_tree_add_item(atree, hf_attribute_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6620 foffset += 4;
6622 else /* Extended Error */
6624 /* Start of objectidentifier */
6625 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Extended Error");
6626 foffset = objectidentifier(tvb, btree, foffset);
6627 proto_item_set_end(bitem, tvb, foffset);
6628 /* End of objectidentifier */
6630 foffset = attribute_value(tvb, pinfo, atree, foffset); /* Object Attribute Set */
6631 proto_item_set_end(aitem, tvb, foffset);
6633 break;
6634 case 7: /* Update Error */
6635 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6636 foffset += 4;
6637 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6639 proto_tree_add_item(ndps_tree, hf_update_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
6640 foffset += 4;
6642 else /* Extended Error */
6644 /* Start of objectidentifier */
6645 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error");
6646 foffset = objectidentifier(tvb, atree, foffset);
6647 proto_item_set_end(aitem, tvb, foffset);
6648 /* End of objectidentifier */
6650 foffset = objectidentification(tvb, ndps_tree, foffset);
6651 break;
6652 default:
6653 break;
6655 return foffset;
6658 static int
6659 return_code(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
6661 uint32_t expert_status;
6662 proto_item *expert_item;
6664 expert_status = tvb_get_ntohl(tvb, foffset);
6665 expert_item = proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN);
6666 if (expert_status != 0) {
6667 expert_add_info_format(pinfo, expert_item, &ei_ndps_return_code, "Fault: %s",
6668 val_to_str_ext(expert_status, &ndps_error_types_ext, "Unknown NDPS Error (0x%08x)"));
6670 foffset += 4;
6671 if (tvb_get_ntohl(tvb, foffset-4) != 0)
6672 col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error");
6673 if (tvb_get_ntohl(tvb, foffset-4) == 0)
6675 return foffset;
6677 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, ENC_BIG_ENDIAN);
6678 foffset += 4;
6679 return foffset;
6682 static int
6683 dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
6685 conversation_t *conversation = NULL;
6686 ndps_req_hash_value *request_value = NULL;
6687 proto_tree *atree;
6688 proto_item *aitem;
6689 proto_tree *btree;
6690 proto_item *bitem;
6691 proto_tree *ctree;
6692 proto_item *citem;
6693 proto_tree *dtree;
6694 proto_item *ditem;
6695 uint32_t ii;
6696 uint32_t jj;
6697 uint32_t kk;
6698 uint32_t number_of_items=0;
6699 uint32_t number_of_items2=0;
6700 uint32_t number_of_items3=0;
6701 uint32_t length=0;
6702 uint32_t ndps_func=0;
6703 uint32_t ndps_prog=0;
6704 uint32_t error_val=0;
6705 uint32_t resource_type=0;
6706 int length_remaining;
6707 proto_item *expert_item;
6708 uint32_t expert_status;
6710 if (!pinfo->fd->visited) {
6711 /* Find the conversation whence the request would have come. */
6712 conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
6713 CONVERSATION_NCP, (uint32_t) pinfo->destport, (uint32_t) pinfo->destport, 0);
6714 if (conversation != NULL) {
6715 /* find the record telling us the request made that caused
6716 this reply */
6717 request_value = ndps_hash_lookup(conversation, (uint32_t) pinfo->destport);
6718 p_add_proto_data(wmem_file_scope(), pinfo, proto_ndps, 0, (void*) request_value);
6720 /* else... we haven't seen an NDPS Request for that conversation. */
6722 else {
6723 request_value = (ndps_req_hash_value *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ndps, 0);
6725 if (request_value) {
6726 ndps_prog = request_value->ndps_prog;
6727 ndps_func = request_value->ndps_func;
6728 proto_tree_add_uint_format(ndps_tree, hf_ndps_reqframe, tvb, 0,
6729 0, request_value->ndps_frame_num,
6730 "Response to Request in Frame Number: %u",
6731 request_value->ndps_frame_num);
6734 if (tvb_reported_length_remaining(tvb, foffset) < 12 && tvb_get_ntohl(tvb, foffset) == 0) /* No error and no return data */
6736 proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
6737 col_append_str(pinfo->cinfo, COL_INFO, "- Ok");
6738 return foffset;
6740 if(ndps_func == 1 || ndps_func == 2)
6742 expert_item = proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_stat, tvb, foffset, 4, ENC_BIG_ENDIAN);
6743 expert_status = tvb_get_ntohl(tvb, foffset);
6744 if (expert_status != 0) {
6745 expert_add_info_format(pinfo, expert_item, &ei_ndps_rpc_acc_stat, "Fault: %s", val_to_str(expert_status, accept_stat, "Unknown NDPS Error (0x%08x)"));
6747 foffset += 4;
6748 if (tvb_reported_length_remaining(tvb,foffset) < 4 ) {
6749 col_append_str(pinfo->cinfo, COL_INFO, "- Error");
6750 return foffset;
6752 proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_results, tvb, foffset, 4, ENC_BIG_ENDIAN);
6753 foffset += 4;
6754 if (tvb_reported_length_remaining(tvb,foffset) < 4) {
6755 col_append_str(pinfo->cinfo, COL_INFO, "- Error");
6756 return foffset;
6759 error_val = tvb_get_ntohl(tvb, foffset);
6760 proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
6761 foffset += 4;
6762 /* Some functions return an error with no data, 0 is ok */
6763 if (try_val_to_str_ext(tvb_get_ntohl(tvb, foffset), &ndps_error_types_ext) && tvb_reported_length_remaining(tvb,foffset) < 8 && (tvb_get_ntohl(tvb, foffset)!=0))
6765 expert_status = tvb_get_ntohl(tvb, foffset);
6766 expert_item = proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN);
6767 expert_add_info_format(pinfo, expert_item, &ei_ndps_return_code, "Fault: %s", val_to_str_ext(expert_status, &ndps_error_types_ext, "Unknown NDPS Error (0x%08x)"));
6768 col_append_str(pinfo->cinfo, COL_INFO, "- Error");
6769 return foffset;
6771 col_append_str(pinfo->cinfo, COL_INFO, "- Ok");
6772 switch(ndps_prog)
6774 case 0x060976: /* Print */
6775 switch(ndps_func)
6777 case 0x00000001: /* Bind PSM */
6778 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
6779 foffset += 4;
6780 if(error_val != 0)
6782 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6783 if(tvb_reported_length_remaining(tvb, foffset) < 4)
6785 break;
6787 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
6788 foffset += 4;
6790 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "PSM Name");
6791 foffset = qualifiedname(tvb, atree, foffset);
6792 proto_item_set_end(aitem, tvb, foffset);
6793 break;
6794 case 0x00000002: /* Bind PA */
6795 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
6796 foffset += 4;
6797 if(error_val != 0)
6799 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6800 if(tvb_reported_length_remaining(tvb, foffset) < 4)
6802 break;
6804 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
6805 foffset += 4;
6807 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
6808 break;
6809 case 0x00000003: /* Unbind */
6810 break;
6811 case 0x00000004: /* Print */
6812 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL);
6813 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
6814 foffset += 4;
6815 if(error_val != 0)
6817 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6819 break;
6820 case 0x00000005: /* Modify Job */
6821 case 0x00000006: /* Cancel Job */
6822 case 0x00000008: /* Promote Job */
6823 case 0x0000000b: /* Resume */
6824 case 0x0000000d: /* Create */
6825 /* Start of AttributeSet */
6826 number_of_items = tvb_get_ntohl(tvb, foffset);
6827 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6828 foffset += 4;
6829 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Attribute Set");
6830 for (ii = 0; ii < number_of_items; ii++ )
6832 if (ii >= NDPS_MAX_ITEMS) {
6833 expert_add_info(pinfo, aitem, &ei_ndps_truncated);
6834 break;
6836 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %d", ii+1);
6837 foffset = attribute_value(tvb, pinfo, btree, foffset); /* Object Attribute Set */
6838 proto_item_set_end(bitem, tvb, foffset);
6840 proto_item_set_end(aitem, tvb, foffset);
6841 /* End of AttributeSet */
6842 if(error_val != 0)
6844 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6846 break;
6847 case 0x00000007: /* List Object Attributes */
6848 proto_tree_add_item(ndps_tree, hf_answer_time, tvb, foffset, 4, ENC_BIG_ENDIAN);
6849 foffset += 4;
6850 /* Continuation Option */
6851 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Continuation Option");
6852 number_of_items=tvb_get_ntohl(tvb, foffset);
6853 expert_item = proto_tree_add_uint(atree, hf_ndps_num_options, tvb, foffset, 4, number_of_items);
6854 foffset += 4;
6855 for (ii = 0; ii < number_of_items; ii++ )
6857 if (ii >= NDPS_MAX_ITEMS) {
6858 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
6859 break;
6861 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Option %d", ii+1);
6862 length=tvb_get_ntohl(tvb, foffset);
6863 length_remaining = tvb_reported_length_remaining(tvb, foffset);
6864 if(length_remaining == -1 || (uint32_t) length_remaining < length)
6866 return foffset;
6868 proto_tree_add_item(btree, hf_ndps_item_ptr, tvb, foffset, length, ENC_NA);
6869 foffset += length;
6870 proto_item_set_end(bitem, tvb, foffset);
6872 proto_item_set_end(aitem, tvb, foffset);
6873 /* Limit Encountered Option */
6874 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Limit Encountered Option");
6875 proto_tree_add_item(atree, hf_ndps_len, tvb, foffset, 4, ENC_BIG_ENDIAN);
6876 foffset += 4;
6877 proto_tree_add_item(atree, hf_ndps_limit_enc, tvb, foffset, 4, ENC_BIG_ENDIAN);
6878 foffset += 4;
6879 proto_item_set_end(aitem, tvb, foffset);
6880 /* Object Results Set */
6881 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Results Set");
6882 number_of_items=tvb_get_ntohl(tvb, foffset);
6883 expert_item = proto_tree_add_uint(atree, hf_ndps_num_results, tvb, foffset, 4, number_of_items);
6884 foffset += 4;
6885 for (ii = 0; ii < number_of_items; ii++ )
6887 if (ii >= NDPS_MAX_ITEMS) {
6888 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
6889 break;
6891 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Results: (%d)", ii+1);
6892 if (ii>0) {
6893 foffset += 2;
6895 foffset = objectidentification(tvb, btree, foffset);
6896 number_of_items2 = tvb_get_ntohl(tvb, foffset);
6897 expert_item = proto_tree_add_uint(btree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items2);
6898 foffset += 4;
6899 for (jj = 0; jj < number_of_items2; jj++ )
6901 if (jj >= NDPS_MAX_ITEMS) {
6902 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
6903 break;
6905 ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Object: (%d)", jj+1);
6906 foffset = objectidentifier(tvb, ctree, foffset);
6907 foffset += align_4(tvb, foffset);
6908 number_of_items3 = tvb_get_ntohl(tvb, foffset);
6909 expert_item = proto_tree_add_uint(ctree, hf_ndps_num_values, tvb, foffset, 4, number_of_items3);
6910 foffset += 4;
6911 for (kk = 0; kk < number_of_items3; kk++ )
6913 if (kk >= NDPS_MAX_ITEMS) {
6914 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
6915 break;
6917 dtree = proto_tree_add_subtree_format(ctree, tvb, foffset, -1, ett_ndps, &ditem, "Value: (%d)", kk+1);
6918 foffset = attribute_value(tvb, pinfo, dtree, foffset);
6919 proto_item_set_end(ditem, tvb, foffset);
6921 proto_tree_add_item(ctree, hf_ndps_qualifier, tvb, foffset, 4, ENC_BIG_ENDIAN);
6922 foffset += 4;
6923 foffset += align_4(tvb, foffset);
6924 proto_item_set_end(citem, tvb, foffset);
6927 /*foffset += align_4(tvb, foffset);*/
6928 foffset = objectidentifier(tvb, btree, foffset);
6929 /*foffset += align_4(tvb, foffset);*/
6930 proto_item_set_end(bitem, tvb, foffset);
6932 proto_item_set_end(aitem, tvb, foffset);
6933 if(error_val != 0)
6935 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6937 break;
6938 case 0x00000009: /* Interrupt */
6939 case 0x0000000a: /* Pause */
6940 /* Start of NWDPPrtContainedObjectId */
6941 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job ID");
6942 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL);
6943 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
6944 foffset += 4;
6945 proto_item_set_end(aitem, tvb, foffset);
6946 /* End of NWDPPrtContainedObjectId */
6947 /* Start of AttributeSet */
6948 number_of_items = tvb_get_ntohl(tvb, foffset);
6949 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6950 foffset += 4;
6951 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Attribute Set");
6952 for (ii = 0; ii < number_of_items; ii++ )
6954 if (ii >= NDPS_MAX_ITEMS) {
6955 expert_add_info(pinfo, aitem, &ei_ndps_truncated);
6956 break;
6958 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %d", ii+1);
6959 foffset = attribute_value(tvb, pinfo, btree, foffset); /* Object Attribute Set */
6960 proto_item_set_end(bitem, tvb, foffset);
6962 proto_item_set_end(aitem, tvb, foffset);
6963 /* End of AttributeSet */
6964 if(error_val != 0)
6966 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6968 break;
6969 case 0x0000000c: /* Clean */
6970 case 0x0000000e: /* Delete */
6971 case 0x0000000f: /* Disable PA */
6972 case 0x00000010: /* Enable PA */
6973 case 0x00000012: /* Set */
6974 case 0x00000013: /* Shutdown PA */
6975 case 0x00000014: /* Startup PA */
6976 case 0x00000018: /* Transfer Data */
6977 case 0x00000019: /* Device Control */
6978 case 0x0000001b: /* Remove Event Profile */
6979 case 0x0000001c: /* Modify Event Profile */
6980 case 0x0000001e: /* Shutdown PSM */
6981 case 0x0000001f: /* Cancel PSM Shutdown */
6982 case 0x00000020: /* Set Printer DS Information */
6983 case 0x00000021: /* Clean User Jobs */
6984 if(error_val != 0)
6986 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6988 break;
6989 case 0x00000011: /* Resubmit Jobs */
6990 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of ResubmitJob Set */
6991 proto_tree_add_uint(ndps_tree, hf_ndps_num_jobs, tvb, foffset, 4, number_of_items);
6992 foffset += 4;
6993 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Resubmit Job");
6994 for (ii = 0; ii < number_of_items; ii++ )
6996 if (ii >= NDPS_MAX_ITEMS) {
6997 expert_add_info(pinfo, aitem, &ei_ndps_truncated);
6998 break;
7000 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Job %d", ii+1);
7001 /* Start of NWDPPrtContainedObjectId */
7002 ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Old Job");
7003 foffset = ndps_string(tvb, hf_ndps_pa_name, ctree, foffset, NULL);
7004 proto_tree_add_item(ctree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7005 foffset += 4;
7006 proto_item_set_end(citem, tvb, foffset);
7007 /* End of NWDPPrtContainedObjectId */
7008 /* Start of NWDPPrtContainedObjectId */
7009 ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "New Job");
7010 foffset = ndps_string(tvb, hf_ndps_pa_name, ctree, foffset, NULL);
7011 proto_tree_add_item(ctree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7012 foffset += 4;
7013 proto_item_set_end(citem, tvb, foffset);
7014 /* End of NWDPPrtContainedObjectId */
7015 /* Start of AttributeSet */
7016 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7017 proto_tree_add_uint(ctree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
7018 foffset += 4;
7019 ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Job Status");
7020 for (jj = 0; jj < number_of_items2; jj++ )
7022 if (jj >= NDPS_MAX_ITEMS) {
7023 expert_add_info(pinfo, citem, &ei_ndps_truncated);
7024 break;
7026 dtree = proto_tree_add_subtree_format(ctree, tvb, foffset, -1, ett_ndps, &ditem, "Object %d", jj+1);
7027 foffset = attribute_value(tvb, pinfo, dtree, foffset); /* Object Attribute Set */
7028 proto_item_set_end(ditem, tvb, foffset);
7030 proto_item_set_end(citem, tvb, foffset);
7031 proto_item_set_end(bitem, tvb, foffset);
7032 /* End of AttributeSet */
7034 proto_item_set_end(aitem, tvb, foffset);
7035 /* End of ResubmitJob Set */
7036 if(error_val != 0)
7038 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7040 break;
7041 case 0x00000015: /* Reorder Job */
7042 /* Start of AttributeSet */
7043 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job Status");
7044 number_of_items = tvb_get_ntohl(tvb, foffset);
7045 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
7046 foffset += 4;
7047 for (ii = 0; ii < number_of_items; ii++ )
7049 if (ii >= NDPS_MAX_ITEMS) {
7050 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7051 break;
7053 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object %d", ii+1);
7054 foffset = attribute_value(tvb, pinfo, btree, foffset); /* Object Attribute Set */
7055 proto_item_set_end(bitem, tvb, foffset);
7057 proto_item_set_end(aitem, tvb, foffset);
7058 /* End of AttributeSet */
7059 if(error_val != 0)
7061 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7063 break;
7064 case 0x00000016: /* Pause PA */
7065 case 0x00000017: /* Resume PA */
7066 /* Start of AttributeSet */
7067 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Printer Status");
7068 number_of_items = tvb_get_ntohl(tvb, foffset);
7069 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7070 foffset += 4;
7071 for (ii = 0; ii < number_of_items; ii++ )
7073 if (ii >= NDPS_MAX_ITEMS) {
7074 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7075 break;
7077 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object %d", ii+1);
7078 foffset = attribute_value(tvb, pinfo, btree, foffset); /* Object Attribute Set */
7079 proto_item_set_end(bitem, tvb, foffset);
7081 proto_item_set_end(aitem, tvb, foffset);
7082 /* End of AttributeSet */
7083 if(error_val != 0)
7085 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7087 break;
7088 case 0x0000001a: /* Add Event Profile */
7089 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7090 foffset += 4;
7091 if(error_val != 0)
7093 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7095 break;
7096 case 0x0000001d: /* List Event Profiles */
7097 length = tvb_get_ntohl(tvb, foffset);
7098 foffset += 4;
7099 if (length==4)
7101 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
7103 foffset += length;
7104 /* Start of Eventhandling */
7105 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7106 foffset += 4;
7107 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN);
7108 foffset += 4;
7109 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer Name");
7110 foffset = qualifiedname(tvb, atree, foffset);
7111 length = tvb_get_ntohl(tvb, foffset);
7112 foffset += 4;
7113 if (length==4)
7115 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
7117 foffset += length;
7118 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7119 foffset += 4;
7120 proto_item_set_end(aitem, tvb, foffset);
7121 /* Start of NameorID */
7122 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
7123 foffset = name_or_id(tvb, atree, foffset);
7124 proto_item_set_end(aitem, tvb, foffset);
7125 /* End of NameorID */
7126 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Addresses");
7127 number_of_items = tvb_get_ntohl(tvb, foffset);
7128 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
7129 foffset += 4;
7130 for (ii = 0; ii < number_of_items; ii++ )
7132 if (ii >= NDPS_MAX_ITEMS) {
7133 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7134 break;
7136 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Address %d", ii+1);
7137 foffset = address_item(tvb, btree, foffset);
7138 proto_item_set_end(bitem, tvb, foffset);
7140 proto_item_set_end(aitem, tvb, foffset);
7141 foffset = event_object_set(tvb, pinfo, ndps_tree, foffset);
7142 /* End of Eventhandling */
7143 length = tvb_get_ntohl(tvb, foffset);
7144 foffset += 4;
7145 if (length!=0)
7147 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, ENC_NA);
7149 foffset += length;
7150 if(error_val != 0)
7152 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7154 break;
7155 case 0x00000022: /* Map GUID to NDS Name */
7156 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "NDS Printer Name");
7157 foffset = qualifiedname(tvb, atree, foffset);
7158 proto_item_set_end(aitem, tvb, foffset);
7159 if(error_val != 0)
7161 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7163 break;
7164 case 0x00000023: /* AddEventProfile2 */
7165 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7166 foffset += 4;
7167 proto_tree_add_item(ndps_tree, hf_notify_lease_exp_time, tvb, foffset, 4, ENC_BIG_ENDIAN);
7168 foffset += 4;
7169 if(error_val != 0)
7171 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7173 break;
7174 case 0x00000024: /* ListEventProfiles2 */
7175 number_of_items = tvb_get_ntohl(tvb, foffset);
7176 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_events, tvb, foffset, 4, number_of_items);
7177 foffset += 4;
7178 for (ii = 0; ii < number_of_items; ii++ )
7180 if (ii >= NDPS_MAX_ITEMS) {
7181 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7182 break;
7184 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Event %d", ii+1);
7185 /* Start of Eventhandling2 */
7186 proto_tree_add_item(atree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7187 foffset += 4;
7188 proto_tree_add_item(atree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN);
7189 foffset += 4;
7190 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Consumer Name");
7191 foffset = qualifiedname(tvb, btree, foffset);
7192 foffset = ndps_string(tvb, hf_ndps_supplier_name, atree, foffset, NULL);
7193 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7194 foffset += 4;
7195 proto_item_set_end(bitem, tvb, foffset);
7196 /* Start of NameorID */
7197 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Method ID");
7198 foffset = name_or_id(tvb, btree, foffset);
7199 foffset += align_4(tvb, foffset);
7200 proto_item_set_end(bitem, tvb, foffset);
7201 /* End of NameorID */
7202 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7203 proto_tree_add_uint(atree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items2);
7204 foffset += 4;
7205 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Delivery Addresses");
7206 for (jj = 0; jj < number_of_items2; jj++ )
7208 if (jj >= NDPS_MAX_ITEMS) {
7209 expert_add_info(pinfo, bitem, &ei_ndps_truncated);
7210 break;
7212 ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Address %d", ii+1);
7213 foffset = address_item(tvb, ctree, foffset);
7214 proto_item_set_end(citem, tvb, foffset);
7216 proto_item_set_end(bitem, tvb, foffset);
7217 foffset = event_object_set(tvb, pinfo, atree, foffset);
7218 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Account");
7219 foffset = qualifiedname(tvb, btree, foffset);
7220 proto_item_set_end(bitem, tvb, foffset);
7221 /* Start of object identifier set */
7222 btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Notify Attributes");
7223 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7224 expert_item = proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
7225 foffset += 4;
7226 for (jj = 0; jj < number_of_items2; jj++ )
7228 if (jj >= NDPS_MAX_ITEMS) {
7229 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7230 break;
7232 ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Attribute %d", ii+1);
7233 foffset = objectidentifier(tvb, ctree, foffset);
7234 proto_item_set_end(citem, tvb, foffset);
7236 proto_item_set_end(bitem, tvb, foffset);
7237 /* End of object identifier set */
7238 proto_tree_add_item(atree, hf_notify_time_interval, tvb, foffset, 4, ENC_BIG_ENDIAN);
7239 foffset += 4;
7240 proto_tree_add_item(atree, hf_notify_sequence_number, tvb, foffset, 4, ENC_BIG_ENDIAN);
7241 foffset += 4;
7242 proto_tree_add_item(atree, hf_notify_lease_exp_time, tvb, foffset, 4, ENC_BIG_ENDIAN);
7243 foffset += 4;
7244 foffset = ndps_string(tvb, hf_notify_printer_uri, atree, foffset, NULL);
7245 proto_item_set_end(aitem, tvb, foffset);
7246 /* End of Eventhandling2 */
7247 length = tvb_get_ntohl(tvb, foffset); /* Added on 10-17-03 */
7248 foffset += 4;
7249 if (length!=0)
7251 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, ENC_NA);
7253 foffset += length;
7254 if(error_val != 0)
7256 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7259 break;
7260 default:
7261 break;
7263 break;
7264 case 0x060977: /* Broker */
7265 switch(ndps_func)
7267 case 0x00000001: /* Bind */
7268 case 0x00000002: /* Unbind */
7269 case 0x00000004: /* Enable Service */
7270 case 0x00000005: /* Disable Service */
7271 case 0x00000006: /* Down Broker */
7272 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7273 break;
7274 case 0x00000003: /* List Services */
7275 number_of_items = tvb_get_ntohl(tvb, foffset);
7276 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_services, tvb, foffset, 4, number_of_items);
7277 foffset += 4;
7278 for (ii = 0; ii < number_of_items; ii++ )
7280 if (ii >= NDPS_MAX_ITEMS) {
7281 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7282 break;
7284 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Service %d", ii+1);
7285 proto_tree_add_item(atree, hf_ndps_service_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
7286 foffset += 4;
7287 proto_tree_add_item(atree, hf_ndps_service_enabled, tvb, foffset, 4, ENC_BIG_ENDIAN);
7288 foffset += 4;
7289 proto_item_set_end(aitem, tvb, foffset);
7291 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7292 break;
7293 case 0x00000007: /* Get Broker NDS Object Name */
7294 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset,
7295 4, ENC_BIG_ENDIAN); /* XXX - what does this count? */
7296 foffset += 4;
7297 foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset, NULL);
7298 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
7299 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7300 break;
7301 case 0x00000008: /* Get Broker Session Information */
7302 default:
7303 break;
7305 break;
7306 case 0x060978: /* Registry */
7307 switch(ndps_func)
7309 case 0x00000001: /* Bind */
7310 number_of_items = tvb_get_ntohl(tvb, foffset);
7311 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
7312 foffset += 4;
7313 for (ii = 0; ii < number_of_items; ii++ )
7315 if (ii >= NDPS_MAX_ITEMS) {
7316 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7317 break;
7319 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Attribute %d", ii+1);
7320 length = tvb_get_ntohl(tvb, foffset);
7321 foffset += 4;
7322 if (length!=0)
7324 proto_tree_add_item(atree, hf_ndps_attribute_set, tvb, foffset, length, ENC_NA);
7326 proto_item_set_end(aitem, tvb, foffset);
7328 break;
7329 case 0x00000002: /* Unbind */
7330 /* NoOp */
7331 break;
7332 case 0x00000003: /* Register Server */
7333 case 0x00000004: /* Deregister Server */
7334 case 0x00000005: /* Register Registry */
7335 case 0x00000006: /* Deregister Registry */
7336 case 0x00000007: /* Registry Update */
7337 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7338 break;
7339 case 0x00000008: /* List Local Servers */
7340 case 0x00000009: /* List Servers */
7341 number_of_items = tvb_get_ntohl(tvb, foffset);
7342 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7343 foffset += 4;
7344 for (ii = 0; ii < number_of_items; ii++ )
7346 if (ii >= NDPS_MAX_ITEMS) {
7347 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7348 break;
7350 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %d", ii+1);
7351 foffset = server_entry(tvb, pinfo, atree, foffset);
7352 proto_item_set_end(aitem, tvb, foffset);
7354 length = tvb_get_ntohl(tvb, foffset);
7355 foffset += 4;
7356 if (length!=0)
7358 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, ENC_NA);
7360 foffset += length;
7361 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7362 break;
7363 case 0x0000000a: /* List Known Registries */
7364 number_of_items = tvb_get_ntohl(tvb, foffset);
7365 expert_item = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN);
7366 foffset += 4;
7367 for (ii = 0; ii < number_of_items; ii++ )
7369 if (ii >= NDPS_MAX_ITEMS) {
7370 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7371 break;
7373 aitem = proto_tree_add_item(ndps_tree, hf_ndps_client_server_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
7374 atree = proto_item_add_subtree(aitem, ett_ndps);
7375 foffset += 4;
7376 foffset = ndps_string(tvb, hf_ndps_registry_name, atree, foffset, NULL);
7377 foffset = print_address(tvb, atree, foffset);
7379 length = tvb_get_ntohl(tvb, foffset);
7380 foffset += 4;
7381 if (length!=0)
7383 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, ENC_NA);
7385 foffset += length;
7386 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7387 break;
7388 case 0x0000000b: /* Get Registry NDS Object Name */
7389 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "NDS Printer Name");
7390 foffset = qualifiedname(tvb, atree, foffset);
7391 proto_item_set_end(aitem, tvb, foffset);
7392 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7393 break;
7394 case 0x0000000c: /* Get Registry Session Information */
7395 proto_tree_add_item(ndps_tree, hf_ndps_session_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
7396 foffset += 4;
7397 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN);
7398 foffset += 4;
7399 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7400 break;
7401 default:
7402 break;
7404 break;
7405 case 0x060979: /* Notify */
7406 switch(ndps_func)
7408 case 0x00000001: /* Notify Bind */
7409 number_of_items = tvb_get_ntohl(tvb, foffset);
7410 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
7411 foffset += 4;
7412 for (ii = 0; ii < number_of_items; ii++ )
7414 if (ii >= NDPS_MAX_ITEMS) {
7415 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7416 break;
7418 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Attribute %d", ii+1);
7419 length = tvb_get_ntohl(tvb, foffset);
7420 foffset += 4;
7421 if (length!=0)
7423 proto_tree_add_item(atree, hf_ndps_attribute_set, tvb, foffset, length, ENC_NA);
7425 proto_item_set_end(aitem, tvb, foffset);
7427 break;
7428 case 0x00000002: /* Notify Unbind */
7429 /* NoOp */
7430 break;
7431 case 0x00000003: /* Register Supplier */
7432 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN);
7433 foffset += 4;
7434 foffset = event_object_set(tvb, pinfo, ndps_tree, foffset);
7435 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7436 break;
7437 case 0x00000004: /* Deregister Supplier */
7438 case 0x0000000b: /* Report Notification */
7439 case 0x0000000d: /* Remove Delivery Method */
7440 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7441 break;
7442 case 0x00000005: /* Add Profile */
7443 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7444 foffset += 4;
7445 foffset = event_object_set(tvb, pinfo, ndps_tree, foffset);
7446 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7447 break;
7448 case 0x00000006: /* Remove Profile */
7449 case 0x00000007: /* Modify Profile */
7450 case 0x00000009: /* Report Event */
7451 foffset = event_object_set(tvb, pinfo, ndps_tree, foffset);
7452 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7453 break;
7454 case 0x00000008: /* List Profiles */
7455 /* Start of ProfileResultSet */
7456 proto_tree_add_item(ndps_tree, hf_ndps_len, tvb, foffset, 4, ENC_BIG_ENDIAN);
7457 foffset += 4;
7458 /* Start of Eventhandling */
7459 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7460 foffset += 4;
7461 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN);
7462 foffset += 4;
7463 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer Name");
7464 foffset = qualifiedname(tvb, atree, foffset);
7465 proto_item_set_end(aitem, tvb, foffset);
7466 length = tvb_get_ntohl(tvb, foffset);
7467 foffset += 4;
7468 if (length==4)
7470 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN);
7472 foffset += length;
7473 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7474 foffset += 4;
7475 /* Start of NameorID */
7476 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
7477 foffset = name_or_id(tvb, atree, foffset);
7478 proto_item_set_end(aitem, tvb, foffset);
7479 /* End of NameorID */
7480 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Addresses");
7481 number_of_items = tvb_get_ntohl(tvb, foffset);
7482 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
7483 foffset += 4;
7484 for (ii = 0; ii < number_of_items; ii++ )
7486 if (ii >= NDPS_MAX_ITEMS) {
7487 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7488 break;
7490 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Address %d", ii+1);
7491 foffset = address_item(tvb, btree, foffset);
7492 proto_item_set_end(bitem, tvb, foffset);
7494 proto_item_set_end(aitem, tvb, foffset);
7495 foffset = event_object_set(tvb, pinfo, ndps_tree, foffset);
7496 /* End of Eventhandling */
7497 /* End of ProfileResultSet */
7498 length = tvb_get_ntohl(tvb, foffset);
7499 foffset += 4;
7500 if (length!=0)
7502 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, ENC_NA);
7504 foffset += length;
7505 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7506 break;
7507 case 0x0000000a: /* List Supported Languages */
7508 /* Start of IntegerSeq */
7509 length = tvb_get_ntohl(tvb, foffset);
7510 foffset += 4;
7511 if (length==4)
7513 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, length, ENC_BIG_ENDIAN);
7515 foffset += length;
7516 /* End of IntegerSeq */
7517 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7518 break;
7519 case 0x0000000c: /* Add Delivery Method */
7520 /* Start of NameorID */
7521 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
7522 foffset = name_or_id(tvb, atree, foffset);
7523 proto_item_set_end(aitem, tvb, foffset);
7524 /* End of NameorID */
7525 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7526 break;
7527 case 0x0000000e: /* List Delivery Methods */
7528 /* Start of DeliveryMethodSet */
7529 number_of_items = tvb_get_ntohl(tvb, foffset);
7530 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_delivery_method_count, tvb, foffset, 4, number_of_items);
7531 foffset += 4;
7532 for (ii = 0; ii < number_of_items; ii++ )
7534 if (ii >= NDPS_MAX_ITEMS) {
7535 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7536 break;
7538 /* Start of DeliveryMethod */
7539 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method %d", ii+1);
7540 /* Start of NameorID */
7541 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Method ID");
7542 foffset = name_or_id(tvb, btree, foffset);
7543 foffset += align_4(tvb, foffset);
7544 proto_item_set_end(bitem, tvb, foffset);
7545 /* End of NameorID */
7546 foffset = ndps_string(tvb, hf_ndps_method_name, atree, foffset, NULL);
7547 foffset = ndps_string(tvb, hf_ndps_method_ver, atree, foffset, NULL);
7548 foffset = ndps_string(tvb, hf_ndps_file_name, atree, foffset, NULL);
7549 proto_tree_add_item(atree, hf_ndps_admin_submit, tvb, foffset, 4, ENC_BIG_ENDIAN);
7550 foffset += 4;
7551 proto_item_set_end(aitem, tvb, foffset);
7552 /* End of DeliveryMethod */
7554 /* End of DeliveryMethodSet */
7555 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7556 break;
7557 case 0x0000000f: /* Get Delivery Method Information */
7558 /* Start of DeliveryMethod */
7559 /* Start of NameorID */
7560 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID");
7561 foffset = name_or_id(tvb, atree, foffset);
7562 /* End of NameorID */
7563 foffset = ndps_string(tvb, hf_ndps_method_name, atree, foffset, NULL);
7564 foffset = ndps_string(tvb, hf_ndps_method_ver, atree, foffset, NULL);
7565 foffset = ndps_string(tvb, hf_ndps_file_name, atree, foffset, NULL);
7566 proto_tree_add_item(atree, hf_ndps_admin_submit, tvb, foffset, 4, ENC_BIG_ENDIAN);
7567 foffset += 4;
7568 proto_item_set_end(aitem, tvb, foffset);
7569 /* End of DeliveryMethod */
7570 number_of_items = tvb_get_ntohl(tvb, foffset);
7571 proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
7572 foffset += 4;
7573 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Addresses");
7574 for (ii = 0; ii < number_of_items; ii++ )
7576 if (ii >= NDPS_MAX_ITEMS) {
7577 expert_add_info(pinfo, aitem, &ei_ndps_truncated);
7578 break;
7580 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Address %d", ii+1);
7581 foffset = address_item(tvb, btree, foffset);
7582 proto_item_set_end(bitem, tvb, foffset);
7584 proto_item_set_end(aitem, tvb, foffset);
7585 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7586 break;
7587 case 0x00000010: /* Get Notify NDS Object Name */
7588 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset,
7589 4, ENC_BIG_ENDIAN); /* XXX - what does this count? */
7590 foffset += 4;
7591 foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset, NULL);
7592 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL);
7593 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7594 break;
7595 case 0x00000011: /* Get Notify Session Information */
7596 proto_tree_add_item(ndps_tree, hf_ndps_get_session_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
7597 foffset += 4;
7598 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN);
7599 foffset += 4;
7600 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7601 break;
7602 default:
7603 break;
7605 break;
7606 case 0x06097a: /* Resman */
7607 switch(ndps_func)
7609 case 0x00000001: /* Bind */
7610 length = tvb_get_ntohl(tvb, foffset);
7611 foffset += 4;
7612 if (length!=0)
7614 proto_tree_add_item(ndps_tree, hf_ndps_attribute_set, tvb, foffset, length, ENC_NA);
7616 break;
7617 case 0x00000002: /* Unbind */
7618 /* NoOp */
7619 break;
7620 case 0x00000003: /* Add Resource File */
7621 case 0x00000004: /* Delete Resource File */
7622 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7623 break;
7624 case 0x00000005: /* List Resources */
7625 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN);
7626 foffset += 4;
7627 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7628 col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7629 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7631 break;
7633 proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, ENC_BIG_ENDIAN);
7634 foffset += 4;
7635 proto_tree_add_item(ndps_tree, hf_ndps_resource_list_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
7636 resource_type = tvb_get_ntohl(tvb, foffset);
7637 foffset += 4;
7638 switch (resource_type)
7640 case 0: /* Print Drivers */
7641 case 1: /* Printer Definitions */
7642 case 2: /* Printer Definitions Short */
7643 number_of_items = tvb_get_ntohl(tvb, foffset);
7644 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items);
7645 foffset += 4;
7646 for (ii = 0; ii < number_of_items; ii++ )
7648 if (ii >= NDPS_MAX_ITEMS) {
7649 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7650 break;
7652 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Definition %d", ii+1);
7653 if (tvb_get_ntohl(tvb, foffset)==0) { /* Offset for old type support */
7654 foffset += 2;
7656 foffset += 4; /* Item always == 1 */
7657 foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL);
7658 if (tvb_get_ntohl(tvb, foffset)==0) {
7659 foffset += 2;
7661 foffset += 4;
7662 foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL);
7663 if (tvb_get_ntohl(tvb, foffset)==0) {
7664 foffset += 2;
7666 foffset += 4;
7667 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL);
7668 proto_item_set_end(aitem, tvb, foffset);
7670 break;
7671 case 3: /* Banner Page Files */
7672 number_of_items = tvb_get_ntohl(tvb, foffset);
7673 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7674 foffset += 4;
7675 for (ii = 0; ii < number_of_items; ii++ )
7677 if (ii >= NDPS_MAX_ITEMS) {
7678 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7679 break;
7681 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Banner %d", ii+1);
7682 foffset = ndps_string(tvb, hf_ndps_banner_name, atree, foffset, NULL);
7683 proto_item_set_end(aitem, tvb, foffset);
7685 break;
7686 case 4: /* Font Types */
7687 number_of_items = tvb_get_ntohl(tvb, foffset);
7688 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_font_type_count, tvb, foffset, 4, number_of_items);
7689 foffset += 4;
7690 for (ii = 0; ii < number_of_items; ii++ )
7692 if (ii >= NDPS_MAX_ITEMS) {
7693 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7694 break;
7696 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Font %d", ii+1);
7697 foffset = ndps_string(tvb, hf_font_type_name, atree, foffset, NULL);
7698 proto_item_set_end(aitem, tvb, foffset);
7700 break;
7701 case 7: /* Font Files */
7702 number_of_items = tvb_get_ntohl(tvb, foffset);
7703 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_font_file_count, tvb, foffset, 4, number_of_items);
7704 foffset += 4;
7705 for (ii = 0; ii < number_of_items; ii++ )
7707 if (ii >= NDPS_MAX_ITEMS) {
7708 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7709 break;
7711 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Font File %d", ii+1);
7712 foffset = ndps_string(tvb, hf_font_file_name, atree, foffset, NULL);
7713 proto_item_set_end(aitem, tvb, foffset);
7715 break;
7716 case 5: /* Printer Driver Files */
7717 case 12: /* Printer Driver Files 2 */
7718 case 9: /* Generic Files */
7719 number_of_items = tvb_get_ntohl(tvb, foffset);
7720 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items);
7721 foffset += 4;
7722 for (ii = 0; ii < number_of_items; ii++ )
7724 if (ii >= NDPS_MAX_ITEMS) {
7725 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7726 break;
7728 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "File %d", ii+1);
7729 foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL);
7730 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL);
7731 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL);
7732 proto_item_set_end(aitem, tvb, foffset);
7734 break;
7735 case 6: /* Printer Definition File */
7736 number_of_items = tvb_get_ntohl(tvb, foffset);
7737 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items);
7738 foffset += 4;
7739 for (ii = 0; ii < number_of_items; ii++ )
7741 if (ii >= NDPS_MAX_ITEMS) {
7742 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7743 break;
7745 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Definition %d", ii+1);
7746 foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL);
7747 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL);
7748 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL);
7749 proto_item_set_end(aitem, tvb, foffset);
7751 number_of_items = tvb_get_ntohl(tvb, foffset);
7752 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7753 foffset += 4;
7754 for (ii = 0; ii < number_of_items; ii++ )
7756 if (ii >= NDPS_MAX_ITEMS) {
7757 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7758 break;
7760 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %d", ii+1);
7761 foffset = ndps_string(tvb, hf_ndps_def_file_name, atree, foffset, NULL);
7762 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7763 proto_tree_add_uint(atree, hf_ndps_num_win31_keys, tvb, foffset, 4, number_of_items2);
7764 btree = proto_tree_add_subtree(atree, tvb, foffset, 4, ett_ndps, &bitem, "Windows 3.1 Keys");
7765 foffset += 4;
7766 for (jj = 0; jj < number_of_items2; jj++ )
7768 if (jj >= NDPS_MAX_ITEMS) {
7769 expert_add_info(pinfo, bitem, &ei_ndps_truncated);
7770 break;
7772 foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL);
7774 proto_item_set_end(bitem, tvb, foffset);
7775 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7776 proto_tree_add_uint(atree, hf_ndps_num_win95_keys, tvb, foffset, 4, number_of_items2);
7777 btree = proto_tree_add_subtree(atree, tvb, foffset, 4, ett_ndps, &bitem, "Windows 95 Keys");
7778 foffset += 4;
7779 for (jj = 0; jj < number_of_items2; jj++ )
7781 if (jj >= NDPS_MAX_ITEMS) {
7782 expert_add_info(pinfo, bitem, &ei_ndps_truncated);
7783 break;
7785 foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL);
7787 proto_item_set_end(bitem, tvb, foffset);
7788 proto_item_set_end(aitem, tvb, foffset);
7790 break;
7791 case 10: /* Printer Definition File 2 */
7792 foffset = ndps_string(tvb, hf_ndps_def_file_name, ndps_tree, foffset, NULL);
7793 number_of_items = tvb_get_ntohl(tvb, foffset);
7794 expert_item = proto_tree_add_uint(ndps_tree, hf_os_count, tvb, foffset, 4, number_of_items);
7795 foffset += 4;
7796 for (ii = 0; ii < number_of_items; ii++ )
7798 if (ii >= NDPS_MAX_ITEMS) {
7799 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7800 break;
7802 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "OS %d", ii+1);
7803 proto_tree_add_item(atree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
7804 foffset += 4;
7805 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7806 expert_item = proto_tree_add_uint(atree, hf_ndps_num_windows_keys, tvb, foffset, 4, number_of_items2);
7807 foffset += 4;
7808 for (jj = 0; jj < number_of_items2; jj++ )
7810 if (jj >= NDPS_MAX_ITEMS) {
7811 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7812 break;
7814 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Key %d", jj+1);
7815 foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL);
7816 proto_item_set_end(bitem, tvb, foffset);
7818 proto_item_set_end(aitem, tvb, foffset);
7820 break;
7821 case 8: /* Generic Type */
7822 case 11: /* Printer Driver Types 2 */
7823 case 13: /* Printer Driver Types Archive */
7824 number_of_items = tvb_get_ntohl(tvb, foffset);
7825 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_printer_type_count, tvb, foffset, 4, number_of_items);
7826 foffset += 4;
7827 for (ii = 0; ii < number_of_items; ii++ )
7829 if (ii >= NDPS_MAX_ITEMS) {
7830 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7831 break;
7833 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Type %d", ii+1);
7834 foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL);
7835 foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL);
7836 foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL);
7837 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL);
7838 proto_tree_add_item(atree, hf_archive_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
7839 foffset += 4;
7840 proto_tree_add_item(atree, hf_archive_file_size, tvb, foffset, 4, ENC_BIG_ENDIAN);
7841 foffset += 4;
7842 proto_item_set_end(aitem, tvb, foffset);
7844 break;
7845 case 14: /* Languages Available */
7846 number_of_items = tvb_get_ntohl(tvb, foffset);
7847 expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_language_count, tvb, foffset, 4, number_of_items);
7848 foffset += 4;
7849 for (ii = 0; ii < number_of_items; ii++ )
7851 if (ii >= NDPS_MAX_ITEMS) {
7852 expert_add_info(pinfo, expert_item, &ei_ndps_truncated);
7853 break;
7855 atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Language %d", ii+1);
7856 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7857 foffset += 4;
7858 proto_item_set_end(aitem, tvb, foffset);
7860 break;
7861 default:
7862 break;
7864 break;
7865 case 0x00000006: /* Get Resource File */
7866 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN);
7867 foffset += 4;
7868 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7869 col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7870 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7872 break;
7874 proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, ENC_BIG_ENDIAN);
7875 foffset += 4;
7876 proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, ENC_BIG_ENDIAN);
7877 foffset += 4;
7878 proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset, -1, ENC_NA);
7879 break;
7880 case 0x00000007: /* Get Resource File Date */
7881 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN);
7882 foffset += 4;
7883 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7884 col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7885 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7887 break;
7889 proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, ENC_BIG_ENDIAN);
7890 foffset += 4;
7891 break;
7892 case 0x00000008: /* Get Resource Manager NDS Object Name */
7893 foffset = qualifiedname(tvb, ndps_tree, foffset);
7894 proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
7895 foffset += 4;
7896 break;
7897 case 0x00000009: /* Get Resource Manager Session Information */
7898 proto_tree_add_item(ndps_tree, hf_ndps_get_resman_session_type, tvb, foffset, 4, ENC_BIG_ENDIAN);
7899 foffset += 4;
7900 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN);
7901 foffset += 4;
7902 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7903 break;
7904 case 0x0000000a: /* Set Resource Language Context */
7905 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN);
7906 foffset += 4;
7907 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7908 col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7909 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7911 break;
7913 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
7914 foffset += 4;
7915 break;
7916 default:
7917 break;
7919 break;
7920 case 0x06097b: /* Delivery */
7921 switch(ndps_func)
7923 case 0x00000001: /* Delivery Bind */
7924 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN);
7925 foffset += 4;
7926 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7927 col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7928 break;
7929 case 0x00000002: /* Delivery Unbind */
7930 /* NoOp */
7931 break;
7932 case 0x00000003: /* Delivery Send */
7933 case 0x00000004: /* Delivery Send2 */
7934 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN);
7935 foffset += 4;
7936 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7937 col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7938 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7940 break;
7942 number_of_items=tvb_get_ntohl(tvb, foffset);
7943 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7944 foffset += 4;
7945 atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Failed Items");
7946 for (ii = 0; ii < number_of_items; ii++ )
7948 if (ii >= NDPS_MAX_ITEMS) {
7949 expert_add_info(pinfo, aitem, &ei_ndps_truncated);
7950 break;
7952 btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Item %d", ii+1);
7953 length=tvb_get_ntohl(tvb, foffset);
7954 length_remaining = tvb_reported_length_remaining(tvb, foffset);
7955 if(length_remaining == -1 || (uint32_t) length_remaining < length)
7957 return foffset;
7959 proto_tree_add_item(btree, hf_ndps_item_ptr, tvb, foffset, length, ENC_NA);
7960 foffset += length;
7961 proto_item_set_end(bitem, tvb, foffset);
7963 proto_item_set_end(aitem, tvb, foffset);
7964 break;
7965 default:
7966 break;
7968 break;
7969 default:
7970 break;
7972 return foffset;
7975 void
7976 proto_register_ndps(void)
7978 static hf_register_info hf_ndps[] = {
7979 { &hf_ndps_record_mark,
7980 { "Record Mark", "ndps.record_mark", FT_UINT16, BASE_HEX, NULL, 0x0,
7981 NULL, HFILL }},
7983 { &hf_ndps_packet_type,
7984 { "Packet Type", "ndps.packet_type",
7985 FT_UINT32, BASE_HEX, VALS(ndps_packet_types), 0x0,
7986 NULL, HFILL }},
7988 { &hf_ndps_length,
7989 { "Record Length", "ndps.record_length",
7990 FT_UINT16, BASE_DEC, NULL, 0x0,
7991 NULL, HFILL }},
7993 { &hf_ndps_xid,
7994 { "Exchange ID", "ndps.xid",
7995 FT_UINT32, BASE_HEX, NULL, 0x0,
7996 NULL, HFILL }},
7998 { &hf_ndps_rpc_version,
7999 { "RPC Version", "ndps.rpc_version",
8000 FT_UINT32, BASE_HEX, NULL, 0x0,
8001 NULL, HFILL }},
8003 { &hf_spx_ndps_program,
8004 { "NDPS Program Number", "spx.ndps_program",
8005 FT_UINT32, BASE_HEX, VALS(spx_ndps_program_vals), 0x0,
8006 NULL, HFILL }},
8008 { &hf_spx_ndps_version,
8009 { "Program Version", "spx.ndps_version",
8010 FT_UINT32, BASE_DEC, NULL, 0x0,
8011 NULL, HFILL }},
8013 #if 0
8014 { &hf_ndps_error,
8015 { "NDPS Error", "spx.ndps_error",
8016 FT_UINT32, BASE_HEX, NULL, 0x0,
8017 NULL, HFILL }},
8018 #endif
8020 { &hf_ndps_other_error_string,
8021 { "Extended Error String", "ndps.ext_err_string",
8022 FT_STRING, BASE_NONE, NULL, 0x0,
8023 NULL, HFILL }},
8025 { &hf_spx_ndps_func_print,
8026 { "Print Program", "spx.ndps_func_print",
8027 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &spx_ndps_print_func_vals_ext, 0x0,
8028 NULL, HFILL }},
8030 { &hf_spx_ndps_func_notify,
8031 { "Notify Program", "spx.ndps_func_notify",
8032 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &spx_ndps_notify_func_vals_ext, 0x0,
8033 NULL, HFILL }},
8035 { &hf_spx_ndps_func_delivery,
8036 { "Delivery Program", "spx.ndps_func_delivery",
8037 FT_UINT32, BASE_HEX, VALS(spx_ndps_deliver_func_vals), 0x0,
8038 NULL, HFILL }},
8040 { &hf_spx_ndps_func_registry,
8041 { "Registry Program", "spx.ndps_func_registry",
8042 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &spx_ndps_registry_func_vals_ext, 0x0,
8043 NULL, HFILL }},
8045 { &hf_spx_ndps_func_resman,
8046 { "ResMan Program", "spx.ndps_func_resman",
8047 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &spx_ndps_resman_func_vals_ext, 0x0,
8048 NULL, HFILL }},
8050 { &hf_spx_ndps_func_broker,
8051 { "Broker Program", "spx.ndps_func_broker",
8052 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &spx_ndps_broker_func_vals_ext, 0x0,
8053 NULL, HFILL }},
8055 { &hf_ndps_num_objects,
8056 { "Number of Objects", "ndps.num_objects",
8057 FT_UINT32, BASE_DEC, NULL, 0x0,
8058 NULL, HFILL }},
8060 { &hf_ndps_num_attributes,
8061 { "Number of Attributes", "ndps.num_attributes",
8062 FT_UINT32, BASE_DEC, NULL, 0x0,
8063 NULL, HFILL }},
8065 #if 0
8066 { &hf_ndps_sbuffer,
8067 { "Server", "ndps.sbuffer",
8068 FT_UINT32, BASE_DEC, NULL, 0x0,
8069 NULL, HFILL }},
8070 #endif
8072 #if 0
8073 { &hf_ndps_rbuffer,
8074 { "Connection", "ndps.rbuffer",
8075 FT_UINT32, BASE_DEC, NULL, 0x0,
8076 NULL, HFILL }},
8077 #endif
8079 { &hf_ndps_user_name,
8080 { "Trustee Name", "ndps.user_name",
8081 FT_STRING, BASE_NONE, NULL, 0x0,
8082 NULL, HFILL }},
8084 { &hf_ndps_broker_name,
8085 { "Broker Name", "ndps.broker_name",
8086 FT_STRING, BASE_NONE, NULL, 0x0,
8087 NULL, HFILL }},
8089 { &hf_ndps_num_results,
8090 { "Number of Results", "ndps.num_results",
8091 FT_UINT32, BASE_DEC, NULL, 0x0,
8092 NULL, HFILL }},
8094 { &hf_ndps_num_options,
8095 { "Number of Options", "ndps.num_options",
8096 FT_UINT32, BASE_DEC, NULL, 0x0,
8097 NULL, HFILL }},
8099 { &hf_ndps_num_jobs,
8100 { "Number of Jobs", "ndps.num_jobs",
8101 FT_UINT32, BASE_DEC, NULL, 0x0,
8102 NULL, HFILL }},
8104 { &hf_ndps_pa_name,
8105 { "Printer Name", "ndps.pa_name",
8106 FT_STRING, BASE_NONE, NULL, 0x0,
8107 NULL, HFILL }},
8109 { &hf_ndps_tree,
8110 { "Tree", "ndps.tree",
8111 FT_STRING, BASE_NONE, NULL, 0x0,
8112 NULL, HFILL }},
8114 { &hf_ndps_reqframe,
8115 { "Request Frame", "ndps.reqframe",
8116 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
8117 NULL, HFILL }},
8119 { &hf_ndps_error_val,
8120 { "Return Status", "ndps.error_val",
8121 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_error_types_ext, 0x0,
8122 NULL, HFILL }},
8124 { &hf_ndps_object,
8125 { "Object ID", "ndps.object",
8126 FT_UINT32, BASE_HEX, NULL, 0x0,
8127 NULL, HFILL }},
8129 { &hf_ndps_cred_type,
8130 { "Credential Type", "ndps.cred_type",
8131 FT_UINT32, BASE_HEX, VALS(ndps_credential_enum), 0x0,
8132 NULL, HFILL }},
8134 { &hf_ndps_server_name,
8135 { "Server Name", "ndps.server_name",
8136 FT_STRING, BASE_NONE, NULL, 0x0,
8137 NULL, HFILL }},
8139 { &hf_ndps_connection,
8140 { "Connection", "ndps.connection",
8141 FT_UINT16, BASE_DEC, NULL, 0x0,
8142 NULL, HFILL }},
8144 { &hf_ndps_ext_error,
8145 { "Extended Error Code", "ndps.ext_error",
8146 FT_UINT32, BASE_HEX, NULL, 0x0,
8147 NULL, HFILL }},
8149 { &hf_ndps_auth_null,
8150 { "Auth Null", "ndps.auth_null",
8151 FT_BYTES, BASE_NONE, NULL, 0x0,
8152 NULL, HFILL }},
8154 { &hf_ndps_rpc_accept,
8155 { "RPC Accept or Deny", "ndps.rpc_acc",
8156 FT_UINT32, BASE_HEX, VALS(true_false), 0x0,
8157 NULL, HFILL }},
8159 { &hf_ndps_rpc_acc_stat,
8160 { "RPC Accept Status", "ndps.rpc_acc_stat",
8161 FT_UINT32, BASE_HEX, VALS(accept_stat), 0x0,
8162 NULL, HFILL }},
8164 { &hf_ndps_rpc_rej_stat,
8165 { "RPC Reject Status", "ndps.rpc_rej_stat",
8166 FT_UINT32, BASE_HEX, VALS(reject_stat), 0x0,
8167 NULL, HFILL }},
8169 { &hf_ndps_rpc_acc_results,
8170 { "RPC Accept Results", "ndps.rpc_acc_res",
8171 FT_UINT32, BASE_HEX, NULL, 0x0,
8172 NULL, HFILL }},
8174 { &hf_ndps_problem_type,
8175 { "Problem Type", "ndps.rpc_prob_type",
8176 FT_UINT32, BASE_HEX, VALS(error_type_enum), 0x0,
8177 NULL, HFILL }},
8179 { &hf_security_problem_type,
8180 { "Security Problem", "ndps.rpc_sec_prob",
8181 FT_UINT32, BASE_HEX, VALS(security_problem_enum), 0x0,
8182 NULL, HFILL }},
8184 { &hf_service_problem_type,
8185 { "Service Problem", "ndps.rpc_serv_prob",
8186 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &service_problem_enum_ext, 0x0,
8187 NULL, HFILL }},
8189 { &hf_access_problem_type,
8190 { "Access Problem", "ndps.rpc_acc_prob",
8191 FT_UINT32, BASE_HEX, VALS(access_problem_enum), 0x0,
8192 NULL, HFILL }},
8194 { &hf_printer_problem_type,
8195 { "Printer Problem", "ndps.rpc_print_prob",
8196 FT_UINT32, BASE_HEX, VALS(printer_problem_enum), 0x0,
8197 NULL, HFILL }},
8199 { &hf_selection_problem_type,
8200 { "Selection Problem", "ndps.rpc_sel_prob",
8201 FT_UINT32, BASE_HEX, VALS(selection_problem_enum), 0x0,
8202 NULL, HFILL }},
8204 { &hf_doc_access_problem_type,
8205 { "Document Access Problem", "ndps.rpc_doc_acc_prob",
8206 FT_UINT32, BASE_HEX, VALS(doc_access_problem_enum), 0x0,
8207 NULL, HFILL }},
8209 { &hf_attribute_problem_type,
8210 { "Attribute Problem", "ndps.rpc_attr_prob",
8211 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &attribute_problem_enum_ext, 0x0,
8212 NULL, HFILL }},
8214 { &hf_update_problem_type,
8215 { "Update Problem", "ndps.rpc_update_prob",
8216 FT_UINT32, BASE_HEX, VALS(update_problem_enum), 0x0,
8217 NULL, HFILL }},
8219 { &hf_obj_id_type,
8220 { "Object ID Type", "ndps.rpc_obj_id_type",
8221 FT_UINT32, BASE_HEX, VALS(obj_identification_enum), 0x0,
8222 NULL, HFILL }},
8224 { &hf_oid_struct_size,
8225 { "OID Struct Size", "ndps.rpc_oid_struct_size",
8226 FT_UINT32, BASE_DEC, NULL, 0x0,
8227 NULL, HFILL }},
8229 { &hf_object_name,
8230 { "Object Name", "ndps.object_name",
8231 FT_STRING, BASE_NONE, NULL, 0x0,
8232 NULL, HFILL }},
8234 { &hf_ndps_document_number,
8235 { "Document Number", "ndps.doc_num",
8236 FT_UINT32, BASE_HEX, NULL, 0x0,
8237 NULL, HFILL }},
8239 { &hf_ndps_doc_content,
8240 { "Document Content", "ndps.doc_content",
8241 FT_UINT32, BASE_HEX, NULL, 0x0,
8242 NULL, HFILL }},
8244 { &hf_ndps_nameorid,
8245 { "Name or ID Type", "ndps.nameorid",
8246 FT_UINT32, BASE_HEX, VALS(nameorid_enum), 0x0,
8247 NULL, HFILL }},
8249 { &hf_ndps_local_object_name,
8250 { "Local Object Name", "ndps.loc_object_name",
8251 FT_STRING, BASE_NONE, NULL, 0x0,
8252 NULL, HFILL }},
8254 { &hf_ndps_printer_name,
8255 { "Printer Name", "ndps.printer_name",
8256 FT_STRING, BASE_NONE, NULL, 0x0,
8257 NULL, HFILL }},
8259 { &hf_ndps_qualified_name,
8260 { "Qualified Name Type", "ndps.qual_name_type",
8261 FT_UINT32, BASE_HEX, VALS(qualified_name_enum), 0x0,
8262 NULL, HFILL }},
8264 #if 0
8265 { &hf_ndps_qualified_name2,
8266 { "Qualified Name Type", "ndps.qual_name_type2",
8267 FT_UINT32, BASE_HEX, VALS(qualified_name_enum2), 0x0,
8268 NULL, HFILL }},
8269 #endif
8271 { &hf_ndps_item_count,
8272 { "Number of Items", "ndps.item_count",
8273 FT_UINT32, BASE_DEC, NULL, 0x0,
8274 NULL, HFILL }},
8276 { &hf_ndps_num_passwords,
8277 { "Number of Passwords", "ndps.num_passwords",
8278 FT_UINT32, BASE_DEC, NULL, 0x0,
8279 NULL, HFILL }},
8281 { &hf_ndps_num_servers,
8282 { "Number of Servers", "ndps.num_servers",
8283 FT_UINT32, BASE_DEC, NULL, 0x0,
8284 NULL, HFILL }},
8286 { &hf_ndps_num_locations,
8287 { "Number of Locations", "ndps.num_locations",
8288 FT_UINT32, BASE_DEC, NULL, 0x0,
8289 NULL, HFILL }},
8291 { &hf_ndps_num_areas,
8292 { "Number of Areas", "ndps.num_areas",
8293 FT_UINT32, BASE_DEC, NULL, 0x0,
8294 NULL, HFILL }},
8296 { &hf_ndps_num_address_items,
8297 { "Number of Address Items", "ndps.num_address_items",
8298 FT_UINT32, BASE_DEC, NULL, 0x0,
8299 NULL, HFILL }},
8301 { &hf_ndps_num_job_categories,
8302 { "Number of Job Categories", "ndps.num_job_categories",
8303 FT_UINT32, BASE_DEC, NULL, 0x0,
8304 NULL, HFILL }},
8306 { &hf_ndps_num_page_selects,
8307 { "Number of Page Select Items", "ndps.num_page_selects",
8308 FT_UINT32, BASE_DEC, NULL, 0x0,
8309 NULL, HFILL }},
8311 { &hf_ndps_num_page_informations,
8312 { "Number of Page Information Items", "ndps.num_page_informations",
8313 FT_UINT32, BASE_DEC, NULL, 0x0,
8314 NULL, HFILL }},
8316 { &hf_ndps_num_names,
8317 { "Number of Names", "ndps.num_names",
8318 FT_UINT32, BASE_DEC, NULL, 0x0,
8319 NULL, HFILL }},
8321 { &hf_ndps_num_categories,
8322 { "Number of Categories", "ndps.num_categories",
8323 FT_UINT32, BASE_DEC, NULL, 0x0,
8324 NULL, HFILL }},
8326 { &hf_ndps_num_colorants,
8327 { "Number of Colorants", "ndps.num_colorants",
8328 FT_UINT32, BASE_DEC, NULL, 0x0,
8329 NULL, HFILL }},
8331 { &hf_ndps_num_events,
8332 { "Number of Events", "ndps.num_events",
8333 FT_UINT32, BASE_DEC, NULL, 0x0,
8334 NULL, HFILL }},
8336 { &hf_ndps_num_args,
8337 { "Number of Arguments", "ndps.num_argss",
8338 FT_UINT32, BASE_DEC, NULL, 0x0,
8339 NULL, HFILL }},
8341 { &hf_ndps_num_transfer_methods,
8342 { "Number of Transfer Methods", "ndps.num_transfer_methods",
8343 FT_UINT32, BASE_DEC, NULL, 0x0,
8344 NULL, HFILL }},
8346 { &hf_ndps_num_doc_types,
8347 { "Number of Document Types", "ndps.num_doc_types",
8348 FT_UINT32, BASE_DEC, NULL, 0x0,
8349 NULL, HFILL }},
8351 { &hf_ndps_num_destinations,
8352 { "Number of Destinations", "ndps.num_destinations",
8353 FT_UINT32, BASE_DEC, NULL, 0x0,
8354 NULL, HFILL }},
8356 { &hf_ndps_qualifier,
8357 { "Qualifier", "ndps.qual",
8358 FT_UINT32, BASE_HEX, NULL, 0x0,
8359 NULL, HFILL }},
8361 { &hf_ndps_lib_error,
8362 { "Library Error", "ndps.lib_error",
8363 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_error_types_ext, 0x0,
8364 NULL, HFILL }},
8366 { &hf_ndps_other_error,
8367 { "Other Error", "ndps.other_error",
8368 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_error_types_ext, 0x0,
8369 NULL, HFILL }},
8371 { &hf_ndps_other_error_2,
8372 { "Other Error 2", "ndps.other_error_2",
8373 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_error_types_ext, 0x0,
8374 NULL, HFILL }},
8376 { &hf_ndps_session,
8377 { "Session Handle", "ndps.session",
8378 FT_UINT32, BASE_HEX, NULL, 0x0,
8379 NULL, HFILL }},
8381 { &hf_ndps_abort_flag,
8382 { "Abort?", "ndps.abort",
8383 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8384 NULL, HFILL }},
8386 { &hf_ndps_obj_attribute_type,
8387 { "Value Syntax", "ndps.attrib_type",
8388 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_attribute_enum_ext, 0x0,
8389 NULL, HFILL }},
8391 { &hf_ndps_attribute_value,
8392 { "Value", "ndps.attribute_value",
8393 FT_UINT32, BASE_HEX, NULL, 0x0,
8394 NULL, HFILL }},
8396 { &hf_ndps_lower_range,
8397 { "Lower Range", "ndps.lower_range",
8398 FT_UINT32, BASE_HEX, NULL, 0x0,
8399 NULL, HFILL }},
8401 { &hf_ndps_upper_range,
8402 { "Upper Range", "ndps.upper_range",
8403 FT_UINT32, BASE_HEX, NULL, 0x0,
8404 NULL, HFILL }},
8406 { &hf_ndps_n64,
8407 { "Value", "ndps.n64",
8408 FT_BYTES, BASE_NONE, NULL, 0x0,
8409 NULL, HFILL }},
8411 { &hf_ndps_lower_range_n64,
8412 { "Lower Range", "ndps.lower_range_n64",
8413 FT_BYTES, BASE_NONE, NULL, 0x0,
8414 NULL, HFILL }},
8416 { &hf_ndps_upper_range_n64,
8417 { "Upper Range", "ndps.upper_range_n64",
8418 FT_BYTES, BASE_NONE, NULL, 0x0,
8419 NULL, HFILL }},
8421 { &hf_ndps_attrib_boolean,
8422 { "Value?", "ndps.attrib_boolean",
8423 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8424 NULL, HFILL }},
8426 { &hf_ndps_realization,
8427 { "Realization Type", "ndps.realization",
8428 FT_UINT32, BASE_HEX, VALS(ndps_realization_enum), 0x0,
8429 NULL, HFILL }},
8431 { &hf_ndps_xdimension_n64,
8432 { "X Dimension", "ndps.xdimension_n64",
8433 FT_BYTES, BASE_NONE, NULL, 0x0,
8434 NULL, HFILL }},
8436 { &hf_ndps_ydimension_n64,
8437 { "Y Dimension", "ndps.ydimension_n64",
8438 FT_BYTES, BASE_NONE, NULL, 0x0,
8439 NULL, HFILL }},
8441 { &hf_ndps_dim_value,
8442 { "Dimension Value Type", "ndps.dim_value",
8443 FT_UINT32, BASE_HEX, VALS(ndps_dim_value_enum), 0x0,
8444 NULL, HFILL }},
8446 { &hf_ndps_dim_flag,
8447 { "Dimension Flag", "ndps.dim_falg",
8448 FT_UINT32, BASE_HEX, NULL, 0x0,
8449 NULL, HFILL }},
8451 { &hf_ndps_xydim_value,
8452 { "XY Dimension Value Type", "ndps.xydim_value",
8453 FT_UINT32, BASE_HEX, VALS(ndps_xydim_value_enum), 0x0,
8454 NULL, HFILL }},
8456 { &hf_ndps_location_value,
8457 { "Location Value Type", "ndps.location_value",
8458 FT_UINT32, BASE_HEX, VALS(ndps_location_value_enum), 0x0,
8459 NULL, HFILL }},
8461 { &hf_ndps_xmin_n64,
8462 { "Minimum X Dimension", "ndps.xmin_n64",
8463 FT_BYTES, BASE_NONE, NULL, 0x0,
8464 NULL, HFILL }},
8466 { &hf_ndps_xmax_n64,
8467 { "Maximum X Dimension", "ndps.xmax_n64",
8468 FT_BYTES, BASE_NONE, NULL, 0x0,
8469 NULL, HFILL }},
8471 { &hf_ndps_ymin_n64,
8472 { "Minimum Y Dimension", "ndps.ymin_n64",
8473 FT_BYTES, BASE_NONE, NULL, 0x0,
8474 NULL, HFILL }},
8476 { &hf_ndps_ymax_n64,
8477 { "Maximum Y Dimension", "ndps.ymax_n64",
8478 FT_BYTES, BASE_NONE, NULL, 0x0,
8479 NULL, HFILL }},
8481 { &hf_ndps_edge_value,
8482 { "Edge Value", "ndps.edge_value",
8483 FT_UINT32, BASE_HEX, VALS(ndps_edge_value_enum), 0x0,
8484 NULL, HFILL }},
8486 { &hf_ndps_cardinal_or_oid,
8487 { "Cardinal or OID", "ndps.car_or_oid",
8488 FT_UINT32, BASE_HEX, VALS(ndps_card_or_oid_enum), 0x0,
8489 NULL, HFILL }},
8491 { &hf_ndps_cardinal_name_or_oid,
8492 { "Cardinal Name or OID", "ndps.car_name_or_oid",
8493 FT_UINT32, BASE_HEX, VALS(ndps_card_name_or_oid_enum), 0x0,
8494 NULL, HFILL }},
8496 { &hf_ndps_integer_or_oid,
8497 { "Integer or OID", "ndps.integer_or_oid",
8498 FT_UINT32, BASE_HEX, VALS(ndps_integer_or_oid_enum), 0x0,
8499 NULL, HFILL }},
8501 { &hf_ndps_profile_id,
8502 { "Profile ID", "ndps.profile_id",
8503 FT_UINT32, BASE_HEX, NULL, 0x0,
8504 NULL, HFILL }},
8506 { &hf_ndps_persistence,
8507 { "Persistence", "ndps.persistence",
8508 FT_UINT32, BASE_HEX, VALS(ndps_persistence_enum), 0x0,
8509 NULL, HFILL }},
8511 { &hf_ndps_language_count,
8512 { "Number of Languages", "ndps.language_count",
8513 FT_UINT32, BASE_DEC, NULL, 0x0,
8514 NULL, HFILL }},
8516 { &hf_ndps_language_id,
8517 { "Language ID", "ndps.lang_id",
8518 FT_UINT32, BASE_HEX, NULL, 0x0,
8519 NULL, HFILL }},
8521 { &hf_address_type,
8522 { "Address Type", "ndps.address_type",
8523 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_address_type_enum_ext, 0x0,
8524 NULL, HFILL }},
8526 { &hf_ndps_address,
8527 { "Address", "ndps.address",
8528 FT_UINT32, BASE_HEX, VALS(ndps_address_enum), 0x0,
8529 NULL, HFILL }},
8531 { &hf_ndps_add_bytes,
8532 { "Address Bytes", "ndps.add_bytes",
8533 FT_BYTES, BASE_NONE, NULL, 0x0,
8534 NULL, HFILL }},
8536 { &hf_ndps_event_type,
8537 { "Event Type", "ndps.event_type",
8538 FT_UINT32, BASE_HEX, NULL, 0x0,
8539 NULL, HFILL }},
8541 { &hf_ndps_event_object_identifier,
8542 { "Event Object Type", "ndps.event_object_identifier",
8543 FT_UINT32, BASE_HEX, VALS(ndps_event_object_enum), 0x0,
8544 NULL, HFILL }},
8546 { &hf_ndps_octet_string,
8547 { "Octet String", "ndps.octet_string",
8548 FT_BYTES, BASE_NONE, NULL, 0x0,
8549 NULL, HFILL }},
8551 { &hf_ndps_scope,
8552 { "Scope", "ndps.scope",
8553 FT_UINT32, BASE_HEX, NULL, 0x0,
8554 NULL, HFILL }},
8556 { &hf_address_len,
8557 { "Address Length", "ndps.addr_len",
8558 FT_UINT32, BASE_DEC, NULL, 0x0,
8559 NULL, HFILL }},
8561 { &hf_ndps_net,
8562 { "IPX Network", "ndps.net",
8563 FT_IPXNET, BASE_NONE, NULL, 0x0,
8564 "Scope", HFILL }},
8566 { &hf_ndps_node,
8567 { "Node", "ndps.node",
8568 FT_ETHER, BASE_NONE, NULL, 0x0,
8569 NULL, HFILL }},
8571 { &hf_ndps_socket,
8572 { "IPX Socket", "ndps.socket",
8573 FT_UINT16, BASE_HEX, NULL, 0x0,
8574 NULL, HFILL }},
8576 { &hf_ndps_port,
8577 { "IP Port", "ndps.port",
8578 FT_UINT16, BASE_DEC, NULL, 0x0,
8579 NULL, HFILL }},
8581 { &hf_ndps_ip,
8582 { "IP Address", "ndps.ip",
8583 FT_IPv4, BASE_NONE, NULL, 0x0,
8584 NULL, HFILL }},
8586 { &hf_ndps_server_type,
8587 { "NDPS Server Type", "ndps.server_type",
8588 FT_UINT32, BASE_HEX, VALS(ndps_server_type_enum), 0x0,
8589 NULL, HFILL }},
8591 { &hf_ndps_num_services,
8592 { "Number of Services", "ndps.num_services",
8593 FT_UINT32, BASE_DEC, NULL, 0x0,
8594 NULL, HFILL }},
8596 { &hf_ndps_service_type,
8597 { "NDPS Service Type", "ndps.service_type",
8598 FT_UINT32, BASE_HEX, VALS(ndps_service_type_enum), 0x0,
8599 NULL, HFILL }},
8601 { &hf_ndps_service_enabled,
8602 { "Service Enabled?", "ndps.service_enabled",
8603 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8604 NULL, HFILL }},
8606 { &hf_ndps_method_name,
8607 { "Method Name", "ndps.method_name",
8608 FT_STRING, BASE_NONE, NULL, 0x0,
8609 NULL, HFILL }},
8611 { &hf_ndps_method_ver,
8612 { "Method Version", "ndps.method_ver",
8613 FT_STRING, BASE_NONE, NULL, 0x0,
8614 NULL, HFILL }},
8616 { &hf_ndps_file_name,
8617 { "File Name", "ndps.file_name",
8618 FT_STRING, BASE_NONE, NULL, 0x0,
8619 NULL, HFILL }},
8621 { &hf_ndps_admin_submit,
8622 { "Admin Submit Flag?", "ndps.admin_submit_flag",
8623 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8624 NULL, HFILL }},
8626 { &hf_ndps_oid,
8627 { "Object ID", "ndps.oid",
8628 FT_BYTES, BASE_NONE, NULL, 0x0,
8629 NULL, HFILL }},
8631 { &hf_ndps_object_op,
8632 { "Operation", "ndps.object_op",
8633 FT_UINT32, BASE_HEX, VALS(ndps_object_op_enum), 0x0,
8634 NULL, HFILL }},
8636 { &hf_answer_time,
8637 { "Answer Time", "ndps.answer_time",
8638 FT_UINT32, BASE_DEC, NULL, 0x0,
8639 NULL, HFILL }},
8641 { &hf_oid_asn1_type,
8642 { "ASN.1 Type", "ndps.asn1_type",
8643 FT_UINT16, BASE_DEC, NULL, 0x0,
8644 NULL, HFILL }},
8646 { &hf_ndps_item_ptr,
8647 { "Item Pointer", "ndps.item_ptr",
8648 FT_BYTES, BASE_NONE, NULL, 0x0,
8649 NULL, HFILL }},
8651 { &hf_ndps_len,
8652 { "Length", "ndps.len",
8653 FT_UINT32, BASE_DEC, NULL, 0x0,
8654 NULL, HFILL }},
8656 { &hf_ndps_limit_enc,
8657 { "Limit Encountered", "ndps.limit_enc",
8658 FT_UINT32, BASE_HEX, VALS(ndps_limit_enc_enum), 0x0,
8659 NULL, HFILL }},
8661 { &hf_ndps_delivery_add_count,
8662 { "Number of Delivery Addresses", "ndps.delivery_add_count",
8663 FT_UINT32, BASE_DEC, NULL, 0x0,
8664 NULL, HFILL }},
8666 { &hf_ndps_delivery_add_type,
8667 { "Delivery Address Type", "ndps.delivery_add_type",
8668 FT_UINT32, BASE_HEX, VALS(ndps_delivery_add_enum), 0x0,
8669 NULL, HFILL }},
8671 { &hf_ndps_criterion_type,
8672 { "Criterion Type", "ndps.criterion_type",
8673 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_attribute_enum_ext, 0x0,
8674 NULL, HFILL }},
8676 { &hf_ndps_num_ignored_attributes,
8677 { "Number of Ignored Attributes", "ndps.num_ignored_attributes",
8678 FT_UINT32, BASE_DEC, NULL, 0x0,
8679 NULL, HFILL }},
8681 { &hf_ndps_ignored_type,
8682 { "Ignored Type", "ndps.ignored_type",
8683 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_attribute_enum_ext, 0x0,
8684 NULL, HFILL }},
8686 { &hf_ndps_num_resources,
8687 { "Number of Resources", "ndps.num_resources",
8688 FT_UINT32, BASE_DEC, NULL, 0x0,
8689 NULL, HFILL }},
8691 { &hf_ndps_resource_type,
8692 { "Resource Type", "ndps.resource_type",
8693 FT_UINT32, BASE_HEX, VALS(ndps_resource_enum), 0x0,
8694 NULL, HFILL }},
8696 { &hf_ndps_identifier_type,
8697 { "Identifier Type", "ndps.identifier_type",
8698 FT_UINT32, BASE_HEX, VALS(ndps_identifier_enum), 0x0,
8699 NULL, HFILL }},
8701 { &hf_ndps_page_flag,
8702 { "Page Flag", "ndps.page_flag",
8703 FT_UINT32, BASE_HEX, NULL, 0x0,
8704 NULL, HFILL }},
8706 { &hf_ndps_media_type,
8707 { "Media Type", "ndps.media_type",
8708 FT_UINT32, BASE_HEX, VALS(ndps_media_enum), 0x0,
8709 NULL, HFILL }},
8711 { &hf_ndps_page_size,
8712 { "Page Size", "ndps.page_size",
8713 FT_UINT32, BASE_HEX, VALS(ndps_page_size_enum), 0x0,
8714 NULL, HFILL }},
8716 { &hf_ndps_direction,
8717 { "Direction", "ndps.direction",
8718 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_pres_direction_enum_ext, 0x0,
8719 NULL, HFILL }},
8721 { &hf_ndps_page_order,
8722 { "Page Order", "ndps.page_order",
8723 FT_UINT32, BASE_HEX, VALS(ndps_page_order_enum), 0x0,
8724 NULL, HFILL }},
8726 { &hf_ndps_medium_size,
8727 { "Medium Size", "ndps.medium_size",
8728 FT_UINT32, BASE_HEX, VALS(ndps_medium_size_enum), 0x0,
8729 NULL, HFILL }},
8731 { &hf_ndps_long_edge_feeds,
8732 { "Long Edge Feeds?", "ndps.long_edge_feeds",
8733 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8734 NULL, HFILL }},
8736 { &hf_ndps_inc_across_feed,
8737 { "Increment Across Feed", "ndps.inc_across_feed",
8738 FT_BYTES, BASE_NONE, NULL, 0x0,
8739 NULL, HFILL }},
8741 { &hf_ndps_size_inc_in_feed,
8742 { "Size Increment in Feed", "ndps.size_inc_in_feed",
8743 FT_BYTES, BASE_NONE, NULL, 0x0,
8744 NULL, HFILL }},
8746 { &hf_ndps_page_orientation,
8747 { "Page Orientation", "ndps.page_orientation",
8748 FT_UINT32, BASE_HEX, VALS(ndps_page_orientation_enum), 0x0,
8749 NULL, HFILL }},
8751 { &hf_ndps_numbers_up,
8752 { "Numbers Up", "ndps.numbers_up",
8753 FT_UINT32, BASE_HEX, VALS(ndps_numbers_up_enum), 0x0,
8754 NULL, HFILL }},
8756 { &hf_ndps_xdimension,
8757 { "X Dimension", "ndps.xdimension",
8758 FT_UINT32, BASE_HEX, NULL, 0x0,
8759 NULL, HFILL }},
8761 { &hf_ndps_ydimension,
8762 { "Y Dimension", "ndps.ydimension",
8763 FT_UINT32, BASE_HEX, NULL, 0x0,
8764 NULL, HFILL }},
8766 { &hf_ndps_state_severity,
8767 { "State Severity", "ndps.state_severity",
8768 FT_UINT32, BASE_HEX, VALS(ndps_state_severity_enum), 0x0,
8769 NULL, HFILL }},
8771 { &hf_ndps_training,
8772 { "Training", "ndps.training",
8773 FT_UINT32, BASE_HEX, VALS(ndps_training_enum), 0x0,
8774 NULL, HFILL }},
8776 { &hf_ndps_colorant_set,
8777 { "Colorant Set", "ndps.colorant_set",
8778 FT_UINT32, BASE_HEX, VALS(ndps_colorant_set_enum), 0x0,
8779 NULL, HFILL }},
8781 { &hf_ndps_card_enum_time,
8782 { "Cardinal, Enum, or Time", "ndps.card_enum_time",
8783 FT_UINT32, BASE_HEX, VALS(ndps_card_enum_time_enum), 0x0,
8784 NULL, HFILL }},
8786 { &hf_ndps_attrs_arg,
8787 { "List Attribute Operation", "ndps.attrs_arg",
8788 FT_UINT32, BASE_HEX, VALS(ndps_attrs_arg_enum), 0x0,
8789 NULL, HFILL }},
8791 { &hf_ndps_context_len,
8792 { "Context Length", "ndps.context_len",
8793 FT_UINT32, BASE_DEC, NULL, 0x0,
8794 NULL, HFILL }},
8796 { &hf_ndps_context,
8797 { "Context", "ndps.context",
8798 FT_BYTES, BASE_NONE, NULL, 0x0,
8799 NULL, HFILL }},
8801 { &hf_ndps_filter,
8802 { "Filter Type", "ndps.filter",
8803 FT_UINT32, BASE_HEX, VALS(ndps_filter_enum), 0x0,
8804 NULL, HFILL }},
8806 #if 0
8807 { &hf_ndps_item_filter,
8808 { "Filter Item Operation", "ndps.filter_item",
8809 FT_UINT32, BASE_HEX, VALS(ndps_filter_item_enum), 0x0,
8810 NULL, HFILL }},
8811 #endif
8813 #if 0
8814 { &hf_ndps_substring_match,
8815 { "Substring Match", "ndps.substring_match",
8816 FT_UINT32, BASE_HEX, VALS(ndps_match_criteria_enum), 0x0,
8817 NULL, HFILL }},
8818 #endif
8820 { &hf_ndps_time_limit,
8821 { "Time Limit", "ndps.time_limit",
8822 FT_UINT32, BASE_DEC, NULL, 0x0,
8823 NULL, HFILL }},
8825 { &hf_ndps_count_limit,
8826 { "Count Limit", "ndps.count_limit",
8827 FT_UINT32, BASE_DEC, NULL, 0x0,
8828 NULL, HFILL }},
8830 { &hf_ndps_operator,
8831 { "Operator Type", "ndps.operator",
8832 FT_UINT32, BASE_DEC, VALS(ndps_operator_enum), 0x0,
8833 NULL, HFILL }},
8835 { &hf_ndps_password,
8836 { "Password", "ndps.password",
8837 FT_BYTES, BASE_NONE, NULL, 0x0,
8838 NULL, HFILL }},
8840 { &hf_ndps_retrieve_restrictions,
8841 { "Retrieve Restrictions", "ndps.ret_restrict",
8842 FT_UINT32, BASE_DEC, NULL, 0x0,
8843 NULL, HFILL }},
8845 { &hf_ndps_bind_security_option_count,
8846 { "Number of Bind Security Options", "ndps.bind_security_count",
8847 FT_UINT32, BASE_DEC, NULL, 0x0,
8848 NULL, HFILL }},
8850 { &hf_bind_security,
8851 { "Bind Security Options", "ndps.bind_security",
8852 FT_UINT32, BASE_DEC, NULL, 0x0,
8853 NULL, HFILL }},
8855 { &hf_ndps_max_items,
8856 { "Maximum Items in List", "ndps.max_items",
8857 FT_UINT32, BASE_DEC, NULL, 0x0,
8858 NULL, HFILL }},
8860 { &hf_ndps_status_flags,
8861 { "Status Flag", "ndps.status_flags",
8862 FT_UINT32, BASE_DEC, NULL, 0x0,
8863 NULL, HFILL }},
8865 { &hf_ndps_resource_list_type,
8866 { "Resource Type", "ndps.resource_type",
8867 FT_UINT32, BASE_DEC | BASE_EXT_STRING, &ndps_resource_type_enum_ext, 0x0,
8868 NULL, HFILL }},
8870 { &hf_os_count,
8871 { "Number of OSes", "ndps.os_count",
8872 FT_UINT32, BASE_DEC, NULL, 0x0,
8873 NULL, HFILL }},
8875 { &hf_os_type,
8876 { "OS Type", "ndps.os_type",
8877 FT_UINT32, BASE_DEC | BASE_EXT_STRING, &ndps_os_type_enum_ext, 0x0,
8878 NULL, HFILL }},
8880 { &hf_ndps_printer_type_count,
8881 { "Number of Printer Types", "ndps.printer_type_count",
8882 FT_UINT32, BASE_DEC, NULL, 0x0,
8883 NULL, HFILL }},
8885 { &hf_ndps_printer_type,
8886 { "Printer Type", "ndps.prn_type",
8887 FT_STRING, BASE_NONE, NULL, 0x0,
8888 NULL, HFILL }},
8890 { &hf_ndps_printer_manuf,
8891 { "Printer Manufacturer", "ndps.prn_manuf",
8892 FT_STRING, BASE_NONE, NULL, 0x0,
8893 NULL, HFILL }},
8895 { &hf_ndps_inf_file_name,
8896 { "INF File Name", "ndps.inf_file_name",
8897 FT_STRING, BASE_NONE, NULL, 0x0,
8898 NULL, HFILL }},
8900 { &hf_ndps_vendor_dir,
8901 { "Vendor Directory", "ndps.vendor_dir",
8902 FT_STRING, BASE_NONE, NULL, 0x0,
8903 NULL, HFILL }},
8905 { &hf_banner_type,
8906 { "Banner Type", "ndps.banner_type",
8907 FT_UINT32, BASE_DEC, VALS(ndps_banner_type_enum), 0x0,
8908 NULL, HFILL }},
8910 { &hf_font_type,
8911 { "Font Type", "ndps.font_type",
8912 FT_UINT32, BASE_DEC, VALS(ndps_font_type_enum), 0x0,
8913 NULL, HFILL }},
8915 { &hf_printer_id,
8916 { "Printer ID", "ndps.printer_id",
8917 FT_BYTES, BASE_NONE, NULL, 0x0,
8918 NULL, HFILL }},
8920 { &hf_ndps_font_name,
8921 { "Font Name", "ndps.font_name",
8922 FT_STRING, BASE_NONE, NULL, 0x0,
8923 NULL, HFILL }},
8925 { &hf_ndps_return_code,
8926 { "Return Code", "ndps.ret_code",
8927 FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_error_types_ext, 0x0,
8928 NULL, HFILL }},
8930 #if 0
8931 { &hf_ndps_banner_count,
8932 { "Number of Banners", "ndps.banner_count",
8933 FT_UINT32, BASE_DEC, NULL, 0x0,
8934 NULL, HFILL }},
8935 #endif
8937 { &hf_ndps_banner_name,
8938 { "Banner Name", "ndps.banner_name",
8939 FT_STRING, BASE_NONE, NULL, 0x0,
8940 NULL, HFILL }},
8942 { &hf_ndps_font_type_count,
8943 { "Number of Font Types", "ndps.font_type_count",
8944 FT_UINT32, BASE_DEC, NULL, 0x0,
8945 NULL, HFILL }},
8947 { &hf_font_type_name,
8948 { "Font Type Name", "ndps.font_type_name",
8949 FT_STRING, BASE_NONE, NULL, 0x0,
8950 NULL, HFILL }},
8952 { &hf_ndps_font_file_count,
8953 { "Number of Font Files", "ndps.font_file_count",
8954 FT_UINT32, BASE_DEC, NULL, 0x0,
8955 NULL, HFILL }},
8957 { &hf_font_file_name,
8958 { "Font File Name", "ndps.font_file_name",
8959 FT_STRING, BASE_NONE, NULL, 0x0,
8960 NULL, HFILL }},
8962 { &hf_ndps_printer_def_count,
8963 { "Number of Printer Definitions", "ndps.printer_def_count",
8964 FT_UINT32, BASE_DEC, NULL, 0x0,
8965 NULL, HFILL }},
8967 { &hf_ndps_prn_file_name,
8968 { "Printer File Name", "ndps.print_file_name",
8969 FT_STRING, BASE_NONE, NULL, 0x0,
8970 NULL, HFILL }},
8972 { &hf_ndps_prn_dir_name,
8973 { "Printer Directory Name", "ndps.print_dir_name",
8974 FT_STRING, BASE_NONE, NULL, 0x0,
8975 NULL, HFILL }},
8977 { &hf_ndps_def_file_name,
8978 { "Printer Definition Name", "ndps.print_def_name",
8979 FT_STRING, BASE_NONE, NULL, 0x0,
8980 NULL, HFILL }},
8982 { &hf_ndps_num_win31_keys,
8983 { "Number of Windows 3.1 Keys", "ndps.num_win31_keys",
8984 FT_UINT32, BASE_DEC, NULL, 0x0,
8985 NULL, HFILL }},
8987 { &hf_ndps_num_win95_keys,
8988 { "Number of Windows 95 Keys", "ndps.num_win95_keys",
8989 FT_UINT32, BASE_DEC, NULL, 0x0,
8990 NULL, HFILL }},
8992 { &hf_ndps_num_windows_keys,
8993 { "Number of Windows Keys", "ndps.num_windows_keys",
8994 FT_UINT32, BASE_DEC, NULL, 0x0,
8995 NULL, HFILL }},
8997 { &hf_ndps_windows_key,
8998 { "Windows Key", "ndps.windows_key",
8999 FT_STRING, BASE_NONE, NULL, 0x0,
9000 NULL, HFILL }},
9002 { &hf_archive_type,
9003 { "Archive Type", "ndps.archive_type",
9004 FT_UINT32, BASE_DEC, VALS(ndps_archive_enum), 0x0,
9005 NULL, HFILL }},
9007 { &hf_archive_file_size,
9008 { "Archive File Size", "ndps.archive_size",
9009 FT_UINT32, BASE_DEC, NULL, 0x0,
9010 NULL, HFILL }},
9012 { &hf_ndps_segment_overlap,
9013 { "Segment overlap", "ndps.segment.overlap", FT_BOOLEAN, BASE_NONE,
9014 NULL, 0x0, "Segment overlaps with other segments", HFILL }},
9016 { &hf_ndps_segment_overlap_conflict,
9017 { "Conflicting data in segment overlap", "ndps.segment.overlap.conflict",
9018 FT_BOOLEAN, BASE_NONE,
9019 NULL, 0x0, "Overlapping segments contained conflicting data", HFILL }},
9021 { &hf_ndps_segment_multiple_tails,
9022 { "Multiple tail segments found", "ndps.segment.multipletails",
9023 FT_BOOLEAN, BASE_NONE,
9024 NULL, 0x0, "Several tails were found when desegmenting the packet", HFILL }},
9026 { &hf_ndps_segment_too_long_segment,
9027 { "Segment too long", "ndps.segment.toolongsegment", FT_BOOLEAN, BASE_NONE,
9028 NULL, 0x0, "Segment contained data past end of packet", HFILL }},
9030 { &hf_ndps_segment_error,
9031 {"Desegmentation error", "ndps.segment.error", FT_FRAMENUM, BASE_NONE,
9032 NULL, 0x0, "Desegmentation error due to illegal segments", HFILL }},
9034 { &hf_ndps_segment_count,
9035 {"Segment count", "ndps.segment.count", FT_UINT32, BASE_DEC,
9036 NULL, 0x0, NULL, HFILL }},
9038 { &hf_ndps_reassembled_length,
9039 {"Reassembled NDPS length", "ndps.reassembled.length", FT_UINT32, BASE_DEC,
9040 NULL, 0x0, "The total length of the reassembled payload", HFILL }},
9042 { &hf_ndps_segment,
9043 { "NDPS Fragment", "ndps.fragment", FT_FRAMENUM, BASE_NONE,
9044 NULL, 0x0, NULL, HFILL }},
9046 { &hf_ndps_segments,
9047 { "NDPS Fragments", "ndps.fragments", FT_NONE, BASE_NONE,
9048 NULL, 0x0, NULL, HFILL }},
9050 { &hf_ndps_data,
9051 { "Data", "ndps.data", FT_BYTES, BASE_NONE,
9052 NULL, 0x0, NULL, HFILL }},
9054 { &hf_get_status_flag,
9055 { "Get Status Flag", "ndps.get_status_flags",
9056 FT_UINT32, BASE_DEC, NULL, 0x0,
9057 NULL, HFILL }},
9059 { &hf_res_type,
9060 { "Resource Type", "ndps.res_type",
9061 FT_UINT32, BASE_DEC, VALS(ndps_res_type_enum), 0x0,
9062 NULL, HFILL }},
9064 { &hf_file_timestamp,
9065 { "File Time Stamp", "ndps.file_time_stamp",
9066 FT_UINT32, BASE_DEC, NULL, 0x0,
9067 NULL, HFILL }},
9069 { &hf_print_arg,
9070 { "Print Type", "ndps.print_arg",
9071 FT_UINT32, BASE_DEC, VALS(ndps_print_arg_enum), 0x0,
9072 NULL, HFILL }},
9074 { &hf_sub_complete,
9075 { "Submission Complete?", "ndps.sub_complete", FT_BOOLEAN, BASE_NONE,
9076 NULL, 0x0, NULL, HFILL }},
9078 { &hf_doc_content,
9079 { "Document Content", "ndps.doc_content",
9080 FT_UINT32, BASE_DEC, VALS(ndps_doc_content_enum), 0x0,
9081 NULL, HFILL }},
9083 #if 0
9084 { &hf_ndps_doc_name,
9085 { "Document Name", "ndps.doc_name",
9086 FT_STRING, BASE_NONE, NULL, 0x0,
9087 NULL, HFILL }},
9088 #endif
9090 { &hf_local_id,
9091 { "Local ID", "ndps.local_id",
9092 FT_UINT32, BASE_DEC, NULL, 0x0,
9093 NULL, HFILL }},
9095 { &hf_ndps_included_doc_len,
9096 { "Included Document Length", "ndps.included_doc_len",
9097 FT_UINT32, BASE_DEC, NULL, 0x0,
9098 NULL, HFILL }},
9100 { &hf_ndps_included_doc,
9101 { "Included Document", "ndps.included_doc",
9102 FT_BYTES, BASE_NONE, NULL, 0x0,
9103 NULL, HFILL }},
9105 { &hf_ndps_ref_name,
9106 { "Referenced Document Name", "ndps.ref_doc_name",
9107 FT_STRING, BASE_NONE, NULL, 0x0,
9108 NULL, HFILL }},
9110 { &hf_interrupt_job_type,
9111 { "Interrupt Job Identifier", "ndps.interrupt_job_type",
9112 FT_UINT32, BASE_DEC, VALS(ndps_interrupt_job_enum), 0x0,
9113 NULL, HFILL }},
9115 { &hf_pause_job_type,
9116 { "Pause Job Identifier", "ndps.pause_job_type",
9117 FT_UINT32, BASE_DEC, VALS(ndps_pause_job_enum), 0x0,
9118 NULL, HFILL }},
9120 { &hf_ndps_force,
9121 { "Force?", "ndps.force",
9122 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9123 NULL, HFILL }},
9125 { &hf_resubmit_op_type,
9126 { "Resubmit Operation Type", "ndps.resubmit_op_type",
9127 FT_UINT32, BASE_DEC, VALS(ndps_resubmit_op_enum), 0x0,
9128 NULL, HFILL }},
9130 { &hf_shutdown_type,
9131 { "Shutdown Type", "ndps.shutdown_type",
9132 FT_UINT32, BASE_DEC, VALS(ndps_shutdown_enum), 0x0,
9133 NULL, HFILL }},
9135 { &hf_ndps_supplier_flag,
9136 { "Supplier Data?", "ndps.supplier_flag",
9137 FT_UINT32, BASE_HEX, NULL, 0x0,
9138 NULL, HFILL }},
9140 { &hf_ndps_language_flag,
9141 { "Language Data?", "ndps.language_flag",
9142 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9143 NULL, HFILL }},
9145 { &hf_ndps_method_flag,
9146 { "Method Data?", "ndps.method_flag",
9147 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9148 NULL, HFILL }},
9150 { &hf_ndps_delivery_address_flag,
9151 { "Delivery Address Data?", "ndps.delivery_flag",
9152 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9153 NULL, HFILL }},
9155 { &hf_ndps_list_profiles_type,
9156 { "List Profiles Type", "ndps.list_profiles_type",
9157 FT_UINT32, BASE_HEX, VALS(ndps_attrs_arg_enum), 0x0,
9158 NULL, HFILL }},
9160 { &hf_ndps_list_profiles_choice_type,
9161 { "List Profiles Choice Type", "ndps.list_profiles_choice_type",
9162 FT_UINT32, BASE_HEX, VALS(ndps_list_profiles_choice_enum), 0x0,
9163 NULL, HFILL }},
9165 { &hf_ndps_list_profiles_result_type,
9166 { "List Profiles Result Type", "ndps.list_profiles_result_type",
9167 FT_UINT32, BASE_HEX, VALS(ndps_list_profiles_result_enum), 0x0,
9168 NULL, HFILL }},
9170 { &hf_ndps_integer_type_flag,
9171 { "Integer Type Flag", "ndps.integer_type_flag",
9172 FT_UINT32, BASE_HEX, NULL, 0x0,
9173 NULL, HFILL }},
9175 { &hf_ndps_integer_type_value,
9176 { "Integer Type Value", "ndps.integer_type_value",
9177 FT_UINT32, BASE_HEX, NULL, 0x0,
9178 NULL, HFILL }},
9180 { &hf_ndps_continuation_option,
9181 { "Continuation Option", "ndps.continuation_option",
9182 FT_BYTES, BASE_NONE, NULL, 0x0,
9183 NULL, HFILL }},
9185 { &hf_ndps_ds_info_type,
9186 { "DS Info Type", "ndps.ds_info_type",
9187 FT_UINT32, BASE_HEX, VALS(ndps_ds_info_enum), 0x0,
9188 NULL, HFILL }},
9190 { &hf_ndps_guid,
9191 { "GUID", "ndps.guid",
9192 FT_BYTES, BASE_NONE, NULL, 0x0,
9193 NULL, HFILL }},
9195 { &hf_ndps_list_services_type,
9196 { "Services Type", "ndps.list_services_type",
9197 FT_UINT32, BASE_HEX, VALS(ndps_list_services_enum), 0x0,
9198 NULL, HFILL }},
9200 { &hf_ndps_item_bytes,
9201 { "Item Ptr", "ndps.item_bytes",
9202 FT_BYTES, BASE_NONE, NULL, 0x0,
9203 NULL, HFILL }},
9205 { &hf_ndps_certified,
9206 { "Certified", "ndps.certified",
9207 FT_BYTES, BASE_NONE, NULL, 0x0,
9208 NULL, HFILL }},
9210 { &hf_ndps_attribute_set,
9211 { "Attribute Set", "ndps.attribute_set",
9212 FT_BYTES, BASE_NONE, NULL, 0x0,
9213 NULL, HFILL }},
9215 { &hf_ndps_data_item_type,
9216 { "Item Type", "ndps.data_item_type",
9217 FT_UINT32, BASE_HEX, VALS(ndps_data_item_enum), 0x0,
9218 NULL, HFILL }},
9220 { &hf_info_int,
9221 { "Integer Value", "ndps.info_int",
9222 FT_UINT8, BASE_HEX, NULL, 0x0,
9223 NULL, HFILL }},
9225 { &hf_info_int16,
9226 { "16 Bit Integer Value", "ndps.info_int16",
9227 FT_UINT16, BASE_HEX, NULL, 0x0,
9228 NULL, HFILL }},
9230 { &hf_info_int32,
9231 { "32 Bit Integer Value", "ndps.info_int32",
9232 FT_UINT32, BASE_HEX, NULL, 0x0,
9233 NULL, HFILL }},
9235 { &hf_info_boolean,
9236 { "Boolean Value", "ndps.info_boolean",
9237 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9238 NULL, HFILL }},
9240 { &hf_info_string,
9241 { "String Value", "ndps.info_string",
9242 FT_STRING, BASE_NONE, NULL, 0x0,
9243 NULL, HFILL }},
9245 #if 0
9246 { &hf_info_bytes,
9247 { "Byte Value", "ndps.info_bytes",
9248 FT_BYTES, BASE_NONE, NULL, 0x0,
9249 NULL, HFILL }},
9250 #endif
9252 { &hf_ndps_list_local_servers_type,
9253 { "Server Type", "ndps.list_local_server_type",
9254 FT_UINT32, BASE_HEX, VALS(ndps_list_local_servers_enum), 0x0,
9255 NULL, HFILL }},
9257 { &hf_ndps_registry_name,
9258 { "Registry Name", "ndps.registry_name",
9259 FT_STRING, BASE_NONE, NULL, 0x0,
9260 NULL, HFILL }},
9262 { &hf_ndps_client_server_type,
9263 { "Client/Server Type", "ndps.client_server_type",
9264 FT_UINT32, BASE_HEX, VALS(ndps_client_server_enum), 0x0,
9265 NULL, HFILL }},
9267 { &hf_ndps_session_type,
9268 { "Session Type", "ndps.session_type",
9269 FT_UINT32, BASE_HEX, VALS(ndps_session_type_enum), 0x0,
9270 NULL, HFILL }},
9272 { &hf_time,
9273 { "Time", "ndps.time",
9274 FT_UINT32, BASE_DEC, NULL, 0x0,
9275 NULL, HFILL }},
9277 { &hf_ndps_supplier_name,
9278 { "Supplier Name", "ndps.supplier_name",
9279 FT_STRING, BASE_NONE, NULL, 0x0,
9280 NULL, HFILL }},
9282 { &hf_ndps_message,
9283 { "Message", "ndps.message",
9284 FT_STRING, BASE_NONE, NULL, 0x0,
9285 NULL, HFILL }},
9287 { &hf_ndps_delivery_method_count,
9288 { "Number of Delivery Methods", "ndps.delivery_method_count",
9289 FT_UINT32, BASE_DEC, NULL, 0x0,
9290 NULL, HFILL }},
9292 { &hf_delivery_method_type,
9293 { "Delivery Method Type", "ndps.delivery_method_type",
9294 FT_UINT32, BASE_HEX, VALS(ndps_delivery_method_enum), 0x0,
9295 NULL, HFILL }},
9297 { &hf_ndps_get_session_type,
9298 { "Session Type", "ndps.get_session_type",
9299 FT_UINT32, BASE_HEX, VALS(ndps_get_session_type_enum), 0x0,
9300 NULL, HFILL }},
9302 { &hf_packet_count,
9303 { "Packet Count", "ndps.packet_count",
9304 FT_UINT32, BASE_DEC, NULL, 0x0,
9305 NULL, HFILL }},
9307 { &hf_last_packet_flag,
9308 { "Last Packet Flag", "ndps.last_packet_flag",
9309 FT_UINT32, BASE_DEC, NULL, 0x0,
9310 NULL, HFILL }},
9312 { &hf_ndps_get_resman_session_type,
9313 { "Session Type", "ndps.get_resman_session_type",
9314 FT_UINT32, BASE_HEX, VALS(ndps_get_resman_session_type_enum), 0x0,
9315 NULL, HFILL }},
9317 { &hf_problem_type,
9318 { "Problem Type", "ndps.problem_type",
9319 FT_UINT32, BASE_HEX, VALS(problem_type_enum), 0x0,
9320 NULL, HFILL }},
9322 { &hf_ndps_num_values,
9323 { "Number of Values", "ndps.num_values",
9324 FT_UINT32, BASE_DEC, NULL, 0x0,
9325 NULL, HFILL }},
9327 { &hf_ndps_object_ids_7,
9328 { "Object ID Definition", "ndps.objectid_def7",
9329 FT_UINT32, BASE_DEC, NULL,
9330 0x0, NULL, HFILL }},
9332 { &hf_ndps_object_ids_8,
9333 { "Object ID Definition", "ndps.objectid_def8",
9334 FT_UINT32, BASE_DEC, NULL,
9335 0x0, NULL, HFILL }},
9337 { &hf_ndps_object_ids_9,
9338 { "Object ID Definition", "ndps.objectid_def9",
9339 FT_UINT32, BASE_DEC, NULL,
9340 0x0, NULL, HFILL }},
9342 { &hf_ndps_object_ids_10,
9343 { "Object ID Definition", "ndps.objectid_def10",
9344 FT_UINT32, BASE_DEC, NULL,
9345 0x0, NULL, HFILL }},
9347 { &hf_ndps_object_ids_11,
9348 { "Object ID Definition", "ndps.objectid_def11",
9349 FT_UINT32, BASE_DEC, NULL,
9350 0x0, NULL, HFILL }},
9352 { &hf_ndps_object_ids_12,
9353 { "Object ID Definition", "ndps.objectid_def12",
9354 FT_UINT32, BASE_DEC, NULL,
9355 0x0, NULL, HFILL }},
9357 { &hf_ndps_object_ids_13,
9358 { "Object ID Definition", "ndps.objectid_def13",
9359 FT_UINT32, BASE_DEC, NULL,
9360 0x0, NULL, HFILL }},
9362 { &hf_ndps_object_ids_14,
9363 { "Object ID Definition", "ndps.objectid_def14",
9364 FT_UINT32, BASE_DEC, NULL,
9365 0x0, NULL, HFILL }},
9367 { &hf_ndps_object_ids_15,
9368 { "Object ID Definition", "ndps.objectid_def15",
9369 FT_UINT32, BASE_DEC, NULL,
9370 0x0, NULL, HFILL }},
9372 { &hf_ndps_object_ids_16,
9373 { "Object ID Definition", "ndps.objectid_def16",
9374 FT_UINT32, BASE_DEC, NULL,
9375 0x0, NULL, HFILL }},
9377 #if 0
9378 { &hf_ndps_attribute_time,
9379 { "Time", "ndps.attribute_time",
9380 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
9381 NULL, HFILL }},
9382 #endif
9384 { &hf_print_security,
9385 { "Printer Security", "ndps.print_security",
9386 FT_UINT32, BASE_HEX, VALS(ndps_print_security), 0x0,
9387 NULL, HFILL }},
9389 { &hf_notify_time_interval,
9390 { "Notify Time Interval", "ndps.notify_time_interval",
9391 FT_UINT32, BASE_HEX, NULL, 0x0,
9392 NULL, HFILL }},
9394 { &hf_notify_sequence_number,
9395 { "Notify Sequence Number", "ndps.notify_seq_number",
9396 FT_UINT32, BASE_HEX, NULL, 0x0,
9397 NULL, HFILL }},
9399 { &hf_notify_lease_exp_time,
9400 { "Notify Lease Expiration Time", "ndps.notify_lease_exp_time",
9401 FT_UINT32, BASE_HEX, NULL, 0x0,
9402 NULL, HFILL }},
9404 { &hf_notify_printer_uri,
9405 { "Notify Printer URI", "ndps.notify_printer_uri",
9406 FT_STRING, BASE_NONE, NULL, 0x0,
9407 NULL, HFILL }},
9409 { &hf_level,
9410 { "Level", "ndps.level",
9411 FT_UINT32, BASE_HEX, NULL, 0x0,
9412 NULL, HFILL }},
9414 { &hf_interval,
9415 { "Interval", "ndps.interval",
9416 FT_UINT32, BASE_HEX, NULL, 0x0,
9417 NULL, HFILL }},
9420 static int *ett[] = {
9421 &ett_ndps,
9422 &ett_ndps_segments,
9423 &ett_ndps_segment,
9426 static ei_register_info ei[] = {
9427 { &ei_ndps_problem_type, { "ndps.problem_type.expert", PI_RESPONSE_CODE, PI_NOTE, "Fault", EXPFILL }},
9428 { &ei_ndps_return_code, { "ndps.return_code.expert", PI_RESPONSE_CODE, PI_NOTE, "Fault", EXPFILL }},
9429 { &ei_ndps_rpc_acc_stat, { "ndps.rpc_acc_stat.expert", PI_RESPONSE_CODE, PI_NOTE, "Fault", EXPFILL }},
9430 { &ei_ndps_truncated, { "ndps.truncated", PI_PROTOCOL, PI_WARN, "Truncated", EXPFILL }},
9433 module_t *ndps_module;
9434 expert_module_t* expert_ndps;
9436 proto_ndps = proto_register_protocol("Novell Distributed Print System", "NDPS", "ndps");
9437 proto_register_field_array(proto_ndps, hf_ndps, array_length(hf_ndps));
9438 proto_register_subtree_array(ett, array_length(ett));
9439 expert_ndps = expert_register_protocol(proto_ndps);
9440 expert_register_field_array(expert_ndps, ei, array_length(ei));
9442 ndps_handle = register_dissector("ndps.ipx", dissect_ndps_ipx, proto_ndps);
9443 ndps_tcp_handle = register_dissector("ndps.tcp", dissect_ndps_tcp, proto_ndps);
9445 ndps_module = prefs_register_protocol(proto_ndps, NULL);
9446 prefs_register_bool_preference(ndps_module, "desegment_tcp",
9447 "Reassemble NDPS messages spanning multiple TCP segments",
9448 "Whether the NDPS dissector should reassemble messages spanning multiple TCP segments."
9449 " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
9450 &ndps_desegment);
9451 prefs_register_bool_preference(ndps_module, "desegment_spx",
9452 "Reassemble fragmented NDPS messages spanning multiple SPX packets",
9453 "Whether the NDPS dissector should reassemble fragmented NDPS messages spanning multiple SPX packets",
9454 &ndps_defragment);
9455 prefs_register_bool_preference(ndps_module, "show_oid",
9456 "Display NDPS Details",
9457 "Whether or not the NDPS dissector should show object id's and other details",
9458 &ndps_show_oids);
9460 reassembly_table_register(&ndps_reassembly_table,
9461 &addresses_reassembly_table_functions);
9463 ndps_req_hash = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), ndps_hash, ndps_equal);
9466 void
9467 proto_reg_handoff_ndps(void)
9469 dissector_add_uint("spx.socket", SPX_SOCKET_PA, ndps_handle);
9470 dissector_add_uint("spx.socket", SPX_SOCKET_BROKER, ndps_handle);
9471 dissector_add_uint("spx.socket", SPX_SOCKET_SRS, ndps_handle);
9472 dissector_add_uint("spx.socket", SPX_SOCKET_ENS, ndps_handle);
9473 dissector_add_uint("spx.socket", SPX_SOCKET_RMS, ndps_handle);
9474 dissector_add_uint("spx.socket", SPX_SOCKET_NOTIFY_LISTENER, ndps_handle);
9475 dissector_add_uint_range_with_preference("tcp.port", TCP_PORT_RANGE, ndps_tcp_handle);
9479 * Editor modelines - https://www.wireshark.org/tools/modelines.html
9481 * Local variables:
9482 * c-basic-offset: 4
9483 * tab-width: 8
9484 * indent-tabs-mode: nil
9485 * End:
9487 * vi: set shiftwidth=4 tabstop=8 expandtab:
9488 * :indentSize=4:tabSize=8:noTabs=true: