2 * Routines for NetWare's NDPS
3 * Greg Morris <gmorris@novell.com>
4 * Copyright (c) Novell, Inc. 2002-2003
6 * $Id: packet-ndps.c,v 1.17 2003/04/09 08:51:18 guy Exp $
8 * Ethereal - Network traffic analyzer
9 * By Gerald Combs <gerald@ethereal.com>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33 #include <epan/packet.h>
35 #include "packet-ipx.h"
36 #include "packet-tcp.h"
37 #include <epan/conversation.h>
38 #include "packet-ndps.h"
39 #include "reassemble.h"
41 #define NDPS_PACKET_INIT_COUNT 200
43 /* Tables for reassembly of fragments. */
44 static GHashTable *ndps_fragment_table = NULL;
45 static GHashTable *ndps_reassembled_table = NULL;
47 /* desegmentation of ndps */
48 static gboolean ndps_defragment = TRUE;
49 static guint32 frag_number = 0;
50 static guint32 save_frag_length=0;
51 static guint32 save_frag_seq=0;
52 static gboolean ndps_fragmented = FALSE;
53 static gboolean more_fragment = FALSE;
54 static guint32 tid = 1;
56 static void dissect_ndps_request(tvbuff_t*, packet_info*, proto_tree*, guint32, guint32, int);
58 static void dissect_ndps_reply(tvbuff_t *, packet_info*, proto_tree*, int);
60 static int hf_ndps_segments = -1;
61 static int hf_ndps_segment = -1;
62 static int hf_ndps_segment_overlap = -1;
63 static int hf_ndps_segment_overlap_conflict = -1;
64 static int hf_ndps_segment_multiple_tails = -1;
65 static int hf_ndps_segment_too_long_segment = -1;
66 static int hf_ndps_segment_error = -1;
68 static gint ett_ndps_segments = -1;
69 static gint ett_ndps_segment = -1;
71 static int proto_ndps = -1;
72 static int hf_ndps_record_mark = -1;
73 static int hf_ndps_length = -1;
74 static int hf_ndps_xid = -1;
75 static int hf_ndps_packet_type = -1;
76 static int hf_ndps_rpc_version = -1;
77 static int hf_ndps_error = -1;
78 static int hf_ndps_items = -1;
79 static int hf_ndps_objects = -1;
80 static int hf_ndps_attributes = -1;
81 static int hf_ndps_sbuffer = -1;
82 static int hf_ndps_rbuffer = -1;
83 static int hf_ndps_user_name = -1;
84 static int hf_ndps_broker_name = -1;
85 static int hf_ndps_pa_name = -1;
86 static int hf_ndps_tree = -1;
87 static int hf_ndps_reqframe = -1;
88 static int hf_ndps_error_val = -1;
89 static int hf_ndps_ext_error = -1;
90 static int hf_ndps_object = -1;
91 static int hf_ndps_cred_type = -1;
92 static int hf_ndps_server_name = -1;
93 static int hf_ndps_connection = -1;
94 static int hf_ndps_auth_null = -1;
95 static int hf_ndps_rpc_accept = -1;
96 static int hf_ndps_rpc_acc_stat = -1;
97 static int hf_ndps_rpc_rej_stat = -1;
98 static int hf_ndps_rpc_acc_results = -1;
99 static int hf_ndps_problem_type = -1;
100 static int hf_security_problem_type = -1;
101 static int hf_service_problem_type = -1;
102 static int hf_access_problem_type = -1;
103 static int hf_printer_problem_type = -1;
104 static int hf_selection_problem_type = -1;
105 static int hf_doc_access_problem_type = -1;
106 static int hf_attribute_problem_type = -1;
107 static int hf_update_problem_type = -1;
108 static int hf_obj_id_type = -1;
109 static int hf_oid_struct_size = -1;
110 static int hf_object_name = -1;
111 static int hf_ndps_document_number = -1;
112 static int hf_ndps_nameorid = -1;
113 static int hf_local_object_name = -1;
114 static int hf_printer_name = -1;
115 static int hf_ndps_qualified_name = -1;
116 static int hf_ndps_item_count = -1;
117 static int hf_ndps_qualifier = -1;
118 static int hf_ndps_lib_error = -1;
119 static int hf_ndps_other_error = -1;
120 static int hf_ndps_other_error_2 = -1;
121 static int hf_ndps_session = -1;
122 static int hf_ndps_abort_flag = -1;
123 static int hf_obj_attribute_type = -1;
124 static int hf_ndps_attribute_value = -1;
125 static int hf_ndps_lower_range = -1;
126 static int hf_ndps_upper_range = -1;
127 static int hf_ndps_n64 = -1;
128 static int hf_ndps_lower_range_n64 = -1;
129 static int hf_ndps_upper_range_n64 = -1;
130 static int hf_ndps_attrib_boolean = -1;
131 static int hf_ndps_realization = -1;
132 static int hf_ndps_xdimension_n64 = -1;
133 static int hf_ndps_ydimension_n64 = -1;
134 static int hf_ndps_dim_value = -1;
135 static int hf_ndps_dim_flag = -1;
136 static int hf_ndps_xydim_value = -1;
137 static int hf_ndps_location_value = -1;
138 static int hf_ndps_xmin_n64 = -1;
139 static int hf_ndps_xmax_n64 = -1;
140 static int hf_ndps_ymin_n64 = -1;
141 static int hf_ndps_ymax_n64 = -1;
142 static int hf_ndps_edge_value = -1;
143 static int hf_ndps_cardinal_or_oid = -1;
144 static int hf_ndps_cardinal_name_or_oid = -1;
145 static int hf_ndps_integer_or_oid = -1;
146 static int hf_ndps_profile_id = -1;
147 static int hf_ndps_persistence = -1;
148 static int hf_ndps_language_id = -1;
149 static int hf_address_type = -1;
150 static int hf_ndps_address = -1;
151 static int hf_ndps_add_bytes = -1;
152 static int hf_ndps_event_type = -1;
153 static int hf_ndps_event_object_identifier = -1;
154 static int hf_ndps_octet_string = -1;
155 static int hf_ndps_scope = -1;
156 static int hf_address_len = -1;
157 static int hf_ndps_net = -1;
158 static int hf_ndps_node = -1;
159 static int hf_ndps_socket = -1;
160 static int hf_ndps_port = -1;
161 static int hf_ndps_ip = -1;
162 static int hf_ndps_server_type = -1;
163 static int hf_ndps_service_type = -1;
164 static int hf_ndps_service_enabled = -1;
165 static int hf_ndps_method_name = -1;
166 static int hf_ndps_method_ver = -1;
167 static int hf_ndps_file_name = -1;
168 static int hf_ndps_admin_submit = -1;
169 static int hf_ndps_oid = -1;
170 static int hf_ndps_object_op = -1;
171 static int hf_answer_time = -1;
172 static int hf_oid_asn1_type = -1;
173 static int hf_ndps_item_ptr = -1;
174 static int hf_ndps_len = -1;
175 static int hf_limit_enc = -1;
176 static int hf_ndps_qualified_name2 = -1;
177 static int hf_ndps_delivery_add_type = -1;
178 static int hf_ndps_criterion_type = -1;
179 static int hf_ndps_ignored_type = -1;
180 static int hf_ndps_resource_type = -1;
181 static int hf_ndps_identifier_type = -1;
182 static int hf_ndps_page_flag = -1;
183 static int hf_ndps_media_type = -1;
184 static int hf_ndps_doc_content = -1;
185 static int hf_ndps_page_size = -1;
186 static int hf_ndps_direction = -1;
187 static int hf_ndps_page_order = -1;
188 static int hf_ndps_medium_size = -1;
189 static int hf_ndps_long_edge_feeds = -1;
190 static int hf_ndps_inc_across_feed = -1;
191 static int hf_ndps_size_inc_in_feed = -1;
192 static int hf_ndps_page_orientation = -1;
193 static int hf_ndps_numbers_up = -1;
194 static int hf_ndps_xdimension = -1;
195 static int hf_ndps_ydimension = -1;
196 static int hf_ndps_state_severity = -1;
197 static int hf_ndps_training = -1;
198 static int hf_ndps_colorant_set = -1;
199 static int hf_ndps_card_enum_time = -1;
200 static int hf_ndps_attrs_arg = -1;
201 static int hf_ndps_context = -1;
202 static int hf_ndps_filter = -1;
203 static int hf_ndps_item_filter = -1;
204 static int hf_ndps_substring_match = -1;
205 static int hf_ndps_time_limit = -1;
206 static int hf_ndps_count_limit = -1;
207 static int hf_ndps_operator = -1;
208 static int hf_ndps_password = -1;
209 static int hf_ndps_retrieve_restrictions = -1;
210 static int hf_bind_security = -1;
211 static int hf_ndps_max_items = -1;
212 static int hf_ndps_status_flags = -1;
213 static int hf_ndps_resource_list_type = -1;
214 static int hf_os_type = -1;
215 static int hf_ndps_printer_type = -1;
216 static int hf_ndps_printer_manuf = -1;
217 static int hf_ndps_inf_file_name = -1;
218 static int hf_ndps_vendor_dir = -1;
219 static int hf_banner_type = -1;
220 static int hf_font_type = -1;
221 static int hf_printer_id = -1;
222 static int hf_ndps_font_name = -1;
223 static int hf_ndps_return_code = -1;
224 static int hf_ndps_banner_name = -1;
225 static int hf_font_type_name = -1;
226 static int hf_font_file_name = -1;
227 static int hf_ndps_prn_file_name = -1;
228 static int hf_ndps_prn_dir_name = -1;
229 static int hf_ndps_def_file_name = -1;
230 static int hf_ndps_win31_items = -1;
231 static int hf_ndps_win95_items = -1;
232 static int hf_ndps_windows_key = -1;
233 static int hf_archive_type = -1;
234 static int hf_archive_file_size = -1;
235 static int hf_ndps_data = -1;
236 static int hf_get_status_flag = -1;
237 static int hf_res_type = -1;
238 static int hf_file_timestamp = -1;
239 static int hf_sub_complete = -1;
240 static int hf_doc_content = -1;
241 static int hf_ndps_doc_name = -1;
242 static int hf_print_arg = -1;
243 static int hf_local_id = -1;
244 static int hf_ndps_included_doc = -1;
245 static int hf_ndps_ref_name = -1;
246 static int hf_interrupt_job_type = -1;
247 static int hf_pause_job_type = -1;
248 static int hf_ndps_force = -1;
249 static int hf_resubmit_op_type = -1;
250 static int hf_shutdown_type = -1;
251 static int hf_ndps_supplier_flag = -1;
252 static int hf_ndps_language_flag = -1;
253 static int hf_ndps_method_flag = -1;
254 static int hf_ndps_delivery_address_flag = -1;
255 static int hf_ndps_list_profiles_type = -1;
256 static int hf_ndps_list_profiles_choice_type = -1;
257 static int hf_ndps_list_profiles_result_type = -1;
258 static int hf_ndps_integer_type_flag = -1;
259 static int hf_ndps_integer_type_value = -1;
260 static int hf_ndps_continuation_option = -1;
261 static int hf_ndps_ds_info_type = -1;
262 static int hf_ndps_guid = -1;
263 static int hf_ndps_list_services_type = -1;
264 static int hf_ndps_item_bytes = -1;
265 static int hf_ndps_certified = -1;
266 static int hf_ndps_attribute_set = -1;
267 static int hf_ndps_data_item_type = -1;
268 static int hf_info_int = -1;
269 static int hf_info_int16 = -1;
270 static int hf_info_int32 = -1;
271 static int hf_info_boolean = -1;
272 static int hf_info_string = -1;
273 static int hf_info_bytes = -1;
274 static int hf_ndps_list_local_servers_type = -1;
275 static int hf_ndps_registry_name = -1;
276 static int hf_ndps_client_server_type = -1;
277 static int hf_ndps_session_type = -1;
278 static int hf_time = -1;
279 static int hf_ndps_supplier_name = -1;
280 static int hf_ndps_message = -1;
281 static int hf_delivery_method_type = -1;
282 static int hf_ndps_get_session_type = -1;
283 static int hf_packet_count = -1;
284 static int hf_last_packet_flag = -1;
285 static int hf_ndps_get_resman_session_type = -1;
286 static int hf_problem_type = -1;
288 static int hf_spx_ndps_program = -1;
289 static int hf_spx_ndps_version = -1;
290 static int hf_spx_ndps_func_print = -1;
291 static int hf_spx_ndps_func_registry = -1;
292 static int hf_spx_ndps_func_notify = -1;
293 static int hf_spx_ndps_func_resman = -1;
294 static int hf_spx_ndps_func_delivery = -1;
295 static int hf_spx_ndps_func_broker = -1;
297 static gint ett_ndps = -1;
298 static dissector_handle_t ndps_data_handle;
300 /* desegmentation of NDPS over TCP */
301 static gboolean ndps_desegment = TRUE;
303 static const value_string true_false[] = {
304 { 0x00000000, "Accept" },
305 { 0x00000001, "Deny" },
309 static const value_string ndps_limit_enc_enum[] = {
310 { 0x00000000, "Time" },
311 { 0x00000001, "Count" },
312 { 0x00000002, "Error" },
316 static const value_string problem_type_enum[] = {
317 { 0x00000000, "Standard" },
318 { 0x00000001, "Extended" },
322 static const value_string accept_stat[] = {
323 { 0x00000000, "Success" },
324 { 0x00000001, "Program Unavailable" },
325 { 0x00000002, "Program Mismatch" },
326 { 0x00000003, "Procedure Unavailable" },
327 { 0x00000004, "Garbage Arguments" },
328 { 0x00000005, "System Error" },
332 static const value_string reject_stat[] = {
333 { 0x00000000, "RPC Mismatch" },
334 { 0x00000001, "Authentication Error" },
338 static const value_string error_type_enum[] = {
339 { 0x00000000, "Security Error" },
340 { 0x00000001, "Service Error" },
341 { 0x00000002, "Access Error" },
342 { 0x00000003, "Printer Error" },
343 { 0x00000004, "Selection Error" },
344 { 0x00000005, "Document Access Error" },
345 { 0x00000006, "Attribute Error" },
346 { 0x00000007, "Update Error" },
350 static const value_string security_problem_enum[] = {
351 { 0x00000000, "Authentication" },
352 { 0x00000001, "Credentials" },
353 { 0x00000002, "Rights" },
354 { 0x00000003, "Invalid PAC" },
358 static const value_string service_problem_enum[] = {
359 { 0x00000000, "Sever Busy" },
360 { 0x00000001, "Server Unavailable" },
361 { 0x00000002, "Complex Operation" },
362 { 0x00000003, "Resource Limit" },
363 { 0x00000004, "Unclassified Server Error" },
364 { 0x00000005, "Too Many Items in List" },
365 { 0x00000006, "Resource not Available" },
366 { 0x00000007, "Cancel Document Support" },
367 { 0x00000008, "Modify Document Support" },
368 { 0x00000009, "Multiple Document Support" },
369 { 0x0000000a, "Parameter Valid Support" },
370 { 0x0000000b, "Invalid Checkpoint" },
371 { 0x0000000c, "Continuation Context" },
372 { 0x0000000d, "Pause Limit Exceeded" },
373 { 0x0000000e, "Unsupported Operation" },
374 { 0x0000000f, "Notify Service Error" },
375 { 0x00000010, "Accounting Service Error" },
379 static const value_string access_problem_enum[] = {
380 { 0x00000000, "Wrong Object Class" },
381 { 0x00000001, "Lack of Access Rights" },
382 { 0x00000002, "Can't Interrupt Job" },
383 { 0x00000003, "Wrong Object State" },
384 { 0x00000004, "Client Not Bound" },
385 { 0x00000005, "Not Available" },
386 { 0x00000006, "Notify Service Not Connected" },
387 { 0x00000007, "PDS Not Connected" },
391 static const value_string printer_problem_enum[] = {
392 { 0x00000000, "Printer Error" },
393 { 0x00000001, "Printer Needs Attention" },
394 { 0x00000002, "Printer Needs Key Operator" },
398 static const value_string selection_problem_enum[] = {
399 { 0x00000000, "Invalid ID" },
400 { 0x00000001, "Unknown ID" },
401 { 0x00000002, "Object Exists" },
402 { 0x00000003, "ID Changed" },
406 static const value_string doc_access_problem_enum[] = {
407 { 0x00000000, "Access Not Available" },
408 { 0x00000001, "Time Expired" },
409 { 0x00000002, "Access Denied" },
410 { 0x00000003, "Unknown Document" },
411 { 0x00000004, "No Documents in Job" },
415 static const value_string attribute_problem_enum[] = {
416 { 0x00000000, "Invalid Syntax" },
417 { 0x00000001, "Undefined Type" },
418 { 0x00000002, "Wrong Matching" },
419 { 0x00000003, "Constraint Violated" },
420 { 0x00000004, "Unsupported Type" },
421 { 0x00000005, "Illegal Modification" },
422 { 0x00000006, "Consists With Other Attribute" },
423 { 0x00000007, "Undefined Attribute Value" },
424 { 0x00000008, "Unsupported Value" },
425 { 0x00000009, "Invalid Noncompulsed Modification" },
426 { 0x0000000a, "Per Job Inadmissible" },
427 { 0x0000000b, "Not Multivalued" },
428 { 0x0000000c, "Mandatory Omitted" },
429 { 0x0000000d, "Illegal For Class" },
433 static const value_string update_problem_enum[] = {
434 { 0x00000000, "No Modifications Allowed" },
435 { 0x00000001, "Insufficient Rights" },
436 { 0x00000002, "Previous Operation Incomplete" },
437 { 0x00000003, "Cancel Not Possible" },
441 static const value_string obj_identification_enum[] = {
442 { 0x00000000, "Printer Contained Object ID" },
443 { 0x00000001, "Document Identifier" },
444 { 0x00000002, "Object Identifier" },
445 { 0x00000003, "Object Name" },
446 { 0x00000004, "Name or Object ID" },
447 { 0x00000005, "Simple Name" },
448 { 0x00000006, "Printer Configuration Object ID" },
449 { 0x00000007, "Qualified Name" },
450 { 0x00000008, "Event Object ID" },
454 static const value_string nameorid_enum[] = {
455 { 0x00000000, "None" },
456 { 0x00000001, "Global" },
457 { 0x00000002, "Local" },
461 static const value_string qualified_name_enum[] = {
462 { 0x00000000, "None" },
463 { 0x00000001, "Simple" },
464 { 0x00000002, "NDS" },
468 static const value_string qualified_name_enum2[] = {
469 { 0x00000000, "NDS" },
473 static const value_string spx_ndps_program_vals[] = {
474 { 0x00060976, "Print Program" },
475 { 0x00060977, "Broker Program" },
476 { 0x00060978, "Registry Program" },
477 { 0x00060979, "Notify Program" },
478 { 0x0006097a, "Resource Manager Program" },
479 { 0x0006097b, "Programmatic Delivery Program" },
483 static const value_string spx_ndps_print_func_vals[] = {
484 { 0x00000000, "None" },
485 { 0x00000001, "Bind PSM" },
486 { 0x00000002, "Bind PA" },
487 { 0x00000003, "Unbind" },
488 { 0x00000004, "Print" },
489 { 0x00000005, "Modify Job" },
490 { 0x00000006, "Cancel Job" },
491 { 0x00000007, "List Object Attributes" },
492 { 0x00000008, "Promote Job" },
493 { 0x00000009, "Interrupt" },
494 { 0x0000000a, "Pause" },
495 { 0x0000000b, "Resume" },
496 { 0x0000000c, "Clean" },
497 { 0x0000000d, "Create" },
498 { 0x0000000e, "Delete" },
499 { 0x0000000f, "Disable PA" },
500 { 0x00000010, "Enable PA" },
501 { 0x00000011, "Resubmit Jobs" },
502 { 0x00000012, "Set" },
503 { 0x00000013, "Shutdown PA" },
504 { 0x00000014, "Startup PA" },
505 { 0x00000015, "Reorder Job" },
506 { 0x00000016, "Pause PA" },
507 { 0x00000017, "Resume PA" },
508 { 0x00000018, "Transfer Data" },
509 { 0x00000019, "Device Control" },
510 { 0x0000001a, "Add Event Profile" },
511 { 0x0000001b, "Remove Event Profile" },
512 { 0x0000001c, "Modify Event Profile" },
513 { 0x0000001d, "List Event Profiles" },
514 { 0x0000001e, "Shutdown PSM" },
515 { 0x0000001f, "Cancel PSM Shutdown" },
516 { 0x00000020, "Set Printer DS Information" },
517 { 0x00000021, "Clean User Jobs" },
518 { 0x00000022, "Map GUID to NDS Name" },
522 static const value_string spx_ndps_notify_func_vals[] = {
523 { 0x00000000, "None" },
524 { 0x00000001, "Notify Bind" },
525 { 0x00000002, "Notify Unbind" },
526 { 0x00000003, "Register Supplier" },
527 { 0x00000004, "Deregister Supplier" },
528 { 0x00000005, "Add Profile" },
529 { 0x00000006, "Remove Profile" },
530 { 0x00000007, "Modify Profile" },
531 { 0x00000008, "List Profiles" },
532 { 0x00000009, "Report Event" },
533 { 0x0000000a, "List Supported Languages" },
534 { 0x0000000b, "Report Notification" },
535 { 0x0000000c, "Add Delivery Method" },
536 { 0x0000000d, "Remove Delivery Method" },
537 { 0x0000000e, "List Delivery Methods" },
538 { 0x0000000f, "Get Delivery Method Information" },
539 { 0x00000010, "Get Notify NDS Object Name" },
540 { 0x00000011, "Get Notify Session Information" },
544 static const value_string spx_ndps_deliver_func_vals[] = {
545 { 0x00000000, "None" },
546 { 0x00000001, "Delivery Bind" },
547 { 0x00000002, "Delivery Unbind" },
548 { 0x00000003, "Delivery Send" },
549 { 0x00000004, "Delivery Send2" },
553 static const value_string spx_ndps_registry_func_vals[] = {
554 { 0x00000000, "None" },
555 { 0x00000001, "Bind" },
556 { 0x00000002, "Unbind" },
557 { 0x00000003, "Register Server" },
558 { 0x00000004, "Deregister Server" },
559 { 0x00000005, "Register Registry" },
560 { 0x00000006, "Deregister Registry" },
561 { 0x00000007, "Registry Update" },
562 { 0x00000008, "List Local Servers" },
563 { 0x00000009, "List Servers" },
564 { 0x0000000a, "List Known Registries" },
565 { 0x0000000b, "Get Registry NDS Object Name" },
566 { 0x0000000c, "Get Registry Session Information" },
570 static const value_string spx_ndps_resman_func_vals[] = {
571 { 0x00000000, "None" },
572 { 0x00000001, "Bind" },
573 { 0x00000002, "Unbind" },
574 { 0x00000003, "Add Resource File" },
575 { 0x00000004, "Delete Resource File" },
576 { 0x00000005, "List Resources" },
577 { 0x00000006, "Get Resource File" },
578 { 0x00000007, "Get Resource File Date" },
579 { 0x00000008, "Get Resource Manager NDS Object Name" },
580 { 0x00000009, "Get Resource Manager Session Information" },
581 { 0x0000000a, "Set Resource Language Context" },
585 static const value_string spx_ndps_broker_func_vals[] = {
586 { 0x00000000, "None" },
587 { 0x00000001, "Bind" },
588 { 0x00000002, "Unbind" },
589 { 0x00000003, "List Services" },
590 { 0x00000004, "Enable Service" },
591 { 0x00000005, "Disable Service" },
592 { 0x00000006, "Down Broker" },
593 { 0x00000007, "Get Broker NDS Object Name" },
594 { 0x00000008, "Get Broker Session Information" },
598 static const value_string ndps_packet_types[] = {
599 { 0x00000000, "Request" },
600 { 0x00000001, "Reply" },
604 static const value_string ndps_realization_enum[] = {
605 { 0x00000000, "Logical" },
606 { 0x00000001, "Physical" },
607 { 0x00000002, "Logical & Physical" },
611 static const value_string ndps_dim_value_enum[] = {
612 { 0x00000000, "Numeric" },
613 { 0x00000001, "Named" },
617 static const value_string ndps_xydim_value_enum[] = {
618 { 0x00000000, "Real" },
619 { 0x00000001, "Named" },
620 { 0x00000002, "Cardinal" },
624 static const value_string ndps_location_value_enum[] = {
625 { 0x00000000, "Numeric" },
626 { 0x00000001, "Named" },
630 static const value_string ndps_edge_value_enum[] = {
631 { 0x00000000, "Bottom" },
632 { 0x00000001, "Right" },
633 { 0x00000002, "Top" },
634 { 0x00000003, "Left" },
638 static const value_string ndps_card_or_oid_enum[] = {
639 { 0x00000000, "Number" },
640 { 0x00000001, "ID" },
644 static const value_string ndps_card_name_or_oid_enum[] = {
645 { 0x00000000, "Number" },
646 { 0x00000001, "ID" },
650 static const value_string ndps_integer_or_oid_enum[] = {
651 { 0x00000000, "ID" },
652 { 0x00000001, "Number" },
656 static const value_string ndps_persistence_enum[] = {
657 { 0x00000000, "Permanent" },
658 { 0x00000001, "Volatile" },
662 static const value_string ndps_address_type_enum[] = {
663 { 0x00000000, "User" },
664 { 0x00000001, "Server" },
665 { 0x00000002, "Volume" },
666 { 0x00000003, "Organization Unit" },
667 { 0x00000004, "Organization" },
668 { 0x00000005, "Group" },
669 { 0x00000006, "Distinguished Name" },
670 { 0x00000007, "User or Container" },
671 { 0x00000008, "Case Exact String" },
672 { 0x00000009, "Case Ignore String" },
673 { 0x0000000a, "Numeric String" },
674 { 0x0000000b, "DOS File Name" },
675 { 0x0000000c, "Phone Number" },
676 { 0x0000000d, "Boolean" },
677 { 0x0000000e, "Integer" },
678 { 0x0000000f, "Network Address" },
679 { 0x00000010, "Choice" },
680 { 0x00000011, "GroupWise User" },
684 static const value_string ndps_address_enum[] = {
685 { 0x00000000, "IPX" },
686 { 0x00000001, "IP" },
687 { 0x00000002, "SDLC" },
688 { 0x00000003, "Token Ring to Ethernet" },
689 { 0x00000004, "OSI" },
690 { 0x00000005, "AppleTalk" },
691 { 0x00000006, "Count" },
696 static const value_string ndps_server_type_enum[] = {
697 { 0x00000000, "All" },
698 { 0x00000001, "Public Access Printer Agent" },
699 { 0x00000002, "Notification Server" },
700 { 0x00000003, "Resource Manager" },
701 { 0x00000004, "Network Port Handler" },
705 static const value_string ndps_event_object_enum[] = {
706 { 0x00000000, "Object" },
707 { 0x00000001, "Filter" },
708 { 0x00000002, "Detail" },
712 static const value_string ndps_service_type_enum[] = {
713 { 0x00000000, "SRS" },
714 { 0x00000001, "ENS" },
715 { 0x00000002, "RMS" },
719 static const value_string ndps_delivery_add_enum[] = {
720 { 0x00000000, "MHS Address" },
721 { 0x00000001, "Distinguished Name" },
722 { 0x00000002, "Text" },
723 { 0x00000003, "Octet String" },
724 { 0x00000004, "Distinguished Name String" },
725 { 0x00000005, "RPC Address" },
726 { 0x00000006, "Qualified Name" },
730 static const value_string ndps_resource_enum[] = {
731 { 0x00000000, "Name or ID" },
732 { 0x00000001, "Text" },
737 static const value_string ndps_identifier_enum[] = {
738 { 0x00000000, "ID Nominal Number" },
739 { 0x00000001, "ID Alpha-numeric" },
740 { 0x00000002, "ID Tag" },
744 static const value_string ndps_media_enum[] = {
745 { 0x00000000, "Select All Pages" },
746 { 0x00000001, "Selected Pages" },
750 static const value_string ndps_page_size_enum[] = {
751 { 0x00000000, "ID" },
752 { 0x00000001, "Dimensions" },
756 static const value_string ndps_pres_direction_enum[] = {
757 { 0x00000000, "Right to Bottom" },
758 { 0x00000001, "Left to Bottom" },
759 { 0x00000002, "Bidirectional to Bottom" },
760 { 0x00000003, "Right to Top" },
761 { 0x00000004, "Left to Top" },
762 { 0x00000005, "Bidirectional to Top" },
763 { 0x00000006, "Bottom to Right" },
764 { 0x00000007, "Bottom to Left" },
765 { 0x00000008, "Top to Left" },
766 { 0x00000009, "Top to Right" },
770 static const value_string ndps_page_order_enum[] = {
771 { 0x00000000, "Unknown" },
772 { 0x00000001, "First to Last" },
773 { 0x00000002, "Last to First" },
777 static const value_string ndps_medium_size_enum[] = {
778 { 0x00000000, "Discrete" },
779 { 0x00000001, "Continuous" },
783 static const value_string ndps_page_orientation_enum[] = {
784 { 0x00000000, "Unknown" },
785 { 0x00000001, "Face Up" },
786 { 0x00000002, "Face Down" },
790 static const value_string ndps_numbers_up_enum[] = {
791 { 0x00000000, "Cardinal" },
792 { 0x00000001, "Name or Object ID" },
793 { 0x00000002, "Cardinal Range" },
798 static const value_string ndps_state_severity_enum[] = {
799 { 0x00000001, "Other" },
800 { 0x00000002, "Warning" },
801 { 0x00000003, "Critical" },
806 static const value_string ndps_training_enum[] = {
807 { 0x00000001, "Other" },
808 { 0x00000002, "Unknown" },
809 { 0x00000003, "Untrained" },
810 { 0x00000004, "Trained" },
811 { 0x00000005, "Field Service" },
812 { 0x00000006, "Management" },
816 static const value_string ndps_colorant_set_enum[] = {
817 { 0x00000000, "Name" },
818 { 0x00000001, "Description" },
822 static const value_string ndps_card_enum_time_enum[] = {
823 { 0x00000000, "Cardinal" },
824 { 0x00000001, "Enumeration" },
825 { 0x00000002, "Time" },
829 static const value_string ndps_attrs_arg_enum[] = {
830 { 0x00000000, "Continuation" },
831 { 0x00000001, "Specification" },
836 static const value_string ndps_filter_enum[] = {
837 { 0x00000000, "Item" },
838 { 0x00000001, "And" },
839 { 0x00000002, "Or" },
840 { 0x00000003, "Not" },
845 static const value_string ndps_filter_item_enum[] = {
846 { 0x00000000, "Equality" },
847 { 0x00000001, "Substrings" },
848 { 0x00000002, "Greater then or Equal to" },
849 { 0x00000003, "Less then or Equal to" },
850 { 0x00000004, "Present" },
851 { 0x00000005, "Subset of" },
852 { 0x00000006, "Superset of" },
853 { 0x00000007, "Non NULL Set Intersect" },
857 static const value_string ndps_match_criteria_enum[] = {
858 { 0x00000000, "Exact" },
859 { 0x00000001, "Case Insensitive" },
860 { 0x00000002, "Same Letter" },
861 { 0x00000003, "Approximate" },
865 static const value_string ndps_operator_enum[] = {
866 { 0x00000000, "Attributes" },
867 { 0x00000002, "Ordered Jobs" },
871 static const value_string ndps_resource_type_enum[] = {
872 { 0x00000000, "Printer Drivers" },
873 { 0x00000001, "Printer Definitions" },
874 { 0x00000002, "Printer Definitions Short" },
875 { 0x00000003, "Banner Page Files" },
876 { 0x00000004, "Font Types" },
877 { 0x00000005, "Printer Driver Files" },
878 { 0x00000006, "Printer Definition File" },
879 { 0x00000007, "Font Files" },
880 { 0x00000008, "Generic Type" },
881 { 0x00000009, "Generic Files" },
882 { 0x0000000a, "Printer Definition File 2" },
883 { 0x0000000b, "Printer Driver Types 2" },
884 { 0x0000000c, "Printer Driver Files 2" },
885 { 0x0000000d, "Printer Driver Types Archive" },
886 { 0x0000000e, "Languages Available" },
890 static const value_string ndps_os_type_enum[] = {
891 { 0x00000000, "DOS" },
892 { 0x00000001, "Windows 3.1" },
893 { 0x00000002, "Windows 95" },
894 { 0x00000003, "Windows NT" },
895 { 0x00000004, "OS2" },
896 { 0x00000005, "MAC" },
897 { 0x00000006, "UNIX" },
898 { 0x00000007, "Windows NT 4.0" },
899 { 0x00000008, "Windows 2000/XP" },
900 { 0x00000009, "Windows 98" },
901 { 0xffffffff, "None" },
905 static const value_string ndps_banner_type_enum[] = {
906 { 0x00000000, "All" },
907 { 0x00000001, "PCL" },
908 { 0x00000002, "PostScript" },
909 { 0x00000003, "ASCII Text" },
913 static const value_string ndps_font_type_enum[] = {
914 { 0x00000000, "TrueType" },
915 { 0x00000001, "PostScript" },
916 { 0x00000002, "System" },
917 { 0x00000003, "SPD" },
918 { 0x00000004, "True Doc" },
922 static const value_string ndps_archive_enum[] = {
923 { 0x00000000, "ZIP" },
924 { 0x00000001, "JAR" },
929 static const value_string ndps_res_type_enum[] = {
930 { 0x00000000, "Printer Driver" },
931 { 0x00000001, "Printer Definition" },
932 { 0x00000002, "Banner Page" },
933 { 0x00000003, "Font" },
934 { 0x00000004, "Generic Resource" },
935 { 0x00000005, "Print Driver Archive" },
939 static const value_string ndps_print_arg_enum[] = {
940 { 0x00000000, "Create Job" },
941 { 0x00000001, "Add Document" },
942 { 0x00000002, "Close Job" },
946 static const value_string ndps_doc_content_enum[] = {
947 { 0x00000000, "Content Included" },
948 { 0x00000001, "Content Referenced" },
952 static const value_string ndps_interrupt_job_enum[] = {
953 { 0x00000000, "Job ID" },
954 { 0x00000001, "Name" },
958 static const value_string ndps_pause_job_enum[] = {
959 { 0x00000000, "Job ID" },
960 { 0x00000001, "Name" },
964 static const value_string ndps_resubmit_op_enum[] = {
965 { 0x00000000, "Copy" },
966 { 0x00000001, "Move" },
970 static const value_string ndps_shutdown_enum[] = {
971 { 0x00000000, "Do Current Jobs" },
972 { 0x00000001, "Immediate" },
973 { 0x00000002, "Do Pending Jobs" },
977 static const value_string ndps_list_profiles_choice_enum[] = {
978 { 0x00000000, "ID" },
979 { 0x00000001, "Filter" },
983 static const value_string ndps_list_profiles_result_enum[] = {
984 { 0x00000000, "Complete" },
985 { 0x00000001, "No Event Objects" },
986 { 0x00000002, "Profile ID's" },
990 static const value_string ndps_ds_info_enum[] = {
991 { 0x00000000, "Add" },
992 { 0x00000001, "Remove" },
993 { 0x00000002, "Update" },
997 static const value_string ndps_list_services_enum[] = {
998 { 0x00000000, "Supported" },
999 { 0x00000001, "Enabled" },
1003 static const value_string ndps_data_item_enum[] = {
1004 { 0x00000000, "Int8" },
1005 { 0x00000001, "Int16" },
1006 { 0x00000002, "Int32" },
1007 { 0x00000003, "Boolean" },
1008 { 0x00000004, "Character String" },
1009 { 0x00000005, "Byte String" },
1013 static const value_string ndps_list_local_servers_enum[] = {
1014 { 0x00000000, "Specification" },
1015 { 0x00000001, "Continuation" },
1019 static const value_string ndps_delivery_method_enum[] = {
1020 { 0x00000000, "Specification" },
1021 { 0x00000001, "Continuation" },
1025 static const value_string ndps_attribute_enum[] = {
1026 { 0x00000000, "Null" },
1027 { 0x00000001, "Text" },
1028 { 0x00000002, "Descriptive Name" },
1029 { 0x00000003, "Descriptor" },
1030 { 0x00000004, "Message" },
1031 { 0x00000005, "Error Message" },
1032 { 0x00000006, "Simple Name" },
1033 { 0x00000007, "Distinguished Name String" },
1034 { 0x00000008, "Distinguished Name Seq" },
1035 { 0x00000009, "Delta Time" },
1036 { 0x0000000a, "Time" },
1037 { 0x0000000b, "Integer" },
1038 { 0x0000000c, "Integer Seq" },
1039 { 0x0000000d, "Cardinal" },
1040 { 0x0000000e, "Cardinal Seq" },
1041 { 0x0000000f, "Positive Integer" },
1042 { 0x00000010, "Integer Range" },
1043 { 0x00000011, "Cardinal Range" },
1044 { 0x00000012, "Maximum Integer" },
1045 { 0x00000013, "Minimum Integer" },
1046 { 0x00000014, "Integer 64" },
1047 { 0x00000015, "Integer 64 Seq" },
1048 { 0x00000016, "Cardinal 64" },
1049 { 0x00000017, "Cardinal 64 Seq" },
1050 { 0x00000018, "Positive Integer 64" },
1051 { 0x00000019, "Integer 64 Range" },
1052 { 0x0000001a, "Cardinal 64 Range" },
1053 { 0x0000001b, "Maximum Integer 64" },
1054 { 0x0000001c, "Minimum Integer 64" },
1055 { 0x0000001d, "Real" },
1056 { 0x0000001e, "Real Seq" },
1057 { 0x0000001f, "Non-Negative Real" },
1058 { 0x00000020, "Real Range" },
1059 { 0x00000021, "Non-Negative Real Range" },
1060 { 0x00000022, "Boolean" },
1061 { 0x00000023, "Percent" },
1062 { 0x00000024, "Object Identifier" },
1063 { 0x00000025, "Object Identifier Seq" },
1064 { 0x00000026, "Name or OID" },
1065 { 0x00000027, "Name or OID Seq" },
1066 { 0x00000028, "Distinguished Name" },
1067 { 0x00000029, "Relative Distinguished Name Seq" },
1068 { 0x0000002a, "Realization" },
1069 { 0x0000002b, "Medium Dimensions" },
1070 { 0x0000002c, "Dimension" },
1071 { 0x0000002d, "XY Dimensions" },
1072 { 0x0000002e, "Locations" },
1073 { 0x0000002f, "Area" },
1074 { 0x00000030, "Area Seq" },
1075 { 0x00000031, "Edge" },
1076 { 0x00000032, "Font Reference" },
1077 { 0x00000033, "Cardinal or OID" },
1078 { 0x00000034, "OID Cardinal Map" },
1079 { 0x00000035, "Cardinal or Name or OID" },
1080 { 0x00000036, "Positive Integer or OID" },
1081 { 0x00000037, "Event Handling Profile" },
1082 { 0x00000038, "Octet String" },
1083 { 0x00000039, "Priority" },
1084 { 0x0000003a, "Locale" },
1085 { 0x0000003b, "Method Delivery Address" },
1086 { 0x0000003c, "Object Identification" },
1087 { 0x0000003d, "Results Profile" },
1088 { 0x0000003e, "Criteria" },
1089 { 0x0000003f, "Job Password" },
1090 { 0x00000040, "Job Level" },
1091 { 0x00000041, "Job Categories" },
1092 { 0x00000042, "Print Checkpoint" },
1093 { 0x00000043, "Ignored Attribute" },
1094 { 0x00000044, "Resource" },
1095 { 0x00000045, "Medium Substitution" },
1096 { 0x00000046, "Font Substitution" },
1097 { 0x00000047, "Resource Context Seq" },
1098 { 0x00000048, "Sides" },
1099 { 0x00000049, "Page Select Seq" },
1100 { 0x0000004a, "Page Media Select" },
1101 { 0x0000004b, "Document Content" },
1102 { 0x0000004c, "Page Size" },
1103 { 0x0000004d, "Presentation Direction" },
1104 { 0x0000004e, "Page Order" },
1105 { 0x0000004f, "File Reference" },
1106 { 0x00000050, "Medium Source Size" },
1107 { 0x00000051, "Input Tray Medium" },
1108 { 0x00000052, "Output Bins Chars" },
1109 { 0x00000053, "Page ID Type" },
1110 { 0x00000054, "Level Range" },
1111 { 0x00000055, "Category Set" },
1112 { 0x00000056, "Numbers Up Supported" },
1113 { 0x00000057, "Finishing" },
1114 { 0x00000058, "Print Contained Object ID" },
1115 { 0x00000059, "Print Config Object ID" },
1116 { 0x0000005a, "Typed Name" },
1117 { 0x0000005b, "Network Address" },
1118 { 0x0000005c, "XY Dimensions Value" },
1119 { 0x0000005d, "Name or OID Dimensions Map" },
1120 { 0x0000005e, "Printer State Reason" },
1121 { 0x0000005f, "Enumeration" },
1122 { 0x00000060, "Qualified Name" },
1123 { 0x00000061, "Qualified Name Set" },
1124 { 0x00000062, "Colorant Set" },
1125 { 0x00000063, "Resource Printer ID" },
1126 { 0x00000064, "Event Object ID" },
1127 { 0x00000065, "Qualified Name Map" },
1128 { 0x00000066, "File Path" },
1129 { 0x00000067, "Uniform Resource Identifier" },
1130 { 0x00000068, "Cardinal or Enum or Time" },
1131 { 0x00000069, "Print Contained Object ID Set" },
1132 { 0x0000006a, "Octet String Pair" },
1133 { 0x0000006b, "Octet String Integer Pair" },
1134 { 0x0000006c, "Extended Resource Identifier" },
1135 { 0x0000006d, "Event Handling Profile 2" },
1139 static const value_string ndps_error_types[] = {
1140 { 0x00000000, "Ok" },
1141 { 0x00000001, "Error" },
1142 { 0xFFFFFC18, "Broker Out of Memory" }, /* Broker Errors */
1143 { 0xFFFFFC17, "Broker Bad NetWare Version" },
1144 { 0xFFFFFC16, "Broker Wrong Command Line Arguments" },
1145 { 0xFFFFFC15, "Broker Name Not Given" },
1146 { 0xFFFFFC14, "Not Broker Class" },
1147 { 0xFFFFFC13, "Invalid Broker Password" },
1148 { 0xFFFFFC12, "Invalid Broker Name" },
1149 { 0xFFFFFC11, "Broker Failed to Create Thread" },
1150 { 0xFFFFFC10, "Broker Failed to Initialize NUT" },
1151 { 0xFFFFFC0F, "Broker Failed to Get Messages" },
1152 { 0xFFFFFC0E, "Broker Failed to Allocate Resources" },
1153 { 0xFFFFFC0D, "Broker Service Name Must be Fully Distinguished" },
1154 { 0xFFFFFC0C, "Broker Uninitialized Module" },
1155 { 0xFFFFFC0B, "Broker DS Value Size Too Large" },
1156 { 0xFFFFFC0A, "Broker No Attribute Values" },
1157 { 0xFFFFFC09, "Broker Unknown Session" },
1158 { 0xFFFFFC08, "Broker Service Disabled" },
1159 { 0xFFFFFC07, "Broker Unknown Modify Operation" },
1160 { 0xFFFFFC06, "Broker Invalid Arguments" },
1161 { 0xFFFFFC05, "Broker Duplicate Session ID" },
1162 { 0xFFFFFC04, "Broker Unknown Service" },
1163 { 0xFFFFFC03, "Broker Service Already Enabled" },
1164 { 0xFFFFFC02, "Broker Service Already Disabled" },
1165 { 0xFFFFFC01, "Broker Invalid Credential" },
1166 { 0xFFFFFC00, "Broker Unknown Designator" },
1167 { 0xFFFFFBFF, "Broker Failed to Make Change Permanent" },
1168 { 0xFFFFFBFE, "Broker Not Admin Type Session" },
1169 { 0xFFFFFBFD, "Broker Option Not Supported" },
1170 { 0xFFFFFBFC, "Broker No Effective Rights" },
1171 { 0xFFFFFBFB, "Broker Could Not Find File" },
1172 { 0xFFFFFBFA, "Broker Error Reading File" },
1173 { 0xFFFFFBF9, "Broker Not NLM File Format" },
1174 { 0xFFFFFBF8, "Broker Wrong NLM File Version" },
1175 { 0xFFFFFBF7, "Broker Reentrant Initialization Failure" },
1176 { 0xFFFFFBF6, "Broker Already in Progress" },
1177 { 0xFFFFFBF5, "Broker Initialize Failure" },
1178 { 0xFFFFFBF4, "Broker Inconsistent File Format" },
1179 { 0xFFFFFBF3, "Broker Can't Load at Startup" },
1180 { 0xFFFFFBF2, "Broker Autoload Modules Not Loaded" },
1181 { 0xFFFFFBF1, "Broker Unresolved External" },
1182 { 0xFFFFFBF0, "Broker Public Already Defined" },
1183 { 0xFFFFFBEF, "Broker Other Broker Using Object" },
1184 { 0xFFFFFBEE, "Broker Service Failed to Initialize" },
1185 { 0xFFFFFBB4, "Registry Out of Memory" }, /* SRS Errors */
1186 { 0xFFFFFBB3, "Registry Bad NetWare Version" },
1187 { 0xFFFFFBB2, "Registry Failed to Create Context" },
1188 { 0xFFFFFBB1, "Registry Failed Login" },
1189 { 0xFFFFFBB0, "Registry Failed to Create Thread" },
1190 { 0xFFFFFBAF, "Registry Failed to Get Messages" },
1191 { 0xFFFFFBAE, "Registry Service Name Must Be Fully Distinguished" },
1192 { 0xFFFFFBAD, "Registry DS Value Size Too Large" },
1193 { 0xFFFFFBAC, "Registry No Attribute Values" },
1194 { 0xFFFFFBAB, "Registry Unknown Session" },
1195 { 0xFFFFFBAA, "Registry Service Disabled" },
1196 { 0xFFFFFBA9, "Registry Unknown Modify Operation" },
1197 { 0xFFFFFBA8, "Registry Can't Start Advertise" },
1198 { 0xFFFFFBA7, "Registry Duplicate Server Entry" },
1199 { 0xFFFFFBA6, "Registry Can't Bind to Registry" },
1200 { 0xFFFFFBA5, "Registry Can't Create Client" },
1201 { 0xFFFFFBA4, "Registry Invalid Arguments" },
1202 { 0xFFFFFBA3, "Registry Duplicate Session ID" },
1203 { 0xFFFFFBA2, "Registry Unknown Server Entry" },
1204 { 0xFFFFFBA1, "Registry Invalid Credential" },
1205 { 0xFFFFFBA0, "Registry Type Session" },
1206 { 0xFFFFFB9F, "Registry Server Type Session" },
1207 { 0xFFFFFB9E, "Registry Not Server Type Session" },
1208 { 0xFFFFFB9D, "Not Registry Type Session" },
1209 { 0xFFFFFB9C, "Registry Unknown Designator" },
1210 { 0xFFFFFB9B, "Registry Option Not Supported" },
1211 { 0xFFFFFB9A, "Registry Not in List Iteration" },
1212 { 0xFFFFFB99, "Registry Invalid Continuation Handle" },
1213 { 0xFFFFFB50, "Notify Out of Memory" }, /* Notification Service Errors */
1214 { 0xFFFFFB4F, "Notify Bad NetWare Version" },
1215 { 0xFFFFFB4E, "Notify Failed to Create Thread" },
1216 { 0xFFFFFB4D, "Notify Failed to Get Messages" },
1217 { 0xFFFFFB4C, "Notify Failed to Create Context" },
1218 { 0xFFFFFB4B, "Notify Failed Login" },
1219 { 0xFFFFFB4A, "Notify Service Name Must be Fully Distiguished" },
1220 { 0xFFFFFB49, "Notify DS Value Size Too Large" },
1221 { 0xFFFFFB48, "Notify No Attribute Values" },
1222 { 0xFFFFFB47, "Notify Unknown Session" },
1223 { 0xFFFFFB46, "Notify Unknown Notify Profile" },
1224 { 0xFFFFFB45, "Notify Error Reading File" },
1225 { 0xFFFFFB44, "Notify Error Writing File" },
1226 { 0xFFFFFB43, "Wrong Notify Database Version" },
1227 { 0xFFFFFB42, "Corrupted Notify Database" },
1228 { 0xFFFFFB41, "Notify Unknown Event Object ID" },
1229 { 0xFFFFFB40, "Notify Method Already Installed" },
1230 { 0xFFFFFB3F, "Notify Unknown Method" },
1231 { 0xFFFFFB3E, "Notify Service Disabled" },
1232 { 0xFFFFFB3D, "Notify Unknown Modify Operation" },
1233 { 0xFFFFFB3C, "Out of Notify Entries" },
1234 { 0xFFFFFB3B, "Notify Unknown Language ID" },
1235 { 0xFFFFFB3A, "Notify Queue Empty" },
1236 { 0xFFFFFB39, "Notify Can't Load Delivery Method" },
1237 { 0xFFFFFB38, "Notify Invalid Arguments" },
1238 { 0xFFFFFB37, "Notify Duplicate Session ID" },
1239 { 0xFFFFFB36, "Notify Invalid Credentials" },
1240 { 0xFFFFFB35, "Notify Unknown Choice" },
1241 { 0xFFFFFB34, "Notify Unknown Attribute Value" },
1242 { 0xFFFFFB33, "Notify Error Writing Database" },
1243 { 0xFFFFFB32, "Notify Unknown Object ID" },
1244 { 0xFFFFFB31, "Notify Unknown Designator" },
1245 { 0xFFFFFB30, "Notify Failed to Make Change Permanent" },
1246 { 0xFFFFFB2F, "Notify User Interface Not Supported" },
1247 { 0xFFFFFB2E, "Notify Not Supplied Type of Session" },
1248 { 0xFFFFFB2D, "Notify Not Admin Type Session" },
1249 { 0xFFFFFB2C, "Notify No Service Registry Available" },
1250 { 0xFFFFFB2B, "Notify Failed to Register With Any Server" },
1251 { 0xFFFFFB2A, "Notify Empty Event Object Set" },
1252 { 0xFFFFFB29, "Notify Unknown Notify Handle" },
1253 { 0xFFFFFB28, "Notify Option Not Supported" },
1254 { 0xFFFFFB27, "Notify Unknown RPC Session" },
1255 { 0xFFFFFB26, "Notify Initialization Error" },
1256 { 0xFFFFFB25, "Notify No Effective Rights" },
1257 { 0xFFFFFB24, "Notify No Persistent Storage" },
1258 { 0xFFFFFB23, "Notify Bad Method Filename" },
1259 { 0xFFFFFB22, "Notify Unknown Continuation Handle" },
1260 { 0xFFFFFB21, "Notify Invalid Continuation Handle" },
1261 { 0xFFFFFB20, "Notify Could Not Find File" },
1262 { 0xFFFFFB1F, "Notify Error Reading File" },
1263 { 0xFFFFFB1E, "Notify Not NLM File Format" },
1264 { 0xFFFFFB1D, "Notify Wrong NLM File Version" },
1265 { 0xFFFFFB1C, "Notify Reentrant Initialization Failure" },
1266 { 0xFFFFFB1B, "Notify Already in Progress" },
1267 { 0xFFFFFB1A, "Notify Initialization Failure" },
1268 { 0xFFFFFB19, "Notify Inconsistent File Format" },
1269 { 0xFFFFFB18, "Notify Can't Load at Startup" },
1270 { 0xFFFFFB17, "Notify Autoload Modules Not Loaded" },
1271 { 0xFFFFFB16, "Notify Unresolved External" },
1272 { 0xFFFFFB15, "Notify Public Already Defined" },
1273 { 0xFFFFFB14, "Notify Using Unknown Methods" },
1274 { 0xFFFFFB13, "Notify Service Not Fully Enabled" },
1275 { 0xFFFFFB12, "Notify Foreign NDS Tree Name" },
1276 { 0xFFFFFB11, "Notify Delivery Method Rejected Address" },
1277 { 0xFFFFFB10, "Notify Unsupported Delivery Address Type" },
1278 { 0xFFFFFB0F, "Notify User Object No Default Server" },
1279 { 0xFFFFFB0E, "Notify Failed to Send Notification" },
1280 { 0xFFFFFB0D, "Notify Bad Volume in Address" },
1281 { 0xFFFFFB0C, "Notify Broker Has No File Rights" },
1282 { 0xFFFFFB0B, "Notify Maximum Methods Supported" },
1283 { 0xFFFFFB0A, "Notify No Filter Provided" },
1284 { 0xFFFFFB09, "Notify IPX Not Supported By Method" },
1285 { 0xFFFFFB08, "Notify IP Not Supported By Method" },
1286 { 0xFFFFFB07, "Notify Failed to Startup Winsock" },
1287 { 0xFFFFFB06, "Notify No Protocols Available" },
1288 { 0xFFFFFB05, "Notify Failed to Launch RPC Server" },
1289 { 0xFFFFFB04, "Notify Invalid SLP Attribute Format" },
1290 { 0xFFFFFB03, "Notify Invalid SLP URL Format" },
1291 { 0xFFFFFB02, "Notify Unknown Attribute Object ID" },
1292 { 0xFFFFFB01, "Notify Duplicate Session ID" },
1293 { 0xFFFFFB00, "Notify Failed to Authenticate" },
1294 { 0xFFFFFAFF, "Notify Failed to Authenticate Protocol Mismatch" },
1295 { 0xFFFFFAFE, "Notify Failed to Authenticate Internal Error" },
1296 { 0xFFFFFAFD, "Notify Failed to Authenticate Connection Error" },
1297 { 0xFFFFFC7C, "Resource Manager Out of Memory" }, /* ResMan Errors */
1298 { 0xFFFFFC7B, "Resource Manager Bad NetWare Version" },
1299 { 0xFFFFFC7A, "Resource Manager Wrong Command Line Arguments" },
1300 { 0xFFFFFC79, "Resource Manager Broker Name Not Given" },
1301 { 0xFFFFFC78, "Resource Manager Invalid Broker Password" },
1302 { 0xFFFFFC77, "Resource Manager Invalid Broker Name" },
1303 { 0xFFFFFC76, "Resource Manager Failed to Create Thread" },
1304 { 0xFFFFFC75, "Resource Manager Service Name Must be Fully Distinguished" },
1305 { 0xFFFFFC74, "Resource Manager DS Value Size Too Large" },
1306 { 0xFFFFFC73, "Resource Manager No Attribute Values" },
1307 { 0xFFFFFC72, "Resource Manager Unknown Session" },
1308 { 0xFFFFFC71, "Resource Manager Error Reading File" },
1309 { 0xFFFFFC70, "Resource Manager Error Writing File" },
1310 { 0xFFFFFC6F, "Resource Manager Service Disabled" },
1311 { 0xFFFFFC6E, "Resource Manager Unknown Modify Operation" },
1312 { 0xFFFFFC6D, "Resource Manager Duplicate Session ID" },
1313 { 0xFFFFFC6C, "Resource Manager Invalid Credentials" },
1314 { 0xFFFFFC6B, "Resource Manager No Service Registry Available" },
1315 { 0xFFFFFC6A, "Resource Manager Failed to Register With any Server" },
1316 { 0xFFFFFC69, "Resource Manager Failed to Get Messages" },
1317 { 0xFFFFFC68, "Resource Manager Failed to Create Context" },
1318 { 0xFFFFFC67, "Resource Manager Failed to Login" },
1319 { 0xFFFFFC66, "Resource Manager NPD Files Generation Error" },
1320 { 0xFFFFFC65, "Resource Manager INF File Format Error" },
1321 { 0xFFFFFC64, "Resource Manager No Printer Type in INF File" },
1322 { 0xFFFFFC63, "Resource Manager No INF Files Present" },
1323 { 0xFFFFFC62, "Resource Manager File Open Error" },
1324 { 0xFFFFFC61, "Resource Manager Read File Error" },
1325 { 0xFFFFFC60, "Resource Manager Write File Error" },
1326 { 0xFFFFFC5F, "Resource Manager Resource Type Invalid" },
1327 { 0xFFFFFC5E, "Resource Manager No Such Filename" },
1328 { 0xFFFFFC5D, "Resource Manager Banner Type Invalid" },
1329 { 0xFFFFFC5C, "Resource Manager List Type Unknown" },
1330 { 0xFFFFFC5B, "Resource Manager OS Not Supported" },
1331 { 0xFFFFFC5A, "Resource Manager No Banner Files Present" },
1332 { 0xFFFFFC59, "Resource Manager Printer Definition Type Unknown" },
1333 { 0xFFFFFC58, "Resource Manager No Printer Types in List" },
1334 { 0xFFFFFC57, "Resource Manager Option Not Supported" },
1335 { 0xFFFFFC56, "Resource Manager Unicode Convention Error" },
1336 { 0xFFFFFC55, "Resource Manager Invalid Arguments" },
1337 { 0xFFFFFC54, "Resource Manager Initialization Error" },
1338 { 0xFFFFFC53, "Resource Manager No Service Registry Available" },
1339 { 0xFFFFFC52, "Resource Manager Failed to Register to Any Server" },
1340 { 0xFFFFFC51, "Resource Manager Unknown Designator" },
1341 { 0xFFFFFC50, "Resource Manager Not Admin Session" },
1342 { 0xFFFFFC4F, "Resource Manager No Effective Rights" },
1343 { 0xFFFFFC4E, "Resource Manager Bad File Attribute" },
1344 { 0xFFFFFC4D, "Resource Manager Document ID Format Error" },
1345 { 0xFFFFFC4C, "Resource Manager Unknown RPC Session" },
1346 { 0xFFFFFC4B, "Resource Manager Session Being Removed" },
1347 { 0xFFFFFC49, "Resource Manager Font Manager IO Error" },
1348 { 0xFFFFFC48, "Resource Manager Font Manager Reentrancy" },
1349 { 0xFFFFFC47, "Resource Manager Font Manager Sequence Error" },
1350 { 0xFFFFFC46, "Resource Manager Font Manager Corrupt Index File" },
1351 { 0xFFFFFC45, "Resource Manager Font Manager No Such Font" },
1352 { 0xFFFFFC44, "Resource Manager Font Manager Not Initialized" },
1353 { 0xFFFFFC43, "Resource Manager Font Manager System Error" },
1354 { 0xFFFFFC42, "Resource Manager Font Manager Bad Parameter" },
1355 { 0xFFFFFC41, "Resource Manager Font Manager Path Too Long" },
1356 { 0xFFFFFC40, "Resource Manager Font Manager Failure" },
1357 { 0xFFFFFC3F, "Resource Manager Duplicate TIRPC Session" },
1358 { 0xFFFFFC3E, "Resource Manager Connection Lost RMS Data" },
1359 { 0xFFFFFC3D, "Resource Manager Failed to Start Winsock" },
1360 { 0xFFFFFC3C, "Resource Manager No Protocols Available" },
1361 { 0xFFFFFC3B, "Resource Manager Failed to Launch RPC Server" },
1362 { 0xFFFFFC3A, "Resource Manager Invalid SLP Attribute Format" },
1363 { 0xFFFFFC39, "Resource Manager Invalid SLP URL Format" },
1364 { 0xFFFFFC38, "Resource Manager Unresolved External" },
1365 { 0xFFFFFC37, "Resource Manager Failed to Authenticate" },
1366 { 0xFFFFFC36, "Resource Manager Failed to Authenticate Protocol Mismatch" },
1367 { 0xFFFFFC35, "Resource Manager Failed to Authenticate Internal Error" },
1368 { 0xFFFFFC34, "Resource Manager Failed to Authenticate Connection Error" },
1369 { 0xFFFFFC33, "Resource Manager No Rights to Remote Resdir" },
1370 { 0xFFFFFC32, "Resource Manager Can't Initialize NDPS Library" },
1371 { 0xFFFFFC31, "Resource Manager Can't Create Resource Reference" },
1372 { 0xFFFFFC30, "Resource Manager File is Zero Length" },
1373 { 0xFFFFFC2F, "Resource Manager Failed to Write INF in Address" },
1374 { 0xFFFFFCDF, "NDPSM No Memory" }, /* NDPSM Errors */
1375 { 0xFFFFFCDE, "NDPSM Memory Not Found" },
1376 { 0xFFFFFCDD, "NDPSM Job Storage Limit" },
1377 { 0xFFFFFCDC, "NDPSM Job Retention Limit" },
1378 { 0xFFFFFCDB, "NDPSM Unsupported Type" },
1379 { 0xFFFFFCDA, "NDPSM Undefined Type" },
1380 { 0xFFFFFCD9, "NDPSM Unsupported Operation" },
1381 { 0xFFFFFCD8, "NDPSM Error Accessing Database" },
1382 { 0xFFFFFCD7, "NDPSM No PDS" },
1383 { 0xFFFFFCD6, "NDPSM Invalid Class" },
1384 { 0xFFFFFCD5, "NDPSM Bad Parameter" },
1385 { 0xFFFFFCD4, "NDPSM Object Not Found" },
1386 { 0xFFFFFCD3, "NDPSM Attribute Not Found" },
1387 { 0xFFFFFCD2, "NDPSM Value Not Found" },
1388 { 0xFFFFFCD1, "NDPSM Values Not Comparable" },
1389 { 0xFFFFFCD0, "NDPSM Invalid Value Syntax" },
1390 { 0xFFFFFCCF, "NDPSM Job Not Found" },
1391 { 0xFFFFFCCE, "NDPSM Communications Error" },
1392 { 0xFFFFFCCD, "NDPSM Printer Agent Initializing" },
1393 { 0xFFFFFCCC, "NDPSM Printer Agent Going Down" },
1394 { 0xFFFFFCCB, "NDPSM Printer Agent Disabled" },
1395 { 0xFFFFFCCA, "NDPSM Printer Agent Paused" },
1396 { 0xFFFFFCC9, "NDPSM Bad Printer Agent Handle" },
1397 { 0xFFFFFCC8, "NDPSM Object Not Locked" },
1398 { 0xFFFFFCC7, "NDPSM Version Incompatible" },
1399 { 0xFFFFFCC6, "NDPSM PSM Initializing" },
1400 { 0xFFFFFCC5, "NDPSM PSM Going Down" },
1401 { 0xFFFFFCC4, "NDPSM Notification Service Error" },
1402 { 0xFFFFFCC3, "NDPSM Medium Needs Mounted" },
1403 { 0xFFFFFCC2, "NDPSM PDS Not Responding" },
1404 { 0xFFFFFCC1, "NDPSM Session Not Found" },
1405 { 0xFFFFFCC0, "NDPSM RPC Failure" },
1406 { 0xFFFFFCBF, "NDPSM Duplicate Value" },
1407 { 0xFFFFFCBE, "NDPSM PDS Refuses Rename" },
1408 { 0xFFFFFCBD, "NDPSM No Mandatory Attribute" },
1409 { 0xFFFFFCBC, "NDPSM Already Attached" },
1410 { 0xFFFFFCBB, "NDPSM Can't Attach" },
1411 { 0xFFFFFCBA, "NDPSM Too Many NetWare Servers" },
1412 { 0xFFFFFCB9, "NDPSM Can't Create Document File" },
1413 { 0xFFFFFCB8, "NDPSM Can't Delete Document File" },
1414 { 0xFFFFFCB7, "NDPSM Can't Open Document File" },
1415 { 0xFFFFFCB6, "NDPSM Can't Write Document File" },
1416 { 0xFFFFFCB5, "NDPSM Job is Active" },
1417 { 0xFFFFFCB4, "NDPSM No Scheduler" },
1418 { 0xFFFFFCB3, "NDPSM Changing Connection" },
1419 { 0xFFFFFCB2, "NDPSM Could not Create Account Reference" },
1420 { 0xFFFFFCB1, "NDPSM Accounting Service Error" },
1421 { 0xFFFFFCB0, "NDPSM RMS Service Error" },
1422 { 0xFFFFFCAF, "NDPSM Failed Validation" },
1423 { 0xFFFFFCAE, "NDPSM Broker Server Connecting" },
1424 { 0xFFFFFCAD, "NDPSM SRS Service Error" },
1425 { 0xFFFFFD44, "JPM Execute Request Later" },
1426 { 0xFFFFFD43, "JPM Failed to Open Document" },
1427 { 0xFFFFFD42, "JPM Failed to Read Document File" },
1428 { 0xFFFFFD41, "JPM Bad Printer Agent Handle" },
1429 { 0xFFFFFD40, "JPM Bad Job Handle" },
1430 { 0xFFFFFD3F, "JPM Bad Document Handle" },
1431 { 0xFFFFFD3E, "JPM Unsupported Operation" },
1432 { 0xFFFFFD3D, "JPM Request Queue Full" },
1433 { 0xFFFFFD3C, "JPM Printer Agent Not Found" },
1434 { 0xFFFFFD3B, "JPM Invalid Request" },
1435 { 0xFFFFFD3A, "JPM Not Accepting Requests" },
1436 { 0xFFFFFD39, "JPM Printer Agent Already Serviced By PDS" },
1437 { 0xFFFFFD38, "JPM No Job" },
1438 { 0xFFFFFD37, "JPM Job Not Found" },
1439 { 0xFFFFFD36, "JPM Could not Access Database" },
1440 { 0xFFFFFD35, "JPM Bad Object Type" },
1441 { 0xFFFFFD34, "JPM Job Already Closed" },
1442 { 0xFFFFFD33, "JPM Document Already Closed" },
1443 { 0xFFFFFD32, "JPM Print Handler Not Registered" },
1444 { 0xFFFFFD31, "JPM Version Incompatible" },
1445 { 0xFFFFFD30, "JPM Printer Agent Paused" },
1446 { 0xFFFFFD2F, "JPM Printer Agent Shutdown" },
1447 { 0xFFFFFD2E, "JPM No CLIB Context" },
1448 { 0xFFFFFD2D, "JPM Accounting Already Serviced" },
1449 { 0xFFFFFC7B, "Database Can't Create File" },
1450 { 0xFFFFFC7A, "Database Can't Find Data File" },
1451 { 0xFFFFFC79, "Database Can't Open Data File" },
1452 { 0xFFFFFC78, "Database Can't Open Index File" },
1453 { 0xFFFFFC77, "Database Index File Not Open" },
1454 { 0xFFFFFC76, "Database Can't Rename File" },
1455 { 0xFFFFFC75, "Database Can't Read Data File" },
1456 { 0xFFFFFC74, "Database Can't Read Index File" },
1457 { 0xFFFFFC73, "Database Can't Write Data File" },
1458 { 0xFFFFFC72, "Database Can't Write Index File" },
1459 { 0xFFFFFC71, "Database Can't Delete Printer Agent Directory" },
1460 { 0xFFFFFC70, "Database Already Deleted" },
1461 { 0xFFFFFC6F, "Database Object Exists" },
1462 { 0xFFFFFC6E, "Database Descriptor In Use" },
1463 { 0xFFFFFC6D, "Database Descriptor Being Deleted" },
1467 static const value_string ndps_credential_enum[] = {
1476 static const value_string ndps_object_op_enum[] = {
1480 { 3, "Delete Object" },
1484 static const value_string ndps_client_server_enum[] = {
1487 { 2, "Client and Server" },
1491 static const value_string ndps_session_type_enum[] = {
1500 static const value_string ndps_get_session_type_enum[] = {
1508 static const value_string ndps_get_resman_session_type_enum[] = {
1516 align_4(tvbuff_t *tvb, int aoffset)
1518 if(tvb_length_remaining(tvb, aoffset) > 4 )
1526 ndps_string(tvbuff_t* tvb, int hfinfo, proto_tree *ndps_tree, int offset)
1528 int foffset = offset;
1533 guint32 length_remaining = 0;
1535 str_length = tvb_get_ntohl(tvb, foffset);
1537 length_remaining = tvb_length_remaining(tvb, foffset);
1538 g_assert(length_remaining > 0);
1539 if(str_length > (guint)length_remaining || str_length > 1024)
1541 proto_tree_add_string(ndps_tree, hfinfo, tvb, foffset,
1542 length_remaining + 4, "<String too long to process>");
1543 foffset += length_remaining;
1548 proto_tree_add_string(ndps_tree, hfinfo, tvb, offset,
1549 4, "<Not Specified>");
1552 for ( i = 0; i < str_length; i++ )
1554 c_char = tvb_get_guint8(tvb, foffset );
1555 if (c_char<0x20 || c_char>0x7e)
1560 buffer[i] = c_char & 0xff;
1570 buffer[i] = c_char & 0xff;
1575 if(length_remaining==1)
1583 str_length = tvb_get_ntohl(tvb, offset);
1584 proto_tree_add_string(ndps_tree, hfinfo, tvb, offset+4,
1585 str_length, buffer);
1586 foffset += align_4(tvb, foffset);
1591 objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1595 if (tvb_get_ntohl(tvb, foffset)==0)
1599 proto_tree_add_item(ndps_tree, hf_oid_struct_size, tvb, foffset, 4, FALSE);
1601 proto_tree_add_item(ndps_tree, hf_oid_asn1_type, tvb, foffset, 1, FALSE);
1603 length = tvb_get_guint8(tvb, foffset);
1605 proto_tree_add_item(ndps_tree, hf_ndps_oid, tvb, foffset, length, FALSE);
1607 return foffset+(length%2);
1611 name_or_id(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1615 proto_tree_add_item(ndps_tree, hf_ndps_nameorid, tvb, foffset, 4, FALSE);
1617 if(tvb_get_ntohl(tvb, foffset-4)==1) /* Global */
1619 foffset = objectidentifier(tvb, ndps_tree, foffset);
1623 if(tvb_get_ntohl(tvb, foffset-4)==2) /* Local */
1625 foffset = ndps_string(tvb, hf_local_object_name, ndps_tree, foffset);
1632 objectidentification(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1635 guint32 object_count=0;
1636 guint32 object_type=0;
1637 guint32 qualified_name_type=0;
1642 object_type = tvb_get_ntohl(tvb, foffset);
1643 aitem = proto_tree_add_item(ndps_tree, hf_obj_id_type, tvb, foffset, 4, FALSE);
1644 atree = proto_item_add_subtree(aitem, ett_ndps);
1648 case 0: /* Printer Contained Object ID */
1649 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
1650 proto_tree_add_item(atree, hf_ndps_object, tvb, foffset,
1654 case 1: /* Document Identifier */
1655 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
1656 /*proto_tree_add_item(atree, hf_ndps_object, tvb, foffset,
1659 proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset,
1663 case 2: /* Object Identifier */
1664 foffset = objectidentifier(tvb, atree, foffset);
1666 case 3: /* Object Name */
1667 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
1668 if (foffset > tvb_length_remaining(tvb, foffset)) {
1671 foffset = name_or_id(tvb, atree, foffset);
1673 case 4: /* Name or Object ID */
1674 foffset = name_or_id(tvb, atree, foffset);
1676 case 5: /* Simple Name */
1677 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
1679 case 6: /* Printer Configuration Object ID */
1680 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
1682 case 7: /* Qualified Name */
1683 qualified_name_type = tvb_get_ntohl(tvb, foffset);
1684 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
1685 4, qualified_name_type);
1687 if (qualified_name_type != 0) {
1688 if (qualified_name_type == 1) {
1689 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
1693 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
1694 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
1698 case 8: /* Event Object ID */
1699 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
1700 foffset = objectidentifier(tvb, atree, foffset);
1701 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset,
1711 address_item(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1713 guint32 address_type=0;
1714 guint32 qualified_name_type;
1715 guint32 transport_type=0;
1716 guint32 octet_len=0;
1718 address_type = tvb_get_ntohl(tvb, foffset);
1719 proto_tree_add_uint(ndps_tree, hf_address_type, tvb, foffset, 4, address_type);
1721 switch(address_type)
1731 qualified_name_type = tvb_get_ntohl(tvb, foffset);
1732 proto_tree_add_uint(ndps_tree, hf_ndps_qualified_name, tvb, foffset,
1733 4, qualified_name_type);
1735 if (qualified_name_type != 0) {
1736 if (qualified_name_type == 1) {
1737 foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset);
1741 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
1742 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
1751 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset);
1754 proto_tree_add_item(ndps_tree, hf_ndps_attrib_boolean, tvb, foffset, 4, FALSE);
1758 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
1762 transport_type=tvb_get_ntohl(tvb, foffset);
1763 proto_tree_add_item(ndps_tree, hf_ndps_address, tvb, foffset, 4, FALSE);
1765 octet_len = tvb_get_ntohl(tvb, foffset);
1766 proto_tree_add_item(ndps_tree, hf_ndps_add_bytes, tvb, foffset, 4, FALSE);
1767 foffset += octet_len + 4;
1772 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset);
1779 print_address(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1781 guint32 address_type=0;
1783 guint32 address_len=0;
1785 address_type = tvb_get_ntohl(tvb, foffset);
1786 proto_tree_add_uint(ndps_tree, hf_ndps_address, tvb, foffset, 4, address_type);
1788 address_len = tvb_get_ntohl(tvb, foffset);
1789 proto_tree_add_item(ndps_tree, hf_address_len, tvb, foffset, 4, FALSE);
1791 switch(address_type)
1794 proto_tree_add_item(ndps_tree, hf_ndps_net, tvb, foffset, 4, FALSE);
1795 proto_tree_add_item(ndps_tree, hf_ndps_node, tvb, foffset+4, 6, FALSE);
1796 proto_tree_add_item(ndps_tree, hf_ndps_socket, tvb, foffset+10, 2, FALSE);
1797 foffset += address_len;
1800 proto_tree_add_item(ndps_tree, hf_ndps_port, tvb, foffset, 2, FALSE);
1801 address = tvb_get_letohl(tvb, foffset+2);
1802 proto_tree_add_ipv4(ndps_tree, hf_ndps_ip, tvb, foffset+2, 4, address);
1803 foffset += address_len;
1806 foffset += tvb_get_ntohl(tvb, foffset -4);
1809 return foffset+(address_len%4);
1814 attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1819 guint8 number_of_values=0;
1820 guint8 number_of_items=0;
1821 guint8 number_of_items2=0;
1822 guint32 attribute_type=0;
1823 guint32 qualified_name_type=0;
1824 guint32 integer_or_oid=0;
1825 guint32 event_object_type=0;
1826 guint32 ignored_type=0;
1827 guint32 resource_type=0;
1828 guint32 identifier_type=0;
1829 guint32 criterion_type=0;
1830 guint32 card_enum_time=0;
1831 guint32 media_type=0;
1832 guint32 doc_content=0;
1833 guint32 page_size=0;
1834 guint32 medium_size=0;
1835 guint32 numbers_up=0;
1836 guint32 colorant_set=0;
1845 attribute_type = tvb_get_ntohl(tvb, foffset);
1846 aitem = proto_tree_add_item(ndps_tree, hf_obj_attribute_type, tvb, foffset, 4, FALSE);
1847 atree = proto_item_add_subtree(aitem, ett_ndps);
1849 switch(attribute_type)
1852 proto_tree_add_item(atree, hf_ndps_data, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), FALSE);
1855 case 2: /* Descriptive Name */
1856 case 3: /* Descriptor */
1857 case 6: /* Simple Name */
1858 case 40: /* Distinguished Name*/
1859 case 50: /* Font Reference */
1860 case 58: /* Locale */
1861 case 102: /* File Path */
1862 case 103: /* Uniform Resource Identifier */
1863 case 108: /* Extended Resource Identifier */
1864 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
1866 case 4: /* Message */
1867 case 5: /* Error Message */
1868 case 38: /* Name or OID */
1869 foffset = name_or_id(tvb, atree, foffset);
1871 case 39: /* Name or OID Seq */
1872 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
1873 number_of_items = tvb_get_ntohl(tvb, foffset);
1875 for (i = 1 ; i <= number_of_items; i++ )
1877 foffset = name_or_id(tvb, atree, foffset);
1880 case 7: /* Distinguished Name String*/
1881 case 79: /* File Reference */
1882 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
1883 foffset = name_or_id(tvb, atree, foffset);
1885 case 8: /* Distinguished Name String Seq */
1886 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
1887 number_of_items = tvb_get_ntohl(tvb, foffset);
1889 for (i = 1 ; i <= number_of_items; i++ )
1891 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
1892 foffset = name_or_id(tvb, atree, foffset);
1895 case 9: /* Delta Time */
1897 case 11: /* Integer */
1898 case 13: /* Cardinal */
1899 case 15: /* Positive Integer */
1900 case 18: /* Maximum Integer */
1901 case 19: /* Minimum Integer */
1902 case 35: /* Percent */
1903 case 57: /* Job Priority */
1904 case 72: /* Sides */
1905 case 95: /* Enumeration */
1906 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
1909 case 12: /* Integer Seq */
1910 case 14: /* Cardinal Seq */
1911 length = tvb_get_ntohl(tvb, foffset);
1913 proto_tree_add_item(ndps_tree, hf_info_int32, tvb, foffset, length, FALSE);
1916 case 16: /* Integer Range */
1917 case 17: /* Cardinal Range */
1918 proto_tree_add_item(atree, hf_ndps_lower_range, tvb, foffset, 4, FALSE);
1920 proto_tree_add_item(atree, hf_ndps_upper_range, tvb, foffset, 4, FALSE);
1923 case 20: /* Integer 64 */
1924 case 22: /* Cardinal 64 */
1925 case 24: /* Positive Integer 64 */
1926 case 31: /* Non-Negative Real */
1928 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
1931 case 21: /* Integer 64 Seq */
1932 case 23: /* Cardinal 64 Seq */
1933 case 30: /* Real Seq */
1934 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
1935 number_of_items = tvb_get_ntohl(tvb, foffset);
1937 for (i = 1 ; i <= number_of_items; i++ )
1939 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
1943 case 25: /* Integer 64 Range */
1944 case 26: /* Cardinal 64 Range */
1945 case 32: /* Real Range */
1946 case 33: /* Non-Negative Real Range */
1947 proto_tree_add_item(atree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
1949 proto_tree_add_item(atree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
1952 case 27: /* Maximum Integer 64 */
1953 proto_tree_add_item(atree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
1956 case 28: /* Minimum Integer 64 */
1957 proto_tree_add_item(atree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
1960 case 34: /* Boolean */
1961 proto_tree_add_item(atree, hf_ndps_attrib_boolean, tvb, foffset, 4, FALSE);
1964 case 36: /* Object Identifier */
1965 foffset = objectidentifier(tvb, atree, foffset);
1967 case 37: /* Object Identifier Seq */
1968 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
1969 number_of_items = tvb_get_ntohl(tvb, foffset);
1971 for (i = 1 ; i <= number_of_items; i++ )
1973 foffset = objectidentifier(tvb, atree, foffset);
1976 case 41: /* Relative Distinguished Name Seq */
1977 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
1978 number_of_items = tvb_get_ntohl(tvb, foffset);
1980 for (i = 1 ; i <= number_of_items; i++ )
1982 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
1985 case 42: /* Realization */
1986 proto_tree_add_item(atree, hf_ndps_realization, tvb, foffset, 4, FALSE);
1989 case 43: /* Medium Dimensions */
1990 proto_tree_add_item(atree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
1992 proto_tree_add_item(atree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
1995 case 44: /* Dimension */
1996 proto_tree_add_item(atree, hf_ndps_dim_value, tvb, foffset, 8, FALSE);
1998 if (tvb_get_ntohl(tvb, foffset-4) == 0) {
1999 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2004 foffset = name_or_id(tvb, atree, foffset);
2006 proto_tree_add_item(atree, hf_ndps_dim_flag, tvb, foffset, 8, FALSE);
2008 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2011 case 45: /* XY Dimensions */
2012 proto_tree_add_item(atree, hf_ndps_xydim_value, tvb, foffset, 8, FALSE);
2014 if (tvb_get_ntohl(tvb, foffset-4) == 1) {
2015 foffset = name_or_id(tvb, atree, foffset);
2019 proto_tree_add_item(atree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
2021 proto_tree_add_item(atree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
2024 proto_tree_add_item(atree, hf_ndps_dim_flag, tvb, foffset, 8, FALSE);
2026 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2029 case 46: /* Locations */
2030 proto_tree_add_item(atree, hf_ndps_location_value, tvb, foffset, 8, FALSE);
2032 if (tvb_get_ntohl(tvb, foffset-4) == 0) {
2033 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2034 number_of_items = tvb_get_ntohl(tvb, foffset);
2036 for (i = 1 ; i <= number_of_items; i++ )
2038 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2044 foffset = name_or_id(tvb, atree, foffset);
2046 proto_tree_add_item(atree, hf_ndps_dim_flag, tvb, foffset, 8, FALSE);
2048 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2052 proto_tree_add_item(atree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
2054 proto_tree_add_item(atree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
2056 proto_tree_add_item(atree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
2058 proto_tree_add_item(atree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
2061 case 48: /* Area Seq */
2062 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2063 number_of_items = tvb_get_ntohl(tvb, foffset);
2065 for (i = 1 ; i <= number_of_items; i++ )
2067 proto_tree_add_item(atree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
2069 proto_tree_add_item(atree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
2071 proto_tree_add_item(atree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
2073 proto_tree_add_item(atree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
2078 proto_tree_add_item(atree, hf_ndps_edge_value, tvb, foffset, 4, FALSE);
2081 case 51: /* Cardinal or OID */
2082 proto_tree_add_item(atree, hf_ndps_cardinal_or_oid, tvb, foffset, 4, FALSE);
2084 if (tvb_get_ntohl(tvb, foffset-4)==0) {
2085 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2090 foffset = objectidentifier(tvb, atree, foffset);
2093 case 52: /* OID Cardinal Map */
2094 foffset = objectidentifier(tvb, atree, foffset);
2095 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2098 case 53: /* Cardinal or Name or OID */
2099 proto_tree_add_item(atree, hf_ndps_cardinal_name_or_oid, tvb, foffset, 4, FALSE);
2101 if (tvb_get_ntohl(tvb, foffset-4)==0) {
2102 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2107 foffset = name_or_id(tvb, atree, foffset);
2110 case 54: /* Positive Integer or OID */
2111 integer_or_oid = tvb_get_ntohl(tvb, foffset);
2112 proto_tree_add_uint(atree, hf_ndps_integer_or_oid, tvb, foffset, 4, integer_or_oid);
2114 if (integer_or_oid==0) {
2115 foffset = objectidentifier(tvb, atree, foffset);
2119 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2123 case 55: /* Event Handling Profile */
2124 proto_tree_add_item(atree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
2126 proto_tree_add_item(atree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
2128 qualified_name_type = tvb_get_ntohl(tvb, foffset);
2129 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
2130 4, qualified_name_type);
2132 if (qualified_name_type != 0) {
2133 if (qualified_name_type == 1) {
2134 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
2138 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2139 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2142 length = tvb_get_ntohl(tvb, foffset);
2144 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
2146 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
2148 foffset = name_or_id(tvb, atree, foffset);
2149 number_of_items = tvb_get_ntohl(tvb, foffset);
2150 for (i = 1 ; i <= number_of_items; i++ )
2152 foffset += address_item(tvb, atree, foffset);
2154 number_of_items = tvb_get_ntohl(tvb, foffset);
2155 for (i = 1 ; i <= number_of_items; i++ )
2157 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
2159 foffset = objectidentifier(tvb, atree, foffset);
2160 foffset = objectidentification(tvb, atree, foffset);
2161 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
2164 event_object_type = tvb_get_ntohl(tvb, foffset);
2165 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, event_object_type);
2167 if(event_object_type==1)
2169 foffset = objectidentifier(tvb, atree, foffset);
2173 if(event_object_type==0)
2175 number_of_items2 = tvb_get_ntohl(tvb, foffset);
2176 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
2178 for (j = 1 ; j <= number_of_items2; j++ )
2180 foffset = objectidentifier(tvb, atree, foffset);
2186 case 56: /* Octet String */
2187 case 63: /* Job Password */
2188 case 66: /* Print Checkpoint */
2189 length = tvb_get_ntohl(tvb, foffset);
2191 proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
2193 foffset += (length%2);
2195 case 59: /* Method Delivery Address */
2196 proto_tree_add_item(atree, hf_ndps_delivery_add_type, tvb, foffset, 4, FALSE);
2197 event_object_type = tvb_get_ntohl(tvb, foffset);
2199 switch(event_object_type)
2201 case 0: /*MHS ADDR*/
2202 case 1: /*DISTINGUISHED_NAME*/
2204 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2206 case 3: /*OCTET_STRING*/
2207 length = tvb_get_ntohl(tvb, foffset);
2209 proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
2211 foffset += (length%2);
2213 case 4: /*DIST_NAME_STRING*/
2214 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
2215 foffset = name_or_id(tvb, atree, foffset);
2217 case 5: /*RPC_ADDRESS*/
2218 case 6: /*QUALIFIED_NAME*/
2219 foffset = objectidentifier(tvb, atree, foffset);
2220 qualified_name_type = tvb_get_ntohl(tvb, foffset);
2221 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
2222 4, qualified_name_type);
2224 if (qualified_name_type != 0) {
2225 if (qualified_name_type == 1) {
2226 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
2230 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2231 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2239 case 60: /* Object Identification */
2240 foffset = objectidentification(tvb, atree, foffset);
2242 case 61: /* Results Profile */
2243 foffset = objectidentifier(tvb, atree, foffset);
2244 foffset = name_or_id(tvb, atree, foffset);
2245 foffset = address_item(tvb, atree, foffset);
2246 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2248 foffset = name_or_id(tvb, atree, foffset);
2250 case 62: /* Criteria */
2251 foffset = objectidentifier(tvb, atree, foffset);
2252 criterion_type = tvb_get_ntohl(tvb, foffset);
2253 proto_tree_add_uint(atree, hf_ndps_criterion_type, tvb, foffset, 4, criterion_type);
2255 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2258 case 64: /* Job Level */
2259 foffset = objectidentifier(tvb, atree, foffset);
2260 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2263 case 65: /* Job Categories */
2264 foffset = objectidentifier(tvb, atree, foffset);
2265 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2266 number_of_items = tvb_get_ntohl(tvb, foffset);
2268 for (i = 1 ; i <= number_of_items; i++ )
2270 length = tvb_get_ntohl(tvb, foffset);
2272 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
2274 foffset += (length%2);
2277 case 67: /* Ignored Attribute */
2278 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2280 foffset = objectidentifier(tvb, atree, foffset);
2281 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2282 number_of_items = tvb_get_ntohl(tvb, foffset);
2284 for (i = 1 ; i <= number_of_items; i++ )
2286 ignored_type = tvb_get_ntohl(tvb, foffset);
2287 proto_tree_add_uint(atree, hf_ndps_ignored_type, tvb, foffset, 4, ignored_type);
2289 if (ignored_type == 38)
2291 foffset = name_or_id(tvb, atree, foffset);
2295 foffset = objectidentifier(tvb, atree, foffset);
2299 case 68: /* Resource */
2300 resource_type = tvb_get_ntohl(tvb, foffset);
2301 proto_tree_add_uint(atree, hf_ndps_resource_type, tvb, foffset, 4, resource_type);
2303 if (resource_type == 0)
2305 foffset = name_or_id(tvb, atree, foffset);
2309 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2312 case 69: /* Medium Substitution */
2313 foffset = name_or_id(tvb, atree, foffset);
2314 foffset = name_or_id(tvb, atree, foffset);
2316 case 70: /* Font Substitution */
2317 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2318 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2320 case 71: /* Resource Context Seq */
2321 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2322 number_of_items = tvb_get_ntohl(tvb, foffset);
2324 for (i = 1 ; i <= number_of_items; i++ )
2326 resource_type = tvb_get_ntohl(tvb, foffset);
2327 proto_tree_add_uint(atree, hf_ndps_resource_type, tvb, foffset, 4, resource_type);
2329 if (resource_type == 0)
2331 foffset = name_or_id(tvb, atree, foffset);
2335 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2339 case 73: /* Page Select Seq */
2340 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2341 number_of_items = tvb_get_ntohl(tvb, foffset);
2343 for (i = 1 ; i <= number_of_items; i++ )
2345 proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, FALSE);
2347 identifier_type = tvb_get_ntohl(tvb, foffset);
2348 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
2350 if (identifier_type == 0)
2352 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2355 if (identifier_type == 1)
2357 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2359 if (identifier_type == 2)
2361 foffset = name_or_id(tvb, atree, foffset);
2363 proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, FALSE);
2365 identifier_type = tvb_get_ntohl(tvb, foffset);
2366 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
2368 if (identifier_type == 0)
2370 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2373 if (identifier_type == 1)
2375 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2377 if (identifier_type == 2)
2379 foffset = name_or_id(tvb, atree, foffset);
2383 case 74: /* Page Media Select */
2384 media_type = tvb_get_ntohl(tvb, foffset);
2385 proto_tree_add_uint(atree, hf_ndps_media_type, tvb, foffset, 4, media_type);
2387 if (media_type == 0)
2389 foffset = name_or_id(tvb, atree, foffset);
2393 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2394 number_of_items = tvb_get_ntohl(tvb, foffset);
2396 for (i = 1 ; i <= number_of_items; i++ )
2398 proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, FALSE);
2400 identifier_type = tvb_get_ntohl(tvb, foffset);
2401 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
2403 if (identifier_type == 0)
2405 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2408 if (identifier_type == 1)
2410 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2412 if (identifier_type == 2)
2414 foffset = name_or_id(tvb, atree, foffset);
2419 case 75: /* Document Content */
2420 doc_content = tvb_get_ntohl(tvb, foffset);
2421 proto_tree_add_uint(atree, hf_ndps_doc_content, tvb, foffset, 4, doc_content);
2423 if (doc_content == 0)
2425 length = tvb_get_ntohl(tvb, foffset);
2427 proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
2429 foffset += (length%2);
2433 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
2434 foffset = name_or_id(tvb, atree, foffset);
2437 case 76: /* Page Size */
2438 page_size = tvb_get_ntohl(tvb, foffset);
2439 proto_tree_add_uint(atree, hf_ndps_page_size, tvb, foffset, 4, page_size);
2443 foffset = objectidentifier(tvb, atree, foffset);
2447 proto_tree_add_item(atree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
2449 proto_tree_add_item(atree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
2453 case 77: /* Presentation Direction */
2454 proto_tree_add_uint(atree, hf_ndps_direction, tvb, foffset, 4, FALSE);
2457 case 78: /* Page Order */
2458 proto_tree_add_uint(atree, hf_ndps_page_order, tvb, foffset, 4, FALSE);
2461 case 80: /* Medium Source Size */
2462 foffset = name_or_id(tvb, atree, foffset);
2463 medium_size = tvb_get_ntohl(tvb, foffset);
2464 proto_tree_add_uint(atree, hf_ndps_medium_size, tvb, foffset, 4, medium_size);
2466 if (medium_size == 0)
2468 page_size = tvb_get_ntohl(tvb, foffset);
2469 proto_tree_add_uint(atree, hf_ndps_page_size, tvb, foffset, 4, page_size);
2473 foffset = objectidentifier(tvb, atree, foffset);
2477 proto_tree_add_item(atree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
2479 proto_tree_add_item(atree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
2482 proto_tree_add_item(atree, hf_ndps_long_edge_feeds, tvb, foffset, 4, FALSE);
2484 proto_tree_add_item(atree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
2486 proto_tree_add_item(atree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
2488 proto_tree_add_item(atree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
2490 proto_tree_add_item(atree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
2495 proto_tree_add_item(atree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
2497 proto_tree_add_item(atree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
2499 proto_tree_add_item(atree, hf_ndps_inc_across_feed, tvb, foffset, 8, FALSE);
2501 proto_tree_add_item(atree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
2503 proto_tree_add_item(atree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
2505 proto_tree_add_item(atree, hf_ndps_size_inc_in_feed, tvb, foffset, 8, FALSE);
2507 proto_tree_add_item(atree, hf_ndps_long_edge_feeds, tvb, foffset, 4, FALSE);
2509 proto_tree_add_item(atree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
2511 proto_tree_add_item(atree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
2513 proto_tree_add_item(atree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
2515 proto_tree_add_item(atree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
2519 case 81: /* Input Tray Medium */
2520 foffset = name_or_id(tvb, atree, foffset);
2521 foffset = name_or_id(tvb, atree, foffset);
2523 case 82: /* Output Bins Characteristics */
2524 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2525 number_of_items = tvb_get_ntohl(tvb, foffset);
2527 for (i = 1 ; i <= number_of_items; i++ )
2529 proto_tree_add_uint(atree, hf_ndps_page_order, tvb, foffset, 4, FALSE);
2531 proto_tree_add_uint(atree, hf_ndps_page_orientation, tvb, foffset, 4, FALSE);
2535 case 83: /* Page ID Type */
2536 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, FALSE);
2539 case 84: /* Level Range */
2540 foffset = objectidentifier(tvb, atree, foffset);
2541 proto_tree_add_item(atree, hf_ndps_lower_range, tvb, foffset, 4, FALSE);
2543 proto_tree_add_item(atree, hf_ndps_upper_range, tvb, foffset, 4, FALSE);
2546 case 85: /* Category Set */
2547 foffset = objectidentifier(tvb, atree, foffset);
2548 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2549 number_of_items = tvb_get_ntohl(tvb, foffset);
2551 for (i = 1 ; i <= number_of_items; i++ )
2553 length = tvb_get_ntohl(tvb, foffset);
2555 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
2557 foffset += (length%2);
2559 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2560 number_of_items = tvb_get_ntohl(tvb, foffset);
2562 for (i = 1 ; i <= number_of_items; i++ )
2564 length = tvb_get_ntohl(tvb, foffset);
2566 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
2568 foffset += (length%2);
2571 case 86: /* Numbers Up Supported */
2572 proto_tree_add_uint(atree, hf_ndps_numbers_up, tvb, foffset, 4, FALSE);
2573 numbers_up=tvb_get_ntohl(tvb, foffset);
2577 case 0: /*Cardinal*/
2578 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2581 case 1: /*Name or OID*/
2582 foffset = name_or_id(tvb, atree, foffset);
2584 case 2: /*Cardinal Range*/
2585 proto_tree_add_item(atree, hf_ndps_lower_range, tvb, foffset, 4, FALSE);
2587 proto_tree_add_item(atree, hf_ndps_upper_range, tvb, foffset, 4, FALSE);
2594 case 87: /* Finishing */
2595 case 88: /* Print Contained Object ID */
2596 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
2597 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2600 case 89: /* Print Config Object ID */
2601 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
2602 qualified_name_type = tvb_get_ntohl(tvb, foffset);
2603 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
2604 4, qualified_name_type);
2606 if (qualified_name_type != 0) {
2607 if (qualified_name_type == 1) {
2608 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
2612 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2613 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2617 case 90: /* Typed Name */
2618 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
2619 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2621 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2624 case 91: /* Network Address */
2625 proto_tree_add_item(atree, hf_ndps_address, tvb, foffset, 4, FALSE);
2627 length = tvb_get_ntohl(tvb, foffset);
2629 proto_tree_add_item(atree, hf_ndps_add_bytes, tvb, foffset, 4, FALSE);
2632 case 92: /* XY Dimensions Value */
2633 proto_tree_add_item(atree, hf_ndps_xydim_value, tvb, foffset, 8, FALSE);
2635 if (tvb_get_ntohl(tvb, foffset-4) == 1) {
2636 foffset = name_or_id(tvb, atree, foffset);
2640 if (tvb_get_ntohl(tvb, foffset-4) == 0)
2642 proto_tree_add_item(atree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
2644 proto_tree_add_item(atree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
2649 proto_tree_add_item(atree, hf_ndps_xdimension, tvb, foffset, 4, FALSE);
2651 proto_tree_add_item(atree, hf_ndps_ydimension, tvb, foffset, 4, FALSE);
2656 case 93: /* Name or OID Dimensions Map */
2657 foffset = name_or_id(tvb, atree, foffset);
2658 proto_tree_add_item(atree, hf_ndps_xdimension, tvb, foffset, 4, FALSE);
2660 proto_tree_add_item(atree, hf_ndps_ydimension, tvb, foffset, 4, FALSE);
2663 case 94: /* Printer State Reason */
2664 foffset = name_or_id(tvb, atree, foffset);
2665 proto_tree_add_item(atree, hf_ndps_state_severity, tvb, foffset, 4, FALSE);
2667 proto_tree_add_item(atree, hf_ndps_training, tvb, foffset, 4, FALSE);
2669 foffset = objectidentifier(tvb, atree, foffset);
2670 foffset = objectidentification(tvb, atree, foffset);
2671 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2673 foffset = name_or_id(tvb, atree, foffset);
2675 case 96: /* Qualified Name */
2676 qualified_name_type = tvb_get_ntohl(tvb, foffset);
2677 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
2678 4, qualified_name_type);
2680 if (qualified_name_type != 0) {
2681 if (qualified_name_type == 1) {
2682 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
2686 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2687 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2691 case 97: /* Qualified Name Set */
2692 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2693 number_of_items = tvb_get_ntohl(tvb, foffset);
2695 for (i = 1 ; i <= number_of_items; i++ )
2697 qualified_name_type = tvb_get_ntohl(tvb, foffset);
2698 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
2699 4, qualified_name_type);
2701 if (qualified_name_type != 0) {
2702 if (qualified_name_type == 1) {
2703 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
2707 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2708 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2713 case 98: /* Colorant Set */
2714 colorant_set = tvb_get_ntohl(tvb, foffset);
2715 proto_tree_add_item(atree, hf_ndps_colorant_set, tvb, foffset, 4, FALSE);
2717 if (colorant_set==0)
2719 foffset = name_or_id(tvb, atree, foffset);
2724 foffset = objectidentifier(tvb, atree, foffset);
2725 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2726 number_of_items = tvb_get_ntohl(tvb, foffset);
2728 for (i = 1 ; i <= number_of_items; i++ )
2730 foffset = name_or_id(tvb, atree, foffset);
2734 case 99: /* Resource Printer ID */
2735 number_of_items = tvb_get_ntohl(tvb, foffset);
2737 for (i = 1 ; i <= number_of_items; i++ )
2739 foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset);
2740 foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset);
2741 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset);
2743 proto_tree_add_item(atree, hf_os_type, tvb, foffset, 4, FALSE);
2746 case 100: /* Event Object ID */
2747 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2748 foffset = objectidentifier(tvb, atree, foffset);
2749 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
2752 case 101: /* Qualified Name Map */
2753 qualified_name_type = tvb_get_ntohl(tvb, foffset);
2754 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
2755 4, qualified_name_type);
2757 if (qualified_name_type != 0) {
2758 if (qualified_name_type == 1) {
2759 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
2763 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2764 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2767 qualified_name_type = tvb_get_ntohl(tvb, foffset);
2768 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
2769 4, qualified_name_type);
2771 if (qualified_name_type != 0) {
2772 if (qualified_name_type == 1) {
2773 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
2777 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2778 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2782 case 104: /* Cardinal or Enum or Time */
2783 card_enum_time = tvb_get_ntohl(tvb, foffset);
2784 proto_tree_add_item(atree, hf_ndps_card_enum_time, tvb, foffset, 4, FALSE);
2786 if (card_enum_time==0)
2788 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2793 if (card_enum_time==1)
2795 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2800 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2805 case 105: /* Print Contained Object ID Set */
2806 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2807 number_of_items = tvb_get_ntohl(tvb, foffset);
2809 for (i = 1 ; i <= number_of_items; i++ )
2811 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2812 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2816 case 106: /* Octet String Pair */
2817 length = tvb_get_ntohl(tvb, foffset);
2819 proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
2821 foffset += (length%2);
2822 length = tvb_get_ntohl(tvb, foffset);
2824 proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
2826 foffset += (length%2);
2828 case 107: /* Octet String Integer Pair */
2829 length = tvb_get_ntohl(tvb, foffset);
2831 proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
2833 foffset += (length%2);
2834 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2836 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2839 case 109: /* Event Handling Profile 2 */
2840 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2842 proto_tree_add_item(atree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
2844 qualified_name_type = tvb_get_ntohl(tvb, foffset);
2845 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
2846 4, qualified_name_type);
2848 if (qualified_name_type != 0) {
2849 if (qualified_name_type == 1) {
2850 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
2854 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2855 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2858 length = tvb_get_ntohl(tvb, foffset);
2860 proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
2862 foffset += (length%2);
2863 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2865 foffset = name_or_id(tvb, atree, foffset);
2866 proto_tree_add_item(atree, hf_ndps_delivery_add_type, tvb, foffset, 4, FALSE);
2867 event_object_type = tvb_get_ntohl(tvb, foffset);
2869 switch(event_object_type)
2871 case 0: /*MHS ADDR*/
2872 case 1: /*DISTINGUISHED_NAME*/
2874 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2876 case 3: /*OCTET_STRING*/
2877 length = tvb_get_ntohl(tvb, foffset);
2879 proto_tree_add_item(atree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
2881 foffset += (length%2);
2883 case 4: /*DIST_NAME_STRING*/
2884 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
2885 foffset = name_or_id(tvb, atree, foffset);
2887 case 5: /*RPC_ADDRESS*/
2888 case 6: /*QUALIFIED_NAME*/
2889 foffset = objectidentifier(tvb, atree, foffset);
2890 qualified_name_type = tvb_get_ntohl(tvb, foffset);
2891 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
2892 4, qualified_name_type);
2894 if (qualified_name_type != 0) {
2895 if (qualified_name_type == 1) {
2896 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
2900 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2901 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2908 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2909 number_of_items = tvb_get_ntohl(tvb, foffset);
2911 for (i = 1 ; i <= number_of_items; i++ )
2913 foffset = ndps_string(tvb, hf_object_name, atree, foffset);
2914 foffset = objectidentifier(tvb, atree, foffset);
2915 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset,
2919 foffset = objectidentifier(tvb, atree, foffset);
2920 qualified_name_type = tvb_get_ntohl(tvb, foffset);
2921 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
2922 4, qualified_name_type);
2924 if (qualified_name_type != 0) {
2925 if (qualified_name_type == 1) {
2926 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
2930 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2931 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
2934 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2935 number_of_items = tvb_get_ntohl(tvb, foffset);
2937 for (i = 1 ; i <= number_of_items; i++ )
2939 foffset = objectidentifier(tvb, atree, foffset);
2941 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2943 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2945 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2947 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
2956 filteritem(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2958 guint32 filter_op=0;
2959 guint32 number_of_items=0;
2962 proto_tree_add_item(ndps_tree, hf_ndps_item_filter, tvb, foffset, 4, FALSE);
2963 filter_op = tvb_get_ntohl(tvb, foffset);
2967 case 0: /* Equality */
2968 case 2: /* Greater or Equal */
2969 case 3: /* Less or Equal */
2970 case 5: /* Subset of */
2971 case 6: /* Superset of */
2972 case 7: /* Non NULL Set Intersect */
2973 foffset = objectidentifier(tvb, ndps_tree, foffset);
2974 number_of_items = tvb_get_ntohl(tvb, foffset);
2975 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2977 for (i = 1 ; i <= number_of_items; i++ )
2979 foffset = attribute_value(tvb, ndps_tree, foffset);
2981 proto_tree_add_item(ndps_tree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
2984 case 1: /* Substrings */
2985 foffset = objectidentifier(tvb, ndps_tree, foffset);
2986 proto_tree_add_item(ndps_tree, hf_ndps_substring_match, tvb, foffset, 4, FALSE);
2988 foffset = attribute_value(tvb, ndps_tree, foffset); /* initial value */
2989 number_of_items = tvb_get_ntohl(tvb, foffset);
2990 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2992 for (i = 1 ; i <= number_of_items; i++ )
2994 foffset = attribute_value(tvb, ndps_tree, foffset); /* Any Value Set Option */
2996 foffset = attribute_value(tvb, ndps_tree, foffset); /* Final Value */
2998 case 4: /* Present */
2999 foffset = objectidentifier(tvb, ndps_tree, foffset);
3006 static const fragment_items ndps_frag_items = {
3011 &hf_ndps_segment_overlap,
3012 &hf_ndps_segment_overlap_conflict,
3013 &hf_ndps_segment_multiple_tails,
3014 &hf_ndps_segment_too_long_segment,
3015 &hf_ndps_segment_error,
3019 static dissector_handle_t ndps_data_handle;
3021 /* NDPS packets come in request/reply pairs. The request packets tell the
3022 * Function and Program numbers. The response, unfortunately, only
3023 * identifies itself via the Exchange ID; you have to know what type of NDPS
3024 * request the request packet contained in order to successfully parse the
3025 * response. A global method for doing this does not exist in ethereal yet
3026 * (NFS also requires it), so for now the NDPS section will keep its own hash
3027 * table keeping track of NDPS packets.
3029 * We construct a conversation specified by the client and server
3030 * addresses and the connection number; the key representing the unique
3031 * NDPS request then is composed of the pointer to the conversation
3032 * structure, cast to a "guint" (which may throw away the upper 32
3033 * bits of the pointer on a P64 platform, but the low-order 32 bits
3034 * are more likely to differ between conversations than the upper 32 bits),
3035 * and the sequence number.
3037 * The value stored in the hash table is the ncp_req_hash_value pointer. This
3038 * struct tells us the NDPS Program and Function and gives the NDPS_record pointer.
3041 conversation_t *conversation;
3043 } ndps_req_hash_key;
3048 guint32 ndps_frame_num;
3049 } ndps_req_hash_value;
3051 static GHashTable *ndps_req_hash = NULL;
3052 static GMemChunk *ndps_req_hash_keys = NULL;
3053 static GMemChunk *ndps_req_hash_values = NULL;
3055 /* Hash Functions */
3057 ndps_equal(gconstpointer v, gconstpointer v2)
3059 const ndps_req_hash_key *val1 = (const ndps_req_hash_key*)v;
3060 const ndps_req_hash_key *val2 = (const ndps_req_hash_key*)v2;
3062 if (val1->conversation == val2->conversation &&
3063 val1->ndps_xport == val2->ndps_xport ) {
3070 ndps_hash(gconstpointer v)
3072 const ndps_req_hash_key *ndps_key = (const ndps_req_hash_key*)v;
3073 return GPOINTER_TO_UINT(ndps_key->conversation) + ndps_key->ndps_xport;
3076 /* Initializes the hash table and the mem_chunk area each time a new
3077 * file is loaded or re-loaded in ethereal */
3079 ndps_init_protocol(void)
3082 fragment_table_init(&ndps_fragment_table);
3083 reassembled_table_init(&ndps_reassembled_table);
3086 g_hash_table_destroy(ndps_req_hash);
3087 if (ndps_req_hash_keys)
3088 g_mem_chunk_destroy(ndps_req_hash_keys);
3089 if (ndps_req_hash_values)
3090 g_mem_chunk_destroy(ndps_req_hash_values);
3092 ndps_req_hash = g_hash_table_new(ndps_hash, ndps_equal);
3093 ndps_req_hash_keys = g_mem_chunk_new("ndps_req_hash_keys",
3094 sizeof(ndps_req_hash_key),
3095 NDPS_PACKET_INIT_COUNT * sizeof(ndps_req_hash_key),
3097 ndps_req_hash_values = g_mem_chunk_new("ndps_req_hash_values",
3098 sizeof(ndps_req_hash_value),
3099 NDPS_PACKET_INIT_COUNT * sizeof(ndps_req_hash_value),
3103 /* After the sequential run, we don't need the ncp_request hash and keys
3104 * anymore; the lookups have already been done and the vital info
3105 * saved in the reply-packets' private_data in the frame_data struct. */
3107 ndps_postseq_cleanup(void)
3109 if (ndps_req_hash) {
3110 /* Destroy the hash, but don't clean up request_condition data. */
3111 g_hash_table_destroy(ndps_req_hash);
3112 ndps_req_hash = NULL;
3114 if (ndps_req_hash_keys) {
3115 g_mem_chunk_destroy(ndps_req_hash_keys);
3116 ndps_req_hash_keys = NULL;
3118 /* Don't free the ncp_req_hash_values, as they're
3119 * needed during random-access processing of the proto_tree.*/
3122 ndps_req_hash_value*
3123 ndps_hash_insert(conversation_t *conversation, guint32 ndps_xport)
3125 ndps_req_hash_key *request_key;
3126 ndps_req_hash_value *request_value;
3128 /* Now remember the request, so we can find it if we later
3130 request_key = g_mem_chunk_alloc(ndps_req_hash_keys);
3131 request_key->conversation = conversation;
3132 request_key->ndps_xport = ndps_xport;
3134 request_value = g_mem_chunk_alloc(ndps_req_hash_values);
3135 request_value->ndps_prog = 0;
3136 request_value->ndps_func = 0;
3137 request_value->ndps_frame_num = 0;
3139 g_hash_table_insert(ndps_req_hash, request_key, request_value);
3141 return request_value;
3144 /* Returns the ncp_rec*, or NULL if not found. */
3145 ndps_req_hash_value*
3146 ndps_hash_lookup(conversation_t *conversation, guint32 ndps_xport)
3148 ndps_req_hash_key request_key;
3150 request_key.conversation = conversation;
3151 request_key.ndps_xport = ndps_xport;
3153 return g_hash_table_lookup(ndps_req_hash, &request_key);
3156 /* ================================================================= */
3158 /* ================================================================= */
3161 dissect_ndps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree)
3165 guint32 ndps_packet_type;
3166 guint32 ndps_rpc_version;
3168 guint32 ndps_hfname;
3170 const char *ndps_program_string;
3171 const char *ndps_func_string;
3174 ndps_packet_type = tvb_get_ntohl(tvb, 8);
3175 if (ndps_packet_type != 0 && ndps_packet_type != 1) { /* Packet Type */
3176 if (check_col(pinfo->cinfo, COL_INFO))
3177 col_set_str(pinfo->cinfo, COL_INFO, "(Continuation Data)");
3178 proto_tree_add_text(ndps_tree, tvb, 0, tvb_length_remaining(tvb, 0), "Data - (%d Bytes)", tvb_length_remaining(tvb, 0));
3182 proto_tree_add_item(ndps_tree, hf_ndps_record_mark, tvb,
3185 proto_tree_add_item(ndps_tree, hf_ndps_length, tvb,
3189 ndps_xid = tvb_get_ntohl(tvb, foffset);
3190 proto_tree_add_uint(ndps_tree, hf_ndps_xid, tvb, foffset, 4, ndps_xid);
3192 ndps_packet_type = tvb_get_ntohl(tvb, foffset);
3193 proto_tree_add_uint(ndps_tree, hf_ndps_packet_type, tvb, foffset, 4, ndps_packet_type);
3195 if(ndps_packet_type == 0x00000001) /* Reply packet */
3197 if (check_col(pinfo->cinfo, COL_INFO))
3198 col_set_str(pinfo->cinfo, COL_INFO, "R NDPS ");
3199 proto_tree_add_item(ndps_tree, hf_ndps_rpc_accept, tvb, foffset, 4, FALSE);
3200 if (tvb_get_ntohl(tvb, foffset)==0) {
3202 proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 8, FALSE);
3208 proto_tree_add_item(ndps_tree, hf_ndps_rpc_rej_stat, tvb, foffset+4, 4, FALSE);
3211 dissect_ndps_reply(tvb, pinfo, ndps_tree, foffset);
3215 if (check_col(pinfo->cinfo, COL_INFO))
3216 col_set_str(pinfo->cinfo, COL_INFO, "C NDPS ");
3217 ndps_rpc_version = tvb_get_ntohl(tvb, foffset);
3218 proto_tree_add_item(ndps_tree, hf_ndps_rpc_version, tvb, foffset, 4, FALSE);
3220 ndps_prog = tvb_get_ntohl(tvb, foffset);
3221 ndps_program_string = match_strval(ndps_prog, spx_ndps_program_vals);
3222 if( ndps_program_string != NULL)
3224 proto_tree_add_item(ndps_tree, hf_spx_ndps_program, tvb, foffset, 4, FALSE);
3226 if (check_col(pinfo->cinfo, COL_INFO))
3228 col_append_str(pinfo->cinfo, COL_INFO, (const gchar*) ndps_program_string);
3229 col_append_str(pinfo->cinfo, COL_INFO, ", ");
3231 proto_tree_add_item(ndps_tree, hf_spx_ndps_version, tvb, foffset, 4, FALSE);
3233 ndps_func = tvb_get_ntohl(tvb, foffset);
3237 ndps_hfname = hf_spx_ndps_func_print;
3238 ndps_func_string = match_strval(ndps_func, spx_ndps_print_func_vals);
3241 ndps_hfname = hf_spx_ndps_func_broker;
3242 ndps_func_string = match_strval(ndps_func, spx_ndps_broker_func_vals);
3245 ndps_hfname = hf_spx_ndps_func_registry;
3246 ndps_func_string = match_strval(ndps_func, spx_ndps_registry_func_vals);
3249 ndps_hfname = hf_spx_ndps_func_notify;
3250 ndps_func_string = match_strval(ndps_func, spx_ndps_notify_func_vals);
3253 ndps_hfname = hf_spx_ndps_func_resman;
3254 ndps_func_string = match_strval(ndps_func, spx_ndps_resman_func_vals);
3257 ndps_hfname = hf_spx_ndps_func_delivery;
3258 ndps_func_string = match_strval(ndps_func, spx_ndps_deliver_func_vals);
3262 ndps_func_string = NULL;
3265 if(ndps_hfname != 0)
3267 proto_tree_add_item(ndps_tree, ndps_hfname, tvb, foffset, 4, FALSE);
3268 if (ndps_func_string != NULL)
3270 if (check_col(pinfo->cinfo, COL_INFO))
3271 col_append_str(pinfo->cinfo, COL_INFO, (const gchar*) ndps_func_string);
3274 proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 16, FALSE);
3276 dissect_ndps_request(tvb, pinfo, ndps_tree, ndps_prog, ndps_func, foffset);
3284 get_ndps_pdu_len(tvbuff_t *tvb, int offset)
3289 * Get the length of the NDPS packet.
3291 plen = tvb_get_ntohs(tvb, offset + 2);
3294 * That length doesn't include the length of the record mark field
3295 * or the length field itself; add that in.
3296 * (XXX - is the field really a 31-bit length with the uppermost bit
3297 * being a record mark bit?)
3303 dissect_ndps_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3305 proto_tree *ndps_tree = NULL;
3308 if (check_col(pinfo->cinfo, COL_PROTOCOL))
3309 col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS");
3311 if (check_col(pinfo->cinfo, COL_INFO))
3312 col_clear(pinfo->cinfo, COL_INFO);
3315 ti = proto_tree_add_item(tree, proto_ndps, tvb, 0, -1, FALSE);
3316 ndps_tree = proto_item_add_subtree(ti, ett_ndps);
3318 dissect_ndps(tvb, pinfo, ndps_tree);
3322 ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3324 guint16 record_mark=0;
3325 guint16 ndps_length=0;
3328 tvbuff_t *next_tvb = NULL;
3329 fragment_data *fd_head;
3332 spx_data = pinfo->private_data;
3333 if (!ndps_defragment || spx_data->num != pinfo->fd->num) {
3334 if (spx_data->num != pinfo->fd->num) {
3335 if (check_col(pinfo->cinfo, COL_INFO))
3337 col_add_fstr(pinfo->cinfo, COL_INFO, "[Retransmission] Original Packet %d", spx_data->num);
3341 dissect_ndps(tvb, pinfo, tree);
3344 record_mark = tvb_get_ntohs(tvb, 0);
3345 ndps_length = tvb_get_ntohs(tvb, 2);
3347 if (ndps_length > tvb_length_remaining(tvb, 0) || ndps_fragmented || ndps_length==0)
3349 more_fragment = TRUE;
3350 ndps_fragmented = TRUE;
3355 tid = (pinfo->srcport+pinfo->destport);
3356 len = tvb_reported_length_remaining(tvb, 0);
3357 if ((frag_number + tvb_length_remaining(tvb, 0)-save_frag_length)<=10)
3359 more_fragment = FALSE;
3361 if (tvb_bytes_exist(tvb, 0, len))
3363 fd_head = fragment_add_seq_next(tvb, 0, pinfo, tid, ndps_fragment_table, ndps_reassembled_table, len, more_fragment);
3364 if (fd_head != NULL)
3366 if (fd_head->next != NULL)
3368 next_tvb = tvb_new_real_data(fd_head->data,
3369 fd_head->len, fd_head->len);
3370 tvb_set_child_real_data_tvbuff(tvb,
3372 add_new_data_source(pinfo,
3374 "Reassembled NDPS");
3375 /* Show all fragments. */
3378 show_fragment_seq_tree(fd_head,
3384 more_fragment = FALSE;
3385 save_frag_length = 0;
3387 ndps_fragmented=FALSE;
3391 next_tvb = tvb_new_subset(tvb, 0, -1, -1);
3396 if (save_frag_length == 0)
3398 save_frag_length = ndps_length; /* First Fragment */
3399 save_frag_seq = tid;
3401 if ((pinfo->srcport+pinfo->destport) == save_frag_seq)
3403 if (!pinfo->fd->flags.visited)
3405 frag_number += tvb_length_remaining(tvb, 0); /* Current offset */
3407 if (check_col(pinfo->cinfo, COL_INFO))
3411 col_append_fstr(pinfo->cinfo, COL_INFO, " [NDPS Fragment]");
3423 next_tvb = tvb_new_subset(tvb, 0, -1, -1);
3425 if (next_tvb == NULL)
3427 if ((pinfo->srcport+pinfo->destport) == save_frag_seq)
3429 next_tvb = tvb_new_subset (tvb, 0, -1, -1);
3430 call_dissector(ndps_data_handle, next_tvb, pinfo, tree);
3434 dissect_ndps(tvb, pinfo, tree);
3439 dissect_ndps(next_tvb, pinfo, tree);
3444 dissect_ndps(tvb, pinfo, tree);
3449 dissect_ndps_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3451 tcp_dissect_pdus(tvb, pinfo, tree, ndps_desegment, 4, get_ndps_pdu_len,
3457 dissect_ndps_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3459 proto_tree *ndps_tree = NULL;
3462 if (check_col(pinfo->cinfo, COL_PROTOCOL))
3463 col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS");
3465 if (check_col(pinfo->cinfo, COL_INFO))
3466 col_clear(pinfo->cinfo, COL_INFO);
3469 ti = proto_tree_add_item(tree, proto_ndps, tvb, 0, -1, FALSE);
3470 ndps_tree = proto_item_add_subtree(ti, ett_ndps);
3472 ndps_defrag(tvb, pinfo, ndps_tree);
3476 dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, guint32 ndps_prog, guint32 ndps_func, int foffset)
3478 ndps_req_hash_value *request_value = NULL;
3479 conversation_t *conversation;
3483 guint32 field_len=0;
3484 guint32 cred_type=0;
3485 guint32 resource_type=0;
3486 guint32 filter_type=0;
3487 guint32 print_type=0;
3488 guint32 qualified_name_type=0;
3489 guint32 data_type=0;
3491 guint32 number_of_items=0;
3492 guint32 number_of_items2=0;
3500 if (!pinfo->fd->flags.visited)
3503 /* This is the first time we've looked at this packet.
3504 Keep track of the Program and connection whence the request
3505 came, and the address and connection to which the request
3506 is being sent, so that we can match up calls with replies.
3507 (We don't include the sequence number, as we may want
3508 to have all packets over the same connection treated
3509 as being part of a single conversation so that we can
3510 let the user select that conversation to be displayed.) */
3512 conversation = find_conversation(&pinfo->src, &pinfo->dst,
3513 PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
3515 if (conversation == NULL)
3517 /* It's not part of any conversation - create a new one. */
3518 conversation = conversation_new(&pinfo->src, &pinfo->dst,
3519 PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
3522 request_value = ndps_hash_insert(conversation, (guint32) pinfo->srcport);
3523 request_value->ndps_prog = ndps_prog;
3524 request_value->ndps_func = ndps_func;
3525 request_value->ndps_frame_num = pinfo->fd->num;
3529 case 0x060976: /* Print */
3532 case 0x00000001: /* Bind PSM */
3533 proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
3536 name_len = tvb_get_ntohl(tvb, foffset);
3537 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
3543 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
3546 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
3548 case 0x00000002: /* Bind PA */
3549 /* Start of credentials */
3550 cred_type = tvb_get_ntohl(tvb, foffset);
3551 proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
3556 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
3557 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
3558 atree = proto_item_add_subtree(aitem, ett_ndps);
3560 for (i = 1 ; i <= number_of_items; i++ )
3562 length = tvb_get_ntohl(tvb, foffset);
3564 proto_tree_add_item(ndps_tree, hf_ndps_password, tvb, foffset, length, FALSE);
3569 length = tvb_get_ntohl(tvb, foffset);
3571 proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
3575 name_len = tvb_get_ntohl(tvb, foffset);
3576 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
3577 foffset += align_4(tvb, foffset);
3579 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
3584 name_len = tvb_get_ntohl(tvb, foffset);
3585 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
3586 foffset += align_4(tvb, foffset);
3588 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
3591 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
3594 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
3595 foffset += align_4(tvb, foffset);
3597 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
3600 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
3601 foffset += 8; /* Don't know what these 8 bytes signify */
3602 proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
3605 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
3606 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
3611 /* End of credentials */
3612 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
3614 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
3615 atree = proto_item_add_subtree(aitem, ett_ndps);
3617 for (i = 1 ; i <= number_of_items; i++ )
3619 length = tvb_get_ntohl(tvb, foffset);
3621 proto_tree_add_item(ndps_tree, hf_bind_security, tvb, foffset, length, FALSE);
3623 /* Start of QualifiedName */
3624 qualified_name_type = tvb_get_ntohl(tvb, foffset);
3625 proto_tree_add_uint(ndps_tree, hf_ndps_qualified_name, tvb, foffset,
3626 4, qualified_name_type);
3628 if (qualified_name_type != 0) {
3629 if (qualified_name_type == 1) {
3630 foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset);
3634 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
3635 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
3638 /* End of QualifiedName */
3640 case 0x00000003: /* Unbind */
3641 proto_tree_add_item(ndps_tree, hf_ndps_object, tvb, foffset,
3644 case 0x00000004: /* Print */
3645 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
3647 proto_tree_add_item(ndps_tree, hf_print_arg, tvb, foffset, 4, FALSE);
3648 print_type = tvb_get_ntohl(tvb, foffset);
3652 case 0: /* Create Job */
3653 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
3654 proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, FALSE);
3656 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Transfer Method");
3657 atree = proto_item_add_subtree(aitem, ett_ndps);
3658 number_of_items = tvb_get_ntohl(tvb, foffset);
3659 proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
3661 for (i = 1 ; i <= number_of_items; i++ )
3663 foffset = objectidentifier(tvb, atree, foffset);
3664 number_of_items2 = tvb_get_ntohl(tvb, foffset);
3665 bitem = proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
3666 btree = proto_item_add_subtree(bitem, ett_ndps);
3668 for (j = 1 ; j <= number_of_items2; j++ )
3670 foffset = attribute_value(tvb, btree, foffset);
3672 proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
3675 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Document Content");
3676 atree = proto_item_add_subtree(aitem, ett_ndps);
3677 number_of_items = tvb_get_ntohl(tvb, foffset);
3678 proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
3680 for (i = 1 ; i <= number_of_items; i++ )
3682 foffset = objectidentifier(tvb, atree, foffset);
3684 foffset += align_4(tvb, foffset);
3685 number_of_items = tvb_get_ntohl(tvb, foffset);
3686 proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
3688 proto_tree_add_item(atree, hf_doc_content, tvb, foffset, 4, FALSE);
3690 for (i = 1 ; i <= number_of_items; i++ )
3692 if (tvb_get_ntohl(tvb, foffset-4)==0)
3694 if (tvb_get_ntohl(tvb, foffset) > tvb_length_remaining(tvb, foffset)) /* Segmented Data */
3696 proto_tree_add_item(atree, hf_ndps_data, tvb, foffset, tvb_length_remaining(tvb, foffset), FALSE);
3699 proto_tree_add_item(atree, hf_ndps_included_doc, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), FALSE);
3700 foffset += tvb_get_ntohl(tvb, foffset)+4;
3701 foffset += (length%2);
3705 foffset = ndps_string(tvb, hf_ndps_ref_name, atree, foffset);
3706 foffset = name_or_id(tvb, atree, foffset);
3710 if (align_4(tvb, foffset)>0) {
3711 foffset += align_4(tvb, foffset);
3714 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Document Type");
3715 number_of_items = tvb_get_ntohl(tvb, foffset);
3716 atree = proto_item_add_subtree(aitem, ett_ndps);
3717 proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
3719 foffset = objectidentifier(tvb, atree, foffset);
3720 for (i = 1 ; i <= number_of_items; i++ )
3722 number_of_items2 = tvb_get_ntohl(tvb, foffset);
3723 bitem = proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
3724 btree = proto_item_add_subtree(bitem, ett_ndps);
3726 for (j = 1 ; j <= number_of_items2; j++ )
3728 foffset = attribute_value(tvb, btree, foffset);
3730 proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
3733 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Document Attributes");
3734 number_of_items = tvb_get_ntohl(tvb, foffset);
3735 atree = proto_item_add_subtree(aitem, ett_ndps);
3736 proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
3738 for (i = 1 ; i <= number_of_items; i++ )
3740 foffset = attribute_value(tvb, atree, foffset); /* Document Attributes */
3743 case 1: /* Add Job */
3744 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
3745 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
3747 proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, FALSE);
3749 number_of_items = tvb_get_ntohl(tvb, foffset);
3750 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Transfer Method");
3751 atree = proto_item_add_subtree(aitem, ett_ndps);
3752 proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
3754 for (i = 1 ; i <= number_of_items; i++ )
3756 foffset = objectidentifier(tvb, atree, foffset); /* Transfer Method */
3758 proto_tree_add_item(ndps_tree, hf_doc_content, tvb, foffset, 4, FALSE);
3760 number_of_items = tvb_get_ntohl(tvb, foffset);
3761 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Document Type");
3762 atree = proto_item_add_subtree(aitem, ett_ndps);
3763 proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
3765 for (i = 1 ; i <= number_of_items; i++ )
3767 foffset = objectidentifier(tvb, atree, foffset); /* Document Type */
3769 foffset += align_4(tvb, foffset);
3770 number_of_items = tvb_get_ntohl(tvb, foffset);
3771 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Document Attributes");
3772 atree = proto_item_add_subtree(aitem, ett_ndps);
3773 proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
3775 for (i = 1 ; i <= number_of_items; i++ )
3777 foffset = attribute_value(tvb, atree, foffset); /* Document Attributes */
3780 case 2: /* Close Job */
3781 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
3782 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
3789 case 0x00000005: /* Modify Job */
3790 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
3792 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
3793 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
3795 proto_tree_add_item(ndps_tree, hf_ndps_document_number, tvb, foffset, 4, FALSE);
3797 number_of_items = tvb_get_ntohl(tvb, foffset);
3798 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job Modifications");
3799 atree = proto_item_add_subtree(aitem, ett_ndps);
3800 proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
3802 for (i = 1 ; i <= number_of_items; i++ )
3804 foffset = attribute_value(tvb, atree, foffset); /* Job Modifications */
3806 number_of_items = tvb_get_ntohl(tvb, foffset);
3807 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Document Modifications");
3808 atree = proto_item_add_subtree(aitem, ett_ndps);
3809 proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
3811 for (i = 1 ; i <= number_of_items; i++ )
3813 foffset = attribute_value(tvb, atree, foffset); /* Document Modifications */
3816 case 0x00000006: /* Cancel Job */
3817 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
3819 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
3820 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
3822 proto_tree_add_item(ndps_tree, hf_ndps_document_number, tvb, foffset, 4, FALSE);
3824 number_of_items = tvb_get_ntohl(tvb, foffset);
3825 /* Start of nameorid */
3826 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Cancel Message");
3827 atree = proto_item_add_subtree(aitem, ett_ndps);
3828 foffset = name_or_id(tvb, atree, foffset);
3829 /* End of nameorid */
3830 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Retention Period");
3831 atree = proto_item_add_subtree(aitem, ett_ndps);
3832 proto_tree_add_item(atree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
3834 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3838 case 0x00000007: /* List Object Attributes */
3839 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
3841 proto_tree_add_item(ndps_tree, hf_ndps_attrs_arg, tvb, foffset, 4, FALSE);
3843 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Continuation */
3845 length = tvb_get_ntohl(tvb, foffset);
3846 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
3848 foffset += (length%2);
3849 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
3851 number_of_items = tvb_get_ntohl(tvb, foffset);
3852 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
3853 atree = proto_item_add_subtree(aitem, ett_ndps);
3855 for (i = 1 ; i <= number_of_items; i++ )
3857 foffset = attribute_value(tvb, atree, foffset);
3860 else /* Specification */
3862 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
3863 atree = proto_item_add_subtree(aitem, ett_ndps);
3864 foffset = objectidentifier(tvb, atree, foffset);
3866 foffset += align_4(tvb, foffset);
3867 proto_tree_add_item(ndps_tree, hf_ndps_scope, tvb, foffset, 4, FALSE);
3869 if (tvb_get_ntohl(tvb, foffset-4)!=0) /* Scope Does not equal 0 */
3871 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPSelector */
3872 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Selector Option");
3873 atree = proto_item_add_subtree(aitem, ett_ndps);
3874 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
3876 for (i = 1 ; i <= number_of_items; i++ )
3878 foffset = objectidentification(tvb, atree, foffset);
3880 foffset += align_4(tvb, foffset);
3882 proto_tree_add_item(ndps_tree, hf_ndps_filter, tvb, foffset, 4, FALSE);
3883 filter_type = tvb_get_ntohl(tvb, foffset);
3885 /*if (filter_type == 0 || filter_type == 3 )
3887 foffset = filteritem(tvb, ndps_tree, foffset);
3891 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
3892 atree = proto_item_add_subtree(aitem, ett_ndps);
3893 number_of_items = tvb_get_ntohl(tvb, foffset);
3895 for (i = 1 ; i <= number_of_items; i++ )
3897 foffset = filteritem(tvb, ndps_tree, foffset);
3900 proto_tree_add_item(ndps_tree, hf_ndps_time_limit, tvb, foffset, 4, FALSE);
3902 proto_tree_add_item(ndps_tree, hf_ndps_count_limit, tvb, foffset, 4, FALSE);
3903 foffset += 4; /* End of NWDPSelector */
3905 foffset += 4; /* Don't know what this is */
3906 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPObjectIdentifierSet */
3907 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Requested Attributes");
3908 atree = proto_item_add_subtree(aitem, ett_ndps);
3909 proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
3911 for (i = 1 ; i <= number_of_items; i++ )
3913 foffset = objectidentifier(tvb, atree, foffset);
3914 } /* End of NWDPObjectIdentifierSet */
3915 proto_tree_add_item(ndps_tree, hf_ndps_operator, tvb, foffset, 4, FALSE);
3917 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
3918 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
3919 atree = proto_item_add_subtree(aitem, ett_ndps);
3920 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
3922 for (i = 1 ; i <= number_of_items; i++ )
3924 foffset = attribute_value(tvb, atree, foffset);
3925 } /* NWDPCommonArguments */
3928 case 0x00000008: /* Promote Job */
3929 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
3931 /* Start of NWDPPrtContainedObjectId */
3932 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job ID");
3933 atree = proto_item_add_subtree(aitem, ett_ndps);
3934 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
3935 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
3937 /* End of NWDPPrtContainedObjectId */
3938 /* Start of nameorid */
3939 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Message Option");
3940 atree = proto_item_add_subtree(aitem, ett_ndps);
3941 foffset = name_or_id(tvb, atree, foffset);
3942 /* End of nameorid */
3943 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
3944 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
3945 atree = proto_item_add_subtree(aitem, ett_ndps);
3946 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
3948 for (i = 1 ; i <= number_of_items; i++ )
3950 foffset = attribute_value(tvb, atree, foffset);
3951 } /* NWDPCommonArguments */
3953 case 0x00000009: /* Interrupt */
3954 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
3956 proto_tree_add_item(ndps_tree, hf_interrupt_job_type, tvb, foffset, 4, FALSE);
3958 if (tvb_get_ntohl(tvb, foffset-4)==0)
3960 /* Start of NWDPPrtContainedObjectId */
3961 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job ID");
3962 atree = proto_item_add_subtree(aitem, ett_ndps);
3963 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
3964 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
3966 /* End of NWDPPrtContainedObjectId */
3970 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
3972 /* Start of nameorid */
3973 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Interrupt Message Option");
3974 atree = proto_item_add_subtree(aitem, ett_ndps);
3975 foffset = name_or_id(tvb, atree, foffset);
3976 /* End of nameorid */
3977 /* Start of NWDPPrtContainedObjectId */
3978 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Interrupting Job");
3979 atree = proto_item_add_subtree(aitem, ett_ndps);
3980 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
3981 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
3983 /* End of NWDPPrtContainedObjectId */
3984 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
3985 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
3986 atree = proto_item_add_subtree(aitem, ett_ndps);
3987 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
3989 for (i = 1 ; i <= number_of_items; i++ )
3991 foffset = attribute_value(tvb, atree, foffset);
3992 } /* NWDPCommonArguments */
3994 case 0x0000000a: /* Pause */
3995 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
3997 proto_tree_add_item(ndps_tree, hf_pause_job_type, tvb, foffset, 4, FALSE);
3999 if (tvb_get_ntohl(tvb, foffset-4)==0)
4001 /* Start of NWDPPrtContainedObjectId */
4002 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job ID");
4003 atree = proto_item_add_subtree(aitem, ett_ndps);
4004 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
4005 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4007 /* End of NWDPPrtContainedObjectId */
4011 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
4013 /* Start of nameorid */
4014 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Pause Message Option");
4015 atree = proto_item_add_subtree(aitem, ett_ndps);
4016 foffset = name_or_id(tvb, atree, foffset);
4017 /* End of nameorid */
4018 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4019 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4020 atree = proto_item_add_subtree(aitem, ett_ndps);
4021 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4023 for (i = 1 ; i <= number_of_items; i++ )
4025 foffset = attribute_value(tvb, atree, foffset);
4026 } /* NWDPCommonArguments */
4028 case 0x0000000b: /* Resume */
4029 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4031 /* Start of NWDPPrtContainedObjectId */
4032 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job ID");
4033 atree = proto_item_add_subtree(aitem, ett_ndps);
4034 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
4035 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4037 /* End of NWDPPrtContainedObjectId */
4038 /* Start of nameorid */
4039 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Resume Message Option");
4040 atree = proto_item_add_subtree(aitem, ett_ndps);
4041 foffset = name_or_id(tvb, atree, foffset);
4042 /* End of nameorid */
4043 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4044 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4045 atree = proto_item_add_subtree(aitem, ett_ndps);
4046 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4048 for (i = 1 ; i <= number_of_items; i++ )
4050 foffset = attribute_value(tvb, atree, foffset);
4051 } /* NWDPCommonArguments */
4053 case 0x0000000c: /* Clean */
4054 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4056 /* Start of nameorid */
4057 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Clean Message Option");
4058 atree = proto_item_add_subtree(aitem, ett_ndps);
4059 foffset = name_or_id(tvb, atree, foffset);
4060 /* End of nameorid */
4061 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4062 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4063 atree = proto_item_add_subtree(aitem, ett_ndps);
4064 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4066 for (i = 1 ; i <= number_of_items; i++ )
4068 foffset = attribute_value(tvb, atree, foffset);
4069 } /* NWDPCommonArguments */
4071 case 0x0000000d: /* Create */
4072 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4074 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
4075 atree = proto_item_add_subtree(aitem, ett_ndps);
4076 foffset = objectidentifier(tvb, atree, foffset);
4077 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
4078 atree = proto_item_add_subtree(aitem, ett_ndps);
4079 foffset = objectidentification(tvb, atree, foffset);
4080 proto_tree_add_item(ndps_tree, hf_ndps_force, tvb, foffset, 4, FALSE);
4082 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Reference Object Option");
4083 atree = proto_item_add_subtree(aitem, ett_ndps);
4084 foffset = objectidentification(tvb, atree, foffset);
4085 /* Start of AttributeSet */
4086 number_of_items = tvb_get_ntohl(tvb, foffset);
4087 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Attribute");
4088 atree = proto_item_add_subtree(aitem, ett_ndps);
4089 proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
4091 for (i = 1 ; i <= number_of_items; i++ )
4093 foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
4095 /* End of AttributeSet */
4096 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4097 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4098 atree = proto_item_add_subtree(aitem, ett_ndps);
4099 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4101 for (i = 1 ; i <= number_of_items; i++ )
4103 foffset = attribute_value(tvb, atree, foffset);
4104 } /* NWDPCommonArguments */
4106 case 0x0000000e: /* Delete */
4107 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4109 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
4110 atree = proto_item_add_subtree(aitem, ett_ndps);
4111 foffset = objectidentifier(tvb, atree, foffset);
4112 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
4113 atree = proto_item_add_subtree(aitem, ett_ndps);
4114 foffset = objectidentification(tvb, atree, foffset);
4115 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4116 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4117 atree = proto_item_add_subtree(aitem, ett_ndps);
4118 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4120 for (i = 1 ; i <= number_of_items; i++ )
4122 foffset = attribute_value(tvb, atree, foffset);
4123 } /* NWDPCommonArguments */
4125 case 0x0000000f: /* Disable PA */
4126 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4128 /* Start of NameorID */
4129 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Disable PA Message Option");
4130 atree = proto_item_add_subtree(aitem, ett_ndps);
4131 foffset = name_or_id(tvb, atree, foffset);
4132 /* End of NameorID */
4133 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4134 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4135 atree = proto_item_add_subtree(aitem, ett_ndps);
4136 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4138 for (i = 1 ; i <= number_of_items; i++ )
4140 foffset = attribute_value(tvb, atree, foffset);
4141 } /* NWDPCommonArguments */
4143 case 0x00000010: /* Enable PA */
4144 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4146 /* Start of NameorID */
4147 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Enable PA Message Option");
4148 atree = proto_item_add_subtree(aitem, ett_ndps);
4149 foffset = name_or_id(tvb, atree, foffset);
4150 /* End of NameorID */
4151 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4152 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4153 atree = proto_item_add_subtree(aitem, ett_ndps);
4154 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4156 for (i = 1 ; i <= number_of_items; i++ )
4158 foffset = attribute_value(tvb, atree, foffset);
4159 } /* NWDPCommonArguments */
4161 case 0x00000011: /* Resubmit Jobs */
4162 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4164 /* Start of QualifiedName */
4165 qualified_name_type = tvb_get_ntohl(tvb, foffset);
4166 proto_tree_add_uint(ndps_tree, hf_ndps_qualified_name, tvb, foffset,
4167 4, qualified_name_type);
4169 if (qualified_name_type != 0) {
4170 if (qualified_name_type == 1) {
4171 foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset);
4175 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
4176 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
4179 /* End of QualifiedName */
4180 foffset = address_item(tvb, ndps_tree, foffset);
4181 proto_tree_add_item(ndps_tree, hf_resubmit_op_type, tvb, foffset, 4, FALSE);
4183 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of ResubmitJob Set */
4184 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Resubmit Job");
4185 atree = proto_item_add_subtree(aitem, ett_ndps);
4186 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4188 for (i = 1 ; i <= number_of_items; i++ )
4190 /* Start of NWDPPrtContainedObjectId */
4191 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Job ID");
4192 btree = proto_item_add_subtree(bitem, ett_ndps);
4193 foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset);
4194 proto_tree_add_item(btree, hf_local_id, tvb, foffset, 4, FALSE);
4196 /* End of NWDPPrtContainedObjectId */
4197 proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset, 4, FALSE);
4199 /* Start of AttributeSet */
4200 number_of_items = tvb_get_ntohl(tvb, foffset);
4201 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Job Attributes");
4202 btree = proto_item_add_subtree(bitem, ett_ndps);
4203 proto_tree_add_item(btree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
4205 for (i = 1 ; i <= number_of_items; i++ )
4207 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
4209 /* End of AttributeSet */
4210 /* Start of AttributeSet */
4211 number_of_items = tvb_get_ntohl(tvb, foffset);
4212 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Document Attributes");
4213 btree = proto_item_add_subtree(bitem, ett_ndps);
4214 proto_tree_add_item(btree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
4216 for (i = 1 ; i <= number_of_items; i++ )
4218 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
4220 /* End of AttributeSet */
4221 } /* End of ResubmitJob Set */
4222 /* Start of NameorID */
4223 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Resubmit Message Option");
4224 atree = proto_item_add_subtree(aitem, ett_ndps);
4225 foffset = name_or_id(tvb, atree, foffset);
4226 /* End of NameorID */
4227 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4228 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4229 atree = proto_item_add_subtree(aitem, ett_ndps);
4230 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4232 for (i = 1 ; i <= number_of_items; i++ )
4234 foffset = attribute_value(tvb, atree, foffset);
4235 } /* NWDPCommonArguments */
4237 case 0x00000012: /* Set */
4238 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4240 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
4241 atree = proto_item_add_subtree(aitem, ett_ndps);
4242 foffset = objectidentifier(tvb, atree, foffset);
4243 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
4244 atree = proto_item_add_subtree(aitem, ett_ndps);
4245 foffset = objectidentification(tvb, atree, foffset);
4246 /* Start of AttributeSet */
4247 number_of_items = tvb_get_ntohl(tvb, foffset);
4248 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Attribute Modifications");
4249 atree = proto_item_add_subtree(aitem, ett_ndps);
4250 proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
4252 for (i = 1 ; i <= number_of_items; i++ )
4254 foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
4256 /* End of AttributeSet */
4257 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4258 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4259 atree = proto_item_add_subtree(aitem, ett_ndps);
4260 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4262 for (i = 1 ; i <= number_of_items; i++ )
4264 foffset = attribute_value(tvb, atree, foffset);
4265 } /* NWDPCommonArguments */
4267 case 0x00000013: /* Shutdown PA */
4268 case 0x0000001e: /* Shutdown PSM */
4269 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4271 proto_tree_add_item(ndps_tree, hf_shutdown_type, tvb, foffset, 4, FALSE);
4273 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
4274 /* Start of NameorID */
4275 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Shutdown Message Option");
4276 atree = proto_item_add_subtree(aitem, ett_ndps);
4277 foffset = name_or_id(tvb, atree, foffset);
4278 /* End of NameorID */
4279 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4280 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4281 atree = proto_item_add_subtree(aitem, ett_ndps);
4282 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4284 for (i = 1 ; i <= number_of_items; i++ )
4286 foffset = attribute_value(tvb, atree, foffset);
4287 } /* NWDPCommonArguments */
4289 case 0x00000014: /* Startup PA */
4290 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4292 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
4293 /* Start of NameorID */
4294 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Startup Message Option");
4295 atree = proto_item_add_subtree(aitem, ett_ndps);
4296 foffset = name_or_id(tvb, atree, foffset);
4297 /* End of NameorID */
4298 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4299 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4300 atree = proto_item_add_subtree(aitem, ett_ndps);
4301 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4303 for (i = 1 ; i <= number_of_items; i++ )
4305 foffset = attribute_value(tvb, atree, foffset);
4306 } /* NWDPCommonArguments */
4308 case 0x00000015: /* Reorder Job */
4309 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4311 /* Start of NWDPPrtContainedObjectId */
4312 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job Identification");
4313 atree = proto_item_add_subtree(aitem, ett_ndps);
4314 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
4315 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4317 /* End of NWDPPrtContainedObjectId */
4318 /* Start of NWDPPrtContainedObjectId */
4319 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Reference Job ID");
4320 atree = proto_item_add_subtree(aitem, ett_ndps);
4321 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
4322 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4324 /* End of NWDPPrtContainedObjectId */
4325 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4326 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4327 atree = proto_item_add_subtree(aitem, ett_ndps);
4328 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4330 for (i = 1 ; i <= number_of_items; i++ )
4332 foffset = attribute_value(tvb, atree, foffset);
4333 } /* NWDPCommonArguments */
4335 case 0x00000016: /* Pause PA */
4336 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4338 /* Start of NameorID */
4339 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Pause Message Option");
4340 atree = proto_item_add_subtree(aitem, ett_ndps);
4341 foffset = name_or_id(tvb, atree, foffset);
4342 /* End of NameorID */
4343 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4344 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4345 atree = proto_item_add_subtree(aitem, ett_ndps);
4346 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4348 for (i = 1 ; i <= number_of_items; i++ )
4350 foffset = attribute_value(tvb, atree, foffset);
4351 } /* NWDPCommonArguments */
4353 case 0x00000017: /* Resume PA */
4354 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4356 /* Start of NameorID */
4357 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Resume Message Option");
4358 atree = proto_item_add_subtree(aitem, ett_ndps);
4359 foffset = name_or_id(tvb, atree, foffset);
4360 /* End of NameorID */
4361 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4362 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4363 atree = proto_item_add_subtree(aitem, ett_ndps);
4364 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4366 for (i = 1 ; i <= number_of_items; i++ )
4368 foffset = attribute_value(tvb, atree, foffset);
4369 } /* NWDPCommonArguments */
4371 case 0x00000018: /* Transfer Data */
4372 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4374 proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, FALSE);
4376 proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), FALSE);
4378 case 0x00000019: /* Device Control */
4379 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4381 /* Start of Object Identifier */
4382 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Operation ID");
4383 atree = proto_item_add_subtree(aitem, ett_ndps);
4384 foffset = objectidentifier(tvb, atree, foffset);
4385 /* End of Object Identifier */
4386 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4387 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4388 atree = proto_item_add_subtree(aitem, ett_ndps);
4389 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4391 for (i = 1 ; i <= number_of_items; i++ )
4393 foffset = attribute_value(tvb, atree, foffset);
4394 } /* NWDPCommonArguments */
4396 case 0x0000001a: /* Add Event Profile */
4397 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4399 /* Start of Eventhandling */
4400 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
4402 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
4404 /* Start of QualifiedName */
4405 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Consumer Name");
4406 atree = proto_item_add_subtree(aitem, ett_ndps);
4407 qualified_name_type = tvb_get_ntohl(tvb, foffset);
4408 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
4409 4, qualified_name_type);
4411 if (qualified_name_type != 0) {
4412 if (qualified_name_type == 1) {
4413 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
4417 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
4418 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
4421 /* End of QualifiedName */
4422 length = tvb_get_ntohl(tvb, foffset);
4424 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
4426 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
4428 /* Start of NameorID */
4429 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
4430 atree = proto_item_add_subtree(aitem, ett_ndps);
4431 foffset = name_or_id(tvb, atree, foffset);
4432 /* End of NameorID */
4433 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Delivery Address");
4434 atree = proto_item_add_subtree(aitem, ett_ndps);
4435 number_of_items = tvb_get_ntohl(tvb, foffset);
4436 for (i = 1 ; i <= number_of_items; i++ )
4438 foffset += address_item(tvb, atree, foffset);
4440 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
4441 atree = proto_item_add_subtree(aitem, ett_ndps);
4442 number_of_items = tvb_get_ntohl(tvb, foffset);
4443 for (i = 1 ; i <= number_of_items; i++ )
4445 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
4447 foffset = objectidentifier(tvb, atree, foffset);
4448 foffset = objectidentification(tvb, atree, foffset);
4449 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
4452 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
4454 if(tvb_get_ntohl(tvb, foffset-4)==1)
4456 foffset = objectidentifier(tvb, atree, foffset);
4460 if(tvb_get_ntohl(tvb, foffset-4)==0)
4462 number_of_items2 = tvb_get_ntohl(tvb, foffset);
4463 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
4465 for (j = 1 ; j <= number_of_items2; j++ )
4467 foffset = objectidentifier(tvb, atree, foffset);
4472 /* End of Eventhandling */
4473 /* Start of QualifiedName */
4474 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Account");
4475 atree = proto_item_add_subtree(aitem, ett_ndps);
4476 qualified_name_type = tvb_get_ntohl(tvb, foffset);
4477 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
4478 4, qualified_name_type);
4480 if (qualified_name_type != 0) {
4481 if (qualified_name_type == 1) {
4482 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
4486 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
4487 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
4490 /* End of QualifiedName */
4492 case 0x0000001b: /* Remove Event Profile */
4493 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4495 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
4498 case 0x0000001c: /* Modify Event Profile */
4499 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4501 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
4503 proto_tree_add_item(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, FALSE);
4505 if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
4507 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier ID");
4508 atree = proto_item_add_subtree(aitem, ett_ndps);
4509 length = tvb_get_ntohl(tvb, foffset);
4511 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
4514 aitem = proto_tree_add_item(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, FALSE);
4515 atree = proto_item_add_subtree(aitem, ett_ndps);
4517 if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
4519 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
4522 aitem = proto_tree_add_item(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, FALSE);
4523 atree = proto_item_add_subtree(aitem, ett_ndps);
4525 if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
4527 /* Start of NameorID */
4528 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Method ID");
4529 btree = proto_item_add_subtree(bitem, ett_ndps);
4530 foffset = name_or_id(tvb, btree, foffset);
4531 /* End of NameorID */
4533 aitem = proto_tree_add_item(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, FALSE);
4534 atree = proto_item_add_subtree(aitem, ett_ndps);
4536 if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
4538 foffset = print_address(tvb, atree, foffset);
4540 /* Start of EventObjectSet */
4541 length = tvb_get_ntohl(tvb, foffset); /* Len of record */
4544 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
4545 atree = proto_item_add_subtree(aitem, ett_ndps);
4546 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
4548 /* Start of objectidentifier */
4549 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Class ID");
4550 btree = proto_item_add_subtree(bitem, ett_ndps);
4551 foffset = objectidentifier(tvb, btree, foffset);
4552 /* End of objectidentifier */
4553 /* Start of objectidentification */
4554 bitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
4555 btree = proto_item_add_subtree(bitem, ett_ndps);
4556 foffset = objectidentification(tvb, btree, foffset);
4557 /* End of objectidentification */
4558 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
4560 /* Start of ObjectItem */
4561 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
4563 if(tvb_get_ntohl(tvb, foffset-4)==1)
4565 foffset = objectidentifier(tvb, atree, foffset);
4569 if(tvb_get_ntohl(tvb, foffset-4)==0)
4571 number_of_items = tvb_get_ntohl(tvb, foffset);
4572 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
4574 for (j = 1 ; j <= number_of_items; j++ )
4576 foffset = objectidentifier(tvb, atree, foffset);
4580 /* End of ObjectItem */
4582 /* End of EventObjectSet */
4584 case 0x0000001d: /* List Event Profiles */
4585 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4587 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, FALSE);
4589 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Spec */
4591 /* Start of QualifiedName */
4592 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier Alias");
4593 atree = proto_item_add_subtree(aitem, ett_ndps);
4594 qualified_name_type = tvb_get_ntohl(tvb, foffset);
4595 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
4596 4, qualified_name_type);
4598 if (qualified_name_type != 0) {
4599 if (qualified_name_type == 1) {
4600 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
4604 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
4605 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
4608 /* End of QualifiedName */
4609 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, FALSE);
4611 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Choice */
4613 /* Start of CardinalSeq */
4614 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4615 number_of_items = tvb_get_ntohl(tvb, foffset);
4617 for (i = 1 ; i <= number_of_items; i++ )
4619 length = tvb_get_ntohl(tvb, foffset);
4621 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
4623 foffset += (length%2);
4625 /* End of CardinalSeq */
4629 /* Start of QualifiedName */
4630 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Consumer");
4631 atree = proto_item_add_subtree(aitem, ett_ndps);
4632 qualified_name_type = tvb_get_ntohl(tvb, foffset);
4633 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
4634 4, qualified_name_type);
4636 if (qualified_name_type != 0) {
4637 if (qualified_name_type == 1) {
4638 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
4642 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
4643 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
4646 /* End of QualifiedName */
4647 /* Start of NameorID */
4648 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
4649 atree = proto_item_add_subtree(aitem, ett_ndps);
4650 foffset = name_or_id(tvb, atree, foffset);
4651 /* End of NameorID */
4652 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
4655 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, FALSE);
4657 /* Start of integeroption */
4658 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, FALSE);
4660 if (tvb_get_ntohl(tvb, foffset-4)!=0)
4662 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
4665 /* End of integeroption */
4669 length = tvb_get_ntohl(tvb, foffset);
4670 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
4672 foffset += (length%2);
4673 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
4677 case 0x0000001f: /* Cancel PSM Shutdown */
4678 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4680 /* Start of NameorID */
4681 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Cancel Shutdown Message Option");
4682 atree = proto_item_add_subtree(aitem, ett_ndps);
4683 foffset = name_or_id(tvb, atree, foffset);
4684 /* End of NameorID */
4685 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4686 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4687 atree = proto_item_add_subtree(aitem, ett_ndps);
4688 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4690 for (i = 1 ; i <= number_of_items; i++ )
4692 foffset = attribute_value(tvb, atree, foffset);
4693 } /* NWDPCommonArguments */
4695 case 0x00000020: /* Set Printer DS Information */
4696 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4698 proto_tree_add_item(ndps_tree, hf_ndps_ds_info_type, tvb, foffset, 4, FALSE);
4700 foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset);
4701 /* Start of QualifiedName */
4702 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "DS Object Name");
4703 atree = proto_item_add_subtree(aitem, ett_ndps);
4704 qualified_name_type = tvb_get_ntohl(tvb, foffset);
4705 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
4706 4, qualified_name_type);
4708 if (qualified_name_type != 0) {
4709 if (qualified_name_type == 1) {
4710 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
4714 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
4715 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
4718 /* End of QualifiedName */
4720 case 0x00000021: /* Clean User Jobs */
4721 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4723 /* Start of NameorID */
4724 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Clean Message Option");
4725 atree = proto_item_add_subtree(aitem, ett_ndps);
4726 foffset = name_or_id(tvb, atree, foffset);
4727 /* End of NameorID */
4728 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPCommonArguments */
4729 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Common Arguments");
4730 atree = proto_item_add_subtree(aitem, ett_ndps);
4731 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4733 for (i = 1 ; i <= number_of_items; i++ )
4735 foffset = attribute_value(tvb, atree, foffset);
4736 } /* NWDPCommonArguments */
4738 case 0x00000022: /* Map GUID to NDS Name */
4739 length = tvb_get_ntohl(tvb, foffset);
4741 proto_tree_add_item(ndps_tree, hf_ndps_guid, tvb, foffset, length, FALSE);
4748 case 0x060977: /* Broker */
4751 case 0x00000001: /* Bind */
4752 /* Start of credentials */
4753 cred_type = tvb_get_ntohl(tvb, foffset);
4754 proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
4759 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
4760 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4761 atree = proto_item_add_subtree(aitem, ett_ndps);
4763 for (i = 1 ; i <= number_of_items; i++ )
4765 length = tvb_get_ntohl(tvb, foffset);
4767 proto_tree_add_item(ndps_tree, hf_ndps_password, tvb, foffset, length, FALSE);
4772 length = tvb_get_ntohl(tvb, foffset);
4774 proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
4778 name_len = tvb_get_ntohl(tvb, foffset);
4779 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
4780 foffset += align_4(tvb, foffset);
4782 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
4787 name_len = tvb_get_ntohl(tvb, foffset);
4788 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
4789 foffset += align_4(tvb, foffset);
4791 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
4794 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
4797 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
4798 foffset += align_4(tvb, foffset);
4800 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
4803 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
4804 foffset += 8; /* Don't know what these 8 bytes signify */
4805 proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
4808 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
4809 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
4814 /* End of credentials */
4815 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
4817 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4818 atree = proto_item_add_subtree(aitem, ett_ndps);
4820 for (i = 1 ; i <= number_of_items; i++ )
4822 length = tvb_get_ntohl(tvb, foffset);
4824 proto_tree_add_item(ndps_tree, hf_bind_security, tvb, foffset, length, FALSE);
4827 case 0x00000002: /* Unbind */
4829 case 0x00000003: /* List Services */
4830 proto_tree_add_item(ndps_tree, hf_ndps_list_services_type, tvb, foffset, 4, FALSE);
4833 case 0x00000004: /* Enable Service */
4834 proto_tree_add_item(ndps_tree, hf_ndps_service_type, tvb, foffset, 4, FALSE);
4836 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Parameters");
4837 atree = proto_item_add_subtree(aitem, ett_ndps);
4838 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4840 for (i = 1 ; i <= number_of_items; i++ )
4842 length = tvb_get_ntohl(tvb, foffset);
4844 proto_tree_add_item(ndps_tree, hf_ndps_item_bytes, tvb, foffset, length, FALSE);
4848 case 0x00000005: /* Disable Service */
4849 proto_tree_add_item(ndps_tree, hf_ndps_list_services_type, tvb, foffset, 4, FALSE);
4852 case 0x00000006: /* Down Broker */
4853 case 0x00000007: /* Get Broker NDS Object Name */
4854 case 0x00000008: /* Get Broker Session Information */
4859 case 0x060978: /* Registry */
4862 case 0x00000001: /* Bind */
4863 /* Start of credentials */
4864 cred_type = tvb_get_ntohl(tvb, foffset);
4865 proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
4870 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
4871 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4872 atree = proto_item_add_subtree(aitem, ett_ndps);
4874 for (i = 1 ; i <= number_of_items; i++ )
4876 length = tvb_get_ntohl(tvb, foffset);
4878 proto_tree_add_item(ndps_tree, hf_ndps_password, tvb, foffset, length, FALSE);
4883 length = tvb_get_ntohl(tvb, foffset);
4885 proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
4889 name_len = tvb_get_ntohl(tvb, foffset);
4890 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
4891 foffset += align_4(tvb, foffset);
4893 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
4898 name_len = tvb_get_ntohl(tvb, foffset);
4899 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
4900 foffset += align_4(tvb, foffset);
4902 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
4905 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
4908 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
4909 foffset += align_4(tvb, foffset);
4911 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
4914 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
4915 foffset += 8; /* Don't know what these 8 bytes signify */
4916 proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
4919 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
4920 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
4925 /* End of credentials */
4926 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
4928 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4929 atree = proto_item_add_subtree(aitem, ett_ndps);
4931 for (i = 1 ; i <= number_of_items; i++ )
4933 length = tvb_get_ntohl(tvb, foffset);
4935 proto_tree_add_item(ndps_tree, hf_bind_security, tvb, foffset, length, FALSE);
4938 case 0x00000002: /* Unbind */
4940 case 0x00000003: /* Register Server */
4941 /* Start of Server Entry */
4942 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
4943 aitem = proto_tree_add_item(ndps_tree, hf_ndps_server_type, tvb, foffset, 4, FALSE);
4944 atree = proto_item_add_subtree(aitem, ett_ndps);
4946 foffset = print_address(tvb, atree, foffset);
4947 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Server Info");
4948 btree = proto_item_add_subtree(bitem, ett_ndps);
4949 number_of_items2 = tvb_get_ntohl(tvb, foffset);
4950 proto_tree_add_item(btree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
4952 for (j = 1 ; j <= number_of_items2; j++ )
4954 data_type = tvb_get_ntohl(tvb, foffset);
4955 proto_tree_add_item(btree, hf_ndps_data_item_type, tvb, foffset, 4, FALSE);
4960 proto_tree_add_item(btree, hf_info_int, tvb, foffset, 1, FALSE);
4964 proto_tree_add_item(btree, hf_info_int16, tvb, foffset, 2, FALSE);
4968 proto_tree_add_item(btree, hf_info_int32, tvb, foffset, 4, FALSE);
4971 case 3: /* Boolean */
4972 proto_tree_add_item(btree, hf_info_boolean, tvb, foffset, 4, FALSE);
4975 case 4: /* String */
4977 foffset = ndps_string(tvb, hf_info_string, btree, foffset);
4979 /*length = tvb_get_ntohl(tvb, foffset);
4981 proto_tree_add_item(btree, hf_info_bytes, tvb, foffset, length, FALSE);
4983 foffset += (length%4);*/
4989 /* End of Server Entry */
4991 case 0x00000004: /* Deregister Server */
4992 case 0x00000006: /* Deregister Registry */
4993 case 0x0000000b: /* Get Registry NDS Object Name */
4994 case 0x0000000c: /* Get Registry Session Information */
4997 case 0x00000005: /* Register Registry */
4998 foffset = ndps_string(tvb, hf_ndps_registry_name, ndps_tree, foffset);
4999 foffset = print_address(tvb, ndps_tree, foffset);
5001 case 0x00000007: /* Registry Update */
5002 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Add");
5003 atree = proto_item_add_subtree(aitem, ett_ndps);
5004 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
5006 for (i = 1 ; i <= number_of_items; i++ )
5008 /* Start of Server Entry */
5009 foffset = ndps_string(tvb, hf_ndps_server_name, atree, foffset);
5010 bitem = proto_tree_add_item(atree, hf_ndps_server_type, tvb, foffset, 4, FALSE);
5011 btree = proto_item_add_subtree(bitem, ett_ndps);
5013 foffset = print_address(tvb, btree, foffset);
5014 citem = proto_tree_add_text(btree, tvb, foffset, 0, "Server Info");
5015 ctree = proto_item_add_subtree(citem, ett_ndps);
5016 number_of_items2 = tvb_get_ntohl(tvb, foffset);
5017 proto_tree_add_item(ctree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
5019 for (j = 1 ; j <= number_of_items2; j++ )
5021 data_type = tvb_get_ntohl(tvb, foffset);
5022 proto_tree_add_item(ctree, hf_ndps_data_item_type, tvb, foffset, 4, FALSE);
5027 proto_tree_add_item(ctree, hf_info_int, tvb, foffset, 1, FALSE);
5031 proto_tree_add_item(ctree, hf_info_int16, tvb, foffset, 2, FALSE);
5035 proto_tree_add_item(ctree, hf_info_int32, tvb, foffset, 4, FALSE);
5038 case 3: /* Boolean */
5039 proto_tree_add_item(ctree, hf_info_boolean, tvb, foffset, 4, FALSE);
5042 case 4: /* String */
5044 foffset = ndps_string(tvb, hf_info_string, ctree, foffset);
5046 /*length = tvb_get_ntohl(tvb, foffset);
5048 proto_tree_add_item(ctree, hf_info_bytes, tvb, foffset, length, FALSE);
5050 foffset += (length%4);*/
5056 /* End of Server Entry */
5058 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Remove");
5059 atree = proto_item_add_subtree(aitem, ett_ndps);
5060 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
5062 for (i = 1 ; i <= number_of_items; i++ )
5064 /* Start of Server Entry */
5065 foffset = ndps_string(tvb, hf_ndps_server_name, atree, foffset);
5066 bitem = proto_tree_add_item(atree, hf_ndps_server_type, tvb, foffset, 4, FALSE);
5067 btree = proto_item_add_subtree(bitem, ett_ndps);
5069 foffset = print_address(tvb, btree, foffset);
5070 citem = proto_tree_add_text(btree, tvb, foffset, 0, "Server Info");
5071 ctree = proto_item_add_subtree(citem, ett_ndps);
5072 number_of_items2 = tvb_get_ntohl(tvb, foffset);
5073 proto_tree_add_item(ctree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
5075 for (j = 1 ; j <= number_of_items2; j++ )
5077 data_type = tvb_get_ntohl(tvb, foffset);
5078 proto_tree_add_item(ctree, hf_ndps_data_item_type, tvb, foffset, 4, FALSE);
5083 proto_tree_add_item(ctree, hf_info_int, tvb, foffset, 1, FALSE);
5087 proto_tree_add_item(ctree, hf_info_int16, tvb, foffset, 2, FALSE);
5091 proto_tree_add_item(ctree, hf_info_int32, tvb, foffset, 4, FALSE);
5094 case 3: /* Boolean */
5095 proto_tree_add_item(ctree, hf_info_boolean, tvb, foffset, 4, FALSE);
5098 case 4: /* String */
5100 foffset = ndps_string(tvb, hf_info_string, ctree, foffset);
5102 /*length = tvb_get_ntohl(tvb, foffset);
5104 proto_tree_add_item(ctree, hf_info_bytes, tvb, foffset, length, FALSE);
5106 foffset += (length%4);*/
5112 /* End of Server Entry */
5115 case 0x00000008: /* List Local Servers */
5116 case 0x00000009: /* List Servers */
5117 case 0x0000000a: /* List Known Registries */
5118 proto_tree_add_item(ndps_tree, hf_ndps_list_local_servers_type, tvb, foffset, 4, FALSE);
5120 if (tvb_get_ntohl(tvb, foffset-4)==0)
5122 /* Start of integeroption */
5123 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, FALSE);
5125 if (tvb_get_ntohl(tvb, foffset-4)!=0)
5127 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
5130 /* End of integeroption */
5134 length = tvb_get_ntohl(tvb, foffset);
5135 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
5137 foffset += (length%2);
5138 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
5146 case 0x060979: /* Notify */
5149 case 0x00000001: /* Notify Bind */
5150 /* Start of credentials */
5151 cred_type = tvb_get_ntohl(tvb, foffset);
5152 proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
5157 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
5158 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
5159 atree = proto_item_add_subtree(aitem, ett_ndps);
5161 for (i = 1 ; i <= number_of_items; i++ )
5163 length = tvb_get_ntohl(tvb, foffset);
5165 proto_tree_add_item(ndps_tree, hf_ndps_password, tvb, foffset, length, FALSE);
5170 length = tvb_get_ntohl(tvb, foffset);
5172 proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
5176 name_len = tvb_get_ntohl(tvb, foffset);
5177 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
5178 foffset += align_4(tvb, foffset);
5180 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
5185 name_len = tvb_get_ntohl(tvb, foffset);
5186 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
5187 foffset += align_4(tvb, foffset);
5189 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
5192 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
5195 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
5196 foffset += align_4(tvb, foffset);
5198 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
5201 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
5202 foffset += 8; /* Don't know what these 8 bytes signify */
5203 proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
5206 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
5207 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
5212 /* End of credentials */
5213 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
5215 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
5216 atree = proto_item_add_subtree(aitem, ett_ndps);
5218 for (i = 1 ; i <= number_of_items; i++ )
5220 length = tvb_get_ntohl(tvb, foffset);
5222 proto_tree_add_item(ndps_tree, hf_bind_security, tvb, foffset, length, FALSE);
5225 case 0x00000002: /* Notify Unbind */
5226 case 0x0000000a: /* List Supported Languages */
5227 case 0x00000010: /* Get Notify NDS Object Name */
5228 case 0x00000011: /* Get Notify Session Information */
5231 case 0x00000003: /* Register Supplier */
5232 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset);
5233 /* Start of QualifiedName Set*/
5234 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
5235 atree = proto_item_add_subtree(aitem, ett_ndps);
5237 for (i = 1 ; i <= number_of_items; i++ )
5239 /* Start of QualifiedName */
5240 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Supplier Alias");
5241 btree = proto_item_add_subtree(bitem, ett_ndps);
5242 qualified_name_type = tvb_get_ntohl(tvb, foffset);
5243 proto_tree_add_uint(btree, hf_ndps_qualified_name, tvb, foffset,
5244 4, qualified_name_type);
5246 if (qualified_name_type != 0) {
5247 if (qualified_name_type == 1) {
5248 foffset = ndps_string(tvb, hf_printer_name, btree, foffset);
5252 foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset);
5253 foffset = ndps_string(tvb, hf_ndps_tree, btree, foffset);
5256 /* End of QualifiedName */
5258 /* End of QualifiedName Set*/
5260 case 0x00000004: /* Deregister Supplier */
5261 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5264 case 0x00000005: /* Add Profile */
5265 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5267 /* Start of QualifiedName */
5268 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier Alias");
5269 atree = proto_item_add_subtree(aitem, ett_ndps);
5270 qualified_name_type = tvb_get_ntohl(tvb, foffset);
5271 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
5272 4, qualified_name_type);
5274 if (qualified_name_type != 0) {
5275 if (qualified_name_type == 1) {
5276 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
5280 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
5281 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
5284 /* End of QualifiedName */
5285 /* Start of Eventhandling */
5286 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5288 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
5290 /* Start of QualifiedName */
5291 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Consumer Name");
5292 atree = proto_item_add_subtree(aitem, ett_ndps);
5293 qualified_name_type = tvb_get_ntohl(tvb, foffset);
5294 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
5295 4, qualified_name_type);
5297 if (qualified_name_type != 0) {
5298 if (qualified_name_type == 1) {
5299 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
5303 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
5304 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
5307 /* End of QualifiedName */
5308 length = tvb_get_ntohl(tvb, foffset);
5310 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
5312 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5314 /* Start of NameorID */
5315 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
5316 atree = proto_item_add_subtree(aitem, ett_ndps);
5317 foffset = name_or_id(tvb, atree, foffset);
5318 /* End of NameorID */
5319 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Delivery Address");
5320 atree = proto_item_add_subtree(aitem, ett_ndps);
5321 number_of_items = tvb_get_ntohl(tvb, foffset);
5322 for (i = 1 ; i <= number_of_items; i++ )
5324 foffset += address_item(tvb, atree, foffset);
5326 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
5327 atree = proto_item_add_subtree(aitem, ett_ndps);
5328 number_of_items = tvb_get_ntohl(tvb, foffset);
5329 for (i = 1 ; i <= number_of_items; i++ )
5331 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
5333 foffset = objectidentifier(tvb, atree, foffset);
5334 foffset = objectidentification(tvb, atree, foffset);
5335 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
5338 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
5340 if(tvb_get_ntohl(tvb, foffset-4)==1)
5342 foffset = objectidentifier(tvb, atree, foffset);
5346 if(tvb_get_ntohl(tvb, foffset-4)==0)
5348 number_of_items2 = tvb_get_ntohl(tvb, foffset);
5349 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
5351 for (j = 1 ; j <= number_of_items2; j++ )
5353 foffset = objectidentifier(tvb, atree, foffset);
5358 /* End of Eventhandling */
5360 case 0x00000006: /* Remove Profile */
5361 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5363 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5366 case 0x00000007: /* Modify Profile */
5367 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5369 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5371 proto_tree_add_item(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, FALSE);
5373 if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
5375 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier ID");
5376 atree = proto_item_add_subtree(aitem, ett_ndps);
5377 length = tvb_get_ntohl(tvb, foffset);
5379 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
5382 aitem = proto_tree_add_item(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, FALSE);
5383 atree = proto_item_add_subtree(aitem, ett_ndps);
5385 if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
5387 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5390 aitem = proto_tree_add_item(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, FALSE);
5391 atree = proto_item_add_subtree(aitem, ett_ndps);
5393 if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
5395 /* Start of NameorID */
5396 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Method ID");
5397 btree = proto_item_add_subtree(bitem, ett_ndps);
5398 foffset = name_or_id(tvb, btree, foffset);
5399 /* End of NameorID */
5401 aitem = proto_tree_add_item(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, FALSE);
5402 atree = proto_item_add_subtree(aitem, ett_ndps);
5404 if (tvb_get_ntohl(tvb, foffset-4)==TRUE)
5406 foffset = print_address(tvb, atree, foffset);
5408 /* Start of EventObjectSet */
5409 length = tvb_get_ntohl(tvb, foffset); /* Len of record */
5412 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
5413 atree = proto_item_add_subtree(aitem, ett_ndps);
5414 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
5416 /* Start of objectidentifier */
5417 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Class ID");
5418 btree = proto_item_add_subtree(bitem, ett_ndps);
5419 foffset = objectidentifier(tvb, btree, foffset);
5420 /* End of objectidentifier */
5421 /* Start of objectidentification */
5422 bitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
5423 btree = proto_item_add_subtree(bitem, ett_ndps);
5424 foffset = objectidentification(tvb, btree, foffset);
5425 /* End of objectidentification */
5426 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
5428 /* Start of ObjectItem */
5429 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
5431 if(tvb_get_ntohl(tvb, foffset-4)==1)
5433 foffset = objectidentifier(tvb, atree, foffset);
5437 if(tvb_get_ntohl(tvb, foffset-4)==0)
5439 number_of_items = tvb_get_ntohl(tvb, foffset);
5440 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5442 for (j = 1 ; j <= number_of_items; j++ )
5444 foffset = objectidentifier(tvb, atree, foffset);
5448 /* End of ObjectItem */
5450 /* End of EventObjectSet */
5452 case 0x00000008: /* List Profiles */
5453 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5455 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, FALSE);
5457 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Spec */
5459 /* Start of QualifiedName */
5460 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier Alias");
5461 atree = proto_item_add_subtree(aitem, ett_ndps);
5462 qualified_name_type = tvb_get_ntohl(tvb, foffset);
5463 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
5464 4, qualified_name_type);
5466 if (qualified_name_type != 0) {
5467 if (qualified_name_type == 1) {
5468 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
5472 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
5473 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
5476 /* End of QualifiedName */
5477 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, FALSE);
5479 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Choice */
5481 /* Start of CardinalSeq */
5482 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
5483 number_of_items = tvb_get_ntohl(tvb, foffset);
5485 for (i = 1 ; i <= number_of_items; i++ )
5487 length = tvb_get_ntohl(tvb, foffset);
5489 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
5491 foffset += (length%2);
5493 /* End of CardinalSeq */
5497 /* Start of QualifiedName */
5498 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Consumer");
5499 atree = proto_item_add_subtree(aitem, ett_ndps);
5500 qualified_name_type = tvb_get_ntohl(tvb, foffset);
5501 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
5502 4, qualified_name_type);
5504 if (qualified_name_type != 0) {
5505 if (qualified_name_type == 1) {
5506 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
5510 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
5511 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
5514 /* End of QualifiedName */
5515 /* Start of NameorID */
5516 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
5517 atree = proto_item_add_subtree(aitem, ett_ndps);
5518 foffset = name_or_id(tvb, atree, foffset);
5519 /* End of NameorID */
5520 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5523 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, FALSE);
5525 /* Start of integeroption */
5526 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, FALSE);
5528 if (tvb_get_ntohl(tvb, foffset-4)!=0)
5530 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
5533 /* End of integeroption */
5537 length = tvb_get_ntohl(tvb, foffset);
5538 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
5540 foffset += (length%2);
5541 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
5545 case 0x00000009: /* Report Event */
5546 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5548 /* Start of ReportEventItemSet */
5549 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Items");
5550 atree = proto_item_add_subtree(aitem, ett_ndps);
5551 number_of_items = tvb_get_ntohl(tvb, foffset);
5552 for (i = 1 ; i <= number_of_items; i++ )
5554 /* Start of ReportEventItem */
5555 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
5557 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Containing Class");
5558 btree = proto_item_add_subtree(bitem, ett_ndps);
5559 foffset = objectidentifier(tvb, btree, foffset);
5560 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Containing Object");
5561 btree = proto_item_add_subtree(bitem, ett_ndps);
5562 foffset = objectidentification(tvb, btree, foffset);
5563 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Filter Class");
5564 btree = proto_item_add_subtree(bitem, ett_ndps);
5565 foffset = objectidentifier(tvb, btree, foffset);
5566 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Object Class");
5567 btree = proto_item_add_subtree(bitem, ett_ndps);
5568 foffset = objectidentifier(tvb, btree, foffset);
5569 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Object ID");
5570 btree = proto_item_add_subtree(bitem, ett_ndps);
5571 foffset = objectidentification(tvb, btree, foffset);
5572 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Event Object ID");
5573 btree = proto_item_add_subtree(bitem, ett_ndps);
5574 foffset = objectidentifier(tvb, btree, foffset);
5575 /* Start of AttributeSet */
5576 number_of_items = tvb_get_ntohl(tvb, foffset);
5577 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Attribute Modifications");
5578 btree = proto_item_add_subtree(bitem, ett_ndps);
5579 proto_tree_add_item(btree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
5581 for (i = 1 ; i <= number_of_items; i++ )
5583 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
5585 /* End of AttributeSet */
5586 foffset = ndps_string(tvb, hf_ndps_message, atree, foffset);
5587 proto_tree_add_item(atree, hf_time, tvb, foffset, 4, FALSE);
5589 /* End of ReportEventItem */
5591 /* End of ReportEventItemSet */
5593 case 0x0000000b: /* Report Notification */
5594 /* Start of DestinationSet */
5595 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
5596 number_of_items = tvb_get_ntohl(tvb, foffset);
5598 for (i = 1 ; i <= number_of_items; i++ )
5600 /* Start of Destination */
5601 /* Start of NameorID */
5602 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
5603 atree = proto_item_add_subtree(aitem, ett_ndps);
5604 foffset = name_or_id(tvb, atree, foffset);
5605 /* End of NameorID */
5606 /* Start of NotifyDeliveryAddr */
5607 proto_tree_add_item(atree, hf_address_len, tvb, foffset, 4, FALSE);
5609 foffset = print_address(tvb, atree, foffset);
5610 /* End of NotifyDeliveryAddr */
5611 /* End of Destination */
5613 /* End of DestinationSet */
5614 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset);
5615 proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
5617 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Containing Class");
5618 atree = proto_item_add_subtree(aitem, ett_ndps);
5619 foffset = objectidentifier(tvb, atree, foffset);
5620 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Containing Object");
5621 atree = proto_item_add_subtree(aitem, ett_ndps);
5622 foffset = objectidentification(tvb, atree, foffset);
5623 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Filter Class");
5624 atree = proto_item_add_subtree(aitem, ett_ndps);
5625 foffset = objectidentifier(tvb, atree, foffset);
5626 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
5627 atree = proto_item_add_subtree(aitem, ett_ndps);
5628 foffset = objectidentifier(tvb, atree, foffset);
5629 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
5630 atree = proto_item_add_subtree(aitem, ett_ndps);
5631 foffset = objectidentification(tvb, atree, foffset);
5632 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object ID");
5633 atree = proto_item_add_subtree(aitem, ett_ndps);
5634 foffset = objectidentifier(tvb, atree, foffset);
5635 /* Start of AttributeSet */
5636 number_of_items = tvb_get_ntohl(tvb, foffset);
5637 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Attribute");
5638 atree = proto_item_add_subtree(aitem, ett_ndps);
5639 proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
5641 for (i = 1 ; i <= number_of_items; i++ )
5643 foffset = attribute_value(tvb, atree, foffset);
5645 /* End of AttributeSet */
5646 foffset = ndps_string(tvb, hf_ndps_message, ndps_tree, foffset);
5647 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
5649 /* Start of QualifiedName */
5650 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Account");
5651 atree = proto_item_add_subtree(aitem, ett_ndps);
5652 qualified_name_type = tvb_get_ntohl(tvb, foffset);
5653 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
5654 4, qualified_name_type);
5656 if (qualified_name_type != 0) {
5657 if (qualified_name_type == 1) {
5658 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
5662 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
5663 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
5666 /* End of QualifiedName */
5668 case 0x0000000c: /* Add Delivery Method */
5669 foffset = ndps_string(tvb, hf_ndps_file_name, ndps_tree, foffset);
5671 case 0x0000000d: /* Remove Delivery Method */
5672 /* Start of NameorID */
5673 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
5674 atree = proto_item_add_subtree(aitem, ett_ndps);
5675 foffset = name_or_id(tvb, atree, foffset);
5676 /* End of NameorID */
5678 case 0x0000000e: /* List Delivery Methods */
5679 cred_type = tvb_get_ntohl(tvb, foffset);
5680 proto_tree_add_item(ndps_tree, hf_delivery_method_type, tvb, foffset, 4, FALSE);
5684 case 0: /* Specification */
5685 /* Start of integeroption */
5686 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, FALSE);
5688 if (tvb_get_ntohl(tvb, foffset-4)!=0)
5690 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
5693 /* End of integeroption */
5694 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5697 case 1: /* Continuation */
5698 length = tvb_get_ntohl(tvb, foffset);
5699 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
5701 foffset += (length%2);
5702 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
5709 case 0x0000000f: /* Get Delivery Method Information */
5710 /* Start of NameorID */
5711 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
5712 atree = proto_item_add_subtree(aitem, ett_ndps);
5713 foffset = name_or_id(tvb, atree, foffset);
5714 /* End of NameorID */
5715 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5722 case 0x06097a: /* Resman */
5725 case 0x00000001: /* Bind */
5726 /* Start of credentials */
5727 cred_type = tvb_get_ntohl(tvb, foffset);
5728 proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
5733 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
5734 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
5735 atree = proto_item_add_subtree(aitem, ett_ndps);
5737 for (i = 1 ; i <= number_of_items; i++ )
5739 length = tvb_get_ntohl(tvb, foffset);
5741 proto_tree_add_item(ndps_tree, hf_ndps_password, tvb, foffset, length, FALSE);
5746 length = tvb_get_ntohl(tvb, foffset);
5748 proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
5752 name_len = tvb_get_ntohl(tvb, foffset);
5753 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
5754 foffset += align_4(tvb, foffset);
5756 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
5761 name_len = tvb_get_ntohl(tvb, foffset);
5762 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
5763 foffset += align_4(tvb, foffset);
5765 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
5768 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
5771 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
5772 foffset += align_4(tvb, foffset);
5774 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
5777 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
5778 foffset += 8; /* Don't know what these 8 bytes signify */
5779 proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
5782 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
5783 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
5788 /* End of credentials */
5789 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
5791 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
5792 atree = proto_item_add_subtree(aitem, ett_ndps);
5794 for (i = 1 ; i <= number_of_items; i++ )
5796 length = tvb_get_ntohl(tvb, foffset);
5798 proto_tree_add_item(ndps_tree, hf_bind_security, tvb, foffset, length, FALSE);
5801 case 0x00000002: /* Unbind */
5802 case 0x00000008: /* Get Resource Manager NDS Object Name */
5803 case 0x00000009: /* Get Resource Manager Session Information */
5806 case 0x00000003: /* Add Resource File */
5807 proto_tree_add_item(ndps_tree, hf_packet_count, tvb, foffset, 4, FALSE);
5809 proto_tree_add_item(ndps_tree, hf_last_packet_flag, tvb, foffset, 4, FALSE);
5811 proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, FALSE);
5813 /* Start of NWDPResAddInputData */
5814 proto_tree_add_item(ndps_tree, hf_res_type, tvb, foffset, 4, FALSE);
5815 resource_type = tvb_get_ntohl(tvb, foffset);
5817 switch (resource_type)
5819 case 0: /* Print Drivers */
5820 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5822 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset);
5823 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
5825 case 1: /* Printer Definitions */
5826 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset);
5827 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
5829 case 2: /* Banner Page Files */
5830 foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset);
5832 case 3: /* Font Types */
5833 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5835 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
5837 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
5839 case 4: /* Generic Files/ Archive */
5840 case 5: /* Printer Driver Archive */
5841 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5843 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset);
5844 proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
5850 /* End of NWDPResAddInputData */
5851 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
5852 number_of_items=tvb_get_ntohl(tvb, foffset);
5854 for (i = 1 ; i <= number_of_items; i++ )
5856 length=tvb_get_ntohl(tvb, foffset);
5857 if(tvb_length_remaining(tvb, foffset) < length)
5861 proto_tree_add_item(ndps_tree, hf_ndps_item_ptr, tvb, foffset, length, FALSE);
5865 case 0x00000004: /* Delete Resource File */
5866 /* Start of NWDPResAddInputData */
5867 proto_tree_add_item(ndps_tree, hf_res_type, tvb, foffset, 4, FALSE);
5868 resource_type = tvb_get_ntohl(tvb, foffset);
5870 switch (resource_type)
5872 case 0: /* Print Drivers */
5873 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5875 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset);
5876 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
5878 case 1: /* Printer Definitions */
5879 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset);
5880 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
5882 case 2: /* Banner Page Files */
5883 foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset);
5885 case 3: /* Font Types */
5886 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5888 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
5890 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
5892 case 4: /* Generic Files/ Archive */
5893 case 5: /* Printer Driver Archive */
5894 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5896 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset);
5897 proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
5903 /* End of NWDPResAddInputData */
5905 case 0x00000005: /* List Resources */
5906 proto_tree_add_item(ndps_tree, hf_ndps_max_items, tvb, foffset, 4, FALSE);
5908 proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
5910 proto_tree_add_item(ndps_tree, hf_ndps_resource_list_type, tvb, foffset, 4, FALSE);
5911 resource_type = tvb_get_ntohl(tvb, foffset);
5913 switch (resource_type)
5915 case 0: /* Print Drivers */
5916 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5919 case 1: /* Printer Definitions */
5920 case 2: /* Printer Definitions Short */
5921 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset);
5923 case 3: /* Banner Page Files */
5924 proto_tree_add_item(ndps_tree, hf_banner_type, tvb, foffset, 4, FALSE);
5927 case 4: /* Font Types */
5928 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
5930 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5933 case 5: /* Printer Driver Files */
5934 case 12: /* Printer Driver Files 2 */
5935 case 9: /* Generic Files */
5936 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5938 foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset);
5939 foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset);
5940 foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset);
5941 field_len = tvb_get_ntohl(tvb, foffset);
5943 proto_tree_add_item(ndps_tree, hf_printer_id, tvb, foffset, field_len, FALSE);
5945 case 6: /* Printer Definition File */
5946 case 10: /* Printer Definition File 2 */
5947 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset);
5949 foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset);
5950 foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset);
5951 foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset);
5952 field_len = tvb_get_ntohl(tvb, foffset);
5954 proto_tree_add_item(ndps_tree, hf_printer_id, tvb, foffset, field_len, FALSE);
5956 case 7: /* Font Files */
5957 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5959 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
5961 foffset = ndps_string(tvb, hf_ndps_font_name, ndps_tree, foffset);
5963 case 8: /* Generic Type */
5964 case 11: /* Printer Driver Types 2 */
5965 case 13: /* Printer Driver Types Archive */
5966 foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset);
5967 foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset);
5968 foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset);
5970 case 14: /* Languages Available */
5976 case 0x00000006: /* Get Resource File */
5977 proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, FALSE);
5979 proto_tree_add_item(ndps_tree, hf_res_type, tvb, foffset, 4, FALSE);
5980 resource_type = tvb_get_ntohl(tvb, foffset);
5982 switch (resource_type)
5984 case 0: /* Print Drivers */
5985 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5987 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset);
5988 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
5990 case 1: /* Printer Definitions */
5991 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset);
5992 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
5994 case 2: /* Banner Page Files */
5995 foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset);
5997 case 3: /* Font Types */
5998 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
6000 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
6002 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
6004 case 4: /* Generic Files/ Archive */
6005 case 5: /* Printer Driver Archive */
6006 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
6008 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset);
6009 proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
6016 case 0x00000007: /* Get Resource File Date */
6017 proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
6019 /* Start of NWDPResAddInputData */
6020 proto_tree_add_item(ndps_tree, hf_res_type, tvb, foffset, 4, FALSE);
6021 resource_type = tvb_get_ntohl(tvb, foffset);
6023 switch (resource_type)
6025 case 0: /* Print Drivers */
6026 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
6028 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset);
6029 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
6031 case 1: /* Printer Definitions */
6032 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset);
6033 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
6035 case 2: /* Banner Page Files */
6036 foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset);
6038 case 3: /* Font Types */
6039 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
6041 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
6043 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset);
6045 case 4: /* Generic Files/ Archive */
6046 case 5: /* Printer Driver Archive */
6047 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
6049 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset);
6050 proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
6056 /* End of NWDPResAddInputData */
6058 case 0x0000000a: /* Set Resource Language Context */
6059 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
6066 case 0x06097b: /* Delivery */
6069 case 0x00000001: /* Delivery Bind */
6070 /* Start of credentials */
6071 cred_type = tvb_get_ntohl(tvb, foffset);
6072 proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
6077 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
6078 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
6079 atree = proto_item_add_subtree(aitem, ett_ndps);
6081 for (i = 1 ; i <= number_of_items; i++ )
6083 length = tvb_get_ntohl(tvb, foffset);
6085 proto_tree_add_item(ndps_tree, hf_ndps_password, tvb, foffset, length, FALSE);
6090 length = tvb_get_ntohl(tvb, foffset);
6092 proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
6096 name_len = tvb_get_ntohl(tvb, foffset);
6097 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
6098 foffset += align_4(tvb, foffset);
6100 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
6105 name_len = tvb_get_ntohl(tvb, foffset);
6106 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
6107 foffset += align_4(tvb, foffset);
6109 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
6112 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
6115 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
6116 foffset += align_4(tvb, foffset);
6118 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset,
6121 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset);
6122 foffset += 8; /* Don't know what these 8 bytes signify */
6123 proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
6126 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
6127 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
6132 /* End of credentials */
6134 case 0x00000002: /* Delivery Unbind */
6137 case 0x00000003: /* Delivery Send */
6138 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
6139 number_of_items = tvb_get_ntohl(tvb, foffset);
6141 for (i = 1 ; i <= number_of_items; i++ )
6143 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
6145 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier ID");
6146 atree = proto_item_add_subtree(aitem, ett_ndps);
6147 length = tvb_get_ntohl(tvb, foffset);
6149 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
6151 proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
6153 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Containing Class");
6154 atree = proto_item_add_subtree(aitem, ett_ndps);
6155 foffset = objectidentifier(tvb, atree, foffset);
6156 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Containing Object");
6157 atree = proto_item_add_subtree(aitem, ett_ndps);
6158 foffset = objectidentification(tvb, atree, foffset);
6159 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Filter Class");
6160 atree = proto_item_add_subtree(aitem, ett_ndps);
6161 foffset = objectidentifier(tvb, atree, foffset);
6162 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
6163 atree = proto_item_add_subtree(aitem, ett_ndps);
6164 foffset = objectidentifier(tvb, atree, foffset);
6165 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
6166 atree = proto_item_add_subtree(aitem, ett_ndps);
6167 foffset = objectidentification(tvb, atree, foffset);
6168 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object ID");
6169 atree = proto_item_add_subtree(aitem, ett_ndps);
6170 foffset = objectidentifier(tvb, atree, foffset);
6171 foffset = attribute_value(tvb, ndps_tree, foffset);
6172 foffset = ndps_string(tvb, hf_ndps_message, ndps_tree, foffset);
6173 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
6175 /* Start of QualifiedName */
6176 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Account");
6177 atree = proto_item_add_subtree(aitem, ett_ndps);
6178 qualified_name_type = tvb_get_ntohl(tvb, foffset);
6179 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
6180 4, qualified_name_type);
6182 if (qualified_name_type != 0) {
6183 if (qualified_name_type == 1) {
6184 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
6188 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
6189 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
6192 /* End of QualifiedName */
6195 case 0x00000004: /* Delivery Send2 */
6196 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
6197 number_of_items = tvb_get_ntohl(tvb, foffset);
6199 for (i = 1 ; i <= number_of_items; i++ )
6201 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
6203 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Supplier ID");
6204 atree = proto_item_add_subtree(aitem, ett_ndps);
6205 length = tvb_get_ntohl(tvb, foffset);
6207 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
6209 proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
6211 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Containing Class");
6212 atree = proto_item_add_subtree(aitem, ett_ndps);
6213 foffset = objectidentifier(tvb, atree, foffset);
6214 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Containing Object");
6215 atree = proto_item_add_subtree(aitem, ett_ndps);
6216 foffset = objectidentification(tvb, atree, foffset);
6217 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Filter Class");
6218 atree = proto_item_add_subtree(aitem, ett_ndps);
6219 foffset = objectidentifier(tvb, atree, foffset);
6220 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Class");
6221 atree = proto_item_add_subtree(aitem, ett_ndps);
6222 foffset = objectidentifier(tvb, atree, foffset);
6223 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
6224 atree = proto_item_add_subtree(aitem, ett_ndps);
6225 foffset = objectidentification(tvb, atree, foffset);
6226 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object ID");
6227 atree = proto_item_add_subtree(aitem, ett_ndps);
6228 foffset = objectidentifier(tvb, atree, foffset);
6229 /* Start of AttributeSet */
6230 number_of_items = tvb_get_ntohl(tvb, foffset);
6231 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Attribute");
6232 atree = proto_item_add_subtree(aitem, ett_ndps);
6233 proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
6235 for (i = 1 ; i <= number_of_items; i++ )
6237 foffset = attribute_value(tvb, atree, foffset);
6239 /* End of AttributeSet */
6240 foffset = ndps_string(tvb, hf_ndps_message, ndps_tree, foffset);
6241 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
6243 /* Start of QualifiedName */
6244 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Account");
6245 atree = proto_item_add_subtree(aitem, ett_ndps);
6246 qualified_name_type = tvb_get_ntohl(tvb, foffset);
6247 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
6248 4, qualified_name_type);
6250 if (qualified_name_type != 0) {
6251 if (qualified_name_type == 1) {
6252 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
6256 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
6257 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
6260 /* End of QualifiedName */
6270 /*proto_tree_add_uint_format(ndps_tree, hf_ndps_xid, tvb, 0,
6271 0, ndps_xid, "This is a Request Packet, XID %08x, Prog %08x, Func %08x", ndps_xid, ndps_prog, ndps_func);*/
6276 ndps_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
6278 guint32 number_of_items=0;
6279 guint32 problem_type=0;
6284 problem_type = tvb_get_ntohl(tvb, foffset);
6285 /*if (problem_type == 0)
6289 if (check_col(pinfo->cinfo, COL_INFO))
6290 col_append_str(pinfo->cinfo, COL_INFO, "- Error");
6291 proto_tree_add_item(ndps_tree, hf_ndps_problem_type, tvb, foffset, 4, FALSE);
6293 switch(problem_type)
6295 case 0: /* Security Error */
6296 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6298 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6300 proto_tree_add_item(ndps_tree, hf_security_problem_type, tvb, foffset, 4, FALSE);
6303 else /* Extended Error */
6305 /* Start of objectidentifier */
6306 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
6307 atree = proto_item_add_subtree(aitem, ett_ndps);
6308 foffset = objectidentifier(tvb, atree, foffset);
6309 /* End of objectidentifier */
6311 /* Start of NameorID */
6312 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Message");
6313 atree = proto_item_add_subtree(aitem, ett_ndps);
6314 foffset = name_or_id(tvb, atree, foffset);
6315 /* End of NameorID */
6317 case 1: /* Service Error */
6318 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6320 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6322 proto_tree_add_item(ndps_tree, hf_service_problem_type, tvb, foffset, 4, FALSE);
6325 else /* Extended Error */
6327 /* Start of objectidentifier */
6328 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
6329 atree = proto_item_add_subtree(aitem, ett_ndps);
6330 foffset = objectidentifier(tvb, atree, foffset);
6331 /* End of objectidentifier */
6333 foffset = objectidentification(tvb, ndps_tree, foffset);
6334 foffset = attribute_value(tvb, ndps_tree, foffset); /* Object Attribute Set */
6335 proto_tree_add_item(ndps_tree, hf_ndps_lib_error, tvb, foffset, 4, FALSE);
6337 proto_tree_add_item(ndps_tree, hf_ndps_other_error, tvb, foffset, 4, FALSE);
6339 proto_tree_add_item(ndps_tree, hf_ndps_other_error_2, tvb, foffset, 4, FALSE);
6342 case 2: /* Access Error */
6343 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6345 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6347 proto_tree_add_item(ndps_tree, hf_access_problem_type, tvb, foffset, 4, FALSE);
6350 else /* Extended Error */
6352 /* Start of objectidentifier */
6353 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
6354 atree = proto_item_add_subtree(aitem, ett_ndps);
6355 foffset = objectidentifier(tvb, atree, foffset);
6356 /* End of objectidentifier */
6358 foffset = objectidentification(tvb, ndps_tree, foffset);
6360 case 3: /* Printer Error */
6361 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6363 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6365 proto_tree_add_item(ndps_tree, hf_printer_problem_type, tvb, foffset, 4, FALSE);
6368 else /* Extended Error */
6370 /* Start of objectidentifier */
6371 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
6372 atree = proto_item_add_subtree(aitem, ett_ndps);
6373 foffset = objectidentifier(tvb, atree, foffset);
6374 /* End of objectidentifier */
6376 foffset = objectidentification(tvb, ndps_tree, foffset);
6378 case 4: /* Selection Error */
6379 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6381 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6383 proto_tree_add_item(ndps_tree, hf_selection_problem_type, tvb, foffset, 4, FALSE);
6386 else /* Extended Error */
6388 /* Start of objectidentifier */
6389 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
6390 atree = proto_item_add_subtree(aitem, ett_ndps);
6391 foffset = objectidentifier(tvb, atree, foffset);
6392 /* End of objectidentifier */
6394 foffset = objectidentification(tvb, ndps_tree, foffset);
6395 foffset = attribute_value(tvb, ndps_tree, foffset); /* Object Attribute Set */
6397 case 5: /* Document Access Error */
6398 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6400 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6402 proto_tree_add_item(ndps_tree, hf_doc_access_problem_type, tvb, foffset, 4, FALSE);
6403 foffset = objectidentifier(tvb, ndps_tree, foffset);
6405 else /* Extended Error */
6407 /* Start of objectidentifier */
6408 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
6409 atree = proto_item_add_subtree(aitem, ett_ndps);
6410 foffset = objectidentifier(tvb, atree, foffset);
6411 /* End of objectidentifier */
6413 foffset = objectidentification(tvb, ndps_tree, foffset);
6415 case 6: /* Attribute Error */
6416 number_of_items = tvb_get_ntohl(tvb, foffset);
6417 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
6418 atree = proto_item_add_subtree(aitem, ett_ndps);
6420 for (i = 1 ; i <= number_of_items; i++ )
6422 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6424 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6426 proto_tree_add_item(ndps_tree, hf_attribute_problem_type, tvb, foffset, 4, FALSE);
6429 else /* Extended Error */
6431 /* Start of objectidentifier */
6432 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
6433 atree = proto_item_add_subtree(aitem, ett_ndps);
6434 foffset = objectidentifier(tvb, atree, foffset);
6435 /* End of objectidentifier */
6437 foffset = attribute_value(tvb, ndps_tree, foffset); /* Object Attribute Set */
6440 case 7: /* Update Error */
6441 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6443 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6445 proto_tree_add_item(ndps_tree, hf_update_problem_type, tvb, foffset, 4, FALSE);
6448 else /* Extended Error */
6450 /* Start of objectidentifier */
6451 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Extended Error");
6452 atree = proto_item_add_subtree(aitem, ett_ndps);
6453 foffset = objectidentifier(tvb, atree, foffset);
6454 /* End of objectidentifier */
6456 foffset = objectidentification(tvb, ndps_tree, foffset);
6465 dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
6467 conversation_t *conversation = NULL;
6468 ndps_req_hash_value *request_value = NULL;
6478 guint32 number_of_items=0;
6479 guint32 number_of_items2=0;
6480 guint32 number_of_items3=0;
6482 guint32 ndps_func=0;
6483 guint32 ndps_prog=0;
6484 guint32 error_val=0;
6485 guint32 problem_type=0;
6486 guint32 field_len=0;
6487 guint32 resource_type=0;
6488 guint32 qualified_name_type=0;
6489 guint32 data_type=0;
6491 if (!pinfo->fd->flags.visited) {
6492 /* Find the conversation whence the request would have come. */
6493 conversation = find_conversation(&pinfo->src, &pinfo->dst,
6494 PT_NCP, (guint32) pinfo->destport, (guint32) pinfo->destport, 0);
6495 if (conversation != NULL) {
6496 /* find the record telling us the request made that caused
6498 request_value = ndps_hash_lookup(conversation, (guint32) pinfo->destport);
6499 p_add_proto_data(pinfo->fd, proto_ndps, (void*) request_value);
6501 /* else... we haven't seen an NDPS Request for that conversation. */
6504 request_value = p_get_proto_data(pinfo->fd, proto_ndps);
6506 if (request_value) {
6507 ndps_prog = request_value->ndps_prog;
6508 ndps_func = request_value->ndps_func;
6509 proto_tree_add_uint_format(ndps_tree, hf_ndps_reqframe, tvb, 0,
6510 0, request_value->ndps_frame_num,
6511 "Response to Request in Frame Number: %u",
6512 request_value->ndps_frame_num);
6515 if (tvb_length_remaining(tvb, foffset) < 12 && tvb_get_ntohl(tvb, foffset) == 0) /* No error and no return data */
6517 proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
6518 if (check_col(pinfo->cinfo, COL_INFO))
6519 col_append_str(pinfo->cinfo, COL_INFO, "- Ok");
6522 if(ndps_func == 1 || ndps_func == 2)
6524 proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_stat, tvb, foffset, 4, FALSE);
6526 if (tvb_length_remaining(tvb,foffset) < 4 ) {
6527 if (check_col(pinfo->cinfo, COL_INFO))
6528 col_append_str(pinfo->cinfo, COL_INFO, "- Error");
6531 proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_results, tvb, foffset, 4, FALSE);
6533 if (tvb_length_remaining(tvb,foffset) < 4) {
6534 if (check_col(pinfo->cinfo, COL_INFO))
6535 col_append_str(pinfo->cinfo, COL_INFO, "- Error");
6539 error_val = tvb_get_ntohl(tvb, foffset);
6540 proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
6542 if (check_col(pinfo->cinfo, COL_INFO))
6543 col_append_str(pinfo->cinfo, COL_INFO, "- Ok");
6546 case 0x060976: /* Print */
6549 case 0x00000001: /* Bind PSM */
6550 proto_tree_add_item(ndps_tree, hf_ndps_oid, tvb, foffset, 4, FALSE);
6554 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6555 if(tvb_length_remaining(tvb, foffset) < 4)
6559 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
6562 /* Start of QualifiedName */
6563 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "PSM Name");
6564 atree = proto_item_add_subtree(aitem, ett_ndps);
6565 qualified_name_type = tvb_get_ntohl(tvb, foffset);
6566 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
6567 4, qualified_name_type);
6569 if (qualified_name_type != 0) {
6570 if (qualified_name_type == 1) {
6571 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
6575 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
6576 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
6579 /* End of QualifiedName */
6581 case 0x00000002: /* Bind PA */
6582 proto_tree_add_item(ndps_tree, hf_ndps_oid, tvb, foffset, 4, FALSE);
6586 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6587 if(tvb_length_remaining(tvb, foffset) < 4)
6591 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
6594 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
6596 case 0x00000003: /* Unbind */
6598 case 0x00000004: /* Print */
6599 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset);
6600 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
6604 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6607 case 0x00000005: /* Modify Job */
6608 case 0x00000006: /* Cancel Job */
6609 case 0x00000008: /* Promote Job */
6610 case 0x0000000b: /* Resume */
6611 case 0x0000000d: /* Create */
6612 /* Start of AttributeSet */
6613 number_of_items = tvb_get_ntohl(tvb, foffset);
6614 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Attribute Set");
6615 atree = proto_item_add_subtree(aitem, ett_ndps);
6616 proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
6618 for (i = 1 ; i <= number_of_items; i++ )
6620 foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
6622 /* End of AttributeSet */
6625 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6628 case 0x00000007: /* List Object Attributes */
6629 proto_tree_add_item(ndps_tree, hf_answer_time, tvb, foffset, 4, FALSE);
6631 /* Continuation Option */
6632 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Continuation Option");
6633 atree = proto_item_add_subtree(aitem, ett_ndps);
6634 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
6635 number_of_items=tvb_get_ntohl(tvb, foffset);
6637 for (i = 1 ; i <= number_of_items; i++ )
6639 length=tvb_get_ntohl(tvb, foffset);
6640 if(tvb_length_remaining(tvb, foffset) < length)
6644 proto_tree_add_item(atree, hf_ndps_item_ptr, tvb, foffset, length, FALSE);
6647 /* Limit Encountered Option */
6648 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Limit Encountered Option");
6649 atree = proto_item_add_subtree(aitem, ett_ndps);
6650 proto_tree_add_item(atree, hf_ndps_len, tvb, foffset, 4, FALSE);
6652 proto_tree_add_item(atree, hf_limit_enc, tvb, foffset, 4, FALSE);
6654 /* Object Results Set */
6655 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Results Set");
6656 atree = proto_item_add_subtree(aitem, ett_ndps);
6657 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
6658 number_of_items=tvb_get_ntohl(tvb, foffset);
6660 for (i = 1 ; i <= number_of_items; i++ )
6662 foffset = objectidentification(tvb, atree, foffset);
6663 number_of_items2 = tvb_get_ntohl(tvb, foffset);
6664 bitem = proto_tree_add_item(atree, hf_ndps_objects, tvb, foffset, 4, FALSE);
6665 btree = proto_item_add_subtree(bitem, ett_ndps);
6667 foffset = objectidentifier(tvb, btree, foffset);
6668 for (j = 1 ; j <= number_of_items2; j++ )
6670 number_of_items3 = tvb_get_ntohl(tvb, foffset);
6671 citem = proto_tree_add_item(btree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
6672 ctree = proto_item_add_subtree(citem, ett_ndps);
6674 for (k = 1 ; k <= number_of_items3; k++ )
6676 foffset = attribute_value(tvb, ctree, foffset);
6678 foffset += align_4(tvb, foffset);
6679 proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
6681 foffset = objectidentifier(tvb, btree, foffset);
6687 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6690 case 0x00000009: /* Interrupt */
6691 case 0x0000000a: /* Pause */
6692 /* Start of NWDPPrtContainedObjectId */
6693 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job ID");
6694 atree = proto_item_add_subtree(aitem, ett_ndps);
6695 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
6696 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
6698 /* End of NWDPPrtContainedObjectId */
6699 /* Start of AttributeSet */
6700 number_of_items = tvb_get_ntohl(tvb, foffset);
6701 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object Attribute Set");
6702 atree = proto_item_add_subtree(aitem, ett_ndps);
6703 proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
6705 for (i = 1 ; i <= number_of_items; i++ )
6707 foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
6709 /* End of AttributeSet */
6712 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6715 case 0x0000000c: /* Clean */
6716 case 0x0000000e: /* Delete */
6717 case 0x0000000f: /* Disable PA */
6718 case 0x00000010: /* Enable PA */
6719 case 0x00000012: /* Set */
6720 case 0x00000013: /* Shutdown PA */
6721 case 0x00000014: /* Startup PA */
6722 case 0x00000018: /* Transfer Data */
6723 case 0x00000019: /* Device Control */
6724 case 0x0000001b: /* Remove Event Profile */
6725 case 0x0000001c: /* Modify Event Profile */
6726 case 0x0000001e: /* Shutdown PSM */
6727 case 0x0000001f: /* Cancel PSM Shutdown */
6728 case 0x00000020: /* Set Printer DS Information */
6729 case 0x00000021: /* Clean User Jobs */
6732 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6735 case 0x00000011: /* Resubmit Jobs */
6736 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of ResubmitJob Set */
6737 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Resubmit Job");
6738 atree = proto_item_add_subtree(aitem, ett_ndps);
6739 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
6741 for (i = 1 ; i <= number_of_items; i++ )
6743 /* Start of NWDPPrtContainedObjectId */
6744 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Old Job");
6745 btree = proto_item_add_subtree(bitem, ett_ndps);
6746 foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset);
6747 proto_tree_add_item(btree, hf_local_id, tvb, foffset, 4, FALSE);
6749 /* End of NWDPPrtContainedObjectId */
6750 /* Start of NWDPPrtContainedObjectId */
6751 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "New Job");
6752 btree = proto_item_add_subtree(bitem, ett_ndps);
6753 foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset);
6754 proto_tree_add_item(btree, hf_local_id, tvb, foffset, 4, FALSE);
6756 /* End of NWDPPrtContainedObjectId */
6757 /* Start of AttributeSet */
6758 number_of_items = tvb_get_ntohl(tvb, foffset);
6759 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Job Status");
6760 btree = proto_item_add_subtree(bitem, ett_ndps);
6761 proto_tree_add_item(btree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
6763 for (i = 1 ; i <= number_of_items; i++ )
6765 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
6767 /* End of AttributeSet */
6768 } /* End of ResubmitJob Set */
6771 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6774 case 0x00000015: /* Reorder Job */
6775 /* Start of AttributeSet */
6776 number_of_items = tvb_get_ntohl(tvb, foffset);
6777 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Job Status");
6778 atree = proto_item_add_subtree(aitem, ett_ndps);
6779 proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
6781 for (i = 1 ; i <= number_of_items; i++ )
6783 foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
6785 /* End of AttributeSet */
6788 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6791 case 0x00000016: /* Pause PA */
6792 case 0x00000017: /* Resume PA */
6793 /* Start of AttributeSet */
6794 number_of_items = tvb_get_ntohl(tvb, foffset);
6795 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Printer Status");
6796 atree = proto_item_add_subtree(aitem, ett_ndps);
6797 proto_tree_add_item(atree, hf_ndps_attributes, tvb, foffset, 4, FALSE);
6799 for (i = 1 ; i <= number_of_items; i++ )
6801 foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
6803 /* End of AttributeSet */
6806 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6809 case 0x0000001a: /* Add Event Profile */
6810 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
6814 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6817 case 0x0000001d: /* List Event Profiles */
6818 length = tvb_get_ntohl(tvb, foffset);
6820 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
6822 /* Start of Eventhandling */
6823 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
6825 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
6827 /* Start of QualifiedName */
6828 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Consumer Name");
6829 atree = proto_item_add_subtree(aitem, ett_ndps);
6830 qualified_name_type = tvb_get_ntohl(tvb, foffset);
6831 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
6832 4, qualified_name_type);
6834 if (qualified_name_type != 0) {
6835 if (qualified_name_type == 1) {
6836 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
6840 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
6841 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
6844 /* End of QualifiedName */
6845 length = tvb_get_ntohl(tvb, foffset);
6847 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
6849 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
6851 /* Start of NameorID */
6852 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
6853 atree = proto_item_add_subtree(aitem, ett_ndps);
6854 foffset = name_or_id(tvb, atree, foffset);
6855 /* End of NameorID */
6856 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Delivery Address");
6857 atree = proto_item_add_subtree(aitem, ett_ndps);
6858 number_of_items = tvb_get_ntohl(tvb, foffset);
6859 for (i = 1 ; i <= number_of_items; i++ )
6861 foffset += address_item(tvb, atree, foffset);
6863 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
6864 atree = proto_item_add_subtree(aitem, ett_ndps);
6865 number_of_items = tvb_get_ntohl(tvb, foffset);
6866 for (i = 1 ; i <= number_of_items; i++ )
6868 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
6870 foffset = objectidentifier(tvb, atree, foffset);
6871 foffset = objectidentification(tvb, atree, foffset);
6872 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
6875 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
6877 if(tvb_get_ntohl(tvb, foffset-4)==1)
6879 foffset = objectidentifier(tvb, atree, foffset);
6883 if(tvb_get_ntohl(tvb, foffset-4)==0)
6885 number_of_items2 = tvb_get_ntohl(tvb, foffset);
6886 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
6888 for (j = 1 ; j <= number_of_items2; j++ )
6890 foffset = objectidentifier(tvb, atree, foffset);
6895 /* End of Eventhandling */
6896 length = tvb_get_ntohl(tvb, foffset);
6898 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
6902 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6905 case 0x00000022: /* Map GUID to NDS Name */
6906 /* Start of QualifiedName */
6907 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "NDS Printer Name");
6908 atree = proto_item_add_subtree(aitem, ett_ndps);
6909 qualified_name_type = tvb_get_ntohl(tvb, foffset);
6910 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
6911 4, qualified_name_type);
6913 if (qualified_name_type != 0) {
6914 if (qualified_name_type == 1) {
6915 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
6919 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
6920 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
6923 /* End of QualifiedName */
6926 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6933 case 0x060977: /* Broker */
6936 case 0x00000001: /* Bind */
6937 case 0x00000002: /* Unbind */
6938 case 0x00000004: /* Enable Service */
6939 case 0x00000005: /* Disable Service */
6940 case 0x00000006: /* Down Broker */
6941 /* Start of NWDPBrokerReturnCode */
6942 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
6944 if (tvb_get_ntohl(tvb, foffset-4) == 0)
6948 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
6950 /* End of NWDPBrokerReturnCode */
6952 case 0x00000003: /* List Services */
6953 number_of_items = tvb_get_ntohl(tvb, foffset);
6954 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
6955 atree = proto_item_add_subtree(aitem, ett_ndps);
6957 for (i = 1 ; i <= number_of_items; i++ )
6959 bitem = proto_tree_add_item(atree, hf_ndps_service_type, tvb, foffset, 4, FALSE);
6960 btree = proto_item_add_subtree(bitem, ett_ndps);
6962 proto_tree_add_item(btree, hf_ndps_service_enabled, tvb, foffset, 4, FALSE);
6965 /* Start of NWDPBrokerReturnCode */
6966 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
6968 if (tvb_get_ntohl(tvb, foffset-4) == 0)
6972 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
6974 /* End of NWDPBrokerReturnCode */
6976 case 0x00000007: /* Get Broker NDS Object Name */
6977 proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
6980 foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset);
6981 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
6982 /* Start of NWDPBrokerReturnCode */
6983 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
6985 if (tvb_get_ntohl(tvb, foffset-4) == 0)
6989 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
6991 /* End of NWDPBrokerReturnCode */
6993 case 0x00000008: /* Get Broker Session Information */
6998 case 0x060978: /* Registry */
7001 case 0x00000001: /* Bind */
7002 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7003 atree = proto_item_add_subtree(aitem, ett_ndps);
7005 for (i = 1 ; i <= number_of_items; i++ )
7007 length = tvb_get_ntohl(tvb, foffset);
7009 proto_tree_add_item(ndps_tree, hf_ndps_attribute_set, tvb, foffset, length, FALSE);
7011 /* Start of NWDPRegReturnCode */
7012 /*proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7014 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7018 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7020 /* End of NWDPRegReturnCode */
7022 case 0x00000002: /* Unbind */
7025 case 0x00000003: /* Register Server */
7026 case 0x00000004: /* Deregister Server */
7027 case 0x00000005: /* Register Registry */
7028 case 0x00000006: /* Deregister Registry */
7029 case 0x00000007: /* Registry Update */
7030 /* Start of NWDPRegReturnCode */
7031 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7033 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7037 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7039 /* End of NWDPRegReturnCode */
7041 case 0x00000008: /* List Local Servers */
7042 case 0x00000009: /* List Servers */
7043 number_of_items = tvb_get_ntohl(tvb, foffset);
7044 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7046 for (i = 1 ; i <= number_of_items; i++ )
7048 /* Start of Server Entry */
7049 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset);
7050 aitem = proto_tree_add_item(ndps_tree, hf_ndps_server_type, tvb, foffset, 4, FALSE);
7051 atree = proto_item_add_subtree(aitem, ett_ndps);
7053 foffset = print_address(tvb, atree, foffset);
7054 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Server Info");
7055 btree = proto_item_add_subtree(bitem, ett_ndps);
7056 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7057 proto_tree_add_item(btree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7059 for (j = 1 ; j <= number_of_items2; j++ )
7061 data_type = tvb_get_ntohl(tvb, foffset);
7062 proto_tree_add_item(btree, hf_ndps_data_item_type, tvb, foffset, 4, FALSE);
7067 proto_tree_add_item(btree, hf_info_int, tvb, foffset, 1, FALSE);
7071 proto_tree_add_item(btree, hf_info_int16, tvb, foffset, 2, FALSE);
7075 proto_tree_add_item(btree, hf_info_int32, tvb, foffset, 4, FALSE);
7078 case 3: /* Boolean */
7079 proto_tree_add_item(btree, hf_info_boolean, tvb, foffset, 4, FALSE);
7082 case 4: /* String */
7084 foffset = ndps_string(tvb, hf_info_string, btree, foffset);
7086 /*length = tvb_get_ntohl(tvb, foffset);
7088 proto_tree_add_item(btree, hf_info_bytes, tvb, foffset, length, FALSE);
7090 foffset += (length%4);*/
7096 /* End of Server Entry */
7098 length = tvb_get_ntohl(tvb, foffset);
7100 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
7102 /* Start of NWDPRegReturnCode */
7103 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7105 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7109 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7111 /* End of NWDPRegReturnCode */
7113 case 0x0000000a: /* List Known Registries */
7114 number_of_items = tvb_get_ntohl(tvb, foffset);
7115 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7117 for (i = 1 ; i <= number_of_items; i++ )
7119 aitem = proto_tree_add_item(ndps_tree, hf_ndps_client_server_type, tvb, foffset, 4, FALSE);
7120 atree = proto_item_add_subtree(aitem, ett_ndps);
7122 foffset = ndps_string(tvb, hf_ndps_registry_name, atree, foffset);
7123 foffset = print_address(tvb, atree, foffset);
7125 length = tvb_get_ntohl(tvb, foffset);
7127 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
7129 /* Start of NWDPRegReturnCode */
7130 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7132 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7136 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7138 /* End of NWDPRegReturnCode */
7140 case 0x0000000b: /* Get Registry NDS Object Name */
7141 /* Start of QualifiedName */
7142 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "NDS Printer Name");
7143 atree = proto_item_add_subtree(aitem, ett_ndps);
7144 qualified_name_type = tvb_get_ntohl(tvb, foffset);
7145 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
7146 4, qualified_name_type);
7148 if (qualified_name_type != 0) {
7149 if (qualified_name_type == 1) {
7150 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
7154 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
7155 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
7158 /* End of QualifiedName */
7159 /* Start of NWDPRegReturnCode */
7160 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7162 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7166 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7168 /* End of NWDPRegReturnCode */
7170 case 0x0000000c: /* Get Registry Session Information */
7171 proto_tree_add_item(ndps_tree, hf_ndps_session_type, tvb, foffset, 4, FALSE);
7173 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
7175 /* Start of NWDPRegReturnCode */
7176 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7178 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7182 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7184 /* End of NWDPRegReturnCode */
7190 case 0x060979: /* Notify */
7193 case 0x00000001: /* Notify Bind */
7194 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7195 atree = proto_item_add_subtree(aitem, ett_ndps);
7197 for (i = 1 ; i <= number_of_items; i++ )
7199 length = tvb_get_ntohl(tvb, foffset);
7201 proto_tree_add_item(ndps_tree, hf_ndps_attribute_set, tvb, foffset, length, FALSE);
7203 /* Start of NWDPNotifyReturnCode */
7204 /*proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7206 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7210 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7212 /* End of NWDPNotifyReturnCode */
7214 case 0x00000002: /* Notify Unbind */
7217 case 0x00000003: /* Register Supplier */
7218 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
7220 /* Start of EventObjectSet */
7221 length = tvb_get_ntohl(tvb, foffset); /* Len of record */
7224 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
7225 atree = proto_item_add_subtree(aitem, ett_ndps);
7226 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
7228 /* Start of objectidentifier */
7229 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Class ID");
7230 btree = proto_item_add_subtree(bitem, ett_ndps);
7231 foffset = objectidentifier(tvb, btree, foffset);
7232 /* End of objectidentifier */
7233 /* Start of objectidentification */
7234 bitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
7235 btree = proto_item_add_subtree(bitem, ett_ndps);
7236 foffset = objectidentification(tvb, btree, foffset);
7237 /* End of objectidentification */
7238 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
7240 /* Start of ObjectItem */
7241 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
7243 if(tvb_get_ntohl(tvb, foffset-4)==1)
7245 foffset = objectidentifier(tvb, atree, foffset);
7249 if(tvb_get_ntohl(tvb, foffset-4)==0)
7251 number_of_items = tvb_get_ntohl(tvb, foffset);
7252 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7254 for (j = 1 ; j <= number_of_items; j++ )
7256 foffset = objectidentifier(tvb, atree, foffset);
7260 /* End of ObjectItem */
7262 /* End of EventObjectSet */
7263 /* Start of NWDPNotifyReturnCode */
7264 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7266 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7270 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7272 /* End of NWDPNotifyReturnCode */
7274 case 0x00000004: /* Deregister Supplier */
7275 case 0x0000000b: /* Report Notification */
7276 case 0x0000000d: /* Remove Delivery Method */
7277 /* Start of NWDPNotifyReturnCode */
7278 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7280 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7284 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7286 /* End of NWDPNotifyReturnCode */
7288 case 0x00000005: /* Add Profile */
7289 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
7291 /* Start of EventObjectSet */
7292 length = tvb_get_ntohl(tvb, foffset); /* Len of record */
7295 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
7296 atree = proto_item_add_subtree(aitem, ett_ndps);
7297 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
7299 /* Start of objectidentifier */
7300 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Class ID");
7301 btree = proto_item_add_subtree(bitem, ett_ndps);
7302 foffset = objectidentifier(tvb, btree, foffset);
7303 /* End of objectidentifier */
7304 /* Start of objectidentification */
7305 bitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
7306 btree = proto_item_add_subtree(bitem, ett_ndps);
7307 foffset = objectidentification(tvb, btree, foffset);
7308 /* End of objectidentification */
7309 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
7311 /* Start of ObjectItem */
7312 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
7314 if(tvb_get_ntohl(tvb, foffset-4)==1)
7316 foffset = objectidentifier(tvb, atree, foffset);
7320 if(tvb_get_ntohl(tvb, foffset-4)==0)
7322 number_of_items = tvb_get_ntohl(tvb, foffset);
7323 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7325 for (j = 1 ; j <= number_of_items; j++ )
7327 foffset = objectidentifier(tvb, atree, foffset);
7331 /* End of ObjectItem */
7333 /* End of EventObjectSet */
7334 /* Start of NWDPNotifyReturnCode */
7335 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7337 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7341 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7343 /* End of NWDPNotifyReturnCode */
7345 case 0x00000006: /* Remove Profile */
7346 case 0x00000007: /* Modify Profile */
7347 case 0x00000009: /* Report Event */
7348 /* Start of EventObjectSet */
7349 length = tvb_get_ntohl(tvb, foffset); /* Len of record */
7352 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
7353 atree = proto_item_add_subtree(aitem, ett_ndps);
7354 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
7356 /* Start of objectidentifier */
7357 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Class ID");
7358 btree = proto_item_add_subtree(bitem, ett_ndps);
7359 foffset = objectidentifier(tvb, btree, foffset);
7360 /* End of objectidentifier */
7361 /* Start of objectidentification */
7362 bitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Object ID");
7363 btree = proto_item_add_subtree(bitem, ett_ndps);
7364 foffset = objectidentification(tvb, btree, foffset);
7365 /* End of objectidentification */
7366 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
7368 /* Start of ObjectItem */
7369 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
7371 if(tvb_get_ntohl(tvb, foffset-4)==1)
7373 foffset = objectidentifier(tvb, atree, foffset);
7377 if(tvb_get_ntohl(tvb, foffset-4)==0)
7379 number_of_items = tvb_get_ntohl(tvb, foffset);
7380 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7382 for (j = 1 ; j <= number_of_items; j++ )
7384 foffset = objectidentifier(tvb, atree, foffset);
7388 /* End of ObjectItem */
7390 /* End of EventObjectSet */
7391 /* Start of NWDPNotifyReturnCode */
7392 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7394 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7398 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7400 /* End of NWDPNotifyReturnCode */
7402 case 0x00000008: /* List Profiles */
7403 /* Start of ProfileResultSet */
7404 proto_tree_add_item(ndps_tree, hf_ndps_len, tvb, foffset, 4, FALSE);
7406 /* Start of Eventhandling */
7407 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
7409 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
7411 /* Start of QualifiedName */
7412 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Consumer Name");
7413 atree = proto_item_add_subtree(aitem, ett_ndps);
7414 qualified_name_type = tvb_get_ntohl(tvb, foffset);
7415 proto_tree_add_uint(atree, hf_ndps_qualified_name, tvb, foffset,
7416 4, qualified_name_type);
7418 if (qualified_name_type != 0) {
7419 if (qualified_name_type == 1) {
7420 foffset = ndps_string(tvb, hf_printer_name, atree, foffset);
7424 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset);
7425 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset);
7428 /* End of QualifiedName */
7429 length = tvb_get_ntohl(tvb, foffset);
7431 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
7433 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
7435 /* Start of NameorID */
7436 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
7437 atree = proto_item_add_subtree(aitem, ett_ndps);
7438 foffset = name_or_id(tvb, atree, foffset);
7439 /* End of NameorID */
7440 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Delivery Address");
7441 atree = proto_item_add_subtree(aitem, ett_ndps);
7442 number_of_items = tvb_get_ntohl(tvb, foffset);
7443 for (i = 1 ; i <= number_of_items; i++ )
7445 foffset += address_item(tvb, atree, foffset);
7447 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Event Object");
7448 atree = proto_item_add_subtree(aitem, ett_ndps);
7449 number_of_items = tvb_get_ntohl(tvb, foffset);
7450 for (i = 1 ; i <= number_of_items; i++ )
7452 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
7454 foffset = objectidentifier(tvb, atree, foffset);
7455 foffset = objectidentification(tvb, atree, foffset);
7456 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
7459 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, FALSE);
7461 if(tvb_get_ntohl(tvb, foffset-4)==1)
7463 foffset = objectidentifier(tvb, atree, foffset);
7467 if(tvb_get_ntohl(tvb, foffset-4)==0)
7469 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7470 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
7472 for (j = 1 ; j <= number_of_items2; j++ )
7474 foffset = objectidentifier(tvb, atree, foffset);
7479 /* End of Eventhandling */
7480 /* End of ProfileResultSet */
7481 length = tvb_get_ntohl(tvb, foffset);
7483 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
7485 /* Start of NWDPNotifyReturnCode */
7486 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7488 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7492 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7494 /* End of NWDPNotifyReturnCode */
7496 case 0x0000000a: /* List Supported Languages */
7497 /* Start of IntegerSeq */
7498 length = tvb_get_ntohl(tvb, foffset);
7500 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, length, FALSE);
7502 /* End of IntegerSeq */
7503 /* Start of NWDPNotifyReturnCode */
7504 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7506 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7510 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7512 /* End of NWDPNotifyReturnCode */
7514 case 0x0000000c: /* Add Delivery Method */
7515 /* Start of NameorID */
7516 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
7517 atree = proto_item_add_subtree(aitem, ett_ndps);
7518 foffset = name_or_id(tvb, atree, foffset);
7519 /* End of NameorID */
7520 /* Start of NWDPNotifyReturnCode */
7521 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7523 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7527 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7529 /* End of NWDPNotifyReturnCode */
7531 case 0x0000000e: /* List Delivery Methods */
7532 /* Start of DeliveryMethodSet */
7533 number_of_items = tvb_get_ntohl(tvb, foffset);
7534 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7535 atree = proto_item_add_subtree(aitem, ett_ndps);
7537 for (i = 1 ; i <= number_of_items; i++ )
7539 /* Start of DeliveryMethod */
7540 /* Start of NameorID */
7541 bitem = proto_tree_add_text(atree, tvb, foffset, 0, "Method ID");
7542 btree = proto_item_add_subtree(bitem, ett_ndps);
7543 foffset = name_or_id(tvb, btree, foffset);
7544 foffset += align_4(tvb, foffset);
7545 /* End of NameorID */
7546 foffset = ndps_string(tvb, hf_ndps_method_name, btree, foffset);
7547 foffset = ndps_string(tvb, hf_ndps_method_ver, btree, foffset);
7548 foffset = ndps_string(tvb, hf_ndps_file_name, btree, foffset);
7549 proto_tree_add_item(btree, hf_ndps_admin_submit, tvb, foffset, 4, FALSE);
7551 /* End of DeliveryMethod */
7553 /* End of DeliveryMethodSet */
7554 /* Start of NWDPNotifyReturnCode */
7555 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7557 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7561 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7563 /* End of NWDPNotifyReturnCode */
7565 case 0x0000000f: /* Get Delivery Method Information */
7566 /* Start of DeliveryMethod */
7567 /* Start of NameorID */
7568 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Method ID");
7569 atree = proto_item_add_subtree(aitem, ett_ndps);
7570 foffset = name_or_id(tvb, atree, foffset);
7571 /* End of NameorID */
7572 foffset = ndps_string(tvb, hf_ndps_method_name, atree, foffset);
7573 foffset = ndps_string(tvb, hf_ndps_method_ver, atree, foffset);
7574 foffset = ndps_string(tvb, hf_ndps_file_name, atree, foffset);
7575 proto_tree_add_item(atree, hf_ndps_admin_submit, tvb, foffset, 4, FALSE);
7577 /* End of DeliveryMethod */
7578 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Delivery Address");
7579 atree = proto_item_add_subtree(aitem, ett_ndps);
7580 number_of_items = tvb_get_ntohl(tvb, foffset);
7581 for (i = 1 ; i <= number_of_items; i++ )
7583 foffset += address_item(tvb, atree, foffset);
7585 /* Start of NWDPNotifyReturnCode */
7586 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7588 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7592 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7594 /* End of NWDPNotifyReturnCode */
7596 case 0x00000010: /* Get Notify NDS Object Name */
7597 proto_tree_add_item(ndps_tree, hf_ndps_items, tvb, foffset,
7600 foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset);
7601 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
7602 /* Start of NWDPNotifyReturnCode */
7603 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7605 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7609 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7611 /* End of NWDPNotifyReturnCode */
7613 case 0x00000011: /* Get Notify Session Information */
7614 proto_tree_add_item(ndps_tree, hf_ndps_get_session_type, tvb, foffset, 4, FALSE);
7616 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
7618 /* Start of NWDPNotifyReturnCode */
7619 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7621 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7625 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7627 /* End of NWDPNotifyReturnCode */
7633 case 0x06097a: /* Resman */
7636 case 0x00000001: /* Bind */
7637 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7638 atree = proto_item_add_subtree(aitem, ett_ndps);
7640 for (i = 1 ; i <= number_of_items; i++ )
7642 length = tvb_get_ntohl(tvb, foffset);
7644 proto_tree_add_item(ndps_tree, hf_ndps_attribute_set, tvb, foffset, length, FALSE);
7646 /* Start of NWDPResManReturnCode */
7647 /*proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7649 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7653 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7655 /* End of NWDPResManReturnCode */
7657 case 0x00000002: /* Unbind */
7660 case 0x00000003: /* Add Resource File */
7661 case 0x00000004: /* Delete Resource File */
7662 /* Start of NWDPResManReturnCode */
7663 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7665 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7669 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7671 /* End of NWDPResManReturnCode */
7673 case 0x00000005: /* List Resources */
7674 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7676 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7680 proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
7682 proto_tree_add_item(ndps_tree, hf_ndps_resource_list_type, tvb, foffset, 4, FALSE);
7683 resource_type = tvb_get_ntohl(tvb, foffset);
7685 switch (resource_type)
7687 case 0: /* Print Drivers */
7688 case 1: /* Printer Definitions */
7689 case 2: /* Printer Definitions Short */
7690 number_of_items = tvb_get_ntohl(tvb, foffset);
7691 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7692 atree = proto_item_add_subtree(aitem, ett_ndps);
7694 for (i = 1 ; i <= number_of_items; i++ )
7696 if (tvb_get_ntohl(tvb, foffset)==0) { /* Offset for old type support */
7699 foffset += 4; /* Item always == 1 */
7700 foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset);
7701 if (tvb_get_ntohl(tvb, foffset)==0) {
7705 foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset);
7706 if (tvb_get_ntohl(tvb, foffset)==0) {
7710 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset);
7713 case 3: /* Banner Page Files */
7714 number_of_items = tvb_get_ntohl(tvb, foffset);
7715 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7716 atree = proto_item_add_subtree(aitem, ett_ndps);
7718 for (i = 1 ; i <= number_of_items; i++ )
7720 foffset = ndps_string(tvb, hf_ndps_banner_name, atree, foffset);
7723 case 4: /* Font Types */
7724 number_of_items = tvb_get_ntohl(tvb, foffset);
7725 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7726 atree = proto_item_add_subtree(aitem, ett_ndps);
7728 for (i = 1 ; i <= number_of_items; i++ )
7730 foffset = ndps_string(tvb, hf_font_type_name, atree, foffset);
7733 case 7: /* Font Files */
7734 number_of_items = tvb_get_ntohl(tvb, foffset);
7735 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7736 atree = proto_item_add_subtree(aitem, ett_ndps);
7738 for (i = 1 ; i <= number_of_items; i++ )
7740 foffset = ndps_string(tvb, hf_font_file_name, atree, foffset);
7743 case 5: /* Printer Driver Files */
7744 case 12: /* Printer Driver Files 2 */
7745 case 9: /* Generic Files */
7746 number_of_items = tvb_get_ntohl(tvb, foffset);
7747 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7748 atree = proto_item_add_subtree(aitem, ett_ndps);
7750 for (i = 1 ; i <= number_of_items; i++ )
7752 foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset);
7753 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset);
7754 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset);
7757 case 6: /* Printer Definition File */
7758 number_of_items = tvb_get_ntohl(tvb, foffset);
7759 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7760 atree = proto_item_add_subtree(aitem, ett_ndps);
7762 for (i = 1 ; i <= number_of_items; i++ )
7764 foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset);
7765 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset);
7766 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset);
7768 number_of_items = tvb_get_ntohl(tvb, foffset);
7769 bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7770 btree = proto_item_add_subtree(bitem, ett_ndps);
7772 for (i = 1 ; i <= number_of_items; i++ )
7774 foffset = ndps_string(tvb, hf_ndps_def_file_name, btree, foffset);
7775 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7776 citem = proto_tree_add_item(btree, hf_ndps_win31_items, tvb, foffset, 4, FALSE);
7777 ctree = proto_item_add_subtree(citem, ett_ndps);
7779 for (i = 1 ; i <= number_of_items2; i++ )
7781 foffset = ndps_string(tvb, hf_ndps_windows_key, ctree, foffset);
7783 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7784 citem = proto_tree_add_item(btree, hf_ndps_win95_items, tvb, foffset, 4, FALSE);
7785 ctree = proto_item_add_subtree(citem, ett_ndps);
7787 for (i = 1 ; i <= number_of_items2; i++ )
7789 foffset = ndps_string(tvb, hf_ndps_windows_key, ctree, foffset);
7793 case 10: /* Printer Definition File 2 */
7794 foffset = ndps_string(tvb, hf_ndps_def_file_name, ndps_tree, foffset);
7795 number_of_items = tvb_get_ntohl(tvb, foffset);
7796 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7797 atree = proto_item_add_subtree(aitem, ett_ndps);
7799 for (i = 1 ; i <= number_of_items; i++ )
7801 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
7803 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7804 bitem = proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7805 btree = proto_item_add_subtree(bitem, ett_ndps);
7807 for (i = 1 ; i <= number_of_items2; i++ )
7809 foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset);
7813 case 8: /* Generic Type */
7814 case 11: /* Printer Driver Types 2 */
7815 case 13: /* Printer Driver Types Archive */
7816 number_of_items = tvb_get_ntohl(tvb, foffset);
7817 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7818 atree = proto_item_add_subtree(aitem, ett_ndps);
7820 for (i = 1 ; i <= number_of_items; i++ )
7822 foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset);
7823 foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset);
7824 foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset);
7825 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset);
7826 proto_tree_add_item(atree, hf_archive_type, tvb, foffset, 4, FALSE);
7828 proto_tree_add_item(atree, hf_archive_file_size, tvb, foffset, 4, FALSE);
7832 case 14: /* Languages Available */
7833 number_of_items = tvb_get_ntohl(tvb, foffset);
7834 aitem = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7835 atree = proto_item_add_subtree(aitem, ett_ndps);
7837 for (i = 1 ; i <= number_of_items; i++ )
7839 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
7847 case 0x00000006: /* Get Resource File */
7848 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7850 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7854 proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, FALSE);
7856 proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, FALSE);
7858 proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset, -1, FALSE);
7860 case 0x00000007: /* Get Resource File Date */
7861 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7863 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7867 proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, FALSE);
7870 case 0x00000008: /* Get Resource Manager NDS Object Name */
7871 qualified_name_type = tvb_get_ntohl(tvb, foffset);
7872 proto_tree_add_uint(ndps_tree, hf_ndps_qualified_name, tvb, foffset,
7873 4, qualified_name_type);
7875 if (qualified_name_type != 0) {
7876 if (qualified_name_type == 1) {
7877 foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset);
7881 foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset);
7882 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset);
7885 proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
7888 case 0x00000009: /* Get Resource Manager Session Information */
7889 proto_tree_add_item(ndps_tree, hf_ndps_get_resman_session_type, tvb, foffset, 4, FALSE);
7891 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
7893 /* Start of NWDPResManReturnCode */
7894 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7896 if (tvb_get_ntohl(tvb, foffset-4) == 0)
7900 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
7902 /* End of NWDPResManReturnCode */
7904 case 0x0000000a: /* Set Resource Language Context */
7905 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7907 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7911 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
7918 case 0x06097b: /* Delivery */
7921 case 0x00000001: /* Delivery Bind */
7922 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7925 case 0x00000002: /* Delivery Unbind */
7928 case 0x00000003: /* Delivery Send */
7929 case 0x00000004: /* Delivery Send2 */
7930 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7932 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7936 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, 0, "Failed Items");
7937 atree = proto_item_add_subtree(aitem, ett_ndps);
7938 proto_tree_add_item(atree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7939 number_of_items=tvb_get_ntohl(tvb, foffset);
7941 for (i = 1 ; i <= number_of_items; i++ )
7943 length=tvb_get_ntohl(tvb, foffset);
7944 if(tvb_length_remaining(tvb, foffset) < length)
7948 proto_tree_add_item(atree, hf_ndps_item_ptr, tvb, foffset, length, FALSE);
7963 proto_register_ndps(void)
7965 static hf_register_info hf_ndps[] = {
7966 { &hf_ndps_record_mark,
7967 { "Record Mark", "ndps.record_mark", FT_UINT16, BASE_HEX, NULL, 0x0,
7968 "Record Mark", HFILL }},
7970 { &hf_ndps_packet_type,
7971 { "Packet Type", "ndps.packet_type",
7972 FT_UINT32, BASE_HEX, VALS(ndps_packet_types), 0x0,
7973 "Packet Type", HFILL }},
7976 { "Record Length", "ndps.record_length",
7977 FT_UINT16, BASE_DEC, NULL, 0x0,
7978 "Record Length", HFILL }},
7981 { "Exchange ID", "ndps.xid",
7982 FT_UINT32, BASE_HEX, NULL, 0x0,
7983 "Exchange ID", HFILL }},
7985 { &hf_ndps_rpc_version,
7986 { "RPC Version", "ndps.rpc_version",
7987 FT_UINT32, BASE_HEX, NULL, 0x0,
7988 "RPC Version", HFILL }},
7990 { &hf_spx_ndps_program,
7991 { "NDPS Program Number", "spx.ndps_program",
7992 FT_UINT32, BASE_HEX, VALS(spx_ndps_program_vals), 0x0,
7993 "NDPS Program Number", HFILL }},
7995 { &hf_spx_ndps_version,
7996 { "Program Version", "spx.ndps_version",
7997 FT_UINT32, BASE_DEC, NULL, 0x0,
7998 "Program Version", HFILL }},
8001 { "NDPS Error", "spx.ndps_error",
8002 FT_UINT32, BASE_HEX, NULL, 0x0,
8003 "NDPS Error", HFILL }},
8005 { &hf_spx_ndps_func_print,
8006 { "Print Program", "spx.ndps_func_print",
8007 FT_UINT32, BASE_HEX, VALS(spx_ndps_print_func_vals), 0x0,
8008 "Print Program", HFILL }},
8010 { &hf_spx_ndps_func_notify,
8011 { "Notify Program", "spx.ndps_func_notify",
8012 FT_UINT32, BASE_HEX, VALS(spx_ndps_notify_func_vals), 0x0,
8013 "Notify Program", HFILL }},
8015 { &hf_spx_ndps_func_delivery,
8016 { "Delivery Program", "spx.ndps_func_delivery",
8017 FT_UINT32, BASE_HEX, VALS(spx_ndps_deliver_func_vals), 0x0,
8018 "Delivery Program", HFILL }},
8020 { &hf_spx_ndps_func_registry,
8021 { "Registry Program", "spx.ndps_func_registry",
8022 FT_UINT32, BASE_HEX, VALS(spx_ndps_registry_func_vals), 0x0,
8023 "Registry Program", HFILL }},
8025 { &hf_spx_ndps_func_resman,
8026 { "ResMan Program", "spx.ndps_func_resman",
8027 FT_UINT32, BASE_HEX, VALS(spx_ndps_resman_func_vals), 0x0,
8028 "ResMan Program", HFILL }},
8030 { &hf_spx_ndps_func_broker,
8031 { "Broker Program", "spx.ndps_func_broker",
8032 FT_UINT32, BASE_HEX, VALS(spx_ndps_broker_func_vals), 0x0,
8033 "Broker Program", HFILL }},
8036 { "Number of Items", "ndps.items",
8037 FT_UINT32, BASE_DEC, NULL, 0x0,
8038 "Number of Items", HFILL }},
8041 { "Number of Objects", "ndps.objects",
8042 FT_UINT32, BASE_DEC, NULL, 0x0,
8043 "Number of Obejcts", HFILL }},
8045 { &hf_ndps_attributes,
8046 { "Number of Attributes", "ndps.attributes",
8047 FT_UINT32, BASE_DEC, NULL, 0x0,
8048 "Number of Attributes", HFILL }},
8051 { "Server", "ndps.sbuffer",
8052 FT_UINT32, BASE_DEC, NULL, 0x0,
8056 { "Connection", "ndps.rbuffer",
8057 FT_UINT32, BASE_DEC, NULL, 0x0,
8058 "Connection", HFILL }},
8060 { &hf_ndps_user_name,
8061 { "Trustee Name", "ndps.user_name",
8062 FT_STRING, BASE_NONE, NULL, 0x0,
8063 "Trustee Name", HFILL }},
8065 { &hf_ndps_broker_name,
8066 { "Broker Name", "ndps.broker_name",
8067 FT_STRING, BASE_NONE, NULL, 0x0,
8068 "Broker Name", HFILL }},
8071 { "Printer Name", "ndps.pa_name",
8072 FT_STRING, BASE_NONE, NULL, 0x0,
8073 "Printer Name", HFILL }},
8076 { "Tree", "ndps.tree",
8077 FT_STRING, BASE_NONE, NULL, 0x0,
8080 { &hf_ndps_reqframe,
8081 { "Request Frame", "ndps.reqframe",
8082 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
8083 "Request Frame", HFILL }},
8085 { &hf_ndps_error_val,
8086 { "Return Status", "ndps.error_val",
8087 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
8088 "Return Status", HFILL }},
8091 { "Object ID", "ndps.object",
8092 FT_UINT32, BASE_HEX, NULL, 0x0,
8093 "Object ID", HFILL }},
8095 { &hf_ndps_cred_type,
8096 { "Credential Type", "ndps.cred_type",
8097 FT_UINT32, BASE_HEX, VALS(ndps_credential_enum), 0x0,
8098 "Credential Type", HFILL }},
8100 { &hf_ndps_server_name,
8101 { "Server Name", "ndps.server_name",
8102 FT_STRING, BASE_DEC, NULL, 0x0,
8103 "Server Name", HFILL }},
8105 { &hf_ndps_connection,
8106 { "Connection", "ndps.connection",
8107 FT_UINT16, BASE_DEC, NULL, 0x0,
8108 "Connection", HFILL }},
8110 { &hf_ndps_ext_error,
8111 { "Extended Error Code", "ndps.ext_error",
8112 FT_UINT32, BASE_HEX, NULL, 0x0,
8113 "Extended Error Code", HFILL }},
8115 { &hf_ndps_auth_null,
8116 { "Auth Null", "ndps.auth_null",
8117 FT_BYTES, BASE_NONE, NULL, 0x0,
8118 "Auth Null", HFILL }},
8120 { &hf_ndps_rpc_accept,
8121 { "RPC Accept or Deny", "ndps.rpc_acc",
8122 FT_UINT32, BASE_HEX, VALS(true_false), 0x0,
8123 "RPC Accept or Deny", HFILL }},
8125 { &hf_ndps_rpc_acc_stat,
8126 { "RPC Accept Status", "ndps.rpc_acc_stat",
8127 FT_UINT32, BASE_HEX, VALS(accept_stat), 0x0,
8128 "RPC Accept Status", HFILL }},
8130 { &hf_ndps_rpc_rej_stat,
8131 { "RPC Reject Status", "ndps.rpc_rej_stat",
8132 FT_UINT32, BASE_HEX, VALS(reject_stat), 0x0,
8133 "RPC Reject Status", HFILL }},
8135 { &hf_ndps_rpc_acc_results,
8136 { "RPC Accept Results", "ndps.rpc_acc_res",
8137 FT_UINT32, BASE_HEX, NULL, 0x0,
8138 "RPC Accept Results", HFILL }},
8140 { &hf_ndps_problem_type,
8141 { "Problem Type", "ndps.rpc_prob_type",
8142 FT_UINT32, BASE_HEX, VALS(error_type_enum), 0x0,
8143 "Problem Type", HFILL }},
8145 { &hf_security_problem_type,
8146 { "Security Problem", "ndps.rpc_sec_prob",
8147 FT_UINT32, BASE_HEX, VALS(security_problem_enum), 0x0,
8148 "Security Problem", HFILL }},
8150 { &hf_service_problem_type,
8151 { "Service Problem", "ndps.rpc_serv_prob",
8152 FT_UINT32, BASE_HEX, VALS(service_problem_enum), 0x0,
8153 "Service Problem", HFILL }},
8155 { &hf_access_problem_type,
8156 { "Access Problem", "ndps.rpc_acc_prob",
8157 FT_UINT32, BASE_HEX, VALS(access_problem_enum), 0x0,
8158 "Access Problem", HFILL }},
8160 { &hf_printer_problem_type,
8161 { "Printer Problem", "ndps.rpc_print_prob",
8162 FT_UINT32, BASE_HEX, VALS(printer_problem_enum), 0x0,
8163 "Printer Problem", HFILL }},
8165 { &hf_selection_problem_type,
8166 { "Selection Problem", "ndps.rpc_sel_prob",
8167 FT_UINT32, BASE_HEX, VALS(selection_problem_enum), 0x0,
8168 "Selection Problem", HFILL }},
8170 { &hf_doc_access_problem_type,
8171 { "Document Access Problem", "ndps.rpc_doc_acc_prob",
8172 FT_UINT32, BASE_HEX, VALS(doc_access_problem_enum), 0x0,
8173 "Document Access Problem", HFILL }},
8175 { &hf_attribute_problem_type,
8176 { "Attribute Problem", "ndps.rpc_attr_prob",
8177 FT_UINT32, BASE_HEX, VALS(attribute_problem_enum), 0x0,
8178 "Attribute Problem", HFILL }},
8180 { &hf_update_problem_type,
8181 { "Update Problem", "ndps.rpc_update_prob",
8182 FT_UINT32, BASE_HEX, VALS(update_problem_enum), 0x0,
8183 "Update Problem", HFILL }},
8186 { "Object ID Type", "ndps.rpc_obj_id_type",
8187 FT_UINT32, BASE_HEX, VALS(obj_identification_enum), 0x0,
8188 "Object ID Type", HFILL }},
8190 { &hf_oid_struct_size,
8191 { "OID Struct Size", "ndps.rpc_oid_struct_size",
8192 FT_UINT16, BASE_HEX, NULL, 0x0,
8193 "OID Struct Size", HFILL }},
8196 { "Object Name", "ndps.ndps_object_name",
8197 FT_STRING, BASE_NONE, NULL, 0x0,
8198 "Object Name", HFILL }},
8200 { &hf_ndps_document_number,
8201 { "Document Number", "ndps.ndps_doc_num",
8202 FT_UINT32, BASE_HEX, NULL, 0x0,
8203 "Document Number", HFILL }},
8205 { &hf_ndps_nameorid,
8206 { "Name or ID Type", "ndps.ndps_nameorid",
8207 FT_UINT32, BASE_HEX, VALS(nameorid_enum), 0x0,
8208 "Name or ID Type", HFILL }},
8210 { &hf_local_object_name,
8211 { "Local Object Name", "ndps.ndps_loc_object_name",
8212 FT_STRING, BASE_NONE, NULL, 0x0,
8213 "Local Object Name", HFILL }},
8216 { "Printer Name", "ndps.ndps_printer_name",
8217 FT_STRING, BASE_NONE, NULL, 0x0,
8218 "Printer Name", HFILL }},
8220 { &hf_ndps_qualified_name,
8221 { "Qualified Name Type", "ndps.ndps_qual_name_type",
8222 FT_UINT32, BASE_HEX, VALS(qualified_name_enum), 0x0,
8223 "Qualified Name Type", HFILL }},
8225 { &hf_ndps_qualified_name2,
8226 { "Qualified Name Type", "ndps.ndps_qual_name_type2",
8227 FT_UINT32, BASE_HEX, VALS(qualified_name_enum2), 0x0,
8228 "Qualified Name Type", HFILL }},
8231 { &hf_ndps_item_count,
8232 { "Number of Items", "ndps.ndps_item_count",
8233 FT_UINT32, BASE_DEC, NULL, 0x0,
8234 "Number of Items", HFILL }},
8236 { &hf_ndps_qualifier,
8237 { "Qualifier", "ndps.ndps_qual",
8238 FT_UINT32, BASE_HEX, NULL, 0x0,
8239 "Qualifier", HFILL }},
8241 { &hf_ndps_lib_error,
8242 { "Lib Error", "ndps.ndps_lib_error",
8243 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
8244 "Lib Error", HFILL }},
8246 { &hf_ndps_other_error,
8247 { "Other Error", "ndps.ndps_other_error",
8248 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
8249 "Other Error", HFILL }},
8251 { &hf_ndps_other_error_2,
8252 { "Other Error 2", "ndps.ndps_other_error_2",
8253 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
8254 "Other Error 2", HFILL }},
8257 { "Session Handle", "ndps.ndps_session",
8258 FT_UINT32, BASE_HEX, NULL, 0x0,
8259 "Session Handle", HFILL }},
8261 { &hf_ndps_abort_flag,
8262 { "Abort?", "ndps.ndps_abort",
8263 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8266 { &hf_obj_attribute_type,
8267 { "Attribute Type", "ndps.ndps_attrib_type",
8268 FT_UINT32, BASE_HEX, VALS(ndps_attribute_enum), 0x0,
8269 "Attribute Type", HFILL }},
8271 { &hf_ndps_attribute_value,
8272 { "Value", "ndps.attribue_value",
8273 FT_UINT32, BASE_HEX, NULL, 0x0,
8276 { &hf_ndps_lower_range,
8277 { "Lower Range", "ndps.lower_range",
8278 FT_UINT32, BASE_HEX, NULL, 0x0,
8279 "Lower Range", HFILL }},
8281 { &hf_ndps_upper_range,
8282 { "Upper Range", "ndps.upper_range",
8283 FT_UINT32, BASE_HEX, NULL, 0x0,
8284 "Upper Range", HFILL }},
8287 { "Value", "ndps.n64",
8288 FT_BYTES, BASE_NONE, NULL, 0x0,
8291 { &hf_ndps_lower_range_n64,
8292 { "Lower Range", "ndps.lower_range_n64",
8293 FT_BYTES, BASE_NONE, NULL, 0x0,
8294 "Lower Range", HFILL }},
8296 { &hf_ndps_upper_range_n64,
8297 { "Upper Range", "ndps.upper_range_n64",
8298 FT_BYTES, BASE_NONE, NULL, 0x0,
8299 "Upper Range", HFILL }},
8301 { &hf_ndps_attrib_boolean,
8302 { "Value?", "ndps.ndps_attrib_boolean",
8303 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8306 { &hf_ndps_realization,
8307 { "Realization Type", "ndps.ndps_realization",
8308 FT_UINT32, BASE_HEX, VALS(ndps_realization_enum), 0x0,
8309 "Realization Type", HFILL }},
8311 { &hf_ndps_xdimension_n64,
8312 { "X Dimension", "ndps.xdimension_n64",
8313 FT_BYTES, BASE_NONE, NULL, 0x0,
8314 "X Dimension", HFILL }},
8316 { &hf_ndps_ydimension_n64,
8317 { "Y Dimension", "ndps.xdimension_n64",
8318 FT_BYTES, BASE_NONE, NULL, 0x0,
8319 "Y Dimension", HFILL }},
8321 { &hf_ndps_dim_value,
8322 { "Dimension Value Type", "ndps.ndps_dim_value",
8323 FT_UINT32, BASE_HEX, VALS(ndps_dim_value_enum), 0x0,
8324 "Dimension Value Type", HFILL }},
8326 { &hf_ndps_dim_flag,
8327 { "Dimension Flag", "ndps.ndps_dim_falg",
8328 FT_UINT32, BASE_HEX, NULL, 0x0,
8329 "Dimension Flag", HFILL }},
8331 { &hf_ndps_xydim_value,
8332 { "XY Dimension Value Type", "ndps.ndps_xydim_value",
8333 FT_UINT32, BASE_HEX, VALS(ndps_xydim_value_enum), 0x0,
8334 "XY Dimension Value Type", HFILL }},
8336 { &hf_ndps_location_value,
8337 { "Location Value Type", "ndps.ndps_location_value",
8338 FT_UINT32, BASE_HEX, VALS(ndps_location_value_enum), 0x0,
8339 "Location Value Type", HFILL }},
8341 { &hf_ndps_xmin_n64,
8342 { "Minimum X Dimension", "ndps.xmin_n64",
8343 FT_BYTES, BASE_NONE, NULL, 0x0,
8344 "Minimum X Dimension", HFILL }},
8346 { &hf_ndps_xmax_n64,
8347 { "Maximum X Dimension", "ndps.xmax_n64",
8348 FT_BYTES, BASE_NONE, NULL, 0x0,
8349 "Maximum X Dimension", HFILL }},
8351 { &hf_ndps_ymin_n64,
8352 { "Minimum Y Dimension", "ndps.ymin_n64",
8353 FT_BYTES, BASE_NONE, NULL, 0x0,
8354 "Minimum Y Dimension", HFILL }},
8356 { &hf_ndps_ymax_n64,
8357 { "Maximum Y Dimension", "ndps.ymax_n64",
8358 FT_BYTES, BASE_NONE, NULL, 0x0,
8359 "Maximum Y Dimension", HFILL }},
8361 { &hf_ndps_edge_value,
8362 { "Edge Value", "ndps.ndps_edge_value",
8363 FT_UINT32, BASE_HEX, VALS(ndps_edge_value_enum), 0x0,
8364 "Edge Value", HFILL }},
8366 { &hf_ndps_cardinal_or_oid,
8367 { "Cardinal or OID", "ndps.ndps_car_or_oid",
8368 FT_UINT32, BASE_HEX, VALS(ndps_card_or_oid_enum), 0x0,
8369 "Cardinal or OID", HFILL }},
8371 { &hf_ndps_cardinal_name_or_oid,
8372 { "Cardinal Name or OID", "ndps.ndps_car_name_or_oid",
8373 FT_UINT32, BASE_HEX, VALS(ndps_card_name_or_oid_enum), 0x0,
8374 "Cardinal Name or OID", HFILL }},
8376 { &hf_ndps_integer_or_oid,
8377 { "Integer or OID", "ndps.ndps_integer_or_oid",
8378 FT_UINT32, BASE_HEX, VALS(ndps_integer_or_oid_enum), 0x0,
8379 "Integer or OID", HFILL }},
8381 { &hf_ndps_profile_id,
8382 { "Profile ID", "ndps.ndps_profile_id",
8383 FT_UINT32, BASE_HEX, NULL, 0x0,
8384 "Profile ID", HFILL }},
8386 { &hf_ndps_persistence,
8387 { "Persistence", "ndps.ndps_persistence",
8388 FT_UINT32, BASE_HEX, VALS(ndps_persistence_enum), 0x0,
8389 "Persistence", HFILL }},
8391 { &hf_ndps_language_id,
8392 { "Language ID", "ndps.ndps_lang_id",
8393 FT_UINT32, BASE_HEX, NULL, 0x0,
8394 "Language ID", HFILL }},
8397 { "Address Type", "ndps.ndps_address_type",
8398 FT_UINT32, BASE_HEX, VALS(ndps_address_type_enum), 0x0,
8399 "Address Type", HFILL }},
8402 { "Address", "ndps.ndps_address",
8403 FT_UINT32, BASE_HEX, VALS(ndps_address_enum), 0x0,
8404 "Address", HFILL }},
8406 { &hf_ndps_add_bytes,
8407 { "Address Bytes", "ndps.add_bytes",
8408 FT_BYTES, BASE_NONE, NULL, 0x0,
8409 "Address Bytes", HFILL }},
8411 { &hf_ndps_event_type,
8412 { "Event Type", "ndps.ndps_event_type",
8413 FT_UINT32, BASE_HEX, NULL, 0x0,
8414 "Event Type", HFILL }},
8416 { &hf_ndps_event_object_identifier,
8417 { "Event Object Type", "ndps.ndps_event_object_identifier",
8418 FT_UINT32, BASE_HEX, VALS(ndps_event_object_enum), 0x0,
8419 "Event Object Type", HFILL }},
8421 { &hf_ndps_octet_string,
8422 { "Octet String", "ndps.octet_string",
8423 FT_BYTES, BASE_NONE, NULL, 0x0,
8424 "Octet String", HFILL }},
8427 { "Scope", "ndps.scope",
8428 FT_UINT32, BASE_HEX, NULL, 0x0,
8432 { "Address Length", "ndps.addr_len",
8433 FT_UINT32, BASE_DEC, NULL, 0x0,
8434 "Address Length", HFILL }},
8437 { "IPX Network", "ndps.net",
8438 FT_IPXNET, BASE_NONE, NULL, 0x0,
8442 { "Node", "ndps.node",
8443 FT_ETHER, BASE_NONE, NULL, 0x0,
8447 { "IPX Socket", "ndps.socket",
8448 FT_UINT16, BASE_HEX, NULL, 0x0,
8449 "IPX Socket", HFILL }},
8452 { "IP Port", "ndps.port",
8453 FT_UINT16, BASE_DEC, NULL, 0x0,
8454 "IP Port", HFILL }},
8457 { "IP Address", "ndps.ip",
8458 FT_IPv4, BASE_DEC, NULL, 0x0,
8459 "IP Address", HFILL }},
8461 { &hf_ndps_server_type,
8462 { "NDPS Server Type", "ndps.ndps_server_type",
8463 FT_UINT32, BASE_HEX, VALS(ndps_server_type_enum), 0x0,
8464 "NDPS Server Type", HFILL }},
8466 { &hf_ndps_service_type,
8467 { "NDPS Service Type", "ndps.ndps_service_type",
8468 FT_UINT32, BASE_HEX, VALS(ndps_service_type_enum), 0x0,
8469 "NDPS Service Type", HFILL }},
8471 { &hf_ndps_service_enabled,
8472 { "Service Enabled?", "ndps.ndps_service_enabled",
8473 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8474 "Service Enabled?", HFILL }},
8476 { &hf_ndps_method_name,
8477 { "Method Name", "ndps.method_name",
8478 FT_STRING, BASE_NONE, NULL, 0x0,
8479 "Method Name", HFILL }},
8481 { &hf_ndps_method_ver,
8482 { "Method Version", "ndps.method_ver",
8483 FT_STRING, BASE_NONE, NULL, 0x0,
8484 "Method Version", HFILL }},
8486 { &hf_ndps_file_name,
8487 { "File Name", "ndps.file_name",
8488 FT_STRING, BASE_NONE, NULL, 0x0,
8489 "File Name", HFILL }},
8491 { &hf_ndps_admin_submit,
8492 { "Admin Submit Flag?", "ndps.admin_submit_flag",
8493 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8494 "Admin Submit Flag?", HFILL }},
8497 { "Object ID", "ndps.oid",
8498 FT_BYTES, BASE_NONE, NULL, 0x0,
8499 "Object ID", HFILL }},
8501 { &hf_ndps_object_op,
8502 { "Operation", "ndps.ndps_object_op",
8503 FT_UINT32, BASE_HEX, VALS(ndps_object_op_enum), 0x0,
8504 "Operation", HFILL }},
8507 { "Answer Time", "ndps.answer_time",
8508 FT_UINT32, BASE_DEC, NULL, 0x0,
8509 "Answer Time", HFILL }},
8511 { &hf_oid_asn1_type,
8512 { "ASN.1 Type", "ndps.asn1_type",
8513 FT_UINT16, BASE_DEC, NULL, 0x0,
8514 "ASN.1 Type", HFILL }},
8516 { &hf_ndps_item_ptr,
8517 { "Item Pointer", "ndps.item_ptr",
8518 FT_BYTES, BASE_DEC, NULL, 0x0,
8519 "Item Pointer", HFILL }},
8522 { "Length", "ndps.ndps_len",
8523 FT_UINT16, BASE_DEC, NULL, 0x0,
8527 { "Limit Encountered", "ndps.ndps_limit_enc",
8528 FT_UINT32, BASE_HEX, VALS(ndps_limit_enc_enum), 0x0,
8529 "Limit Encountered", HFILL }},
8531 { &hf_ndps_delivery_add_type,
8532 { "Delivery Address Type", "ndps.ndps_delivery_add_type",
8533 FT_UINT32, BASE_HEX, VALS(ndps_delivery_add_enum), 0x0,
8534 "Delivery Address Type", HFILL }},
8536 { &hf_ndps_criterion_type,
8537 { "Criterion Type", "ndps.ndps_criterion_type",
8538 FT_UINT32, BASE_HEX, VALS(ndps_attribute_enum), 0x0,
8539 "Criterion Type", HFILL }},
8541 { &hf_ndps_ignored_type,
8542 { "Ignored Type", "ndps.ndps_ignored_type",
8543 FT_UINT32, BASE_HEX, VALS(ndps_attribute_enum), 0x0,
8544 "Ignored Type", HFILL }},
8546 { &hf_ndps_resource_type,
8547 { "Resource Type", "ndps.ndps_resource_type",
8548 FT_UINT32, BASE_HEX, VALS(ndps_resource_enum), 0x0,
8549 "Resource Type", HFILL }},
8551 { &hf_ndps_identifier_type,
8552 { "Identifier Type", "ndps.ndps_identifier_type",
8553 FT_UINT32, BASE_HEX, VALS(ndps_identifier_enum), 0x0,
8554 "Identifier Type", HFILL }},
8556 { &hf_ndps_page_flag,
8557 { "Page Flag", "ndps.ndps_page_flag",
8558 FT_UINT32, BASE_HEX, NULL, 0x0,
8559 "Page Flag", HFILL }},
8561 { &hf_ndps_media_type,
8562 { "Media Type", "ndps.ndps_media_type",
8563 FT_UINT32, BASE_HEX, VALS(ndps_media_enum), 0x0,
8564 "Media Type", HFILL }},
8566 { &hf_ndps_page_size,
8567 { "Page Size", "ndps.ndps_page_size",
8568 FT_UINT32, BASE_HEX, VALS(ndps_page_size_enum), 0x0,
8569 "Page Size", HFILL }},
8571 { &hf_ndps_direction,
8572 { "Direction", "ndps.ndps_direction",
8573 FT_UINT32, BASE_HEX, VALS(ndps_pres_direction_enum), 0x0,
8574 "Direction", HFILL }},
8576 { &hf_ndps_page_order,
8577 { "Page Order", "ndps.ndps_page_order",
8578 FT_UINT32, BASE_HEX, VALS(ndps_page_order_enum), 0x0,
8579 "Page Order", HFILL }},
8581 { &hf_ndps_medium_size,
8582 { "Medium Size", "ndps.ndps_medium_size",
8583 FT_UINT32, BASE_HEX, VALS(ndps_medium_size_enum), 0x0,
8584 "Medium Size", HFILL }},
8586 { &hf_ndps_long_edge_feeds,
8587 { "Long Edge Feeds?", "ndps.ndps_long_edge_feeds",
8588 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8589 "Long Edge Feeds?", HFILL }},
8591 { &hf_ndps_inc_across_feed,
8592 { "Increment Across Feed", "ndps.inc_across_feed",
8593 FT_BYTES, BASE_NONE, NULL, 0x0,
8594 "Increment Across Feed", HFILL }},
8596 { &hf_ndps_size_inc_in_feed,
8597 { "Size Increment in Feed", "ndps.size_inc_in_feed",
8598 FT_BYTES, BASE_NONE, NULL, 0x0,
8599 "Size Increment in Feed", HFILL }},
8601 { &hf_ndps_page_orientation,
8602 { "Page Orientation", "ndps.ndps_page_orientation",
8603 FT_UINT32, BASE_HEX, VALS(ndps_page_orientation_enum), 0x0,
8604 "Page Orientation", HFILL }},
8606 { &hf_ndps_numbers_up,
8607 { "Numbers Up", "ndps.ndps_numbers_up",
8608 FT_UINT32, BASE_HEX, VALS(ndps_numbers_up_enum), 0x0,
8609 "Numbers Up", HFILL }},
8611 { &hf_ndps_xdimension,
8612 { "X Dimension", "ndps.ndps_xdimension",
8613 FT_UINT32, BASE_HEX, NULL, 0x0,
8614 "X Dimension", HFILL }},
8616 { &hf_ndps_ydimension,
8617 { "Y Dimension", "ndps.ndps_ydimension",
8618 FT_UINT32, BASE_HEX, NULL, 0x0,
8619 "Y Dimension", HFILL }},
8621 { &hf_ndps_state_severity,
8622 { "State Severity", "ndps.ndps_state_severity",
8623 FT_UINT32, BASE_HEX, VALS(ndps_state_severity_enum), 0x0,
8624 "State Severity", HFILL }},
8626 { &hf_ndps_training,
8627 { "Training", "ndps.ndps_training",
8628 FT_UINT32, BASE_HEX, VALS(ndps_training_enum), 0x0,
8629 "Training", HFILL }},
8631 { &hf_ndps_colorant_set,
8632 { "Colorant Set", "ndps.ndps_colorant_set",
8633 FT_UINT32, BASE_HEX, VALS(ndps_colorant_set_enum), 0x0,
8634 "Colorant Set", HFILL }},
8636 { &hf_ndps_card_enum_time,
8637 { "Cardinal, Enum, or Time", "ndps.ndps_card_enum_time",
8638 FT_UINT32, BASE_HEX, VALS(ndps_card_enum_time_enum), 0x0,
8639 "Cardinal, Enum, or Time", HFILL }},
8641 { &hf_ndps_attrs_arg,
8642 { "List Attribute Operation", "ndps.ndps_attrs_arg",
8643 FT_UINT32, BASE_HEX, VALS(ndps_attrs_arg_enum), 0x0,
8644 "List Attribute Operation", HFILL }},
8647 { "Context", "ndps.context",
8648 FT_BYTES, BASE_NONE, NULL, 0x0,
8649 "Context", HFILL }},
8652 { "Filter Type", "ndps.ndps_filter",
8653 FT_UINT32, BASE_HEX, VALS(ndps_filter_enum), 0x0,
8654 "Filter Type", HFILL }},
8656 { &hf_ndps_item_filter,
8657 { "Filter Item Operation", "ndps.ndps_filter_item",
8658 FT_UINT32, BASE_HEX, VALS(ndps_filter_item_enum), 0x0,
8659 "Filter Item Operation", HFILL }},
8661 { &hf_ndps_substring_match,
8662 { "Substring Match", "ndps.ndps_substring_match",
8663 FT_UINT32, BASE_HEX, VALS(ndps_match_criteria_enum), 0x0,
8664 "Substring Match", HFILL }},
8666 { &hf_ndps_time_limit,
8667 { "Time Limit", "ndps.ndps_time_limit",
8668 FT_UINT32, BASE_DEC, NULL, 0x0,
8669 "Time Limit", HFILL }},
8671 { &hf_ndps_count_limit,
8672 { "Count Limit", "ndps.ndps_count_limit",
8673 FT_UINT32, BASE_DEC, NULL, 0x0,
8674 "Count Limit", HFILL }},
8676 { &hf_ndps_operator,
8677 { "Operator Type", "ndps.ndps_operator",
8678 FT_UINT32, BASE_DEC, VALS(ndps_operator_enum), 0x0,
8679 "Operator Type", HFILL }},
8681 { &hf_ndps_password,
8682 { "Password", "ndps.password",
8683 FT_BYTES, BASE_NONE, NULL, 0x0,
8684 "Password", HFILL }},
8686 { &hf_ndps_retrieve_restrictions,
8687 { "Retrieve Restrictions", "ndps.ndps_ret_restrict",
8688 FT_UINT32, BASE_DEC, NULL, 0x0,
8689 "Retrieve Restrictions", HFILL }},
8691 { &hf_bind_security,
8692 { "Bind Security Options", "ndps.ndps_bind_security",
8693 FT_UINT32, BASE_DEC, NULL, 0x0,
8694 "Bind Security Options", HFILL }},
8696 { &hf_ndps_max_items,
8697 { "Maximum Items in List", "ndps.ndps_max_items",
8698 FT_UINT32, BASE_DEC, NULL, 0x0,
8699 "Maximum Items in List", HFILL }},
8701 { &hf_ndps_status_flags,
8702 { "Status Flag", "ndps.ndps_status_flags",
8703 FT_UINT32, BASE_DEC, NULL, 0x0,
8704 "Status Flag", HFILL }},
8706 { &hf_ndps_resource_list_type,
8707 { "Resource Type", "ndps.ndps_resource_type",
8708 FT_UINT32, BASE_DEC, VALS(ndps_resource_type_enum), 0x0,
8709 "Resource Type", HFILL }},
8712 { "OS Type", "ndps.os_type",
8713 FT_UINT32, BASE_DEC, VALS(ndps_os_type_enum), 0x0,
8714 "OS Type", HFILL }},
8716 { &hf_ndps_printer_type,
8717 { "Printer Type", "ndps.prn_type",
8718 FT_STRING, BASE_NONE, NULL, 0x0,
8719 "Printer Type", HFILL }},
8721 { &hf_ndps_printer_manuf,
8722 { "Printer Manufacturer", "ndps.prn_manuf",
8723 FT_STRING, BASE_NONE, NULL, 0x0,
8724 "Printer Manufacturer", HFILL }},
8726 { &hf_ndps_inf_file_name,
8727 { "INF File Name", "ndps.inf_file_name",
8728 FT_STRING, BASE_NONE, NULL, 0x0,
8729 "INF File Name", HFILL }},
8731 { &hf_ndps_vendor_dir,
8732 { "Vendor Directory", "ndps.vendor_dir",
8733 FT_STRING, BASE_NONE, NULL, 0x0,
8734 "Vendor Directory", HFILL }},
8737 { "Banner Type", "ndps.banner_type",
8738 FT_UINT32, BASE_DEC, VALS(ndps_banner_type_enum), 0x0,
8739 "Banner Type", HFILL }},
8742 { "Font Type", "ndps.font_type",
8743 FT_UINT32, BASE_DEC, VALS(ndps_font_type_enum), 0x0,
8744 "Font Type", HFILL }},
8747 { "Printer ID", "ndps.printer_id",
8748 FT_BYTES, BASE_NONE, NULL, 0x0,
8749 "Printer ID", HFILL }},
8751 { &hf_ndps_font_name,
8752 { "Font Name", "ndps.font_name",
8753 FT_STRING, BASE_NONE, NULL, 0x0,
8754 "Font Name", HFILL }},
8756 { &hf_ndps_return_code,
8757 { "Return Code", "ndps.ret_code",
8758 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
8759 "Return Code", HFILL }},
8761 { &hf_ndps_banner_name,
8762 { "Banner Name", "ndps.banner_name",
8763 FT_STRING, BASE_NONE, NULL, 0x0,
8764 "Banner Name", HFILL }},
8766 { &hf_font_type_name,
8767 { "Font Type Name", "ndps.font_type_name",
8768 FT_STRING, BASE_NONE, NULL, 0x0,
8769 "Font Type Name", HFILL }},
8771 { &hf_font_file_name,
8772 { "Font File Name", "ndps.font_file_name",
8773 FT_STRING, BASE_NONE, NULL, 0x0,
8774 "Font File Name", HFILL }},
8776 { &hf_ndps_prn_file_name,
8777 { "Printer File Name", "ndps.print_file_name",
8778 FT_STRING, BASE_NONE, NULL, 0x0,
8779 "Printer File Name", HFILL }},
8781 { &hf_ndps_prn_dir_name,
8782 { "Printer Directory Name", "ndps.print_dir_name",
8783 FT_STRING, BASE_NONE, NULL, 0x0,
8784 "Printer Directory Name", HFILL }},
8786 { &hf_ndps_def_file_name,
8787 { "Printer Definition Name", "ndps.print_def_name",
8788 FT_STRING, BASE_NONE, NULL, 0x0,
8789 "Printer Definition Name", HFILL }},
8791 { &hf_ndps_win31_items,
8792 { "Windows 31 Keys", "ndps.win31_keys",
8793 FT_UINT32, BASE_DEC, NULL, 0x0,
8794 "Windows 31 Keys", HFILL }},
8796 { &hf_ndps_win95_items,
8797 { "Windows 95 Keys", "ndps.win95_keys",
8798 FT_UINT32, BASE_DEC, NULL, 0x0,
8799 "Windows 95 Keys", HFILL }},
8801 { &hf_ndps_windows_key,
8802 { "Windows Key", "ndps.windows_key",
8803 FT_STRING, BASE_NONE, NULL, 0x0,
8804 "Windows Key", HFILL }},
8807 { "Archive Type", "ndps.archive_type",
8808 FT_UINT32, BASE_DEC, VALS(ndps_archive_enum), 0x0,
8809 "Archive Type", HFILL }},
8811 { &hf_archive_file_size,
8812 { "Archive File Size", "ndps.archive_size",
8813 FT_UINT32, BASE_DEC, NULL, 0x0,
8814 "Archive File Size", HFILL }},
8816 { &hf_ndps_segment_overlap,
8817 { "Segment overlap", "ndps.segment.overlap", FT_BOOLEAN, BASE_NONE,
8818 NULL, 0x0, "Segment overlaps with other segments", HFILL }},
8820 { &hf_ndps_segment_overlap_conflict,
8821 { "Conflicting data in segment overlap", "ndps.segment.overlap.conflict",
8822 FT_BOOLEAN, BASE_NONE,
8823 NULL, 0x0, "Overlapping segments contained conflicting data", HFILL }},
8825 { &hf_ndps_segment_multiple_tails,
8826 { "Multiple tail segments found", "ndps.segment.multipletails",
8827 FT_BOOLEAN, BASE_NONE,
8828 NULL, 0x0, "Several tails were found when desegmenting the packet", HFILL }},
8830 { &hf_ndps_segment_too_long_segment,
8831 { "Segment too long", "ndps.segment.toolongsegment", FT_BOOLEAN, BASE_NONE,
8832 NULL, 0x0, "Segment contained data past end of packet", HFILL }},
8834 { &hf_ndps_segment_error,
8835 {"Desegmentation error", "ndps.segment.error", FT_FRAMENUM, BASE_NONE,
8836 NULL, 0x0, "Desegmentation error due to illegal segments", HFILL }},
8839 { "NDPS Fragment", "ndps.fragment", FT_FRAMENUM, BASE_NONE,
8840 NULL, 0x0, "NDPS Fragment", HFILL }},
8842 { &hf_ndps_segments,
8843 { "NDPS Fragments", "ndps.fragments", FT_NONE, BASE_NONE,
8844 NULL, 0x0, "NDPS Fragments", HFILL }},
8847 { "[Data]", "ndps.data", FT_NONE, BASE_NONE,
8848 NULL, 0x0, "[Data]", HFILL }},
8850 { &hf_get_status_flag,
8851 { "Get Status Flag", "ndps.get_status_flags",
8852 FT_UINT32, BASE_DEC, NULL, 0x0,
8853 "Get Status Flag", HFILL }},
8856 { "Resource Type", "ndps.res_type",
8857 FT_UINT32, BASE_DEC, VALS(ndps_res_type_enum), 0x0,
8858 "Resource Type", HFILL }},
8860 { &hf_file_timestamp,
8861 { "File Time Stamp", "ndps.file_time_stamp",
8862 FT_UINT32, BASE_DEC, NULL, 0x0,
8863 "File Time Stamp", HFILL }},
8866 { "Print Type", "ndps.print_arg",
8867 FT_UINT32, BASE_DEC, VALS(ndps_print_arg_enum), 0x0,
8868 "Print Type", HFILL }},
8871 { "Submission Complete?", "ndps.sub_complete", FT_BOOLEAN, BASE_NONE,
8872 NULL, 0x0, "Submission Complete?", HFILL }},
8875 { "Document Content", "ndps.doc_content",
8876 FT_UINT32, BASE_DEC, VALS(ndps_doc_content_enum), 0x0,
8877 "Document Content", HFILL }},
8879 { &hf_ndps_doc_name,
8880 { "Document Name", "ndps.doc_name",
8881 FT_STRING, BASE_NONE, NULL, 0x0,
8882 "Document Name", HFILL }},
8885 { "Local ID", "ndps.local_id",
8886 FT_UINT32, BASE_DEC, NULL, 0x0,
8887 "Local ID", HFILL }},
8889 { &hf_ndps_included_doc,
8890 { "Included Document", "ndps.included_doc",
8891 FT_BYTES, BASE_NONE, NULL, 0x0,
8892 "Included Document", HFILL }},
8894 { &hf_ndps_ref_name,
8895 { "Referenced Document Name", "ndps.ref_doc_name",
8896 FT_STRING, BASE_NONE, NULL, 0x0,
8897 "Referenced Document Name", HFILL }},
8899 { &hf_interrupt_job_type,
8900 { "Interrupt Job Identifier", "ndps.interrupt_job_type",
8901 FT_UINT32, BASE_DEC, VALS(ndps_interrupt_job_enum), 0x0,
8902 "Interrupt Job Identifier", HFILL }},
8904 { &hf_pause_job_type,
8905 { "Pause Job Identifier", "ndps.pause_job_type",
8906 FT_UINT32, BASE_DEC, VALS(ndps_pause_job_enum), 0x0,
8907 "Pause Job Identifier", HFILL }},
8910 { "Force?", "ndps.ndps_force",
8911 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8914 { &hf_resubmit_op_type,
8915 { "Resubmit Operation Type", "ndps.resubmit_op_type",
8916 FT_UINT32, BASE_DEC, VALS(ndps_resubmit_op_enum), 0x0,
8917 "Resubmit Operation Type", HFILL }},
8919 { &hf_shutdown_type,
8920 { "Shutdown Type", "ndps.shutdown_type",
8921 FT_UINT32, BASE_DEC, VALS(ndps_shutdown_enum), 0x0,
8922 "Shutdown Type", HFILL }},
8924 { &hf_ndps_supplier_flag,
8925 { "Supplier Data?", "ndps.supplier_flag",
8926 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8927 "Supplier Data?", HFILL }},
8929 { &hf_ndps_language_flag,
8930 { "Language Data?", "ndps.language_flag",
8931 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8932 "Language Data?", HFILL }},
8934 { &hf_ndps_method_flag,
8935 { "Method Data?", "ndps.method_flag",
8936 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8937 "Method Data?", HFILL }},
8939 { &hf_ndps_delivery_address_flag,
8940 { "Delivery Address Data?", "ndps.delivery_flag",
8941 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8942 "Delivery Address Data?", HFILL }},
8944 { &hf_ndps_list_profiles_type,
8945 { "List Profiles Type", "ndps.ndps_list_profiles_type",
8946 FT_UINT32, BASE_HEX, VALS(ndps_attrs_arg_enum), 0x0,
8947 "List Profiles Type", HFILL }},
8949 { &hf_ndps_list_profiles_choice_type,
8950 { "List Profiles Choice Type", "ndps.ndps_list_profiles_choice_type",
8951 FT_UINT32, BASE_HEX, VALS(ndps_list_profiles_choice_enum), 0x0,
8952 "List Profiles Choice Type", HFILL }},
8954 { &hf_ndps_list_profiles_result_type,
8955 { "List Profiles Result Type", "ndps.ndps_list_profiles_result_type",
8956 FT_UINT32, BASE_HEX, VALS(ndps_list_profiles_result_enum), 0x0,
8957 "List Profiles Result Type", HFILL }},
8959 { &hf_ndps_integer_type_flag,
8960 { "Integer Type Flag", "ndps.ndps_integer_type_flag",
8961 FT_UINT32, BASE_HEX, NULL, 0x0,
8962 "Integer Type Flag", HFILL }},
8964 { &hf_ndps_integer_type_value,
8965 { "Integer Type Value", "ndps.ndps_integer_type_value",
8966 FT_UINT32, BASE_HEX, NULL, 0x0,
8967 "Integer Type Value", HFILL }},
8969 { &hf_ndps_continuation_option,
8970 { "Continuation Option", "ndps.ndps_continuation_option",
8971 FT_BYTES, BASE_HEX, NULL, 0x0,
8972 "Continuation Option", HFILL }},
8974 { &hf_ndps_ds_info_type,
8975 { "DS Info Type", "ndps.ndps_ds_info_type",
8976 FT_UINT32, BASE_HEX, VALS(ndps_ds_info_enum), 0x0,
8977 "DS Info Type", HFILL }},
8980 { "GUID", "ndps.guid",
8981 FT_BYTES, BASE_NONE, NULL, 0x0,
8984 { &hf_ndps_list_services_type,
8985 { "Services Type", "ndps.ndps_list_services_type",
8986 FT_UINT32, BASE_HEX, VALS(ndps_list_services_enum), 0x0,
8987 "Services Type", HFILL }},
8989 { &hf_ndps_item_bytes,
8990 { "Item Ptr", "ndps.item_bytes",
8991 FT_BYTES, BASE_NONE, NULL, 0x0,
8992 "Item Ptr", HFILL }},
8994 { &hf_ndps_certified,
8995 { "Certified", "ndps.certified",
8996 FT_BYTES, BASE_NONE, NULL, 0x0,
8997 "Certified", HFILL }},
8999 { &hf_ndps_attribute_set,
9000 { "Attribute Set", "ndps.attribute_set",
9001 FT_BYTES, BASE_NONE, NULL, 0x0,
9002 "Attribute Set", HFILL }},
9004 { &hf_ndps_data_item_type,
9005 { "Item Type", "ndps.ndps_data_item_type",
9006 FT_UINT32, BASE_HEX, VALS(ndps_data_item_enum), 0x0,
9007 "Item Type", HFILL }},
9010 { "Integer Value", "ndps.info_int",
9011 FT_UINT8, BASE_HEX, NULL, 0x0,
9012 "Integer Value", HFILL }},
9015 { "16 Bit Integer Value", "ndps.info_int16",
9016 FT_UINT16, BASE_HEX, NULL, 0x0,
9017 "16 Bit Integer Value", HFILL }},
9020 { "32 Bit Integer Value", "ndps.info_int32",
9021 FT_UINT32, BASE_HEX, NULL, 0x0,
9022 "32 Bit Integer Value", HFILL }},
9025 { "Boolean Value", "ndps.info_boolean",
9026 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9027 "Boolean Value", HFILL }},
9030 { "String Value", "ndps.info_string",
9031 FT_STRING, BASE_NONE, NULL, 0x0,
9032 "String Value", HFILL }},
9035 { "Byte Value", "ndps.info_bytes",
9036 FT_BYTES, BASE_NONE, NULL, 0x0,
9037 "Byte Value", HFILL }},
9039 { &hf_ndps_list_local_servers_type,
9040 { "Server Type", "ndps.ndps_list_local_server_type",
9041 FT_UINT32, BASE_HEX, VALS(ndps_list_local_servers_enum), 0x0,
9042 "Server Type", HFILL }},
9044 { &hf_ndps_registry_name,
9045 { "Registry Name", "ndps.registry_name",
9046 FT_STRING, BASE_NONE, NULL, 0x0,
9047 "Registry Name", HFILL }},
9049 { &hf_ndps_client_server_type,
9050 { "Client/Server Type", "ndps.ndps_client_server_type",
9051 FT_UINT32, BASE_HEX, VALS(ndps_client_server_enum), 0x0,
9052 "Client/Server Type", HFILL }},
9054 { &hf_ndps_session_type,
9055 { "Session Type", "ndps.ndps_session_type",
9056 FT_UINT32, BASE_HEX, VALS(ndps_session_type_enum), 0x0,
9057 "Session Type", HFILL }},
9060 { "Time", "ndps.time",
9061 FT_UINT32, BASE_DEC, NULL, 0x0,
9064 { &hf_ndps_supplier_name,
9065 { "Supplier Name", "ndps.supplier_name",
9066 FT_STRING, BASE_NONE, NULL, 0x0,
9067 "Supplier Name", HFILL }},
9070 { "Message", "ndps.message",
9071 FT_STRING, BASE_NONE, NULL, 0x0,
9072 "Message", HFILL }},
9074 { &hf_delivery_method_type,
9075 { "Delivery Method Type", "ndps.delivery_method_type",
9076 FT_UINT32, BASE_HEX, VALS(ndps_delivery_method_enum), 0x0,
9077 "Delivery Method Type", HFILL }},
9079 { &hf_ndps_get_session_type,
9080 { "Session Type", "ndps.ndps_get_session_type",
9081 FT_UINT32, BASE_HEX, VALS(ndps_get_session_type_enum), 0x0,
9082 "Session Type", HFILL }},
9085 { "Packet Count", "ndps.packet_count",
9086 FT_UINT32, BASE_DEC, NULL, 0x0,
9087 "Packet Count", HFILL }},
9089 { &hf_last_packet_flag,
9090 { "Last Packet Flag", "ndps.last_packet_flag",
9091 FT_UINT32, BASE_DEC, NULL, 0x0,
9092 "Last Packet Flag", HFILL }},
9094 { &hf_ndps_get_resman_session_type,
9095 { "Session Type", "ndps.ndps_get_resman_session_type",
9096 FT_UINT32, BASE_HEX, VALS(ndps_get_resman_session_type_enum), 0x0,
9097 "Session Type", HFILL }},
9100 { "Problem Type", "ndps.ndps_get_resman_session_type",
9101 FT_UINT32, BASE_HEX, VALS(problem_type_enum), 0x0,
9102 "Problem Type", HFILL }},
9105 static gint *ett[] = {
9110 module_t *ndps_module;
9112 proto_ndps = proto_register_protocol("Novell Distributed Print System", "NDPS", "ndps");
9113 proto_register_field_array(proto_ndps, hf_ndps, array_length(hf_ndps));
9114 proto_register_subtree_array(ett, array_length(ett));
9116 ndps_module = prefs_register_protocol(proto_ndps, NULL);
9117 prefs_register_bool_preference(ndps_module, "desegment_tcp",
9118 "Desegment all NDPS messages spanning multiple TCP segments",
9119 "Whether the NDPS dissector should desegment all messages spanning multiple TCP segments",
9121 prefs_register_bool_preference(ndps_module, "desegment_spx",
9122 "Desegment all NDPS messages spanning multiple SPX packets",
9123 "Whether the NDPS dissector should desegment all messages spanning multiple SPX packets",
9126 register_init_routine(&ndps_init_protocol);
9127 register_postseq_cleanup_routine(&ndps_postseq_cleanup);
9131 proto_reg_handoff_ndps(void)
9133 dissector_handle_t ndps_handle, ndps_tcp_handle;
9135 ndps_handle = create_dissector_handle(dissect_ndps_ipx, proto_ndps);
9136 ndps_tcp_handle = create_dissector_handle(dissect_ndps_tcp, proto_ndps);
9138 dissector_add("spx.socket", SPX_SOCKET_PA, ndps_handle);
9139 dissector_add("spx.socket", SPX_SOCKET_BROKER, ndps_handle);
9140 dissector_add("spx.socket", SPX_SOCKET_SRS, ndps_handle);
9141 dissector_add("spx.socket", SPX_SOCKET_ENS, ndps_handle);
9142 dissector_add("spx.socket", SPX_SOCKET_RMS, ndps_handle);
9143 dissector_add("spx.socket", SPX_SOCKET_NOTIFY_LISTENER, ndps_handle);
9144 dissector_add("tcp.port", TCP_PORT_PA, ndps_tcp_handle);
9145 dissector_add("tcp.port", TCP_PORT_BROKER, ndps_tcp_handle);
9146 dissector_add("tcp.port", TCP_PORT_SRS, ndps_tcp_handle);
9147 dissector_add("tcp.port", TCP_PORT_ENS, ndps_tcp_handle);
9148 dissector_add("tcp.port", TCP_PORT_RMS, ndps_tcp_handle);
9149 dissector_add("tcp.port", TCP_PORT_NOTIFY_LISTENER, ndps_tcp_handle);
9150 ndps_data_handle = find_dissector("data");