2 * Routines for NetWare's NDPS
3 * Greg Morris <gmorris@novell.com>
4 * Copyright (c) Novell, Inc. 2002-2003
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>
34 #include <epan/prefs.h>
35 #include "packet-ipx.h"
36 #include "packet-tcp.h"
37 #include <epan/conversation.h>
38 #include "packet-ndps.h"
39 #include <epan/reassemble.h>
41 #define NDPS_PACKET_INIT_COUNT 200
42 /* Limit the number of items we can add to the tree. */
43 #define NDPS_MAX_ITEMS 50
45 /* Tables for reassembly of fragments. */
46 static GHashTable *ndps_fragment_table = NULL;
47 static GHashTable *ndps_reassembled_table = NULL;
49 /* desegmentation of ndps */
50 static gboolean ndps_defragment = TRUE;
52 static guint32 tid = 1;
55 static gboolean ndps_show_oids=FALSE;
57 /* Global Attribute for evaluation of Values */
58 static char *global_attribute_name=NULL;
60 static void dissect_ndps_request(tvbuff_t*, packet_info*, proto_tree*, guint32, guint32, int);
62 static void dissect_ndps_reply(tvbuff_t *, packet_info*, proto_tree*, int);
64 static int hf_ndps_segments = -1;
65 static int hf_ndps_segment = -1;
66 static int hf_ndps_segment_overlap = -1;
67 static int hf_ndps_segment_overlap_conflict = -1;
68 static int hf_ndps_segment_multiple_tails = -1;
69 static int hf_ndps_segment_too_long_segment = -1;
70 static int hf_ndps_segment_error = -1;
72 static gint ett_ndps_segments = -1;
73 static gint ett_ndps_segment = -1;
75 static int proto_ndps = -1;
76 static int hf_ndps_record_mark = -1;
77 static int hf_ndps_length = -1;
78 static int hf_ndps_xid = -1;
79 static int hf_ndps_packet_type = -1;
80 static int hf_ndps_rpc_version = -1;
81 static int hf_ndps_error = -1;
82 static int hf_ndps_num_objects = -1;
83 static int hf_ndps_num_attributes = -1;
84 static int hf_ndps_sbuffer = -1;
85 static int hf_ndps_rbuffer = -1;
86 static int hf_ndps_user_name = -1;
87 static int hf_ndps_broker_name = -1;
88 static int hf_ndps_num_results = -1;
89 static int hf_ndps_num_options = -1;
90 static int hf_ndps_num_jobs = -1;
91 static int hf_ndps_pa_name = -1;
92 static int hf_ndps_tree = -1;
93 static int hf_ndps_reqframe = -1;
94 static int hf_ndps_error_val = -1;
95 static int hf_ndps_ext_error = -1;
96 static int hf_ndps_object = -1;
97 static int hf_ndps_cred_type = -1;
98 static int hf_ndps_server_name = -1;
99 static int hf_ndps_connection = -1;
100 static int hf_ndps_auth_null = -1;
101 static int hf_ndps_rpc_accept = -1;
102 static int hf_ndps_rpc_acc_stat = -1;
103 static int hf_ndps_rpc_rej_stat = -1;
104 static int hf_ndps_rpc_acc_results = -1;
105 static int hf_ndps_problem_type = -1;
106 static int hf_security_problem_type = -1;
107 static int hf_service_problem_type = -1;
108 static int hf_access_problem_type = -1;
109 static int hf_printer_problem_type = -1;
110 static int hf_selection_problem_type = -1;
111 static int hf_doc_access_problem_type = -1;
112 static int hf_attribute_problem_type = -1;
113 static int hf_update_problem_type = -1;
114 static int hf_obj_id_type = -1;
115 static int hf_oid_struct_size = -1;
116 static int hf_object_name = -1;
117 static int hf_ndps_document_number = -1;
118 static int hf_ndps_nameorid = -1;
119 static int hf_local_object_name = -1;
120 static int hf_printer_name = -1;
121 static int hf_ndps_qualified_name = -1;
122 static int hf_ndps_item_count = -1;
123 static int hf_ndps_num_passwords = -1;
124 static int hf_ndps_num_servers = -1;
125 static int hf_ndps_num_locations = -1;
126 static int hf_ndps_num_areas = -1;
127 static int hf_ndps_num_address_items = -1;
128 static int hf_ndps_num_job_categories = -1;
129 static int hf_ndps_num_page_selects = -1;
130 static int hf_ndps_num_page_informations = -1;
131 static int hf_ndps_num_names = -1;
132 static int hf_ndps_num_categories = -1;
133 static int hf_ndps_num_colorants = -1;
134 static int hf_ndps_num_events = -1;
135 static int hf_ndps_num_args = -1;
136 static int hf_ndps_num_transfer_methods = -1;
137 static int hf_ndps_num_doc_types = -1;
138 static int hf_ndps_num_destinations = -1;
139 static int hf_ndps_qualifier = -1;
140 static int hf_ndps_lib_error = -1;
141 static int hf_ndps_other_error = -1;
142 static int hf_ndps_other_error_2 = -1;
143 static int hf_ndps_session = -1;
144 static int hf_ndps_abort_flag = -1;
145 static int hf_obj_attribute_type = -1;
146 static int hf_ndps_attribute_value = -1;
147 static int hf_ndps_lower_range = -1;
148 static int hf_ndps_upper_range = -1;
149 static int hf_ndps_n64 = -1;
150 static int hf_ndps_lower_range_n64 = -1;
151 static int hf_ndps_upper_range_n64 = -1;
152 static int hf_ndps_attrib_boolean = -1;
153 static int hf_ndps_realization = -1;
154 static int hf_ndps_xdimension_n64 = -1;
155 static int hf_ndps_ydimension_n64 = -1;
156 static int hf_ndps_dim_value = -1;
157 static int hf_ndps_dim_flag = -1;
158 static int hf_ndps_xydim_value = -1;
159 static int hf_ndps_location_value = -1;
160 static int hf_ndps_xmin_n64 = -1;
161 static int hf_ndps_xmax_n64 = -1;
162 static int hf_ndps_ymin_n64 = -1;
163 static int hf_ndps_ymax_n64 = -1;
164 static int hf_ndps_edge_value = -1;
165 static int hf_ndps_cardinal_or_oid = -1;
166 static int hf_ndps_cardinal_name_or_oid = -1;
167 static int hf_ndps_integer_or_oid = -1;
168 static int hf_ndps_profile_id = -1;
169 static int hf_ndps_persistence = -1;
170 static int hf_ndps_language_count = -1;
171 static int hf_ndps_language_id = -1;
172 static int hf_address_type = -1;
173 static int hf_ndps_address = -1;
174 static int hf_ndps_add_bytes = -1;
175 static int hf_ndps_event_type = -1;
176 static int hf_ndps_event_object_identifier = -1;
177 static int hf_ndps_octet_string = -1;
178 static int hf_ndps_scope = -1;
179 static int hf_address_len = -1;
180 static int hf_ndps_net = -1;
181 static int hf_ndps_node = -1;
182 static int hf_ndps_socket = -1;
183 static int hf_ndps_port = -1;
184 static int hf_ndps_ip = -1;
185 static int hf_ndps_server_type = -1;
186 static int hf_ndps_num_services = -1;
187 static int hf_ndps_service_type = -1;
188 static int hf_ndps_service_enabled = -1;
189 static int hf_ndps_method_name = -1;
190 static int hf_ndps_method_ver = -1;
191 static int hf_ndps_file_name = -1;
192 static int hf_ndps_admin_submit = -1;
193 static int hf_ndps_oid = -1;
194 static int hf_ndps_object_op = -1;
195 static int hf_answer_time = -1;
196 static int hf_oid_asn1_type = -1;
197 static int hf_ndps_item_ptr = -1;
198 static int hf_ndps_len = -1;
199 static int hf_limit_enc = -1;
200 static int hf_ndps_delivery_add_count = -1;
201 static int hf_ndps_qualified_name2 = -1;
202 static int hf_ndps_delivery_add_type = -1;
203 static int hf_ndps_criterion_type = -1;
204 static int hf_ndps_num_ignored_attributes = -1;
205 static int hf_ndps_ignored_type = -1;
206 static int hf_ndps_num_resources = -1;
207 static int hf_ndps_resource_type = -1;
208 static int hf_ndps_identifier_type = -1;
209 static int hf_ndps_page_flag = -1;
210 static int hf_ndps_media_type = -1;
211 static int hf_ndps_doc_content = -1;
212 static int hf_ndps_page_size = -1;
213 static int hf_ndps_direction = -1;
214 static int hf_ndps_page_order = -1;
215 static int hf_ndps_medium_size = -1;
216 static int hf_ndps_long_edge_feeds = -1;
217 static int hf_ndps_inc_across_feed = -1;
218 static int hf_ndps_size_inc_in_feed = -1;
219 static int hf_ndps_page_orientation = -1;
220 static int hf_ndps_numbers_up = -1;
221 static int hf_ndps_xdimension = -1;
222 static int hf_ndps_ydimension = -1;
223 static int hf_ndps_state_severity = -1;
224 static int hf_ndps_training = -1;
225 static int hf_ndps_colorant_set = -1;
226 static int hf_ndps_card_enum_time = -1;
227 static int hf_ndps_attrs_arg = -1;
228 static int hf_ndps_context_len = -1;
229 static int hf_ndps_context = -1;
230 static int hf_ndps_filter = -1;
231 static int hf_ndps_item_filter = -1;
232 static int hf_ndps_substring_match = -1;
233 static int hf_ndps_time_limit = -1;
234 static int hf_ndps_count_limit = -1;
235 static int hf_ndps_operator = -1;
236 static int hf_ndps_password = -1;
237 static int hf_ndps_retrieve_restrictions = -1;
238 static int hf_ndps_bind_security_option_count = -1;
239 static int hf_bind_security = -1;
240 static int hf_ndps_max_items = -1;
241 static int hf_ndps_status_flags = -1;
242 static int hf_ndps_resource_list_type = -1;
243 static int hf_os_count = -1;
244 static int hf_os_type = -1;
245 static int hf_ndps_printer_type_count = -1;
246 static int hf_ndps_printer_type = -1;
247 static int hf_ndps_printer_manuf = -1;
248 static int hf_ndps_inf_file_name = -1;
249 static int hf_ndps_vendor_dir = -1;
250 static int hf_banner_type = -1;
251 static int hf_font_type = -1;
252 static int hf_printer_id = -1;
253 static int hf_ndps_font_name = -1;
254 static int hf_ndps_return_code = -1;
255 static int hf_ndps_banner_count = -1;
256 static int hf_ndps_banner_name = -1;
257 static int hf_ndps_font_type_count = -1;
258 static int hf_font_type_name = -1;
259 static int hf_ndps_font_file_count = -1;
260 static int hf_font_file_name = -1;
261 static int hf_ndps_printer_def_count = -1;
262 static int hf_ndps_prn_file_name = -1;
263 static int hf_ndps_prn_dir_name = -1;
264 static int hf_ndps_def_file_name = -1;
265 static int hf_ndps_num_win31_keys = -1;
266 static int hf_ndps_num_win95_keys = -1;
267 static int hf_ndps_num_windows_keys = -1;
268 static int hf_ndps_windows_key = -1;
269 static int hf_archive_type = -1;
270 static int hf_archive_file_size = -1;
271 static int hf_ndps_data = -1;
272 static int hf_get_status_flag = -1;
273 static int hf_res_type = -1;
274 static int hf_file_timestamp = -1;
275 static int hf_sub_complete = -1;
276 static int hf_doc_content = -1;
277 static int hf_ndps_doc_name = -1;
278 static int hf_print_arg = -1;
279 static int hf_local_id = -1;
280 static int hf_ndps_included_doc_len = -1;
281 static int hf_ndps_included_doc = -1;
282 static int hf_ndps_ref_name = -1;
283 static int hf_interrupt_job_type = -1;
284 static int hf_pause_job_type = -1;
285 static int hf_ndps_force = -1;
286 static int hf_resubmit_op_type = -1;
287 static int hf_shutdown_type = -1;
288 static int hf_ndps_supplier_flag = -1;
289 static int hf_ndps_language_flag = -1;
290 static int hf_ndps_method_flag = -1;
291 static int hf_ndps_delivery_address_flag = -1;
292 static int hf_ndps_list_profiles_type = -1;
293 static int hf_ndps_list_profiles_choice_type = -1;
294 static int hf_ndps_list_profiles_result_type = -1;
295 static int hf_ndps_integer_type_flag = -1;
296 static int hf_ndps_integer_type_value = -1;
297 static int hf_ndps_continuation_option = -1;
298 static int hf_ndps_ds_info_type = -1;
299 static int hf_ndps_guid = -1;
300 static int hf_ndps_list_services_type = -1;
301 static int hf_ndps_item_bytes = -1;
302 static int hf_ndps_certified = -1;
303 static int hf_ndps_attribute_set = -1;
304 static int hf_ndps_data_item_type = -1;
305 static int hf_info_int = -1;
306 static int hf_info_int16 = -1;
307 static int hf_info_int32 = -1;
308 static int hf_info_boolean = -1;
309 static int hf_info_string = -1;
310 static int hf_info_bytes = -1;
311 static int hf_ndps_list_local_servers_type = -1;
312 static int hf_ndps_registry_name = -1;
313 static int hf_ndps_client_server_type = -1;
314 static int hf_ndps_session_type = -1;
315 static int hf_time = -1;
316 static int hf_ndps_supplier_name = -1;
317 static int hf_ndps_message = -1;
318 static int hf_ndps_delivery_method_count = -1;
319 static int hf_delivery_method_type = -1;
320 static int hf_ndps_get_session_type = -1;
321 static int hf_packet_count = -1;
322 static int hf_last_packet_flag = -1;
323 static int hf_ndps_get_resman_session_type = -1;
324 static int hf_problem_type = -1;
325 static int hf_ndps_num_values = -1;
326 static int hf_ndps_object_ids_7 = -1;
327 static int hf_ndps_object_ids_8 = -1;
328 static int hf_ndps_object_ids_9 = -1;
329 static int hf_ndps_object_ids_10 = -1;
330 static int hf_ndps_object_ids_11 = -1;
331 static int hf_ndps_object_ids_12 = -1;
332 static int hf_ndps_object_ids_13 = -1;
333 static int hf_ndps_object_ids_14 = -1;
334 static int hf_ndps_object_ids_15 = -1;
335 static int hf_ndps_object_ids_16 = -1;
336 static int hf_ndps_attribute_time = -1;
337 static int hf_print_security = -1;
338 static int hf_notify_time_interval = -1;
339 static int hf_notify_sequence_number = -1;
340 static int hf_notify_lease_exp_time = -1;
341 static int hf_notify_printer_uri = -1;
342 static int hf_level = -1;
343 static int hf_interval = -1;
345 static int hf_spx_ndps_program = -1;
346 static int hf_spx_ndps_version = -1;
347 static int hf_spx_ndps_func_print = -1;
348 static int hf_spx_ndps_func_registry = -1;
349 static int hf_spx_ndps_func_notify = -1;
350 static int hf_spx_ndps_func_resman = -1;
351 static int hf_spx_ndps_func_delivery = -1;
352 static int hf_spx_ndps_func_broker = -1;
354 static gint ett_ndps = -1;
355 static dissector_handle_t ndps_data_handle;
357 /* desegmentation of NDPS over TCP */
358 static gboolean ndps_desegment = TRUE;
360 static const value_string true_false[] = {
361 { 0x00000000, "Accept" },
362 { 0x00000001, "Deny" },
366 static const value_string ndps_limit_enc_enum[] = {
367 { 0x00000000, "Time" },
368 { 0x00000001, "Count" },
369 { 0x00000002, "Error" },
373 static const value_string problem_type_enum[] = {
374 { 0x00000000, "Standard" },
375 { 0x00000001, "Extended" },
379 static const value_string accept_stat[] = {
380 { 0x00000000, "Success" },
381 { 0x00000001, "Program Unavailable" },
382 { 0x00000002, "Program Mismatch" },
383 { 0x00000003, "Procedure Unavailable" },
384 { 0x00000004, "Garbage Arguments" },
385 { 0x00000005, "System Error" },
389 static const value_string reject_stat[] = {
390 { 0x00000000, "RPC Mismatch" },
391 { 0x00000001, "Authentication Error" },
395 static const value_string error_type_enum[] = {
396 { 0x00000000, "Security Error" },
397 { 0x00000001, "Service Error" },
398 { 0x00000002, "Access Error" },
399 { 0x00000003, "Printer Error" },
400 { 0x00000004, "Selection Error" },
401 { 0x00000005, "Document Access Error" },
402 { 0x00000006, "Attribute Error" },
403 { 0x00000007, "Update Error" },
407 static const value_string security_problem_enum[] = {
408 { 0x00000000, "Authentication" },
409 { 0x00000001, "Credentials" },
410 { 0x00000002, "Rights" },
411 { 0x00000003, "Invalid PAC" },
415 static const value_string service_problem_enum[] = {
416 { 0x00000000, "Sever Busy" },
417 { 0x00000001, "Server Unavailable" },
418 { 0x00000002, "Complex Operation" },
419 { 0x00000003, "Resource Limit" },
420 { 0x00000004, "Unclassified Server Error" },
421 { 0x00000005, "Too Many Items in List" },
422 { 0x00000006, "Resource not Available" },
423 { 0x00000007, "Cancel Document Support" },
424 { 0x00000008, "Modify Document Support" },
425 { 0x00000009, "Multiple Document Support" },
426 { 0x0000000a, "Parameter Valid Support" },
427 { 0x0000000b, "Invalid Checkpoint" },
428 { 0x0000000c, "Continuation Context" },
429 { 0x0000000d, "Pause Limit Exceeded" },
430 { 0x0000000e, "Unsupported Operation" },
431 { 0x0000000f, "Notify Service Error" },
432 { 0x00000010, "Accounting Service Error" },
436 static const value_string access_problem_enum[] = {
437 { 0x00000000, "Wrong Object Class" },
438 { 0x00000001, "Lack of Access Rights" },
439 { 0x00000002, "Can't Interrupt Job" },
440 { 0x00000003, "Wrong Object State" },
441 { 0x00000004, "Client Not Bound" },
442 { 0x00000005, "Not Available" },
443 { 0x00000006, "Notify Service Not Connected" },
444 { 0x00000007, "PDS Not Connected" },
448 static const value_string printer_problem_enum[] = {
449 { 0x00000000, "Printer Error" },
450 { 0x00000001, "Printer Needs Attention" },
451 { 0x00000002, "Printer Needs Key Operator" },
455 static const value_string selection_problem_enum[] = {
456 { 0x00000000, "Invalid ID" },
457 { 0x00000001, "Unknown ID" },
458 { 0x00000002, "Object Exists" },
459 { 0x00000003, "ID Changed" },
463 static const value_string doc_access_problem_enum[] = {
464 { 0x00000000, "Access Not Available" },
465 { 0x00000001, "Time Expired" },
466 { 0x00000002, "Access Denied" },
467 { 0x00000003, "Unknown Document" },
468 { 0x00000004, "No Documents in Job" },
472 static const value_string attribute_problem_enum[] = {
473 { 0x00000000, "Invalid Syntax" },
474 { 0x00000001, "Undefined Type" },
475 { 0x00000002, "Wrong Matching" },
476 { 0x00000003, "Constraint Violated" },
477 { 0x00000004, "Unsupported Type" },
478 { 0x00000005, "Illegal Modification" },
479 { 0x00000006, "Consists With Other Attribute" },
480 { 0x00000007, "Undefined Attribute Value" },
481 { 0x00000008, "Unsupported Value" },
482 { 0x00000009, "Invalid Noncompulsed Modification" },
483 { 0x0000000a, "Per Job Inadmissible" },
484 { 0x0000000b, "Not Multivalued" },
485 { 0x0000000c, "Mandatory Omitted" },
486 { 0x0000000d, "Illegal For Class" },
490 static const value_string update_problem_enum[] = {
491 { 0x00000000, "No Modifications Allowed" },
492 { 0x00000001, "Insufficient Rights" },
493 { 0x00000002, "Previous Operation Incomplete" },
494 { 0x00000003, "Cancel Not Possible" },
498 static const value_string obj_identification_enum[] = {
499 { 0x00000000, "Printer Contained Object ID" },
500 { 0x00000001, "Document Identifier" },
501 { 0x00000002, "Object Identifier" },
502 { 0x00000003, "Object Name" },
503 { 0x00000004, "Name or Object ID" },
504 { 0x00000005, "Simple Name" },
505 { 0x00000006, "Printer Configuration Object ID" },
506 { 0x00000007, "Qualified Name" },
507 { 0x00000008, "Event Object ID" },
511 static const value_string nameorid_enum[] = {
512 { 0x00000000, "None" },
513 { 0x00000001, "Global" },
514 { 0x00000002, "Local" },
518 static const value_string qualified_name_enum[] = {
519 { 0x00000000, "None" },
520 { 0x00000001, "Simple" },
521 { 0x00000002, "NDS" },
525 static const value_string qualified_name_enum2[] = {
526 { 0x00000000, "NDS" },
530 static const value_string spx_ndps_program_vals[] = {
531 { 0x00060976, "Print Program" },
532 { 0x00060977, "Broker Program" },
533 { 0x00060978, "Registry Program" },
534 { 0x00060979, "Notify Program" },
535 { 0x0006097a, "Resource Manager Program" },
536 { 0x0006097b, "Programmatic Delivery Program" },
540 static const value_string spx_ndps_print_func_vals[] = {
541 { 0x00000000, "None" },
542 { 0x00000001, "Bind PSM" },
543 { 0x00000002, "Bind PA" },
544 { 0x00000003, "Unbind" },
545 { 0x00000004, "Print" },
546 { 0x00000005, "Modify Job" },
547 { 0x00000006, "Cancel Job" },
548 { 0x00000007, "List Object Attributes" },
549 { 0x00000008, "Promote Job" },
550 { 0x00000009, "Interrupt" },
551 { 0x0000000a, "Pause" },
552 { 0x0000000b, "Resume" },
553 { 0x0000000c, "Clean" },
554 { 0x0000000d, "Create" },
555 { 0x0000000e, "Delete" },
556 { 0x0000000f, "Disable PA" },
557 { 0x00000010, "Enable PA" },
558 { 0x00000011, "Resubmit Jobs" },
559 { 0x00000012, "Set" },
560 { 0x00000013, "Shutdown PA" },
561 { 0x00000014, "Startup PA" },
562 { 0x00000015, "Reorder Job" },
563 { 0x00000016, "Pause PA" },
564 { 0x00000017, "Resume PA" },
565 { 0x00000018, "Transfer Data" },
566 { 0x00000019, "Device Control" },
567 { 0x0000001a, "Add Event Profile" },
568 { 0x0000001b, "Remove Event Profile" },
569 { 0x0000001c, "Modify Event Profile" },
570 { 0x0000001d, "List Event Profiles" },
571 { 0x0000001e, "Shutdown PSM" },
572 { 0x0000001f, "Cancel PSM Shutdown" },
573 { 0x00000020, "Set Printer DS Information" },
574 { 0x00000021, "Clean User Jobs" },
575 { 0x00000022, "Map GUID to NDS Name" },
576 { 0x00000023, "Add Event Profile 2" },
577 { 0x00000024, "List Event Profile 2" },
581 static const value_string spx_ndps_notify_func_vals[] = {
582 { 0x00000000, "None" },
583 { 0x00000001, "Notify Bind" },
584 { 0x00000002, "Notify Unbind" },
585 { 0x00000003, "Register Supplier" },
586 { 0x00000004, "Deregister Supplier" },
587 { 0x00000005, "Add Profile" },
588 { 0x00000006, "Remove Profile" },
589 { 0x00000007, "Modify Profile" },
590 { 0x00000008, "List Profiles" },
591 { 0x00000009, "Report Event" },
592 { 0x0000000a, "List Supported Languages" },
593 { 0x0000000b, "Report Notification" },
594 { 0x0000000c, "Add Delivery Method" },
595 { 0x0000000d, "Remove Delivery Method" },
596 { 0x0000000e, "List Delivery Methods" },
597 { 0x0000000f, "Get Delivery Method Information" },
598 { 0x00000010, "Get Notify NDS Object Name" },
599 { 0x00000011, "Get Notify Session Information" },
603 static const value_string spx_ndps_deliver_func_vals[] = {
604 { 0x00000000, "None" },
605 { 0x00000001, "Delivery Bind" },
606 { 0x00000002, "Delivery Unbind" },
607 { 0x00000003, "Delivery Send" },
608 { 0x00000004, "Delivery Send2" },
612 static const value_string spx_ndps_registry_func_vals[] = {
613 { 0x00000000, "None" },
614 { 0x00000001, "Bind" },
615 { 0x00000002, "Unbind" },
616 { 0x00000003, "Register Server" },
617 { 0x00000004, "Deregister Server" },
618 { 0x00000005, "Register Registry" },
619 { 0x00000006, "Deregister Registry" },
620 { 0x00000007, "Registry Update" },
621 { 0x00000008, "List Local Servers" },
622 { 0x00000009, "List Servers" },
623 { 0x0000000a, "List Known Registries" },
624 { 0x0000000b, "Get Registry NDS Object Name" },
625 { 0x0000000c, "Get Registry Session Information" },
629 static const value_string spx_ndps_resman_func_vals[] = {
630 { 0x00000000, "None" },
631 { 0x00000001, "Bind" },
632 { 0x00000002, "Unbind" },
633 { 0x00000003, "Add Resource File" },
634 { 0x00000004, "Delete Resource File" },
635 { 0x00000005, "List Resources" },
636 { 0x00000006, "Get Resource File" },
637 { 0x00000007, "Get Resource File Date" },
638 { 0x00000008, "Get Resource Manager NDS Object Name" },
639 { 0x00000009, "Get Resource Manager Session Information" },
640 { 0x0000000a, "Set Resource Language Context" },
644 static const value_string spx_ndps_broker_func_vals[] = {
645 { 0x00000000, "None" },
646 { 0x00000001, "Bind" },
647 { 0x00000002, "Unbind" },
648 { 0x00000003, "List Services" },
649 { 0x00000004, "Enable Service" },
650 { 0x00000005, "Disable Service" },
651 { 0x00000006, "Down Broker" },
652 { 0x00000007, "Get Broker NDS Object Name" },
653 { 0x00000008, "Get Broker Session Information" },
657 static const value_string ndps_packet_types[] = {
658 { 0x00000000, "Request" },
659 { 0x00000001, "Reply" },
663 static const value_string ndps_realization_enum[] = {
664 { 0x00000000, "Logical" },
665 { 0x00000001, "Physical" },
666 { 0x00000002, "Logical & Physical" },
670 static const value_string ndps_dim_value_enum[] = {
671 { 0x00000000, "Numeric" },
672 { 0x00000001, "Named" },
676 static const value_string ndps_xydim_value_enum[] = {
677 { 0x00000000, "Real" },
678 { 0x00000001, "Named" },
679 { 0x00000002, "Cardinal" },
683 static const value_string ndps_location_value_enum[] = {
684 { 0x00000000, "Numeric" },
685 { 0x00000001, "Named" },
689 static const value_string ndps_edge_value_enum[] = {
690 { 0x00000000, "Bottom" },
691 { 0x00000001, "Right" },
692 { 0x00000002, "Top" },
693 { 0x00000003, "Left" },
697 static const value_string ndps_card_or_oid_enum[] = {
698 { 0x00000000, "Number" },
699 { 0x00000001, "ID" },
703 static const value_string ndps_card_name_or_oid_enum[] = {
704 { 0x00000000, "Number" },
705 { 0x00000001, "ID" },
709 static const value_string ndps_integer_or_oid_enum[] = {
710 { 0x00000000, "ID" },
711 { 0x00000001, "Number" },
715 static const value_string ndps_persistence_enum[] = {
716 { 0x00000000, "Permanent" },
717 { 0x00000001, "Volatile" },
721 static const value_string ndps_address_type_enum[] = {
722 { 0x00000000, "User" },
723 { 0x00000001, "Server" },
724 { 0x00000002, "Volume" },
725 { 0x00000003, "Organization Unit" },
726 { 0x00000004, "Organization" },
727 { 0x00000005, "Group" },
728 { 0x00000006, "Distinguished Name" },
729 { 0x00000007, "User or Container" },
730 { 0x00000008, "Case Exact String" },
731 { 0x00000009, "Case Ignore String" },
732 { 0x0000000a, "Numeric String" },
733 { 0x0000000b, "DOS File Name" },
734 { 0x0000000c, "Phone Number" },
735 { 0x0000000d, "Boolean" },
736 { 0x0000000e, "Integer" },
737 { 0x0000000f, "Network Address" },
738 { 0x00000010, "Choice" },
739 { 0x00000011, "GroupWise User" },
743 static const value_string ndps_address_enum[] = {
744 { 0x00000000, "IPX" },
745 { 0x00000001, "IP" },
746 { 0x00000002, "SDLC" },
747 { 0x00000003, "Token Ring to Ethernet" },
748 { 0x00000004, "OSI" },
749 { 0x00000005, "AppleTalk" },
750 { 0x00000006, "Count" },
755 static const value_string ndps_server_type_enum[] = {
756 { 0x00000000, "All" },
757 { 0x00000001, "Public Access Printer Agent" },
758 { 0x00000002, "Notification Server" },
759 { 0x00000003, "Resource Manager" },
760 { 0x00000004, "Network Port Handler" },
764 static const value_string ndps_event_object_enum[] = {
765 { 0x00000000, "Object" },
766 { 0x00000001, "Filter" },
767 { 0x00000002, "Detail" },
771 static const value_string ndps_service_type_enum[] = {
772 { 0x00000000, "SRS" },
773 { 0x00000001, "ENS" },
774 { 0x00000002, "RMS" },
778 static const value_string ndps_delivery_add_enum[] = {
779 { 0x00000000, "MHS Address" },
780 { 0x00000001, "Distinguished Name" },
781 { 0x00000002, "Text" },
782 { 0x00000003, "Octet String" },
783 { 0x00000004, "Distinguished Name String" },
784 { 0x00000005, "RPC Address" },
785 { 0x00000006, "Qualified Name" },
789 static const value_string ndps_resource_enum[] = {
790 { 0x00000000, "Name or ID" },
791 { 0x00000001, "Text" },
796 static const value_string ndps_identifier_enum[] = {
797 { 0x00000000, "ID Nominal Number" },
798 { 0x00000001, "ID Alpha-numeric" },
799 { 0x00000002, "ID Tag" },
803 static const value_string ndps_media_enum[] = {
804 { 0x00000000, "Select All Pages" },
805 { 0x00000001, "Selected Pages" },
809 static const value_string ndps_page_size_enum[] = {
810 { 0x00000000, "ID" },
811 { 0x00000001, "Dimensions" },
815 static const value_string ndps_pres_direction_enum[] = {
816 { 0x00000000, "Right to Bottom" },
817 { 0x00000001, "Left to Bottom" },
818 { 0x00000002, "Bidirectional to Bottom" },
819 { 0x00000003, "Right to Top" },
820 { 0x00000004, "Left to Top" },
821 { 0x00000005, "Bidirectional to Top" },
822 { 0x00000006, "Bottom to Right" },
823 { 0x00000007, "Bottom to Left" },
824 { 0x00000008, "Top to Left" },
825 { 0x00000009, "Top to Right" },
829 static const value_string ndps_page_order_enum[] = {
830 { 0x00000000, "Unknown" },
831 { 0x00000001, "First to Last" },
832 { 0x00000002, "Last to First" },
836 static const value_string ndps_medium_size_enum[] = {
837 { 0x00000000, "Discrete" },
838 { 0x00000001, "Continuous" },
842 static const value_string ndps_page_orientation_enum[] = {
843 { 0x00000000, "Unknown" },
844 { 0x00000001, "Face Up" },
845 { 0x00000002, "Face Down" },
849 static const value_string ndps_print_security[] = {
850 { 0x00000001, "Low" },
851 { 0x00000002, "Medium" },
852 { 0x00000003, "High" },
856 static const value_string ndps_numbers_up_enum[] = {
857 { 0x00000000, "Cardinal" },
858 { 0x00000001, "Name or Object ID" },
859 { 0x00000002, "Cardinal Range" },
864 static const value_string ndps_state_severity_enum[] = {
865 { 0x00000001, "Other" },
866 { 0x00000002, "Warning" },
867 { 0x00000003, "Critical" },
872 static const value_string ndps_training_enum[] = {
873 { 0x00000001, "Other" },
874 { 0x00000002, "Unknown" },
875 { 0x00000003, "Untrained" },
876 { 0x00000004, "Trained" },
877 { 0x00000005, "Field Service" },
878 { 0x00000006, "Management" },
882 static const value_string ndps_colorant_set_enum[] = {
883 { 0x00000000, "Name" },
884 { 0x00000001, "Description" },
888 static const value_string ndps_card_enum_time_enum[] = {
889 { 0x00000000, "Cardinal" },
890 { 0x00000001, "Enumeration" },
891 { 0x00000002, "Time" },
895 static const value_string ndps_attrs_arg_enum[] = {
896 { 0x00000000, "Continuation" },
897 { 0x00000001, "Specification" },
902 static const value_string ndps_filter_enum[] = {
903 { 0x00000000, "Item" },
904 { 0x00000001, "And" },
905 { 0x00000002, "Or" },
906 { 0x00000003, "Not" },
911 static const value_string ndps_filter_item_enum[] = {
912 { 0x00000000, "Equality" },
913 { 0x00000001, "Substrings" },
914 { 0x00000002, "Greater then or Equal to" },
915 { 0x00000003, "Less then or Equal to" },
916 { 0x00000004, "Present" },
917 { 0x00000005, "Subset of" },
918 { 0x00000006, "Superset of" },
919 { 0x00000007, "Non NULL Set Intersect" },
923 static const value_string ndps_match_criteria_enum[] = {
924 { 0x00000000, "Exact" },
925 { 0x00000001, "Case Insensitive" },
926 { 0x00000002, "Same Letter" },
927 { 0x00000003, "Approximate" },
931 static const value_string ndps_operator_enum[] = {
932 { 0x00000000, "Attributes" },
933 { 0x00000002, "Ordered Jobs" },
937 static const value_string ndps_resource_type_enum[] = {
938 { 0x00000000, "Printer Drivers" },
939 { 0x00000001, "Printer Definitions" },
940 { 0x00000002, "Printer Definitions Short" },
941 { 0x00000003, "Banner Page Files" },
942 { 0x00000004, "Font Types" },
943 { 0x00000005, "Printer Driver Files" },
944 { 0x00000006, "Printer Definition File" },
945 { 0x00000007, "Font Files" },
946 { 0x00000008, "Generic Type" },
947 { 0x00000009, "Generic Files" },
948 { 0x0000000a, "Printer Definition File 2" },
949 { 0x0000000b, "Printer Driver Types 2" },
950 { 0x0000000c, "Printer Driver Files 2" },
951 { 0x0000000d, "Printer Driver Types Archive" },
952 { 0x0000000e, "Languages Available" },
956 static const value_string ndps_os_type_enum[] = {
957 { 0x00000000, "DOS" },
958 { 0x00000001, "Windows 3.1" },
959 { 0x00000002, "Windows 95" },
960 { 0x00000003, "Windows NT" },
961 { 0x00000004, "OS2" },
962 { 0x00000005, "MAC" },
963 { 0x00000006, "UNIX" },
964 { 0x00000007, "Windows NT 4.0" },
965 { 0x00000008, "Windows 2000/XP" },
966 { 0x00000009, "Windows 98" },
967 { 0xffffffff, "None" },
971 static const value_string ndps_banner_type_enum[] = {
972 { 0x00000000, "All" },
973 { 0x00000001, "PCL" },
974 { 0x00000002, "PostScript" },
975 { 0x00000003, "ASCII Text" },
979 static const value_string ndps_font_type_enum[] = {
980 { 0x00000000, "TrueType" },
981 { 0x00000001, "PostScript" },
982 { 0x00000002, "System" },
983 { 0x00000003, "SPD" },
984 { 0x00000004, "True Doc" },
988 static const value_string ndps_archive_enum[] = {
989 { 0x00000000, "ZIP" },
990 { 0x00000001, "JAR" },
995 static const value_string ndps_res_type_enum[] = {
996 { 0x00000000, "Printer Driver" },
997 { 0x00000001, "Printer Definition" },
998 { 0x00000002, "Banner Page" },
999 { 0x00000003, "Font" },
1000 { 0x00000004, "Generic Resource" },
1001 { 0x00000005, "Print Driver Archive" },
1005 static const value_string ndps_print_arg_enum[] = {
1006 { 0x00000000, "Create Job" },
1007 { 0x00000001, "Add Document" },
1008 { 0x00000002, "Close Job" },
1012 static const value_string ndps_doc_content_enum[] = {
1013 { 0x00000000, "Content Included" },
1014 { 0x00000001, "Content Referenced" },
1018 static const value_string ndps_interrupt_job_enum[] = {
1019 { 0x00000000, "Job ID" },
1020 { 0x00000001, "Name" },
1024 static const value_string ndps_pause_job_enum[] = {
1025 { 0x00000000, "Job ID" },
1026 { 0x00000001, "Name" },
1030 static const value_string ndps_resubmit_op_enum[] = {
1031 { 0x00000000, "Copy" },
1032 { 0x00000001, "Move" },
1036 static const value_string ndps_shutdown_enum[] = {
1037 { 0x00000000, "Do Current Jobs" },
1038 { 0x00000001, "Immediate" },
1039 { 0x00000002, "Do Pending Jobs" },
1043 static const value_string ndps_list_profiles_choice_enum[] = {
1044 { 0x00000000, "ID" },
1045 { 0x00000001, "Filter" },
1049 static const value_string ndps_list_profiles_result_enum[] = {
1050 { 0x00000000, "Complete" },
1051 { 0x00000001, "No Event Objects" },
1052 { 0x00000002, "Profile ID's" },
1056 static const value_string ndps_ds_info_enum[] = {
1057 { 0x00000000, "Add" },
1058 { 0x00000001, "Remove" },
1059 { 0x00000002, "Update" },
1063 static const value_string ndps_list_services_enum[] = {
1064 { 0x00000000, "Supported" },
1065 { 0x00000001, "Enabled" },
1069 static const value_string ndps_data_item_enum[] = {
1070 { 0x00000000, "Int8" },
1071 { 0x00000001, "Int16" },
1072 { 0x00000002, "Int32" },
1073 { 0x00000003, "Boolean" },
1074 { 0x00000004, "Character String" },
1075 { 0x00000005, "Byte String" },
1079 static const value_string ndps_list_local_servers_enum[] = {
1080 { 0x00000000, "Specification" },
1081 { 0x00000001, "Continuation" },
1085 static const value_string ndps_delivery_method_enum[] = {
1086 { 0x00000000, "Specification" },
1087 { 0x00000001, "Continuation" },
1091 static const value_string ndps_attribute_enum[] = {
1092 { 0x00000000, "Null" },
1093 { 0x00000001, "Text" },
1094 { 0x00000002, "Descriptive Name" },
1095 { 0x00000003, "Descriptor" },
1096 { 0x00000004, "Message" },
1097 { 0x00000005, "Error Message" },
1098 { 0x00000006, "Simple Name" },
1099 { 0x00000007, "Distinguished Name String" },
1100 { 0x00000008, "Distinguished Name Seq" },
1101 { 0x00000009, "Delta Time" },
1102 { 0x0000000a, "Time" },
1103 { 0x0000000b, "Integer" },
1104 { 0x0000000c, "Integer Seq" },
1105 { 0x0000000d, "Cardinal" },
1106 { 0x0000000e, "Cardinal Seq" },
1107 { 0x0000000f, "Positive Integer" },
1108 { 0x00000010, "Integer Range" },
1109 { 0x00000011, "Cardinal Range" },
1110 { 0x00000012, "Maximum Integer" },
1111 { 0x00000013, "Minimum Integer" },
1112 { 0x00000014, "Integer 64" },
1113 { 0x00000015, "Integer 64 Seq" },
1114 { 0x00000016, "Cardinal 64" },
1115 { 0x00000017, "Cardinal 64 Seq" },
1116 { 0x00000018, "Positive Integer 64" },
1117 { 0x00000019, "Integer 64 Range" },
1118 { 0x0000001a, "Cardinal 64 Range" },
1119 { 0x0000001b, "Maximum Integer 64" },
1120 { 0x0000001c, "Minimum Integer 64" },
1121 { 0x0000001d, "Real" },
1122 { 0x0000001e, "Real Seq" },
1123 { 0x0000001f, "Non-Negative Real" },
1124 { 0x00000020, "Real Range" },
1125 { 0x00000021, "Non-Negative Real Range" },
1126 { 0x00000022, "Boolean" },
1127 { 0x00000023, "Percent" },
1128 { 0x00000024, "Object Identifier" },
1129 { 0x00000025, "Object Identifier Seq" },
1130 { 0x00000026, "Name or OID" },
1131 { 0x00000027, "Name or OID Seq" },
1132 { 0x00000028, "Distinguished Name" },
1133 { 0x00000029, "Relative Distinguished Name Seq" },
1134 { 0x0000002a, "Realization" },
1135 { 0x0000002b, "Medium Dimensions" },
1136 { 0x0000002c, "Dimension" },
1137 { 0x0000002d, "XY Dimensions" },
1138 { 0x0000002e, "Locations" },
1139 { 0x0000002f, "Area" },
1140 { 0x00000030, "Area Seq" },
1141 { 0x00000031, "Edge" },
1142 { 0x00000032, "Font Reference" },
1143 { 0x00000033, "Cardinal or OID" },
1144 { 0x00000034, "OID Cardinal Map" },
1145 { 0x00000035, "Cardinal or Name or OID" },
1146 { 0x00000036, "Positive Integer or OID" },
1147 { 0x00000037, "Event Handling Profile" },
1148 { 0x00000038, "Octet String" },
1149 { 0x00000039, "Priority" },
1150 { 0x0000003a, "Locale" },
1151 { 0x0000003b, "Method Delivery Address" },
1152 { 0x0000003c, "Object Identification" },
1153 { 0x0000003d, "Results Profile" },
1154 { 0x0000003e, "Criteria" },
1155 { 0x0000003f, "Job Password" },
1156 { 0x00000040, "Job Level" },
1157 { 0x00000041, "Job Categories" },
1158 { 0x00000042, "Print Checkpoint" },
1159 { 0x00000043, "Ignored Attribute" },
1160 { 0x00000044, "Resource" },
1161 { 0x00000045, "Medium Substitution" },
1162 { 0x00000046, "Font Substitution" },
1163 { 0x00000047, "Resource Context Seq" },
1164 { 0x00000048, "Sides" },
1165 { 0x00000049, "Page Select Seq" },
1166 { 0x0000004a, "Page Media Select" },
1167 { 0x0000004b, "Document Content" },
1168 { 0x0000004c, "Page Size" },
1169 { 0x0000004d, "Presentation Direction" },
1170 { 0x0000004e, "Page Order" },
1171 { 0x0000004f, "File Reference" },
1172 { 0x00000050, "Medium Source Size" },
1173 { 0x00000051, "Input Tray Medium" },
1174 { 0x00000052, "Output Bins Chars" },
1175 { 0x00000053, "Page ID Type" },
1176 { 0x00000054, "Level Range" },
1177 { 0x00000055, "Category Set" },
1178 { 0x00000056, "Numbers Up Supported" },
1179 { 0x00000057, "Finishing" },
1180 { 0x00000058, "Print Contained Object ID" },
1181 { 0x00000059, "Print Config Object ID" },
1182 { 0x0000005a, "Typed Name" },
1183 { 0x0000005b, "Network Address" },
1184 { 0x0000005c, "XY Dimensions Value" },
1185 { 0x0000005d, "Name or OID Dimensions Map" },
1186 { 0x0000005e, "Printer State Reason" },
1187 { 0x0000005f, "Enumeration" },
1188 { 0x00000060, "Qualified Name" },
1189 { 0x00000061, "Qualified Name Set" },
1190 { 0x00000062, "Colorant Set" },
1191 { 0x00000063, "Resource Printer ID" },
1192 { 0x00000064, "Event Object ID" },
1193 { 0x00000065, "Qualified Name Map" },
1194 { 0x00000066, "File Path" },
1195 { 0x00000067, "Uniform Resource Identifier" },
1196 { 0x00000068, "Cardinal or Enum or Time" },
1197 { 0x00000069, "Print Contained Object ID Set" },
1198 { 0x0000006a, "Octet String Pair" },
1199 { 0x0000006b, "Octet String Integer Pair" },
1200 { 0x0000006c, "Extended Resource Identifier" },
1201 { 0x0000006d, "Event Handling Profile 2" },
1205 static const value_string ndps_error_types[] = {
1206 { 0x00000000, "Ok" },
1207 { 0x00000001, "Error" },
1208 { 0xFFFFFC18, "Broker Out of Memory" }, /* Broker Errors */
1209 { 0xFFFFFC17, "Broker Bad NetWare Version" },
1210 { 0xFFFFFC16, "Broker Wrong Command Line Arguments" },
1211 { 0xFFFFFC15, "Broker Name Not Given" },
1212 { 0xFFFFFC14, "Not Broker Class" },
1213 { 0xFFFFFC13, "Invalid Broker Password" },
1214 { 0xFFFFFC12, "Invalid Broker Name" },
1215 { 0xFFFFFC11, "Broker Failed to Create Thread" },
1216 { 0xFFFFFC10, "Broker Failed to Initialize NUT" },
1217 { 0xFFFFFC0F, "Broker Failed to Get Messages" },
1218 { 0xFFFFFC0E, "Broker Failed to Allocate Resources" },
1219 { 0xFFFFFC0D, "Broker Service Name Must be Fully Distinguished" },
1220 { 0xFFFFFC0C, "Broker Uninitialized Module" },
1221 { 0xFFFFFC0B, "Broker DS Value Size Too Large" },
1222 { 0xFFFFFC0A, "Broker No Attribute Values" },
1223 { 0xFFFFFC09, "Broker Unknown Session" },
1224 { 0xFFFFFC08, "Broker Service Disabled" },
1225 { 0xFFFFFC07, "Broker Unknown Modify Operation" },
1226 { 0xFFFFFC06, "Broker Invalid Arguments" },
1227 { 0xFFFFFC05, "Broker Duplicate Session ID" },
1228 { 0xFFFFFC04, "Broker Unknown Service" },
1229 { 0xFFFFFC03, "Broker Service Already Enabled" },
1230 { 0xFFFFFC02, "Broker Service Already Disabled" },
1231 { 0xFFFFFC01, "Broker Invalid Credential" },
1232 { 0xFFFFFC00, "Broker Unknown Designator" },
1233 { 0xFFFFFBFF, "Broker Failed to Make Change Permanent" },
1234 { 0xFFFFFBFE, "Broker Not Admin Type Session" },
1235 { 0xFFFFFBFD, "Broker Option Not Supported" },
1236 { 0xFFFFFBFC, "Broker No Effective Rights" },
1237 { 0xFFFFFBFB, "Broker Could Not Find File" },
1238 { 0xFFFFFBFA, "Broker Error Reading File" },
1239 { 0xFFFFFBF9, "Broker Not NLM File Format" },
1240 { 0xFFFFFBF8, "Broker Wrong NLM File Version" },
1241 { 0xFFFFFBF7, "Broker Reentrant Initialization Failure" },
1242 { 0xFFFFFBF6, "Broker Already in Progress" },
1243 { 0xFFFFFBF5, "Broker Initialize Failure" },
1244 { 0xFFFFFBF4, "Broker Inconsistent File Format" },
1245 { 0xFFFFFBF3, "Broker Can't Load at Startup" },
1246 { 0xFFFFFBF2, "Broker Autoload Modules Not Loaded" },
1247 { 0xFFFFFBF1, "Broker Unresolved External" },
1248 { 0xFFFFFBF0, "Broker Public Already Defined" },
1249 { 0xFFFFFBEF, "Broker Other Broker Using Object" },
1250 { 0xFFFFFBEE, "Broker Service Failed to Initialize" },
1251 { 0xFFFFFBB4, "Registry Out of Memory" }, /* SRS Errors */
1252 { 0xFFFFFBB3, "Registry Bad NetWare Version" },
1253 { 0xFFFFFBB2, "Registry Failed to Create Context" },
1254 { 0xFFFFFBB1, "Registry Failed Login" },
1255 { 0xFFFFFBB0, "Registry Failed to Create Thread" },
1256 { 0xFFFFFBAF, "Registry Failed to Get Messages" },
1257 { 0xFFFFFBAE, "Registry Service Name Must Be Fully Distinguished" },
1258 { 0xFFFFFBAD, "Registry DS Value Size Too Large" },
1259 { 0xFFFFFBAC, "Registry No Attribute Values" },
1260 { 0xFFFFFBAB, "Registry Unknown Session" },
1261 { 0xFFFFFBAA, "Registry Service Disabled" },
1262 { 0xFFFFFBA9, "Registry Unknown Modify Operation" },
1263 { 0xFFFFFBA8, "Registry Can't Start Advertise" },
1264 { 0xFFFFFBA7, "Registry Duplicate Server Entry" },
1265 { 0xFFFFFBA6, "Registry Can't Bind to Registry" },
1266 { 0xFFFFFBA5, "Registry Can't Create Client" },
1267 { 0xFFFFFBA4, "Registry Invalid Arguments" },
1268 { 0xFFFFFBA3, "Registry Duplicate Session ID" },
1269 { 0xFFFFFBA2, "Registry Unknown Server Entry" },
1270 { 0xFFFFFBA1, "Registry Invalid Credential" },
1271 { 0xFFFFFBA0, "Registry Type Session" },
1272 { 0xFFFFFB9F, "Registry Server Type Session" },
1273 { 0xFFFFFB9E, "Registry Not Server Type Session" },
1274 { 0xFFFFFB9D, "Not Registry Type Session" },
1275 { 0xFFFFFB9C, "Registry Unknown Designator" },
1276 { 0xFFFFFB9B, "Registry Option Not Supported" },
1277 { 0xFFFFFB9A, "Registry Not in List Iteration" },
1278 { 0xFFFFFB99, "Registry Invalid Continuation Handle" },
1279 { 0xFFFFFB50, "Notify Out of Memory" }, /* Notification Service Errors */
1280 { 0xFFFFFB4F, "Notify Bad NetWare Version" },
1281 { 0xFFFFFB4E, "Notify Failed to Create Thread" },
1282 { 0xFFFFFB4D, "Notify Failed to Get Messages" },
1283 { 0xFFFFFB4C, "Notify Failed to Create Context" },
1284 { 0xFFFFFB4B, "Notify Failed Login" },
1285 { 0xFFFFFB4A, "Notify Service Name Must be Fully Distiguished" },
1286 { 0xFFFFFB49, "Notify DS Value Size Too Large" },
1287 { 0xFFFFFB48, "Notify No Attribute Values" },
1288 { 0xFFFFFB47, "Notify Unknown Session" },
1289 { 0xFFFFFB46, "Notify Unknown Notify Profile" },
1290 { 0xFFFFFB45, "Notify Error Reading File" },
1291 { 0xFFFFFB44, "Notify Error Writing File" },
1292 { 0xFFFFFB43, "Wrong Notify Database Version" },
1293 { 0xFFFFFB42, "Corrupted Notify Database" },
1294 { 0xFFFFFB41, "Notify Unknown Event Object ID" },
1295 { 0xFFFFFB40, "Notify Method Already Installed" },
1296 { 0xFFFFFB3F, "Notify Unknown Method" },
1297 { 0xFFFFFB3E, "Notify Service Disabled" },
1298 { 0xFFFFFB3D, "Notify Unknown Modify Operation" },
1299 { 0xFFFFFB3C, "Out of Notify Entries" },
1300 { 0xFFFFFB3B, "Notify Unknown Language ID" },
1301 { 0xFFFFFB3A, "Notify Queue Empty" },
1302 { 0xFFFFFB39, "Notify Can't Load Delivery Method" },
1303 { 0xFFFFFB38, "Notify Invalid Arguments" },
1304 { 0xFFFFFB37, "Notify Duplicate Session ID" },
1305 { 0xFFFFFB36, "Notify Invalid Credentials" },
1306 { 0xFFFFFB35, "Notify Unknown Choice" },
1307 { 0xFFFFFB34, "Notify Unknown Attribute Value" },
1308 { 0xFFFFFB33, "Notify Error Writing Database" },
1309 { 0xFFFFFB32, "Notify Unknown Object ID" },
1310 { 0xFFFFFB31, "Notify Unknown Designator" },
1311 { 0xFFFFFB30, "Notify Failed to Make Change Permanent" },
1312 { 0xFFFFFB2F, "Notify User Interface Not Supported" },
1313 { 0xFFFFFB2E, "Notify Not Supplied Type of Session" },
1314 { 0xFFFFFB2D, "Notify Not Admin Type Session" },
1315 { 0xFFFFFB2C, "Notify No Service Registry Available" },
1316 { 0xFFFFFB2B, "Notify Failed to Register With Any Server" },
1317 { 0xFFFFFB2A, "Notify Empty Event Object Set" },
1318 { 0xFFFFFB29, "Notify Unknown Notify Handle" },
1319 { 0xFFFFFB28, "Notify Option Not Supported" },
1320 { 0xFFFFFB27, "Notify Unknown RPC Session" },
1321 { 0xFFFFFB26, "Notify Initialization Error" },
1322 { 0xFFFFFB25, "Notify No Effective Rights" },
1323 { 0xFFFFFB24, "Notify No Persistent Storage" },
1324 { 0xFFFFFB23, "Notify Bad Method Filename" },
1325 { 0xFFFFFB22, "Notify Unknown Continuation Handle" },
1326 { 0xFFFFFB21, "Notify Invalid Continuation Handle" },
1327 { 0xFFFFFB20, "Notify Could Not Find File" },
1328 { 0xFFFFFB1F, "Notify Error Reading File" },
1329 { 0xFFFFFB1E, "Notify Not NLM File Format" },
1330 { 0xFFFFFB1D, "Notify Wrong NLM File Version" },
1331 { 0xFFFFFB1C, "Notify Reentrant Initialization Failure" },
1332 { 0xFFFFFB1B, "Notify Already in Progress" },
1333 { 0xFFFFFB1A, "Notify Initialization Failure" },
1334 { 0xFFFFFB19, "Notify Inconsistent File Format" },
1335 { 0xFFFFFB18, "Notify Can't Load at Startup" },
1336 { 0xFFFFFB17, "Notify Autoload Modules Not Loaded" },
1337 { 0xFFFFFB16, "Notify Unresolved External" },
1338 { 0xFFFFFB15, "Notify Public Already Defined" },
1339 { 0xFFFFFB14, "Notify Using Unknown Methods" },
1340 { 0xFFFFFB13, "Notify Service Not Fully Enabled" },
1341 { 0xFFFFFB12, "Notify Foreign NDS Tree Name" },
1342 { 0xFFFFFB11, "Notify Delivery Method Rejected Address" },
1343 { 0xFFFFFB10, "Notify Unsupported Delivery Address Type" },
1344 { 0xFFFFFB0F, "Notify User Object No Default Server" },
1345 { 0xFFFFFB0E, "Notify Failed to Send Notification" },
1346 { 0xFFFFFB0D, "Notify Bad Volume in Address" },
1347 { 0xFFFFFB0C, "Notify Broker Has No File Rights" },
1348 { 0xFFFFFB0B, "Notify Maximum Methods Supported" },
1349 { 0xFFFFFB0A, "Notify No Filter Provided" },
1350 { 0xFFFFFB09, "Notify IPX Not Supported By Method" },
1351 { 0xFFFFFB08, "Notify IP Not Supported By Method" },
1352 { 0xFFFFFB07, "Notify Failed to Startup Winsock" },
1353 { 0xFFFFFB06, "Notify No Protocols Available" },
1354 { 0xFFFFFB05, "Notify Failed to Launch RPC Server" },
1355 { 0xFFFFFB04, "Notify Invalid SLP Attribute Format" },
1356 { 0xFFFFFB03, "Notify Invalid SLP URL Format" },
1357 { 0xFFFFFB02, "Notify Unknown Attribute Object ID" },
1358 { 0xFFFFFB01, "Notify Duplicate Session ID" },
1359 { 0xFFFFFB00, "Notify Failed to Authenticate" },
1360 { 0xFFFFFAFF, "Notify Failed to Authenticate Protocol Mismatch" },
1361 { 0xFFFFFAFE, "Notify Failed to Authenticate Internal Error" },
1362 { 0xFFFFFAFD, "Notify Failed to Authenticate Connection Error" },
1363 { 0xFFFFFC7C, "Resource Manager Out of Memory" }, /* ResMan Errors */
1364 { 0xFFFFFC7B, "Resource Manager Bad NetWare Version" },
1365 { 0xFFFFFC7A, "Resource Manager Wrong Command Line Arguments" },
1366 { 0xFFFFFC79, "Resource Manager Broker Name Not Given" },
1367 { 0xFFFFFC78, "Resource Manager Invalid Broker Password" },
1368 { 0xFFFFFC77, "Resource Manager Invalid Broker Name" },
1369 { 0xFFFFFC76, "Resource Manager Failed to Create Thread" },
1370 { 0xFFFFFC75, "Resource Manager Service Name Must be Fully Distinguished" },
1371 { 0xFFFFFC74, "Resource Manager DS Value Size Too Large" },
1372 { 0xFFFFFC73, "Resource Manager No Attribute Values" },
1373 { 0xFFFFFC72, "Resource Manager Unknown Session" },
1374 { 0xFFFFFC71, "Resource Manager Error Reading File" },
1375 { 0xFFFFFC70, "Resource Manager Error Writing File" },
1376 { 0xFFFFFC6F, "Resource Manager Service Disabled" },
1377 { 0xFFFFFC6E, "Resource Manager Unknown Modify Operation" },
1378 { 0xFFFFFC6D, "Resource Manager Duplicate Session ID" },
1379 { 0xFFFFFC6C, "Resource Manager Invalid Credentials" },
1380 { 0xFFFFFC6B, "Resource Manager No Service Registry Available" },
1381 { 0xFFFFFC6A, "Resource Manager Failed to Register With any Server" },
1382 { 0xFFFFFC69, "Resource Manager Failed to Get Messages" },
1383 { 0xFFFFFC68, "Resource Manager Failed to Create Context" },
1384 { 0xFFFFFC67, "Resource Manager Failed to Login" },
1385 { 0xFFFFFC66, "Resource Manager NPD Files Generation Error" },
1386 { 0xFFFFFC65, "Resource Manager INF File Format Error" },
1387 { 0xFFFFFC64, "Resource Manager No Printer Type in INF File" },
1388 { 0xFFFFFC63, "Resource Manager No INF Files Present" },
1389 { 0xFFFFFC62, "Resource Manager File Open Error" },
1390 { 0xFFFFFC61, "Resource Manager Read File Error" },
1391 { 0xFFFFFC60, "Resource Manager Write File Error" },
1392 { 0xFFFFFC5F, "Resource Manager Resource Type Invalid" },
1393 { 0xFFFFFC5E, "Resource Manager No Such Filename" },
1394 { 0xFFFFFC5D, "Resource Manager Banner Type Invalid" },
1395 { 0xFFFFFC5C, "Resource Manager List Type Unknown" },
1396 { 0xFFFFFC5B, "Resource Manager OS Not Supported" },
1397 { 0xFFFFFC5A, "Resource Manager No Banner Files Present" },
1398 { 0xFFFFFC59, "Resource Manager Printer Definition Type Unknown" },
1399 { 0xFFFFFC58, "Resource Manager No Printer Types in List" },
1400 { 0xFFFFFC57, "Resource Manager Option Not Supported" },
1401 { 0xFFFFFC56, "Resource Manager Unicode Convention Error" },
1402 { 0xFFFFFC55, "Resource Manager Invalid Arguments" },
1403 { 0xFFFFFC54, "Resource Manager Initialization Error" },
1404 { 0xFFFFFC53, "Resource Manager No Service Registry Available" },
1405 { 0xFFFFFC52, "Resource Manager Failed to Register to Any Server" },
1406 { 0xFFFFFC51, "Resource Manager Unknown Designator" },
1407 { 0xFFFFFC50, "Resource Manager Not Admin Session" },
1408 { 0xFFFFFC4F, "Resource Manager No Effective Rights" },
1409 { 0xFFFFFC4E, "Resource Manager Bad File Attribute" },
1410 { 0xFFFFFC4D, "Resource Manager Document ID Format Error" },
1411 { 0xFFFFFC4C, "Resource Manager Unknown RPC Session" },
1412 { 0xFFFFFC4B, "Resource Manager Session Being Removed" },
1413 { 0xFFFFFC49, "Resource Manager Font Manager IO Error" },
1414 { 0xFFFFFC48, "Resource Manager Font Manager Reentrancy" },
1415 { 0xFFFFFC47, "Resource Manager Font Manager Sequence Error" },
1416 { 0xFFFFFC46, "Resource Manager Font Manager Corrupt Index File" },
1417 { 0xFFFFFC45, "Resource Manager Font Manager No Such Font" },
1418 { 0xFFFFFC44, "Resource Manager Font Manager Not Initialized" },
1419 { 0xFFFFFC43, "Resource Manager Font Manager System Error" },
1420 { 0xFFFFFC42, "Resource Manager Font Manager Bad Parameter" },
1421 { 0xFFFFFC41, "Resource Manager Font Manager Path Too Long" },
1422 { 0xFFFFFC40, "Resource Manager Font Manager Failure" },
1423 { 0xFFFFFC3F, "Resource Manager Duplicate TIRPC Session" },
1424 { 0xFFFFFC3E, "Resource Manager Connection Lost RMS Data" },
1425 { 0xFFFFFC3D, "Resource Manager Failed to Start Winsock" },
1426 { 0xFFFFFC3C, "Resource Manager No Protocols Available" },
1427 { 0xFFFFFC3B, "Resource Manager Failed to Launch RPC Server" },
1428 { 0xFFFFFC3A, "Resource Manager Invalid SLP Attribute Format" },
1429 { 0xFFFFFC39, "Resource Manager Invalid SLP URL Format" },
1430 { 0xFFFFFC38, "Resource Manager Unresolved External" },
1431 { 0xFFFFFC37, "Resource Manager Failed to Authenticate" },
1432 { 0xFFFFFC36, "Resource Manager Failed to Authenticate Protocol Mismatch" },
1433 { 0xFFFFFC35, "Resource Manager Failed to Authenticate Internal Error" },
1434 { 0xFFFFFC34, "Resource Manager Failed to Authenticate Connection Error" },
1435 { 0xFFFFFC33, "Resource Manager No Rights to Remote Resdir" },
1436 { 0xFFFFFC32, "Resource Manager Can't Initialize NDPS Library" },
1437 { 0xFFFFFC31, "Resource Manager Can't Create Resource Reference" },
1438 { 0xFFFFFC30, "Resource Manager File is Zero Length" },
1439 { 0xFFFFFC2F, "Resource Manager Failed to Write INF in Address" },
1440 { 0xFFFFFCDF, "NDPSM No Memory" }, /* NDPSM Errors */
1441 { 0xFFFFFCDE, "NDPSM Memory Not Found" },
1442 { 0xFFFFFCDD, "NDPSM Job Storage Limit" },
1443 { 0xFFFFFCDC, "NDPSM Job Retention Limit" },
1444 { 0xFFFFFCDB, "NDPSM Unsupported Type" },
1445 { 0xFFFFFCDA, "NDPSM Undefined Type" },
1446 { 0xFFFFFCD9, "NDPSM Unsupported Operation" },
1447 { 0xFFFFFCD8, "NDPSM Error Accessing Database" },
1448 { 0xFFFFFCD7, "NDPSM No PDS" },
1449 { 0xFFFFFCD6, "NDPSM Invalid Class" },
1450 { 0xFFFFFCD5, "NDPSM Bad Parameter" },
1451 { 0xFFFFFCD4, "NDPSM Object Not Found" },
1452 { 0xFFFFFCD3, "NDPSM Attribute Not Found" },
1453 { 0xFFFFFCD2, "NDPSM Value Not Found" },
1454 { 0xFFFFFCD1, "NDPSM Values Not Comparable" },
1455 { 0xFFFFFCD0, "NDPSM Invalid Value Syntax" },
1456 { 0xFFFFFCCF, "NDPSM Job Not Found" },
1457 { 0xFFFFFCCE, "NDPSM Communications Error" },
1458 { 0xFFFFFCCD, "NDPSM Printer Agent Initializing" },
1459 { 0xFFFFFCCC, "NDPSM Printer Agent Going Down" },
1460 { 0xFFFFFCCB, "NDPSM Printer Agent Disabled" },
1461 { 0xFFFFFCCA, "NDPSM Printer Agent Paused" },
1462 { 0xFFFFFCC9, "NDPSM Bad Printer Agent Handle" },
1463 { 0xFFFFFCC8, "NDPSM Object Not Locked" },
1464 { 0xFFFFFCC7, "NDPSM Version Incompatible" },
1465 { 0xFFFFFCC6, "NDPSM PSM Initializing" },
1466 { 0xFFFFFCC5, "NDPSM PSM Going Down" },
1467 { 0xFFFFFCC4, "NDPSM Notification Service Error" },
1468 { 0xFFFFFCC3, "NDPSM Medium Needs Mounted" },
1469 { 0xFFFFFCC2, "NDPSM PDS Not Responding" },
1470 { 0xFFFFFCC1, "NDPSM Session Not Found" },
1471 { 0xFFFFFCC0, "NDPSM RPC Failure" },
1472 { 0xFFFFFCBF, "NDPSM Duplicate Value" },
1473 { 0xFFFFFCBE, "NDPSM PDS Refuses Rename" },
1474 { 0xFFFFFCBD, "NDPSM No Mandatory Attribute" },
1475 { 0xFFFFFCBC, "NDPSM Already Attached" },
1476 { 0xFFFFFCBB, "NDPSM Can't Attach" },
1477 { 0xFFFFFCBA, "NDPSM Too Many NetWare Servers" },
1478 { 0xFFFFFCB9, "NDPSM Can't Create Document File" },
1479 { 0xFFFFFCB8, "NDPSM Can't Delete Document File" },
1480 { 0xFFFFFCB7, "NDPSM Can't Open Document File" },
1481 { 0xFFFFFCB6, "NDPSM Can't Write Document File" },
1482 { 0xFFFFFCB5, "NDPSM Job is Active" },
1483 { 0xFFFFFCB4, "NDPSM No Scheduler" },
1484 { 0xFFFFFCB3, "NDPSM Changing Connection" },
1485 { 0xFFFFFCB2, "NDPSM Could not Create Account Reference" },
1486 { 0xFFFFFCB1, "NDPSM Accounting Service Error" },
1487 { 0xFFFFFCB0, "NDPSM RMS Service Error" },
1488 { 0xFFFFFCAF, "NDPSM Failed Validation" },
1489 { 0xFFFFFCAE, "NDPSM Broker Server Connecting" },
1490 { 0xFFFFFCAD, "NDPSM SRS Service Error" },
1491 { 0xFFFFFD44, "JPM Execute Request Later" },
1492 { 0xFFFFFD43, "JPM Failed to Open Document" },
1493 { 0xFFFFFD42, "JPM Failed to Read Document File" },
1494 { 0xFFFFFD41, "JPM Bad Printer Agent Handle" },
1495 { 0xFFFFFD40, "JPM Bad Job Handle" },
1496 { 0xFFFFFD3F, "JPM Bad Document Handle" },
1497 { 0xFFFFFD3E, "JPM Unsupported Operation" },
1498 { 0xFFFFFD3D, "JPM Request Queue Full" },
1499 { 0xFFFFFD3C, "JPM Printer Agent Not Found" },
1500 { 0xFFFFFD3B, "JPM Invalid Request" },
1501 { 0xFFFFFD3A, "JPM Not Accepting Requests" },
1502 { 0xFFFFFD39, "JPM Printer Agent Already Serviced By PDS" },
1503 { 0xFFFFFD38, "JPM No Job" },
1504 { 0xFFFFFD37, "JPM Job Not Found" },
1505 { 0xFFFFFD36, "JPM Could not Access Database" },
1506 { 0xFFFFFD35, "JPM Bad Object Type" },
1507 { 0xFFFFFD34, "JPM Job Already Closed" },
1508 { 0xFFFFFD33, "JPM Document Already Closed" },
1509 { 0xFFFFFD32, "JPM Print Handler Not Registered" },
1510 { 0xFFFFFD31, "JPM Version Incompatible" },
1511 { 0xFFFFFD30, "JPM Printer Agent Paused" },
1512 { 0xFFFFFD2F, "JPM Printer Agent Shutdown" },
1513 { 0xFFFFFD2E, "JPM No CLIB Context" },
1514 { 0xFFFFFD2D, "JPM Accounting Already Serviced" },
1515 { 0xFFFFFC7B, "Database Can't Create File" },
1516 { 0xFFFFFC7A, "Database Can't Find Data File" },
1517 { 0xFFFFFC79, "Database Can't Open Data File" },
1518 { 0xFFFFFC78, "Database Can't Open Index File" },
1519 { 0xFFFFFC77, "Database Index File Not Open" },
1520 { 0xFFFFFC76, "Database Can't Rename File" },
1521 { 0xFFFFFC75, "Database Can't Read Data File" },
1522 { 0xFFFFFC74, "Database Can't Read Index File" },
1523 { 0xFFFFFC73, "Database Can't Write Data File" },
1524 { 0xFFFFFC72, "Database Can't Write Index File" },
1525 { 0xFFFFFC71, "Database Can't Delete Printer Agent Directory" },
1526 { 0xFFFFFC70, "Database Already Deleted" },
1527 { 0xFFFFFC6F, "Database Object Exists" },
1528 { 0xFFFFFC6E, "Database Descriptor In Use" },
1529 { 0xFFFFFC6D, "Database Descriptor Being Deleted" },
1533 static const value_string ndps_credential_enum[] = {
1542 static const value_string ndps_object_op_enum[] = {
1546 { 3, "Delete Object" },
1550 static const value_string ndps_client_server_enum[] = {
1553 { 2, "Client and Server" },
1557 static const value_string ndps_session_type_enum[] = {
1566 static const value_string ndps_get_session_type_enum[] = {
1574 static const value_string ndps_get_resman_session_type_enum[] = {
1582 align_4(tvbuff_t *tvb, int aoffset)
1584 if(tvb_length_remaining(tvb, aoffset) > 4 )
1592 ndps_string(tvbuff_t* tvb, int hfinfo, proto_tree *ndps_tree, int offset, char *stringval, size_t buflen)
1594 int foffset = offset;
1599 guint32 length_remaining = 0;
1601 if (stringval == NULL) {
1603 buflen = sizeof buffer;
1605 str_length = tvb_get_ntohl(tvb, foffset);
1607 length_remaining = tvb_length_remaining(tvb, foffset);
1608 if(str_length > (guint)length_remaining || str_length > 1024)
1610 proto_tree_add_string(ndps_tree, hfinfo, tvb, foffset,
1611 length_remaining + 4, "<String too long to process>");
1612 foffset += length_remaining;
1617 proto_tree_add_string(ndps_tree, hfinfo, tvb, offset,
1618 4, "<Not Specified>");
1621 for ( i = 0; i < str_length; i++ )
1623 c_char = tvb_get_guint8(tvb, foffset );
1624 if (c_char<0x20 || c_char>0x7e)
1630 stringval[i] = c_char & 0xff;
1641 stringval[i] = c_char & 0xff;
1646 if(length_remaining==1)
1652 stringval[i] = '\0';
1654 str_length = tvb_get_ntohl(tvb, offset);
1655 proto_tree_add_string(ndps_tree, hfinfo, tvb, offset+4,
1656 str_length, stringval);
1657 foffset += align_4(tvb, foffset);
1662 objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1666 guint32 label_value=0;
1669 gboolean found=TRUE;
1671 length = tvb_get_ntohl(tvb, foffset);
1678 proto_tree_add_uint(ndps_tree, hf_oid_struct_size, tvb, foffset, 4, length);
1684 label_value = tvb_get_ntohl(tvb, foffset+5);
1685 label = match_strval(label_value, object_ids_7);
1688 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1692 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_7, tvb, foffset, length, label);
1695 label_value = tvb_get_ntohl(tvb, foffset+6);
1696 label = match_strval(label_value, object_ids_8);
1699 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1703 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_8, tvb, foffset, length, label);
1706 label_value = tvb_get_ntohl(tvb, foffset+7);
1707 label = match_strval(label_value, object_ids_9);
1710 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1714 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_9, tvb, foffset, length, label);
1717 label_value = tvb_get_ntohl(tvb, foffset+8);
1718 label = match_strval(label_value, object_ids_10);
1721 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1725 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_10, tvb, foffset, length, label);
1728 label_value = tvb_get_ntohl(tvb, foffset+9);
1729 label = match_strval(label_value, object_ids_11);
1732 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1736 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_11, tvb, foffset, length, label);
1739 label_value = tvb_get_ntohl(tvb, foffset+10);
1740 label = match_strval(label_value, object_ids_12);
1743 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1747 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_12, tvb, foffset, length, label);
1750 label_value = tvb_get_ntohl(tvb, foffset+11);
1751 label = match_strval(label_value, object_ids_13);
1754 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1758 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_13, tvb, foffset, length, label);
1761 label_value = tvb_get_ntohl(tvb, foffset+12);
1762 label = match_strval(label_value, object_ids_14);
1765 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1769 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_14, tvb, foffset, length, label);
1772 label_value = tvb_get_ntohl(tvb, foffset+13);
1773 label = match_strval(label_value, object_ids_15);
1776 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1780 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_15, tvb, foffset, length, label);
1783 label_value = tvb_get_ntohl(tvb, foffset+14);
1784 label = match_strval(label_value, object_ids_16);
1787 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1791 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_16, tvb, foffset, length, label);
1794 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1801 label = match_strval(label_value, object_ids_7);
1805 atree = proto_item_add_subtree(aitem, ett_ndps);
1806 proto_tree_add_item(atree, hf_oid_asn1_type, tvb, foffset, 1, FALSE);
1808 length = tvb_get_guint8(tvb, foffset);
1810 tvb_ensure_bytes_exist(tvb, foffset, length);
1811 proto_tree_add_item(atree, hf_ndps_oid, tvb, foffset, length, FALSE);
1818 tvb_ensure_bytes_exist(tvb, foffset, length);
1824 length = tvb_get_guint8(tvb, foffset);
1826 tvb_ensure_bytes_exist(tvb, foffset, length);
1830 global_attribute_name = label;
1831 /* XXX - There's probably a better way to handle this */
1832 if ((int) (foffset+(length%2)) < 0) {
1833 THROW(ReportedBoundsError);
1835 return foffset+(length%2);
1839 name_or_id(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1841 guint32 name_or_id_val;
1843 name_or_id_val = tvb_get_ntohl(tvb, foffset);
1844 proto_tree_add_uint(ndps_tree, hf_ndps_nameorid, tvb, foffset, 4, name_or_id_val);
1846 switch (name_or_id_val)
1848 case 1: /* Global */
1849 foffset = objectidentifier(tvb, ndps_tree, foffset);
1853 foffset = ndps_string(tvb, hf_local_object_name, ndps_tree, foffset, NULL, 0);
1856 foffset += align_4(tvb, foffset);
1861 qualifiedname(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1863 guint32 qualified_name_type=0;
1865 qualified_name_type = tvb_get_ntohl(tvb, foffset);
1866 proto_tree_add_uint(ndps_tree, hf_ndps_qualified_name, tvb, foffset, 4, qualified_name_type);
1868 if (qualified_name_type != 0) {
1869 if (qualified_name_type == 1) {
1870 foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset, NULL, 0);
1874 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
1875 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
1882 objectidentification(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1884 guint32 object_type=0;
1888 object_type = tvb_get_ntohl(tvb, foffset);
1889 aitem = proto_tree_add_item(ndps_tree, hf_obj_id_type, tvb, foffset, 4, FALSE);
1890 atree = proto_item_add_subtree(aitem, ett_ndps);
1894 case 0: /* Printer Contained Object ID */
1895 foffset = ndps_string(tvb, hf_printer_name, atree, foffset, NULL, 0);
1896 proto_tree_add_item(atree, hf_ndps_object, tvb, foffset,
1900 case 1: /* Document Identifier */
1901 foffset = ndps_string(tvb, hf_printer_name, atree, foffset, NULL, 0);
1902 proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset,
1906 case 2: /* Object Identifier */
1907 foffset = objectidentifier(tvb, atree, foffset);
1909 case 3: /* Object Name */
1910 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
1911 if (foffset > tvb_length_remaining(tvb, foffset)) {
1914 foffset = name_or_id(tvb, atree, foffset);
1916 case 4: /* Name or Object ID */
1917 foffset = name_or_id(tvb, atree, foffset);
1919 case 5: /* Simple Name */
1920 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
1922 case 6: /* Printer Configuration Object ID */
1923 foffset = ndps_string(tvb, hf_printer_name, atree, foffset, NULL, 0);
1925 case 7: /* Qualified Name */
1926 foffset = qualifiedname(tvb, ndps_tree, foffset);
1928 case 8: /* Event Object ID */
1929 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
1930 foffset = objectidentifier(tvb, atree, foffset);
1931 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset,
1941 print_address(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1943 guint32 address_type=0;
1945 guint32 address_len=0;
1947 address_type = tvb_get_ntohl(tvb, foffset);
1948 proto_tree_add_uint(ndps_tree, hf_ndps_address, tvb, foffset, 4, address_type);
1950 address_len = tvb_get_ntohl(tvb, foffset);
1951 proto_tree_add_item(ndps_tree, hf_address_len, tvb, foffset, 4, FALSE);
1953 switch(address_type)
1956 proto_tree_add_item(ndps_tree, hf_ndps_net, tvb, foffset, 4, FALSE);
1957 proto_tree_add_item(ndps_tree, hf_ndps_node, tvb, foffset+4, 6, FALSE);
1958 proto_tree_add_item(ndps_tree, hf_ndps_socket, tvb, foffset+10, 2, FALSE);
1959 tvb_ensure_bytes_exist(tvb, foffset, address_len);
1960 foffset += address_len;
1963 proto_tree_add_item(ndps_tree, hf_ndps_port, tvb, foffset, 2, FALSE);
1964 address = tvb_get_letohl(tvb, foffset+2);
1965 proto_tree_add_ipv4(ndps_tree, hf_ndps_ip, tvb, foffset+2, 4, address);
1966 tvb_ensure_bytes_exist(tvb, foffset, address_len);
1967 foffset += address_len;
1970 tvb_ensure_bytes_exist(tvb, foffset, tvb_get_ntohl(tvb, foffset -4));
1971 foffset += tvb_get_ntohl(tvb, foffset -4);
1974 return foffset+(address_len%4);
1978 address_item(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1980 guint32 address_type=0;
1982 address_type = tvb_get_ntohl(tvb, foffset);
1983 proto_tree_add_uint(ndps_tree, hf_address_type, tvb, foffset, 4, address_type);
1985 switch(address_type)
1995 foffset = qualifiedname(tvb, ndps_tree, foffset);
2002 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
2005 proto_tree_add_item(ndps_tree, hf_ndps_attrib_boolean, tvb, foffset, 4, FALSE);
2009 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2013 foffset = print_address(tvb, ndps_tree, foffset);
2018 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
2025 credentials(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2027 guint32 cred_type=0;
2029 guint32 number_of_items;
2034 cred_type = tvb_get_ntohl(tvb, foffset);
2035 proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
2040 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL, 0);
2041 number_of_items=tvb_get_ntohl(tvb, foffset);
2042 proto_tree_add_uint(ndps_tree, hf_ndps_num_passwords, tvb, foffset, 4, number_of_items);
2044 for (i = 1 ; i <= number_of_items; i++ )
2046 if (i > NDPS_MAX_ITEMS) {
2047 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2050 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Password %d", i);
2051 atree = proto_item_add_subtree(aitem, ett_ndps);
2052 length = tvb_get_ntohl(tvb, foffset);
2056 tvb_ensure_bytes_exist(tvb, foffset, length);
2057 proto_tree_add_item(atree, hf_ndps_password, tvb, foffset, length, FALSE);
2059 proto_item_set_end(aitem, tvb, foffset);
2064 length = tvb_get_ntohl(tvb, foffset);
2068 tvb_ensure_bytes_exist(tvb, foffset, length);
2069 proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
2074 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL, 0);
2076 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, FALSE);
2080 length=tvb_get_ntohl(tvb, foffset);
2081 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL, 0);
2086 if (tvb_get_ntohs(tvb, foffset)==0) /* NDPS 1.0 */
2089 if (tvb_get_ntohs(tvb, foffset)==0) /* NDPS 1.1 */
2094 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, FALSE);
2096 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL, 0);
2099 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL, 0);
2101 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, FALSE);
2103 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL, 0);
2104 foffset += 8; /* Don't know what these 8 bytes signify */
2105 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2106 foffset += 4; /* XXX - what does this count? */
2107 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
2108 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
2118 event_object_set(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2120 guint32 number_of_items;
2121 guint32 number_of_items2;
2124 guint32 object_identifier;
2132 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event");
2133 atree = proto_item_add_subtree(aitem, ett_ndps);
2134 number_of_items = tvb_get_ntohl(tvb, foffset);
2135 proto_tree_add_uint(atree, hf_ndps_num_events, tvb, foffset, 4, number_of_items);
2137 for (i = 1 ; i <= number_of_items; i++ )
2139 if (i > NDPS_MAX_ITEMS) {
2140 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2143 bitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event %u", i);
2144 btree = proto_item_add_subtree(bitem, ett_ndps);
2145 proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
2147 foffset = objectidentifier(tvb, btree, foffset);
2148 foffset += align_4(tvb, foffset);
2149 foffset = objectidentification(tvb, btree, foffset);
2150 foffset += align_4(tvb, foffset);
2151 proto_tree_add_item(btree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
2153 object_identifier = tvb_get_ntohl(tvb, foffset);
2154 proto_tree_add_uint(btree, hf_ndps_event_object_identifier, tvb, foffset, 4, object_identifier);
2156 switch (object_identifier)
2159 foffset = objectidentifier(tvb, btree, foffset);
2160 foffset += align_4(tvb, foffset);
2164 number_of_items2 = tvb_get_ntohl(tvb, foffset);
2165 proto_tree_add_uint(btree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
2167 for (j = 1 ; j <= number_of_items2; j++ )
2169 if (j > NDPS_MAX_ITEMS) {
2170 proto_tree_add_text(btree, tvb, foffset, -1, "[Truncated]");
2173 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Item %u", j);
2174 ctree = proto_item_add_subtree(citem, ett_ndps);
2175 foffset = objectidentifier(tvb, ctree, foffset);
2176 foffset += align_4(tvb, foffset);
2177 proto_item_set_end(citem, tvb, foffset);
2181 proto_item_set_end(bitem, tvb, foffset);
2183 proto_item_set_end(aitem, tvb, foffset);
2189 cardinal_seq(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2191 guint32 number_of_items;
2197 number_of_items = tvb_get_ntohl(tvb, foffset);
2198 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2200 for (i = 1 ; i <= number_of_items; i++ )
2202 if (i > NDPS_MAX_ITEMS) {
2203 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2206 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Cardinal %u", i);
2207 atree = proto_item_add_subtree(aitem, ett_ndps);
2208 length = tvb_get_ntohl(tvb, foffset);
2212 tvb_ensure_bytes_exist(tvb, foffset, length);
2213 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
2216 foffset += (length%2);
2217 if ((int) foffset <= 0)
2218 THROW(ReportedBoundsError);
2219 proto_item_set_end(aitem, tvb, foffset);
2226 server_entry(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2228 char server_name[1024];
2229 guint32 number_of_items;
2237 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Server Info");
2238 atree = proto_item_add_subtree(aitem, ett_ndps);
2239 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, server_name, sizeof server_name);
2240 proto_item_append_text(aitem, ": %s", server_name);
2241 proto_tree_add_item(atree, hf_ndps_server_type, tvb, foffset, 4, FALSE);
2243 foffset = print_address(tvb, atree, foffset);
2244 number_of_items = tvb_get_ntohl(tvb, foffset);
2245 proto_tree_add_uint(atree, hf_ndps_num_servers, tvb, foffset, 4, number_of_items);
2247 for (i = 1 ; i <= number_of_items; i++ )
2249 if (i > NDPS_MAX_ITEMS) {
2250 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
2253 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Info %u", i);
2254 btree = proto_item_add_subtree(bitem, ett_ndps);
2255 data_type = tvb_get_ntohl(tvb, foffset);
2256 proto_tree_add_item(btree, hf_ndps_data_item_type, tvb, foffset, 4, FALSE);
2261 proto_tree_add_item(btree, hf_info_int, tvb, foffset, 1, FALSE);
2265 proto_tree_add_item(btree, hf_info_int16, tvb, foffset, 2, FALSE);
2269 proto_tree_add_item(btree, hf_info_int32, tvb, foffset, 4, FALSE);
2272 case 3: /* Boolean */
2273 proto_tree_add_item(btree, hf_info_boolean, tvb, foffset, 4, FALSE);
2276 case 4: /* String */
2278 foffset = ndps_string(tvb, hf_info_string, btree, foffset, NULL, 0);
2283 proto_item_set_end(bitem, tvb, foffset);
2285 proto_item_set_end(aitem, tvb, foffset);
2291 attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2295 guint32 number_of_items;
2296 guint32 number_of_items2;
2297 guint32 attribute_type;
2298 guint32 integer_or_oid;
2299 guint32 event_object_type;
2300 guint32 ignored_type;
2301 guint32 resource_type;
2302 guint32 identifier_type;
2303 guint32 criterion_type;
2304 guint32 card_enum_time;
2306 guint32 doc_content;
2308 guint32 medium_size;
2310 guint32 colorant_set;
2316 guint32 label_value;
2322 if (global_attribute_name==NULL)
2325 label = match_strval(label_value, object_ids_7);
2326 global_attribute_name = label;
2328 attribute_type = tvb_get_ntohl(tvb, foffset);
2331 proto_tree_add_item(ndps_tree, hf_obj_attribute_type, tvb, foffset, 4, FALSE);
2334 switch(attribute_type)
2337 proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), FALSE);
2340 case 2: /* Descriptive Name */
2341 case 3: /* Descriptor */
2342 case 6: /* Simple Name */
2343 case 40: /* Distinguished Name*/
2344 case 50: /* Font Reference */
2345 case 58: /* Locale */
2346 case 102: /* File Path */
2347 case 103: /* Uniform Resource Identifier */
2348 case 108: /* Extended Resource Identifier */
2349 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
2351 case 4: /* Message */
2352 case 5: /* Error Message */
2353 case 38: /* Name or OID */
2354 foffset = name_or_id(tvb, ndps_tree, foffset);
2356 case 39: /* Name or OID Seq */
2357 number_of_items = tvb_get_ntohl(tvb, foffset);
2358 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2360 for (i = 1 ; i <= number_of_items; i++ )
2362 if (i > NDPS_MAX_ITEMS) {
2363 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2366 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
2367 atree = proto_item_add_subtree(aitem, ett_ndps);
2368 foffset = name_or_id(tvb, atree, foffset);
2369 proto_item_set_end(aitem, tvb, foffset);
2372 case 7: /* Distinguished Name String*/
2373 case 79: /* File Reference */
2374 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
2375 foffset = name_or_id(tvb, ndps_tree, foffset);
2377 case 8: /* Distinguished Name String Seq */
2378 number_of_items = tvb_get_ntohl(tvb, foffset);
2379 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2381 for (i = 1 ; i <= number_of_items; i++ )
2383 if (i > NDPS_MAX_ITEMS) {
2384 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2387 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Name %u", i);
2388 atree = proto_item_add_subtree(aitem, ett_ndps);
2389 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
2390 foffset = name_or_id(tvb, atree, foffset);
2391 proto_item_set_end(aitem, tvb, foffset);
2394 case 9: /* Delta Time */
2396 case 11: /* Integer */
2397 case 13: /* Cardinal */
2398 case 15: /* Positive Integer */
2399 case 18: /* Maximum Integer */
2400 case 19: /* Minimum Integer */
2401 case 35: /* Percent */
2402 case 57: /* Job Priority */
2403 case 72: /* Sides */
2404 case 95: /* Enumeration */
2405 if (strcmp(global_attribute_name,"(Novell) Attribute PRINTER SECURITY LEVEL")==0)
2407 proto_tree_add_item(ndps_tree, hf_print_security, tvb, foffset, 4, FALSE);
2412 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2416 case 12: /* Integer Seq */
2417 case 14: /* Cardinal Seq */
2418 length = tvb_get_ntohl(tvb, foffset);
2422 tvb_ensure_bytes_exist(tvb, foffset, length);
2423 proto_tree_add_item(ndps_tree, hf_info_int32, tvb, foffset, length, FALSE);
2427 case 16: /* Integer Range */
2428 case 17: /* Cardinal Range */
2429 proto_tree_add_item(ndps_tree, hf_ndps_lower_range, tvb, foffset, 4, FALSE);
2431 proto_tree_add_item(ndps_tree, hf_ndps_upper_range, tvb, foffset, 4, FALSE);
2434 case 20: /* Integer 64 */
2435 case 22: /* Cardinal 64 */
2436 case 24: /* Positive Integer 64 */
2437 case 31: /* Non-Negative Real */
2439 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2442 case 21: /* Integer 64 Seq */
2443 case 23: /* Cardinal 64 Seq */
2444 case 30: /* Real Seq */
2445 number_of_items = tvb_get_ntohl(tvb, foffset);
2446 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2448 for (i = 1 ; i <= number_of_items; i++ )
2450 if (i > NDPS_MAX_ITEMS) {
2451 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2454 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %u", i);
2455 atree = proto_item_add_subtree(aitem, ett_ndps);
2456 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2458 proto_item_set_end(aitem, tvb, foffset);
2461 case 25: /* Integer 64 Range */
2462 case 26: /* Cardinal 64 Range */
2463 case 32: /* Real Range */
2464 case 33: /* Non-Negative Real Range */
2465 proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
2467 proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
2470 case 27: /* Maximum Integer 64 */
2471 proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
2474 case 28: /* Minimum Integer 64 */
2475 proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
2478 case 34: /* Boolean */
2479 proto_tree_add_item(ndps_tree, hf_ndps_attrib_boolean, tvb, foffset, 4, FALSE);
2482 case 36: /* Object Identifier */
2483 foffset = objectidentifier(tvb, ndps_tree, foffset);
2485 case 37: /* Object Identifier Seq */
2486 number_of_items = tvb_get_ntohl(tvb, foffset);
2487 proto_tree_add_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
2489 for (i = 1 ; i <= number_of_items; i++ )
2491 if (i > NDPS_MAX_ITEMS) {
2492 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2495 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object %d", i);
2496 atree = proto_item_add_subtree(aitem, ett_ndps);
2497 foffset = objectidentifier(tvb, atree, foffset);
2498 proto_item_set_end(aitem, tvb, foffset);
2501 case 41: /* Relative Distinguished Name Seq */
2502 number_of_items = tvb_get_ntohl(tvb, foffset);
2503 proto_tree_add_uint(ndps_tree, hf_ndps_num_names, tvb, foffset, 4, number_of_items);
2505 for (i = 1 ; i <= number_of_items; i++ )
2507 if (i > NDPS_MAX_ITEMS) {
2508 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2511 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Name %u", i);
2512 atree = proto_item_add_subtree(aitem, ett_ndps);
2513 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
2514 proto_item_set_end(aitem, tvb, foffset);
2517 case 42: /* Realization */
2518 proto_tree_add_item(ndps_tree, hf_ndps_realization, tvb, foffset, 4, FALSE);
2521 case 43: /* Medium Dimensions */
2522 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
2524 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
2527 case 44: /* Dimension */
2528 dimension = tvb_get_ntohl(tvb, foffset);
2529 proto_tree_add_uint(ndps_tree, hf_ndps_dim_value, tvb, foffset, 4, dimension);
2531 if (dimension == 0) {
2532 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2537 foffset = name_or_id(tvb, ndps_tree, foffset);
2539 proto_tree_add_item(ndps_tree, hf_ndps_dim_flag, tvb, foffset, 4, FALSE);
2541 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2544 case 45: /* XY Dimensions */
2545 dimension = tvb_get_ntohl(tvb, foffset);
2546 proto_tree_add_uint(ndps_tree, hf_ndps_xydim_value, tvb, foffset, 4, dimension);
2548 if (dimension == 1) {
2549 foffset = name_or_id(tvb, ndps_tree, foffset);
2553 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
2555 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
2558 proto_tree_add_item(ndps_tree, hf_ndps_dim_flag, tvb, foffset, 4, FALSE);
2560 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2563 case 46: /* Locations */
2564 location = tvb_get_ntohl(tvb, foffset);
2565 proto_tree_add_uint(ndps_tree, hf_ndps_location_value, tvb, foffset, 4, location);
2567 if (location == 0) {
2568 number_of_items = tvb_get_ntohl(tvb, foffset);
2569 proto_tree_add_uint(ndps_tree, hf_ndps_num_locations, tvb, foffset, 4, number_of_items);
2571 for (i = 1 ; i <= number_of_items; i++ )
2573 if (i > NDPS_MAX_ITEMS) {
2574 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2577 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Location %u", i);
2578 atree = proto_item_add_subtree(aitem, ett_ndps);
2579 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2581 proto_item_set_end(aitem, tvb, foffset);
2586 foffset = name_or_id(tvb, ndps_tree, foffset);
2588 proto_tree_add_item(ndps_tree, hf_ndps_dim_flag, tvb, foffset, 4, FALSE);
2590 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2594 proto_tree_add_item(ndps_tree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
2596 proto_tree_add_item(ndps_tree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
2598 proto_tree_add_item(ndps_tree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
2600 proto_tree_add_item(ndps_tree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
2603 case 48: /* Area Seq */
2604 number_of_items = tvb_get_ntohl(tvb, foffset);
2605 proto_tree_add_uint(ndps_tree, hf_ndps_num_areas, tvb, foffset, 4, number_of_items);
2607 for (i = 1 ; i <= number_of_items; i++ )
2609 if (i > NDPS_MAX_ITEMS) {
2610 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2613 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Area %u", i);
2614 atree = proto_item_add_subtree(aitem, ett_ndps);
2615 proto_tree_add_item(atree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
2617 proto_tree_add_item(atree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
2619 proto_tree_add_item(atree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
2621 proto_tree_add_item(atree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
2623 proto_item_set_end(aitem, tvb, foffset);
2627 proto_tree_add_item(ndps_tree, hf_ndps_edge_value, tvb, foffset, 4, FALSE);
2630 case 51: /* Cardinal or OID */
2631 cardinal = tvb_get_ntohl(tvb, foffset);
2632 proto_tree_add_uint(ndps_tree, hf_ndps_cardinal_or_oid, tvb, foffset, 4, cardinal);
2635 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2640 foffset = objectidentifier(tvb, ndps_tree, foffset);
2643 case 52: /* OID Cardinal Map */
2644 foffset = objectidentifier(tvb, ndps_tree, foffset);
2645 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2648 case 53: /* Cardinal or Name or OID */
2649 cardinal = tvb_get_ntohl(tvb, foffset);
2650 proto_tree_add_uint(ndps_tree, hf_ndps_cardinal_name_or_oid, tvb, foffset, 4, cardinal);
2653 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2658 foffset = name_or_id(tvb, ndps_tree, foffset);
2661 case 54: /* Positive Integer or OID */
2662 integer_or_oid = tvb_get_ntohl(tvb, foffset);
2663 proto_tree_add_uint(ndps_tree, hf_ndps_integer_or_oid, tvb, foffset, 4, integer_or_oid);
2665 if (integer_or_oid==0) {
2666 foffset = objectidentifier(tvb, ndps_tree, foffset);
2670 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2674 case 55: /* Event Handling Profile */
2675 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
2677 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
2679 foffset = qualifiedname(tvb, ndps_tree, foffset);
2680 length = tvb_get_ntohl(tvb, foffset);
2684 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
2687 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
2689 foffset = name_or_id(tvb, ndps_tree, foffset);
2691 number_of_items = tvb_get_ntohl(tvb, foffset);
2692 proto_tree_add_uint(ndps_tree, hf_ndps_num_address_items, tvb, foffset, 4, number_of_items);
2694 for (i = 1 ; i <= number_of_items; i++ )
2696 if (i > NDPS_MAX_ITEMS) {
2697 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2700 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Address Item %u", i);
2701 atree = proto_item_add_subtree(aitem, ett_ndps);
2702 foffset = address_item(tvb, atree, foffset);
2703 proto_item_set_end(aitem, tvb, foffset);
2705 number_of_items = tvb_get_ntohl(tvb, foffset);
2706 proto_tree_add_uint(ndps_tree, hf_ndps_num_events, tvb, foffset, 4, number_of_items);
2708 for (i = 1 ; i <= number_of_items; i++ )
2710 if (i > NDPS_MAX_ITEMS) {
2711 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2714 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event %u", i);
2715 atree = proto_item_add_subtree(aitem, ett_ndps);
2716 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
2718 foffset = objectidentifier(tvb, atree, foffset);
2719 foffset += align_4(tvb, foffset);
2720 foffset = objectidentification(tvb, atree, foffset);
2721 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
2723 event_object_type = tvb_get_ntohl(tvb, foffset);
2724 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, event_object_type);
2726 switch (event_object_type)
2729 /* Number of Objects */
2730 number_of_items2 = tvb_get_ntohl(tvb, foffset);
2731 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items2);
2733 for (j = 1 ; j <= number_of_items2; j++ )
2735 if (j > NDPS_MAX_ITEMS) {
2736 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
2739 foffset = objectidentifier(tvb, atree, foffset);
2745 foffset = objectidentifier(tvb, atree, foffset);
2749 number_of_items2 = tvb_get_ntohl(tvb, foffset);
2750 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items2);
2752 for (j = 1 ; j <= number_of_items2; j++ )
2754 if (j > NDPS_MAX_ITEMS) {
2755 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
2758 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object %u", i);
2759 btree = proto_item_add_subtree(bitem, ett_ndps);
2760 foffset = objectidentifier(tvb, btree, foffset);
2761 proto_item_set_end(bitem, tvb, foffset);
2765 proto_item_set_end(aitem, tvb, foffset);
2768 case 56: /* Octet String */
2769 case 63: /* Job Password */
2770 case 66: /* Print Checkpoint */
2771 foffset = ndps_string(tvb, hf_info_string, ndps_tree, foffset, NULL, 0);
2773 case 59: /* Method Delivery Address */
2774 proto_tree_add_item(ndps_tree, hf_ndps_delivery_add_type, tvb, foffset, 4, FALSE);
2775 event_object_type = tvb_get_ntohl(tvb, foffset);
2777 switch(event_object_type)
2779 case 0: /*MHS ADDR*/
2780 case 1: /*DISTINGUISHED_NAME*/
2782 case 3: /*OCTET_STRING*/
2783 foffset = ndps_string(tvb, hf_info_string, ndps_tree, foffset, NULL, 0);
2785 case 4: /*DIST_NAME_STRING*/
2786 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
2787 foffset = name_or_id(tvb, ndps_tree, foffset);
2789 case 5: /*RPC_ADDRESS*/
2790 case 6: /*QUALIFIED_NAME*/
2791 foffset = objectidentifier(tvb, ndps_tree, foffset);
2792 foffset = qualifiedname(tvb, ndps_tree, foffset);
2798 case 60: /* Object Identification */
2799 foffset = objectidentification(tvb, ndps_tree, foffset);
2801 case 61: /* Results Profile */
2802 foffset = objectidentifier(tvb, ndps_tree, foffset);
2803 foffset = name_or_id(tvb, ndps_tree, foffset);
2804 foffset = address_item(tvb, ndps_tree, foffset);
2805 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2807 foffset = name_or_id(tvb, ndps_tree, foffset);
2809 case 62: /* Criteria */
2810 foffset = objectidentifier(tvb, ndps_tree, foffset);
2811 criterion_type = tvb_get_ntohl(tvb, foffset);
2812 proto_tree_add_uint(ndps_tree, hf_ndps_criterion_type, tvb, foffset, 4, criterion_type);
2814 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2817 case 64: /* Job Level */
2818 foffset = objectidentifier(tvb, ndps_tree, foffset);
2819 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2822 case 65: /* Job Categories */
2823 foffset = objectidentifier(tvb, ndps_tree, foffset);
2824 number_of_items = tvb_get_ntohl(tvb, foffset);
2825 proto_tree_add_uint(ndps_tree, hf_ndps_num_job_categories, tvb, foffset, 4, number_of_items);
2827 for (i = 1 ; i <= number_of_items; i++ )
2829 if (i > NDPS_MAX_ITEMS) {
2830 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2833 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job %u", i);
2834 atree = proto_item_add_subtree(aitem, ett_ndps);
2835 length = tvb_get_ntohl(tvb, foffset);
2839 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
2842 foffset += (length%2);
2843 if ((int) foffset <= 0)
2844 THROW(ReportedBoundsError);
2845 proto_item_set_end(aitem, tvb, foffset);
2848 case 67: /* Ignored Attribute */
2849 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2851 foffset = objectidentifier(tvb, ndps_tree, foffset);
2852 number_of_items = tvb_get_ntohl(tvb, foffset);
2853 proto_tree_add_uint(ndps_tree, hf_ndps_num_ignored_attributes, tvb, foffset, 4, number_of_items);
2855 for (i = 1 ; i <= number_of_items; i++ )
2857 if (i > NDPS_MAX_ITEMS) {
2858 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2861 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Ignored Attribute %u", i);
2862 atree = proto_item_add_subtree(aitem, ett_ndps);
2863 ignored_type = tvb_get_ntohl(tvb, foffset);
2864 proto_tree_add_uint(atree, hf_ndps_ignored_type, tvb, foffset, 4, ignored_type);
2866 if (ignored_type == 38)
2868 foffset = name_or_id(tvb, atree, foffset);
2872 foffset = objectidentifier(tvb, atree, foffset);
2874 proto_item_set_end(aitem, tvb, foffset);
2877 case 68: /* Resource */
2878 resource_type = tvb_get_ntohl(tvb, foffset);
2879 proto_tree_add_uint(ndps_tree, hf_ndps_resource_type, tvb, foffset, 4, resource_type);
2881 if (resource_type == 0)
2883 foffset = name_or_id(tvb, ndps_tree, foffset);
2887 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
2890 case 69: /* Medium Substitution */
2891 foffset = name_or_id(tvb, ndps_tree, foffset);
2892 foffset = name_or_id(tvb, ndps_tree, foffset);
2894 case 70: /* Font Substitution */
2895 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
2896 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
2898 case 71: /* Resource Context Seq */
2899 number_of_items = tvb_get_ntohl(tvb, foffset);
2900 proto_tree_add_uint(ndps_tree, hf_ndps_num_resources, tvb, foffset, 4, number_of_items);
2902 for (i = 1 ; i <= number_of_items; i++ )
2904 if (i > NDPS_MAX_ITEMS) {
2905 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2908 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Resource %u", i);
2909 atree = proto_item_add_subtree(aitem, ett_ndps);
2910 resource_type = tvb_get_ntohl(tvb, foffset);
2911 proto_tree_add_uint(atree, hf_ndps_resource_type, tvb, foffset, 4, resource_type);
2913 if (resource_type == 0)
2915 foffset = name_or_id(tvb, atree, foffset);
2919 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL, 0);
2921 proto_item_set_end(aitem, tvb, foffset);
2924 case 73: /* Page Select Seq */
2925 number_of_items = tvb_get_ntohl(tvb, foffset);
2926 proto_tree_add_uint(ndps_tree, hf_ndps_num_page_selects, tvb, foffset, 4, number_of_items);
2928 for (i = 1 ; i <= number_of_items; i++ )
2930 if (i > NDPS_MAX_ITEMS) {
2931 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2934 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Page Select %u", i);
2935 atree = proto_item_add_subtree(aitem, ett_ndps);
2936 proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, FALSE);
2938 identifier_type = tvb_get_ntohl(tvb, foffset);
2939 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
2941 if (identifier_type == 0)
2943 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2946 if (identifier_type == 1)
2948 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL, 0);
2950 if (identifier_type == 2)
2952 foffset = name_or_id(tvb, atree, foffset);
2954 proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, FALSE);
2956 identifier_type = tvb_get_ntohl(tvb, foffset);
2957 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
2959 if (identifier_type == 0)
2961 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2964 if (identifier_type == 1)
2966 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL, 0);
2968 if (identifier_type == 2)
2970 foffset = name_or_id(tvb, atree, foffset);
2972 proto_item_set_end(aitem, tvb, foffset);
2975 case 74: /* Page Media Select */
2976 media_type = tvb_get_ntohl(tvb, foffset);
2977 proto_tree_add_uint(ndps_tree, hf_ndps_media_type, tvb, foffset, 4, media_type);
2979 if (media_type == 0)
2981 foffset = name_or_id(tvb, ndps_tree, foffset);
2985 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
2986 number_of_items = tvb_get_ntohl(tvb, foffset);
2987 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2989 for (i = 1 ; i <= number_of_items; i++ )
2991 if (i > NDPS_MAX_ITEMS) {
2992 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
2995 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %u", i);
2996 atree = proto_item_add_subtree(aitem, ett_ndps);
2997 proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, FALSE);
2999 identifier_type = tvb_get_ntohl(tvb, foffset);
3000 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
3002 if (identifier_type == 0)
3004 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3007 if (identifier_type == 1)
3009 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL, 0);
3011 if (identifier_type == 2)
3013 foffset = name_or_id(tvb, atree, foffset);
3015 proto_item_set_end(aitem, tvb, foffset);
3019 case 75: /* Document Content */
3020 doc_content = tvb_get_ntohl(tvb, foffset);
3021 proto_tree_add_uint(ndps_tree, hf_ndps_doc_content, tvb, foffset, 4, doc_content);
3023 if (doc_content == 0)
3025 length = tvb_get_ntohl(tvb, foffset);
3029 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
3032 foffset += (length%2);
3033 if ((int) foffset <= 0)
3034 THROW(ReportedBoundsError);
3038 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
3039 foffset = name_or_id(tvb, ndps_tree, foffset);
3042 case 76: /* Page Size */
3043 page_size = tvb_get_ntohl(tvb, foffset);
3044 proto_tree_add_uint(ndps_tree, hf_ndps_page_size, tvb, foffset, 4, page_size);
3048 foffset = objectidentifier(tvb, ndps_tree, foffset);
3052 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
3054 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
3058 case 77: /* Presentation Direction */
3059 proto_tree_add_item(ndps_tree, hf_ndps_direction, tvb, foffset, 4, FALSE);
3062 case 78: /* Page Order */
3063 proto_tree_add_item(ndps_tree, hf_ndps_page_order, tvb, foffset, 4, FALSE);
3066 case 80: /* Medium Source Size */
3067 foffset = name_or_id(tvb, ndps_tree, foffset);
3068 medium_size = tvb_get_ntohl(tvb, foffset);
3069 proto_tree_add_uint(ndps_tree, hf_ndps_medium_size, tvb, foffset, 4, medium_size);
3071 if (medium_size == 0)
3073 page_size = tvb_get_ntohl(tvb, foffset);
3074 proto_tree_add_uint(ndps_tree, hf_ndps_page_size, tvb, foffset, 4, page_size);
3078 foffset = objectidentifier(tvb, ndps_tree, foffset);
3082 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
3084 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
3087 proto_tree_add_item(ndps_tree, hf_ndps_long_edge_feeds, tvb, foffset, 4, FALSE);
3089 proto_tree_add_item(ndps_tree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
3091 proto_tree_add_item(ndps_tree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
3093 proto_tree_add_item(ndps_tree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
3095 proto_tree_add_item(ndps_tree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
3100 proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
3102 proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
3104 proto_tree_add_item(ndps_tree, hf_ndps_inc_across_feed, tvb, foffset, 8, FALSE);
3106 proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
3108 proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
3110 proto_tree_add_item(ndps_tree, hf_ndps_size_inc_in_feed, tvb, foffset, 8, FALSE);
3112 proto_tree_add_item(ndps_tree, hf_ndps_long_edge_feeds, tvb, foffset, 4, FALSE);
3114 proto_tree_add_item(ndps_tree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
3116 proto_tree_add_item(ndps_tree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
3118 proto_tree_add_item(ndps_tree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
3120 proto_tree_add_item(ndps_tree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
3124 case 81: /* Input Tray Medium */
3125 foffset = name_or_id(tvb, ndps_tree, foffset);
3126 foffset = name_or_id(tvb, ndps_tree, foffset);
3128 case 82: /* Output Bins Characteristics */
3129 number_of_items = tvb_get_ntohl(tvb, foffset);
3130 proto_tree_add_uint(ndps_tree, hf_ndps_num_page_informations, tvb, foffset, 4, number_of_items);
3132 for (i = 1 ; i <= number_of_items; i++ )
3134 if (i > NDPS_MAX_ITEMS) {
3135 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
3138 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Page Information %u", i);
3139 atree = proto_item_add_subtree(aitem, ett_ndps);
3140 proto_tree_add_item(atree, hf_ndps_page_order, tvb, foffset, 4, FALSE);
3142 proto_tree_add_item(atree, hf_ndps_page_orientation, tvb, foffset, 4, FALSE);
3144 proto_item_set_end(aitem, tvb, foffset);
3147 case 83: /* Page ID Type */
3148 proto_tree_add_item(ndps_tree, hf_ndps_identifier_type, tvb, foffset, 4, FALSE);
3151 case 84: /* Level Range */
3152 foffset = objectidentifier(tvb, ndps_tree, foffset);
3153 proto_tree_add_item(ndps_tree, hf_ndps_lower_range, tvb, foffset, 4, FALSE);
3155 proto_tree_add_item(ndps_tree, hf_ndps_upper_range, tvb, foffset, 4, FALSE);
3158 case 85: /* Category Set */
3159 foffset = objectidentifier(tvb, ndps_tree, foffset);
3160 number_of_items = tvb_get_ntohl(tvb, foffset);
3161 proto_tree_add_uint(ndps_tree, hf_ndps_num_categories, tvb, foffset, 4, number_of_items);
3163 for (i = 1 ; i <= number_of_items; i++ )
3165 if (i > NDPS_MAX_ITEMS) {
3166 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
3169 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Category %u", i);
3170 atree = proto_item_add_subtree(aitem, ett_ndps);
3171 length = tvb_get_ntohl(tvb, foffset);
3175 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
3178 foffset += (length%2);
3179 if ((int) foffset <= 0)
3180 THROW(ReportedBoundsError);
3182 number_of_items = tvb_get_ntohl(tvb, foffset);
3183 proto_tree_add_uint(ndps_tree, hf_ndps_num_values, tvb, foffset, 4, number_of_items);
3185 for (i = 1 ; i <= number_of_items; i++ )
3187 if (i > NDPS_MAX_ITEMS) {
3188 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
3191 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Value %d", i);
3192 atree = proto_item_add_subtree(aitem, ett_ndps);
3193 length = tvb_get_ntohl(tvb, foffset);
3197 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
3200 foffset += (length%2);
3201 if ((int) foffset <= 0)
3202 THROW(ReportedBoundsError);
3203 proto_item_set_end(aitem, tvb, foffset);
3206 case 86: /* Numbers Up Supported */
3207 numbers_up=tvb_get_ntohl(tvb, foffset);
3208 proto_tree_add_uint(ndps_tree, hf_ndps_numbers_up, tvb, foffset, 4, numbers_up);
3212 case 0: /*Cardinal*/
3213 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3216 case 1: /*Name or OID*/
3217 foffset = name_or_id(tvb, ndps_tree, foffset);
3219 case 2: /*Cardinal Range*/
3220 proto_tree_add_item(ndps_tree, hf_ndps_lower_range, tvb, foffset, 4, FALSE);
3222 proto_tree_add_item(ndps_tree, hf_ndps_upper_range, tvb, foffset, 4, FALSE);
3229 case 87: /* Finishing */
3230 case 88: /* Print Contained Object ID */
3231 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
3232 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3235 case 89: /* Print Config Object ID */
3236 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
3237 foffset = qualifiedname(tvb, ndps_tree, foffset);
3239 case 90: /* Typed Name */
3240 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
3241 proto_tree_add_item(ndps_tree, hf_level, tvb, foffset, 4, FALSE);
3243 proto_tree_add_item(ndps_tree, hf_interval, tvb, foffset, 4, FALSE);
3246 case 91: /* Network Address */
3247 proto_tree_add_item(ndps_tree, hf_ndps_address, tvb, foffset, 4, FALSE);
3249 length = tvb_get_ntohl(tvb, foffset);
3253 proto_tree_add_item(ndps_tree, hf_ndps_add_bytes, tvb, foffset, 4, FALSE);
3257 case 92: /* XY Dimensions Value */
3258 dimension = tvb_get_ntohl(tvb, foffset);
3259 proto_tree_add_uint(ndps_tree, hf_ndps_xydim_value, tvb, foffset, 4, dimension);
3264 foffset = name_or_id(tvb, ndps_tree, foffset);
3268 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
3270 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
3275 proto_tree_add_item(ndps_tree, hf_ndps_xdimension, tvb, foffset, 4, FALSE);
3277 proto_tree_add_item(ndps_tree, hf_ndps_ydimension, tvb, foffset, 4, FALSE);
3282 case 93: /* Name or OID Dimensions Map */
3283 foffset = name_or_id(tvb, ndps_tree, foffset);
3284 proto_tree_add_item(ndps_tree, hf_ndps_xdimension, tvb, foffset, 4, FALSE);
3286 proto_tree_add_item(ndps_tree, hf_ndps_ydimension, tvb, foffset, 4, FALSE);
3289 case 94: /* Printer State Reason */
3291 foffset = name_or_id(tvb, ndps_tree, foffset);
3292 proto_tree_add_item(ndps_tree, hf_ndps_state_severity, tvb, foffset, 4, FALSE);
3294 proto_tree_add_item(ndps_tree, hf_ndps_training, tvb, foffset, 4, FALSE);
3296 foffset = objectidentifier(tvb, ndps_tree, foffset);
3297 foffset += align_4(tvb, foffset);
3298 foffset = objectidentification(tvb, ndps_tree, foffset);
3299 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3301 foffset = name_or_id(tvb, ndps_tree, foffset);
3303 case 96: /* Qualified Name */
3304 foffset = qualifiedname(tvb, ndps_tree, foffset);
3306 case 97: /* Qualified Name Set */
3307 number_of_items = tvb_get_ntohl(tvb, foffset);
3308 proto_tree_add_uint(ndps_tree, hf_ndps_num_names, tvb, foffset, 4, number_of_items);
3310 for (i = 1 ; i <= number_of_items; i++ )
3312 if (i > NDPS_MAX_ITEMS) {
3313 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
3316 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Name %u", i);
3317 atree = proto_item_add_subtree(aitem, ett_ndps);
3318 foffset = qualifiedname(tvb, atree, foffset);
3319 proto_item_set_end(aitem, tvb, foffset);
3322 case 98: /* Colorant Set */
3323 colorant_set = tvb_get_ntohl(tvb, foffset);
3324 proto_tree_add_item(ndps_tree, hf_ndps_colorant_set, tvb, foffset, 4, FALSE);
3326 if (colorant_set==0)
3328 foffset = name_or_id(tvb, ndps_tree, foffset);
3333 foffset = objectidentifier(tvb, ndps_tree, foffset);
3334 number_of_items = tvb_get_ntohl(tvb, foffset);
3335 proto_tree_add_uint(ndps_tree, hf_ndps_num_colorants, tvb, foffset, 4, number_of_items);
3337 for (i = 1 ; i <= number_of_items; i++ )
3339 if (i > NDPS_MAX_ITEMS) {
3340 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
3343 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Colorant %u", i);
3344 atree = proto_item_add_subtree(aitem, ett_ndps);
3345 foffset = name_or_id(tvb, atree, foffset);
3346 proto_item_set_end(aitem, tvb, foffset);
3350 case 99: /* Resource Printer ID */
3351 number_of_items = tvb_get_ntohl(tvb, foffset);
3352 proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items);
3354 for (i = 1 ; i <= number_of_items; i++ )
3356 if (i > NDPS_MAX_ITEMS) {
3357 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
3360 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Printer %u", i);
3361 atree = proto_item_add_subtree(aitem, ett_ndps);
3362 foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL, 0);
3363 foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL, 0);
3364 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL, 0);
3365 proto_item_set_end(aitem, tvb, foffset);
3367 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
3370 case 100: /* Event Object ID */
3371 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
3372 foffset = objectidentifier(tvb, ndps_tree, foffset);
3373 proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
3376 case 101: /* Qualified Name Map */
3377 foffset = qualifiedname(tvb, ndps_tree, foffset);
3378 foffset = qualifiedname(tvb, ndps_tree, foffset);
3380 case 104: /* Cardinal or Enum or Time */
3381 card_enum_time = tvb_get_ntohl(tvb, foffset);
3382 proto_tree_add_item(ndps_tree, hf_ndps_card_enum_time, tvb, foffset, 4, FALSE);
3384 switch (card_enum_time)
3387 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3392 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3397 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3402 case 105: /* Print Contained Object ID Set */
3403 number_of_items = tvb_get_ntohl(tvb, foffset);
3404 proto_tree_add_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
3406 for (i = 1 ; i <= number_of_items; i++ )
3408 if (i > NDPS_MAX_ITEMS) {
3409 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
3412 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object %u", i);
3413 atree = proto_item_add_subtree(aitem, ett_ndps);
3414 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
3415 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3417 proto_item_set_end(aitem, tvb, foffset);
3420 case 106: /* Octet String Pair */
3421 length = tvb_get_ntohl(tvb, foffset);
3425 tvb_ensure_bytes_exist(tvb, foffset, length);
3426 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
3429 foffset += (length%2);
3430 length = tvb_get_ntohl(tvb, foffset);
3434 tvb_ensure_bytes_exist(tvb, foffset, length);
3435 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
3438 foffset += (length%2);
3439 if ((int) foffset <= 0)
3440 THROW(ReportedBoundsError);
3442 case 107: /* Octet String Integer Pair */
3443 length = tvb_get_ntohl(tvb, foffset);
3447 tvb_ensure_bytes_exist(tvb, foffset, length);
3448 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
3451 foffset += (length%2);
3452 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3454 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3457 case 109: /* Event Handling Profile 2 */
3458 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3460 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
3462 foffset = qualifiedname(tvb, ndps_tree, foffset);
3463 length = tvb_get_ntohl(tvb, foffset);
3467 tvb_ensure_bytes_exist(tvb, foffset, length);
3468 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
3471 foffset += (length%2);
3472 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3474 foffset = name_or_id(tvb, ndps_tree, foffset);
3475 proto_tree_add_item(ndps_tree, hf_ndps_delivery_add_type, tvb, foffset, 4, FALSE);
3476 event_object_type = tvb_get_ntohl(tvb, foffset);
3478 switch(event_object_type)
3480 case 0: /*MHS ADDR*/
3481 case 1: /*DISTINGUISHED_NAME*/
3483 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
3485 case 3: /*OCTET_STRING*/
3486 length = tvb_get_ntohl(tvb, foffset);
3490 tvb_ensure_bytes_exist(tvb, foffset, length);
3491 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
3494 foffset += (length%2);
3495 if ((int) foffset <= 0)
3496 THROW(ReportedBoundsError);
3498 case 4: /*DIST_NAME_STRING*/
3499 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
3500 foffset = name_or_id(tvb, ndps_tree, foffset);
3502 case 5: /*RPC_ADDRESS*/
3503 case 6: /*QUALIFIED_NAME*/
3504 foffset = objectidentifier(tvb, ndps_tree, foffset);
3505 foffset = qualifiedname(tvb, ndps_tree, foffset);
3510 number_of_items = tvb_get_ntohl(tvb, foffset);
3511 proto_tree_add_uint(ndps_tree, hf_ndps_num_events, tvb, foffset, 4, number_of_items);
3513 for (i = 1 ; i <= number_of_items; i++ )
3515 if (i > NDPS_MAX_ITEMS) {
3516 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
3519 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event %u", i);
3520 atree = proto_item_add_subtree(aitem, ett_ndps);
3521 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
3522 foffset = objectidentifier(tvb, atree, foffset);
3523 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
3525 proto_item_set_end(aitem, tvb, foffset);
3527 foffset = objectidentifier(tvb, ndps_tree, foffset);
3528 foffset = qualifiedname(tvb, ndps_tree, foffset);
3529 number_of_items = tvb_get_ntohl(tvb, foffset);
3530 proto_tree_add_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
3532 for (i = 1 ; i <= number_of_items; i++ )
3534 if (i > NDPS_MAX_ITEMS) {
3535 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
3538 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object %u", i);
3539 atree = proto_item_add_subtree(aitem, ett_ndps);
3540 foffset = objectidentifier(tvb, atree, foffset);
3541 proto_item_set_end(aitem, tvb, foffset);
3543 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3545 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3547 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3549 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
3559 commonarguments(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
3561 guint32 number_of_items;
3568 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Common Arguments");
3569 atree = proto_item_add_subtree(aitem, ett_ndps);
3570 number_of_items = tvb_get_ntohl(tvb, foffset);
3571 proto_tree_add_uint(atree, hf_ndps_num_args, tvb, foffset, 4, number_of_items);
3573 for (i = 1 ; i <= number_of_items; i++ )
3575 if (i > NDPS_MAX_ITEMS) {
3576 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
3579 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Argument %u", i);
3580 btree = proto_item_add_subtree(bitem, ett_ndps);
3581 foffset = attribute_value(tvb, atree, foffset);
3582 proto_item_set_end(bitem, tvb, foffset);
3584 proto_item_set_end(aitem, tvb, foffset);
3589 res_add_input_data(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
3591 guint32 resource_type=0;
3593 resource_type = tvb_get_ntohl(tvb, foffset);
3594 proto_tree_add_uint(ndps_tree, hf_res_type, tvb, foffset, 4, resource_type);
3596 switch (resource_type)
3598 case 0: /* Print Drivers */
3599 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
3601 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL, 0);
3602 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
3604 case 1: /* Printer Definitions */
3605 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL, 0);
3606 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
3608 case 2: /* Banner Page Files */
3609 foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset, NULL, 0);
3611 case 3: /* Font Types */
3612 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
3614 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
3616 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
3618 case 4: /* Generic Files/ Archive */
3619 case 5: /* Printer Driver Archive */
3620 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
3622 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL, 0);
3623 proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
3633 static const fragment_items ndps_frag_items = {
3638 &hf_ndps_segment_overlap,
3639 &hf_ndps_segment_overlap_conflict,
3640 &hf_ndps_segment_multiple_tails,
3641 &hf_ndps_segment_too_long_segment,
3642 &hf_ndps_segment_error,
3647 static dissector_handle_t ndps_data_handle;
3649 /* NDPS packets come in request/reply pairs. The request packets tell the
3650 * Function and Program numbers. The response, unfortunately, only
3651 * identifies itself via the Exchange ID; you have to know what type of NDPS
3652 * request the request packet contained in order to successfully parse the
3653 * response. A global method for doing this does not exist in ethereal yet
3654 * (NFS also requires it), so for now the NDPS section will keep its own hash
3655 * table keeping track of NDPS packets.
3657 * We construct a conversation specified by the client and server
3658 * addresses and the connection number; the key representing the unique
3659 * NDPS request then is composed of the pointer to the conversation
3660 * structure, cast to a "guint" (which may throw away the upper 32
3661 * bits of the pointer on a P64 platform, but the low-order 32 bits
3662 * are more likely to differ between conversations than the upper 32 bits),
3663 * and the sequence number.
3665 * The value stored in the hash table is the ncp_req_hash_value pointer. This
3666 * struct tells us the NDPS Program and Function and gives the NDPS_record pointer.
3669 conversation_t *conversation;
3671 } ndps_req_hash_key;
3676 guint32 ndps_frame_num;
3678 guint32 ndps_end_frag;
3679 } ndps_req_hash_value;
3681 static GHashTable *ndps_req_hash = NULL;
3682 static GMemChunk *ndps_req_hash_keys = NULL;
3683 static GMemChunk *ndps_req_hash_values = NULL;
3685 /* Hash Functions */
3687 ndps_equal(gconstpointer v, gconstpointer v2)
3689 const ndps_req_hash_key *val1 = (const ndps_req_hash_key*)v;
3690 const ndps_req_hash_key *val2 = (const ndps_req_hash_key*)v2;
3692 if (val1->conversation == val2->conversation &&
3693 val1->ndps_xport == val2->ndps_xport ) {
3700 ndps_hash(gconstpointer v)
3702 const ndps_req_hash_key *ndps_key = (const ndps_req_hash_key*)v;
3703 return GPOINTER_TO_UINT(ndps_key->conversation) + ndps_key->ndps_xport;
3706 /* Initializes the hash table and the mem_chunk area each time a new
3707 * file is loaded or re-loaded in ethereal */
3709 ndps_init_protocol(void)
3712 fragment_table_init(&ndps_fragment_table);
3713 reassembled_table_init(&ndps_reassembled_table);
3716 g_hash_table_destroy(ndps_req_hash);
3717 if (ndps_req_hash_keys)
3718 g_mem_chunk_destroy(ndps_req_hash_keys);
3719 if (ndps_req_hash_values)
3720 g_mem_chunk_destroy(ndps_req_hash_values);
3722 ndps_req_hash = g_hash_table_new(ndps_hash, ndps_equal);
3723 ndps_req_hash_keys = g_mem_chunk_new("ndps_req_hash_keys",
3724 sizeof(ndps_req_hash_key),
3725 NDPS_PACKET_INIT_COUNT * sizeof(ndps_req_hash_key),
3727 ndps_req_hash_values = g_mem_chunk_new("ndps_req_hash_values",
3728 sizeof(ndps_req_hash_value),
3729 NDPS_PACKET_INIT_COUNT * sizeof(ndps_req_hash_value),
3733 /* After the sequential run, we don't need the ncp_request hash and keys
3734 * anymore; the lookups have already been done and the vital info
3735 * saved in the reply-packets' private_data in the frame_data struct. */
3737 ndps_postseq_cleanup(void)
3739 if (ndps_req_hash) {
3740 /* Destroy the hash, but don't clean up request_condition data. */
3741 g_hash_table_destroy(ndps_req_hash);
3742 ndps_req_hash = NULL;
3744 if (ndps_req_hash_keys) {
3745 g_mem_chunk_destroy(ndps_req_hash_keys);
3746 ndps_req_hash_keys = NULL;
3748 /* Don't free the ncp_req_hash_values, as they're
3749 * needed during random-access processing of the proto_tree.*/
3752 ndps_req_hash_value*
3753 ndps_hash_insert(conversation_t *conversation, guint32 ndps_xport)
3755 ndps_req_hash_key *request_key;
3756 ndps_req_hash_value *request_value;
3758 /* Now remember the request, so we can find it if we later
3760 request_key = g_mem_chunk_alloc(ndps_req_hash_keys);
3761 request_key->conversation = conversation;
3762 request_key->ndps_xport = ndps_xport;
3764 request_value = g_mem_chunk_alloc(ndps_req_hash_values);
3765 request_value->ndps_prog = 0;
3766 request_value->ndps_func = 0;
3767 request_value->ndps_frame_num = 0;
3768 request_value->ndps_frag = FALSE;
3769 request_value->ndps_end_frag = 0;
3771 g_hash_table_insert(ndps_req_hash, request_key, request_value);
3773 return request_value;
3776 /* Returns the ncp_rec*, or NULL if not found. */
3777 ndps_req_hash_value*
3778 ndps_hash_lookup(conversation_t *conversation, guint32 ndps_xport)
3780 ndps_req_hash_key request_key;
3782 request_key.conversation = conversation;
3783 request_key.ndps_xport = ndps_xport;
3785 return g_hash_table_lookup(ndps_req_hash, &request_key);
3788 /* ================================================================= */
3790 /* ================================================================= */
3793 dissect_ndps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree)
3797 guint32 ndps_packet_type;
3798 guint32 ndps_rpc_version;
3800 guint32 ndps_hfname;
3802 const char *ndps_program_string;
3803 const char *ndps_func_string;
3806 ndps_packet_type = tvb_get_ntohl(tvb, 8);
3807 if (ndps_packet_type != 0 && ndps_packet_type != 1) { /* Packet Type */
3808 if (check_col(pinfo->cinfo, COL_INFO))
3809 col_set_str(pinfo->cinfo, COL_INFO, "(Continuation Data)");
3810 proto_tree_add_text(ndps_tree, tvb, 0, tvb_length_remaining(tvb, 0), "Data - (%d Bytes)", tvb_length_remaining(tvb, 0));
3814 proto_tree_add_item(ndps_tree, hf_ndps_record_mark, tvb,
3817 proto_tree_add_item(ndps_tree, hf_ndps_length, tvb,
3821 ndps_xid = tvb_get_ntohl(tvb, foffset);
3822 proto_tree_add_uint(ndps_tree, hf_ndps_xid, tvb, foffset, 4, ndps_xid);
3824 ndps_packet_type = tvb_get_ntohl(tvb, foffset);
3825 proto_tree_add_uint(ndps_tree, hf_ndps_packet_type, tvb, foffset, 4, ndps_packet_type);
3827 if(ndps_packet_type == 0x00000001) /* Reply packet */
3829 if (check_col(pinfo->cinfo, COL_INFO))
3830 col_set_str(pinfo->cinfo, COL_INFO, "R NDPS ");
3831 proto_tree_add_item(ndps_tree, hf_ndps_rpc_accept, tvb, foffset, 4, FALSE);
3832 if (tvb_get_ntohl(tvb, foffset)==0) {
3834 proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 8, FALSE);
3840 proto_tree_add_item(ndps_tree, hf_ndps_rpc_rej_stat, tvb, foffset+4, 4, FALSE);
3843 dissect_ndps_reply(tvb, pinfo, ndps_tree, foffset);
3847 if (check_col(pinfo->cinfo, COL_INFO))
3848 col_set_str(pinfo->cinfo, COL_INFO, "C NDPS ");
3849 ndps_rpc_version = tvb_get_ntohl(tvb, foffset);
3850 proto_tree_add_item(ndps_tree, hf_ndps_rpc_version, tvb, foffset, 4, FALSE);
3852 ndps_prog = tvb_get_ntohl(tvb, foffset);
3853 ndps_program_string = match_strval(ndps_prog, spx_ndps_program_vals);
3854 if( ndps_program_string != NULL)
3856 proto_tree_add_item(ndps_tree, hf_spx_ndps_program, tvb, foffset, 4, FALSE);
3858 if (check_col(pinfo->cinfo, COL_INFO))
3860 col_append_str(pinfo->cinfo, COL_INFO, (const gchar*) ndps_program_string);
3861 col_append_str(pinfo->cinfo, COL_INFO, ", ");
3863 proto_tree_add_item(ndps_tree, hf_spx_ndps_version, tvb, foffset, 4, FALSE);
3865 ndps_func = tvb_get_ntohl(tvb, foffset);
3869 ndps_hfname = hf_spx_ndps_func_print;
3870 ndps_func_string = match_strval(ndps_func, spx_ndps_print_func_vals);
3873 ndps_hfname = hf_spx_ndps_func_broker;
3874 ndps_func_string = match_strval(ndps_func, spx_ndps_broker_func_vals);
3877 ndps_hfname = hf_spx_ndps_func_registry;
3878 ndps_func_string = match_strval(ndps_func, spx_ndps_registry_func_vals);
3881 ndps_hfname = hf_spx_ndps_func_notify;
3882 ndps_func_string = match_strval(ndps_func, spx_ndps_notify_func_vals);
3885 ndps_hfname = hf_spx_ndps_func_resman;
3886 ndps_func_string = match_strval(ndps_func, spx_ndps_resman_func_vals);
3889 ndps_hfname = hf_spx_ndps_func_delivery;
3890 ndps_func_string = match_strval(ndps_func, spx_ndps_deliver_func_vals);
3894 ndps_func_string = NULL;
3897 if(ndps_hfname != 0)
3899 proto_tree_add_item(ndps_tree, ndps_hfname, tvb, foffset, 4, FALSE);
3900 if (ndps_func_string != NULL)
3902 if (check_col(pinfo->cinfo, COL_INFO))
3903 col_append_str(pinfo->cinfo, COL_INFO, (const gchar*) ndps_func_string);
3906 proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 16, FALSE);
3908 dissect_ndps_request(tvb, pinfo, ndps_tree, ndps_prog, ndps_func, foffset);
3916 get_ndps_pdu_len(tvbuff_t *tvb, int offset)
3918 return tvb_get_ntohs(tvb, offset +2) + 4;
3922 dissect_ndps_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3924 proto_tree *ndps_tree = NULL;
3927 if (check_col(pinfo->cinfo, COL_PROTOCOL))
3928 col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS");
3930 if (check_col(pinfo->cinfo, COL_INFO))
3931 col_clear(pinfo->cinfo, COL_INFO);
3934 ti = proto_tree_add_item(tree, proto_ndps, tvb, 0, -1, FALSE);
3935 ndps_tree = proto_item_add_subtree(ti, ett_ndps);
3937 dissect_ndps(tvb, pinfo, ndps_tree);
3943 * SPX EOM not being set indicates we are inside or at the
3944 * beginning of a fragment. But when the end of the fragment
3945 * is encounterd the flag is set. So we must mark what the
3946 * frame number is of the end fragment so that we will be
3947 * able to redissect if the user clicks on the packet
3948 * or resorts/filters the trace.
3950 * Once we are certain that we are in a fragment sequence
3951 * then we can just process each fragment in this conversation
3952 * until we reach the eom message packet. We can tell we are at
3953 * the final fragment because it is flagged as SPX EOM.
3955 * We will be able to easily determine if a conversation is a fragment
3956 * with the exception of the last packet in the fragment. So remember
3957 * the last fragment packet number.
3960 ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3963 tvbuff_t *next_tvb = NULL;
3964 fragment_data *fd_head;
3966 ndps_req_hash_value *request_value = NULL;
3967 conversation_t *conversation;
3969 /* Get SPX info from SPX dissector */
3970 spx_info = pinfo->private_data;
3971 /* Check to see if defragmentation is enabled in the dissector */
3972 if (!ndps_defragment) {
3973 dissect_ndps(tvb, pinfo, tree);
3976 /* Has this already been dissected? */
3977 if (!pinfo->fd->flags.visited)
3979 /* Lets see if this is a new conversation */
3980 conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
3981 PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
3983 if (conversation == NULL)
3985 /* It's not part of any conversation - create a new one. */
3986 conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
3987 PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
3988 /* Create new request value hash */
3989 request_value = ndps_hash_insert(conversation, (guint32) pinfo->srcport);
3991 /* So now we need to get the request info for this conversation */
3992 request_value = ndps_hash_lookup(conversation, (guint32) pinfo->srcport);
3993 if (request_value == NULL)
3995 /* We haven't seen a packet with this conversation yet so create one. */
3996 request_value = ndps_hash_insert(conversation, (guint32) pinfo->srcport);
3998 /* Add it to pinfo so we can get it on further dissection requests */
3999 p_add_proto_data(pinfo->fd, proto_ndps, (void*) request_value);
4003 /* Get request value data */
4004 request_value = p_get_proto_data(pinfo->fd, proto_ndps);
4008 /* Can't find the original request packet so this is not any fragment packet */
4009 dissect_ndps(tvb, pinfo, tree);
4012 /* Check to see of this is a fragment. If so then mark as a fragment. */
4013 if (!spx_info->eom) {
4014 request_value->ndps_frag = TRUE;
4016 /* Now we process the fragments */
4017 if (request_value->ndps_frag || (request_value->ndps_end_frag == pinfo->fd->num))
4022 tid = (pinfo->srcport+pinfo->destport);
4023 len = tvb_reported_length_remaining(tvb, 0);
4024 if (tvb_bytes_exist(tvb, 0, len))
4026 fd_head = fragment_add_seq_next(tvb, 0, pinfo, tid, ndps_fragment_table, ndps_reassembled_table, len, !spx_info->eom);
4027 if (fd_head != NULL)
4029 /* Is this the last fragment? EOM will indicate */
4030 if (fd_head->next != NULL && spx_info->eom)
4032 proto_item *frag_tree_item;
4034 next_tvb = tvb_new_real_data(fd_head->data,
4035 fd_head->len, fd_head->len);
4036 tvb_set_child_real_data_tvbuff(tvb,
4038 add_new_data_source(pinfo,
4040 "Reassembled NDPS");
4041 /* Show all fragments. */
4044 show_fragment_seq_tree(fd_head,
4047 next_tvb, &frag_tree_item);
4050 /* Remember this fragment number so we can dissect again */
4051 request_value->ndps_end_frag = pinfo->fd->num;
4056 /* This is either a beggining or middle fragment on second dissection */
4057 next_tvb = tvb_new_subset(tvb, 0, -1, -1);
4058 if (check_col(pinfo->cinfo, COL_INFO))
4062 col_append_fstr(pinfo->cinfo, COL_INFO, "[NDPS Fragment]");
4069 /* Fragment from first pass of dissection */
4070 if (check_col(pinfo->cinfo, COL_INFO))
4074 col_append_fstr(pinfo->cinfo, COL_INFO, "[NDPS Fragment]");
4083 * There are no bytes so Dissect this
4085 next_tvb = tvb_new_subset(tvb, 0, -1, -1);
4087 if (next_tvb == NULL)
4089 /* This is a fragment packet */
4090 next_tvb = tvb_new_subset (tvb, 0, -1, -1);
4091 call_dissector(ndps_data_handle, next_tvb, pinfo, tree);
4095 /* This is the end fragment so dissect and mark end */
4096 if (spx_info->eom) {
4097 request_value->ndps_frag = FALSE;
4098 dissect_ndps(next_tvb, pinfo, tree);
4104 /* This is not any fragment packet */
4105 request_value->ndps_frag = FALSE;
4106 dissect_ndps(tvb, pinfo, tree);
4111 dissect_ndps_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
4113 tcp_dissect_pdus(tvb, pinfo, tree, ndps_desegment, 4, get_ndps_pdu_len,
4119 dissect_ndps_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
4121 proto_tree *ndps_tree = NULL;
4124 if (check_col(pinfo->cinfo, COL_PROTOCOL))
4125 col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS");
4127 if (check_col(pinfo->cinfo, COL_INFO))
4128 col_clear(pinfo->cinfo, COL_INFO);
4131 ti = proto_tree_add_item(tree, proto_ndps, tvb, 0, -1, FALSE);
4132 ndps_tree = proto_item_add_subtree(ti, ett_ndps);
4134 ndps_defrag(tvb, pinfo, ndps_tree);
4138 dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, guint32 ndps_prog, guint32 ndps_func, int foffset)
4140 ndps_req_hash_value *request_value = NULL;
4141 conversation_t *conversation;
4146 guint32 resource_type;
4147 guint32 filter_type;
4150 guint32 number_of_items;
4151 guint32 number_of_items2;
4152 guint32 doc_content;
4153 guint32 list_attr_op;
4156 gboolean supplier_flag;
4157 gboolean language_flag;
4158 gboolean method_flag;
4159 gboolean delivery_address_flag;
4160 guint32 profiles_type;
4161 guint32 profiles_choice_type;
4162 guint32 integer_type_flag;
4163 guint32 local_servers_type;
4164 gint length_remaining;
4174 if (!pinfo->fd->flags.visited)
4176 /* This is the first time we've looked at this packet.
4177 Keep track of the Program and connection whence the request
4178 came, and the address and connection to which the request
4179 is being sent, so that we can match up calls with replies.
4180 (We don't include the sequence number, as we may want
4181 to have all packets over the same connection treated
4182 as being part of a single conversation so that we can
4183 let the user select that conversation to be displayed.) */
4185 conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
4186 PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
4188 if (conversation == NULL)
4190 /* It's not part of any conversation - create a new one. */
4191 conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
4192 PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
4195 request_value = ndps_hash_insert(conversation, (guint32) pinfo->srcport);
4196 request_value->ndps_prog = ndps_prog;
4197 request_value->ndps_func = ndps_func;
4198 request_value->ndps_frame_num = pinfo->fd->num;
4202 case 0x060976: /* Print */
4205 case 0x00000001: /* Bind PSM */
4206 foffset = credentials(tvb, ndps_tree, foffset);
4208 case 0x00000002: /* Bind PA */
4209 foffset = credentials(tvb, ndps_tree, foffset);
4210 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
4212 number_of_items=tvb_get_ntohl(tvb, foffset);
4213 proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items);
4215 for (i = 1 ; i <= number_of_items; i++ )
4217 if (i > NDPS_MAX_ITEMS) {
4218 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
4221 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Security %u", i);
4222 atree = proto_item_add_subtree(aitem, ett_ndps);
4223 length = tvb_get_ntohl(tvb, foffset);
4226 proto_tree_add_uint(atree, hf_bind_security, tvb, foffset, 4, length);
4229 proto_item_set_end(aitem, tvb, foffset);
4231 foffset = qualifiedname(tvb, ndps_tree, foffset);
4233 case 0x00000003: /* Unbind */
4234 proto_tree_add_item(ndps_tree, hf_ndps_object, tvb, foffset,
4237 case 0x00000004: /* Print */
4238 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4240 print_type = tvb_get_ntohl(tvb, foffset);
4241 proto_tree_add_uint(ndps_tree, hf_print_arg, tvb, foffset, 4, print_type);
4245 case 0: /* Create Job */
4246 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4247 proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, FALSE);
4249 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Transfer Method");
4250 atree = proto_item_add_subtree(aitem, ett_ndps);
4251 number_of_items = tvb_get_ntohl(tvb, foffset);
4252 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4254 for (i = 1 ; i <= number_of_items; i++ )
4256 if (i > NDPS_MAX_ITEMS) {
4257 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4260 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
4261 btree = proto_item_add_subtree(bitem, ett_ndps);
4262 foffset = objectidentifier(tvb, btree, foffset);
4263 number_of_items2 = tvb_get_ntohl(tvb, foffset);
4264 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
4266 for (j = 1 ; j <= number_of_items2; j++ )
4268 if (j > NDPS_MAX_ITEMS) {
4269 proto_tree_add_text(btree, tvb, foffset, -1, "[Truncated]");
4272 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Value %u", j);
4273 ctree = proto_item_add_subtree(citem, ett_ndps);
4274 foffset = attribute_value(tvb, ctree, foffset);
4275 proto_item_set_end(citem, tvb, foffset);
4277 proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
4279 proto_item_set_end(bitem, tvb, foffset);
4281 proto_item_set_end(aitem, tvb, foffset);
4282 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Document Content");
4283 atree = proto_item_add_subtree(aitem, ett_ndps);
4284 number_of_items = tvb_get_ntohl(tvb, foffset);
4285 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4287 for (i = 1 ; i <= number_of_items; i++ )
4289 if (i > NDPS_MAX_ITEMS) {
4290 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4293 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Type %u", i);
4294 btree = proto_item_add_subtree(bitem, ett_ndps);
4295 foffset = objectidentifier(tvb, btree, foffset);
4296 proto_item_set_end(bitem, tvb, foffset);
4298 foffset += align_4(tvb, foffset);
4299 number_of_items = tvb_get_ntohl(tvb, foffset);
4300 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4302 doc_content = tvb_get_ntohl(tvb, foffset);
4303 proto_tree_add_uint(atree, hf_doc_content, tvb, foffset, 4, doc_content);
4305 for (i = 1 ; i <= number_of_items; i++ )
4307 if (i > NDPS_MAX_ITEMS) {
4308 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4311 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Value %u", i);
4312 btree = proto_item_add_subtree(bitem, ett_ndps);
4315 length = tvb_get_ntohl(tvb, foffset);
4316 proto_tree_add_uint(btree, hf_ndps_included_doc_len, tvb, foffset, 4, length);
4318 length_remaining = tvb_length_remaining(tvb, foffset);
4319 if (length_remaining == -1 || length > (guint32) length_remaining) /* Segmented Data */
4321 proto_tree_add_item(btree, hf_ndps_data, tvb, foffset, -1, FALSE);
4326 proto_tree_add_item(btree, hf_ndps_included_doc, tvb, foffset, length, FALSE);
4329 foffset += (length%2);
4330 if ((int) foffset <= 0)
4331 THROW(ReportedBoundsError);
4335 foffset = ndps_string(tvb, hf_ndps_ref_name, btree, foffset, NULL, 0);
4336 foffset = name_or_id(tvb, btree, foffset);
4338 proto_item_set_end(bitem, tvb, foffset);
4340 proto_item_set_end(aitem, tvb, foffset);
4342 if (align_4(tvb, foffset)>0) {
4343 foffset += align_4(tvb, foffset);
4345 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Document Type");
4346 atree = proto_item_add_subtree(aitem, ett_ndps);
4347 number_of_items = tvb_get_ntohl(tvb, foffset);
4348 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4350 for (i = 1 ; i <= number_of_items; i++ )
4352 if (i > NDPS_MAX_ITEMS) {
4353 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4356 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
4357 btree = proto_item_add_subtree(bitem, ett_ndps);
4358 foffset = objectidentifier(tvb, btree, foffset);
4359 number_of_items2 = tvb_get_ntohl(tvb, foffset);
4360 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
4362 for (j = 1 ; j <= number_of_items2; j++ )
4364 if (j > NDPS_MAX_ITEMS) {
4365 proto_tree_add_text(btree, tvb, foffset, -1, "[Truncated]");
4368 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Value %u", j);
4369 ctree = proto_item_add_subtree(citem, ett_ndps);
4370 foffset = attribute_value(tvb, ctree, foffset);
4371 proto_item_set_end(citem, tvb, foffset);
4373 proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
4375 proto_item_set_end(bitem, tvb, foffset);
4377 proto_item_set_end(aitem, tvb, foffset);
4378 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Document Attributes");
4379 atree = proto_item_add_subtree(aitem, ett_ndps);
4380 number_of_items = tvb_get_ntohl(tvb, foffset);
4381 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4383 for (i = 1 ; i <= number_of_items; i++ )
4385 if (i > NDPS_MAX_ITEMS) {
4386 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4389 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
4390 btree = proto_item_add_subtree(bitem, ett_ndps);
4391 foffset = attribute_value(tvb, btree, foffset); /* Document Attributes */
4392 proto_item_set_end(bitem, tvb, foffset);
4395 case 1: /* Add Job */
4396 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4397 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
4399 proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, FALSE);
4401 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Transfer Method");
4402 atree = proto_item_add_subtree(aitem, ett_ndps);
4403 number_of_items = tvb_get_ntohl(tvb, foffset);
4404 proto_tree_add_uint(atree, hf_ndps_num_transfer_methods, tvb, foffset, 4, number_of_items);
4406 for (i = 1 ; i <= number_of_items; i++ )
4408 if (i > NDPS_MAX_ITEMS) {
4409 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4412 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Method %u", i);
4413 btree = proto_item_add_subtree(bitem, ett_ndps);
4414 foffset = objectidentifier(tvb, btree, foffset); /* Transfer Method */
4415 proto_item_set_end(bitem, tvb, foffset);
4417 proto_tree_add_item(ndps_tree, hf_doc_content, tvb, foffset, 4, FALSE);
4419 proto_item_set_end(aitem, tvb, foffset);
4420 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Document Type");
4421 atree = proto_item_add_subtree(aitem, ett_ndps);
4422 number_of_items = tvb_get_ntohl(tvb, foffset);
4423 proto_tree_add_uint(atree, hf_ndps_num_doc_types, tvb, foffset, 4, number_of_items);
4425 for (i = 1 ; i <= number_of_items; i++ )
4427 if (i > NDPS_MAX_ITEMS) {
4428 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4431 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Type %u", i);
4432 btree = proto_item_add_subtree(bitem, ett_ndps);
4433 foffset = objectidentifier(tvb, btree, foffset); /* Document Type */
4434 proto_item_set_end(bitem, tvb, foffset);
4436 foffset += align_4(tvb, foffset);
4437 proto_item_set_end(aitem, tvb, foffset);
4438 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Document Attributes");
4439 atree = proto_item_add_subtree(aitem, ett_ndps);
4440 number_of_items = tvb_get_ntohl(tvb, foffset);
4441 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4443 for (i = 1 ; i <= number_of_items; i++ )
4445 if (i > NDPS_MAX_ITEMS) {
4446 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4449 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
4450 btree = proto_item_add_subtree(bitem, ett_ndps);
4451 foffset = attribute_value(tvb, btree, foffset); /* Document Attributes */
4452 proto_item_set_end(bitem, tvb, foffset);
4454 proto_item_set_end(aitem, tvb, foffset);
4456 case 2: /* Close Job */
4457 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4458 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
4465 case 0x00000005: /* Modify Job */
4466 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4468 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4469 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
4471 proto_tree_add_item(ndps_tree, hf_ndps_document_number, tvb, foffset, 4, FALSE);
4473 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job Modifications");
4474 atree = proto_item_add_subtree(aitem, ett_ndps);
4475 number_of_items = tvb_get_ntohl(tvb, foffset);
4476 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4478 for (i = 1 ; i <= number_of_items; i++ )
4480 if (i > NDPS_MAX_ITEMS) {
4481 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4484 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Modification %u", i);
4485 btree = proto_item_add_subtree(bitem, ett_ndps);
4486 foffset = attribute_value(tvb, btree, foffset); /* Job Modifications */
4487 proto_item_set_end(bitem, tvb, foffset);
4489 proto_item_set_end(aitem, tvb, foffset);
4490 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Document Modifications");
4491 atree = proto_item_add_subtree(aitem, ett_ndps);
4492 number_of_items = tvb_get_ntohl(tvb, foffset);
4493 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4495 for (i = 1 ; i <= number_of_items; i++ )
4497 if (i > NDPS_MAX_ITEMS) {
4498 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4501 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Modification %u", i);
4502 btree = proto_item_add_subtree(bitem, ett_ndps);
4503 foffset = attribute_value(tvb, btree, foffset); /* Document Modifications */
4504 proto_item_set_end(bitem, tvb, foffset);
4506 proto_item_set_end(aitem, tvb, foffset);
4508 case 0x00000006: /* Cancel Job */
4509 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4511 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4512 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
4514 proto_tree_add_item(ndps_tree, hf_ndps_document_number, tvb, foffset, 4, FALSE);
4516 /* XXX - what does this count? */
4517 number_of_items = tvb_get_ntohl(tvb, foffset);
4518 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
4520 /* Start of nameorid */
4521 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Cancel Message");
4522 atree = proto_item_add_subtree(aitem, ett_ndps);
4523 foffset = name_or_id(tvb, atree, foffset);
4524 proto_item_set_end(aitem, tvb, foffset);
4525 /* End of nameorid */
4526 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Retention Period");
4527 atree = proto_item_add_subtree(aitem, ett_ndps);
4528 proto_tree_add_item(atree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
4530 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
4532 proto_item_set_end(aitem, tvb, foffset);
4534 case 0x00000007: /* List Object Attributes */
4535 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4537 list_attr_op = tvb_get_ntohl(tvb, foffset);
4538 proto_tree_add_uint(ndps_tree, hf_ndps_attrs_arg, tvb, foffset, 4, list_attr_op);
4540 if (list_attr_op==0) /* Continuation */
4542 length = tvb_get_ntohl(tvb, foffset);
4543 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
4547 tvb_ensure_bytes_exist(tvb, foffset, length);
4548 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
4551 foffset += (length%2);
4552 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
4554 number_of_items = tvb_get_ntohl(tvb, foffset);
4555 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4557 for (i = 1 ; i <= number_of_items; i++ )
4559 if (i > NDPS_MAX_ITEMS) {
4560 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
4563 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Attribute %u", i);
4564 atree = proto_item_add_subtree(aitem, ett_ndps);
4565 foffset = attribute_value(tvb, atree, foffset);
4566 proto_item_set_end(aitem, tvb, foffset);
4569 else /* Specification */
4571 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Class");
4572 atree = proto_item_add_subtree(aitem, ett_ndps);
4573 foffset = objectidentifier(tvb, atree, foffset);
4574 proto_item_set_end(aitem, tvb, foffset);
4576 foffset += align_4(tvb, foffset);
4577 scope = tvb_get_ntohl(tvb, foffset);
4578 proto_tree_add_uint(ndps_tree, hf_ndps_scope, tvb, foffset, 4, scope);
4580 if (scope!=0) /* Scope Does not equal 0 */
4582 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Selector Option");
4583 atree = proto_item_add_subtree(aitem, ett_ndps);
4584 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPSelector */
4585 proto_tree_add_uint(atree, hf_ndps_num_options, tvb, foffset, 4, number_of_items);
4587 for (i = 1 ; i <= number_of_items; i++ )
4589 if (i > NDPS_MAX_ITEMS) {
4590 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4593 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Option %u", i);
4594 btree = proto_item_add_subtree(bitem, ett_ndps);
4595 foffset = objectidentification(tvb, btree, foffset);
4596 proto_item_set_end(bitem, tvb, foffset);
4598 proto_item_set_end(aitem, tvb, foffset);
4599 foffset += align_4(tvb, foffset);
4600 filter_type = tvb_get_ntohl(tvb, foffset);
4601 proto_tree_add_uint(ndps_tree, hf_ndps_filter, tvb, foffset, 4, filter_type);
4603 /*if (filter_type == 0 || filter_type == 3 )
4605 foffset = filteritem(tvb, ndps_tree, foffset);
4609 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Filter Items");
4610 atree = proto_item_add_subtree(aitem, ett_ndps);
4611 number_of_items = tvb_get_ntohl(tvb, foffset);
4612 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
4614 for (i = 1 ; i <= number_of_items; i++ )
4616 if (i > NDPS_MAX_ITEMS) {
4617 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
4620 foffset = filteritem(tvb, ndps_tree, foffset);
4622 proto_item_set_end(aitem, tvb, foffset);
4624 proto_tree_add_item(ndps_tree, hf_ndps_time_limit, tvb, foffset, 4, FALSE);
4626 proto_tree_add_item(ndps_tree, hf_ndps_count_limit, tvb, foffset, 4, FALSE);
4627 foffset += 4; /* End of NWDPSelector */
4629 foffset += 4; /* Don't know what this is */
4630 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Requested Attributes");
4631 atree = proto_item_add_subtree(aitem, ett_ndps);
4632 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPObjectIdentifierSet */
4633 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4635 for (i = 1 ; i <= number_of_items; i++ )
4637 if (i > NDPS_MAX_ITEMS) {
4638 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4641 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
4642 btree = proto_item_add_subtree(bitem, ett_ndps);
4643 foffset = objectidentifier(tvb, btree, foffset);
4644 proto_item_set_end(bitem, tvb, foffset);
4646 proto_item_set_end(aitem, tvb, foffset); /* End of NWDPObjectIdentifierSet */
4647 if (number_of_items == 0)
4651 proto_tree_add_item(ndps_tree, hf_ndps_operator, tvb, foffset, 4, FALSE);
4653 foffset = commonarguments(tvb, ndps_tree, foffset);
4656 case 0x00000008: /* Promote Job */
4657 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4659 /* Start of NWDPPrtContainedObjectId */
4660 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
4661 atree = proto_item_add_subtree(aitem, ett_ndps);
4662 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4663 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4665 proto_item_set_end(aitem, tvb, foffset);
4666 /* End of NWDPPrtContainedObjectId */
4667 /* Start of nameorid */
4668 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Message Option");
4669 atree = proto_item_add_subtree(aitem, ett_ndps);
4670 foffset = name_or_id(tvb, atree, foffset);
4671 proto_item_set_end(aitem, tvb, foffset);
4672 /* End of nameorid */
4673 foffset = commonarguments(tvb, ndps_tree, foffset);
4675 case 0x00000009: /* Interrupt */
4676 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4678 job_type = tvb_get_ntohl(tvb, foffset);
4679 proto_tree_add_uint(ndps_tree, hf_interrupt_job_type, tvb, foffset, 4, job_type);
4683 /* Start of NWDPPrtContainedObjectId */
4684 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
4685 atree = proto_item_add_subtree(aitem, ett_ndps);
4686 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4687 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4689 proto_item_set_end(aitem, tvb, foffset);
4690 /* End of NWDPPrtContainedObjectId */
4694 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4696 /* Start of nameorid */
4697 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Interrupt Message Option");
4698 atree = proto_item_add_subtree(aitem, ett_ndps);
4699 foffset = name_or_id(tvb, atree, foffset);
4700 proto_item_set_end(aitem, tvb, foffset);
4701 /* End of nameorid */
4702 /* Start of NWDPPrtContainedObjectId */
4703 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Interrupting Job");
4704 atree = proto_item_add_subtree(aitem, ett_ndps);
4705 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4706 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4708 proto_item_set_end(aitem, tvb, foffset);
4709 /* End of NWDPPrtContainedObjectId */
4710 foffset = commonarguments(tvb, ndps_tree, foffset);
4712 case 0x0000000a: /* Pause */
4713 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4715 job_type = tvb_get_ntohl(tvb, foffset);
4716 proto_tree_add_uint(ndps_tree, hf_pause_job_type, tvb, foffset, 4, job_type);
4720 /* Start of NWDPPrtContainedObjectId */
4721 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
4722 atree = proto_item_add_subtree(aitem, ett_ndps);
4723 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4724 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4726 proto_item_set_end(aitem, tvb, foffset);
4727 /* End of NWDPPrtContainedObjectId */
4731 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4733 /* Start of nameorid */
4734 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Pause Message Option");
4735 atree = proto_item_add_subtree(aitem, ett_ndps);
4736 foffset = name_or_id(tvb, atree, foffset);
4737 proto_item_set_end(aitem, tvb, foffset);
4738 /* End of nameorid */
4739 foffset = commonarguments(tvb, ndps_tree, foffset);
4741 case 0x0000000b: /* Resume */
4742 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4744 /* Start of NWDPPrtContainedObjectId */
4745 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
4746 atree = proto_item_add_subtree(aitem, ett_ndps);
4747 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4748 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4750 proto_item_set_end(aitem, tvb, foffset);
4751 /* End of NWDPPrtContainedObjectId */
4752 /* Start of nameorid */
4753 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Resume Message Option");
4754 atree = proto_item_add_subtree(aitem, ett_ndps);
4755 foffset = name_or_id(tvb, atree, foffset);
4756 proto_item_set_end(aitem, tvb, foffset);
4757 /* End of nameorid */
4758 foffset = commonarguments(tvb, ndps_tree, foffset);
4760 case 0x0000000c: /* Clean */
4761 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4763 /* Start of nameorid */
4764 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Clean Message Option");
4765 atree = proto_item_add_subtree(aitem, ett_ndps);
4766 foffset = name_or_id(tvb, atree, foffset);
4767 proto_item_set_end(aitem, tvb, foffset);
4768 /* End of nameorid */
4769 foffset = commonarguments(tvb, ndps_tree, foffset);
4771 case 0x0000000d: /* Create */
4772 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4774 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Class");
4775 atree = proto_item_add_subtree(aitem, ett_ndps);
4776 foffset = objectidentifier(tvb, atree, foffset);
4777 proto_item_set_end(aitem, tvb, foffset);
4778 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object ID");
4779 atree = proto_item_add_subtree(aitem, ett_ndps);
4780 foffset = objectidentification(tvb, atree, foffset);
4781 proto_item_set_end(aitem, tvb, foffset);
4782 proto_tree_add_item(ndps_tree, hf_ndps_force, tvb, foffset, 4, FALSE);
4784 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Reference Object Option");
4785 atree = proto_item_add_subtree(aitem, ett_ndps);
4786 foffset = objectidentification(tvb, atree, foffset);
4787 proto_item_set_end(aitem, tvb, foffset);
4788 /* Start of AttributeSet */
4789 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Attribute");
4790 atree = proto_item_add_subtree(aitem, ett_ndps);
4791 number_of_items = tvb_get_ntohl(tvb, foffset);
4792 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4794 for (i = 1 ; i <= number_of_items; i++ )
4796 if (i > NDPS_MAX_ITEMS) {
4797 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4800 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
4801 btree = proto_item_add_subtree(bitem, ett_ndps);
4802 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
4803 proto_item_set_end(bitem, tvb, foffset);
4805 proto_item_set_end(aitem, tvb, foffset);
4806 /* End of AttributeSet */
4807 foffset = commonarguments(tvb, ndps_tree, foffset);
4809 case 0x0000000e: /* Delete */
4810 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4812 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Class");
4813 atree = proto_item_add_subtree(aitem, ett_ndps);
4814 foffset = objectidentifier(tvb, atree, foffset);
4815 proto_item_set_end(aitem, tvb, foffset);
4816 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object ID");
4817 atree = proto_item_add_subtree(aitem, ett_ndps);
4818 foffset = objectidentification(tvb, atree, foffset);
4819 proto_item_set_end(aitem, tvb, foffset);
4820 foffset = commonarguments(tvb, ndps_tree, foffset);
4822 case 0x0000000f: /* Disable PA */
4823 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4825 /* Start of NameorID */
4826 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Disable PA Message Option");
4827 atree = proto_item_add_subtree(aitem, ett_ndps);
4828 foffset = name_or_id(tvb, atree, foffset);
4829 proto_item_set_end(aitem, tvb, foffset);
4830 /* End of NameorID */
4831 foffset = commonarguments(tvb, ndps_tree, foffset);
4833 case 0x00000010: /* Enable PA */
4834 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4836 /* Start of NameorID */
4837 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Enable PA Message Option");
4838 atree = proto_item_add_subtree(aitem, ett_ndps);
4839 foffset = name_or_id(tvb, atree, foffset);
4840 proto_item_set_end(aitem, tvb, foffset);
4841 /* End of NameorID */
4842 foffset = commonarguments(tvb, ndps_tree, foffset);
4844 case 0x00000011: /* Resubmit Jobs */
4845 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4847 foffset = qualifiedname(tvb, ndps_tree, foffset);
4848 foffset = address_item(tvb, ndps_tree, foffset);
4849 proto_tree_add_item(ndps_tree, hf_resubmit_op_type, tvb, foffset, 4, FALSE);
4851 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Resubmit Job");
4852 atree = proto_item_add_subtree(aitem, ett_ndps);
4853 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of ResubmitJob Set */
4854 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
4856 for (i = 1 ; i <= number_of_items; i++ )
4858 if (i > NDPS_MAX_ITEMS) {
4859 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4862 /* Start of NWDPPrtContainedObjectId */
4863 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Job ID");
4864 btree = proto_item_add_subtree(bitem, ett_ndps);
4865 foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset, NULL, 0);
4866 proto_tree_add_item(btree, hf_local_id, tvb, foffset, 4, FALSE);
4868 proto_item_set_end(bitem, tvb, foffset);
4869 /* End of NWDPPrtContainedObjectId */
4870 proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset, 4, FALSE);
4872 /* Start of AttributeSet */
4873 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Job Attributes");
4874 btree = proto_item_add_subtree(bitem, ett_ndps);
4875 number_of_items2 = tvb_get_ntohl(tvb, foffset);
4876 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
4878 for (j = 1 ; j <= number_of_items2; j++ )
4880 if (j > NDPS_MAX_ITEMS) {
4881 proto_tree_add_text(btree, tvb, foffset, -1, "[Truncated]");
4884 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Attribute %u", j);
4885 ctree = proto_item_add_subtree(citem, ett_ndps);
4886 foffset = attribute_value(tvb, ctree, foffset); /* Object Attribute Set */
4887 proto_item_set_end(citem, tvb, foffset);
4889 proto_item_set_end(bitem, tvb, foffset);
4890 /* End of AttributeSet */
4891 /* Start of AttributeSet */
4892 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Document Attributes");
4893 btree = proto_item_add_subtree(bitem, ett_ndps);
4894 number_of_items2 = tvb_get_ntohl(tvb, foffset);
4895 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
4897 for (j = 1 ; j <= number_of_items2; j++ )
4899 if (j > NDPS_MAX_ITEMS) {
4900 proto_tree_add_text(btree, tvb, foffset, -1, "[Truncated]");
4903 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Attribute %u", j);
4904 ctree = proto_item_add_subtree(citem, ett_ndps);
4905 foffset = attribute_value(tvb, ctree, foffset); /* Object Attribute Set */
4906 proto_item_set_end(citem, tvb, foffset);
4908 proto_item_set_end(bitem, tvb, foffset);
4909 /* End of AttributeSet */
4911 proto_item_set_end(aitem, tvb, foffset); /* End of ResubmitJob Set */
4912 /* Start of NameorID */
4913 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Resubmit Message Option");
4914 atree = proto_item_add_subtree(aitem, ett_ndps);
4915 foffset = name_or_id(tvb, atree, foffset);
4916 proto_item_set_end(aitem, tvb, foffset);
4917 /* End of NameorID */
4918 foffset = commonarguments(tvb, ndps_tree, foffset);
4920 case 0x00000012: /* Set */
4921 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4923 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Class");
4924 atree = proto_item_add_subtree(aitem, ett_ndps);
4925 foffset = objectidentifier(tvb, atree, foffset);
4926 proto_item_set_end(aitem, tvb, foffset);
4927 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object ID");
4928 atree = proto_item_add_subtree(aitem, ett_ndps);
4929 foffset = objectidentification(tvb, atree, foffset);
4930 /* Start of AttributeSet */
4931 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Attribute Modifications");
4932 atree = proto_item_add_subtree(aitem, ett_ndps);
4933 number_of_items = tvb_get_ntohl(tvb, foffset);
4934 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4936 for (i = 1 ; i <= number_of_items; i++ )
4938 if (i > NDPS_MAX_ITEMS) {
4939 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
4942 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Modification %d", i);
4943 btree = proto_item_add_subtree(bitem, ett_ndps);
4944 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
4945 proto_item_set_end(bitem, tvb, foffset);
4947 proto_item_set_end(aitem, tvb, foffset);
4948 /* End of AttributeSet */
4949 foffset = commonarguments(tvb, ndps_tree, foffset);
4951 case 0x00000013: /* Shutdown PA */
4952 case 0x0000001e: /* Shutdown PSM */
4953 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4955 proto_tree_add_item(ndps_tree, hf_shutdown_type, tvb, foffset, 4, FALSE);
4957 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4958 /* Start of NameorID */
4959 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Shutdown Message Option");
4960 atree = proto_item_add_subtree(aitem, ett_ndps);
4961 foffset = name_or_id(tvb, atree, foffset);
4962 proto_item_set_end(aitem, tvb, foffset);
4963 /* End of NameorID */
4964 foffset = commonarguments(tvb, ndps_tree, foffset);
4965 case 0x00000014: /* Startup PA */
4966 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4968 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4969 /* Start of NameorID */
4970 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Startup Message Option");
4971 atree = proto_item_add_subtree(aitem, ett_ndps);
4972 foffset = name_or_id(tvb, atree, foffset);
4973 proto_item_set_end(aitem, tvb, foffset);
4974 /* End of NameorID */
4975 foffset = commonarguments(tvb, ndps_tree, foffset);
4977 case 0x00000015: /* Reorder Job */
4978 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4980 /* Start of NWDPPrtContainedObjectId */
4981 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job Identification");
4982 atree = proto_item_add_subtree(aitem, ett_ndps);
4983 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4984 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4986 proto_item_set_end(aitem, tvb, foffset);
4987 /* End of NWDPPrtContainedObjectId */
4988 /* Start of NWDPPrtContainedObjectId */
4989 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Reference Job ID");
4990 atree = proto_item_add_subtree(aitem, ett_ndps);
4991 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4992 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4994 proto_item_set_end(aitem, tvb, foffset);
4995 /* End of NWDPPrtContainedObjectId */
4996 foffset = commonarguments(tvb, ndps_tree, foffset);
4998 case 0x00000016: /* Pause PA */
4999 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5001 /* Start of NameorID */
5002 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Pause Message Option");
5003 atree = proto_item_add_subtree(aitem, ett_ndps);
5004 foffset = name_or_id(tvb, atree, foffset);
5005 proto_item_set_end(aitem, tvb, foffset);
5006 /* End of NameorID */
5007 foffset = commonarguments(tvb, ndps_tree, foffset);
5009 case 0x00000017: /* Resume PA */
5010 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5012 /* Start of NameorID */
5013 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Resume Message Option");
5014 atree = proto_item_add_subtree(aitem, ett_ndps);
5015 foffset = name_or_id(tvb, atree, foffset);
5016 proto_item_set_end(aitem, tvb, foffset);
5017 /* End of NameorID */
5018 foffset = commonarguments(tvb, ndps_tree, foffset);
5020 case 0x00000018: /* Transfer Data */
5021 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5023 proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, FALSE);
5025 proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), FALSE);
5027 case 0x00000019: /* Device Control */
5028 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5030 /* Start of Object Identifier */
5031 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Operation ID");
5032 atree = proto_item_add_subtree(aitem, ett_ndps);
5033 foffset = objectidentifier(tvb, atree, foffset);
5034 proto_item_set_end(aitem, tvb, foffset);
5035 /* End of Object Identifier */
5036 foffset = commonarguments(tvb, ndps_tree, foffset);
5038 case 0x0000001a: /* Add Event Profile */
5039 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5041 /* Start of Eventhandling2 */
5042 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5044 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
5046 foffset = qualifiedname(tvb, ndps_tree, foffset);
5047 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL, 0);
5048 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5050 /* Start of NameorID */
5051 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5052 atree = proto_item_add_subtree(aitem, ett_ndps);
5053 foffset = name_or_id(tvb, atree, foffset);
5054 foffset += align_4(tvb, foffset);
5055 proto_item_set_end(aitem, tvb, foffset);
5056 /* End of NameorID */
5057 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Address");
5058 atree = proto_item_add_subtree(aitem, ett_ndps);
5059 number_of_items = tvb_get_ntohl(tvb, foffset);
5060 proto_tree_add_uint(atree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
5062 for (i = 1 ; i <= number_of_items; i++ )
5064 if (i > NDPS_MAX_ITEMS) {
5065 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
5068 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Address %u", i);
5069 btree = proto_item_add_subtree(bitem, ett_ndps);
5070 foffset = address_item(tvb, btree, foffset);
5071 proto_item_set_end(bitem, tvb, foffset);
5073 proto_item_set_end(aitem, tvb, foffset);
5074 foffset = event_object_set(tvb, ndps_tree, foffset);
5075 foffset = qualifiedname(tvb, ndps_tree, foffset);
5077 case 0x0000001b: /* Remove Event Profile */
5078 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5080 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5083 case 0x0000001c: /* Modify Event Profile */
5084 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5086 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5088 supplier_flag = tvb_get_ntohl(tvb, foffset);
5089 proto_tree_add_boolean(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, supplier_flag);
5093 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Supplier ID");
5094 atree = proto_item_add_subtree(aitem, ett_ndps);
5095 length = tvb_get_ntohl(tvb, foffset);
5099 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
5101 tvb_ensure_bytes_exist(tvb, foffset, length);
5103 proto_item_set_end(aitem, tvb, foffset);
5105 language_flag = tvb_get_ntohl(tvb, foffset);
5106 proto_tree_add_boolean(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, language_flag);
5110 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5113 method_flag = tvb_get_ntohl(tvb, foffset);
5114 proto_tree_add_boolean(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, method_flag);
5118 /* Start of NameorID */
5119 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5120 atree = proto_item_add_subtree(aitem, ett_ndps);
5121 foffset = name_or_id(tvb, atree, foffset);
5122 proto_item_set_end(aitem, tvb, foffset);
5123 /* End of NameorID */
5125 delivery_address_flag = tvb_get_ntohl(tvb, foffset);
5126 proto_tree_add_boolean(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, delivery_address_flag);
5128 if (delivery_address_flag)
5130 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Address");
5131 atree = proto_item_add_subtree(aitem, ett_ndps);
5132 foffset = print_address(tvb, atree, foffset);
5133 proto_item_set_end(aitem, tvb, foffset);
5135 foffset = event_object_set(tvb, ndps_tree, foffset);
5137 case 0x0000001d: /* List Event Profiles */
5138 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5140 profiles_type = tvb_get_ntohl(tvb, foffset);
5141 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, profiles_type);
5143 if (profiles_type==0) /* Spec */
5145 foffset = qualifiedname(tvb, ndps_tree, foffset);
5146 profiles_choice_type = tvb_get_ntohl(tvb, foffset);
5147 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, profiles_choice_type);
5149 if (profiles_choice_type==0) /* Choice */
5151 foffset = cardinal_seq(tvb, ndps_tree, foffset);
5155 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer");
5156 atree = proto_item_add_subtree(aitem, ett_ndps);
5157 foffset = qualifiedname(tvb, atree, foffset);
5158 proto_item_set_end(aitem, tvb, foffset);
5159 /* Start of NameorID */
5160 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5161 atree = proto_item_add_subtree(aitem, ett_ndps);
5162 foffset = name_or_id(tvb, atree, foffset);
5163 /* End of NameorID */
5164 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5166 proto_item_set_end(aitem, tvb, foffset);
5168 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, FALSE);
5170 /* Start of integeroption */
5171 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5172 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5174 if (integer_type_flag!=0)
5176 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
5179 /* End of integeroption */
5183 length = tvb_get_ntohl(tvb, foffset);
5184 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5188 tvb_ensure_bytes_exist(tvb, foffset, length);
5189 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
5192 foffset += (length%2);
5193 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
5197 case 0x0000001f: /* Cancel PSM Shutdown */
5198 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5200 /* Start of NameorID */
5201 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Cancel Shutdown Message Option");
5202 atree = proto_item_add_subtree(aitem, ett_ndps);
5203 foffset = name_or_id(tvb, atree, foffset);
5204 proto_item_set_end(aitem, tvb, foffset);
5205 /* End of NameorID */
5206 foffset = commonarguments(tvb, ndps_tree, foffset);
5208 case 0x00000020: /* Set Printer DS Information */
5209 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5211 proto_tree_add_item(ndps_tree, hf_ndps_ds_info_type, tvb, foffset, 4, FALSE);
5213 foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset, NULL, 0);
5214 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "DS Object Name");
5215 atree = proto_item_add_subtree(aitem, ett_ndps);
5216 foffset = qualifiedname(tvb, atree, foffset);
5217 proto_item_set_end(aitem, tvb, foffset);
5219 case 0x00000021: /* Clean User Jobs */
5220 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5222 /* Start of NameorID */
5223 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Clean Message Option");
5224 atree = proto_item_add_subtree(aitem, ett_ndps);
5225 foffset = name_or_id(tvb, atree, foffset);
5226 proto_item_set_end(aitem, tvb, foffset);
5227 /* End of NameorID */
5228 foffset = commonarguments(tvb, ndps_tree, foffset);
5230 case 0x00000022: /* Map GUID to NDS Name */
5231 length = tvb_get_ntohl(tvb, foffset);
5235 tvb_ensure_bytes_exist(tvb, foffset, length);
5236 proto_tree_add_item(ndps_tree, hf_ndps_guid, tvb, foffset, length, FALSE);
5240 case 0x00000023: /* AddEventProfile2 */
5241 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5243 /* Start of Eventhandling2 */
5244 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5246 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
5248 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer Name");
5249 atree = proto_item_add_subtree(aitem, ett_ndps);
5250 foffset = qualifiedname(tvb, atree, foffset);
5251 proto_item_set_end(aitem, tvb, foffset);
5252 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL, 0);
5253 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5255 /* Start of NameorID */
5256 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5257 atree = proto_item_add_subtree(aitem, ett_ndps);
5258 foffset = name_or_id(tvb, atree, foffset);
5259 foffset += align_4(tvb, foffset);
5260 proto_item_set_end(aitem, tvb, foffset);
5261 /* End of NameorID */
5262 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Address");
5263 atree = proto_item_add_subtree(aitem, ett_ndps);
5264 number_of_items = tvb_get_ntohl(tvb, foffset);
5265 proto_tree_add_uint(atree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
5267 for (i = 1 ; i <= number_of_items; i++ )
5269 if (i > NDPS_MAX_ITEMS) {
5270 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
5273 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Address %u", i);
5274 btree = proto_item_add_subtree(bitem, ett_ndps);
5275 foffset = address_item(tvb, btree, foffset);
5276 proto_item_set_end(bitem, tvb, foffset);
5278 proto_item_set_end(aitem, tvb, foffset);
5279 foffset = event_object_set(tvb, ndps_tree, foffset);
5280 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Account");
5281 atree = proto_item_add_subtree(aitem, ett_ndps);
5282 foffset = qualifiedname(tvb, atree, foffset);
5283 proto_item_set_end(aitem, tvb, foffset);
5284 /* Start of object identifier set */
5285 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Notify Attributes");
5286 atree = proto_item_add_subtree(aitem, ett_ndps);
5287 number_of_items = tvb_get_ntohl(tvb, foffset);
5288 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
5290 for (i = 1 ; i <= number_of_items; i++ )
5292 if (i > NDPS_MAX_ITEMS) {
5293 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
5296 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
5297 btree = proto_item_add_subtree(bitem, ett_ndps);
5298 foffset = objectidentifier(tvb, btree, foffset);
5299 proto_item_set_end(bitem, tvb, foffset);
5301 proto_item_set_end(aitem, tvb, foffset);
5302 /* End of object identifier set */
5303 proto_tree_add_item(ndps_tree, hf_notify_time_interval, tvb, foffset, 4, FALSE);
5305 proto_tree_add_item(ndps_tree, hf_notify_sequence_number, tvb, foffset, 4, FALSE);
5307 proto_tree_add_item(ndps_tree, hf_notify_lease_exp_time, tvb, foffset, 4, FALSE);
5309 foffset = ndps_string(tvb, hf_notify_printer_uri, ndps_tree, foffset, NULL, 0);
5310 /* End of Eventhandling2 */
5312 case 0x00000024: /* ListEventProfiles2 */
5313 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5315 profiles_type = tvb_get_ntohl(tvb, foffset);
5316 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, profiles_type);
5318 if (profiles_type==0) /* Spec */
5320 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Supplier Alias");
5321 atree = proto_item_add_subtree(aitem, ett_ndps);
5322 foffset = qualifiedname(tvb, atree, foffset);
5323 proto_item_set_end(aitem, tvb, foffset);
5324 profiles_choice_type = tvb_get_ntohl(tvb, foffset);
5325 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, profiles_choice_type);
5327 if (profiles_choice_type==0) /* Choice */
5329 foffset = cardinal_seq(tvb, ndps_tree, foffset);
5333 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer");
5334 atree = proto_item_add_subtree(aitem, ett_ndps);
5335 foffset = qualifiedname(tvb, atree, foffset);
5336 proto_item_set_end(aitem, tvb, foffset);
5337 /* Start of NameorID */
5338 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5339 atree = proto_item_add_subtree(aitem, ett_ndps);
5340 foffset = name_or_id(tvb, atree, foffset);
5341 proto_item_set_end(aitem, tvb, foffset);
5342 /* End of NameorID */
5343 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5346 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, FALSE);
5348 /* Start of integeroption */
5349 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5350 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5352 if (integer_type_flag!=0)
5354 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
5357 /* End of integeroption */
5361 length = tvb_get_ntohl(tvb, foffset);
5362 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5366 tvb_ensure_bytes_exist(tvb, foffset, length);
5367 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
5370 foffset += (length%2);
5371 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
5379 case 0x060977: /* Broker */
5382 case 0x00000001: /* Bind */
5383 foffset = credentials(tvb, ndps_tree, foffset);
5384 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
5386 number_of_items=tvb_get_ntohl(tvb, foffset);
5387 proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items);
5389 for (i = 1 ; i <= number_of_items; i++ )
5391 if (i > NDPS_MAX_ITEMS) {
5392 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
5395 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Security %u", i);
5396 atree = proto_item_add_subtree(aitem, ett_ndps);
5397 length = tvb_get_ntohl(tvb, foffset);
5401 proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, FALSE);
5403 proto_item_set_end(aitem, tvb, foffset);
5406 case 0x00000002: /* Unbind */
5408 case 0x00000003: /* List Services */
5409 proto_tree_add_item(ndps_tree, hf_ndps_list_services_type, tvb, foffset, 4, FALSE);
5412 case 0x00000004: /* Enable Service */
5413 proto_tree_add_item(ndps_tree, hf_ndps_service_type, tvb, foffset, 4, FALSE);
5415 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Parameters");
5416 atree = proto_item_add_subtree(aitem, ett_ndps);
5417 number_of_items=tvb_get_ntohl(tvb, foffset);
5418 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5420 for (i = 1 ; i <= number_of_items; i++ )
5422 if (i > NDPS_MAX_ITEMS) {
5423 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
5426 length = tvb_get_ntohl(tvb, foffset);
5430 tvb_ensure_bytes_exist(tvb, foffset, length);
5431 proto_tree_add_item(atree, hf_ndps_item_bytes, tvb, foffset, length, FALSE);
5435 proto_item_set_end(aitem, tvb, foffset);
5437 case 0x00000005: /* Disable Service */
5438 proto_tree_add_item(ndps_tree, hf_ndps_list_services_type, tvb, foffset, 4, FALSE);
5441 case 0x00000006: /* Down Broker */
5442 case 0x00000007: /* Get Broker NDS Object Name */
5443 case 0x00000008: /* Get Broker Session Information */
5448 case 0x060978: /* Registry */
5451 case 0x00000001: /* Bind */
5452 foffset = credentials(tvb, ndps_tree, foffset);
5453 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
5455 number_of_items=tvb_get_ntohl(tvb, foffset);
5456 proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items);
5458 for (i = 1 ; i <= number_of_items; i++ )
5460 if (i > NDPS_MAX_ITEMS) {
5461 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
5464 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Security %d", i);
5465 atree = proto_item_add_subtree(aitem, ett_ndps);
5466 length = tvb_get_ntohl(tvb, foffset);
5470 proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, FALSE);
5472 proto_item_set_end(aitem, tvb, foffset);
5475 case 0x00000002: /* Unbind */
5477 case 0x00000003: /* Register Server */
5478 foffset = server_entry(tvb, ndps_tree, foffset);
5480 case 0x00000004: /* Deregister Server */
5481 case 0x00000006: /* Deregister Registry */
5482 case 0x0000000b: /* Get Registry NDS Object Name */
5483 case 0x0000000c: /* Get Registry Session Information */
5486 case 0x00000005: /* Register Registry */
5487 foffset = ndps_string(tvb, hf_ndps_registry_name, ndps_tree, foffset, NULL, 0);
5488 foffset = print_address(tvb, ndps_tree, foffset);
5490 case 0x00000007: /* Registry Update */
5491 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Add");
5492 atree = proto_item_add_subtree(aitem, ett_ndps);
5493 number_of_items = tvb_get_ntohl(tvb, foffset);
5494 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5496 for (i = 1 ; i <= number_of_items; i++ )
5498 if (i > NDPS_MAX_ITEMS) {
5499 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
5502 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Entry %u", i);
5503 btree = proto_item_add_subtree(bitem, ett_ndps);
5504 foffset = server_entry(tvb, btree, foffset);
5505 proto_item_set_end(bitem, tvb, foffset);
5507 proto_item_set_end(aitem, tvb, foffset);
5508 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Remove");
5509 atree = proto_item_add_subtree(aitem, ett_ndps);
5510 number_of_items = tvb_get_ntohl(tvb, foffset);
5511 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5513 for (i = 1 ; i <= number_of_items; i++ )
5515 if (i > NDPS_MAX_ITEMS) {
5516 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
5519 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Entry %u", i);
5520 btree = proto_item_add_subtree(bitem, ett_ndps);
5521 foffset = server_entry(tvb, btree, foffset);
5522 proto_item_set_end(bitem, tvb, foffset);
5524 proto_item_set_end(aitem, tvb, foffset);
5526 case 0x00000008: /* List Local Servers */
5527 case 0x00000009: /* List Servers */
5528 case 0x0000000a: /* List Known Registries */
5529 local_servers_type = tvb_get_ntohl(tvb, foffset);
5530 proto_tree_add_uint(ndps_tree, hf_ndps_list_local_servers_type, tvb, foffset, 4, local_servers_type);
5532 if (local_servers_type==0)
5534 /* Start of integeroption */
5535 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5536 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5538 if (integer_type_flag!=0)
5540 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
5543 /* End of integeroption */
5547 length = tvb_get_ntohl(tvb, foffset);
5548 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5552 tvb_ensure_bytes_exist(tvb, foffset, length);
5553 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
5556 foffset += (length%2);
5557 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
5565 case 0x060979: /* Notify */
5568 case 0x00000001: /* Notify Bind */
5569 foffset = credentials(tvb, ndps_tree, foffset);
5570 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
5572 number_of_items=tvb_get_ntohl(tvb, foffset);
5574 for (i = 1 ; i <= number_of_items; i++ )
5576 if (i > NDPS_MAX_ITEMS) {
5577 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
5580 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Security %d", i);
5581 atree = proto_item_add_subtree(aitem, ett_ndps);
5582 length = tvb_get_ntohl(tvb, foffset);
5586 proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, FALSE);
5588 proto_item_set_end(aitem, tvb, foffset);
5591 case 0x00000002: /* Notify Unbind */
5592 case 0x0000000a: /* List Supported Languages */
5593 case 0x00000010: /* Get Notify NDS Object Name */
5594 case 0x00000011: /* Get Notify Session Information */
5597 case 0x00000003: /* Register Supplier */
5598 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL, 0);
5599 /* Start of QualifiedName Set*/
5600 number_of_items = tvb_get_ntohl(tvb, foffset);
5601 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5603 for (i = 1 ; i <= number_of_items; i++ )
5605 if (i > NDPS_MAX_ITEMS) {
5606 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
5609 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Supplier Alias %u", i);
5610 atree = proto_item_add_subtree(aitem, ett_ndps);
5611 foffset = qualifiedname(tvb, atree, foffset);
5612 proto_item_set_end(aitem, tvb, foffset);
5614 /* End of QualifiedName Set*/
5616 case 0x00000004: /* Deregister Supplier */
5617 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5620 case 0x00000005: /* Add Profile */
5621 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5623 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Supplier Alias");
5624 atree = proto_item_add_subtree(aitem, ett_ndps);
5625 foffset = qualifiedname(tvb, atree, foffset);
5626 proto_item_set_end(aitem, tvb, foffset);
5627 /* Start of Eventhandling */
5628 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5630 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
5632 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer Name");
5633 atree = proto_item_add_subtree(aitem, ett_ndps);
5634 foffset = qualifiedname(tvb, atree, foffset);
5635 proto_item_set_end(aitem, tvb, foffset);
5636 length = tvb_get_ntohl(tvb, foffset);
5640 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
5643 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5645 /* Start of NameorID */
5646 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5647 atree = proto_item_add_subtree(aitem, ett_ndps);
5648 foffset = name_or_id(tvb, atree, foffset);
5649 proto_item_set_end(aitem, tvb, foffset);
5650 /* End of NameorID */
5651 number_of_items = tvb_get_ntohl(tvb, foffset);
5652 proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
5654 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Addresses");
5655 atree = proto_item_add_subtree(aitem, ett_ndps);
5656 for (i = 1 ; i <= number_of_items; i++ )
5658 if (i > NDPS_MAX_ITEMS) {
5659 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
5662 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Address %d", i);
5663 btree = proto_item_add_subtree(bitem, ett_ndps);
5664 foffset = address_item(tvb, btree, foffset);
5665 proto_item_set_end(bitem, tvb, foffset);
5667 proto_item_set_end(aitem, tvb, foffset);
5668 foffset = event_object_set(tvb, ndps_tree, foffset);
5669 /* End of Eventhandling */
5671 case 0x00000006: /* Remove Profile */
5672 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5674 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5677 case 0x00000007: /* Modify Profile */
5678 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5680 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5682 supplier_flag = tvb_get_ntohl(tvb, foffset);
5683 proto_tree_add_boolean(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, supplier_flag);
5687 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Supplier ID");
5688 atree = proto_item_add_subtree(aitem, ett_ndps);
5689 length = tvb_get_ntohl(tvb, foffset);
5693 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
5695 tvb_ensure_bytes_exist(tvb, foffset, length);
5697 proto_item_set_end(aitem, tvb, foffset);
5699 language_flag = tvb_get_ntohl(tvb, foffset);
5700 proto_tree_add_boolean(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, language_flag);
5704 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5707 method_flag = tvb_get_ntohl(tvb, foffset);
5708 proto_tree_add_boolean(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, method_flag);
5712 /* Start of NameorID */
5713 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5714 atree = proto_item_add_subtree(aitem, ett_ndps);
5715 foffset = name_or_id(tvb, atree, foffset);
5716 proto_item_set_end(aitem, tvb, foffset);
5717 /* End of NameorID */
5719 delivery_address_flag = tvb_get_ntohl(tvb, foffset);
5720 proto_tree_add_boolean(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, delivery_address_flag);
5722 if (delivery_address_flag)
5724 foffset = print_address(tvb, ndps_tree, foffset);
5726 foffset = event_object_set(tvb, ndps_tree, foffset);
5728 case 0x00000008: /* List Profiles */
5729 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5731 profiles_type = tvb_get_ntohl(tvb, foffset);
5732 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, profiles_type);
5734 if (profiles_type==0) /* Spec */
5736 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Supplier Alias");
5737 atree = proto_item_add_subtree(aitem, ett_ndps);
5738 foffset = qualifiedname(tvb, atree, foffset);
5739 profiles_choice_type = tvb_get_ntohl(tvb, foffset);
5740 proto_tree_add_uint(atree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, profiles_choice_type);
5742 proto_item_set_end(aitem, tvb, foffset);
5743 if (profiles_choice_type==0) /* Choice */
5745 foffset = cardinal_seq(tvb, ndps_tree, foffset);
5749 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer");
5750 atree = proto_item_add_subtree(aitem, ett_ndps);
5751 foffset = qualifiedname(tvb, atree, foffset);
5752 proto_item_set_end(aitem, tvb, foffset);
5753 /* Start of NameorID */
5754 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5755 atree = proto_item_add_subtree(aitem, ett_ndps);
5756 foffset = name_or_id(tvb, atree, foffset);
5757 /* End of NameorID */
5758 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5760 proto_item_set_end(aitem, tvb, foffset);
5762 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, FALSE);
5764 /* Start of integeroption */
5765 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5766 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5768 if (integer_type_flag!=0)
5770 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
5773 /* End of integeroption */
5777 length = tvb_get_ntohl(tvb, foffset);
5778 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5782 tvb_ensure_bytes_exist(tvb, foffset, length);
5783 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
5786 foffset += (length%2);
5787 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
5791 case 0x00000009: /* Report Event */
5792 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5794 /* Start of ReportEventItemSet */
5795 number_of_items = tvb_get_ntohl(tvb, foffset);
5796 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5798 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event Items");
5799 atree = proto_item_add_subtree(aitem, ett_ndps);
5800 for (i = 1 ; i <= number_of_items; i++ )
5802 if (i > NDPS_MAX_ITEMS) {
5803 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
5806 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Item %d", i);
5807 btree = proto_item_add_subtree(bitem, ett_ndps);
5808 /* Start of ReportEventItem */
5809 proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
5811 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Containing Class");
5812 ctree = proto_item_add_subtree(citem, ett_ndps);
5813 foffset = objectidentifier(tvb, ctree, foffset);
5814 proto_item_set_end(citem, tvb, foffset);
5815 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Containing Object");
5816 ctree = proto_item_add_subtree(citem, ett_ndps);
5817 foffset = objectidentification(tvb, ctree, foffset);
5818 proto_item_set_end(citem, tvb, foffset);
5819 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Filter Class");
5820 ctree = proto_item_add_subtree(citem, ett_ndps);
5821 foffset = objectidentifier(tvb, ctree, foffset);
5822 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Object Class");
5823 ctree = proto_item_add_subtree(citem, ett_ndps);
5824 foffset = objectidentifier(tvb, ctree, foffset);
5825 proto_item_set_end(citem, tvb, foffset);
5826 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Object ID");
5827 ctree = proto_item_add_subtree(citem, ett_ndps);
5828 foffset = objectidentification(tvb, ctree, foffset);
5829 proto_item_set_end(citem, tvb, foffset);
5830 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Event Object ID");
5831 ctree = proto_item_add_subtree(citem, ett_ndps);
5832 foffset = objectidentifier(tvb, ctree, foffset);
5833 proto_item_set_end(citem, tvb, foffset);
5834 /* Start of AttributeSet */
5835 number_of_items = tvb_get_ntohl(tvb, foffset);
5836 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
5838 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Attribute Modifications");
5839 ctree = proto_item_add_subtree(citem, ett_ndps);
5840 for (j = 1 ; j <= number_of_items; j++ )
5842 if (j > NDPS_MAX_ITEMS) {
5843 proto_tree_add_text(ctree, tvb, foffset, -1, "[Truncated]");
5846 ditem = proto_tree_add_text(ctree, tvb, foffset, -1, "Modification %d", j);
5847 dtree = proto_item_add_subtree(ditem, ett_ndps);
5848 foffset = attribute_value(tvb, dtree, foffset); /* Object Attribute Set */
5849 proto_item_set_end(ditem, tvb, foffset);
5851 proto_item_set_end(citem, tvb, foffset);
5852 /* End of AttributeSet */
5853 foffset = ndps_string(tvb, hf_ndps_message, btree, foffset, NULL, 0);
5854 proto_tree_add_item(btree, hf_time, tvb, foffset, 4, FALSE);
5856 proto_item_set_end(bitem, tvb, foffset);
5857 /* End of ReportEventItem */
5859 proto_item_set_end(aitem, tvb, foffset);
5860 /* End of ReportEventItemSet */
5862 case 0x0000000b: /* Report Notification */
5863 /* Start of DestinationSet */
5864 number_of_items = tvb_get_ntohl(tvb, foffset);
5865 proto_tree_add_uint(ndps_tree, hf_ndps_num_destinations, tvb, foffset, 4, number_of_items);
5867 for (i = 1 ; i <= number_of_items; i++ )
5869 if (i > NDPS_MAX_ITEMS) {
5870 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
5873 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Destination %d", i);
5874 atree = proto_item_add_subtree(aitem, ett_ndps);
5875 /* Start of Destination */
5876 /* Start of NameorID */
5877 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Method ID");
5878 btree = proto_item_add_subtree(bitem, ett_ndps);
5879 foffset = name_or_id(tvb, btree, foffset);
5880 proto_item_set_end(bitem, tvb, foffset);
5881 /* End of NameorID */
5882 /* Start of NotifyDeliveryAddr */
5883 proto_tree_add_item(atree, hf_address_len, tvb, foffset, 4, FALSE);
5885 foffset = print_address(tvb, atree, foffset);
5886 /* End of NotifyDeliveryAddr */
5887 proto_item_set_end(aitem, tvb, foffset);
5888 /* End of Destination */
5890 /* End of DestinationSet */
5891 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL, 0);
5892 proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
5894 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Containing Class");
5895 atree = proto_item_add_subtree(aitem, ett_ndps);
5896 foffset = objectidentifier(tvb, atree, foffset);
5897 proto_item_set_end(aitem, tvb, foffset);
5898 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Containing Object");
5899 atree = proto_item_add_subtree(aitem, ett_ndps);
5900 foffset = objectidentification(tvb, atree, foffset);
5901 proto_item_set_end(aitem, tvb, foffset);
5902 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Filter Class");
5903 atree = proto_item_add_subtree(aitem, ett_ndps);
5904 foffset = objectidentifier(tvb, atree, foffset);
5905 proto_item_set_end(aitem, tvb, foffset);
5906 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Class");
5907 atree = proto_item_add_subtree(aitem, ett_ndps);
5908 foffset = objectidentifier(tvb, atree, foffset);
5909 proto_item_set_end(aitem, tvb, foffset);
5910 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object ID");
5911 atree = proto_item_add_subtree(aitem, ett_ndps);
5912 foffset = objectidentification(tvb, atree, foffset);
5913 proto_item_set_end(aitem, tvb, foffset);
5914 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event Object ID");
5915 atree = proto_item_add_subtree(aitem, ett_ndps);
5916 foffset = objectidentifier(tvb, atree, foffset);
5917 proto_item_set_end(aitem, tvb, foffset);
5918 /* Start of AttributeSet */
5919 number_of_items = tvb_get_ntohl(tvb, foffset);
5920 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
5922 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Attributes");
5923 atree = proto_item_add_subtree(aitem, ett_ndps);
5924 for (i = 1 ; i <= number_of_items; i++ )
5926 if (i > NDPS_MAX_ITEMS) {
5927 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
5930 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %d", i);
5931 btree = proto_item_add_subtree(bitem, ett_ndps);
5932 foffset = attribute_value(tvb, btree, foffset);
5933 proto_item_set_end(bitem, tvb, foffset);
5935 proto_item_set_end(aitem, tvb, foffset);
5936 /* End of AttributeSet */
5937 foffset = ndps_string(tvb, hf_ndps_message, ndps_tree, foffset, NULL, 0);
5938 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
5940 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Account");
5941 atree = proto_item_add_subtree(aitem, ett_ndps);
5942 foffset = qualifiedname(tvb, atree, foffset);
5943 proto_item_set_end(aitem, tvb, foffset);
5945 case 0x0000000c: /* Add Delivery Method */
5946 foffset = ndps_string(tvb, hf_ndps_file_name, ndps_tree, foffset, NULL, 0);
5948 case 0x0000000d: /* Remove Delivery Method */
5949 /* Start of NameorID */
5950 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5951 atree = proto_item_add_subtree(aitem, ett_ndps);
5952 foffset = name_or_id(tvb, atree, foffset);
5953 proto_item_set_end(aitem, tvb, foffset);
5954 /* End of NameorID */
5956 case 0x0000000e: /* List Delivery Methods */
5957 cred_type = tvb_get_ntohl(tvb, foffset);
5958 proto_tree_add_item(ndps_tree, hf_delivery_method_type, tvb, foffset, 4, FALSE);
5962 case 0: /* Specification */
5963 /* Start of integeroption */
5964 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5965 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5967 if (integer_type_flag!=0)
5969 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
5972 /* End of integeroption */
5973 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5976 case 1: /* Continuation */
5977 length = tvb_get_ntohl(tvb, foffset);
5978 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5982 tvb_ensure_bytes_exist(tvb, foffset, length);
5983 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
5986 foffset += (length%2);
5987 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
5994 case 0x0000000f: /* Get Delivery Method Information */
5995 /* Start of NameorID */
5996 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5997 atree = proto_item_add_subtree(aitem, ett_ndps);
5998 foffset = name_or_id(tvb, atree, foffset);
5999 proto_item_set_end(aitem, tvb, foffset);
6000 /* End of NameorID */
6001 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
6008 case 0x06097a: /* Resman */
6011 case 0x00000001: /* Bind */
6012 foffset = credentials(tvb, ndps_tree, foffset);
6013 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
6015 number_of_items=tvb_get_ntohl(tvb, foffset);
6016 proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items);
6018 for (i = 1 ; i <= number_of_items; i++ )
6020 if (i > NDPS_MAX_ITEMS) {
6021 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
6024 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Security %d", i);
6025 atree = proto_item_add_subtree(aitem, ett_ndps);
6026 length = tvb_get_ntohl(tvb, foffset);
6030 proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, FALSE);
6032 proto_item_set_end(aitem, tvb, foffset);
6035 case 0x00000002: /* Unbind */
6036 case 0x00000008: /* Get Resource Manager NDS Object Name */
6037 case 0x00000009: /* Get Resource Manager Session Information */
6040 case 0x00000003: /* Add Resource File */
6041 proto_tree_add_item(ndps_tree, hf_packet_count, tvb, foffset, 4, FALSE);
6043 proto_tree_add_item(ndps_tree, hf_last_packet_flag, tvb, foffset, 4, FALSE);
6045 proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, FALSE);
6047 foffset = res_add_input_data(tvb, ndps_tree, foffset);
6048 number_of_items=tvb_get_ntohl(tvb, foffset);
6049 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
6051 for (i = 1 ; i <= number_of_items; i++ )
6053 if (i > NDPS_MAX_ITEMS) {
6054 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
6057 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
6058 atree = proto_item_add_subtree(aitem, ett_ndps);
6059 length=tvb_get_ntohl(tvb, foffset);
6060 length_remaining = tvb_length_remaining(tvb, foffset);
6061 if(length_remaining == -1 || (guint32) length_remaining < length)
6065 proto_tree_add_item(atree, hf_ndps_item_ptr, tvb, foffset, length, FALSE);
6067 proto_item_set_end(aitem, tvb, foffset);
6070 case 0x00000004: /* Delete Resource File */
6071 foffset = res_add_input_data(tvb, ndps_tree, foffset);
6073 case 0x00000005: /* List Resources */
6074 proto_tree_add_item(ndps_tree, hf_ndps_max_items, tvb, foffset, 4, FALSE);
6076 proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
6078 proto_tree_add_item(ndps_tree, hf_ndps_resource_list_type, tvb, foffset, 4, FALSE);
6079 resource_type = tvb_get_ntohl(tvb, foffset);
6081 switch (resource_type)
6083 case 0: /* Print Drivers */
6084 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
6087 case 1: /* Printer Definitions */
6088 case 2: /* Printer Definitions Short */
6089 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL, 0);
6091 case 3: /* Banner Page Files */
6092 proto_tree_add_item(ndps_tree, hf_banner_type, tvb, foffset, 4, FALSE);
6095 case 4: /* Font Types */
6096 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
6098 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
6101 case 5: /* Printer Driver Files */
6102 case 12: /* Printer Driver Files 2 */
6103 case 9: /* Generic Files */
6104 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
6106 foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL, 0);
6107 foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL, 0);
6108 foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL, 0);
6109 field_len = tvb_get_ntohl(tvb, foffset);
6111 proto_tree_add_item(ndps_tree, hf_printer_id, tvb, foffset, field_len, FALSE);
6113 case 6: /* Printer Definition File */
6114 case 10: /* Printer Definition File 2 */
6115 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL, 0);
6117 foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL, 0);
6118 foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL, 0);
6119 foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL, 0);
6120 field_len = tvb_get_ntohl(tvb, foffset);
6122 proto_tree_add_item(ndps_tree, hf_printer_id, tvb, foffset, field_len, FALSE);
6124 case 7: /* Font Files */
6125 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
6127 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
6129 foffset = ndps_string(tvb, hf_ndps_font_name, ndps_tree, foffset, NULL, 0);
6131 case 8: /* Generic Type */
6132 case 11: /* Printer Driver Types 2 */
6133 case 13: /* Printer Driver Types Archive */
6134 foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL, 0);
6135 foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL, 0);
6136 foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL, 0);
6138 case 14: /* Languages Available */
6144 case 0x00000006: /* Get Resource File */
6145 proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, FALSE);
6147 proto_tree_add_item(ndps_tree, hf_res_type, tvb, foffset, 4, FALSE);
6148 resource_type = tvb_get_ntohl(tvb, foffset);
6150 switch (resource_type)
6152 case 0: /* Print Drivers */
6153 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
6155 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL, 0);
6156 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
6158 case 1: /* Printer Definitions */
6159 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL, 0);
6160 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
6162 case 2: /* Banner Page Files */
6163 foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset, NULL, 0);
6165 case 3: /* Font Types */
6166 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
6168 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
6170 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
6172 case 4: /* Generic Files/ Archive */
6173 case 5: /* Printer Driver Archive */
6174 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
6176 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL, 0);
6177 proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
6184 case 0x00000007: /* Get Resource File Date */
6185 proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
6187 foffset = res_add_input_data(tvb, ndps_tree, foffset);
6189 case 0x0000000a: /* Set Resource Language Context */
6190 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
6197 case 0x06097b: /* Delivery */
6200 case 0x00000001: /* Delivery Bind */
6201 foffset = credentials(tvb, ndps_tree, foffset);
6203 case 0x00000002: /* Delivery Unbind */
6206 case 0x00000003: /* Delivery Send */
6207 number_of_items = tvb_get_ntohl(tvb, foffset);
6208 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
6210 for (i = 1 ; i <= number_of_items; i++ )
6212 if (i > NDPS_MAX_ITEMS) {
6213 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
6216 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
6217 atree = proto_item_add_subtree(aitem, ett_ndps);
6218 proto_tree_add_item(atree, hf_ndps_session, tvb, foffset, 4, FALSE);
6220 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Supplier ID");
6221 btree = proto_item_add_subtree(bitem, ett_ndps);
6222 length = tvb_get_ntohl(tvb, foffset);
6226 proto_tree_add_item(btree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
6229 proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
6231 proto_item_set_end(bitem, tvb, foffset);
6232 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Containing Class");
6233 btree = proto_item_add_subtree(bitem, ett_ndps);
6234 foffset = objectidentifier(tvb, btree, foffset);
6235 proto_item_set_end(bitem, tvb, foffset);
6236 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Containing Object");
6237 btree = proto_item_add_subtree(bitem, ett_ndps);
6238 foffset = objectidentification(tvb, btree, foffset);
6239 proto_item_set_end(bitem, tvb, foffset);
6240 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Filter Class");
6241 btree = proto_item_add_subtree(bitem, ett_ndps);
6242 foffset = objectidentifier(tvb, btree, foffset);
6243 proto_item_set_end(bitem, tvb, foffset);
6244 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object Class");
6245 btree = proto_item_add_subtree(bitem, ett_ndps);
6246 foffset = objectidentifier(tvb, btree, foffset);
6247 proto_item_set_end(bitem, tvb, foffset);
6248 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object ID");
6249 btree = proto_item_add_subtree(bitem, ett_ndps);
6250 foffset = objectidentification(tvb, btree, foffset);
6251 proto_item_set_end(bitem, tvb, foffset);
6252 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Event Object ID");
6253 btree = proto_item_add_subtree(bitem, ett_ndps);
6254 foffset = objectidentifier(tvb, btree, foffset);
6255 foffset = attribute_value(tvb, atree, foffset);
6256 foffset = ndps_string(tvb, hf_ndps_message, atree, foffset, NULL, 0);
6257 proto_tree_add_item(atree, hf_time, tvb, foffset, 4, FALSE);
6259 proto_item_set_end(bitem, tvb, foffset);
6260 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Account");
6261 btree = proto_item_add_subtree(bitem, ett_ndps);
6262 foffset = qualifiedname(tvb, btree, foffset);
6263 proto_item_set_end(bitem, tvb, foffset);
6264 proto_item_set_end(aitem, tvb, foffset);
6267 case 0x00000004: /* Delivery Send2 */
6268 number_of_items = tvb_get_ntohl(tvb, foffset);
6269 proto_tree_add_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
6271 for (i = 1 ; i <= number_of_items; i++ )
6273 if (i > NDPS_MAX_ITEMS) {
6274 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
6277 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object %d", i);
6278 atree = proto_item_add_subtree(aitem, ett_ndps);
6279 proto_tree_add_item(atree, hf_ndps_session, tvb, foffset, 4, FALSE);
6281 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Supplier ID");
6282 btree = proto_item_add_subtree(bitem, ett_ndps);
6283 length = tvb_get_ntohl(tvb, foffset);
6287 proto_tree_add_item(btree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
6290 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
6292 proto_item_set_end(bitem, tvb, foffset);
6293 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Containing Class");
6294 btree = proto_item_add_subtree(bitem, ett_ndps);
6295 foffset = objectidentifier(tvb, btree, foffset);
6296 proto_item_set_end(bitem, tvb, foffset);
6297 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Containing Object");
6298 btree = proto_item_add_subtree(bitem, ett_ndps);
6299 foffset = objectidentification(tvb, btree, foffset);
6300 proto_item_set_end(bitem, tvb, foffset);
6301 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Filter Class");
6302 btree = proto_item_add_subtree(bitem, ett_ndps);
6303 foffset = objectidentifier(tvb, btree, foffset);
6304 proto_item_set_end(bitem, tvb, foffset);
6305 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object Class");
6306 btree = proto_item_add_subtree(bitem, ett_ndps);
6307 foffset = objectidentifier(tvb, btree, foffset);
6308 proto_item_set_end(bitem, tvb, foffset);
6309 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object ID");
6310 btree = proto_item_add_subtree(bitem, ett_ndps);
6311 foffset = objectidentification(tvb, btree, foffset);
6312 proto_item_set_end(bitem, tvb, foffset);
6313 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Event Object ID");
6314 btree = proto_item_add_subtree(bitem, ett_ndps);
6315 foffset = objectidentifier(tvb, btree, foffset);
6316 proto_item_set_end(bitem, tvb, foffset);
6317 /* Start of AttributeSet */
6318 number_of_items = tvb_get_ntohl(tvb, foffset);
6319 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6321 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute");
6322 btree = proto_item_add_subtree(bitem, ett_ndps);
6323 for (i = 1 ; i <= number_of_items; i++ )
6325 if (i > NDPS_MAX_ITEMS) {
6326 proto_tree_add_text(btree, tvb, foffset, -1, "[Truncated]");
6329 foffset = attribute_value(tvb, btree, foffset);
6331 proto_item_set_end(bitem, tvb, foffset);
6332 /* End of AttributeSet */
6333 foffset = ndps_string(tvb, hf_ndps_message, atree, foffset, NULL, 0);
6334 proto_tree_add_item(atree, hf_time, tvb, foffset, 4, FALSE);
6336 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Account");
6337 btree = proto_item_add_subtree(bitem, ett_ndps);
6338 foffset = qualifiedname(tvb, btree, foffset);
6339 proto_item_set_end(bitem, tvb, foffset);
6340 proto_item_set_end(aitem, tvb, foffset);
6354 ndps_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
6356 guint32 number_of_items;
6357 guint32 ndps_problem_type;
6358 guint32 problem_type;
6365 ndps_problem_type = tvb_get_ntohl(tvb, foffset);
6366 if (check_col(pinfo->cinfo, COL_INFO))
6367 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
6368 proto_tree_add_uint(ndps_tree, hf_ndps_problem_type, tvb, foffset, 4, ndps_problem_type);
6370 switch(ndps_problem_type)
6372 case 0: /* Security Error */
6373 problem_type = tvb_get_ntohl(tvb, foffset);
6374 proto_tree_add_uint(ndps_tree, hf_problem_type, tvb, foffset, 4, problem_type);
6376 if (problem_type==0) /* Standard Error */
6378 proto_tree_add_item(ndps_tree, hf_security_problem_type, tvb, foffset, 4, FALSE);
6381 else /* Extended Error */
6383 /* Start of objectidentifier */
6384 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6385 atree = proto_item_add_subtree(aitem, ett_ndps);
6386 foffset = objectidentifier(tvb, atree, foffset);
6387 proto_item_set_end(aitem, tvb, foffset);
6388 /* End of objectidentifier */
6390 /* Start of NameorID */
6391 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Message");
6392 atree = proto_item_add_subtree(aitem, ett_ndps);
6393 foffset = name_or_id(tvb, atree, foffset);
6394 proto_item_set_end(aitem, tvb, foffset);
6395 /* End of NameorID */
6397 case 1: /* Service 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_service_problem_type, tvb, foffset, 4, FALSE);
6405 else /* Extended Error */
6407 /* Start of objectidentifier */
6408 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6409 atree = proto_item_add_subtree(aitem, ett_ndps);
6410 foffset = objectidentifier(tvb, atree, foffset);
6411 proto_item_set_end(aitem, tvb, foffset);
6412 /* End of objectidentifier */
6414 foffset = objectidentification(tvb, ndps_tree, foffset);
6415 foffset = attribute_value(tvb, ndps_tree, foffset); /* Object Attribute Set */
6416 proto_tree_add_item(ndps_tree, hf_ndps_lib_error, tvb, foffset, 4, FALSE);
6418 proto_tree_add_item(ndps_tree, hf_ndps_other_error, tvb, foffset, 4, FALSE);
6420 proto_tree_add_item(ndps_tree, hf_ndps_other_error_2, tvb, foffset, 4, FALSE);
6423 case 2: /* Access Error */
6424 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6426 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6428 proto_tree_add_item(ndps_tree, hf_access_problem_type, tvb, foffset, 4, FALSE);
6431 else /* Extended Error */
6433 /* Start of objectidentifier */
6434 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6435 atree = proto_item_add_subtree(aitem, ett_ndps);
6436 foffset = objectidentifier(tvb, atree, foffset);
6437 proto_item_set_end(aitem, tvb, foffset);
6438 /* End of objectidentifier */
6440 foffset = objectidentification(tvb, ndps_tree, foffset);
6442 case 3: /* Printer Error */
6443 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6445 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6447 proto_tree_add_item(ndps_tree, hf_printer_problem_type, tvb, foffset, 4, FALSE);
6450 else /* Extended Error */
6452 /* Start of objectidentifier */
6453 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6454 atree = proto_item_add_subtree(aitem, ett_ndps);
6455 foffset = objectidentifier(tvb, atree, foffset);
6456 proto_item_set_end(aitem, tvb, foffset);
6457 /* End of objectidentifier */
6459 foffset = objectidentification(tvb, ndps_tree, foffset);
6461 case 4: /* Selection Error */
6462 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6464 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6466 proto_tree_add_item(ndps_tree, hf_selection_problem_type, tvb, foffset, 4, FALSE);
6469 else /* Extended Error */
6471 /* Start of objectidentifier */
6472 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6473 atree = proto_item_add_subtree(aitem, ett_ndps);
6474 foffset = objectidentifier(tvb, atree, foffset);
6475 proto_item_set_end(aitem, tvb, foffset);
6476 /* End of objectidentifier */
6478 foffset = objectidentification(tvb, ndps_tree, foffset);
6479 foffset = attribute_value(tvb, ndps_tree, foffset); /* Object Attribute Set */
6481 case 5: /* Document Access Error */
6482 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6484 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6486 proto_tree_add_item(ndps_tree, hf_doc_access_problem_type, tvb, foffset, 4, FALSE);
6487 foffset = objectidentifier(tvb, ndps_tree, foffset);
6489 else /* Extended Error */
6491 /* Start of objectidentifier */
6492 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6493 atree = proto_item_add_subtree(aitem, ett_ndps);
6494 foffset = objectidentifier(tvb, atree, foffset);
6495 proto_item_set_end(aitem, tvb, foffset);
6496 /* End of objectidentifier */
6498 foffset = objectidentification(tvb, ndps_tree, foffset);
6500 case 6: /* Attribute Error */
6501 number_of_items = tvb_get_ntohl(tvb, foffset);
6502 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6504 for (i = 1 ; i <= number_of_items; i++ )
6506 if (i > NDPS_MAX_ITEMS) {
6507 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
6510 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
6511 atree = proto_item_add_subtree(aitem, ett_ndps);
6512 proto_tree_add_item(atree, hf_problem_type, tvb, foffset, 4, FALSE);
6514 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6516 proto_tree_add_item(atree, hf_attribute_problem_type, tvb, foffset, 4, FALSE);
6519 else /* Extended Error */
6521 /* Start of objectidentifier */
6522 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Extended Error");
6523 btree = proto_item_add_subtree(bitem, ett_ndps);
6524 foffset = objectidentifier(tvb, btree, foffset);
6525 proto_item_set_end(bitem, tvb, foffset);
6526 /* End of objectidentifier */
6528 foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
6529 proto_item_set_end(aitem, tvb, foffset);
6532 case 7: /* Update Error */
6533 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6535 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6537 proto_tree_add_item(ndps_tree, hf_update_problem_type, tvb, foffset, 4, FALSE);
6540 else /* Extended Error */
6542 /* Start of objectidentifier */
6543 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6544 atree = proto_item_add_subtree(aitem, ett_ndps);
6545 foffset = objectidentifier(tvb, atree, foffset);
6546 proto_item_set_end(aitem, tvb, foffset);
6547 /* End of objectidentifier */
6549 foffset = objectidentification(tvb, ndps_tree, foffset);
6558 return_code(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
6560 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
6562 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
6563 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
6564 if (tvb_get_ntohl(tvb, foffset-4) == 0)
6568 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
6574 dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
6576 conversation_t *conversation = NULL;
6577 ndps_req_hash_value *request_value = NULL;
6589 guint32 number_of_items=0;
6590 guint32 number_of_items2=0;
6591 guint32 number_of_items3=0;
6593 guint32 ndps_func=0;
6594 guint32 ndps_prog=0;
6595 guint32 error_val=0;
6596 guint32 resource_type=0;
6597 gint length_remaining;
6599 if (!pinfo->fd->flags.visited) {
6600 /* Find the conversation whence the request would have come. */
6601 conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
6602 PT_NCP, (guint32) pinfo->destport, (guint32) pinfo->destport, 0);
6603 if (conversation != NULL) {
6604 /* find the record telling us the request made that caused
6606 request_value = ndps_hash_lookup(conversation, (guint32) pinfo->destport);
6607 p_add_proto_data(pinfo->fd, proto_ndps, (void*) request_value);
6609 /* else... we haven't seen an NDPS Request for that conversation. */
6612 request_value = p_get_proto_data(pinfo->fd, proto_ndps);
6614 if (request_value) {
6615 ndps_prog = request_value->ndps_prog;
6616 ndps_func = request_value->ndps_func;
6617 proto_tree_add_uint_format(ndps_tree, hf_ndps_reqframe, tvb, 0,
6618 0, request_value->ndps_frame_num,
6619 "Response to Request in Frame Number: %u",
6620 request_value->ndps_frame_num);
6623 if (tvb_length_remaining(tvb, foffset) < 12 && tvb_get_ntohl(tvb, foffset) == 0) /* No error and no return data */
6625 proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
6626 if (check_col(pinfo->cinfo, COL_INFO))
6627 col_append_str(pinfo->cinfo, COL_INFO, "- Ok");
6630 if(ndps_func == 1 || ndps_func == 2)
6632 proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_stat, tvb, foffset, 4, FALSE);
6634 if (tvb_length_remaining(tvb,foffset) < 4 ) {
6635 if (check_col(pinfo->cinfo, COL_INFO))
6636 col_append_str(pinfo->cinfo, COL_INFO, "- Error");
6639 proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_results, tvb, foffset, 4, FALSE);
6641 if (tvb_length_remaining(tvb,foffset) < 4) {
6642 if (check_col(pinfo->cinfo, COL_INFO))
6643 col_append_str(pinfo->cinfo, COL_INFO, "- Error");
6647 error_val = tvb_get_ntohl(tvb, foffset);
6648 proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
6650 /* Some functions return an error with no data, 0 is ok */
6651 if (match_strval(tvb_get_ntohl(tvb, foffset), ndps_error_types) && tvb_length_remaining(tvb,foffset) < 8 && (tvb_get_ntohl(tvb, foffset)!=0))
6653 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
6654 if (check_col(pinfo->cinfo, COL_INFO))
6655 col_append_str(pinfo->cinfo, COL_INFO, "- Error");
6658 if (check_col(pinfo->cinfo, COL_INFO))
6659 col_append_str(pinfo->cinfo, COL_INFO, "- Ok");
6662 case 0x060976: /* Print */
6665 case 0x00000001: /* Bind PSM */
6666 proto_tree_add_item(ndps_tree, hf_ndps_oid, tvb, foffset, 4, FALSE);
6670 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6671 if(tvb_length_remaining(tvb, foffset) < 4)
6675 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
6678 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "PSM Name");
6679 atree = proto_item_add_subtree(aitem, ett_ndps);
6680 foffset = qualifiedname(tvb, atree, foffset);
6681 proto_item_set_end(aitem, tvb, foffset);
6683 case 0x00000002: /* Bind PA */
6684 proto_tree_add_item(ndps_tree, hf_ndps_oid, tvb, foffset, 4, FALSE);
6688 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6689 if(tvb_length_remaining(tvb, foffset) < 4)
6693 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
6696 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
6698 case 0x00000003: /* Unbind */
6700 case 0x00000004: /* Print */
6701 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
6702 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
6706 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6709 case 0x00000005: /* Modify Job */
6710 case 0x00000006: /* Cancel Job */
6711 case 0x00000008: /* Promote Job */
6712 case 0x0000000b: /* Resume */
6713 case 0x0000000d: /* Create */
6714 /* Start of AttributeSet */
6715 number_of_items = tvb_get_ntohl(tvb, foffset);
6716 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6718 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Attribute Set");
6719 atree = proto_item_add_subtree(aitem, ett_ndps);
6720 for (i = 1 ; i <= number_of_items; i++ )
6722 if (i > NDPS_MAX_ITEMS) {
6723 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
6726 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %d", i);
6727 btree = proto_item_add_subtree(bitem, ett_ndps);
6728 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
6729 proto_item_set_end(bitem, tvb, foffset);
6731 proto_item_set_end(aitem, tvb, foffset);
6732 /* End of AttributeSet */
6735 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6738 case 0x00000007: /* List Object Attributes */
6739 proto_tree_add_item(ndps_tree, hf_answer_time, tvb, foffset, 4, FALSE);
6741 /* Continuation Option */
6742 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Continuation Option");
6743 atree = proto_item_add_subtree(aitem, ett_ndps);
6744 number_of_items=tvb_get_ntohl(tvb, foffset);
6745 proto_tree_add_uint(atree, hf_ndps_num_options, tvb, foffset, 4, number_of_items);
6747 for (i = 1 ; i <= number_of_items; i++ )
6749 if (i > NDPS_MAX_ITEMS) {
6750 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
6753 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Option %d", i);
6754 btree = proto_item_add_subtree(bitem, ett_ndps);
6755 length=tvb_get_ntohl(tvb, foffset);
6756 length_remaining = tvb_length_remaining(tvb, foffset);
6757 if(length_remaining == -1 || (guint32) length_remaining < length)
6761 proto_tree_add_item(btree, hf_ndps_item_ptr, tvb, foffset, length, FALSE);
6763 proto_item_set_end(bitem, tvb, foffset);
6765 proto_item_set_end(aitem, tvb, foffset);
6766 /* Limit Encountered Option */
6767 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Limit Encountered Option");
6768 atree = proto_item_add_subtree(aitem, ett_ndps);
6769 proto_tree_add_item(atree, hf_ndps_len, tvb, foffset, 4, FALSE);
6771 proto_tree_add_item(atree, hf_limit_enc, tvb, foffset, 4, FALSE);
6773 proto_item_set_end(aitem, tvb, foffset);
6774 /* Object Results Set */
6775 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Results Set");
6776 atree = proto_item_add_subtree(aitem, ett_ndps);
6777 number_of_items=tvb_get_ntohl(tvb, foffset);
6778 proto_tree_add_uint(atree, hf_ndps_num_results, tvb, foffset, 4, number_of_items);
6780 for (i = 1 ; i <= number_of_items; i++ )
6782 if (i > NDPS_MAX_ITEMS) {
6783 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
6786 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Result %d", i);
6787 btree = proto_item_add_subtree(bitem, ett_ndps);
6788 foffset = objectidentification(tvb, btree, foffset);
6789 number_of_items2 = tvb_get_ntohl(tvb, foffset);
6790 proto_tree_add_uint(btree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items2);
6792 for (j = 1 ; j <= number_of_items2; j++ )
6794 if (j > NDPS_MAX_ITEMS) {
6795 proto_tree_add_text(btree, tvb, foffset, -1, "[Truncated]");
6798 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Attribute %d", j);
6799 ctree = proto_item_add_subtree(citem, ett_ndps);
6800 foffset = objectidentifier(tvb, ctree, foffset);
6801 foffset += align_4(tvb, foffset);
6802 number_of_items3 = tvb_get_ntohl(tvb, foffset);
6803 proto_tree_add_uint(ctree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items3);
6805 for (k = 1 ; k <= number_of_items3; k++ )
6807 if (k > NDPS_MAX_ITEMS) {
6808 proto_tree_add_text(ctree, tvb, foffset, -1, "[Truncated]");
6811 ditem = proto_tree_add_text(ctree, tvb, foffset, -1, "Value %d", k);
6812 dtree = proto_item_add_subtree(ditem, ett_ndps);
6813 foffset = attribute_value(tvb, dtree, foffset);
6814 foffset += align_4(tvb, foffset);
6815 proto_item_set_end(ditem, tvb, foffset);
6817 proto_tree_add_item(ctree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
6819 proto_item_set_end(citem, tvb, foffset);
6821 foffset = objectidentifier(tvb, btree, foffset);
6823 proto_item_set_end(bitem, tvb, foffset);
6825 proto_item_set_end(aitem, tvb, foffset);
6828 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6831 case 0x00000009: /* Interrupt */
6832 case 0x0000000a: /* Pause */
6833 /* Start of NWDPPrtContainedObjectId */
6834 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
6835 atree = proto_item_add_subtree(aitem, ett_ndps);
6836 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
6837 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
6839 proto_item_set_end(aitem, tvb, foffset);
6840 /* End of NWDPPrtContainedObjectId */
6841 /* Start of AttributeSet */
6842 number_of_items = tvb_get_ntohl(tvb, foffset);
6843 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6845 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Attribute Set");
6846 atree = proto_item_add_subtree(aitem, ett_ndps);
6847 for (i = 1 ; i <= number_of_items; i++ )
6849 if (i > NDPS_MAX_ITEMS) {
6850 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
6853 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %d", i);
6854 btree = proto_item_add_subtree(bitem, ett_ndps);
6855 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
6856 proto_item_set_end(bitem, tvb, foffset);
6858 proto_item_set_end(aitem, tvb, foffset);
6859 /* End of AttributeSet */
6862 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6865 case 0x0000000c: /* Clean */
6866 case 0x0000000e: /* Delete */
6867 case 0x0000000f: /* Disable PA */
6868 case 0x00000010: /* Enable PA */
6869 case 0x00000012: /* Set */
6870 case 0x00000013: /* Shutdown PA */
6871 case 0x00000014: /* Startup PA */
6872 case 0x00000018: /* Transfer Data */
6873 case 0x00000019: /* Device Control */
6874 case 0x0000001b: /* Remove Event Profile */
6875 case 0x0000001c: /* Modify Event Profile */
6876 case 0x0000001e: /* Shutdown PSM */
6877 case 0x0000001f: /* Cancel PSM Shutdown */
6878 case 0x00000020: /* Set Printer DS Information */
6879 case 0x00000021: /* Clean User Jobs */
6882 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6885 case 0x00000011: /* Resubmit Jobs */
6886 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of ResubmitJob Set */
6887 proto_tree_add_uint(ndps_tree, hf_ndps_num_jobs, tvb, foffset, 4, number_of_items);
6889 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Resubmit Job");
6890 atree = proto_item_add_subtree(aitem, ett_ndps);
6891 for (i = 1 ; i <= number_of_items; i++ )
6893 if (i > NDPS_MAX_ITEMS) {
6894 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
6897 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Job %d", i);
6898 btree = proto_item_add_subtree(bitem, ett_ndps);
6899 /* Start of NWDPPrtContainedObjectId */
6900 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Old Job");
6901 ctree = proto_item_add_subtree(citem, ett_ndps);
6902 foffset = ndps_string(tvb, hf_ndps_pa_name, ctree, foffset, NULL, 0);
6903 proto_tree_add_item(ctree, hf_local_id, tvb, foffset, 4, FALSE);
6905 proto_item_set_end(citem, tvb, foffset);
6906 /* End of NWDPPrtContainedObjectId */
6907 /* Start of NWDPPrtContainedObjectId */
6908 citem = proto_tree_add_text(btree, tvb, foffset, -1, "New Job");
6909 ctree = proto_item_add_subtree(citem, ett_ndps);
6910 foffset = ndps_string(tvb, hf_ndps_pa_name, ctree, foffset, NULL, 0);
6911 proto_tree_add_item(ctree, hf_local_id, tvb, foffset, 4, FALSE);
6913 proto_item_set_end(citem, tvb, foffset);
6914 /* End of NWDPPrtContainedObjectId */
6915 /* Start of AttributeSet */
6916 number_of_items2 = tvb_get_ntohl(tvb, foffset);
6917 proto_tree_add_uint(ctree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
6919 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Job Status");
6920 ctree = proto_item_add_subtree(citem, ett_ndps);
6921 for (j = 1 ; j <= number_of_items2; j++ )
6923 if (j > NDPS_MAX_ITEMS) {
6924 proto_tree_add_text(ctree, tvb, foffset, -1, "[Truncated]");
6927 ditem = proto_tree_add_text(ctree, tvb, foffset, -1, "Object %d", j);
6928 dtree = proto_item_add_subtree(ditem, ett_ndps);
6929 foffset = attribute_value(tvb, dtree, foffset); /* Object Attribute Set */
6930 proto_item_set_end(ditem, tvb, foffset);
6932 proto_item_set_end(citem, tvb, foffset);
6933 proto_item_set_end(bitem, tvb, foffset);
6934 /* End of AttributeSet */
6936 proto_item_set_end(aitem, tvb, foffset);
6937 /* End of ResubmitJob Set */
6940 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6943 case 0x00000015: /* Reorder Job */
6944 /* Start of AttributeSet */
6945 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job Status");
6946 atree = proto_item_add_subtree(aitem, ett_ndps);
6947 number_of_items = tvb_get_ntohl(tvb, foffset);
6948 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6950 for (i = 1 ; i <= number_of_items; i++ )
6952 if (i > NDPS_MAX_ITEMS) {
6953 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
6956 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object %d", i);
6957 btree = proto_item_add_subtree(bitem, ett_ndps);
6958 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
6959 proto_item_set_end(bitem, tvb, foffset);
6961 proto_item_set_end(aitem, tvb, foffset);
6962 /* End of AttributeSet */
6965 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6968 case 0x00000016: /* Pause PA */
6969 case 0x00000017: /* Resume PA */
6970 /* Start of AttributeSet */
6971 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Printer Status");
6972 atree = proto_item_add_subtree(aitem, ett_ndps);
6973 number_of_items = tvb_get_ntohl(tvb, foffset);
6974 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
6976 for (i = 1 ; i <= number_of_items; i++ )
6978 if (i > NDPS_MAX_ITEMS) {
6979 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
6982 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object %d", i);
6983 btree = proto_item_add_subtree(bitem, ett_ndps);
6984 foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
6985 proto_item_set_end(bitem, tvb, foffset);
6987 proto_item_set_end(aitem, tvb, foffset);
6988 /* End of AttributeSet */
6991 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6994 case 0x0000001a: /* Add Event Profile */
6995 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
6999 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7002 case 0x0000001d: /* List Event Profiles */
7003 length = tvb_get_ntohl(tvb, foffset);
7007 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
7010 /* Start of Eventhandling */
7011 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
7013 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
7015 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer Name");
7016 atree = proto_item_add_subtree(aitem, ett_ndps);
7017 foffset = qualifiedname(tvb, atree, foffset);
7018 length = tvb_get_ntohl(tvb, foffset);
7022 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
7025 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
7027 proto_item_set_end(aitem, tvb, foffset);
7028 /* Start of NameorID */
7029 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
7030 atree = proto_item_add_subtree(aitem, ett_ndps);
7031 foffset = name_or_id(tvb, atree, foffset);
7032 proto_item_set_end(aitem, tvb, foffset);
7033 /* End of NameorID */
7034 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Addresses");
7035 atree = proto_item_add_subtree(aitem, ett_ndps);
7036 number_of_items = tvb_get_ntohl(tvb, foffset);
7037 proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
7039 for (i = 1 ; i <= number_of_items; i++ )
7041 if (i > NDPS_MAX_ITEMS) {
7042 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
7045 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Address %d", i);
7046 btree = proto_item_add_subtree(bitem, ett_ndps);
7047 foffset = address_item(tvb, btree, foffset);
7048 proto_item_set_end(bitem, tvb, foffset);
7050 proto_item_set_end(aitem, tvb, foffset);
7051 foffset = event_object_set(tvb, ndps_tree, foffset);
7052 /* End of Eventhandling */
7053 length = tvb_get_ntohl(tvb, foffset);
7057 tvb_ensure_bytes_exist(tvb, foffset, length);
7058 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
7063 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7066 case 0x00000022: /* Map GUID to NDS Name */
7067 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "NDS Printer Name");
7068 atree = proto_item_add_subtree(aitem, ett_ndps);
7069 foffset = qualifiedname(tvb, atree, foffset);
7070 proto_item_set_end(aitem, tvb, foffset);
7073 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7076 case 0x00000023: /* AddEventProfile2 */
7077 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
7079 proto_tree_add_item(ndps_tree, hf_notify_lease_exp_time, tvb, foffset, 4, FALSE);
7083 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7086 case 0x00000024: /* ListEventProfiles2 */
7087 number_of_items = tvb_get_ntohl(tvb, foffset);
7088 proto_tree_add_uint(ndps_tree, hf_ndps_num_events, tvb, foffset, 4, number_of_items);
7090 for (i = 1 ; i <= number_of_items; i++ )
7092 if (i > NDPS_MAX_ITEMS) {
7093 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7096 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event %d", i);
7097 atree = proto_item_add_subtree(aitem, ett_ndps);
7098 /* Start of Eventhandling2 */
7099 proto_tree_add_item(atree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
7101 proto_tree_add_item(atree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
7103 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Consumer Name");
7104 btree = proto_item_add_subtree(bitem, ett_ndps);
7105 foffset = qualifiedname(tvb, btree, foffset);
7106 foffset = ndps_string(tvb, hf_ndps_supplier_name, atree, foffset, NULL, 0);
7107 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
7109 proto_item_set_end(bitem, tvb, foffset);
7110 /* Start of NameorID */
7111 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Method ID");
7112 btree = proto_item_add_subtree(bitem, ett_ndps);
7113 foffset = name_or_id(tvb, btree, foffset);
7114 foffset += align_4(tvb, foffset);
7115 proto_item_set_end(bitem, tvb, foffset);
7116 /* End of NameorID */
7117 number_of_items = tvb_get_ntohl(tvb, foffset);
7118 proto_tree_add_uint(atree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
7120 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Delivery Addresses");
7121 btree = proto_item_add_subtree(bitem, ett_ndps);
7122 for (i = 1 ; i <= number_of_items; i++ )
7124 if (i > NDPS_MAX_ITEMS) {
7125 proto_tree_add_text(btree, tvb, foffset, -1, "[Truncated]");
7128 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Address %d", i);
7129 ctree = proto_item_add_subtree(citem, ett_ndps);
7130 foffset = address_item(tvb, ctree, foffset);
7131 proto_item_set_end(citem, tvb, foffset);
7133 proto_item_set_end(bitem, tvb, foffset);
7134 foffset = event_object_set(tvb, atree, foffset);
7135 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Account");
7136 btree = proto_item_add_subtree(bitem, ett_ndps);
7137 foffset = qualifiedname(tvb, btree, foffset);
7138 proto_item_set_end(bitem, tvb, foffset);
7139 /* Start of object identifier set */
7140 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Notify Attributes");
7141 btree = proto_item_add_subtree(bitem, ett_ndps);
7142 number_of_items = tvb_get_ntohl(tvb, foffset);
7143 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
7145 for (i = 1 ; i <= number_of_items; i++ )
7147 if (i > NDPS_MAX_ITEMS) {
7148 proto_tree_add_text(btree, tvb, foffset, -1, "[Truncated]");
7151 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Attribute %d", i);
7152 ctree = proto_item_add_subtree(citem, ett_ndps);
7153 foffset = objectidentifier(tvb, ctree, foffset);
7154 proto_item_set_end(citem, tvb, foffset);
7156 proto_item_set_end(bitem, tvb, foffset);
7157 /* End of object identifier set */
7158 proto_tree_add_item(atree, hf_notify_time_interval, tvb, foffset, 4, FALSE);
7160 proto_tree_add_item(atree, hf_notify_sequence_number, tvb, foffset, 4, FALSE);
7162 proto_tree_add_item(atree, hf_notify_lease_exp_time, tvb, foffset, 4, FALSE);
7164 foffset = ndps_string(tvb, hf_notify_printer_uri, atree, foffset, NULL, 0);
7165 proto_item_set_end(aitem, tvb, foffset);
7166 /* End of Eventhandling2 */
7167 length = tvb_get_ntohl(tvb, foffset); /* Added on 10-17-03 */
7171 tvb_ensure_bytes_exist(tvb, foffset, length);
7172 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
7177 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
7185 case 0x060977: /* Broker */
7188 case 0x00000001: /* Bind */
7189 case 0x00000002: /* Unbind */
7190 case 0x00000004: /* Enable Service */
7191 case 0x00000005: /* Disable Service */
7192 case 0x00000006: /* Down Broker */
7193 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7195 case 0x00000003: /* List Services */
7196 number_of_items = tvb_get_ntohl(tvb, foffset);
7197 proto_tree_add_uint(ndps_tree, hf_ndps_num_services, tvb, foffset, 4, number_of_items);
7199 for (i = 1 ; i <= number_of_items; i++ )
7201 if (i > NDPS_MAX_ITEMS) {
7202 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7205 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Service %d", i);
7206 atree = proto_item_add_subtree(aitem, ett_ndps);
7207 proto_tree_add_item(atree, hf_ndps_service_type, tvb, foffset, 4, FALSE);
7209 proto_tree_add_item(atree, hf_ndps_service_enabled, tvb, foffset, 4, FALSE);
7211 proto_item_set_end(aitem, tvb, foffset);
7213 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7215 case 0x00000007: /* Get Broker NDS Object Name */
7216 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset,
7217 4, FALSE); /* XXX - what does this count? */
7219 foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset, NULL, 0);
7220 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
7221 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7223 case 0x00000008: /* Get Broker Session Information */
7228 case 0x060978: /* Registry */
7231 case 0x00000001: /* Bind */
7232 number_of_items = tvb_get_ntohl(tvb, foffset);
7233 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
7235 for (i = 1 ; i <= number_of_items; i++ )
7237 if (i > NDPS_MAX_ITEMS) {
7238 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7241 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Attribute %d", i);
7242 atree = proto_item_add_subtree(aitem, ett_ndps);
7243 length = tvb_get_ntohl(tvb, foffset);
7247 tvb_ensure_bytes_exist(tvb, foffset, length);
7248 proto_tree_add_item(atree, hf_ndps_attribute_set, tvb, foffset, length, FALSE);
7250 proto_item_set_end(aitem, tvb, foffset);
7253 case 0x00000002: /* Unbind */
7256 case 0x00000003: /* Register Server */
7257 case 0x00000004: /* Deregister Server */
7258 case 0x00000005: /* Register Registry */
7259 case 0x00000006: /* Deregister Registry */
7260 case 0x00000007: /* Registry Update */
7261 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7263 case 0x00000008: /* List Local Servers */
7264 case 0x00000009: /* List Servers */
7265 number_of_items = tvb_get_ntohl(tvb, foffset);
7266 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7268 for (i = 1 ; i <= number_of_items; i++ )
7270 if (i > NDPS_MAX_ITEMS) {
7271 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7274 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
7275 atree = proto_item_add_subtree(aitem, ett_ndps);
7276 foffset = server_entry(tvb, atree, foffset);
7277 proto_item_set_end(aitem, tvb, foffset);
7279 length = tvb_get_ntohl(tvb, foffset);
7283 tvb_ensure_bytes_exist(tvb, foffset, length);
7284 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
7287 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7289 case 0x0000000a: /* List Known Registries */
7290 number_of_items = tvb_get_ntohl(tvb, foffset);
7291 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
7293 for (i = 1 ; i <= number_of_items; i++ )
7295 if (i > NDPS_MAX_ITEMS) {
7296 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7299 aitem = proto_tree_add_item(ndps_tree, hf_ndps_client_server_type, tvb, foffset, 4, FALSE);
7300 atree = proto_item_add_subtree(aitem, ett_ndps);
7302 foffset = ndps_string(tvb, hf_ndps_registry_name, atree, foffset, NULL, 0);
7303 foffset = print_address(tvb, atree, foffset);
7305 length = tvb_get_ntohl(tvb, foffset);
7309 tvb_ensure_bytes_exist(tvb, foffset, length);
7310 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
7313 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7315 case 0x0000000b: /* Get Registry NDS Object Name */
7316 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "NDS Printer Name");
7317 atree = proto_item_add_subtree(aitem, ett_ndps);
7318 foffset = qualifiedname(tvb, atree, foffset);
7319 proto_item_set_end(aitem, tvb, foffset);
7320 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7322 case 0x0000000c: /* Get Registry Session Information */
7323 proto_tree_add_item(ndps_tree, hf_ndps_session_type, tvb, foffset, 4, FALSE);
7325 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
7327 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7333 case 0x060979: /* Notify */
7336 case 0x00000001: /* Notify Bind */
7337 number_of_items = tvb_get_ntohl(tvb, foffset);
7338 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
7340 for (i = 1 ; i <= number_of_items; i++ )
7342 if (i > NDPS_MAX_ITEMS) {
7343 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7346 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Attribute %d", i);
7347 atree = proto_item_add_subtree(aitem, ett_ndps);
7348 length = tvb_get_ntohl(tvb, foffset);
7352 tvb_ensure_bytes_exist(tvb, foffset, length);
7353 proto_tree_add_item(atree, hf_ndps_attribute_set, tvb, foffset, length, FALSE);
7355 proto_item_set_end(aitem, tvb, foffset);
7358 case 0x00000002: /* Notify Unbind */
7361 case 0x00000003: /* Register Supplier */
7362 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
7364 foffset = event_object_set(tvb, ndps_tree, foffset);
7365 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7367 case 0x00000004: /* Deregister Supplier */
7368 case 0x0000000b: /* Report Notification */
7369 case 0x0000000d: /* Remove Delivery Method */
7370 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7372 case 0x00000005: /* Add Profile */
7373 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
7375 foffset = event_object_set(tvb, ndps_tree, foffset);
7376 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7378 case 0x00000006: /* Remove Profile */
7379 case 0x00000007: /* Modify Profile */
7380 case 0x00000009: /* Report Event */
7381 foffset = event_object_set(tvb, ndps_tree, foffset);
7382 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7384 case 0x00000008: /* List Profiles */
7385 /* Start of ProfileResultSet */
7386 proto_tree_add_item(ndps_tree, hf_ndps_len, tvb, foffset, 4, FALSE);
7388 /* Start of Eventhandling */
7389 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
7391 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
7393 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer Name");
7394 atree = proto_item_add_subtree(aitem, ett_ndps);
7395 foffset = qualifiedname(tvb, atree, foffset);
7396 proto_item_set_end(aitem, tvb, foffset);
7397 length = tvb_get_ntohl(tvb, foffset);
7401 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
7404 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
7406 /* Start of NameorID */
7407 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
7408 atree = proto_item_add_subtree(aitem, ett_ndps);
7409 foffset = name_or_id(tvb, atree, foffset);
7410 proto_item_set_end(aitem, tvb, foffset);
7411 /* End of NameorID */
7412 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Addresses");
7413 atree = proto_item_add_subtree(aitem, ett_ndps);
7414 number_of_items = tvb_get_ntohl(tvb, foffset);
7415 proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
7417 for (i = 1 ; i <= number_of_items; i++ )
7419 if (i > NDPS_MAX_ITEMS) {
7420 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
7423 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Address %d", i);
7424 btree = proto_item_add_subtree(bitem, ett_ndps);
7425 foffset = address_item(tvb, btree, foffset);
7426 proto_item_set_end(bitem, tvb, foffset);
7428 proto_item_set_end(aitem, tvb, foffset);
7429 foffset = event_object_set(tvb, ndps_tree, foffset);
7430 /* End of Eventhandling */
7431 /* End of ProfileResultSet */
7432 length = tvb_get_ntohl(tvb, foffset);
7436 tvb_ensure_bytes_exist(tvb, foffset, length);
7437 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
7440 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7442 case 0x0000000a: /* List Supported Languages */
7443 /* Start of IntegerSeq */
7444 length = tvb_get_ntohl(tvb, foffset);
7448 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, length, FALSE);
7451 /* End of IntegerSeq */
7452 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7454 case 0x0000000c: /* Add Delivery Method */
7455 /* Start of NameorID */
7456 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
7457 atree = proto_item_add_subtree(aitem, ett_ndps);
7458 foffset = name_or_id(tvb, atree, foffset);
7459 proto_item_set_end(aitem, tvb, foffset);
7460 /* End of NameorID */
7461 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7463 case 0x0000000e: /* List Delivery Methods */
7464 /* Start of DeliveryMethodSet */
7465 number_of_items = tvb_get_ntohl(tvb, foffset);
7466 proto_tree_add_uint(ndps_tree, hf_ndps_delivery_method_count, tvb, foffset, 4, number_of_items);
7468 for (i = 1 ; i <= number_of_items; i++ )
7470 if (i > NDPS_MAX_ITEMS) {
7471 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7474 /* Start of DeliveryMethod */
7475 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method %d", i);
7476 atree = proto_item_add_subtree(aitem, ett_ndps);
7477 /* Start of NameorID */
7478 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Method ID");
7479 btree = proto_item_add_subtree(bitem, ett_ndps);
7480 foffset = name_or_id(tvb, btree, foffset);
7481 foffset += align_4(tvb, foffset);
7482 proto_item_set_end(bitem, tvb, foffset);
7483 /* End of NameorID */
7484 foffset = ndps_string(tvb, hf_ndps_method_name, atree, foffset, NULL, 0);
7485 foffset = ndps_string(tvb, hf_ndps_method_ver, atree, foffset, NULL, 0);
7486 foffset = ndps_string(tvb, hf_ndps_file_name, atree, foffset, NULL, 0);
7487 proto_tree_add_item(atree, hf_ndps_admin_submit, tvb, foffset, 4, FALSE);
7489 proto_item_set_end(aitem, tvb, foffset);
7490 /* End of DeliveryMethod */
7492 /* End of DeliveryMethodSet */
7493 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7495 case 0x0000000f: /* Get Delivery Method Information */
7496 /* Start of DeliveryMethod */
7497 /* Start of NameorID */
7498 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
7499 atree = proto_item_add_subtree(aitem, ett_ndps);
7500 foffset = name_or_id(tvb, atree, foffset);
7501 /* End of NameorID */
7502 foffset = ndps_string(tvb, hf_ndps_method_name, atree, foffset, NULL, 0);
7503 foffset = ndps_string(tvb, hf_ndps_method_ver, atree, foffset, NULL, 0);
7504 foffset = ndps_string(tvb, hf_ndps_file_name, atree, foffset, NULL, 0);
7505 proto_tree_add_item(atree, hf_ndps_admin_submit, tvb, foffset, 4, FALSE);
7507 proto_item_set_end(aitem, tvb, foffset);
7508 /* End of DeliveryMethod */
7509 number_of_items = tvb_get_ntohl(tvb, foffset);
7510 proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
7512 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Addresses");
7513 atree = proto_item_add_subtree(aitem, ett_ndps);
7514 for (i = 1 ; i <= number_of_items; i++ )
7516 if (i > NDPS_MAX_ITEMS) {
7517 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
7520 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Address %d", i);
7521 btree = proto_item_add_subtree(bitem, ett_ndps);
7522 foffset = address_item(tvb, btree, foffset);
7523 proto_item_set_end(bitem, tvb, foffset);
7525 proto_item_set_end(aitem, tvb, foffset);
7526 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7528 case 0x00000010: /* Get Notify NDS Object Name */
7529 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset,
7530 4, FALSE); /* XXX - what does this count? */
7532 foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset, NULL, 0);
7533 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
7534 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7536 case 0x00000011: /* Get Notify Session Information */
7537 proto_tree_add_item(ndps_tree, hf_ndps_get_session_type, tvb, foffset, 4, FALSE);
7539 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
7541 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7547 case 0x06097a: /* Resman */
7550 case 0x00000001: /* Bind */
7551 length = tvb_get_ntohl(tvb, foffset);
7555 tvb_ensure_bytes_exist(tvb, foffset, length);
7556 proto_tree_add_item(ndps_tree, hf_ndps_attribute_set, tvb, foffset, length, FALSE);
7559 case 0x00000002: /* Unbind */
7562 case 0x00000003: /* Add Resource File */
7563 case 0x00000004: /* Delete Resource File */
7564 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7566 case 0x00000005: /* List Resources */
7567 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7569 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
7570 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7571 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7575 proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
7577 proto_tree_add_item(ndps_tree, hf_ndps_resource_list_type, tvb, foffset, 4, FALSE);
7578 resource_type = tvb_get_ntohl(tvb, foffset);
7580 switch (resource_type)
7582 case 0: /* Print Drivers */
7583 case 1: /* Printer Definitions */
7584 case 2: /* Printer Definitions Short */
7585 number_of_items = tvb_get_ntohl(tvb, foffset);
7586 proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items);
7588 for (i = 1 ; i <= number_of_items; i++ )
7590 if (i > NDPS_MAX_ITEMS) {
7591 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7594 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Definition %d", i);
7595 atree = proto_item_add_subtree(aitem, ett_ndps);
7596 if (tvb_get_ntohl(tvb, foffset)==0) { /* Offset for old type support */
7599 foffset += 4; /* Item always == 1 */
7600 foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL, 0);
7601 if (tvb_get_ntohl(tvb, foffset)==0) {
7605 foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL, 0);
7606 if (tvb_get_ntohl(tvb, foffset)==0) {
7610 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL, 0);
7611 proto_item_set_end(aitem, tvb, foffset);
7614 case 3: /* Banner Page Files */
7615 number_of_items = tvb_get_ntohl(tvb, foffset);
7616 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7618 for (i = 1 ; i <= number_of_items; i++ )
7620 if (i > NDPS_MAX_ITEMS) {
7621 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7624 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Banner %d", i);
7625 atree = proto_item_add_subtree(aitem, ett_ndps);
7626 foffset = ndps_string(tvb, hf_ndps_banner_name, atree, foffset, NULL, 0);
7627 proto_item_set_end(aitem, tvb, foffset);
7630 case 4: /* Font Types */
7631 number_of_items = tvb_get_ntohl(tvb, foffset);
7632 proto_tree_add_uint(ndps_tree, hf_ndps_font_type_count, tvb, foffset, 4, number_of_items);
7634 for (i = 1 ; i <= number_of_items; i++ )
7636 if (i > NDPS_MAX_ITEMS) {
7637 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7640 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Font %d", i);
7641 atree = proto_item_add_subtree(aitem, ett_ndps);
7642 foffset = ndps_string(tvb, hf_font_type_name, atree, foffset, NULL, 0);
7643 proto_item_set_end(aitem, tvb, foffset);
7646 case 7: /* Font Files */
7647 number_of_items = tvb_get_ntohl(tvb, foffset);
7648 proto_tree_add_uint(ndps_tree, hf_ndps_font_file_count, tvb, foffset, 4, number_of_items);
7650 for (i = 1 ; i <= number_of_items; i++ )
7652 if (i > NDPS_MAX_ITEMS) {
7653 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7656 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Font File %d", i);
7657 atree = proto_item_add_subtree(aitem, ett_ndps);
7658 foffset = ndps_string(tvb, hf_font_file_name, atree, foffset, NULL, 0);
7659 proto_item_set_end(aitem, tvb, foffset);
7662 case 5: /* Printer Driver Files */
7663 case 12: /* Printer Driver Files 2 */
7664 case 9: /* Generic Files */
7665 number_of_items = tvb_get_ntohl(tvb, foffset);
7666 proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items);
7668 for (i = 1 ; i <= number_of_items; i++ )
7670 if (i > NDPS_MAX_ITEMS) {
7671 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7674 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "File %d", i);
7675 atree = proto_item_add_subtree(aitem, ett_ndps);
7676 foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL, 0);
7677 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL, 0);
7678 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL, 0);
7679 proto_item_set_end(aitem, tvb, foffset);
7682 case 6: /* Printer Definition File */
7683 number_of_items = tvb_get_ntohl(tvb, foffset);
7684 proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items);
7686 for (i = 1 ; i <= number_of_items; i++ )
7688 if (i > NDPS_MAX_ITEMS) {
7689 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7692 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Definition %d", i);
7693 atree = proto_item_add_subtree(aitem, ett_ndps);
7694 foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL, 0);
7695 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL, 0);
7696 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL, 0);
7697 proto_item_set_end(aitem, tvb, foffset);
7699 number_of_items = tvb_get_ntohl(tvb, foffset);
7700 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7702 for (i = 1 ; i <= number_of_items; i++ )
7704 if (i > NDPS_MAX_ITEMS) {
7705 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7708 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
7709 atree = proto_item_add_subtree(aitem, ett_ndps);
7710 foffset = ndps_string(tvb, hf_ndps_def_file_name, atree, foffset, NULL, 0);
7711 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7712 proto_tree_add_uint(atree, hf_ndps_num_win31_keys, tvb, foffset, 4, number_of_items2);
7713 bitem = proto_tree_add_text(atree, tvb, foffset, 4, "Windows 3.1 Keys");
7714 btree = proto_item_add_subtree(bitem, ett_ndps);
7716 for (i = 1 ; i <= number_of_items2; i++ )
7718 if (i > NDPS_MAX_ITEMS) {
7719 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
7722 foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL, 0);
7724 proto_item_set_end(bitem, tvb, foffset);
7725 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7726 proto_tree_add_uint(atree, hf_ndps_num_win95_keys, tvb, foffset, 4, number_of_items2);
7727 bitem = proto_tree_add_text(atree, tvb, foffset, 4, "Windows 95 Keys");
7728 btree = proto_item_add_subtree(bitem, ett_ndps);
7730 for (i = 1 ; i <= number_of_items2; i++ )
7732 if (i > NDPS_MAX_ITEMS) {
7733 proto_tree_add_text(btree, tvb, foffset, -1, "[Truncated]");
7736 foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL, 0);
7738 proto_item_set_end(bitem, tvb, foffset);
7739 proto_item_set_end(aitem, tvb, foffset);
7742 case 10: /* Printer Definition File 2 */
7743 foffset = ndps_string(tvb, hf_ndps_def_file_name, ndps_tree, foffset, NULL, 0);
7744 number_of_items = tvb_get_ntohl(tvb, foffset);
7745 proto_tree_add_uint(ndps_tree, hf_os_count, tvb, foffset, 4, number_of_items);
7747 for (i = 1 ; i <= number_of_items; i++ )
7749 if (i > NDPS_MAX_ITEMS) {
7750 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7753 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "OS %d", i);
7754 atree = proto_item_add_subtree(aitem, ett_ndps);
7755 proto_tree_add_item(atree, hf_os_type, tvb, foffset, 4, FALSE);
7757 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7758 proto_tree_add_uint(atree, hf_ndps_num_windows_keys, tvb, foffset, 4, number_of_items2);
7760 for (i = 1 ; i <= number_of_items2; i++ )
7762 if (i > NDPS_MAX_ITEMS) {
7763 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
7766 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Key %d", i);
7767 btree = proto_item_add_subtree(bitem, ett_ndps);
7768 foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL, 0);
7769 proto_item_set_end(bitem, tvb, foffset);
7771 proto_item_set_end(aitem, tvb, foffset);
7774 case 8: /* Generic Type */
7775 case 11: /* Printer Driver Types 2 */
7776 case 13: /* Printer Driver Types Archive */
7777 number_of_items = tvb_get_ntohl(tvb, foffset);
7778 proto_tree_add_uint(ndps_tree, hf_ndps_printer_type_count, tvb, foffset, 4, number_of_items);
7780 for (i = 1 ; i <= number_of_items; i++ )
7782 if (i > NDPS_MAX_ITEMS) {
7783 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7786 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Type %d", i);
7787 atree = proto_item_add_subtree(aitem, ett_ndps);
7788 foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL, 0);
7789 foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL, 0);
7790 foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL, 0);
7791 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL, 0);
7792 proto_tree_add_item(atree, hf_archive_type, tvb, foffset, 4, FALSE);
7794 proto_tree_add_item(atree, hf_archive_file_size, tvb, foffset, 4, FALSE);
7796 proto_item_set_end(aitem, tvb, foffset);
7799 case 14: /* Languages Available */
7800 number_of_items = tvb_get_ntohl(tvb, foffset);
7801 proto_tree_add_uint(ndps_tree, hf_ndps_language_count, tvb, foffset, 4, number_of_items);
7803 for (i = 1 ; i <= number_of_items; i++ )
7805 if (i > NDPS_MAX_ITEMS) {
7806 proto_tree_add_text(ndps_tree, tvb, foffset, -1, "[Truncated]");
7809 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Language %d", i);
7810 atree = proto_item_add_subtree(aitem, ett_ndps);
7811 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
7813 proto_item_set_end(aitem, tvb, foffset);
7820 case 0x00000006: /* Get Resource File */
7821 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7823 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
7824 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7825 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7829 proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, FALSE);
7831 proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, FALSE);
7833 proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset, -1, FALSE);
7835 case 0x00000007: /* Get Resource File Date */
7836 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7838 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
7839 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7840 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7844 proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, FALSE);
7847 case 0x00000008: /* Get Resource Manager NDS Object Name */
7848 foffset = qualifiedname(tvb, ndps_tree, foffset);
7849 proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
7852 case 0x00000009: /* Get Resource Manager Session Information */
7853 proto_tree_add_item(ndps_tree, hf_ndps_get_resman_session_type, tvb, foffset, 4, FALSE);
7855 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
7857 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7859 case 0x0000000a: /* Set Resource Language Context */
7860 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7862 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
7863 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7864 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7868 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
7875 case 0x06097b: /* Delivery */
7878 case 0x00000001: /* Delivery Bind */
7879 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7881 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
7882 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7884 case 0x00000002: /* Delivery Unbind */
7887 case 0x00000003: /* Delivery Send */
7888 case 0x00000004: /* Delivery Send2 */
7889 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7891 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
7892 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7893 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7897 number_of_items=tvb_get_ntohl(tvb, foffset);
7898 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7900 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Failed Items");
7901 atree = proto_item_add_subtree(aitem, ett_ndps);
7902 for (i = 1 ; i <= number_of_items; i++ )
7904 if (i > NDPS_MAX_ITEMS) {
7905 proto_tree_add_text(atree, tvb, foffset, -1, "[Truncated]");
7908 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Item %d", i);
7909 btree = proto_item_add_subtree(bitem, ett_ndps);
7910 length=tvb_get_ntohl(tvb, foffset);
7911 length_remaining = tvb_length_remaining(tvb, foffset);
7912 if(length_remaining == -1 || (guint32) length_remaining < length)
7916 proto_tree_add_item(btree, hf_ndps_item_ptr, tvb, foffset, length, FALSE);
7918 proto_item_set_end(bitem, tvb, foffset);
7920 proto_item_set_end(aitem, tvb, foffset);
7933 proto_register_ndps(void)
7935 static hf_register_info hf_ndps[] = {
7936 { &hf_ndps_record_mark,
7937 { "Record Mark", "ndps.record_mark", FT_UINT16, BASE_HEX, NULL, 0x0,
7938 "Record Mark", HFILL }},
7940 { &hf_ndps_packet_type,
7941 { "Packet Type", "ndps.packet_type",
7942 FT_UINT32, BASE_HEX, VALS(ndps_packet_types), 0x0,
7943 "Packet Type", HFILL }},
7946 { "Record Length", "ndps.record_length",
7947 FT_UINT16, BASE_DEC, NULL, 0x0,
7948 "Record Length", HFILL }},
7951 { "Exchange ID", "ndps.xid",
7952 FT_UINT32, BASE_HEX, NULL, 0x0,
7953 "Exchange ID", HFILL }},
7955 { &hf_ndps_rpc_version,
7956 { "RPC Version", "ndps.rpc_version",
7957 FT_UINT32, BASE_HEX, NULL, 0x0,
7958 "RPC Version", HFILL }},
7960 { &hf_spx_ndps_program,
7961 { "NDPS Program Number", "spx.ndps_program",
7962 FT_UINT32, BASE_HEX, VALS(spx_ndps_program_vals), 0x0,
7963 "NDPS Program Number", HFILL }},
7965 { &hf_spx_ndps_version,
7966 { "Program Version", "spx.ndps_version",
7967 FT_UINT32, BASE_DEC, NULL, 0x0,
7968 "Program Version", HFILL }},
7971 { "NDPS Error", "spx.ndps_error",
7972 FT_UINT32, BASE_HEX, NULL, 0x0,
7973 "NDPS Error", HFILL }},
7975 { &hf_spx_ndps_func_print,
7976 { "Print Program", "spx.ndps_func_print",
7977 FT_UINT32, BASE_HEX, VALS(spx_ndps_print_func_vals), 0x0,
7978 "Print Program", HFILL }},
7980 { &hf_spx_ndps_func_notify,
7981 { "Notify Program", "spx.ndps_func_notify",
7982 FT_UINT32, BASE_HEX, VALS(spx_ndps_notify_func_vals), 0x0,
7983 "Notify Program", HFILL }},
7985 { &hf_spx_ndps_func_delivery,
7986 { "Delivery Program", "spx.ndps_func_delivery",
7987 FT_UINT32, BASE_HEX, VALS(spx_ndps_deliver_func_vals), 0x0,
7988 "Delivery Program", HFILL }},
7990 { &hf_spx_ndps_func_registry,
7991 { "Registry Program", "spx.ndps_func_registry",
7992 FT_UINT32, BASE_HEX, VALS(spx_ndps_registry_func_vals), 0x0,
7993 "Registry Program", HFILL }},
7995 { &hf_spx_ndps_func_resman,
7996 { "ResMan Program", "spx.ndps_func_resman",
7997 FT_UINT32, BASE_HEX, VALS(spx_ndps_resman_func_vals), 0x0,
7998 "ResMan Program", HFILL }},
8000 { &hf_spx_ndps_func_broker,
8001 { "Broker Program", "spx.ndps_func_broker",
8002 FT_UINT32, BASE_HEX, VALS(spx_ndps_broker_func_vals), 0x0,
8003 "Broker Program", HFILL }},
8005 { &hf_ndps_num_objects,
8006 { "Number of Objects", "ndps.num_objects",
8007 FT_UINT32, BASE_DEC, NULL, 0x0,
8008 "Number of Objects", HFILL }},
8010 { &hf_ndps_num_attributes,
8011 { "Number of Attributes", "ndps.num_attributes",
8012 FT_UINT32, BASE_DEC, NULL, 0x0,
8013 "Number of Attributes", HFILL }},
8016 { "Server", "ndps.sbuffer",
8017 FT_UINT32, BASE_DEC, NULL, 0x0,
8021 { "Connection", "ndps.rbuffer",
8022 FT_UINT32, BASE_DEC, NULL, 0x0,
8023 "Connection", HFILL }},
8025 { &hf_ndps_user_name,
8026 { "Trustee Name", "ndps.user_name",
8027 FT_STRING, BASE_NONE, NULL, 0x0,
8028 "Trustee Name", HFILL }},
8030 { &hf_ndps_broker_name,
8031 { "Broker Name", "ndps.broker_name",
8032 FT_STRING, BASE_NONE, NULL, 0x0,
8033 "Broker Name", HFILL }},
8035 { &hf_ndps_num_results,
8036 { "Number of Results", "ndps.num_results",
8037 FT_UINT32, BASE_DEC, NULL, 0x0,
8038 "Number of Results", HFILL }},
8040 { &hf_ndps_num_options,
8041 { "Number of Options", "ndps.num_options",
8042 FT_UINT32, BASE_DEC, NULL, 0x0,
8043 "Number of Options", HFILL }},
8045 { &hf_ndps_num_jobs,
8046 { "Number of Jobs", "ndps.num_jobs",
8047 FT_UINT32, BASE_DEC, NULL, 0x0,
8048 "Number of Jobs", HFILL }},
8051 { "Printer Name", "ndps.pa_name",
8052 FT_STRING, BASE_NONE, NULL, 0x0,
8053 "Printer Name", HFILL }},
8056 { "Tree", "ndps.tree",
8057 FT_STRING, BASE_NONE, NULL, 0x0,
8060 { &hf_ndps_reqframe,
8061 { "Request Frame", "ndps.reqframe",
8062 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
8063 "Request Frame", HFILL }},
8065 { &hf_ndps_error_val,
8066 { "Return Status", "ndps.error_val",
8067 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
8068 "Return Status", HFILL }},
8071 { "Object ID", "ndps.object",
8072 FT_UINT32, BASE_HEX, NULL, 0x0,
8073 "Object ID", HFILL }},
8075 { &hf_ndps_cred_type,
8076 { "Credential Type", "ndps.cred_type",
8077 FT_UINT32, BASE_HEX, VALS(ndps_credential_enum), 0x0,
8078 "Credential Type", HFILL }},
8080 { &hf_ndps_server_name,
8081 { "Server Name", "ndps.server_name",
8082 FT_STRING, BASE_DEC, NULL, 0x0,
8083 "Server Name", HFILL }},
8085 { &hf_ndps_connection,
8086 { "Connection", "ndps.connection",
8087 FT_UINT16, BASE_DEC, NULL, 0x0,
8088 "Connection", HFILL }},
8090 { &hf_ndps_ext_error,
8091 { "Extended Error Code", "ndps.ext_error",
8092 FT_UINT32, BASE_HEX, NULL, 0x0,
8093 "Extended Error Code", HFILL }},
8095 { &hf_ndps_auth_null,
8096 { "Auth Null", "ndps.auth_null",
8097 FT_BYTES, BASE_NONE, NULL, 0x0,
8098 "Auth Null", HFILL }},
8100 { &hf_ndps_rpc_accept,
8101 { "RPC Accept or Deny", "ndps.rpc_acc",
8102 FT_UINT32, BASE_HEX, VALS(true_false), 0x0,
8103 "RPC Accept or Deny", HFILL }},
8105 { &hf_ndps_rpc_acc_stat,
8106 { "RPC Accept Status", "ndps.rpc_acc_stat",
8107 FT_UINT32, BASE_HEX, VALS(accept_stat), 0x0,
8108 "RPC Accept Status", HFILL }},
8110 { &hf_ndps_rpc_rej_stat,
8111 { "RPC Reject Status", "ndps.rpc_rej_stat",
8112 FT_UINT32, BASE_HEX, VALS(reject_stat), 0x0,
8113 "RPC Reject Status", HFILL }},
8115 { &hf_ndps_rpc_acc_results,
8116 { "RPC Accept Results", "ndps.rpc_acc_res",
8117 FT_UINT32, BASE_HEX, NULL, 0x0,
8118 "RPC Accept Results", HFILL }},
8120 { &hf_ndps_problem_type,
8121 { "Problem Type", "ndps.rpc_prob_type",
8122 FT_UINT32, BASE_HEX, VALS(error_type_enum), 0x0,
8123 "Problem Type", HFILL }},
8125 { &hf_security_problem_type,
8126 { "Security Problem", "ndps.rpc_sec_prob",
8127 FT_UINT32, BASE_HEX, VALS(security_problem_enum), 0x0,
8128 "Security Problem", HFILL }},
8130 { &hf_service_problem_type,
8131 { "Service Problem", "ndps.rpc_serv_prob",
8132 FT_UINT32, BASE_HEX, VALS(service_problem_enum), 0x0,
8133 "Service Problem", HFILL }},
8135 { &hf_access_problem_type,
8136 { "Access Problem", "ndps.rpc_acc_prob",
8137 FT_UINT32, BASE_HEX, VALS(access_problem_enum), 0x0,
8138 "Access Problem", HFILL }},
8140 { &hf_printer_problem_type,
8141 { "Printer Problem", "ndps.rpc_print_prob",
8142 FT_UINT32, BASE_HEX, VALS(printer_problem_enum), 0x0,
8143 "Printer Problem", HFILL }},
8145 { &hf_selection_problem_type,
8146 { "Selection Problem", "ndps.rpc_sel_prob",
8147 FT_UINT32, BASE_HEX, VALS(selection_problem_enum), 0x0,
8148 "Selection Problem", HFILL }},
8150 { &hf_doc_access_problem_type,
8151 { "Document Access Problem", "ndps.rpc_doc_acc_prob",
8152 FT_UINT32, BASE_HEX, VALS(doc_access_problem_enum), 0x0,
8153 "Document Access Problem", HFILL }},
8155 { &hf_attribute_problem_type,
8156 { "Attribute Problem", "ndps.rpc_attr_prob",
8157 FT_UINT32, BASE_HEX, VALS(attribute_problem_enum), 0x0,
8158 "Attribute Problem", HFILL }},
8160 { &hf_update_problem_type,
8161 { "Update Problem", "ndps.rpc_update_prob",
8162 FT_UINT32, BASE_HEX, VALS(update_problem_enum), 0x0,
8163 "Update Problem", HFILL }},
8166 { "Object ID Type", "ndps.rpc_obj_id_type",
8167 FT_UINT32, BASE_HEX, VALS(obj_identification_enum), 0x0,
8168 "Object ID Type", HFILL }},
8170 { &hf_oid_struct_size,
8171 { "OID Struct Size", "ndps.rpc_oid_struct_size",
8172 FT_UINT16, BASE_DEC, NULL, 0x0,
8173 "OID Struct Size", HFILL }},
8176 { "Object Name", "ndps.ndps_object_name",
8177 FT_STRING, BASE_NONE, NULL, 0x0,
8178 "Object Name", HFILL }},
8180 { &hf_ndps_document_number,
8181 { "Document Number", "ndps.ndps_doc_num",
8182 FT_UINT32, BASE_HEX, NULL, 0x0,
8183 "Document Number", HFILL }},
8185 { &hf_ndps_doc_content,
8186 { "Document Content", "ndps.ndps_doc_content",
8187 FT_UINT32, BASE_HEX, NULL, 0x0,
8188 "Document Content", HFILL }},
8190 { &hf_ndps_nameorid,
8191 { "Name or ID Type", "ndps.ndps_nameorid",
8192 FT_UINT32, BASE_HEX, VALS(nameorid_enum), 0x0,
8193 "Name or ID Type", HFILL }},
8195 { &hf_local_object_name,
8196 { "Local Object Name", "ndps.ndps_loc_object_name",
8197 FT_STRING, BASE_NONE, NULL, 0x0,
8198 "Local Object Name", HFILL }},
8201 { "Printer Name", "ndps.ndps_printer_name",
8202 FT_STRING, BASE_NONE, NULL, 0x0,
8203 "Printer Name", HFILL }},
8205 { &hf_ndps_qualified_name,
8206 { "Qualified Name Type", "ndps.ndps_qual_name_type",
8207 FT_UINT32, BASE_HEX, VALS(qualified_name_enum), 0x0,
8208 "Qualified Name Type", HFILL }},
8210 { &hf_ndps_qualified_name2,
8211 { "Qualified Name Type", "ndps.ndps_qual_name_type2",
8212 FT_UINT32, BASE_HEX, VALS(qualified_name_enum2), 0x0,
8213 "Qualified Name Type", HFILL }},
8215 { &hf_ndps_item_count,
8216 { "Number of Items", "ndps.ndps_item_count",
8217 FT_UINT32, BASE_DEC, NULL, 0x0,
8218 "Number of Items", HFILL }},
8220 { &hf_ndps_num_passwords,
8221 { "Number of Passwords", "ndps.num_passwords",
8222 FT_UINT32, BASE_DEC, NULL, 0x0,
8223 "Number of Passwords", HFILL }},
8225 { &hf_ndps_num_servers,
8226 { "Number of Servers", "ndps.num_servers",
8227 FT_UINT32, BASE_DEC, NULL, 0x0,
8228 "Number of Servers", HFILL }},
8230 { &hf_ndps_num_locations,
8231 { "Number of Locations", "ndps.num_locations",
8232 FT_UINT32, BASE_DEC, NULL, 0x0,
8233 "Number of Locations", HFILL }},
8235 { &hf_ndps_num_areas,
8236 { "Number of Areas", "ndps.num_areas",
8237 FT_UINT32, BASE_DEC, NULL, 0x0,
8238 "Number of Areas", HFILL }},
8240 { &hf_ndps_num_address_items,
8241 { "Number of Address Items", "ndps.num_address_items",
8242 FT_UINT32, BASE_DEC, NULL, 0x0,
8243 "Number of Address Items", HFILL }},
8245 { &hf_ndps_num_job_categories,
8246 { "Number of Job Categories", "ndps.num_job_categories",
8247 FT_UINT32, BASE_DEC, NULL, 0x0,
8248 "Number of Job Categories", HFILL }},
8250 { &hf_ndps_num_page_selects,
8251 { "Number of Page Select Items", "ndps.num_page_selects",
8252 FT_UINT32, BASE_DEC, NULL, 0x0,
8253 "Number of Page Select Items", HFILL }},
8255 { &hf_ndps_num_page_informations,
8256 { "Number of Page Information Items", "ndps.num_page_informations",
8257 FT_UINT32, BASE_DEC, NULL, 0x0,
8258 "Number of Page Information Items", HFILL }},
8260 { &hf_ndps_num_names,
8261 { "Number of Names", "ndps.num_names",
8262 FT_UINT32, BASE_DEC, NULL, 0x0,
8263 "Number of Names", HFILL }},
8265 { &hf_ndps_num_categories,
8266 { "Number of Categories", "ndps.num_categories",
8267 FT_UINT32, BASE_DEC, NULL, 0x0,
8268 "Number of Categories", HFILL }},
8270 { &hf_ndps_num_colorants,
8271 { "Number of Colorants", "ndps.num_colorants",
8272 FT_UINT32, BASE_DEC, NULL, 0x0,
8273 "Number of Colorants", HFILL }},
8275 { &hf_ndps_num_events,
8276 { "Number of Events", "ndps.num_events",
8277 FT_UINT32, BASE_DEC, NULL, 0x0,
8278 "Number of Events", HFILL }},
8280 { &hf_ndps_num_args,
8281 { "Number of Arguments", "ndps.num_argss",
8282 FT_UINT32, BASE_DEC, NULL, 0x0,
8283 "Number of Arguments", HFILL }},
8285 { &hf_ndps_num_transfer_methods,
8286 { "Number of Transfer Methods", "ndps.num_transfer_methods",
8287 FT_UINT32, BASE_DEC, NULL, 0x0,
8288 "Number of Transfer Methods", HFILL }},
8290 { &hf_ndps_num_doc_types,
8291 { "Number of Document Types", "ndps.num_doc_types",
8292 FT_UINT32, BASE_DEC, NULL, 0x0,
8293 "Number of Document Types", HFILL }},
8295 { &hf_ndps_num_destinations,
8296 { "Number of Destinations", "ndps.num_destinations",
8297 FT_UINT32, BASE_DEC, NULL, 0x0,
8298 "Number of Destinations", HFILL }},
8300 { &hf_ndps_qualifier,
8301 { "Qualifier", "ndps.ndps_qual",
8302 FT_UINT32, BASE_HEX, NULL, 0x0,
8303 "Qualifier", HFILL }},
8305 { &hf_ndps_lib_error,
8306 { "Lib Error", "ndps.ndps_lib_error",
8307 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
8308 "Lib Error", HFILL }},
8310 { &hf_ndps_other_error,
8311 { "Other Error", "ndps.ndps_other_error",
8312 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
8313 "Other Error", HFILL }},
8315 { &hf_ndps_other_error_2,
8316 { "Other Error 2", "ndps.ndps_other_error_2",
8317 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
8318 "Other Error 2", HFILL }},
8321 { "Session Handle", "ndps.ndps_session",
8322 FT_UINT32, BASE_HEX, NULL, 0x0,
8323 "Session Handle", HFILL }},
8325 { &hf_ndps_abort_flag,
8326 { "Abort?", "ndps.ndps_abort",
8327 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8330 { &hf_obj_attribute_type,
8331 { "Value Syntax", "ndps.ndps_attrib_type",
8332 FT_UINT32, BASE_HEX, VALS(ndps_attribute_enum), 0x0,
8333 "Value Syntax", HFILL }},
8335 { &hf_ndps_attribute_value,
8336 { "Value", "ndps.attribue_value",
8337 FT_UINT32, BASE_HEX, NULL, 0x0,
8340 { &hf_ndps_lower_range,
8341 { "Lower Range", "ndps.lower_range",
8342 FT_UINT32, BASE_HEX, NULL, 0x0,
8343 "Lower Range", HFILL }},
8345 { &hf_ndps_upper_range,
8346 { "Upper Range", "ndps.upper_range",
8347 FT_UINT32, BASE_HEX, NULL, 0x0,
8348 "Upper Range", HFILL }},
8351 { "Value", "ndps.n64",
8352 FT_BYTES, BASE_NONE, NULL, 0x0,
8355 { &hf_ndps_lower_range_n64,
8356 { "Lower Range", "ndps.lower_range_n64",
8357 FT_BYTES, BASE_NONE, NULL, 0x0,
8358 "Lower Range", HFILL }},
8360 { &hf_ndps_upper_range_n64,
8361 { "Upper Range", "ndps.upper_range_n64",
8362 FT_BYTES, BASE_NONE, NULL, 0x0,
8363 "Upper Range", HFILL }},
8365 { &hf_ndps_attrib_boolean,
8366 { "Value?", "ndps.ndps_attrib_boolean",
8367 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8370 { &hf_ndps_realization,
8371 { "Realization Type", "ndps.ndps_realization",
8372 FT_UINT32, BASE_HEX, VALS(ndps_realization_enum), 0x0,
8373 "Realization Type", HFILL }},
8375 { &hf_ndps_xdimension_n64,
8376 { "X Dimension", "ndps.xdimension_n64",
8377 FT_BYTES, BASE_NONE, NULL, 0x0,
8378 "X Dimension", HFILL }},
8380 { &hf_ndps_ydimension_n64,
8381 { "Y Dimension", "ndps.xdimension_n64",
8382 FT_BYTES, BASE_NONE, NULL, 0x0,
8383 "Y Dimension", HFILL }},
8385 { &hf_ndps_dim_value,
8386 { "Dimension Value Type", "ndps.ndps_dim_value",
8387 FT_UINT32, BASE_HEX, VALS(ndps_dim_value_enum), 0x0,
8388 "Dimension Value Type", HFILL }},
8390 { &hf_ndps_dim_flag,
8391 { "Dimension Flag", "ndps.ndps_dim_falg",
8392 FT_UINT32, BASE_HEX, NULL, 0x0,
8393 "Dimension Flag", HFILL }},
8395 { &hf_ndps_xydim_value,
8396 { "XY Dimension Value Type", "ndps.ndps_xydim_value",
8397 FT_UINT32, BASE_HEX, VALS(ndps_xydim_value_enum), 0x0,
8398 "XY Dimension Value Type", HFILL }},
8400 { &hf_ndps_location_value,
8401 { "Location Value Type", "ndps.ndps_location_value",
8402 FT_UINT32, BASE_HEX, VALS(ndps_location_value_enum), 0x0,
8403 "Location Value Type", HFILL }},
8405 { &hf_ndps_xmin_n64,
8406 { "Minimum X Dimension", "ndps.xmin_n64",
8407 FT_BYTES, BASE_NONE, NULL, 0x0,
8408 "Minimum X Dimension", HFILL }},
8410 { &hf_ndps_xmax_n64,
8411 { "Maximum X Dimension", "ndps.xmax_n64",
8412 FT_BYTES, BASE_NONE, NULL, 0x0,
8413 "Maximum X Dimension", HFILL }},
8415 { &hf_ndps_ymin_n64,
8416 { "Minimum Y Dimension", "ndps.ymin_n64",
8417 FT_BYTES, BASE_NONE, NULL, 0x0,
8418 "Minimum Y Dimension", HFILL }},
8420 { &hf_ndps_ymax_n64,
8421 { "Maximum Y Dimension", "ndps.ymax_n64",
8422 FT_BYTES, BASE_NONE, NULL, 0x0,
8423 "Maximum Y Dimension", HFILL }},
8425 { &hf_ndps_edge_value,
8426 { "Edge Value", "ndps.ndps_edge_value",
8427 FT_UINT32, BASE_HEX, VALS(ndps_edge_value_enum), 0x0,
8428 "Edge Value", HFILL }},
8430 { &hf_ndps_cardinal_or_oid,
8431 { "Cardinal or OID", "ndps.ndps_car_or_oid",
8432 FT_UINT32, BASE_HEX, VALS(ndps_card_or_oid_enum), 0x0,
8433 "Cardinal or OID", HFILL }},
8435 { &hf_ndps_cardinal_name_or_oid,
8436 { "Cardinal Name or OID", "ndps.ndps_car_name_or_oid",
8437 FT_UINT32, BASE_HEX, VALS(ndps_card_name_or_oid_enum), 0x0,
8438 "Cardinal Name or OID", HFILL }},
8440 { &hf_ndps_integer_or_oid,
8441 { "Integer or OID", "ndps.ndps_integer_or_oid",
8442 FT_UINT32, BASE_HEX, VALS(ndps_integer_or_oid_enum), 0x0,
8443 "Integer or OID", HFILL }},
8445 { &hf_ndps_profile_id,
8446 { "Profile ID", "ndps.ndps_profile_id",
8447 FT_UINT32, BASE_HEX, NULL, 0x0,
8448 "Profile ID", HFILL }},
8450 { &hf_ndps_persistence,
8451 { "Persistence", "ndps.ndps_persistence",
8452 FT_UINT32, BASE_HEX, VALS(ndps_persistence_enum), 0x0,
8453 "Persistence", HFILL }},
8455 { &hf_ndps_language_count,
8456 { "Number of Languages", "ndps.ndps_language_count",
8457 FT_UINT32, BASE_DEC, NULL, 0x0,
8458 "Number of Languages", HFILL }},
8460 { &hf_ndps_language_id,
8461 { "Language ID", "ndps.ndps_lang_id",
8462 FT_UINT32, BASE_HEX, NULL, 0x0,
8463 "Language ID", HFILL }},
8466 { "Address Type", "ndps.ndps_address_type",
8467 FT_UINT32, BASE_HEX, VALS(ndps_address_type_enum), 0x0,
8468 "Address Type", HFILL }},
8471 { "Address", "ndps.ndps_address",
8472 FT_UINT32, BASE_HEX, VALS(ndps_address_enum), 0x0,
8473 "Address", HFILL }},
8475 { &hf_ndps_add_bytes,
8476 { "Address Bytes", "ndps.add_bytes",
8477 FT_BYTES, BASE_NONE, NULL, 0x0,
8478 "Address Bytes", HFILL }},
8480 { &hf_ndps_event_type,
8481 { "Event Type", "ndps.ndps_event_type",
8482 FT_UINT32, BASE_HEX, NULL, 0x0,
8483 "Event Type", HFILL }},
8485 { &hf_ndps_event_object_identifier,
8486 { "Event Object Type", "ndps.ndps_event_object_identifier",
8487 FT_UINT32, BASE_HEX, VALS(ndps_event_object_enum), 0x0,
8488 "Event Object Type", HFILL }},
8490 { &hf_ndps_octet_string,
8491 { "Octet String", "ndps.octet_string",
8492 FT_BYTES, BASE_NONE, NULL, 0x0,
8493 "Octet String", HFILL }},
8496 { "Scope", "ndps.scope",
8497 FT_UINT32, BASE_HEX, NULL, 0x0,
8501 { "Address Length", "ndps.addr_len",
8502 FT_UINT32, BASE_DEC, NULL, 0x0,
8503 "Address Length", HFILL }},
8506 { "IPX Network", "ndps.net",
8507 FT_IPXNET, BASE_NONE, NULL, 0x0,
8511 { "Node", "ndps.node",
8512 FT_ETHER, BASE_NONE, NULL, 0x0,
8516 { "IPX Socket", "ndps.socket",
8517 FT_UINT16, BASE_HEX, NULL, 0x0,
8518 "IPX Socket", HFILL }},
8521 { "IP Port", "ndps.port",
8522 FT_UINT16, BASE_DEC, NULL, 0x0,
8523 "IP Port", HFILL }},
8526 { "IP Address", "ndps.ip",
8527 FT_IPv4, BASE_DEC, NULL, 0x0,
8528 "IP Address", HFILL }},
8530 { &hf_ndps_server_type,
8531 { "NDPS Server Type", "ndps.ndps_server_type",
8532 FT_UINT32, BASE_HEX, VALS(ndps_server_type_enum), 0x0,
8533 "NDPS Server Type", HFILL }},
8535 { &hf_ndps_num_services,
8536 { "Number of Services", "ndps.ndps_num_services",
8537 FT_UINT32, BASE_DEC, NULL, 0x0,
8538 "Number of Services", HFILL }},
8540 { &hf_ndps_service_type,
8541 { "NDPS Service Type", "ndps.ndps_service_type",
8542 FT_UINT32, BASE_HEX, VALS(ndps_service_type_enum), 0x0,
8543 "NDPS Service Type", HFILL }},
8545 { &hf_ndps_service_enabled,
8546 { "Service Enabled?", "ndps.ndps_service_enabled",
8547 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8548 "Service Enabled?", HFILL }},
8550 { &hf_ndps_method_name,
8551 { "Method Name", "ndps.method_name",
8552 FT_STRING, BASE_NONE, NULL, 0x0,
8553 "Method Name", HFILL }},
8555 { &hf_ndps_method_ver,
8556 { "Method Version", "ndps.method_ver",
8557 FT_STRING, BASE_NONE, NULL, 0x0,
8558 "Method Version", HFILL }},
8560 { &hf_ndps_file_name,
8561 { "File Name", "ndps.file_name",
8562 FT_STRING, BASE_NONE, NULL, 0x0,
8563 "File Name", HFILL }},
8565 { &hf_ndps_admin_submit,
8566 { "Admin Submit Flag?", "ndps.admin_submit_flag",
8567 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8568 "Admin Submit Flag?", HFILL }},
8571 { "Object ID", "ndps.oid",
8572 FT_BYTES, BASE_NONE, NULL, 0x0,
8573 "Object ID", HFILL }},
8575 { &hf_ndps_object_op,
8576 { "Operation", "ndps.ndps_object_op",
8577 FT_UINT32, BASE_HEX, VALS(ndps_object_op_enum), 0x0,
8578 "Operation", HFILL }},
8581 { "Answer Time", "ndps.answer_time",
8582 FT_UINT32, BASE_DEC, NULL, 0x0,
8583 "Answer Time", HFILL }},
8585 { &hf_oid_asn1_type,
8586 { "ASN.1 Type", "ndps.asn1_type",
8587 FT_UINT16, BASE_DEC, NULL, 0x0,
8588 "ASN.1 Type", HFILL }},
8590 { &hf_ndps_item_ptr,
8591 { "Item Pointer", "ndps.item_ptr",
8592 FT_BYTES, BASE_DEC, NULL, 0x0,
8593 "Item Pointer", HFILL }},
8596 { "Length", "ndps.ndps_len",
8597 FT_UINT16, BASE_DEC, NULL, 0x0,
8601 { "Limit Encountered", "ndps.ndps_limit_enc",
8602 FT_UINT32, BASE_HEX, VALS(ndps_limit_enc_enum), 0x0,
8603 "Limit Encountered", HFILL }},
8605 { &hf_ndps_delivery_add_count,
8606 { "Number of Delivery Addresses", "ndps.delivery_add_count",
8607 FT_UINT32, BASE_DEC, NULL, 0x0,
8608 "Number of Delivery Addresses", HFILL }},
8610 { &hf_ndps_delivery_add_type,
8611 { "Delivery Address Type", "ndps.ndps_delivery_add_type",
8612 FT_UINT32, BASE_HEX, VALS(ndps_delivery_add_enum), 0x0,
8613 "Delivery Address Type", HFILL }},
8615 { &hf_ndps_criterion_type,
8616 { "Criterion Type", "ndps.ndps_criterion_type",
8617 FT_UINT32, BASE_HEX, VALS(ndps_attribute_enum), 0x0,
8618 "Criterion Type", HFILL }},
8620 { &hf_ndps_num_ignored_attributes,
8621 { "Number of Ignored Attributes", "ndps.num_ignored_attributes",
8622 FT_UINT32, BASE_DEC, NULL, 0x0,
8623 "Number of Ignored Attributes", HFILL }},
8625 { &hf_ndps_ignored_type,
8626 { "Ignored Type", "ndps.ndps_ignored_type",
8627 FT_UINT32, BASE_HEX, VALS(ndps_attribute_enum), 0x0,
8628 "Ignored Type", HFILL }},
8630 { &hf_ndps_num_resources,
8631 { "Number of Resources", "ndps.ndps_num_resources",
8632 FT_UINT32, BASE_DEC, NULL, 0x0,
8633 "Number of Resources", HFILL }},
8635 { &hf_ndps_resource_type,
8636 { "Resource Type", "ndps.ndps_resource_type",
8637 FT_UINT32, BASE_HEX, VALS(ndps_resource_enum), 0x0,
8638 "Resource Type", HFILL }},
8640 { &hf_ndps_identifier_type,
8641 { "Identifier Type", "ndps.ndps_identifier_type",
8642 FT_UINT32, BASE_HEX, VALS(ndps_identifier_enum), 0x0,
8643 "Identifier Type", HFILL }},
8645 { &hf_ndps_page_flag,
8646 { "Page Flag", "ndps.ndps_page_flag",
8647 FT_UINT32, BASE_HEX, NULL, 0x0,
8648 "Page Flag", HFILL }},
8650 { &hf_ndps_media_type,
8651 { "Media Type", "ndps.ndps_media_type",
8652 FT_UINT32, BASE_HEX, VALS(ndps_media_enum), 0x0,
8653 "Media Type", HFILL }},
8655 { &hf_ndps_page_size,
8656 { "Page Size", "ndps.ndps_page_size",
8657 FT_UINT32, BASE_HEX, VALS(ndps_page_size_enum), 0x0,
8658 "Page Size", HFILL }},
8660 { &hf_ndps_direction,
8661 { "Direction", "ndps.ndps_direction",
8662 FT_UINT32, BASE_HEX, VALS(ndps_pres_direction_enum), 0x0,
8663 "Direction", HFILL }},
8665 { &hf_ndps_page_order,
8666 { "Page Order", "ndps.ndps_page_order",
8667 FT_UINT32, BASE_HEX, VALS(ndps_page_order_enum), 0x0,
8668 "Page Order", HFILL }},
8670 { &hf_ndps_medium_size,
8671 { "Medium Size", "ndps.ndps_medium_size",
8672 FT_UINT32, BASE_HEX, VALS(ndps_medium_size_enum), 0x0,
8673 "Medium Size", HFILL }},
8675 { &hf_ndps_long_edge_feeds,
8676 { "Long Edge Feeds?", "ndps.ndps_long_edge_feeds",
8677 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8678 "Long Edge Feeds?", HFILL }},
8680 { &hf_ndps_inc_across_feed,
8681 { "Increment Across Feed", "ndps.inc_across_feed",
8682 FT_BYTES, BASE_NONE, NULL, 0x0,
8683 "Increment Across Feed", HFILL }},
8685 { &hf_ndps_size_inc_in_feed,
8686 { "Size Increment in Feed", "ndps.size_inc_in_feed",
8687 FT_BYTES, BASE_NONE, NULL, 0x0,
8688 "Size Increment in Feed", HFILL }},
8690 { &hf_ndps_page_orientation,
8691 { "Page Orientation", "ndps.ndps_page_orientation",
8692 FT_UINT32, BASE_HEX, VALS(ndps_page_orientation_enum), 0x0,
8693 "Page Orientation", HFILL }},
8695 { &hf_ndps_numbers_up,
8696 { "Numbers Up", "ndps.ndps_numbers_up",
8697 FT_UINT32, BASE_HEX, VALS(ndps_numbers_up_enum), 0x0,
8698 "Numbers Up", HFILL }},
8700 { &hf_ndps_xdimension,
8701 { "X Dimension", "ndps.ndps_xdimension",
8702 FT_UINT32, BASE_HEX, NULL, 0x0,
8703 "X Dimension", HFILL }},
8705 { &hf_ndps_ydimension,
8706 { "Y Dimension", "ndps.ndps_ydimension",
8707 FT_UINT32, BASE_HEX, NULL, 0x0,
8708 "Y Dimension", HFILL }},
8710 { &hf_ndps_state_severity,
8711 { "State Severity", "ndps.ndps_state_severity",
8712 FT_UINT32, BASE_HEX, VALS(ndps_state_severity_enum), 0x0,
8713 "State Severity", HFILL }},
8715 { &hf_ndps_training,
8716 { "Training", "ndps.ndps_training",
8717 FT_UINT32, BASE_HEX, VALS(ndps_training_enum), 0x0,
8718 "Training", HFILL }},
8720 { &hf_ndps_colorant_set,
8721 { "Colorant Set", "ndps.ndps_colorant_set",
8722 FT_UINT32, BASE_HEX, VALS(ndps_colorant_set_enum), 0x0,
8723 "Colorant Set", HFILL }},
8725 { &hf_ndps_card_enum_time,
8726 { "Cardinal, Enum, or Time", "ndps.ndps_card_enum_time",
8727 FT_UINT32, BASE_HEX, VALS(ndps_card_enum_time_enum), 0x0,
8728 "Cardinal, Enum, or Time", HFILL }},
8730 { &hf_ndps_attrs_arg,
8731 { "List Attribute Operation", "ndps.ndps_attrs_arg",
8732 FT_UINT32, BASE_HEX, VALS(ndps_attrs_arg_enum), 0x0,
8733 "List Attribute Operation", HFILL }},
8735 { &hf_ndps_context_len,
8736 { "Context Length", "ndps.context_len",
8737 FT_UINT32, BASE_DEC, NULL, 0x0,
8738 "Context Length", HFILL }},
8741 { "Context", "ndps.context",
8742 FT_BYTES, BASE_NONE, NULL, 0x0,
8743 "Context", HFILL }},
8746 { "Filter Type", "ndps.ndps_filter",
8747 FT_UINT32, BASE_HEX, VALS(ndps_filter_enum), 0x0,
8748 "Filter Type", HFILL }},
8750 { &hf_ndps_item_filter,
8751 { "Filter Item Operation", "ndps.ndps_filter_item",
8752 FT_UINT32, BASE_HEX, VALS(ndps_filter_item_enum), 0x0,
8753 "Filter Item Operation", HFILL }},
8755 { &hf_ndps_substring_match,
8756 { "Substring Match", "ndps.ndps_substring_match",
8757 FT_UINT32, BASE_HEX, VALS(ndps_match_criteria_enum), 0x0,
8758 "Substring Match", HFILL }},
8760 { &hf_ndps_time_limit,
8761 { "Time Limit", "ndps.ndps_time_limit",
8762 FT_UINT32, BASE_DEC, NULL, 0x0,
8763 "Time Limit", HFILL }},
8765 { &hf_ndps_count_limit,
8766 { "Count Limit", "ndps.ndps_count_limit",
8767 FT_UINT32, BASE_DEC, NULL, 0x0,
8768 "Count Limit", HFILL }},
8770 { &hf_ndps_operator,
8771 { "Operator Type", "ndps.ndps_operator",
8772 FT_UINT32, BASE_DEC, VALS(ndps_operator_enum), 0x0,
8773 "Operator Type", HFILL }},
8775 { &hf_ndps_password,
8776 { "Password", "ndps.password",
8777 FT_BYTES, BASE_NONE, NULL, 0x0,
8778 "Password", HFILL }},
8780 { &hf_ndps_retrieve_restrictions,
8781 { "Retrieve Restrictions", "ndps.ndps_ret_restrict",
8782 FT_UINT32, BASE_DEC, NULL, 0x0,
8783 "Retrieve Restrictions", HFILL }},
8785 { &hf_ndps_bind_security_option_count,
8786 { "Number of Bind Security Options", "ndps.ndps_bind_security_count",
8787 FT_UINT32, BASE_DEC, NULL, 0x0,
8788 "Number of Bind Security Options", HFILL }},
8790 { &hf_bind_security,
8791 { "Bind Security Options", "ndps.ndps_bind_security",
8792 FT_UINT32, BASE_DEC, NULL, 0x0,
8793 "Bind Security Options", HFILL }},
8795 { &hf_ndps_max_items,
8796 { "Maximum Items in List", "ndps.ndps_max_items",
8797 FT_UINT32, BASE_DEC, NULL, 0x0,
8798 "Maximum Items in List", HFILL }},
8800 { &hf_ndps_status_flags,
8801 { "Status Flag", "ndps.ndps_status_flags",
8802 FT_UINT32, BASE_DEC, NULL, 0x0,
8803 "Status Flag", HFILL }},
8805 { &hf_ndps_resource_list_type,
8806 { "Resource Type", "ndps.ndps_resource_type",
8807 FT_UINT32, BASE_DEC, VALS(ndps_resource_type_enum), 0x0,
8808 "Resource Type", HFILL }},
8811 { "Number of OSes", "ndps.os_count",
8812 FT_UINT32, BASE_DEC, NULL, 0x0,
8813 "Number of OSes", HFILL }},
8816 { "OS Type", "ndps.os_type",
8817 FT_UINT32, BASE_DEC, VALS(ndps_os_type_enum), 0x0,
8818 "OS Type", HFILL }},
8820 { &hf_ndps_printer_type_count,
8821 { "Number of Printer Types", "ndps.printer_type_count",
8822 FT_UINT32, BASE_DEC, NULL, 0x0,
8823 "Number of Printer Types", HFILL }},
8825 { &hf_ndps_printer_type,
8826 { "Printer Type", "ndps.prn_type",
8827 FT_STRING, BASE_NONE, NULL, 0x0,
8828 "Printer Type", HFILL }},
8830 { &hf_ndps_printer_manuf,
8831 { "Printer Manufacturer", "ndps.prn_manuf",
8832 FT_STRING, BASE_NONE, NULL, 0x0,
8833 "Printer Manufacturer", HFILL }},
8835 { &hf_ndps_inf_file_name,
8836 { "INF File Name", "ndps.inf_file_name",
8837 FT_STRING, BASE_NONE, NULL, 0x0,
8838 "INF File Name", HFILL }},
8840 { &hf_ndps_vendor_dir,
8841 { "Vendor Directory", "ndps.vendor_dir",
8842 FT_STRING, BASE_NONE, NULL, 0x0,
8843 "Vendor Directory", HFILL }},
8846 { "Banner Type", "ndps.banner_type",
8847 FT_UINT32, BASE_DEC, VALS(ndps_banner_type_enum), 0x0,
8848 "Banner Type", HFILL }},
8851 { "Font Type", "ndps.font_type",
8852 FT_UINT32, BASE_DEC, VALS(ndps_font_type_enum), 0x0,
8853 "Font Type", HFILL }},
8856 { "Printer ID", "ndps.printer_id",
8857 FT_BYTES, BASE_NONE, NULL, 0x0,
8858 "Printer ID", HFILL }},
8860 { &hf_ndps_font_name,
8861 { "Font Name", "ndps.font_name",
8862 FT_STRING, BASE_NONE, NULL, 0x0,
8863 "Font Name", HFILL }},
8865 { &hf_ndps_return_code,
8866 { "Return Code", "ndps.ret_code",
8867 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
8868 "Return Code", HFILL }},
8870 { &hf_ndps_banner_count,
8871 { "Number of Banners", "ndps.banner_count",
8872 FT_UINT32, BASE_DEC, NULL, 0x0,
8873 "Number of Banners", HFILL }},
8875 { &hf_ndps_banner_name,
8876 { "Banner Name", "ndps.banner_name",
8877 FT_STRING, BASE_NONE, NULL, 0x0,
8878 "Banner Name", HFILL }},
8880 { &hf_ndps_font_type_count,
8881 { "Number of Font Types", "ndps.font_type_count",
8882 FT_UINT32, BASE_DEC, NULL, 0x0,
8883 "Number of Font Types", HFILL }},
8885 { &hf_font_type_name,
8886 { "Font Type Name", "ndps.font_type_name",
8887 FT_STRING, BASE_NONE, NULL, 0x0,
8888 "Font Type Name", HFILL }},
8890 { &hf_ndps_font_file_count,
8891 { "Number of Font Files", "ndps.font_file_count",
8892 FT_UINT32, BASE_DEC, NULL, 0x0,
8893 "Number of Font Files", HFILL }},
8895 { &hf_font_file_name,
8896 { "Font File Name", "ndps.font_file_name",
8897 FT_STRING, BASE_NONE, NULL, 0x0,
8898 "Font File Name", HFILL }},
8900 { &hf_ndps_printer_def_count,
8901 { "Number of Printer Definitions", "ndps.printer_def_count",
8902 FT_UINT32, BASE_DEC, NULL, 0x0,
8903 "Number of Printer Definitions", HFILL }},
8905 { &hf_ndps_prn_file_name,
8906 { "Printer File Name", "ndps.print_file_name",
8907 FT_STRING, BASE_NONE, NULL, 0x0,
8908 "Printer File Name", HFILL }},
8910 { &hf_ndps_prn_dir_name,
8911 { "Printer Directory Name", "ndps.print_dir_name",
8912 FT_STRING, BASE_NONE, NULL, 0x0,
8913 "Printer Directory Name", HFILL }},
8915 { &hf_ndps_def_file_name,
8916 { "Printer Definition Name", "ndps.print_def_name",
8917 FT_STRING, BASE_NONE, NULL, 0x0,
8918 "Printer Definition Name", HFILL }},
8920 { &hf_ndps_num_win31_keys,
8921 { "Number of Windows 3.1 Keys", "ndps.num_win31_keys",
8922 FT_UINT32, BASE_DEC, NULL, 0x0,
8923 "Number of Windows 3.1 Keys", HFILL }},
8925 { &hf_ndps_num_win95_keys,
8926 { "Number of Windows 95 Keys", "ndps.num_win95_keys",
8927 FT_UINT32, BASE_DEC, NULL, 0x0,
8928 "Number of Windows 95 Keys", HFILL }},
8930 { &hf_ndps_num_windows_keys,
8931 { "Number of Windows Keys", "ndps.num_windows_keys",
8932 FT_UINT32, BASE_DEC, NULL, 0x0,
8933 "Number of Windows Keys", HFILL }},
8935 { &hf_ndps_windows_key,
8936 { "Windows Key", "ndps.windows_key",
8937 FT_STRING, BASE_NONE, NULL, 0x0,
8938 "Windows Key", HFILL }},
8941 { "Archive Type", "ndps.archive_type",
8942 FT_UINT32, BASE_DEC, VALS(ndps_archive_enum), 0x0,
8943 "Archive Type", HFILL }},
8945 { &hf_archive_file_size,
8946 { "Archive File Size", "ndps.archive_size",
8947 FT_UINT32, BASE_DEC, NULL, 0x0,
8948 "Archive File Size", HFILL }},
8950 { &hf_ndps_segment_overlap,
8951 { "Segment overlap", "ndps.segment.overlap", FT_BOOLEAN, BASE_NONE,
8952 NULL, 0x0, "Segment overlaps with other segments", HFILL }},
8954 { &hf_ndps_segment_overlap_conflict,
8955 { "Conflicting data in segment overlap", "ndps.segment.overlap.conflict",
8956 FT_BOOLEAN, BASE_NONE,
8957 NULL, 0x0, "Overlapping segments contained conflicting data", HFILL }},
8959 { &hf_ndps_segment_multiple_tails,
8960 { "Multiple tail segments found", "ndps.segment.multipletails",
8961 FT_BOOLEAN, BASE_NONE,
8962 NULL, 0x0, "Several tails were found when desegmenting the packet", HFILL }},
8964 { &hf_ndps_segment_too_long_segment,
8965 { "Segment too long", "ndps.segment.toolongsegment", FT_BOOLEAN, BASE_NONE,
8966 NULL, 0x0, "Segment contained data past end of packet", HFILL }},
8968 { &hf_ndps_segment_error,
8969 {"Desegmentation error", "ndps.segment.error", FT_FRAMENUM, BASE_NONE,
8970 NULL, 0x0, "Desegmentation error due to illegal segments", HFILL }},
8973 { "NDPS Fragment", "ndps.fragment", FT_FRAMENUM, BASE_NONE,
8974 NULL, 0x0, "NDPS Fragment", HFILL }},
8976 { &hf_ndps_segments,
8977 { "NDPS Fragments", "ndps.fragments", FT_NONE, BASE_NONE,
8978 NULL, 0x0, "NDPS Fragments", HFILL }},
8981 { "[Data]", "ndps.data", FT_NONE, BASE_NONE,
8982 NULL, 0x0, "[Data]", HFILL }},
8984 { &hf_get_status_flag,
8985 { "Get Status Flag", "ndps.get_status_flags",
8986 FT_UINT32, BASE_DEC, NULL, 0x0,
8987 "Get Status Flag", HFILL }},
8990 { "Resource Type", "ndps.res_type",
8991 FT_UINT32, BASE_DEC, VALS(ndps_res_type_enum), 0x0,
8992 "Resource Type", HFILL }},
8994 { &hf_file_timestamp,
8995 { "File Time Stamp", "ndps.file_time_stamp",
8996 FT_UINT32, BASE_DEC, NULL, 0x0,
8997 "File Time Stamp", HFILL }},
9000 { "Print Type", "ndps.print_arg",
9001 FT_UINT32, BASE_DEC, VALS(ndps_print_arg_enum), 0x0,
9002 "Print Type", HFILL }},
9005 { "Submission Complete?", "ndps.sub_complete", FT_BOOLEAN, BASE_NONE,
9006 NULL, 0x0, "Submission Complete?", HFILL }},
9009 { "Document Content", "ndps.doc_content",
9010 FT_UINT32, BASE_DEC, VALS(ndps_doc_content_enum), 0x0,
9011 "Document Content", HFILL }},
9013 { &hf_ndps_doc_name,
9014 { "Document Name", "ndps.doc_name",
9015 FT_STRING, BASE_NONE, NULL, 0x0,
9016 "Document Name", HFILL }},
9019 { "Local ID", "ndps.local_id",
9020 FT_UINT32, BASE_DEC, NULL, 0x0,
9021 "Local ID", HFILL }},
9023 { &hf_ndps_included_doc_len,
9024 { "Included Document Length", "ndps.included_doc_len",
9025 FT_UINT32, BASE_DEC, NULL, 0x0,
9026 "Included Document Length", HFILL }},
9028 { &hf_ndps_included_doc,
9029 { "Included Document", "ndps.included_doc",
9030 FT_BYTES, BASE_NONE, NULL, 0x0,
9031 "Included Document", HFILL }},
9033 { &hf_ndps_ref_name,
9034 { "Referenced Document Name", "ndps.ref_doc_name",
9035 FT_STRING, BASE_NONE, NULL, 0x0,
9036 "Referenced Document Name", HFILL }},
9038 { &hf_interrupt_job_type,
9039 { "Interrupt Job Identifier", "ndps.interrupt_job_type",
9040 FT_UINT32, BASE_DEC, VALS(ndps_interrupt_job_enum), 0x0,
9041 "Interrupt Job Identifier", HFILL }},
9043 { &hf_pause_job_type,
9044 { "Pause Job Identifier", "ndps.pause_job_type",
9045 FT_UINT32, BASE_DEC, VALS(ndps_pause_job_enum), 0x0,
9046 "Pause Job Identifier", HFILL }},
9049 { "Force?", "ndps.ndps_force",
9050 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9053 { &hf_resubmit_op_type,
9054 { "Resubmit Operation Type", "ndps.resubmit_op_type",
9055 FT_UINT32, BASE_DEC, VALS(ndps_resubmit_op_enum), 0x0,
9056 "Resubmit Operation Type", HFILL }},
9058 { &hf_shutdown_type,
9059 { "Shutdown Type", "ndps.shutdown_type",
9060 FT_UINT32, BASE_DEC, VALS(ndps_shutdown_enum), 0x0,
9061 "Shutdown Type", HFILL }},
9063 { &hf_ndps_supplier_flag,
9064 { "Supplier Data?", "ndps.supplier_flag",
9065 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9066 "Supplier Data?", HFILL }},
9068 { &hf_ndps_language_flag,
9069 { "Language Data?", "ndps.language_flag",
9070 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9071 "Language Data?", HFILL }},
9073 { &hf_ndps_method_flag,
9074 { "Method Data?", "ndps.method_flag",
9075 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9076 "Method Data?", HFILL }},
9078 { &hf_ndps_delivery_address_flag,
9079 { "Delivery Address Data?", "ndps.delivery_flag",
9080 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9081 "Delivery Address Data?", HFILL }},
9083 { &hf_ndps_list_profiles_type,
9084 { "List Profiles Type", "ndps.ndps_list_profiles_type",
9085 FT_UINT32, BASE_HEX, VALS(ndps_attrs_arg_enum), 0x0,
9086 "List Profiles Type", HFILL }},
9088 { &hf_ndps_list_profiles_choice_type,
9089 { "List Profiles Choice Type", "ndps.ndps_list_profiles_choice_type",
9090 FT_UINT32, BASE_HEX, VALS(ndps_list_profiles_choice_enum), 0x0,
9091 "List Profiles Choice Type", HFILL }},
9093 { &hf_ndps_list_profiles_result_type,
9094 { "List Profiles Result Type", "ndps.ndps_list_profiles_result_type",
9095 FT_UINT32, BASE_HEX, VALS(ndps_list_profiles_result_enum), 0x0,
9096 "List Profiles Result Type", HFILL }},
9098 { &hf_ndps_integer_type_flag,
9099 { "Integer Type Flag", "ndps.ndps_integer_type_flag",
9100 FT_UINT32, BASE_HEX, NULL, 0x0,
9101 "Integer Type Flag", HFILL }},
9103 { &hf_ndps_integer_type_value,
9104 { "Integer Type Value", "ndps.ndps_integer_type_value",
9105 FT_UINT32, BASE_HEX, NULL, 0x0,
9106 "Integer Type Value", HFILL }},
9108 { &hf_ndps_continuation_option,
9109 { "Continuation Option", "ndps.ndps_continuation_option",
9110 FT_BYTES, BASE_HEX, NULL, 0x0,
9111 "Continuation Option", HFILL }},
9113 { &hf_ndps_ds_info_type,
9114 { "DS Info Type", "ndps.ndps_ds_info_type",
9115 FT_UINT32, BASE_HEX, VALS(ndps_ds_info_enum), 0x0,
9116 "DS Info Type", HFILL }},
9119 { "GUID", "ndps.guid",
9120 FT_BYTES, BASE_NONE, NULL, 0x0,
9123 { &hf_ndps_list_services_type,
9124 { "Services Type", "ndps.ndps_list_services_type",
9125 FT_UINT32, BASE_HEX, VALS(ndps_list_services_enum), 0x0,
9126 "Services Type", HFILL }},
9128 { &hf_ndps_item_bytes,
9129 { "Item Ptr", "ndps.item_bytes",
9130 FT_BYTES, BASE_NONE, NULL, 0x0,
9131 "Item Ptr", HFILL }},
9133 { &hf_ndps_certified,
9134 { "Certified", "ndps.certified",
9135 FT_BYTES, BASE_NONE, NULL, 0x0,
9136 "Certified", HFILL }},
9138 { &hf_ndps_attribute_set,
9139 { "Attribute Set", "ndps.attribute_set",
9140 FT_BYTES, BASE_NONE, NULL, 0x0,
9141 "Attribute Set", HFILL }},
9143 { &hf_ndps_data_item_type,
9144 { "Item Type", "ndps.ndps_data_item_type",
9145 FT_UINT32, BASE_HEX, VALS(ndps_data_item_enum), 0x0,
9146 "Item Type", HFILL }},
9149 { "Integer Value", "ndps.info_int",
9150 FT_UINT8, BASE_HEX, NULL, 0x0,
9151 "Integer Value", HFILL }},
9154 { "16 Bit Integer Value", "ndps.info_int16",
9155 FT_UINT16, BASE_HEX, NULL, 0x0,
9156 "16 Bit Integer Value", HFILL }},
9159 { "32 Bit Integer Value", "ndps.info_int32",
9160 FT_UINT32, BASE_HEX, NULL, 0x0,
9161 "32 Bit Integer Value", HFILL }},
9164 { "Boolean Value", "ndps.info_boolean",
9165 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9166 "Boolean Value", HFILL }},
9169 { "String Value", "ndps.info_string",
9170 FT_STRING, BASE_NONE, NULL, 0x0,
9171 "String Value", HFILL }},
9174 { "Byte Value", "ndps.info_bytes",
9175 FT_BYTES, BASE_NONE, NULL, 0x0,
9176 "Byte Value", HFILL }},
9178 { &hf_ndps_list_local_servers_type,
9179 { "Server Type", "ndps.ndps_list_local_server_type",
9180 FT_UINT32, BASE_HEX, VALS(ndps_list_local_servers_enum), 0x0,
9181 "Server Type", HFILL }},
9183 { &hf_ndps_registry_name,
9184 { "Registry Name", "ndps.registry_name",
9185 FT_STRING, BASE_NONE, NULL, 0x0,
9186 "Registry Name", HFILL }},
9188 { &hf_ndps_client_server_type,
9189 { "Client/Server Type", "ndps.ndps_client_server_type",
9190 FT_UINT32, BASE_HEX, VALS(ndps_client_server_enum), 0x0,
9191 "Client/Server Type", HFILL }},
9193 { &hf_ndps_session_type,
9194 { "Session Type", "ndps.ndps_session_type",
9195 FT_UINT32, BASE_HEX, VALS(ndps_session_type_enum), 0x0,
9196 "Session Type", HFILL }},
9199 { "Time", "ndps.time",
9200 FT_UINT32, BASE_DEC, NULL, 0x0,
9203 { &hf_ndps_supplier_name,
9204 { "Supplier Name", "ndps.supplier_name",
9205 FT_STRING, BASE_NONE, NULL, 0x0,
9206 "Supplier Name", HFILL }},
9209 { "Message", "ndps.message",
9210 FT_STRING, BASE_NONE, NULL, 0x0,
9211 "Message", HFILL }},
9213 { &hf_ndps_delivery_method_count,
9214 { "Number of Delivery Methods", "ndps.delivery_method_count",
9215 FT_UINT32, BASE_DEC, NULL, 0x0,
9216 "Number of Delivery Methods", HFILL }},
9218 { &hf_delivery_method_type,
9219 { "Delivery Method Type", "ndps.delivery_method_type",
9220 FT_UINT32, BASE_HEX, VALS(ndps_delivery_method_enum), 0x0,
9221 "Delivery Method Type", HFILL }},
9223 { &hf_ndps_get_session_type,
9224 { "Session Type", "ndps.ndps_get_session_type",
9225 FT_UINT32, BASE_HEX, VALS(ndps_get_session_type_enum), 0x0,
9226 "Session Type", HFILL }},
9229 { "Packet Count", "ndps.packet_count",
9230 FT_UINT32, BASE_DEC, NULL, 0x0,
9231 "Packet Count", HFILL }},
9233 { &hf_last_packet_flag,
9234 { "Last Packet Flag", "ndps.last_packet_flag",
9235 FT_UINT32, BASE_DEC, NULL, 0x0,
9236 "Last Packet Flag", HFILL }},
9238 { &hf_ndps_get_resman_session_type,
9239 { "Session Type", "ndps.ndps_get_resman_session_type",
9240 FT_UINT32, BASE_HEX, VALS(ndps_get_resman_session_type_enum), 0x0,
9241 "Session Type", HFILL }},
9244 { "Problem Type", "ndps.ndps_get_resman_session_type",
9245 FT_UINT32, BASE_HEX, VALS(problem_type_enum), 0x0,
9246 "Problem Type", HFILL }},
9248 { &hf_ndps_num_values,
9249 { "Number of Values", "ndps.num_values",
9250 FT_UINT32, BASE_DEC, NULL, 0x0,
9251 "Number of Values", HFILL }},
9253 { &hf_ndps_object_ids_7,
9254 { "Object ID Definition", "ndps.objectid_def7",
9255 FT_NONE, BASE_HEX, NULL,
9256 0x0, "Object ID Definition", HFILL }},
9258 { &hf_ndps_object_ids_8,
9259 { "Object ID Definition", "ndps.objectid_def8",
9260 FT_NONE, BASE_HEX, NULL,
9261 0x0, "Object ID Definition", HFILL }},
9263 { &hf_ndps_object_ids_9,
9264 { "Object ID Definition", "ndps.objectid_def9",
9265 FT_NONE, BASE_HEX, NULL,
9266 0x0, "Object ID Definition", HFILL }},
9268 { &hf_ndps_object_ids_10,
9269 { "Object ID Definition", "ndps.objectid_def10",
9270 FT_NONE, BASE_HEX, NULL,
9271 0x0, "Object ID Definition", HFILL }},
9273 { &hf_ndps_object_ids_11,
9274 { "Object ID Definition", "ndps.objectid_def11",
9275 FT_NONE, BASE_HEX, NULL,
9276 0x0, "Object ID Definition", HFILL }},
9278 { &hf_ndps_object_ids_12,
9279 { "Object ID Definition", "ndps.objectid_def12",
9280 FT_NONE, BASE_HEX, NULL,
9281 0x0, "Object ID Definition", HFILL }},
9283 { &hf_ndps_object_ids_13,
9284 { "Object ID Definition", "ndps.objectid_def13",
9285 FT_NONE, BASE_HEX, NULL,
9286 0x0, "Object ID Definition", HFILL }},
9288 { &hf_ndps_object_ids_14,
9289 { "Object ID Definition", "ndps.objectid_def14",
9290 FT_NONE, BASE_HEX, NULL,
9291 0x0, "Object ID Definition", HFILL }},
9293 { &hf_ndps_object_ids_15,
9294 { "Object ID Definition", "ndps.objectid_def15",
9295 FT_NONE, BASE_HEX, NULL,
9296 0x0, "Object ID Definition", HFILL }},
9298 { &hf_ndps_object_ids_16,
9299 { "Object ID Definition", "ndps.objectid_def16",
9300 FT_NONE, BASE_HEX, NULL,
9301 0x0, "Object ID Definition", HFILL }},
9303 { &hf_ndps_attribute_time,
9304 { "Time", "ndps.attribute_time",
9305 FT_ABSOLUTE_TIME, BASE_DEC, NULL, 0x0,
9308 { &hf_print_security,
9309 { "Printer Security", "ndps.print_security",
9310 FT_UINT32, BASE_HEX, VALS(ndps_print_security), 0x0,
9311 "Printer Security", HFILL }},
9313 { &hf_notify_time_interval,
9314 { "Notify Time Interval", "ndps.notify_time_interval",
9315 FT_UINT32, BASE_HEX, NULL, 0x0,
9316 "Notify Time Interval", HFILL }},
9318 { &hf_notify_sequence_number,
9319 { "Notify Sequence Number", "ndps.notify_seq_number",
9320 FT_UINT32, BASE_HEX, NULL, 0x0,
9321 "Notify Sequence Number", HFILL }},
9323 { &hf_notify_lease_exp_time,
9324 { "Notify Lease Expiration Time", "ndps.notify_lease_exp_time",
9325 FT_UINT32, BASE_HEX, NULL, 0x0,
9326 "Notify Lease Expiration Time", HFILL }},
9328 { &hf_notify_printer_uri,
9329 { "Notify Printer URI", "ndps.notify_printer_uri",
9330 FT_STRING, BASE_NONE, NULL, 0x0,
9331 "Notify Printer URI", HFILL }},
9334 { "Level", "ndps.level",
9335 FT_UINT32, BASE_HEX, NULL, 0x0,
9339 { "Interval", "ndps.interval",
9340 FT_UINT32, BASE_HEX, NULL, 0x0,
9341 "Interval", HFILL }},
9344 static gint *ett[] = {
9349 module_t *ndps_module;
9351 proto_ndps = proto_register_protocol("Novell Distributed Print System", "NDPS", "ndps");
9352 proto_register_field_array(proto_ndps, hf_ndps, array_length(hf_ndps));
9353 proto_register_subtree_array(ett, array_length(ett));
9355 ndps_module = prefs_register_protocol(proto_ndps, NULL);
9356 prefs_register_bool_preference(ndps_module, "desegment_tcp",
9357 "Reassemble NDPS messages spanning multiple TCP segments",
9358 "Whether the NDPS dissector should reassemble messages spanning multiple TCP segments."
9359 " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
9361 prefs_register_bool_preference(ndps_module, "desegment_spx",
9362 "Reassemble fragmented NDPS messages spanning multiple SPX packets",
9363 "Whether the NDPS dissector should reassemble fragmented NDPS messages spanning multiple SPX packets",
9365 prefs_register_bool_preference(ndps_module, "show_oid",
9366 "Display NDPS Details",
9367 "Whether or not the NDPS dissector should show object id's and other details",
9370 register_init_routine(&ndps_init_protocol);
9371 register_postseq_cleanup_routine(&ndps_postseq_cleanup);
9375 proto_reg_handoff_ndps(void)
9377 dissector_handle_t ndps_handle, ndps_tcp_handle;
9379 ndps_handle = create_dissector_handle(dissect_ndps_ipx, proto_ndps);
9380 ndps_tcp_handle = create_dissector_handle(dissect_ndps_tcp, proto_ndps);
9382 dissector_add("spx.socket", SPX_SOCKET_PA, ndps_handle);
9383 dissector_add("spx.socket", SPX_SOCKET_BROKER, ndps_handle);
9384 dissector_add("spx.socket", SPX_SOCKET_SRS, ndps_handle);
9385 dissector_add("spx.socket", SPX_SOCKET_ENS, ndps_handle);
9386 dissector_add("spx.socket", SPX_SOCKET_RMS, ndps_handle);
9387 dissector_add("spx.socket", SPX_SOCKET_NOTIFY_LISTENER, ndps_handle);
9388 dissector_add("tcp.port", TCP_PORT_PA, ndps_tcp_handle);
9389 dissector_add("tcp.port", TCP_PORT_BROKER, ndps_tcp_handle);
9390 dissector_add("tcp.port", TCP_PORT_SRS, ndps_tcp_handle);
9391 dissector_add("tcp.port", TCP_PORT_ENS, ndps_tcp_handle);
9392 dissector_add("tcp.port", TCP_PORT_RMS, ndps_tcp_handle);
9393 dissector_add("tcp.port", TCP_PORT_NOTIFY_LISTENER, ndps_tcp_handle);
9394 ndps_data_handle = find_dissector("data");