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 "reassemble.h"
41 #define NDPS_PACKET_INIT_COUNT 200
43 /* Tables for reassembly of fragments. */
44 static GHashTable *ndps_fragment_table = NULL;
45 static GHashTable *ndps_reassembled_table = NULL;
47 /* desegmentation of ndps */
48 static gboolean ndps_defragment = TRUE;
50 static guint32 tid = 1;
53 static gboolean ndps_show_oids=FALSE;
55 /* Global Attribute for evaluation of Values */
56 static char *global_attribute_name=NULL;
58 static void dissect_ndps_request(tvbuff_t*, packet_info*, proto_tree*, guint32, guint32, int);
60 static void dissect_ndps_reply(tvbuff_t *, packet_info*, proto_tree*, int);
62 static int hf_ndps_segments = -1;
63 static int hf_ndps_segment = -1;
64 static int hf_ndps_segment_overlap = -1;
65 static int hf_ndps_segment_overlap_conflict = -1;
66 static int hf_ndps_segment_multiple_tails = -1;
67 static int hf_ndps_segment_too_long_segment = -1;
68 static int hf_ndps_segment_error = -1;
70 static gint ett_ndps_segments = -1;
71 static gint ett_ndps_segment = -1;
73 static int proto_ndps = -1;
74 static int hf_ndps_record_mark = -1;
75 static int hf_ndps_length = -1;
76 static int hf_ndps_xid = -1;
77 static int hf_ndps_packet_type = -1;
78 static int hf_ndps_rpc_version = -1;
79 static int hf_ndps_error = -1;
80 static int hf_ndps_num_objects = -1;
81 static int hf_ndps_num_attributes = -1;
82 static int hf_ndps_sbuffer = -1;
83 static int hf_ndps_rbuffer = -1;
84 static int hf_ndps_user_name = -1;
85 static int hf_ndps_broker_name = -1;
86 static int hf_ndps_num_results = -1;
87 static int hf_ndps_num_options = -1;
88 static int hf_ndps_num_jobs = -1;
89 static int hf_ndps_pa_name = -1;
90 static int hf_ndps_tree = -1;
91 static int hf_ndps_reqframe = -1;
92 static int hf_ndps_error_val = -1;
93 static int hf_ndps_ext_error = -1;
94 static int hf_ndps_object = -1;
95 static int hf_ndps_cred_type = -1;
96 static int hf_ndps_server_name = -1;
97 static int hf_ndps_connection = -1;
98 static int hf_ndps_auth_null = -1;
99 static int hf_ndps_rpc_accept = -1;
100 static int hf_ndps_rpc_acc_stat = -1;
101 static int hf_ndps_rpc_rej_stat = -1;
102 static int hf_ndps_rpc_acc_results = -1;
103 static int hf_ndps_problem_type = -1;
104 static int hf_security_problem_type = -1;
105 static int hf_service_problem_type = -1;
106 static int hf_access_problem_type = -1;
107 static int hf_printer_problem_type = -1;
108 static int hf_selection_problem_type = -1;
109 static int hf_doc_access_problem_type = -1;
110 static int hf_attribute_problem_type = -1;
111 static int hf_update_problem_type = -1;
112 static int hf_obj_id_type = -1;
113 static int hf_oid_struct_size = -1;
114 static int hf_object_name = -1;
115 static int hf_ndps_document_number = -1;
116 static int hf_ndps_nameorid = -1;
117 static int hf_local_object_name = -1;
118 static int hf_printer_name = -1;
119 static int hf_ndps_qualified_name = -1;
120 static int hf_ndps_item_count = -1;
121 static int hf_ndps_num_passwords = -1;
122 static int hf_ndps_num_servers = -1;
123 static int hf_ndps_num_locations = -1;
124 static int hf_ndps_num_areas = -1;
125 static int hf_ndps_num_address_items = -1;
126 static int hf_ndps_num_job_categories = -1;
127 static int hf_ndps_num_page_selects = -1;
128 static int hf_ndps_num_page_informations = -1;
129 static int hf_ndps_num_names = -1;
130 static int hf_ndps_num_categories = -1;
131 static int hf_ndps_num_colorants = -1;
132 static int hf_ndps_num_events = -1;
133 static int hf_ndps_num_args = -1;
134 static int hf_ndps_num_transfer_methods = -1;
135 static int hf_ndps_num_doc_types = -1;
136 static int hf_ndps_num_destinations = -1;
137 static int hf_ndps_qualifier = -1;
138 static int hf_ndps_lib_error = -1;
139 static int hf_ndps_other_error = -1;
140 static int hf_ndps_other_error_2 = -1;
141 static int hf_ndps_session = -1;
142 static int hf_ndps_abort_flag = -1;
143 static int hf_obj_attribute_type = -1;
144 static int hf_ndps_attribute_value = -1;
145 static int hf_ndps_lower_range = -1;
146 static int hf_ndps_upper_range = -1;
147 static int hf_ndps_n64 = -1;
148 static int hf_ndps_lower_range_n64 = -1;
149 static int hf_ndps_upper_range_n64 = -1;
150 static int hf_ndps_attrib_boolean = -1;
151 static int hf_ndps_realization = -1;
152 static int hf_ndps_xdimension_n64 = -1;
153 static int hf_ndps_ydimension_n64 = -1;
154 static int hf_ndps_dim_value = -1;
155 static int hf_ndps_dim_flag = -1;
156 static int hf_ndps_xydim_value = -1;
157 static int hf_ndps_location_value = -1;
158 static int hf_ndps_xmin_n64 = -1;
159 static int hf_ndps_xmax_n64 = -1;
160 static int hf_ndps_ymin_n64 = -1;
161 static int hf_ndps_ymax_n64 = -1;
162 static int hf_ndps_edge_value = -1;
163 static int hf_ndps_cardinal_or_oid = -1;
164 static int hf_ndps_cardinal_name_or_oid = -1;
165 static int hf_ndps_integer_or_oid = -1;
166 static int hf_ndps_profile_id = -1;
167 static int hf_ndps_persistence = -1;
168 static int hf_ndps_language_count = -1;
169 static int hf_ndps_language_id = -1;
170 static int hf_address_type = -1;
171 static int hf_ndps_address = -1;
172 static int hf_ndps_add_bytes = -1;
173 static int hf_ndps_event_type = -1;
174 static int hf_ndps_event_object_identifier = -1;
175 static int hf_ndps_octet_string = -1;
176 static int hf_ndps_scope = -1;
177 static int hf_address_len = -1;
178 static int hf_ndps_net = -1;
179 static int hf_ndps_node = -1;
180 static int hf_ndps_socket = -1;
181 static int hf_ndps_port = -1;
182 static int hf_ndps_ip = -1;
183 static int hf_ndps_server_type = -1;
184 static int hf_ndps_num_services = -1;
185 static int hf_ndps_service_type = -1;
186 static int hf_ndps_service_enabled = -1;
187 static int hf_ndps_method_name = -1;
188 static int hf_ndps_method_ver = -1;
189 static int hf_ndps_file_name = -1;
190 static int hf_ndps_admin_submit = -1;
191 static int hf_ndps_oid = -1;
192 static int hf_ndps_object_op = -1;
193 static int hf_answer_time = -1;
194 static int hf_oid_asn1_type = -1;
195 static int hf_ndps_item_ptr = -1;
196 static int hf_ndps_len = -1;
197 static int hf_limit_enc = -1;
198 static int hf_ndps_delivery_add_count = -1;
199 static int hf_ndps_qualified_name2 = -1;
200 static int hf_ndps_delivery_add_type = -1;
201 static int hf_ndps_criterion_type = -1;
202 static int hf_ndps_num_ignored_attributes = -1;
203 static int hf_ndps_ignored_type = -1;
204 static int hf_ndps_num_resources = -1;
205 static int hf_ndps_resource_type = -1;
206 static int hf_ndps_identifier_type = -1;
207 static int hf_ndps_page_flag = -1;
208 static int hf_ndps_media_type = -1;
209 static int hf_ndps_doc_content = -1;
210 static int hf_ndps_page_size = -1;
211 static int hf_ndps_direction = -1;
212 static int hf_ndps_page_order = -1;
213 static int hf_ndps_medium_size = -1;
214 static int hf_ndps_long_edge_feeds = -1;
215 static int hf_ndps_inc_across_feed = -1;
216 static int hf_ndps_size_inc_in_feed = -1;
217 static int hf_ndps_page_orientation = -1;
218 static int hf_ndps_numbers_up = -1;
219 static int hf_ndps_xdimension = -1;
220 static int hf_ndps_ydimension = -1;
221 static int hf_ndps_state_severity = -1;
222 static int hf_ndps_training = -1;
223 static int hf_ndps_colorant_set = -1;
224 static int hf_ndps_card_enum_time = -1;
225 static int hf_ndps_attrs_arg = -1;
226 static int hf_ndps_context_len = -1;
227 static int hf_ndps_context = -1;
228 static int hf_ndps_filter = -1;
229 static int hf_ndps_item_filter = -1;
230 static int hf_ndps_substring_match = -1;
231 static int hf_ndps_time_limit = -1;
232 static int hf_ndps_count_limit = -1;
233 static int hf_ndps_operator = -1;
234 static int hf_ndps_password = -1;
235 static int hf_ndps_retrieve_restrictions = -1;
236 static int hf_ndps_bind_security_option_count = -1;
237 static int hf_bind_security = -1;
238 static int hf_ndps_max_items = -1;
239 static int hf_ndps_status_flags = -1;
240 static int hf_ndps_resource_list_type = -1;
241 static int hf_os_count = -1;
242 static int hf_os_type = -1;
243 static int hf_ndps_printer_type_count = -1;
244 static int hf_ndps_printer_type = -1;
245 static int hf_ndps_printer_manuf = -1;
246 static int hf_ndps_inf_file_name = -1;
247 static int hf_ndps_vendor_dir = -1;
248 static int hf_banner_type = -1;
249 static int hf_font_type = -1;
250 static int hf_printer_id = -1;
251 static int hf_ndps_font_name = -1;
252 static int hf_ndps_return_code = -1;
253 static int hf_ndps_banner_count = -1;
254 static int hf_ndps_banner_name = -1;
255 static int hf_ndps_font_type_count = -1;
256 static int hf_font_type_name = -1;
257 static int hf_ndps_font_file_count = -1;
258 static int hf_font_file_name = -1;
259 static int hf_ndps_printer_def_count = -1;
260 static int hf_ndps_prn_file_name = -1;
261 static int hf_ndps_prn_dir_name = -1;
262 static int hf_ndps_def_file_name = -1;
263 static int hf_ndps_num_win31_keys = -1;
264 static int hf_ndps_num_win95_keys = -1;
265 static int hf_ndps_num_windows_keys = -1;
266 static int hf_ndps_windows_key = -1;
267 static int hf_archive_type = -1;
268 static int hf_archive_file_size = -1;
269 static int hf_ndps_data = -1;
270 static int hf_get_status_flag = -1;
271 static int hf_res_type = -1;
272 static int hf_file_timestamp = -1;
273 static int hf_sub_complete = -1;
274 static int hf_doc_content = -1;
275 static int hf_ndps_doc_name = -1;
276 static int hf_print_arg = -1;
277 static int hf_local_id = -1;
278 static int hf_ndps_included_doc_len = -1;
279 static int hf_ndps_included_doc = -1;
280 static int hf_ndps_ref_name = -1;
281 static int hf_interrupt_job_type = -1;
282 static int hf_pause_job_type = -1;
283 static int hf_ndps_force = -1;
284 static int hf_resubmit_op_type = -1;
285 static int hf_shutdown_type = -1;
286 static int hf_ndps_supplier_flag = -1;
287 static int hf_ndps_language_flag = -1;
288 static int hf_ndps_method_flag = -1;
289 static int hf_ndps_delivery_address_flag = -1;
290 static int hf_ndps_list_profiles_type = -1;
291 static int hf_ndps_list_profiles_choice_type = -1;
292 static int hf_ndps_list_profiles_result_type = -1;
293 static int hf_ndps_integer_type_flag = -1;
294 static int hf_ndps_integer_type_value = -1;
295 static int hf_ndps_continuation_option = -1;
296 static int hf_ndps_ds_info_type = -1;
297 static int hf_ndps_guid = -1;
298 static int hf_ndps_list_services_type = -1;
299 static int hf_ndps_item_bytes = -1;
300 static int hf_ndps_certified = -1;
301 static int hf_ndps_attribute_set = -1;
302 static int hf_ndps_data_item_type = -1;
303 static int hf_info_int = -1;
304 static int hf_info_int16 = -1;
305 static int hf_info_int32 = -1;
306 static int hf_info_boolean = -1;
307 static int hf_info_string = -1;
308 static int hf_info_bytes = -1;
309 static int hf_ndps_list_local_servers_type = -1;
310 static int hf_ndps_registry_name = -1;
311 static int hf_ndps_client_server_type = -1;
312 static int hf_ndps_session_type = -1;
313 static int hf_time = -1;
314 static int hf_ndps_supplier_name = -1;
315 static int hf_ndps_message = -1;
316 static int hf_ndps_delivery_method_count = -1;
317 static int hf_delivery_method_type = -1;
318 static int hf_ndps_get_session_type = -1;
319 static int hf_packet_count = -1;
320 static int hf_last_packet_flag = -1;
321 static int hf_ndps_get_resman_session_type = -1;
322 static int hf_problem_type = -1;
323 static int hf_ndps_num_values = -1;
324 static int hf_ndps_object_ids_7 = -1;
325 static int hf_ndps_object_ids_8 = -1;
326 static int hf_ndps_object_ids_9 = -1;
327 static int hf_ndps_object_ids_10 = -1;
328 static int hf_ndps_object_ids_11 = -1;
329 static int hf_ndps_object_ids_12 = -1;
330 static int hf_ndps_object_ids_13 = -1;
331 static int hf_ndps_object_ids_14 = -1;
332 static int hf_ndps_object_ids_15 = -1;
333 static int hf_ndps_object_ids_16 = -1;
334 static int hf_ndps_attribute_time = -1;
335 static int hf_print_security = -1;
336 static int hf_notify_time_interval = -1;
337 static int hf_notify_sequence_number = -1;
338 static int hf_notify_lease_exp_time = -1;
339 static int hf_notify_printer_uri = -1;
340 static int hf_level = -1;
341 static int hf_interval = -1;
343 static int hf_spx_ndps_program = -1;
344 static int hf_spx_ndps_version = -1;
345 static int hf_spx_ndps_func_print = -1;
346 static int hf_spx_ndps_func_registry = -1;
347 static int hf_spx_ndps_func_notify = -1;
348 static int hf_spx_ndps_func_resman = -1;
349 static int hf_spx_ndps_func_delivery = -1;
350 static int hf_spx_ndps_func_broker = -1;
352 static gint ett_ndps = -1;
353 static dissector_handle_t ndps_data_handle;
355 /* desegmentation of NDPS over TCP */
356 static gboolean ndps_desegment = TRUE;
358 static const value_string true_false[] = {
359 { 0x00000000, "Accept" },
360 { 0x00000001, "Deny" },
364 static const value_string ndps_limit_enc_enum[] = {
365 { 0x00000000, "Time" },
366 { 0x00000001, "Count" },
367 { 0x00000002, "Error" },
371 static const value_string problem_type_enum[] = {
372 { 0x00000000, "Standard" },
373 { 0x00000001, "Extended" },
377 static const value_string accept_stat[] = {
378 { 0x00000000, "Success" },
379 { 0x00000001, "Program Unavailable" },
380 { 0x00000002, "Program Mismatch" },
381 { 0x00000003, "Procedure Unavailable" },
382 { 0x00000004, "Garbage Arguments" },
383 { 0x00000005, "System Error" },
387 static const value_string reject_stat[] = {
388 { 0x00000000, "RPC Mismatch" },
389 { 0x00000001, "Authentication Error" },
393 static const value_string error_type_enum[] = {
394 { 0x00000000, "Security Error" },
395 { 0x00000001, "Service Error" },
396 { 0x00000002, "Access Error" },
397 { 0x00000003, "Printer Error" },
398 { 0x00000004, "Selection Error" },
399 { 0x00000005, "Document Access Error" },
400 { 0x00000006, "Attribute Error" },
401 { 0x00000007, "Update Error" },
405 static const value_string security_problem_enum[] = {
406 { 0x00000000, "Authentication" },
407 { 0x00000001, "Credentials" },
408 { 0x00000002, "Rights" },
409 { 0x00000003, "Invalid PAC" },
413 static const value_string service_problem_enum[] = {
414 { 0x00000000, "Sever Busy" },
415 { 0x00000001, "Server Unavailable" },
416 { 0x00000002, "Complex Operation" },
417 { 0x00000003, "Resource Limit" },
418 { 0x00000004, "Unclassified Server Error" },
419 { 0x00000005, "Too Many Items in List" },
420 { 0x00000006, "Resource not Available" },
421 { 0x00000007, "Cancel Document Support" },
422 { 0x00000008, "Modify Document Support" },
423 { 0x00000009, "Multiple Document Support" },
424 { 0x0000000a, "Parameter Valid Support" },
425 { 0x0000000b, "Invalid Checkpoint" },
426 { 0x0000000c, "Continuation Context" },
427 { 0x0000000d, "Pause Limit Exceeded" },
428 { 0x0000000e, "Unsupported Operation" },
429 { 0x0000000f, "Notify Service Error" },
430 { 0x00000010, "Accounting Service Error" },
434 static const value_string access_problem_enum[] = {
435 { 0x00000000, "Wrong Object Class" },
436 { 0x00000001, "Lack of Access Rights" },
437 { 0x00000002, "Can't Interrupt Job" },
438 { 0x00000003, "Wrong Object State" },
439 { 0x00000004, "Client Not Bound" },
440 { 0x00000005, "Not Available" },
441 { 0x00000006, "Notify Service Not Connected" },
442 { 0x00000007, "PDS Not Connected" },
446 static const value_string printer_problem_enum[] = {
447 { 0x00000000, "Printer Error" },
448 { 0x00000001, "Printer Needs Attention" },
449 { 0x00000002, "Printer Needs Key Operator" },
453 static const value_string selection_problem_enum[] = {
454 { 0x00000000, "Invalid ID" },
455 { 0x00000001, "Unknown ID" },
456 { 0x00000002, "Object Exists" },
457 { 0x00000003, "ID Changed" },
461 static const value_string doc_access_problem_enum[] = {
462 { 0x00000000, "Access Not Available" },
463 { 0x00000001, "Time Expired" },
464 { 0x00000002, "Access Denied" },
465 { 0x00000003, "Unknown Document" },
466 { 0x00000004, "No Documents in Job" },
470 static const value_string attribute_problem_enum[] = {
471 { 0x00000000, "Invalid Syntax" },
472 { 0x00000001, "Undefined Type" },
473 { 0x00000002, "Wrong Matching" },
474 { 0x00000003, "Constraint Violated" },
475 { 0x00000004, "Unsupported Type" },
476 { 0x00000005, "Illegal Modification" },
477 { 0x00000006, "Consists With Other Attribute" },
478 { 0x00000007, "Undefined Attribute Value" },
479 { 0x00000008, "Unsupported Value" },
480 { 0x00000009, "Invalid Noncompulsed Modification" },
481 { 0x0000000a, "Per Job Inadmissible" },
482 { 0x0000000b, "Not Multivalued" },
483 { 0x0000000c, "Mandatory Omitted" },
484 { 0x0000000d, "Illegal For Class" },
488 static const value_string update_problem_enum[] = {
489 { 0x00000000, "No Modifications Allowed" },
490 { 0x00000001, "Insufficient Rights" },
491 { 0x00000002, "Previous Operation Incomplete" },
492 { 0x00000003, "Cancel Not Possible" },
496 static const value_string obj_identification_enum[] = {
497 { 0x00000000, "Printer Contained Object ID" },
498 { 0x00000001, "Document Identifier" },
499 { 0x00000002, "Object Identifier" },
500 { 0x00000003, "Object Name" },
501 { 0x00000004, "Name or Object ID" },
502 { 0x00000005, "Simple Name" },
503 { 0x00000006, "Printer Configuration Object ID" },
504 { 0x00000007, "Qualified Name" },
505 { 0x00000008, "Event Object ID" },
509 static const value_string nameorid_enum[] = {
510 { 0x00000000, "None" },
511 { 0x00000001, "Global" },
512 { 0x00000002, "Local" },
516 static const value_string qualified_name_enum[] = {
517 { 0x00000000, "None" },
518 { 0x00000001, "Simple" },
519 { 0x00000002, "NDS" },
523 static const value_string qualified_name_enum2[] = {
524 { 0x00000000, "NDS" },
528 static const value_string spx_ndps_program_vals[] = {
529 { 0x00060976, "Print Program" },
530 { 0x00060977, "Broker Program" },
531 { 0x00060978, "Registry Program" },
532 { 0x00060979, "Notify Program" },
533 { 0x0006097a, "Resource Manager Program" },
534 { 0x0006097b, "Programmatic Delivery Program" },
538 static const value_string spx_ndps_print_func_vals[] = {
539 { 0x00000000, "None" },
540 { 0x00000001, "Bind PSM" },
541 { 0x00000002, "Bind PA" },
542 { 0x00000003, "Unbind" },
543 { 0x00000004, "Print" },
544 { 0x00000005, "Modify Job" },
545 { 0x00000006, "Cancel Job" },
546 { 0x00000007, "List Object Attributes" },
547 { 0x00000008, "Promote Job" },
548 { 0x00000009, "Interrupt" },
549 { 0x0000000a, "Pause" },
550 { 0x0000000b, "Resume" },
551 { 0x0000000c, "Clean" },
552 { 0x0000000d, "Create" },
553 { 0x0000000e, "Delete" },
554 { 0x0000000f, "Disable PA" },
555 { 0x00000010, "Enable PA" },
556 { 0x00000011, "Resubmit Jobs" },
557 { 0x00000012, "Set" },
558 { 0x00000013, "Shutdown PA" },
559 { 0x00000014, "Startup PA" },
560 { 0x00000015, "Reorder Job" },
561 { 0x00000016, "Pause PA" },
562 { 0x00000017, "Resume PA" },
563 { 0x00000018, "Transfer Data" },
564 { 0x00000019, "Device Control" },
565 { 0x0000001a, "Add Event Profile" },
566 { 0x0000001b, "Remove Event Profile" },
567 { 0x0000001c, "Modify Event Profile" },
568 { 0x0000001d, "List Event Profiles" },
569 { 0x0000001e, "Shutdown PSM" },
570 { 0x0000001f, "Cancel PSM Shutdown" },
571 { 0x00000020, "Set Printer DS Information" },
572 { 0x00000021, "Clean User Jobs" },
573 { 0x00000022, "Map GUID to NDS Name" },
574 { 0x00000023, "Add Event Profile 2" },
575 { 0x00000024, "List Event Profile 2" },
579 static const value_string spx_ndps_notify_func_vals[] = {
580 { 0x00000000, "None" },
581 { 0x00000001, "Notify Bind" },
582 { 0x00000002, "Notify Unbind" },
583 { 0x00000003, "Register Supplier" },
584 { 0x00000004, "Deregister Supplier" },
585 { 0x00000005, "Add Profile" },
586 { 0x00000006, "Remove Profile" },
587 { 0x00000007, "Modify Profile" },
588 { 0x00000008, "List Profiles" },
589 { 0x00000009, "Report Event" },
590 { 0x0000000a, "List Supported Languages" },
591 { 0x0000000b, "Report Notification" },
592 { 0x0000000c, "Add Delivery Method" },
593 { 0x0000000d, "Remove Delivery Method" },
594 { 0x0000000e, "List Delivery Methods" },
595 { 0x0000000f, "Get Delivery Method Information" },
596 { 0x00000010, "Get Notify NDS Object Name" },
597 { 0x00000011, "Get Notify Session Information" },
601 static const value_string spx_ndps_deliver_func_vals[] = {
602 { 0x00000000, "None" },
603 { 0x00000001, "Delivery Bind" },
604 { 0x00000002, "Delivery Unbind" },
605 { 0x00000003, "Delivery Send" },
606 { 0x00000004, "Delivery Send2" },
610 static const value_string spx_ndps_registry_func_vals[] = {
611 { 0x00000000, "None" },
612 { 0x00000001, "Bind" },
613 { 0x00000002, "Unbind" },
614 { 0x00000003, "Register Server" },
615 { 0x00000004, "Deregister Server" },
616 { 0x00000005, "Register Registry" },
617 { 0x00000006, "Deregister Registry" },
618 { 0x00000007, "Registry Update" },
619 { 0x00000008, "List Local Servers" },
620 { 0x00000009, "List Servers" },
621 { 0x0000000a, "List Known Registries" },
622 { 0x0000000b, "Get Registry NDS Object Name" },
623 { 0x0000000c, "Get Registry Session Information" },
627 static const value_string spx_ndps_resman_func_vals[] = {
628 { 0x00000000, "None" },
629 { 0x00000001, "Bind" },
630 { 0x00000002, "Unbind" },
631 { 0x00000003, "Add Resource File" },
632 { 0x00000004, "Delete Resource File" },
633 { 0x00000005, "List Resources" },
634 { 0x00000006, "Get Resource File" },
635 { 0x00000007, "Get Resource File Date" },
636 { 0x00000008, "Get Resource Manager NDS Object Name" },
637 { 0x00000009, "Get Resource Manager Session Information" },
638 { 0x0000000a, "Set Resource Language Context" },
642 static const value_string spx_ndps_broker_func_vals[] = {
643 { 0x00000000, "None" },
644 { 0x00000001, "Bind" },
645 { 0x00000002, "Unbind" },
646 { 0x00000003, "List Services" },
647 { 0x00000004, "Enable Service" },
648 { 0x00000005, "Disable Service" },
649 { 0x00000006, "Down Broker" },
650 { 0x00000007, "Get Broker NDS Object Name" },
651 { 0x00000008, "Get Broker Session Information" },
655 static const value_string ndps_packet_types[] = {
656 { 0x00000000, "Request" },
657 { 0x00000001, "Reply" },
661 static const value_string ndps_realization_enum[] = {
662 { 0x00000000, "Logical" },
663 { 0x00000001, "Physical" },
664 { 0x00000002, "Logical & Physical" },
668 static const value_string ndps_dim_value_enum[] = {
669 { 0x00000000, "Numeric" },
670 { 0x00000001, "Named" },
674 static const value_string ndps_xydim_value_enum[] = {
675 { 0x00000000, "Real" },
676 { 0x00000001, "Named" },
677 { 0x00000002, "Cardinal" },
681 static const value_string ndps_location_value_enum[] = {
682 { 0x00000000, "Numeric" },
683 { 0x00000001, "Named" },
687 static const value_string ndps_edge_value_enum[] = {
688 { 0x00000000, "Bottom" },
689 { 0x00000001, "Right" },
690 { 0x00000002, "Top" },
691 { 0x00000003, "Left" },
695 static const value_string ndps_card_or_oid_enum[] = {
696 { 0x00000000, "Number" },
697 { 0x00000001, "ID" },
701 static const value_string ndps_card_name_or_oid_enum[] = {
702 { 0x00000000, "Number" },
703 { 0x00000001, "ID" },
707 static const value_string ndps_integer_or_oid_enum[] = {
708 { 0x00000000, "ID" },
709 { 0x00000001, "Number" },
713 static const value_string ndps_persistence_enum[] = {
714 { 0x00000000, "Permanent" },
715 { 0x00000001, "Volatile" },
719 static const value_string ndps_address_type_enum[] = {
720 { 0x00000000, "User" },
721 { 0x00000001, "Server" },
722 { 0x00000002, "Volume" },
723 { 0x00000003, "Organization Unit" },
724 { 0x00000004, "Organization" },
725 { 0x00000005, "Group" },
726 { 0x00000006, "Distinguished Name" },
727 { 0x00000007, "User or Container" },
728 { 0x00000008, "Case Exact String" },
729 { 0x00000009, "Case Ignore String" },
730 { 0x0000000a, "Numeric String" },
731 { 0x0000000b, "DOS File Name" },
732 { 0x0000000c, "Phone Number" },
733 { 0x0000000d, "Boolean" },
734 { 0x0000000e, "Integer" },
735 { 0x0000000f, "Network Address" },
736 { 0x00000010, "Choice" },
737 { 0x00000011, "GroupWise User" },
741 static const value_string ndps_address_enum[] = {
742 { 0x00000000, "IPX" },
743 { 0x00000001, "IP" },
744 { 0x00000002, "SDLC" },
745 { 0x00000003, "Token Ring to Ethernet" },
746 { 0x00000004, "OSI" },
747 { 0x00000005, "AppleTalk" },
748 { 0x00000006, "Count" },
753 static const value_string ndps_server_type_enum[] = {
754 { 0x00000000, "All" },
755 { 0x00000001, "Public Access Printer Agent" },
756 { 0x00000002, "Notification Server" },
757 { 0x00000003, "Resource Manager" },
758 { 0x00000004, "Network Port Handler" },
762 static const value_string ndps_event_object_enum[] = {
763 { 0x00000000, "Object" },
764 { 0x00000001, "Filter" },
765 { 0x00000002, "Detail" },
769 static const value_string ndps_service_type_enum[] = {
770 { 0x00000000, "SRS" },
771 { 0x00000001, "ENS" },
772 { 0x00000002, "RMS" },
776 static const value_string ndps_delivery_add_enum[] = {
777 { 0x00000000, "MHS Address" },
778 { 0x00000001, "Distinguished Name" },
779 { 0x00000002, "Text" },
780 { 0x00000003, "Octet String" },
781 { 0x00000004, "Distinguished Name String" },
782 { 0x00000005, "RPC Address" },
783 { 0x00000006, "Qualified Name" },
787 static const value_string ndps_resource_enum[] = {
788 { 0x00000000, "Name or ID" },
789 { 0x00000001, "Text" },
794 static const value_string ndps_identifier_enum[] = {
795 { 0x00000000, "ID Nominal Number" },
796 { 0x00000001, "ID Alpha-numeric" },
797 { 0x00000002, "ID Tag" },
801 static const value_string ndps_media_enum[] = {
802 { 0x00000000, "Select All Pages" },
803 { 0x00000001, "Selected Pages" },
807 static const value_string ndps_page_size_enum[] = {
808 { 0x00000000, "ID" },
809 { 0x00000001, "Dimensions" },
813 static const value_string ndps_pres_direction_enum[] = {
814 { 0x00000000, "Right to Bottom" },
815 { 0x00000001, "Left to Bottom" },
816 { 0x00000002, "Bidirectional to Bottom" },
817 { 0x00000003, "Right to Top" },
818 { 0x00000004, "Left to Top" },
819 { 0x00000005, "Bidirectional to Top" },
820 { 0x00000006, "Bottom to Right" },
821 { 0x00000007, "Bottom to Left" },
822 { 0x00000008, "Top to Left" },
823 { 0x00000009, "Top to Right" },
827 static const value_string ndps_page_order_enum[] = {
828 { 0x00000000, "Unknown" },
829 { 0x00000001, "First to Last" },
830 { 0x00000002, "Last to First" },
834 static const value_string ndps_medium_size_enum[] = {
835 { 0x00000000, "Discrete" },
836 { 0x00000001, "Continuous" },
840 static const value_string ndps_page_orientation_enum[] = {
841 { 0x00000000, "Unknown" },
842 { 0x00000001, "Face Up" },
843 { 0x00000002, "Face Down" },
847 static const value_string ndps_print_security[] = {
848 { 0x00000001, "Low" },
849 { 0x00000002, "Medium" },
850 { 0x00000003, "High" },
854 static const value_string ndps_numbers_up_enum[] = {
855 { 0x00000000, "Cardinal" },
856 { 0x00000001, "Name or Object ID" },
857 { 0x00000002, "Cardinal Range" },
862 static const value_string ndps_state_severity_enum[] = {
863 { 0x00000001, "Other" },
864 { 0x00000002, "Warning" },
865 { 0x00000003, "Critical" },
870 static const value_string ndps_training_enum[] = {
871 { 0x00000001, "Other" },
872 { 0x00000002, "Unknown" },
873 { 0x00000003, "Untrained" },
874 { 0x00000004, "Trained" },
875 { 0x00000005, "Field Service" },
876 { 0x00000006, "Management" },
880 static const value_string ndps_colorant_set_enum[] = {
881 { 0x00000000, "Name" },
882 { 0x00000001, "Description" },
886 static const value_string ndps_card_enum_time_enum[] = {
887 { 0x00000000, "Cardinal" },
888 { 0x00000001, "Enumeration" },
889 { 0x00000002, "Time" },
893 static const value_string ndps_attrs_arg_enum[] = {
894 { 0x00000000, "Continuation" },
895 { 0x00000001, "Specification" },
900 static const value_string ndps_filter_enum[] = {
901 { 0x00000000, "Item" },
902 { 0x00000001, "And" },
903 { 0x00000002, "Or" },
904 { 0x00000003, "Not" },
909 static const value_string ndps_filter_item_enum[] = {
910 { 0x00000000, "Equality" },
911 { 0x00000001, "Substrings" },
912 { 0x00000002, "Greater then or Equal to" },
913 { 0x00000003, "Less then or Equal to" },
914 { 0x00000004, "Present" },
915 { 0x00000005, "Subset of" },
916 { 0x00000006, "Superset of" },
917 { 0x00000007, "Non NULL Set Intersect" },
921 static const value_string ndps_match_criteria_enum[] = {
922 { 0x00000000, "Exact" },
923 { 0x00000001, "Case Insensitive" },
924 { 0x00000002, "Same Letter" },
925 { 0x00000003, "Approximate" },
929 static const value_string ndps_operator_enum[] = {
930 { 0x00000000, "Attributes" },
931 { 0x00000002, "Ordered Jobs" },
935 static const value_string ndps_resource_type_enum[] = {
936 { 0x00000000, "Printer Drivers" },
937 { 0x00000001, "Printer Definitions" },
938 { 0x00000002, "Printer Definitions Short" },
939 { 0x00000003, "Banner Page Files" },
940 { 0x00000004, "Font Types" },
941 { 0x00000005, "Printer Driver Files" },
942 { 0x00000006, "Printer Definition File" },
943 { 0x00000007, "Font Files" },
944 { 0x00000008, "Generic Type" },
945 { 0x00000009, "Generic Files" },
946 { 0x0000000a, "Printer Definition File 2" },
947 { 0x0000000b, "Printer Driver Types 2" },
948 { 0x0000000c, "Printer Driver Files 2" },
949 { 0x0000000d, "Printer Driver Types Archive" },
950 { 0x0000000e, "Languages Available" },
954 static const value_string ndps_os_type_enum[] = {
955 { 0x00000000, "DOS" },
956 { 0x00000001, "Windows 3.1" },
957 { 0x00000002, "Windows 95" },
958 { 0x00000003, "Windows NT" },
959 { 0x00000004, "OS2" },
960 { 0x00000005, "MAC" },
961 { 0x00000006, "UNIX" },
962 { 0x00000007, "Windows NT 4.0" },
963 { 0x00000008, "Windows 2000/XP" },
964 { 0x00000009, "Windows 98" },
965 { 0xffffffff, "None" },
969 static const value_string ndps_banner_type_enum[] = {
970 { 0x00000000, "All" },
971 { 0x00000001, "PCL" },
972 { 0x00000002, "PostScript" },
973 { 0x00000003, "ASCII Text" },
977 static const value_string ndps_font_type_enum[] = {
978 { 0x00000000, "TrueType" },
979 { 0x00000001, "PostScript" },
980 { 0x00000002, "System" },
981 { 0x00000003, "SPD" },
982 { 0x00000004, "True Doc" },
986 static const value_string ndps_archive_enum[] = {
987 { 0x00000000, "ZIP" },
988 { 0x00000001, "JAR" },
993 static const value_string ndps_res_type_enum[] = {
994 { 0x00000000, "Printer Driver" },
995 { 0x00000001, "Printer Definition" },
996 { 0x00000002, "Banner Page" },
997 { 0x00000003, "Font" },
998 { 0x00000004, "Generic Resource" },
999 { 0x00000005, "Print Driver Archive" },
1003 static const value_string ndps_print_arg_enum[] = {
1004 { 0x00000000, "Create Job" },
1005 { 0x00000001, "Add Document" },
1006 { 0x00000002, "Close Job" },
1010 static const value_string ndps_doc_content_enum[] = {
1011 { 0x00000000, "Content Included" },
1012 { 0x00000001, "Content Referenced" },
1016 static const value_string ndps_interrupt_job_enum[] = {
1017 { 0x00000000, "Job ID" },
1018 { 0x00000001, "Name" },
1022 static const value_string ndps_pause_job_enum[] = {
1023 { 0x00000000, "Job ID" },
1024 { 0x00000001, "Name" },
1028 static const value_string ndps_resubmit_op_enum[] = {
1029 { 0x00000000, "Copy" },
1030 { 0x00000001, "Move" },
1034 static const value_string ndps_shutdown_enum[] = {
1035 { 0x00000000, "Do Current Jobs" },
1036 { 0x00000001, "Immediate" },
1037 { 0x00000002, "Do Pending Jobs" },
1041 static const value_string ndps_list_profiles_choice_enum[] = {
1042 { 0x00000000, "ID" },
1043 { 0x00000001, "Filter" },
1047 static const value_string ndps_list_profiles_result_enum[] = {
1048 { 0x00000000, "Complete" },
1049 { 0x00000001, "No Event Objects" },
1050 { 0x00000002, "Profile ID's" },
1054 static const value_string ndps_ds_info_enum[] = {
1055 { 0x00000000, "Add" },
1056 { 0x00000001, "Remove" },
1057 { 0x00000002, "Update" },
1061 static const value_string ndps_list_services_enum[] = {
1062 { 0x00000000, "Supported" },
1063 { 0x00000001, "Enabled" },
1067 static const value_string ndps_data_item_enum[] = {
1068 { 0x00000000, "Int8" },
1069 { 0x00000001, "Int16" },
1070 { 0x00000002, "Int32" },
1071 { 0x00000003, "Boolean" },
1072 { 0x00000004, "Character String" },
1073 { 0x00000005, "Byte String" },
1077 static const value_string ndps_list_local_servers_enum[] = {
1078 { 0x00000000, "Specification" },
1079 { 0x00000001, "Continuation" },
1083 static const value_string ndps_delivery_method_enum[] = {
1084 { 0x00000000, "Specification" },
1085 { 0x00000001, "Continuation" },
1089 static const value_string ndps_attribute_enum[] = {
1090 { 0x00000000, "Null" },
1091 { 0x00000001, "Text" },
1092 { 0x00000002, "Descriptive Name" },
1093 { 0x00000003, "Descriptor" },
1094 { 0x00000004, "Message" },
1095 { 0x00000005, "Error Message" },
1096 { 0x00000006, "Simple Name" },
1097 { 0x00000007, "Distinguished Name String" },
1098 { 0x00000008, "Distinguished Name Seq" },
1099 { 0x00000009, "Delta Time" },
1100 { 0x0000000a, "Time" },
1101 { 0x0000000b, "Integer" },
1102 { 0x0000000c, "Integer Seq" },
1103 { 0x0000000d, "Cardinal" },
1104 { 0x0000000e, "Cardinal Seq" },
1105 { 0x0000000f, "Positive Integer" },
1106 { 0x00000010, "Integer Range" },
1107 { 0x00000011, "Cardinal Range" },
1108 { 0x00000012, "Maximum Integer" },
1109 { 0x00000013, "Minimum Integer" },
1110 { 0x00000014, "Integer 64" },
1111 { 0x00000015, "Integer 64 Seq" },
1112 { 0x00000016, "Cardinal 64" },
1113 { 0x00000017, "Cardinal 64 Seq" },
1114 { 0x00000018, "Positive Integer 64" },
1115 { 0x00000019, "Integer 64 Range" },
1116 { 0x0000001a, "Cardinal 64 Range" },
1117 { 0x0000001b, "Maximum Integer 64" },
1118 { 0x0000001c, "Minimum Integer 64" },
1119 { 0x0000001d, "Real" },
1120 { 0x0000001e, "Real Seq" },
1121 { 0x0000001f, "Non-Negative Real" },
1122 { 0x00000020, "Real Range" },
1123 { 0x00000021, "Non-Negative Real Range" },
1124 { 0x00000022, "Boolean" },
1125 { 0x00000023, "Percent" },
1126 { 0x00000024, "Object Identifier" },
1127 { 0x00000025, "Object Identifier Seq" },
1128 { 0x00000026, "Name or OID" },
1129 { 0x00000027, "Name or OID Seq" },
1130 { 0x00000028, "Distinguished Name" },
1131 { 0x00000029, "Relative Distinguished Name Seq" },
1132 { 0x0000002a, "Realization" },
1133 { 0x0000002b, "Medium Dimensions" },
1134 { 0x0000002c, "Dimension" },
1135 { 0x0000002d, "XY Dimensions" },
1136 { 0x0000002e, "Locations" },
1137 { 0x0000002f, "Area" },
1138 { 0x00000030, "Area Seq" },
1139 { 0x00000031, "Edge" },
1140 { 0x00000032, "Font Reference" },
1141 { 0x00000033, "Cardinal or OID" },
1142 { 0x00000034, "OID Cardinal Map" },
1143 { 0x00000035, "Cardinal or Name or OID" },
1144 { 0x00000036, "Positive Integer or OID" },
1145 { 0x00000037, "Event Handling Profile" },
1146 { 0x00000038, "Octet String" },
1147 { 0x00000039, "Priority" },
1148 { 0x0000003a, "Locale" },
1149 { 0x0000003b, "Method Delivery Address" },
1150 { 0x0000003c, "Object Identification" },
1151 { 0x0000003d, "Results Profile" },
1152 { 0x0000003e, "Criteria" },
1153 { 0x0000003f, "Job Password" },
1154 { 0x00000040, "Job Level" },
1155 { 0x00000041, "Job Categories" },
1156 { 0x00000042, "Print Checkpoint" },
1157 { 0x00000043, "Ignored Attribute" },
1158 { 0x00000044, "Resource" },
1159 { 0x00000045, "Medium Substitution" },
1160 { 0x00000046, "Font Substitution" },
1161 { 0x00000047, "Resource Context Seq" },
1162 { 0x00000048, "Sides" },
1163 { 0x00000049, "Page Select Seq" },
1164 { 0x0000004a, "Page Media Select" },
1165 { 0x0000004b, "Document Content" },
1166 { 0x0000004c, "Page Size" },
1167 { 0x0000004d, "Presentation Direction" },
1168 { 0x0000004e, "Page Order" },
1169 { 0x0000004f, "File Reference" },
1170 { 0x00000050, "Medium Source Size" },
1171 { 0x00000051, "Input Tray Medium" },
1172 { 0x00000052, "Output Bins Chars" },
1173 { 0x00000053, "Page ID Type" },
1174 { 0x00000054, "Level Range" },
1175 { 0x00000055, "Category Set" },
1176 { 0x00000056, "Numbers Up Supported" },
1177 { 0x00000057, "Finishing" },
1178 { 0x00000058, "Print Contained Object ID" },
1179 { 0x00000059, "Print Config Object ID" },
1180 { 0x0000005a, "Typed Name" },
1181 { 0x0000005b, "Network Address" },
1182 { 0x0000005c, "XY Dimensions Value" },
1183 { 0x0000005d, "Name or OID Dimensions Map" },
1184 { 0x0000005e, "Printer State Reason" },
1185 { 0x0000005f, "Enumeration" },
1186 { 0x00000060, "Qualified Name" },
1187 { 0x00000061, "Qualified Name Set" },
1188 { 0x00000062, "Colorant Set" },
1189 { 0x00000063, "Resource Printer ID" },
1190 { 0x00000064, "Event Object ID" },
1191 { 0x00000065, "Qualified Name Map" },
1192 { 0x00000066, "File Path" },
1193 { 0x00000067, "Uniform Resource Identifier" },
1194 { 0x00000068, "Cardinal or Enum or Time" },
1195 { 0x00000069, "Print Contained Object ID Set" },
1196 { 0x0000006a, "Octet String Pair" },
1197 { 0x0000006b, "Octet String Integer Pair" },
1198 { 0x0000006c, "Extended Resource Identifier" },
1199 { 0x0000006d, "Event Handling Profile 2" },
1203 static const value_string ndps_error_types[] = {
1204 { 0x00000000, "Ok" },
1205 { 0x00000001, "Error" },
1206 { 0xFFFFFC18, "Broker Out of Memory" }, /* Broker Errors */
1207 { 0xFFFFFC17, "Broker Bad NetWare Version" },
1208 { 0xFFFFFC16, "Broker Wrong Command Line Arguments" },
1209 { 0xFFFFFC15, "Broker Name Not Given" },
1210 { 0xFFFFFC14, "Not Broker Class" },
1211 { 0xFFFFFC13, "Invalid Broker Password" },
1212 { 0xFFFFFC12, "Invalid Broker Name" },
1213 { 0xFFFFFC11, "Broker Failed to Create Thread" },
1214 { 0xFFFFFC10, "Broker Failed to Initialize NUT" },
1215 { 0xFFFFFC0F, "Broker Failed to Get Messages" },
1216 { 0xFFFFFC0E, "Broker Failed to Allocate Resources" },
1217 { 0xFFFFFC0D, "Broker Service Name Must be Fully Distinguished" },
1218 { 0xFFFFFC0C, "Broker Uninitialized Module" },
1219 { 0xFFFFFC0B, "Broker DS Value Size Too Large" },
1220 { 0xFFFFFC0A, "Broker No Attribute Values" },
1221 { 0xFFFFFC09, "Broker Unknown Session" },
1222 { 0xFFFFFC08, "Broker Service Disabled" },
1223 { 0xFFFFFC07, "Broker Unknown Modify Operation" },
1224 { 0xFFFFFC06, "Broker Invalid Arguments" },
1225 { 0xFFFFFC05, "Broker Duplicate Session ID" },
1226 { 0xFFFFFC04, "Broker Unknown Service" },
1227 { 0xFFFFFC03, "Broker Service Already Enabled" },
1228 { 0xFFFFFC02, "Broker Service Already Disabled" },
1229 { 0xFFFFFC01, "Broker Invalid Credential" },
1230 { 0xFFFFFC00, "Broker Unknown Designator" },
1231 { 0xFFFFFBFF, "Broker Failed to Make Change Permanent" },
1232 { 0xFFFFFBFE, "Broker Not Admin Type Session" },
1233 { 0xFFFFFBFD, "Broker Option Not Supported" },
1234 { 0xFFFFFBFC, "Broker No Effective Rights" },
1235 { 0xFFFFFBFB, "Broker Could Not Find File" },
1236 { 0xFFFFFBFA, "Broker Error Reading File" },
1237 { 0xFFFFFBF9, "Broker Not NLM File Format" },
1238 { 0xFFFFFBF8, "Broker Wrong NLM File Version" },
1239 { 0xFFFFFBF7, "Broker Reentrant Initialization Failure" },
1240 { 0xFFFFFBF6, "Broker Already in Progress" },
1241 { 0xFFFFFBF5, "Broker Initialize Failure" },
1242 { 0xFFFFFBF4, "Broker Inconsistent File Format" },
1243 { 0xFFFFFBF3, "Broker Can't Load at Startup" },
1244 { 0xFFFFFBF2, "Broker Autoload Modules Not Loaded" },
1245 { 0xFFFFFBF1, "Broker Unresolved External" },
1246 { 0xFFFFFBF0, "Broker Public Already Defined" },
1247 { 0xFFFFFBEF, "Broker Other Broker Using Object" },
1248 { 0xFFFFFBEE, "Broker Service Failed to Initialize" },
1249 { 0xFFFFFBB4, "Registry Out of Memory" }, /* SRS Errors */
1250 { 0xFFFFFBB3, "Registry Bad NetWare Version" },
1251 { 0xFFFFFBB2, "Registry Failed to Create Context" },
1252 { 0xFFFFFBB1, "Registry Failed Login" },
1253 { 0xFFFFFBB0, "Registry Failed to Create Thread" },
1254 { 0xFFFFFBAF, "Registry Failed to Get Messages" },
1255 { 0xFFFFFBAE, "Registry Service Name Must Be Fully Distinguished" },
1256 { 0xFFFFFBAD, "Registry DS Value Size Too Large" },
1257 { 0xFFFFFBAC, "Registry No Attribute Values" },
1258 { 0xFFFFFBAB, "Registry Unknown Session" },
1259 { 0xFFFFFBAA, "Registry Service Disabled" },
1260 { 0xFFFFFBA9, "Registry Unknown Modify Operation" },
1261 { 0xFFFFFBA8, "Registry Can't Start Advertise" },
1262 { 0xFFFFFBA7, "Registry Duplicate Server Entry" },
1263 { 0xFFFFFBA6, "Registry Can't Bind to Registry" },
1264 { 0xFFFFFBA5, "Registry Can't Create Client" },
1265 { 0xFFFFFBA4, "Registry Invalid Arguments" },
1266 { 0xFFFFFBA3, "Registry Duplicate Session ID" },
1267 { 0xFFFFFBA2, "Registry Unknown Server Entry" },
1268 { 0xFFFFFBA1, "Registry Invalid Credential" },
1269 { 0xFFFFFBA0, "Registry Type Session" },
1270 { 0xFFFFFB9F, "Registry Server Type Session" },
1271 { 0xFFFFFB9E, "Registry Not Server Type Session" },
1272 { 0xFFFFFB9D, "Not Registry Type Session" },
1273 { 0xFFFFFB9C, "Registry Unknown Designator" },
1274 { 0xFFFFFB9B, "Registry Option Not Supported" },
1275 { 0xFFFFFB9A, "Registry Not in List Iteration" },
1276 { 0xFFFFFB99, "Registry Invalid Continuation Handle" },
1277 { 0xFFFFFB50, "Notify Out of Memory" }, /* Notification Service Errors */
1278 { 0xFFFFFB4F, "Notify Bad NetWare Version" },
1279 { 0xFFFFFB4E, "Notify Failed to Create Thread" },
1280 { 0xFFFFFB4D, "Notify Failed to Get Messages" },
1281 { 0xFFFFFB4C, "Notify Failed to Create Context" },
1282 { 0xFFFFFB4B, "Notify Failed Login" },
1283 { 0xFFFFFB4A, "Notify Service Name Must be Fully Distiguished" },
1284 { 0xFFFFFB49, "Notify DS Value Size Too Large" },
1285 { 0xFFFFFB48, "Notify No Attribute Values" },
1286 { 0xFFFFFB47, "Notify Unknown Session" },
1287 { 0xFFFFFB46, "Notify Unknown Notify Profile" },
1288 { 0xFFFFFB45, "Notify Error Reading File" },
1289 { 0xFFFFFB44, "Notify Error Writing File" },
1290 { 0xFFFFFB43, "Wrong Notify Database Version" },
1291 { 0xFFFFFB42, "Corrupted Notify Database" },
1292 { 0xFFFFFB41, "Notify Unknown Event Object ID" },
1293 { 0xFFFFFB40, "Notify Method Already Installed" },
1294 { 0xFFFFFB3F, "Notify Unknown Method" },
1295 { 0xFFFFFB3E, "Notify Service Disabled" },
1296 { 0xFFFFFB3D, "Notify Unknown Modify Operation" },
1297 { 0xFFFFFB3C, "Out of Notify Entries" },
1298 { 0xFFFFFB3B, "Notify Unknown Language ID" },
1299 { 0xFFFFFB3A, "Notify Queue Empty" },
1300 { 0xFFFFFB39, "Notify Can't Load Delivery Method" },
1301 { 0xFFFFFB38, "Notify Invalid Arguments" },
1302 { 0xFFFFFB37, "Notify Duplicate Session ID" },
1303 { 0xFFFFFB36, "Notify Invalid Credentials" },
1304 { 0xFFFFFB35, "Notify Unknown Choice" },
1305 { 0xFFFFFB34, "Notify Unknown Attribute Value" },
1306 { 0xFFFFFB33, "Notify Error Writing Database" },
1307 { 0xFFFFFB32, "Notify Unknown Object ID" },
1308 { 0xFFFFFB31, "Notify Unknown Designator" },
1309 { 0xFFFFFB30, "Notify Failed to Make Change Permanent" },
1310 { 0xFFFFFB2F, "Notify User Interface Not Supported" },
1311 { 0xFFFFFB2E, "Notify Not Supplied Type of Session" },
1312 { 0xFFFFFB2D, "Notify Not Admin Type Session" },
1313 { 0xFFFFFB2C, "Notify No Service Registry Available" },
1314 { 0xFFFFFB2B, "Notify Failed to Register With Any Server" },
1315 { 0xFFFFFB2A, "Notify Empty Event Object Set" },
1316 { 0xFFFFFB29, "Notify Unknown Notify Handle" },
1317 { 0xFFFFFB28, "Notify Option Not Supported" },
1318 { 0xFFFFFB27, "Notify Unknown RPC Session" },
1319 { 0xFFFFFB26, "Notify Initialization Error" },
1320 { 0xFFFFFB25, "Notify No Effective Rights" },
1321 { 0xFFFFFB24, "Notify No Persistent Storage" },
1322 { 0xFFFFFB23, "Notify Bad Method Filename" },
1323 { 0xFFFFFB22, "Notify Unknown Continuation Handle" },
1324 { 0xFFFFFB21, "Notify Invalid Continuation Handle" },
1325 { 0xFFFFFB20, "Notify Could Not Find File" },
1326 { 0xFFFFFB1F, "Notify Error Reading File" },
1327 { 0xFFFFFB1E, "Notify Not NLM File Format" },
1328 { 0xFFFFFB1D, "Notify Wrong NLM File Version" },
1329 { 0xFFFFFB1C, "Notify Reentrant Initialization Failure" },
1330 { 0xFFFFFB1B, "Notify Already in Progress" },
1331 { 0xFFFFFB1A, "Notify Initialization Failure" },
1332 { 0xFFFFFB19, "Notify Inconsistent File Format" },
1333 { 0xFFFFFB18, "Notify Can't Load at Startup" },
1334 { 0xFFFFFB17, "Notify Autoload Modules Not Loaded" },
1335 { 0xFFFFFB16, "Notify Unresolved External" },
1336 { 0xFFFFFB15, "Notify Public Already Defined" },
1337 { 0xFFFFFB14, "Notify Using Unknown Methods" },
1338 { 0xFFFFFB13, "Notify Service Not Fully Enabled" },
1339 { 0xFFFFFB12, "Notify Foreign NDS Tree Name" },
1340 { 0xFFFFFB11, "Notify Delivery Method Rejected Address" },
1341 { 0xFFFFFB10, "Notify Unsupported Delivery Address Type" },
1342 { 0xFFFFFB0F, "Notify User Object No Default Server" },
1343 { 0xFFFFFB0E, "Notify Failed to Send Notification" },
1344 { 0xFFFFFB0D, "Notify Bad Volume in Address" },
1345 { 0xFFFFFB0C, "Notify Broker Has No File Rights" },
1346 { 0xFFFFFB0B, "Notify Maximum Methods Supported" },
1347 { 0xFFFFFB0A, "Notify No Filter Provided" },
1348 { 0xFFFFFB09, "Notify IPX Not Supported By Method" },
1349 { 0xFFFFFB08, "Notify IP Not Supported By Method" },
1350 { 0xFFFFFB07, "Notify Failed to Startup Winsock" },
1351 { 0xFFFFFB06, "Notify No Protocols Available" },
1352 { 0xFFFFFB05, "Notify Failed to Launch RPC Server" },
1353 { 0xFFFFFB04, "Notify Invalid SLP Attribute Format" },
1354 { 0xFFFFFB03, "Notify Invalid SLP URL Format" },
1355 { 0xFFFFFB02, "Notify Unknown Attribute Object ID" },
1356 { 0xFFFFFB01, "Notify Duplicate Session ID" },
1357 { 0xFFFFFB00, "Notify Failed to Authenticate" },
1358 { 0xFFFFFAFF, "Notify Failed to Authenticate Protocol Mismatch" },
1359 { 0xFFFFFAFE, "Notify Failed to Authenticate Internal Error" },
1360 { 0xFFFFFAFD, "Notify Failed to Authenticate Connection Error" },
1361 { 0xFFFFFC7C, "Resource Manager Out of Memory" }, /* ResMan Errors */
1362 { 0xFFFFFC7B, "Resource Manager Bad NetWare Version" },
1363 { 0xFFFFFC7A, "Resource Manager Wrong Command Line Arguments" },
1364 { 0xFFFFFC79, "Resource Manager Broker Name Not Given" },
1365 { 0xFFFFFC78, "Resource Manager Invalid Broker Password" },
1366 { 0xFFFFFC77, "Resource Manager Invalid Broker Name" },
1367 { 0xFFFFFC76, "Resource Manager Failed to Create Thread" },
1368 { 0xFFFFFC75, "Resource Manager Service Name Must be Fully Distinguished" },
1369 { 0xFFFFFC74, "Resource Manager DS Value Size Too Large" },
1370 { 0xFFFFFC73, "Resource Manager No Attribute Values" },
1371 { 0xFFFFFC72, "Resource Manager Unknown Session" },
1372 { 0xFFFFFC71, "Resource Manager Error Reading File" },
1373 { 0xFFFFFC70, "Resource Manager Error Writing File" },
1374 { 0xFFFFFC6F, "Resource Manager Service Disabled" },
1375 { 0xFFFFFC6E, "Resource Manager Unknown Modify Operation" },
1376 { 0xFFFFFC6D, "Resource Manager Duplicate Session ID" },
1377 { 0xFFFFFC6C, "Resource Manager Invalid Credentials" },
1378 { 0xFFFFFC6B, "Resource Manager No Service Registry Available" },
1379 { 0xFFFFFC6A, "Resource Manager Failed to Register With any Server" },
1380 { 0xFFFFFC69, "Resource Manager Failed to Get Messages" },
1381 { 0xFFFFFC68, "Resource Manager Failed to Create Context" },
1382 { 0xFFFFFC67, "Resource Manager Failed to Login" },
1383 { 0xFFFFFC66, "Resource Manager NPD Files Generation Error" },
1384 { 0xFFFFFC65, "Resource Manager INF File Format Error" },
1385 { 0xFFFFFC64, "Resource Manager No Printer Type in INF File" },
1386 { 0xFFFFFC63, "Resource Manager No INF Files Present" },
1387 { 0xFFFFFC62, "Resource Manager File Open Error" },
1388 { 0xFFFFFC61, "Resource Manager Read File Error" },
1389 { 0xFFFFFC60, "Resource Manager Write File Error" },
1390 { 0xFFFFFC5F, "Resource Manager Resource Type Invalid" },
1391 { 0xFFFFFC5E, "Resource Manager No Such Filename" },
1392 { 0xFFFFFC5D, "Resource Manager Banner Type Invalid" },
1393 { 0xFFFFFC5C, "Resource Manager List Type Unknown" },
1394 { 0xFFFFFC5B, "Resource Manager OS Not Supported" },
1395 { 0xFFFFFC5A, "Resource Manager No Banner Files Present" },
1396 { 0xFFFFFC59, "Resource Manager Printer Definition Type Unknown" },
1397 { 0xFFFFFC58, "Resource Manager No Printer Types in List" },
1398 { 0xFFFFFC57, "Resource Manager Option Not Supported" },
1399 { 0xFFFFFC56, "Resource Manager Unicode Convention Error" },
1400 { 0xFFFFFC55, "Resource Manager Invalid Arguments" },
1401 { 0xFFFFFC54, "Resource Manager Initialization Error" },
1402 { 0xFFFFFC53, "Resource Manager No Service Registry Available" },
1403 { 0xFFFFFC52, "Resource Manager Failed to Register to Any Server" },
1404 { 0xFFFFFC51, "Resource Manager Unknown Designator" },
1405 { 0xFFFFFC50, "Resource Manager Not Admin Session" },
1406 { 0xFFFFFC4F, "Resource Manager No Effective Rights" },
1407 { 0xFFFFFC4E, "Resource Manager Bad File Attribute" },
1408 { 0xFFFFFC4D, "Resource Manager Document ID Format Error" },
1409 { 0xFFFFFC4C, "Resource Manager Unknown RPC Session" },
1410 { 0xFFFFFC4B, "Resource Manager Session Being Removed" },
1411 { 0xFFFFFC49, "Resource Manager Font Manager IO Error" },
1412 { 0xFFFFFC48, "Resource Manager Font Manager Reentrancy" },
1413 { 0xFFFFFC47, "Resource Manager Font Manager Sequence Error" },
1414 { 0xFFFFFC46, "Resource Manager Font Manager Corrupt Index File" },
1415 { 0xFFFFFC45, "Resource Manager Font Manager No Such Font" },
1416 { 0xFFFFFC44, "Resource Manager Font Manager Not Initialized" },
1417 { 0xFFFFFC43, "Resource Manager Font Manager System Error" },
1418 { 0xFFFFFC42, "Resource Manager Font Manager Bad Parameter" },
1419 { 0xFFFFFC41, "Resource Manager Font Manager Path Too Long" },
1420 { 0xFFFFFC40, "Resource Manager Font Manager Failure" },
1421 { 0xFFFFFC3F, "Resource Manager Duplicate TIRPC Session" },
1422 { 0xFFFFFC3E, "Resource Manager Connection Lost RMS Data" },
1423 { 0xFFFFFC3D, "Resource Manager Failed to Start Winsock" },
1424 { 0xFFFFFC3C, "Resource Manager No Protocols Available" },
1425 { 0xFFFFFC3B, "Resource Manager Failed to Launch RPC Server" },
1426 { 0xFFFFFC3A, "Resource Manager Invalid SLP Attribute Format" },
1427 { 0xFFFFFC39, "Resource Manager Invalid SLP URL Format" },
1428 { 0xFFFFFC38, "Resource Manager Unresolved External" },
1429 { 0xFFFFFC37, "Resource Manager Failed to Authenticate" },
1430 { 0xFFFFFC36, "Resource Manager Failed to Authenticate Protocol Mismatch" },
1431 { 0xFFFFFC35, "Resource Manager Failed to Authenticate Internal Error" },
1432 { 0xFFFFFC34, "Resource Manager Failed to Authenticate Connection Error" },
1433 { 0xFFFFFC33, "Resource Manager No Rights to Remote Resdir" },
1434 { 0xFFFFFC32, "Resource Manager Can't Initialize NDPS Library" },
1435 { 0xFFFFFC31, "Resource Manager Can't Create Resource Reference" },
1436 { 0xFFFFFC30, "Resource Manager File is Zero Length" },
1437 { 0xFFFFFC2F, "Resource Manager Failed to Write INF in Address" },
1438 { 0xFFFFFCDF, "NDPSM No Memory" }, /* NDPSM Errors */
1439 { 0xFFFFFCDE, "NDPSM Memory Not Found" },
1440 { 0xFFFFFCDD, "NDPSM Job Storage Limit" },
1441 { 0xFFFFFCDC, "NDPSM Job Retention Limit" },
1442 { 0xFFFFFCDB, "NDPSM Unsupported Type" },
1443 { 0xFFFFFCDA, "NDPSM Undefined Type" },
1444 { 0xFFFFFCD9, "NDPSM Unsupported Operation" },
1445 { 0xFFFFFCD8, "NDPSM Error Accessing Database" },
1446 { 0xFFFFFCD7, "NDPSM No PDS" },
1447 { 0xFFFFFCD6, "NDPSM Invalid Class" },
1448 { 0xFFFFFCD5, "NDPSM Bad Parameter" },
1449 { 0xFFFFFCD4, "NDPSM Object Not Found" },
1450 { 0xFFFFFCD3, "NDPSM Attribute Not Found" },
1451 { 0xFFFFFCD2, "NDPSM Value Not Found" },
1452 { 0xFFFFFCD1, "NDPSM Values Not Comparable" },
1453 { 0xFFFFFCD0, "NDPSM Invalid Value Syntax" },
1454 { 0xFFFFFCCF, "NDPSM Job Not Found" },
1455 { 0xFFFFFCCE, "NDPSM Communications Error" },
1456 { 0xFFFFFCCD, "NDPSM Printer Agent Initializing" },
1457 { 0xFFFFFCCC, "NDPSM Printer Agent Going Down" },
1458 { 0xFFFFFCCB, "NDPSM Printer Agent Disabled" },
1459 { 0xFFFFFCCA, "NDPSM Printer Agent Paused" },
1460 { 0xFFFFFCC9, "NDPSM Bad Printer Agent Handle" },
1461 { 0xFFFFFCC8, "NDPSM Object Not Locked" },
1462 { 0xFFFFFCC7, "NDPSM Version Incompatible" },
1463 { 0xFFFFFCC6, "NDPSM PSM Initializing" },
1464 { 0xFFFFFCC5, "NDPSM PSM Going Down" },
1465 { 0xFFFFFCC4, "NDPSM Notification Service Error" },
1466 { 0xFFFFFCC3, "NDPSM Medium Needs Mounted" },
1467 { 0xFFFFFCC2, "NDPSM PDS Not Responding" },
1468 { 0xFFFFFCC1, "NDPSM Session Not Found" },
1469 { 0xFFFFFCC0, "NDPSM RPC Failure" },
1470 { 0xFFFFFCBF, "NDPSM Duplicate Value" },
1471 { 0xFFFFFCBE, "NDPSM PDS Refuses Rename" },
1472 { 0xFFFFFCBD, "NDPSM No Mandatory Attribute" },
1473 { 0xFFFFFCBC, "NDPSM Already Attached" },
1474 { 0xFFFFFCBB, "NDPSM Can't Attach" },
1475 { 0xFFFFFCBA, "NDPSM Too Many NetWare Servers" },
1476 { 0xFFFFFCB9, "NDPSM Can't Create Document File" },
1477 { 0xFFFFFCB8, "NDPSM Can't Delete Document File" },
1478 { 0xFFFFFCB7, "NDPSM Can't Open Document File" },
1479 { 0xFFFFFCB6, "NDPSM Can't Write Document File" },
1480 { 0xFFFFFCB5, "NDPSM Job is Active" },
1481 { 0xFFFFFCB4, "NDPSM No Scheduler" },
1482 { 0xFFFFFCB3, "NDPSM Changing Connection" },
1483 { 0xFFFFFCB2, "NDPSM Could not Create Account Reference" },
1484 { 0xFFFFFCB1, "NDPSM Accounting Service Error" },
1485 { 0xFFFFFCB0, "NDPSM RMS Service Error" },
1486 { 0xFFFFFCAF, "NDPSM Failed Validation" },
1487 { 0xFFFFFCAE, "NDPSM Broker Server Connecting" },
1488 { 0xFFFFFCAD, "NDPSM SRS Service Error" },
1489 { 0xFFFFFD44, "JPM Execute Request Later" },
1490 { 0xFFFFFD43, "JPM Failed to Open Document" },
1491 { 0xFFFFFD42, "JPM Failed to Read Document File" },
1492 { 0xFFFFFD41, "JPM Bad Printer Agent Handle" },
1493 { 0xFFFFFD40, "JPM Bad Job Handle" },
1494 { 0xFFFFFD3F, "JPM Bad Document Handle" },
1495 { 0xFFFFFD3E, "JPM Unsupported Operation" },
1496 { 0xFFFFFD3D, "JPM Request Queue Full" },
1497 { 0xFFFFFD3C, "JPM Printer Agent Not Found" },
1498 { 0xFFFFFD3B, "JPM Invalid Request" },
1499 { 0xFFFFFD3A, "JPM Not Accepting Requests" },
1500 { 0xFFFFFD39, "JPM Printer Agent Already Serviced By PDS" },
1501 { 0xFFFFFD38, "JPM No Job" },
1502 { 0xFFFFFD37, "JPM Job Not Found" },
1503 { 0xFFFFFD36, "JPM Could not Access Database" },
1504 { 0xFFFFFD35, "JPM Bad Object Type" },
1505 { 0xFFFFFD34, "JPM Job Already Closed" },
1506 { 0xFFFFFD33, "JPM Document Already Closed" },
1507 { 0xFFFFFD32, "JPM Print Handler Not Registered" },
1508 { 0xFFFFFD31, "JPM Version Incompatible" },
1509 { 0xFFFFFD30, "JPM Printer Agent Paused" },
1510 { 0xFFFFFD2F, "JPM Printer Agent Shutdown" },
1511 { 0xFFFFFD2E, "JPM No CLIB Context" },
1512 { 0xFFFFFD2D, "JPM Accounting Already Serviced" },
1513 { 0xFFFFFC7B, "Database Can't Create File" },
1514 { 0xFFFFFC7A, "Database Can't Find Data File" },
1515 { 0xFFFFFC79, "Database Can't Open Data File" },
1516 { 0xFFFFFC78, "Database Can't Open Index File" },
1517 { 0xFFFFFC77, "Database Index File Not Open" },
1518 { 0xFFFFFC76, "Database Can't Rename File" },
1519 { 0xFFFFFC75, "Database Can't Read Data File" },
1520 { 0xFFFFFC74, "Database Can't Read Index File" },
1521 { 0xFFFFFC73, "Database Can't Write Data File" },
1522 { 0xFFFFFC72, "Database Can't Write Index File" },
1523 { 0xFFFFFC71, "Database Can't Delete Printer Agent Directory" },
1524 { 0xFFFFFC70, "Database Already Deleted" },
1525 { 0xFFFFFC6F, "Database Object Exists" },
1526 { 0xFFFFFC6E, "Database Descriptor In Use" },
1527 { 0xFFFFFC6D, "Database Descriptor Being Deleted" },
1531 static const value_string ndps_credential_enum[] = {
1540 static const value_string ndps_object_op_enum[] = {
1544 { 3, "Delete Object" },
1548 static const value_string ndps_client_server_enum[] = {
1551 { 2, "Client and Server" },
1555 static const value_string ndps_session_type_enum[] = {
1564 static const value_string ndps_get_session_type_enum[] = {
1572 static const value_string ndps_get_resman_session_type_enum[] = {
1580 align_4(tvbuff_t *tvb, int aoffset)
1582 if(tvb_length_remaining(tvb, aoffset) > 4 )
1590 ndps_string(tvbuff_t* tvb, int hfinfo, proto_tree *ndps_tree, int offset, char *stringval, size_t buflen)
1592 int foffset = offset;
1597 guint32 length_remaining = 0;
1599 if (stringval == NULL) {
1601 buflen = sizeof buffer;
1603 str_length = tvb_get_ntohl(tvb, foffset);
1605 length_remaining = tvb_length_remaining(tvb, foffset);
1606 if(str_length > (guint)length_remaining || str_length > 1024)
1608 proto_tree_add_string(ndps_tree, hfinfo, tvb, foffset,
1609 length_remaining + 4, "<String too long to process>");
1610 foffset += length_remaining;
1615 proto_tree_add_string(ndps_tree, hfinfo, tvb, offset,
1616 4, "<Not Specified>");
1619 for ( i = 0; i < str_length; i++ )
1621 c_char = tvb_get_guint8(tvb, foffset );
1622 if (c_char<0x20 || c_char>0x7e)
1628 stringval[i] = c_char & 0xff;
1639 stringval[i] = c_char & 0xff;
1644 if(length_remaining==1)
1650 stringval[i] = '\0';
1652 str_length = tvb_get_ntohl(tvb, offset);
1653 proto_tree_add_string(ndps_tree, hfinfo, tvb, offset+4,
1654 str_length, stringval);
1655 foffset += align_4(tvb, foffset);
1660 objectidentifier(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1664 guint32 label_value=0;
1667 gboolean found=TRUE;
1669 length = tvb_get_ntohl(tvb, foffset);
1676 proto_tree_add_uint(ndps_tree, hf_oid_struct_size, tvb, foffset, 4, length);
1682 label_value = tvb_get_ntohl(tvb, foffset+5);
1683 label = match_strval(label_value, object_ids_7);
1686 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1690 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_7, tvb, foffset, length, label);
1693 label_value = tvb_get_ntohl(tvb, foffset+6);
1694 label = match_strval(label_value, object_ids_8);
1697 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1701 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_8, tvb, foffset, length, label);
1704 label_value = tvb_get_ntohl(tvb, foffset+7);
1705 label = match_strval(label_value, object_ids_9);
1708 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1712 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_9, tvb, foffset, length, label);
1715 label_value = tvb_get_ntohl(tvb, foffset+8);
1716 label = match_strval(label_value, object_ids_10);
1719 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1723 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_10, tvb, foffset, length, label);
1726 label_value = tvb_get_ntohl(tvb, foffset+9);
1727 label = match_strval(label_value, object_ids_11);
1730 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1734 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_11, tvb, foffset, length, label);
1737 label_value = tvb_get_ntohl(tvb, foffset+10);
1738 label = match_strval(label_value, object_ids_12);
1741 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1745 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_12, tvb, foffset, length, label);
1748 label_value = tvb_get_ntohl(tvb, foffset+11);
1749 label = match_strval(label_value, object_ids_13);
1752 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1756 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_13, tvb, foffset, length, label);
1759 label_value = tvb_get_ntohl(tvb, foffset+12);
1760 label = match_strval(label_value, object_ids_14);
1763 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1767 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_14, tvb, foffset, length, label);
1770 label_value = tvb_get_ntohl(tvb, foffset+13);
1771 label = match_strval(label_value, object_ids_15);
1774 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1778 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_15, tvb, foffset, length, label);
1781 label_value = tvb_get_ntohl(tvb, foffset+14);
1782 label = match_strval(label_value, object_ids_16);
1785 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1789 aitem = proto_tree_add_none_format(ndps_tree, hf_ndps_object_ids_16, tvb, foffset, length, label);
1792 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, length, "Unknown ID");
1799 label = match_strval(label_value, object_ids_7);
1803 atree = proto_item_add_subtree(aitem, ett_ndps);
1804 proto_tree_add_item(atree, hf_oid_asn1_type, tvb, foffset, 1, FALSE);
1806 length = tvb_get_guint8(tvb, foffset);
1808 proto_tree_add_item(atree, hf_ndps_oid, tvb, foffset, length, FALSE);
1820 length = tvb_get_guint8(tvb, foffset);
1825 global_attribute_name = label;
1826 return foffset+(length%2);
1830 name_or_id(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1832 guint32 name_or_id_val;
1834 name_or_id_val = tvb_get_ntohl(tvb, foffset);
1835 proto_tree_add_uint(ndps_tree, hf_ndps_nameorid, tvb, foffset, 4, name_or_id_val);
1837 switch (name_or_id_val)
1839 case 1: /* Global */
1840 foffset = objectidentifier(tvb, ndps_tree, foffset);
1844 foffset = ndps_string(tvb, hf_local_object_name, ndps_tree, foffset, NULL, 0);
1847 foffset += align_4(tvb, foffset);
1852 qualifiedname(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1854 guint32 qualified_name_type=0;
1856 qualified_name_type = tvb_get_ntohl(tvb, foffset);
1857 proto_tree_add_uint(ndps_tree, hf_ndps_qualified_name, tvb, foffset, 4, qualified_name_type);
1859 if (qualified_name_type != 0) {
1860 if (qualified_name_type == 1) {
1861 foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset, NULL, 0);
1865 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
1866 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
1873 objectidentification(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1875 guint32 object_type=0;
1879 object_type = tvb_get_ntohl(tvb, foffset);
1880 aitem = proto_tree_add_item(ndps_tree, hf_obj_id_type, tvb, foffset, 4, FALSE);
1881 atree = proto_item_add_subtree(aitem, ett_ndps);
1885 case 0: /* Printer Contained Object ID */
1886 foffset = ndps_string(tvb, hf_printer_name, atree, foffset, NULL, 0);
1887 proto_tree_add_item(atree, hf_ndps_object, tvb, foffset,
1891 case 1: /* Document Identifier */
1892 foffset = ndps_string(tvb, hf_printer_name, atree, foffset, NULL, 0);
1893 proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset,
1897 case 2: /* Object Identifier */
1898 foffset = objectidentifier(tvb, atree, foffset);
1900 case 3: /* Object Name */
1901 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
1902 if (foffset > tvb_length_remaining(tvb, foffset)) {
1905 foffset = name_or_id(tvb, atree, foffset);
1907 case 4: /* Name or Object ID */
1908 foffset = name_or_id(tvb, atree, foffset);
1910 case 5: /* Simple Name */
1911 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
1913 case 6: /* Printer Configuration Object ID */
1914 foffset = ndps_string(tvb, hf_printer_name, atree, foffset, NULL, 0);
1916 case 7: /* Qualified Name */
1917 foffset = qualifiedname(tvb, ndps_tree, foffset);
1919 case 8: /* Event Object ID */
1920 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
1921 foffset = objectidentifier(tvb, atree, foffset);
1922 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset,
1932 print_address(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1934 guint32 address_type=0;
1936 guint32 address_len=0;
1938 address_type = tvb_get_ntohl(tvb, foffset);
1939 proto_tree_add_uint(ndps_tree, hf_ndps_address, tvb, foffset, 4, address_type);
1941 address_len = tvb_get_ntohl(tvb, foffset);
1942 proto_tree_add_item(ndps_tree, hf_address_len, tvb, foffset, 4, FALSE);
1944 switch(address_type)
1947 proto_tree_add_item(ndps_tree, hf_ndps_net, tvb, foffset, 4, FALSE);
1948 proto_tree_add_item(ndps_tree, hf_ndps_node, tvb, foffset+4, 6, FALSE);
1949 proto_tree_add_item(ndps_tree, hf_ndps_socket, tvb, foffset+10, 2, FALSE);
1950 foffset += address_len;
1953 proto_tree_add_item(ndps_tree, hf_ndps_port, tvb, foffset, 2, FALSE);
1954 address = tvb_get_letohl(tvb, foffset+2);
1955 proto_tree_add_ipv4(ndps_tree, hf_ndps_ip, tvb, foffset+2, 4, address);
1956 foffset += address_len;
1959 foffset += tvb_get_ntohl(tvb, foffset -4);
1962 return foffset+(address_len%4);
1966 address_item(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
1968 guint32 address_type=0;
1970 address_type = tvb_get_ntohl(tvb, foffset);
1971 proto_tree_add_uint(ndps_tree, hf_address_type, tvb, foffset, 4, address_type);
1973 switch(address_type)
1983 foffset = qualifiedname(tvb, ndps_tree, foffset);
1990 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
1993 proto_tree_add_item(ndps_tree, hf_ndps_attrib_boolean, tvb, foffset, 4, FALSE);
1997 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2001 foffset = print_address(tvb, ndps_tree, foffset);
2006 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
2013 credentials(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2015 guint32 cred_type=0;
2017 guint32 number_of_items;
2022 cred_type = tvb_get_ntohl(tvb, foffset);
2023 proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, FALSE);
2028 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL, 0);
2029 number_of_items=tvb_get_ntohl(tvb, foffset);
2030 proto_tree_add_uint(ndps_tree, hf_ndps_num_passwords, tvb, foffset, 4, number_of_items);
2032 for (i = 1 ; i <= number_of_items; i++ )
2034 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Password %d", i);
2035 atree = proto_item_add_subtree(aitem, ett_ndps);
2036 length = tvb_get_ntohl(tvb, foffset);
2040 proto_tree_add_item(atree, hf_ndps_password, tvb, foffset, length, FALSE);
2042 proto_item_set_end(aitem, tvb, foffset);
2047 length = tvb_get_ntohl(tvb, foffset);
2051 proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, FALSE);
2056 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL, 0);
2058 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, FALSE);
2062 length=tvb_get_ntohl(tvb, foffset);
2063 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL, 0);
2068 if (tvb_get_ntohs(tvb, foffset)==0) /* NDPS 1.0 */
2071 if (tvb_get_ntohs(tvb, foffset)==0) /* NDPS 1.1 */
2076 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, FALSE);
2078 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL, 0);
2081 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, NULL, 0);
2083 proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, FALSE);
2085 foffset = ndps_string(tvb, hf_ndps_user_name, ndps_tree, foffset, NULL, 0);
2086 foffset += 8; /* Don't know what these 8 bytes signify */
2087 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
2088 foffset += 4; /* XXX - what does this count? */
2089 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
2090 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
2100 event_object_set(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2102 guint32 number_of_items;
2103 guint32 number_of_items2;
2106 guint32 object_identifier;
2114 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event");
2115 atree = proto_item_add_subtree(aitem, ett_ndps);
2116 number_of_items = tvb_get_ntohl(tvb, foffset);
2117 proto_tree_add_uint(atree, hf_ndps_num_events, tvb, foffset, 4, number_of_items);
2119 for (i = 1 ; i <= number_of_items; i++ )
2121 bitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event %u", i);
2122 btree = proto_item_add_subtree(bitem, ett_ndps);
2123 proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
2125 foffset = objectidentifier(tvb, btree, foffset);
2126 foffset += align_4(tvb, foffset);
2127 foffset = objectidentification(tvb, btree, foffset);
2128 foffset += align_4(tvb, foffset);
2129 proto_tree_add_item(btree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
2131 object_identifier = tvb_get_ntohl(tvb, foffset);
2132 proto_tree_add_uint(btree, hf_ndps_event_object_identifier, tvb, foffset, 4, object_identifier);
2134 switch (object_identifier)
2137 foffset = objectidentifier(tvb, btree, foffset);
2138 foffset += align_4(tvb, foffset);
2142 number_of_items2 = tvb_get_ntohl(tvb, foffset);
2143 proto_tree_add_uint(btree, hf_ndps_item_count, tvb, foffset, 4, number_of_items2);
2145 for (j = 1 ; j <= number_of_items2; j++ )
2147 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Item %u", j);
2148 ctree = proto_item_add_subtree(citem, ett_ndps);
2149 foffset = objectidentifier(tvb, ctree, foffset);
2150 foffset += align_4(tvb, foffset);
2151 proto_item_set_end(citem, tvb, foffset);
2155 proto_item_set_end(bitem, tvb, foffset);
2157 proto_item_set_end(aitem, tvb, foffset);
2163 cardinal_seq(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2165 guint32 number_of_items;
2171 number_of_items = tvb_get_ntohl(tvb, foffset);
2172 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2174 for (i = 1 ; i <= number_of_items; i++ )
2176 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Cardinal %u", i);
2177 atree = proto_item_add_subtree(aitem, ett_ndps);
2178 length = tvb_get_ntohl(tvb, foffset);
2182 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
2185 foffset += (length%2);
2186 proto_item_set_end(aitem, tvb, foffset);
2193 server_entry(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2195 char server_name[1024];
2196 guint32 number_of_items;
2204 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Server Info");
2205 atree = proto_item_add_subtree(aitem, ett_ndps);
2206 foffset = ndps_string(tvb, hf_ndps_server_name, ndps_tree, foffset, server_name, sizeof server_name);
2207 proto_item_append_text(aitem, ": %s", server_name);
2208 proto_tree_add_item(atree, hf_ndps_server_type, tvb, foffset, 4, FALSE);
2210 foffset = print_address(tvb, atree, foffset);
2211 number_of_items = tvb_get_ntohl(tvb, foffset);
2212 proto_tree_add_uint(atree, hf_ndps_num_servers, tvb, foffset, 4, number_of_items);
2214 for (i = 1 ; i <= number_of_items; i++ )
2216 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Info %u", i);
2217 btree = proto_item_add_subtree(bitem, ett_ndps);
2218 data_type = tvb_get_ntohl(tvb, foffset);
2219 proto_tree_add_item(btree, hf_ndps_data_item_type, tvb, foffset, 4, FALSE);
2224 proto_tree_add_item(btree, hf_info_int, tvb, foffset, 1, FALSE);
2228 proto_tree_add_item(btree, hf_info_int16, tvb, foffset, 2, FALSE);
2232 proto_tree_add_item(btree, hf_info_int32, tvb, foffset, 4, FALSE);
2235 case 3: /* Boolean */
2236 proto_tree_add_item(btree, hf_info_boolean, tvb, foffset, 4, FALSE);
2239 case 4: /* String */
2241 foffset = ndps_string(tvb, hf_info_string, btree, foffset, NULL, 0);
2246 proto_item_set_end(bitem, tvb, foffset);
2248 proto_item_set_end(aitem, tvb, foffset);
2254 attribute_value(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
2258 guint32 number_of_items;
2259 guint32 number_of_items2;
2260 guint32 attribute_type;
2261 guint32 integer_or_oid;
2262 guint32 event_object_type;
2263 guint32 ignored_type;
2264 guint32 resource_type;
2265 guint32 identifier_type;
2266 guint32 criterion_type;
2267 guint32 card_enum_time;
2269 guint32 doc_content;
2271 guint32 medium_size;
2273 guint32 colorant_set;
2279 guint32 label_value;
2285 if (global_attribute_name==NULL)
2288 label = match_strval(label_value, object_ids_7);
2289 global_attribute_name = label;
2291 attribute_type = tvb_get_ntohl(tvb, foffset);
2294 proto_tree_add_item(ndps_tree, hf_obj_attribute_type, tvb, foffset, 4, FALSE);
2297 switch(attribute_type)
2300 proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), FALSE);
2303 case 2: /* Descriptive Name */
2304 case 3: /* Descriptor */
2305 case 6: /* Simple Name */
2306 case 40: /* Distinguished Name*/
2307 case 50: /* Font Reference */
2308 case 58: /* Locale */
2309 case 102: /* File Path */
2310 case 103: /* Uniform Resource Identifier */
2311 case 108: /* Extended Resource Identifier */
2312 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
2314 case 4: /* Message */
2315 case 5: /* Error Message */
2316 case 38: /* Name or OID */
2317 foffset = name_or_id(tvb, ndps_tree, foffset);
2319 case 39: /* Name or OID Seq */
2320 number_of_items = tvb_get_ntohl(tvb, foffset);
2321 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2323 for (i = 1 ; i <= number_of_items; i++ )
2325 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
2326 atree = proto_item_add_subtree(aitem, ett_ndps);
2327 foffset = name_or_id(tvb, atree, foffset);
2328 proto_item_set_end(aitem, tvb, foffset);
2331 case 7: /* Distinguished Name String*/
2332 case 79: /* File Reference */
2333 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
2334 foffset = name_or_id(tvb, ndps_tree, foffset);
2336 case 8: /* Distinguished Name String Seq */
2337 number_of_items = tvb_get_ntohl(tvb, foffset);
2338 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2340 for (i = 1 ; i <= number_of_items; i++ )
2342 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Name %u", i);
2343 atree = proto_item_add_subtree(aitem, ett_ndps);
2344 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
2345 foffset = name_or_id(tvb, atree, foffset);
2346 proto_item_set_end(aitem, tvb, foffset);
2349 case 9: /* Delta Time */
2351 case 11: /* Integer */
2352 case 13: /* Cardinal */
2353 case 15: /* Positive Integer */
2354 case 18: /* Maximum Integer */
2355 case 19: /* Minimum Integer */
2356 case 35: /* Percent */
2357 case 57: /* Job Priority */
2358 case 72: /* Sides */
2359 case 95: /* Enumeration */
2360 if (strcmp(global_attribute_name,"(Novell) Attribute PRINTER SECURITY LEVEL")==0)
2362 proto_tree_add_item(ndps_tree, hf_print_security, tvb, foffset, 4, FALSE);
2367 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2371 case 12: /* Integer Seq */
2372 case 14: /* Cardinal Seq */
2373 length = tvb_get_ntohl(tvb, foffset);
2377 proto_tree_add_item(ndps_tree, hf_info_int32, tvb, foffset, length, FALSE);
2381 case 16: /* Integer Range */
2382 case 17: /* Cardinal Range */
2383 proto_tree_add_item(ndps_tree, hf_ndps_lower_range, tvb, foffset, 4, FALSE);
2385 proto_tree_add_item(ndps_tree, hf_ndps_upper_range, tvb, foffset, 4, FALSE);
2388 case 20: /* Integer 64 */
2389 case 22: /* Cardinal 64 */
2390 case 24: /* Positive Integer 64 */
2391 case 31: /* Non-Negative Real */
2393 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2396 case 21: /* Integer 64 Seq */
2397 case 23: /* Cardinal 64 Seq */
2398 case 30: /* Real Seq */
2399 number_of_items = tvb_get_ntohl(tvb, foffset);
2400 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2402 for (i = 1 ; i <= number_of_items; i++ )
2404 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %u", i);
2405 atree = proto_item_add_subtree(aitem, ett_ndps);
2406 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2408 proto_item_set_end(aitem, tvb, foffset);
2411 case 25: /* Integer 64 Range */
2412 case 26: /* Cardinal 64 Range */
2413 case 32: /* Real Range */
2414 case 33: /* Non-Negative Real Range */
2415 proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
2417 proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
2420 case 27: /* Maximum Integer 64 */
2421 proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
2424 case 28: /* Minimum Integer 64 */
2425 proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
2428 case 34: /* Boolean */
2429 proto_tree_add_item(ndps_tree, hf_ndps_attrib_boolean, tvb, foffset, 4, FALSE);
2432 case 36: /* Object Identifier */
2433 foffset = objectidentifier(tvb, ndps_tree, foffset);
2435 case 37: /* Object Identifier Seq */
2436 number_of_items = tvb_get_ntohl(tvb, foffset);
2437 proto_tree_add_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
2439 for (i = 1 ; i <= number_of_items; i++ )
2441 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object %d", i);
2442 atree = proto_item_add_subtree(aitem, ett_ndps);
2443 foffset = objectidentifier(tvb, atree, foffset);
2444 proto_item_set_end(aitem, tvb, foffset);
2447 case 41: /* Relative Distinguished Name Seq */
2448 number_of_items = tvb_get_ntohl(tvb, foffset);
2449 proto_tree_add_uint(ndps_tree, hf_ndps_num_names, tvb, foffset, 4, number_of_items);
2451 for (i = 1 ; i <= number_of_items; i++ )
2453 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Name %u", i);
2454 atree = proto_item_add_subtree(aitem, ett_ndps);
2455 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
2456 proto_item_set_end(aitem, tvb, foffset);
2459 case 42: /* Realization */
2460 proto_tree_add_item(ndps_tree, hf_ndps_realization, tvb, foffset, 4, FALSE);
2463 case 43: /* Medium Dimensions */
2464 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
2466 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
2469 case 44: /* Dimension */
2470 dimension = tvb_get_ntohl(tvb, foffset);
2471 proto_tree_add_uint(ndps_tree, hf_ndps_dim_value, tvb, foffset, 4, dimension);
2473 if (dimension == 0) {
2474 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2479 foffset = name_or_id(tvb, ndps_tree, foffset);
2481 proto_tree_add_item(ndps_tree, hf_ndps_dim_flag, tvb, foffset, 4, FALSE);
2483 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2486 case 45: /* XY Dimensions */
2487 dimension = tvb_get_ntohl(tvb, foffset);
2488 proto_tree_add_uint(ndps_tree, hf_ndps_xydim_value, tvb, foffset, 4, dimension);
2490 if (dimension == 1) {
2491 foffset = name_or_id(tvb, ndps_tree, foffset);
2495 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
2497 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
2500 proto_tree_add_item(ndps_tree, hf_ndps_dim_flag, tvb, foffset, 8, FALSE);
2502 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2505 case 46: /* Locations */
2506 location = tvb_get_ntohl(tvb, foffset);
2507 proto_tree_add_uint(ndps_tree, hf_ndps_location_value, tvb, foffset, 4, location);
2509 if (location == 0) {
2510 number_of_items = tvb_get_ntohl(tvb, foffset);
2511 proto_tree_add_uint(ndps_tree, hf_ndps_num_locations, tvb, foffset, 4, number_of_items);
2513 for (i = 1 ; i <= number_of_items; i++ )
2515 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Location %u", i);
2516 atree = proto_item_add_subtree(aitem, ett_ndps);
2517 proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2519 proto_item_set_end(aitem, tvb, foffset);
2524 foffset = name_or_id(tvb, ndps_tree, foffset);
2526 proto_tree_add_item(ndps_tree, hf_ndps_dim_flag, tvb, foffset, 4, FALSE);
2528 proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, FALSE);
2532 proto_tree_add_item(ndps_tree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
2534 proto_tree_add_item(ndps_tree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
2536 proto_tree_add_item(ndps_tree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
2538 proto_tree_add_item(ndps_tree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
2541 case 48: /* Area Seq */
2542 number_of_items = tvb_get_ntohl(tvb, foffset);
2543 proto_tree_add_uint(ndps_tree, hf_ndps_num_areas, tvb, foffset, 4, number_of_items);
2545 for (i = 1 ; i <= number_of_items; i++ )
2547 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Area %u", i);
2548 atree = proto_item_add_subtree(aitem, ett_ndps);
2549 proto_tree_add_item(atree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
2551 proto_tree_add_item(atree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
2553 proto_tree_add_item(atree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
2555 proto_tree_add_item(atree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
2557 proto_item_set_end(aitem, tvb, foffset);
2561 proto_tree_add_item(ndps_tree, hf_ndps_edge_value, tvb, foffset, 4, FALSE);
2564 case 51: /* Cardinal or OID */
2565 cardinal = tvb_get_ntohl(tvb, foffset);
2566 proto_tree_add_uint(ndps_tree, hf_ndps_cardinal_or_oid, tvb, foffset, 4, cardinal);
2569 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2574 foffset = objectidentifier(tvb, ndps_tree, foffset);
2577 case 52: /* OID Cardinal Map */
2578 foffset = objectidentifier(tvb, ndps_tree, foffset);
2579 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2582 case 53: /* Cardinal or Name or OID */
2583 cardinal = tvb_get_ntohl(tvb, foffset);
2584 proto_tree_add_uint(ndps_tree, hf_ndps_cardinal_name_or_oid, tvb, foffset, 4, cardinal);
2587 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2592 foffset = name_or_id(tvb, ndps_tree, foffset);
2595 case 54: /* Positive Integer or OID */
2596 integer_or_oid = tvb_get_ntohl(tvb, foffset);
2597 proto_tree_add_uint(ndps_tree, hf_ndps_integer_or_oid, tvb, foffset, 4, integer_or_oid);
2599 if (integer_or_oid==0) {
2600 foffset = objectidentifier(tvb, ndps_tree, foffset);
2604 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2608 case 55: /* Event Handling Profile */
2609 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
2611 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
2613 foffset = qualifiedname(tvb, ndps_tree, foffset);
2614 length = tvb_get_ntohl(tvb, foffset);
2618 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
2621 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
2623 foffset = name_or_id(tvb, ndps_tree, foffset);
2625 number_of_items = tvb_get_ntohl(tvb, foffset);
2626 proto_tree_add_uint(ndps_tree, hf_ndps_num_address_items, tvb, foffset, 4, number_of_items);
2628 for (i = 1 ; i <= number_of_items; i++ )
2630 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Address Item %u", i);
2631 atree = proto_item_add_subtree(aitem, ett_ndps);
2632 foffset = address_item(tvb, atree, foffset);
2633 proto_item_set_end(aitem, tvb, foffset);
2635 number_of_items = tvb_get_ntohl(tvb, foffset);
2636 proto_tree_add_uint(ndps_tree, hf_ndps_num_events, tvb, foffset, 4, number_of_items);
2638 for (i = 1 ; i <= number_of_items; i++ )
2640 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event %u", i);
2641 atree = proto_item_add_subtree(aitem, ett_ndps);
2642 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
2644 foffset = objectidentifier(tvb, atree, foffset);
2645 foffset += align_4(tvb, foffset);
2646 foffset = objectidentification(tvb, atree, foffset);
2647 proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, FALSE);
2649 event_object_type = tvb_get_ntohl(tvb, foffset);
2650 proto_tree_add_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, event_object_type);
2652 switch (event_object_type)
2655 /* Number of Objects */
2656 number_of_items2 = tvb_get_ntohl(tvb, foffset);
2657 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items2);
2659 for (j = 1 ; j <= number_of_items2; j++ )
2661 foffset = objectidentifier(tvb, atree, foffset);
2667 foffset = objectidentifier(tvb, atree, foffset);
2671 number_of_items2 = tvb_get_ntohl(tvb, foffset);
2672 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items2);
2674 for (j = 1 ; j <= number_of_items2; j++ )
2676 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object %u", i);
2677 btree = proto_item_add_subtree(bitem, ett_ndps);
2678 foffset = objectidentifier(tvb, btree, foffset);
2679 proto_item_set_end(bitem, tvb, foffset);
2683 proto_item_set_end(aitem, tvb, foffset);
2686 case 56: /* Octet String */
2687 case 63: /* Job Password */
2688 case 66: /* Print Checkpoint */
2689 foffset = ndps_string(tvb, hf_info_string, ndps_tree, foffset, NULL, 0);
2691 case 59: /* Method Delivery Address */
2692 proto_tree_add_item(ndps_tree, hf_ndps_delivery_add_type, tvb, foffset, 4, FALSE);
2693 event_object_type = tvb_get_ntohl(tvb, foffset);
2695 switch(event_object_type)
2697 case 0: /*MHS ADDR*/
2698 case 1: /*DISTINGUISHED_NAME*/
2700 case 3: /*OCTET_STRING*/
2701 foffset = ndps_string(tvb, hf_info_string, ndps_tree, foffset, NULL, 0);
2703 case 4: /*DIST_NAME_STRING*/
2704 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
2705 foffset = name_or_id(tvb, ndps_tree, foffset);
2707 case 5: /*RPC_ADDRESS*/
2708 case 6: /*QUALIFIED_NAME*/
2709 foffset = objectidentifier(tvb, ndps_tree, foffset);
2710 foffset = qualifiedname(tvb, ndps_tree, foffset);
2716 case 60: /* Object Identification */
2717 foffset = objectidentification(tvb, ndps_tree, foffset);
2719 case 61: /* Results Profile */
2720 foffset = objectidentifier(tvb, ndps_tree, foffset);
2721 foffset = name_or_id(tvb, ndps_tree, foffset);
2722 foffset = address_item(tvb, ndps_tree, foffset);
2723 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2725 foffset = name_or_id(tvb, ndps_tree, foffset);
2727 case 62: /* Criteria */
2728 foffset = objectidentifier(tvb, ndps_tree, foffset);
2729 criterion_type = tvb_get_ntohl(tvb, foffset);
2730 proto_tree_add_uint(ndps_tree, hf_ndps_criterion_type, tvb, foffset, 4, criterion_type);
2732 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2735 case 64: /* Job Level */
2736 foffset = objectidentifier(tvb, ndps_tree, foffset);
2737 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2740 case 65: /* Job Categories */
2741 foffset = objectidentifier(tvb, ndps_tree, foffset);
2742 number_of_items = tvb_get_ntohl(tvb, foffset);
2743 proto_tree_add_uint(ndps_tree, hf_ndps_num_job_categories, tvb, foffset, 4, number_of_items);
2745 for (i = 1 ; i <= number_of_items; i++ )
2747 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job %u", i);
2748 atree = proto_item_add_subtree(aitem, ett_ndps);
2749 length = tvb_get_ntohl(tvb, foffset);
2753 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
2756 foffset += (length%2);
2757 proto_item_set_end(aitem, tvb, foffset);
2760 case 67: /* Ignored Attribute */
2761 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2763 foffset = objectidentifier(tvb, ndps_tree, foffset);
2764 number_of_items = tvb_get_ntohl(tvb, foffset);
2765 proto_tree_add_uint(ndps_tree, hf_ndps_num_ignored_attributes, tvb, foffset, 4, number_of_items);
2767 for (i = 1 ; i <= number_of_items; i++ )
2769 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Ignored Attribute %u", i);
2770 atree = proto_item_add_subtree(aitem, ett_ndps);
2771 ignored_type = tvb_get_ntohl(tvb, foffset);
2772 proto_tree_add_uint(atree, hf_ndps_ignored_type, tvb, foffset, 4, ignored_type);
2774 if (ignored_type == 38)
2776 foffset = name_or_id(tvb, atree, foffset);
2780 foffset = objectidentifier(tvb, atree, foffset);
2782 proto_item_set_end(aitem, tvb, foffset);
2785 case 68: /* Resource */
2786 resource_type = tvb_get_ntohl(tvb, foffset);
2787 proto_tree_add_uint(ndps_tree, hf_ndps_resource_type, tvb, foffset, 4, resource_type);
2789 if (resource_type == 0)
2791 foffset = name_or_id(tvb, ndps_tree, foffset);
2795 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
2798 case 69: /* Medium Substitution */
2799 foffset = name_or_id(tvb, ndps_tree, foffset);
2800 foffset = name_or_id(tvb, ndps_tree, foffset);
2802 case 70: /* Font Substitution */
2803 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
2804 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
2806 case 71: /* Resource Context Seq */
2807 number_of_items = tvb_get_ntohl(tvb, foffset);
2808 proto_tree_add_uint(ndps_tree, hf_ndps_num_resources, tvb, foffset, 4, number_of_items);
2810 for (i = 1 ; i <= number_of_items; i++ )
2812 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Resource %u", i);
2813 atree = proto_item_add_subtree(aitem, ett_ndps);
2814 resource_type = tvb_get_ntohl(tvb, foffset);
2815 proto_tree_add_uint(atree, hf_ndps_resource_type, tvb, foffset, 4, resource_type);
2817 if (resource_type == 0)
2819 foffset = name_or_id(tvb, atree, foffset);
2823 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL, 0);
2825 proto_item_set_end(aitem, tvb, foffset);
2828 case 73: /* Page Select Seq */
2829 number_of_items = tvb_get_ntohl(tvb, foffset);
2830 proto_tree_add_uint(ndps_tree, hf_ndps_num_page_selects, tvb, foffset, 4, number_of_items);
2832 for (i = 1 ; i <= number_of_items; i++ )
2834 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Page Select %u", i);
2835 atree = proto_item_add_subtree(aitem, ett_ndps);
2836 proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, FALSE);
2838 identifier_type = tvb_get_ntohl(tvb, foffset);
2839 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
2841 if (identifier_type == 0)
2843 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2846 if (identifier_type == 1)
2848 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL, 0);
2850 if (identifier_type == 2)
2852 foffset = name_or_id(tvb, atree, foffset);
2854 proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, FALSE);
2856 identifier_type = tvb_get_ntohl(tvb, foffset);
2857 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
2859 if (identifier_type == 0)
2861 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2864 if (identifier_type == 1)
2866 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL, 0);
2868 if (identifier_type == 2)
2870 foffset = name_or_id(tvb, atree, foffset);
2872 proto_item_set_end(aitem, tvb, foffset);
2875 case 74: /* Page Media Select */
2876 media_type = tvb_get_ntohl(tvb, foffset);
2877 proto_tree_add_uint(ndps_tree, hf_ndps_media_type, tvb, foffset, 4, media_type);
2879 if (media_type == 0)
2881 foffset = name_or_id(tvb, ndps_tree, foffset);
2885 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
2886 number_of_items = tvb_get_ntohl(tvb, foffset);
2887 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
2889 for (i = 1 ; i <= number_of_items; i++ )
2891 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %u", i);
2892 atree = proto_item_add_subtree(aitem, ett_ndps);
2893 proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, FALSE);
2895 identifier_type = tvb_get_ntohl(tvb, foffset);
2896 proto_tree_add_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, identifier_type);
2898 if (identifier_type == 0)
2900 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
2903 if (identifier_type == 1)
2905 foffset = ndps_string(tvb, hf_ndps_tree, atree, foffset, NULL, 0);
2907 if (identifier_type == 2)
2909 foffset = name_or_id(tvb, atree, foffset);
2911 proto_item_set_end(aitem, tvb, foffset);
2915 case 75: /* Document Content */
2916 doc_content = tvb_get_ntohl(tvb, foffset);
2917 proto_tree_add_uint(ndps_tree, hf_ndps_doc_content, tvb, foffset, 4, doc_content);
2919 if (doc_content == 0)
2921 length = tvb_get_ntohl(tvb, foffset);
2925 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
2928 foffset += (length%2);
2932 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
2933 foffset = name_or_id(tvb, ndps_tree, foffset);
2936 case 76: /* Page Size */
2937 page_size = tvb_get_ntohl(tvb, foffset);
2938 proto_tree_add_uint(ndps_tree, hf_ndps_page_size, tvb, foffset, 4, page_size);
2942 foffset = objectidentifier(tvb, ndps_tree, foffset);
2946 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
2948 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
2952 case 77: /* Presentation Direction */
2953 proto_tree_add_item(ndps_tree, hf_ndps_direction, tvb, foffset, 4, FALSE);
2956 case 78: /* Page Order */
2957 proto_tree_add_item(ndps_tree, hf_ndps_page_order, tvb, foffset, 4, FALSE);
2960 case 80: /* Medium Source Size */
2961 foffset = name_or_id(tvb, ndps_tree, foffset);
2962 medium_size = tvb_get_ntohl(tvb, foffset);
2963 proto_tree_add_uint(ndps_tree, hf_ndps_medium_size, tvb, foffset, 4, medium_size);
2965 if (medium_size == 0)
2967 page_size = tvb_get_ntohl(tvb, foffset);
2968 proto_tree_add_uint(ndps_tree, hf_ndps_page_size, tvb, foffset, 4, page_size);
2972 foffset = objectidentifier(tvb, ndps_tree, foffset);
2976 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
2978 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
2981 proto_tree_add_item(ndps_tree, hf_ndps_long_edge_feeds, tvb, foffset, 4, FALSE);
2983 proto_tree_add_item(ndps_tree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
2985 proto_tree_add_item(ndps_tree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
2987 proto_tree_add_item(ndps_tree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
2989 proto_tree_add_item(ndps_tree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
2994 proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
2996 proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
2998 proto_tree_add_item(ndps_tree, hf_ndps_inc_across_feed, tvb, foffset, 8, FALSE);
3000 proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, FALSE);
3002 proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, FALSE);
3004 proto_tree_add_item(ndps_tree, hf_ndps_size_inc_in_feed, tvb, foffset, 8, FALSE);
3006 proto_tree_add_item(ndps_tree, hf_ndps_long_edge_feeds, tvb, foffset, 4, FALSE);
3008 proto_tree_add_item(ndps_tree, hf_ndps_xmin_n64, tvb, foffset, 8, FALSE);
3010 proto_tree_add_item(ndps_tree, hf_ndps_xmax_n64, tvb, foffset, 8, FALSE);
3012 proto_tree_add_item(ndps_tree, hf_ndps_ymin_n64, tvb, foffset, 8, FALSE);
3014 proto_tree_add_item(ndps_tree, hf_ndps_ymax_n64, tvb, foffset, 8, FALSE);
3018 case 81: /* Input Tray Medium */
3019 foffset = name_or_id(tvb, ndps_tree, foffset);
3020 foffset = name_or_id(tvb, ndps_tree, foffset);
3022 case 82: /* Output Bins Characteristics */
3023 number_of_items = tvb_get_ntohl(tvb, foffset);
3024 proto_tree_add_uint(ndps_tree, hf_ndps_num_page_informations, tvb, foffset, 4, number_of_items);
3026 for (i = 1 ; i <= number_of_items; i++ )
3028 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Page Information %u", i);
3029 atree = proto_item_add_subtree(aitem, ett_ndps);
3030 proto_tree_add_item(atree, hf_ndps_page_order, tvb, foffset, 4, FALSE);
3032 proto_tree_add_item(atree, hf_ndps_page_orientation, tvb, foffset, 4, FALSE);
3034 proto_item_set_end(aitem, tvb, foffset);
3037 case 83: /* Page ID Type */
3038 proto_tree_add_item(ndps_tree, hf_ndps_identifier_type, tvb, foffset, 4, FALSE);
3041 case 84: /* Level Range */
3042 foffset = objectidentifier(tvb, ndps_tree, foffset);
3043 proto_tree_add_item(ndps_tree, hf_ndps_lower_range, tvb, foffset, 4, FALSE);
3045 proto_tree_add_item(ndps_tree, hf_ndps_upper_range, tvb, foffset, 4, FALSE);
3048 case 85: /* Category Set */
3049 foffset = objectidentifier(tvb, ndps_tree, foffset);
3050 number_of_items = tvb_get_ntohl(tvb, foffset);
3051 proto_tree_add_uint(ndps_tree, hf_ndps_num_categories, tvb, foffset, 4, number_of_items);
3053 for (i = 1 ; i <= number_of_items; i++ )
3055 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Category %u", i);
3056 atree = proto_item_add_subtree(aitem, ett_ndps);
3057 length = tvb_get_ntohl(tvb, foffset);
3061 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
3064 foffset += (length%2);
3066 number_of_items = tvb_get_ntohl(tvb, foffset);
3067 proto_tree_add_uint(ndps_tree, hf_ndps_num_values, tvb, foffset, 4, number_of_items);
3069 for (i = 1 ; i <= number_of_items; i++ )
3071 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Value %d", i);
3072 atree = proto_item_add_subtree(aitem, ett_ndps);
3073 length = tvb_get_ntohl(tvb, foffset);
3077 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
3080 foffset += (length%2);
3081 proto_item_set_end(aitem, tvb, foffset);
3084 case 86: /* Numbers Up Supported */
3085 numbers_up=tvb_get_ntohl(tvb, foffset);
3086 proto_tree_add_uint(ndps_tree, hf_ndps_numbers_up, tvb, foffset, 4, numbers_up);
3090 case 0: /*Cardinal*/
3091 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3094 case 1: /*Name or OID*/
3095 foffset = name_or_id(tvb, ndps_tree, foffset);
3097 case 2: /*Cardinal Range*/
3098 proto_tree_add_item(ndps_tree, hf_ndps_lower_range, tvb, foffset, 4, FALSE);
3100 proto_tree_add_item(ndps_tree, hf_ndps_upper_range, tvb, foffset, 4, FALSE);
3107 case 87: /* Finishing */
3108 case 88: /* Print Contained Object ID */
3109 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
3110 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3113 case 89: /* Print Config Object ID */
3114 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
3115 foffset = qualifiedname(tvb, ndps_tree, foffset);
3117 case 90: /* Typed Name */
3118 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
3119 proto_tree_add_item(ndps_tree, hf_level, tvb, foffset, 4, FALSE);
3121 proto_tree_add_item(ndps_tree, hf_interval, tvb, foffset, 4, FALSE);
3124 case 91: /* Network Address */
3125 proto_tree_add_item(ndps_tree, hf_ndps_address, tvb, foffset, 4, FALSE);
3127 length = tvb_get_ntohl(tvb, foffset);
3131 proto_tree_add_item(ndps_tree, hf_ndps_add_bytes, tvb, foffset, 4, FALSE);
3135 case 92: /* XY Dimensions Value */
3136 dimension = tvb_get_ntohl(tvb, foffset);
3137 proto_tree_add_uint(ndps_tree, hf_ndps_xydim_value, tvb, foffset, 4, dimension);
3142 foffset = name_or_id(tvb, ndps_tree, foffset);
3146 proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, FALSE);
3148 proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, FALSE);
3153 proto_tree_add_item(ndps_tree, hf_ndps_xdimension, tvb, foffset, 4, FALSE);
3155 proto_tree_add_item(ndps_tree, hf_ndps_ydimension, tvb, foffset, 4, FALSE);
3160 case 93: /* Name or OID Dimensions Map */
3161 foffset = name_or_id(tvb, ndps_tree, foffset);
3162 proto_tree_add_item(ndps_tree, hf_ndps_xdimension, tvb, foffset, 4, FALSE);
3164 proto_tree_add_item(ndps_tree, hf_ndps_ydimension, tvb, foffset, 4, FALSE);
3167 case 94: /* Printer State Reason */
3169 foffset = name_or_id(tvb, ndps_tree, foffset);
3170 proto_tree_add_item(ndps_tree, hf_ndps_state_severity, tvb, foffset, 4, FALSE);
3172 proto_tree_add_item(ndps_tree, hf_ndps_training, tvb, foffset, 4, FALSE);
3174 foffset = objectidentifier(tvb, ndps_tree, foffset);
3175 foffset += align_4(tvb, foffset);
3176 foffset = objectidentification(tvb, ndps_tree, foffset);
3177 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3179 foffset = name_or_id(tvb, ndps_tree, foffset);
3181 case 96: /* Qualified Name */
3182 foffset = qualifiedname(tvb, ndps_tree, foffset);
3184 case 97: /* Qualified Name Set */
3185 number_of_items = tvb_get_ntohl(tvb, foffset);
3186 proto_tree_add_uint(ndps_tree, hf_ndps_num_names, tvb, foffset, 4, number_of_items);
3188 for (i = 1 ; i <= number_of_items; i++ )
3190 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Name %u", i);
3191 atree = proto_item_add_subtree(aitem, ett_ndps);
3192 foffset = qualifiedname(tvb, atree, foffset);
3193 proto_item_set_end(aitem, tvb, foffset);
3196 case 98: /* Colorant Set */
3197 colorant_set = tvb_get_ntohl(tvb, foffset);
3198 proto_tree_add_item(ndps_tree, hf_ndps_colorant_set, tvb, foffset, 4, FALSE);
3200 if (colorant_set==0)
3202 foffset = name_or_id(tvb, ndps_tree, foffset);
3207 foffset = objectidentifier(tvb, ndps_tree, foffset);
3208 number_of_items = tvb_get_ntohl(tvb, foffset);
3209 proto_tree_add_uint(ndps_tree, hf_ndps_num_colorants, tvb, foffset, 4, number_of_items);
3211 for (i = 1 ; i <= number_of_items; i++ )
3213 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Colorant %u", i);
3214 atree = proto_item_add_subtree(aitem, ett_ndps);
3215 foffset = name_or_id(tvb, atree, foffset);
3216 proto_item_set_end(aitem, tvb, foffset);
3220 case 99: /* Resource Printer ID */
3221 number_of_items = tvb_get_ntohl(tvb, foffset);
3222 proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items);
3224 for (i = 1 ; i <= number_of_items; i++ )
3226 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Printer %u", i);
3227 atree = proto_item_add_subtree(aitem, ett_ndps);
3228 foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL, 0);
3229 foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL, 0);
3230 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL, 0);
3231 proto_item_set_end(aitem, tvb, foffset);
3233 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
3236 case 100: /* Event Object ID */
3237 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
3238 foffset = objectidentifier(tvb, ndps_tree, foffset);
3239 proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
3242 case 101: /* Qualified Name Map */
3243 foffset = qualifiedname(tvb, ndps_tree, foffset);
3244 foffset = qualifiedname(tvb, ndps_tree, foffset);
3246 case 104: /* Cardinal or Enum or Time */
3247 card_enum_time = tvb_get_ntohl(tvb, foffset);
3248 proto_tree_add_item(ndps_tree, hf_ndps_card_enum_time, tvb, foffset, 4, FALSE);
3250 switch (card_enum_time)
3253 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3258 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3263 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3268 case 105: /* Print Contained Object ID Set */
3269 number_of_items = tvb_get_ntohl(tvb, foffset);
3270 proto_tree_add_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
3272 for (i = 1 ; i <= number_of_items; i++ )
3274 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object %u", i);
3275 atree = proto_item_add_subtree(aitem, ett_ndps);
3276 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
3277 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3279 proto_item_set_end(aitem, tvb, foffset);
3282 case 106: /* Octet String Pair */
3283 length = tvb_get_ntohl(tvb, foffset);
3287 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
3290 foffset += (length%2);
3291 length = tvb_get_ntohl(tvb, foffset);
3295 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
3298 foffset += (length%2);
3300 case 107: /* Octet String Integer Pair */
3301 length = tvb_get_ntohl(tvb, foffset);
3305 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
3308 foffset += (length%2);
3309 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3311 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3314 case 109: /* Event Handling Profile 2 */
3315 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3317 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
3319 foffset = qualifiedname(tvb, ndps_tree, foffset);
3320 length = tvb_get_ntohl(tvb, foffset);
3324 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
3327 foffset += (length%2);
3328 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3330 foffset = name_or_id(tvb, ndps_tree, foffset);
3331 proto_tree_add_item(ndps_tree, hf_ndps_delivery_add_type, tvb, foffset, 4, FALSE);
3332 event_object_type = tvb_get_ntohl(tvb, foffset);
3334 switch(event_object_type)
3336 case 0: /*MHS ADDR*/
3337 case 1: /*DISTINGUISHED_NAME*/
3339 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
3341 case 3: /*OCTET_STRING*/
3342 length = tvb_get_ntohl(tvb, foffset);
3346 proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, FALSE);
3349 foffset += (length%2);
3351 case 4: /*DIST_NAME_STRING*/
3352 foffset = ndps_string(tvb, hf_object_name, ndps_tree, foffset, NULL, 0);
3353 foffset = name_or_id(tvb, ndps_tree, foffset);
3355 case 5: /*RPC_ADDRESS*/
3356 case 6: /*QUALIFIED_NAME*/
3357 foffset = objectidentifier(tvb, ndps_tree, foffset);
3358 foffset = qualifiedname(tvb, ndps_tree, foffset);
3363 number_of_items = tvb_get_ntohl(tvb, foffset);
3364 proto_tree_add_uint(ndps_tree, hf_ndps_num_events, tvb, foffset, 4, number_of_items);
3366 for (i = 1 ; i <= number_of_items; i++ )
3368 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event %u", i);
3369 atree = proto_item_add_subtree(aitem, ett_ndps);
3370 foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL, 0);
3371 foffset = objectidentifier(tvb, atree, foffset);
3372 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
3374 proto_item_set_end(aitem, tvb, foffset);
3376 foffset = objectidentifier(tvb, ndps_tree, foffset);
3377 foffset = qualifiedname(tvb, ndps_tree, foffset);
3378 number_of_items = tvb_get_ntohl(tvb, foffset);
3379 proto_tree_add_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
3381 for (i = 1 ; i <= number_of_items; i++ )
3383 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object %u", i);
3384 atree = proto_item_add_subtree(aitem, ett_ndps);
3385 foffset = objectidentifier(tvb, atree, foffset);
3386 proto_item_set_end(aitem, tvb, foffset);
3388 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
3390 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);
3394 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
3404 commonarguments(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
3406 guint32 number_of_items;
3413 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Common Arguments");
3414 atree = proto_item_add_subtree(aitem, ett_ndps);
3415 number_of_items = tvb_get_ntohl(tvb, foffset);
3416 proto_tree_add_uint(atree, hf_ndps_num_args, tvb, foffset, 4, number_of_items);
3418 for (i = 1 ; i <= number_of_items; i++ )
3420 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Argument %u", i);
3421 btree = proto_item_add_subtree(bitem, ett_ndps);
3422 foffset = attribute_value(tvb, atree, foffset);
3423 proto_item_set_end(bitem, tvb, foffset);
3425 proto_item_set_end(aitem, tvb, foffset);
3430 res_add_input_data(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
3432 guint32 resource_type=0;
3434 resource_type = tvb_get_ntohl(tvb, foffset);
3435 proto_tree_add_uint(ndps_tree, hf_res_type, tvb, foffset, 4, resource_type);
3437 switch (resource_type)
3439 case 0: /* Print Drivers */
3440 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
3442 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL, 0);
3443 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
3445 case 1: /* Printer Definitions */
3446 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL, 0);
3447 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
3449 case 2: /* Banner Page Files */
3450 foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset, NULL, 0);
3452 case 3: /* Font Types */
3453 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
3455 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
3457 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
3459 case 4: /* Generic Files/ Archive */
3460 case 5: /* Printer Driver Archive */
3461 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
3463 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL, 0);
3464 proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
3474 static const fragment_items ndps_frag_items = {
3479 &hf_ndps_segment_overlap,
3480 &hf_ndps_segment_overlap_conflict,
3481 &hf_ndps_segment_multiple_tails,
3482 &hf_ndps_segment_too_long_segment,
3483 &hf_ndps_segment_error,
3488 static dissector_handle_t ndps_data_handle;
3490 /* NDPS packets come in request/reply pairs. The request packets tell the
3491 * Function and Program numbers. The response, unfortunately, only
3492 * identifies itself via the Exchange ID; you have to know what type of NDPS
3493 * request the request packet contained in order to successfully parse the
3494 * response. A global method for doing this does not exist in ethereal yet
3495 * (NFS also requires it), so for now the NDPS section will keep its own hash
3496 * table keeping track of NDPS packets.
3498 * We construct a conversation specified by the client and server
3499 * addresses and the connection number; the key representing the unique
3500 * NDPS request then is composed of the pointer to the conversation
3501 * structure, cast to a "guint" (which may throw away the upper 32
3502 * bits of the pointer on a P64 platform, but the low-order 32 bits
3503 * are more likely to differ between conversations than the upper 32 bits),
3504 * and the sequence number.
3506 * The value stored in the hash table is the ncp_req_hash_value pointer. This
3507 * struct tells us the NDPS Program and Function and gives the NDPS_record pointer.
3510 conversation_t *conversation;
3512 } ndps_req_hash_key;
3517 guint32 ndps_frame_num;
3519 guint32 ndps_end_frag;
3520 } ndps_req_hash_value;
3522 static GHashTable *ndps_req_hash = NULL;
3523 static GMemChunk *ndps_req_hash_keys = NULL;
3524 static GMemChunk *ndps_req_hash_values = NULL;
3526 /* Hash Functions */
3528 ndps_equal(gconstpointer v, gconstpointer v2)
3530 const ndps_req_hash_key *val1 = (const ndps_req_hash_key*)v;
3531 const ndps_req_hash_key *val2 = (const ndps_req_hash_key*)v2;
3533 if (val1->conversation == val2->conversation &&
3534 val1->ndps_xport == val2->ndps_xport ) {
3541 ndps_hash(gconstpointer v)
3543 const ndps_req_hash_key *ndps_key = (const ndps_req_hash_key*)v;
3544 return GPOINTER_TO_UINT(ndps_key->conversation) + ndps_key->ndps_xport;
3547 /* Initializes the hash table and the mem_chunk area each time a new
3548 * file is loaded or re-loaded in ethereal */
3550 ndps_init_protocol(void)
3553 fragment_table_init(&ndps_fragment_table);
3554 reassembled_table_init(&ndps_reassembled_table);
3557 g_hash_table_destroy(ndps_req_hash);
3558 if (ndps_req_hash_keys)
3559 g_mem_chunk_destroy(ndps_req_hash_keys);
3560 if (ndps_req_hash_values)
3561 g_mem_chunk_destroy(ndps_req_hash_values);
3563 ndps_req_hash = g_hash_table_new(ndps_hash, ndps_equal);
3564 ndps_req_hash_keys = g_mem_chunk_new("ndps_req_hash_keys",
3565 sizeof(ndps_req_hash_key),
3566 NDPS_PACKET_INIT_COUNT * sizeof(ndps_req_hash_key),
3568 ndps_req_hash_values = g_mem_chunk_new("ndps_req_hash_values",
3569 sizeof(ndps_req_hash_value),
3570 NDPS_PACKET_INIT_COUNT * sizeof(ndps_req_hash_value),
3574 /* After the sequential run, we don't need the ncp_request hash and keys
3575 * anymore; the lookups have already been done and the vital info
3576 * saved in the reply-packets' private_data in the frame_data struct. */
3578 ndps_postseq_cleanup(void)
3580 if (ndps_req_hash) {
3581 /* Destroy the hash, but don't clean up request_condition data. */
3582 g_hash_table_destroy(ndps_req_hash);
3583 ndps_req_hash = NULL;
3585 if (ndps_req_hash_keys) {
3586 g_mem_chunk_destroy(ndps_req_hash_keys);
3587 ndps_req_hash_keys = NULL;
3589 /* Don't free the ncp_req_hash_values, as they're
3590 * needed during random-access processing of the proto_tree.*/
3593 ndps_req_hash_value*
3594 ndps_hash_insert(conversation_t *conversation, guint32 ndps_xport)
3596 ndps_req_hash_key *request_key;
3597 ndps_req_hash_value *request_value;
3599 /* Now remember the request, so we can find it if we later
3601 request_key = g_mem_chunk_alloc(ndps_req_hash_keys);
3602 request_key->conversation = conversation;
3603 request_key->ndps_xport = ndps_xport;
3605 request_value = g_mem_chunk_alloc(ndps_req_hash_values);
3606 request_value->ndps_prog = 0;
3607 request_value->ndps_func = 0;
3608 request_value->ndps_frame_num = 0;
3609 request_value->ndps_frag = FALSE;
3610 request_value->ndps_end_frag = 0;
3612 g_hash_table_insert(ndps_req_hash, request_key, request_value);
3614 return request_value;
3617 /* Returns the ncp_rec*, or NULL if not found. */
3618 ndps_req_hash_value*
3619 ndps_hash_lookup(conversation_t *conversation, guint32 ndps_xport)
3621 ndps_req_hash_key request_key;
3623 request_key.conversation = conversation;
3624 request_key.ndps_xport = ndps_xport;
3626 return g_hash_table_lookup(ndps_req_hash, &request_key);
3629 /* ================================================================= */
3631 /* ================================================================= */
3634 dissect_ndps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree)
3638 guint32 ndps_packet_type;
3639 guint32 ndps_rpc_version;
3641 guint32 ndps_hfname;
3643 const char *ndps_program_string;
3644 const char *ndps_func_string;
3647 ndps_packet_type = tvb_get_ntohl(tvb, 8);
3648 if (ndps_packet_type != 0 && ndps_packet_type != 1) { /* Packet Type */
3649 if (check_col(pinfo->cinfo, COL_INFO))
3650 col_set_str(pinfo->cinfo, COL_INFO, "(Continuation Data)");
3651 proto_tree_add_text(ndps_tree, tvb, 0, tvb_length_remaining(tvb, 0), "Data - (%d Bytes)", tvb_length_remaining(tvb, 0));
3655 proto_tree_add_item(ndps_tree, hf_ndps_record_mark, tvb,
3658 proto_tree_add_item(ndps_tree, hf_ndps_length, tvb,
3662 ndps_xid = tvb_get_ntohl(tvb, foffset);
3663 proto_tree_add_uint(ndps_tree, hf_ndps_xid, tvb, foffset, 4, ndps_xid);
3665 ndps_packet_type = tvb_get_ntohl(tvb, foffset);
3666 proto_tree_add_uint(ndps_tree, hf_ndps_packet_type, tvb, foffset, 4, ndps_packet_type);
3668 if(ndps_packet_type == 0x00000001) /* Reply packet */
3670 if (check_col(pinfo->cinfo, COL_INFO))
3671 col_set_str(pinfo->cinfo, COL_INFO, "R NDPS ");
3672 proto_tree_add_item(ndps_tree, hf_ndps_rpc_accept, tvb, foffset, 4, FALSE);
3673 if (tvb_get_ntohl(tvb, foffset)==0) {
3675 proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 8, FALSE);
3681 proto_tree_add_item(ndps_tree, hf_ndps_rpc_rej_stat, tvb, foffset+4, 4, FALSE);
3684 dissect_ndps_reply(tvb, pinfo, ndps_tree, foffset);
3688 if (check_col(pinfo->cinfo, COL_INFO))
3689 col_set_str(pinfo->cinfo, COL_INFO, "C NDPS ");
3690 ndps_rpc_version = tvb_get_ntohl(tvb, foffset);
3691 proto_tree_add_item(ndps_tree, hf_ndps_rpc_version, tvb, foffset, 4, FALSE);
3693 ndps_prog = tvb_get_ntohl(tvb, foffset);
3694 ndps_program_string = match_strval(ndps_prog, spx_ndps_program_vals);
3695 if( ndps_program_string != NULL)
3697 proto_tree_add_item(ndps_tree, hf_spx_ndps_program, tvb, foffset, 4, FALSE);
3699 if (check_col(pinfo->cinfo, COL_INFO))
3701 col_append_str(pinfo->cinfo, COL_INFO, (const gchar*) ndps_program_string);
3702 col_append_str(pinfo->cinfo, COL_INFO, ", ");
3704 proto_tree_add_item(ndps_tree, hf_spx_ndps_version, tvb, foffset, 4, FALSE);
3706 ndps_func = tvb_get_ntohl(tvb, foffset);
3710 ndps_hfname = hf_spx_ndps_func_print;
3711 ndps_func_string = match_strval(ndps_func, spx_ndps_print_func_vals);
3714 ndps_hfname = hf_spx_ndps_func_broker;
3715 ndps_func_string = match_strval(ndps_func, spx_ndps_broker_func_vals);
3718 ndps_hfname = hf_spx_ndps_func_registry;
3719 ndps_func_string = match_strval(ndps_func, spx_ndps_registry_func_vals);
3722 ndps_hfname = hf_spx_ndps_func_notify;
3723 ndps_func_string = match_strval(ndps_func, spx_ndps_notify_func_vals);
3726 ndps_hfname = hf_spx_ndps_func_resman;
3727 ndps_func_string = match_strval(ndps_func, spx_ndps_resman_func_vals);
3730 ndps_hfname = hf_spx_ndps_func_delivery;
3731 ndps_func_string = match_strval(ndps_func, spx_ndps_deliver_func_vals);
3735 ndps_func_string = NULL;
3738 if(ndps_hfname != 0)
3740 proto_tree_add_item(ndps_tree, ndps_hfname, tvb, foffset, 4, FALSE);
3741 if (ndps_func_string != NULL)
3743 if (check_col(pinfo->cinfo, COL_INFO))
3744 col_append_str(pinfo->cinfo, COL_INFO, (const gchar*) ndps_func_string);
3747 proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 16, FALSE);
3749 dissect_ndps_request(tvb, pinfo, ndps_tree, ndps_prog, ndps_func, foffset);
3757 get_ndps_pdu_len(tvbuff_t *tvb, int offset)
3759 return tvb_get_ntohs(tvb, offset +2) + 4;
3763 dissect_ndps_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3765 proto_tree *ndps_tree = NULL;
3768 if (check_col(pinfo->cinfo, COL_PROTOCOL))
3769 col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS");
3771 if (check_col(pinfo->cinfo, COL_INFO))
3772 col_clear(pinfo->cinfo, COL_INFO);
3775 ti = proto_tree_add_item(tree, proto_ndps, tvb, 0, -1, FALSE);
3776 ndps_tree = proto_item_add_subtree(ti, ett_ndps);
3778 dissect_ndps(tvb, pinfo, ndps_tree);
3784 * SPX EOM not being set indicates we are inside or at the
3785 * beginning of a fragment. But when the end of the fragment
3786 * is encounterd the flag is set. So we must mark what the
3787 * frame number is of the end fragment so that we will be
3788 * able to redissect if the user clicks on the packet
3789 * or resorts/filters the trace.
3791 * Once we are certain that we are in a fragment sequence
3792 * then we can just process each fragment in this conversation
3793 * until we reach the eom message packet. We can tell we are at
3794 * the final fragment because it is flagged as SPX EOM.
3796 * We will be able to easily determine if a conversation is a fragment
3797 * with the exception of the last packet in the fragment. So remember
3798 * the last fragment packet number.
3801 ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3804 tvbuff_t *next_tvb = NULL;
3805 fragment_data *fd_head;
3807 ndps_req_hash_value *request_value = NULL;
3808 conversation_t *conversation;
3810 /* Get SPX info from SPX dissector */
3811 spx_info = pinfo->private_data;
3812 /* Check to see if defragmentation is enabled in the dissector */
3813 if (!ndps_defragment) {
3814 dissect_ndps(tvb, pinfo, tree);
3817 /* Has this already been dissected? */
3818 if (!pinfo->fd->flags.visited)
3820 /* Lets see if this is a new conversation */
3821 conversation = find_conversation(&pinfo->src, &pinfo->dst,
3822 PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
3824 if (conversation == NULL)
3826 /* It's not part of any conversation - create a new one. */
3827 conversation = conversation_new(&pinfo->src, &pinfo->dst,
3828 PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
3829 /* Create new request value hash */
3830 request_value = ndps_hash_insert(conversation, (guint32) pinfo->srcport);
3832 /* So now we need to get the request info for this conversation */
3833 request_value = ndps_hash_lookup(conversation, (guint32) pinfo->srcport);
3834 if (request_value == NULL)
3836 /* We haven't seen a packet with this conversation yet so create one. */
3837 request_value = ndps_hash_insert(conversation, (guint32) pinfo->srcport);
3839 /* Add it to pinfo so we can get it on further dissection requests */
3840 p_add_proto_data(pinfo->fd, proto_ndps, (void*) request_value);
3844 /* Get request value data */
3845 request_value = p_get_proto_data(pinfo->fd, proto_ndps);
3847 /* Check to see of this is a fragment. If so then mark as a fragment. */
3848 if (!spx_info->eom) {
3849 request_value->ndps_frag = TRUE;
3851 /* Now we process the fragments */
3852 if (request_value->ndps_frag || (request_value->ndps_end_frag == pinfo->fd->num))
3857 tid = (pinfo->srcport+pinfo->destport);
3858 len = tvb_reported_length_remaining(tvb, 0);
3859 if (tvb_bytes_exist(tvb, 0, len))
3861 fd_head = fragment_add_seq_next(tvb, 0, pinfo, tid, ndps_fragment_table, ndps_reassembled_table, len, !spx_info->eom);
3862 if (fd_head != NULL)
3864 /* Is this the last fragment? EOM will indicate */
3865 if (fd_head->next != NULL && spx_info->eom)
3867 next_tvb = tvb_new_real_data(fd_head->data,
3868 fd_head->len, fd_head->len);
3869 tvb_set_child_real_data_tvbuff(tvb,
3871 add_new_data_source(pinfo,
3873 "Reassembled NDPS");
3874 /* Show all fragments. */
3877 show_fragment_seq_tree(fd_head,
3883 /* Remember this fragment number so we can dissect again */
3884 request_value->ndps_end_frag = pinfo->fd->num;
3889 /* This is either a beggining or middle fragment on second dissection */
3890 next_tvb = tvb_new_subset(tvb, 0, -1, -1);
3891 if (check_col(pinfo->cinfo, COL_INFO))
3895 col_append_fstr(pinfo->cinfo, COL_INFO, "[NDPS Fragment]");
3902 /* Fragment from first pass of dissection */
3903 if (check_col(pinfo->cinfo, COL_INFO))
3907 col_append_fstr(pinfo->cinfo, COL_INFO, "[NDPS Fragment]");
3916 * There are no bytes so Dissect this
3918 next_tvb = tvb_new_subset(tvb, 0, -1, -1);
3920 if (next_tvb == NULL)
3922 /* This is a fragment packet */
3923 next_tvb = tvb_new_subset (tvb, 0, -1, -1);
3924 call_dissector(ndps_data_handle, next_tvb, pinfo, tree);
3928 /* This is the end fragment so dissect and mark end */
3929 if (spx_info->eom) {
3930 request_value->ndps_frag = FALSE;
3931 dissect_ndps(next_tvb, pinfo, tree);
3937 /* This is not any fragment packet */
3938 request_value->ndps_frag = FALSE;
3939 dissect_ndps(tvb, pinfo, tree);
3944 dissect_ndps_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3946 tcp_dissect_pdus(tvb, pinfo, tree, ndps_desegment, 4, get_ndps_pdu_len,
3952 dissect_ndps_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3954 proto_tree *ndps_tree = NULL;
3957 if (check_col(pinfo->cinfo, COL_PROTOCOL))
3958 col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS");
3960 if (check_col(pinfo->cinfo, COL_INFO))
3961 col_clear(pinfo->cinfo, COL_INFO);
3964 ti = proto_tree_add_item(tree, proto_ndps, tvb, 0, -1, FALSE);
3965 ndps_tree = proto_item_add_subtree(ti, ett_ndps);
3967 ndps_defrag(tvb, pinfo, ndps_tree);
3971 dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, guint32 ndps_prog, guint32 ndps_func, int foffset)
3973 ndps_req_hash_value *request_value = NULL;
3974 conversation_t *conversation;
3979 guint32 resource_type;
3980 guint32 filter_type;
3983 guint32 number_of_items;
3984 guint32 number_of_items2;
3985 guint32 doc_content;
3986 guint32 list_attr_op;
3989 gboolean supplier_flag;
3990 gboolean language_flag;
3991 gboolean method_flag;
3992 gboolean delivery_address_flag;
3993 guint32 profiles_type;
3994 guint32 profiles_choice_type;
3995 guint32 integer_type_flag;
3996 guint32 local_servers_type;
3997 gint length_remaining;
4007 if (!pinfo->fd->flags.visited)
4009 /* This is the first time we've looked at this packet.
4010 Keep track of the Program and connection whence the request
4011 came, and the address and connection to which the request
4012 is being sent, so that we can match up calls with replies.
4013 (We don't include the sequence number, as we may want
4014 to have all packets over the same connection treated
4015 as being part of a single conversation so that we can
4016 let the user select that conversation to be displayed.) */
4018 conversation = find_conversation(&pinfo->src, &pinfo->dst,
4019 PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
4021 if (conversation == NULL)
4023 /* It's not part of any conversation - create a new one. */
4024 conversation = conversation_new(&pinfo->src, &pinfo->dst,
4025 PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0);
4028 request_value = ndps_hash_insert(conversation, (guint32) pinfo->srcport);
4029 request_value->ndps_prog = ndps_prog;
4030 request_value->ndps_func = ndps_func;
4031 request_value->ndps_frame_num = pinfo->fd->num;
4035 case 0x060976: /* Print */
4038 case 0x00000001: /* Bind PSM */
4039 foffset = credentials(tvb, ndps_tree, foffset);
4041 case 0x00000002: /* Bind PA */
4042 foffset = credentials(tvb, ndps_tree, foffset);
4043 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
4045 number_of_items=tvb_get_ntohl(tvb, foffset);
4046 proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items);
4048 for (i = 1 ; i <= number_of_items; i++ )
4050 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Security %u", i);
4051 atree = proto_item_add_subtree(aitem, ett_ndps);
4052 length = tvb_get_ntohl(tvb, foffset);
4055 proto_tree_add_uint(atree, hf_bind_security, tvb, foffset, 4, length);
4058 proto_item_set_end(aitem, tvb, foffset);
4060 foffset = qualifiedname(tvb, ndps_tree, foffset);
4062 case 0x00000003: /* Unbind */
4063 proto_tree_add_item(ndps_tree, hf_ndps_object, tvb, foffset,
4066 case 0x00000004: /* Print */
4067 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4069 print_type = tvb_get_ntohl(tvb, foffset);
4070 proto_tree_add_uint(ndps_tree, hf_print_arg, tvb, foffset, 4, print_type);
4074 case 0: /* Create Job */
4075 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4076 proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, FALSE);
4078 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Transfer Method");
4079 atree = proto_item_add_subtree(aitem, ett_ndps);
4080 number_of_items = tvb_get_ntohl(tvb, foffset);
4081 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4083 for (i = 1 ; i <= number_of_items; i++ )
4085 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
4086 btree = proto_item_add_subtree(bitem, ett_ndps);
4087 foffset = objectidentifier(tvb, btree, foffset);
4088 number_of_items2 = tvb_get_ntohl(tvb, foffset);
4089 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
4091 for (j = 1 ; j <= number_of_items2; j++ )
4093 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Value %u", j);
4094 ctree = proto_item_add_subtree(citem, ett_ndps);
4095 foffset = attribute_value(tvb, ctree, foffset);
4096 proto_item_set_end(citem, tvb, foffset);
4098 proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
4100 proto_item_set_end(bitem, tvb, foffset);
4102 proto_item_set_end(aitem, tvb, foffset);
4103 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Document Content");
4104 atree = proto_item_add_subtree(aitem, ett_ndps);
4105 number_of_items = tvb_get_ntohl(tvb, foffset);
4106 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4108 for (i = 1 ; i <= number_of_items; i++ )
4110 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Type %u", i);
4111 btree = proto_item_add_subtree(bitem, ett_ndps);
4112 foffset = objectidentifier(tvb, btree, foffset);
4113 proto_item_set_end(bitem, tvb, foffset);
4115 foffset += align_4(tvb, foffset);
4116 number_of_items = tvb_get_ntohl(tvb, foffset);
4117 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4119 doc_content = tvb_get_ntohl(tvb, foffset);
4120 proto_tree_add_uint(atree, hf_doc_content, tvb, foffset, 4, doc_content);
4122 for (i = 1 ; i <= number_of_items; i++ )
4124 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Value %u", i);
4125 btree = proto_item_add_subtree(bitem, ett_ndps);
4128 length = tvb_get_ntohl(tvb, foffset);
4129 proto_tree_add_uint(btree, hf_ndps_included_doc_len, tvb, foffset, 4, length);
4131 length_remaining = tvb_length_remaining(tvb, foffset);
4132 if (length_remaining == -1 || length > (guint32) length_remaining) /* Segmented Data */
4134 proto_tree_add_item(btree, hf_ndps_data, tvb, foffset, -1, FALSE);
4139 proto_tree_add_item(btree, hf_ndps_included_doc, tvb, foffset, length, FALSE);
4142 foffset += (length%2);
4146 foffset = ndps_string(tvb, hf_ndps_ref_name, btree, foffset, NULL, 0);
4147 foffset = name_or_id(tvb, btree, foffset);
4149 proto_item_set_end(bitem, tvb, foffset);
4151 proto_item_set_end(aitem, tvb, foffset);
4153 if (align_4(tvb, foffset)>0) {
4154 foffset += align_4(tvb, foffset);
4156 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Document Type");
4157 atree = proto_item_add_subtree(aitem, ett_ndps);
4158 number_of_items = tvb_get_ntohl(tvb, foffset);
4159 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4161 for (i = 1 ; i <= number_of_items; i++ )
4163 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
4164 btree = proto_item_add_subtree(bitem, ett_ndps);
4165 foffset = objectidentifier(tvb, btree, foffset);
4166 number_of_items2 = tvb_get_ntohl(tvb, foffset);
4167 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
4169 for (j = 1 ; j <= number_of_items2; j++ )
4171 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Value %u", j);
4172 ctree = proto_item_add_subtree(citem, ett_ndps);
4173 foffset = attribute_value(tvb, ctree, foffset);
4174 proto_item_set_end(citem, tvb, foffset);
4176 proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
4178 proto_item_set_end(bitem, tvb, foffset);
4180 proto_item_set_end(aitem, tvb, foffset);
4181 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Document Attributes");
4182 atree = proto_item_add_subtree(aitem, ett_ndps);
4183 number_of_items = tvb_get_ntohl(tvb, foffset);
4184 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4186 for (i = 1 ; i <= number_of_items; i++ )
4188 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
4189 btree = proto_item_add_subtree(bitem, ett_ndps);
4190 foffset = attribute_value(tvb, btree, foffset); /* Document Attributes */
4191 proto_item_set_end(bitem, tvb, foffset);
4194 case 1: /* Add Job */
4195 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4196 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
4198 proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, FALSE);
4200 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Transfer Method");
4201 atree = proto_item_add_subtree(aitem, ett_ndps);
4202 number_of_items = tvb_get_ntohl(tvb, foffset);
4203 proto_tree_add_uint(atree, hf_ndps_num_transfer_methods, tvb, foffset, 4, number_of_items);
4205 for (i = 1 ; i <= number_of_items; i++ )
4207 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Method %u", i);
4208 btree = proto_item_add_subtree(bitem, ett_ndps);
4209 foffset = objectidentifier(tvb, btree, foffset); /* Transfer Method */
4210 proto_item_set_end(bitem, tvb, foffset);
4212 proto_tree_add_item(ndps_tree, hf_doc_content, tvb, foffset, 4, FALSE);
4214 proto_item_set_end(aitem, tvb, foffset);
4215 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Document Type");
4216 atree = proto_item_add_subtree(aitem, ett_ndps);
4217 number_of_items = tvb_get_ntohl(tvb, foffset);
4218 proto_tree_add_uint(atree, hf_ndps_num_doc_types, tvb, foffset, 4, number_of_items);
4220 for (i = 1 ; i <= number_of_items; i++ )
4222 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Type %u", i);
4223 btree = proto_item_add_subtree(bitem, ett_ndps);
4224 foffset = objectidentifier(tvb, btree, foffset); /* Document Type */
4225 proto_item_set_end(bitem, tvb, foffset);
4227 foffset += align_4(tvb, foffset);
4228 proto_item_set_end(aitem, tvb, foffset);
4229 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Document Attributes");
4230 atree = proto_item_add_subtree(aitem, ett_ndps);
4231 number_of_items = tvb_get_ntohl(tvb, foffset);
4232 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4234 for (i = 1 ; i <= number_of_items; i++ )
4236 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
4237 btree = proto_item_add_subtree(bitem, ett_ndps);
4238 foffset = attribute_value(tvb, btree, foffset); /* Document Attributes */
4239 proto_item_set_end(bitem, tvb, foffset);
4241 proto_item_set_end(aitem, tvb, foffset);
4243 case 2: /* Close Job */
4244 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4245 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
4252 case 0x00000005: /* Modify Job */
4253 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4255 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4256 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
4258 proto_tree_add_item(ndps_tree, hf_ndps_document_number, tvb, foffset, 4, FALSE);
4260 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job Modifications");
4261 atree = proto_item_add_subtree(aitem, ett_ndps);
4262 number_of_items = tvb_get_ntohl(tvb, foffset);
4263 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4265 for (i = 1 ; i <= number_of_items; i++ )
4267 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Modification %u", i);
4268 btree = proto_item_add_subtree(bitem, ett_ndps);
4269 foffset = attribute_value(tvb, btree, foffset); /* Job Modifications */
4270 proto_item_set_end(bitem, tvb, foffset);
4272 proto_item_set_end(aitem, tvb, foffset);
4273 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Document Modifications");
4274 atree = proto_item_add_subtree(aitem, ett_ndps);
4275 number_of_items = tvb_get_ntohl(tvb, foffset);
4276 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4278 for (i = 1 ; i <= number_of_items; i++ )
4280 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Modification %u", i);
4281 btree = proto_item_add_subtree(bitem, ett_ndps);
4282 foffset = attribute_value(tvb, btree, foffset); /* Document Modifications */
4283 proto_item_set_end(bitem, tvb, foffset);
4285 proto_item_set_end(aitem, tvb, foffset);
4287 case 0x00000006: /* Cancel Job */
4288 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4290 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4291 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
4293 proto_tree_add_item(ndps_tree, hf_ndps_document_number, tvb, foffset, 4, FALSE);
4295 /* XXX - what does this count? */
4296 number_of_items = tvb_get_ntohl(tvb, foffset);
4297 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
4299 /* Start of nameorid */
4300 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Cancel Message");
4301 atree = proto_item_add_subtree(aitem, ett_ndps);
4302 foffset = name_or_id(tvb, atree, foffset);
4303 proto_item_set_end(aitem, tvb, foffset);
4304 /* End of nameorid */
4305 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Retention Period");
4306 atree = proto_item_add_subtree(aitem, ett_ndps);
4307 proto_tree_add_item(atree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
4309 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, FALSE);
4311 proto_item_set_end(aitem, tvb, foffset);
4313 case 0x00000007: /* List Object Attributes */
4314 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4316 list_attr_op = tvb_get_ntohl(tvb, foffset);
4317 proto_tree_add_uint(ndps_tree, hf_ndps_attrs_arg, tvb, foffset, 4, list_attr_op);
4319 if (list_attr_op==0) /* Continuation */
4321 length = tvb_get_ntohl(tvb, foffset);
4322 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
4326 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
4329 foffset += (length%2);
4330 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
4332 number_of_items = tvb_get_ntohl(tvb, foffset);
4333 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4335 for (i = 1 ; i <= number_of_items; i++ )
4337 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Attribute %u", i);
4338 atree = proto_item_add_subtree(aitem, ett_ndps);
4339 foffset = attribute_value(tvb, atree, foffset);
4340 proto_item_set_end(aitem, tvb, foffset);
4343 else /* Specification */
4345 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Class");
4346 atree = proto_item_add_subtree(aitem, ett_ndps);
4347 foffset = objectidentifier(tvb, atree, foffset);
4348 proto_item_set_end(aitem, tvb, foffset);
4350 foffset += align_4(tvb, foffset);
4351 scope = tvb_get_ntohl(tvb, foffset);
4352 proto_tree_add_uint(ndps_tree, hf_ndps_scope, tvb, foffset, 4, scope);
4354 if (scope!=0) /* Scope Does not equal 0 */
4356 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Selector Option");
4357 atree = proto_item_add_subtree(aitem, ett_ndps);
4358 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPSelector */
4359 proto_tree_add_uint(atree, hf_ndps_num_options, tvb, foffset, 4, number_of_items);
4361 for (i = 1 ; i <= number_of_items; i++ )
4363 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Option %u", i);
4364 btree = proto_item_add_subtree(bitem, ett_ndps);
4365 foffset = objectidentification(tvb, btree, foffset);
4366 proto_item_set_end(bitem, tvb, foffset);
4368 proto_item_set_end(aitem, tvb, foffset);
4369 foffset += align_4(tvb, foffset);
4370 filter_type = tvb_get_ntohl(tvb, foffset);
4371 proto_tree_add_uint(ndps_tree, hf_ndps_filter, tvb, foffset, 4, filter_type);
4373 /*if (filter_type == 0 || filter_type == 3 )
4375 foffset = filteritem(tvb, ndps_tree, foffset);
4379 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Filter Items");
4380 atree = proto_item_add_subtree(aitem, ett_ndps);
4381 number_of_items = tvb_get_ntohl(tvb, foffset);
4382 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
4384 for (i = 1 ; i <= number_of_items; i++ )
4386 foffset = filteritem(tvb, ndps_tree, foffset);
4388 proto_item_set_end(aitem, tvb, foffset);
4390 proto_tree_add_item(ndps_tree, hf_ndps_time_limit, tvb, foffset, 4, FALSE);
4392 proto_tree_add_item(ndps_tree, hf_ndps_count_limit, tvb, foffset, 4, FALSE);
4393 foffset += 4; /* End of NWDPSelector */
4395 foffset += 4; /* Don't know what this is */
4396 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Requested Attributes");
4397 atree = proto_item_add_subtree(aitem, ett_ndps);
4398 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of NWDPObjectIdentifierSet */
4399 proto_tree_add_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
4401 for (i = 1 ; i <= number_of_items; i++ )
4403 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
4404 btree = proto_item_add_subtree(bitem, ett_ndps);
4405 foffset = objectidentifier(tvb, btree, foffset);
4406 proto_item_set_end(bitem, tvb, foffset);
4408 proto_item_set_end(aitem, tvb, foffset); /* End of NWDPObjectIdentifierSet */
4409 if (number_of_items == 0)
4413 proto_tree_add_item(ndps_tree, hf_ndps_operator, tvb, foffset, 4, FALSE);
4415 foffset = commonarguments(tvb, ndps_tree, foffset);
4418 case 0x00000008: /* Promote Job */
4419 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4421 /* Start of NWDPPrtContainedObjectId */
4422 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
4423 atree = proto_item_add_subtree(aitem, ett_ndps);
4424 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4425 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4427 proto_item_set_end(aitem, tvb, foffset);
4428 /* End of NWDPPrtContainedObjectId */
4429 /* Start of nameorid */
4430 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Message Option");
4431 atree = proto_item_add_subtree(aitem, ett_ndps);
4432 foffset = name_or_id(tvb, atree, foffset);
4433 proto_item_set_end(aitem, tvb, foffset);
4434 /* End of nameorid */
4435 foffset = commonarguments(tvb, ndps_tree, foffset);
4437 case 0x00000009: /* Interrupt */
4438 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4440 job_type = tvb_get_ntohl(tvb, foffset);
4441 proto_tree_add_uint(ndps_tree, hf_interrupt_job_type, tvb, foffset, 4, job_type);
4445 /* Start of NWDPPrtContainedObjectId */
4446 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
4447 atree = proto_item_add_subtree(aitem, ett_ndps);
4448 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4449 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4451 proto_item_set_end(aitem, tvb, foffset);
4452 /* End of NWDPPrtContainedObjectId */
4456 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4458 /* Start of nameorid */
4459 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Interrupt Message Option");
4460 atree = proto_item_add_subtree(aitem, ett_ndps);
4461 foffset = name_or_id(tvb, atree, foffset);
4462 proto_item_set_end(aitem, tvb, foffset);
4463 /* End of nameorid */
4464 /* Start of NWDPPrtContainedObjectId */
4465 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Interrupting Job");
4466 atree = proto_item_add_subtree(aitem, ett_ndps);
4467 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4468 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4470 proto_item_set_end(aitem, tvb, foffset);
4471 /* End of NWDPPrtContainedObjectId */
4472 foffset = commonarguments(tvb, ndps_tree, foffset);
4474 case 0x0000000a: /* Pause */
4475 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4477 job_type = tvb_get_ntohl(tvb, foffset);
4478 proto_tree_add_uint(ndps_tree, hf_pause_job_type, tvb, foffset, 4, job_type);
4482 /* Start of NWDPPrtContainedObjectId */
4483 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
4484 atree = proto_item_add_subtree(aitem, ett_ndps);
4485 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4486 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4488 proto_item_set_end(aitem, tvb, foffset);
4489 /* End of NWDPPrtContainedObjectId */
4493 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4495 /* Start of nameorid */
4496 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Pause Message Option");
4497 atree = proto_item_add_subtree(aitem, ett_ndps);
4498 foffset = name_or_id(tvb, atree, foffset);
4499 proto_item_set_end(aitem, tvb, foffset);
4500 /* End of nameorid */
4501 foffset = commonarguments(tvb, ndps_tree, foffset);
4503 case 0x0000000b: /* Resume */
4504 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4506 /* Start of NWDPPrtContainedObjectId */
4507 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
4508 atree = proto_item_add_subtree(aitem, ett_ndps);
4509 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4510 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4512 proto_item_set_end(aitem, tvb, foffset);
4513 /* End of NWDPPrtContainedObjectId */
4514 /* Start of nameorid */
4515 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Resume Message Option");
4516 atree = proto_item_add_subtree(aitem, ett_ndps);
4517 foffset = name_or_id(tvb, atree, foffset);
4518 proto_item_set_end(aitem, tvb, foffset);
4519 /* End of nameorid */
4520 foffset = commonarguments(tvb, ndps_tree, foffset);
4522 case 0x0000000c: /* Clean */
4523 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4525 /* Start of nameorid */
4526 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Clean Message Option");
4527 atree = proto_item_add_subtree(aitem, ett_ndps);
4528 foffset = name_or_id(tvb, atree, foffset);
4529 proto_item_set_end(aitem, tvb, foffset);
4530 /* End of nameorid */
4531 foffset = commonarguments(tvb, ndps_tree, foffset);
4533 case 0x0000000d: /* Create */
4534 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4536 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Class");
4537 atree = proto_item_add_subtree(aitem, ett_ndps);
4538 foffset = objectidentifier(tvb, atree, foffset);
4539 proto_item_set_end(aitem, tvb, foffset);
4540 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object ID");
4541 atree = proto_item_add_subtree(aitem, ett_ndps);
4542 foffset = objectidentification(tvb, atree, foffset);
4543 proto_item_set_end(aitem, tvb, foffset);
4544 proto_tree_add_item(ndps_tree, hf_ndps_force, tvb, foffset, 4, FALSE);
4546 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Reference Object Option");
4547 atree = proto_item_add_subtree(aitem, ett_ndps);
4548 foffset = objectidentification(tvb, atree, foffset);
4549 proto_item_set_end(aitem, tvb, foffset);
4550 /* Start of AttributeSet */
4551 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Attribute");
4552 atree = proto_item_add_subtree(aitem, ett_ndps);
4553 number_of_items = tvb_get_ntohl(tvb, foffset);
4554 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4556 for (i = 1 ; i <= number_of_items; i++ )
4558 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
4559 btree = proto_item_add_subtree(bitem, ett_ndps);
4560 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
4561 proto_item_set_end(bitem, tvb, foffset);
4563 proto_item_set_end(aitem, tvb, foffset);
4564 /* End of AttributeSet */
4565 foffset = commonarguments(tvb, ndps_tree, foffset);
4567 case 0x0000000e: /* Delete */
4568 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4570 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Class");
4571 atree = proto_item_add_subtree(aitem, ett_ndps);
4572 foffset = objectidentifier(tvb, atree, foffset);
4573 proto_item_set_end(aitem, tvb, foffset);
4574 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object ID");
4575 atree = proto_item_add_subtree(aitem, ett_ndps);
4576 foffset = objectidentification(tvb, atree, foffset);
4577 proto_item_set_end(aitem, tvb, foffset);
4578 foffset = commonarguments(tvb, ndps_tree, foffset);
4580 case 0x0000000f: /* Disable PA */
4581 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4583 /* Start of NameorID */
4584 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Disable PA Message Option");
4585 atree = proto_item_add_subtree(aitem, ett_ndps);
4586 foffset = name_or_id(tvb, atree, foffset);
4587 proto_item_set_end(aitem, tvb, foffset);
4588 /* End of NameorID */
4589 foffset = commonarguments(tvb, ndps_tree, foffset);
4591 case 0x00000010: /* Enable PA */
4592 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4594 /* Start of NameorID */
4595 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Enable PA Message Option");
4596 atree = proto_item_add_subtree(aitem, ett_ndps);
4597 foffset = name_or_id(tvb, atree, foffset);
4598 proto_item_set_end(aitem, tvb, foffset);
4599 /* End of NameorID */
4600 foffset = commonarguments(tvb, ndps_tree, foffset);
4602 case 0x00000011: /* Resubmit Jobs */
4603 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4605 foffset = qualifiedname(tvb, ndps_tree, foffset);
4606 foffset = address_item(tvb, ndps_tree, foffset);
4607 proto_tree_add_item(ndps_tree, hf_resubmit_op_type, tvb, foffset, 4, FALSE);
4609 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Resubmit Job");
4610 atree = proto_item_add_subtree(aitem, ett_ndps);
4611 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of ResubmitJob Set */
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 /* Start of NWDPPrtContainedObjectId */
4617 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Job ID");
4618 btree = proto_item_add_subtree(bitem, ett_ndps);
4619 foffset = ndps_string(tvb, hf_ndps_pa_name, btree, foffset, NULL, 0);
4620 proto_tree_add_item(btree, hf_local_id, tvb, foffset, 4, FALSE);
4622 proto_item_set_end(bitem, tvb, foffset);
4623 /* End of NWDPPrtContainedObjectId */
4624 proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset, 4, FALSE);
4626 /* Start of AttributeSet */
4627 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Job Attributes");
4628 btree = proto_item_add_subtree(bitem, ett_ndps);
4629 number_of_items2 = tvb_get_ntohl(tvb, foffset);
4630 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
4632 for (j = 1 ; j <= number_of_items2; j++ )
4634 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Attribute %u", j);
4635 ctree = proto_item_add_subtree(citem, ett_ndps);
4636 foffset = attribute_value(tvb, ctree, foffset); /* Object Attribute Set */
4637 proto_item_set_end(citem, tvb, foffset);
4639 proto_item_set_end(bitem, tvb, foffset);
4640 /* End of AttributeSet */
4641 /* Start of AttributeSet */
4642 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Document Attributes");
4643 btree = proto_item_add_subtree(bitem, ett_ndps);
4644 number_of_items2 = tvb_get_ntohl(tvb, foffset);
4645 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
4647 for (j = 1 ; j <= number_of_items2; j++ )
4649 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Attribute %u", j);
4650 ctree = proto_item_add_subtree(citem, ett_ndps);
4651 foffset = attribute_value(tvb, ctree, foffset); /* Object Attribute Set */
4652 proto_item_set_end(citem, tvb, foffset);
4654 proto_item_set_end(bitem, tvb, foffset);
4655 /* End of AttributeSet */
4657 proto_item_set_end(aitem, tvb, foffset); /* End of ResubmitJob Set */
4658 /* Start of NameorID */
4659 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Resubmit Message Option");
4660 atree = proto_item_add_subtree(aitem, ett_ndps);
4661 foffset = name_or_id(tvb, atree, foffset);
4662 proto_item_set_end(aitem, tvb, foffset);
4663 /* End of NameorID */
4664 foffset = commonarguments(tvb, ndps_tree, foffset);
4666 case 0x00000012: /* Set */
4667 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4669 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Class");
4670 atree = proto_item_add_subtree(aitem, ett_ndps);
4671 foffset = objectidentifier(tvb, atree, foffset);
4672 proto_item_set_end(aitem, tvb, foffset);
4673 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object ID");
4674 atree = proto_item_add_subtree(aitem, ett_ndps);
4675 foffset = objectidentification(tvb, atree, foffset);
4676 /* Start of AttributeSet */
4677 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Attribute Modifications");
4678 atree = proto_item_add_subtree(aitem, ett_ndps);
4679 number_of_items = tvb_get_ntohl(tvb, foffset);
4680 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
4682 for (i = 1 ; i <= number_of_items; i++ )
4684 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Modification %d", i);
4685 btree = proto_item_add_subtree(bitem, ett_ndps);
4686 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
4687 proto_item_set_end(bitem, tvb, foffset);
4689 proto_item_set_end(aitem, tvb, foffset);
4690 /* End of AttributeSet */
4691 foffset = commonarguments(tvb, ndps_tree, foffset);
4693 case 0x00000013: /* Shutdown PA */
4694 case 0x0000001e: /* Shutdown PSM */
4695 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4697 proto_tree_add_item(ndps_tree, hf_shutdown_type, tvb, foffset, 4, FALSE);
4699 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4700 /* Start of NameorID */
4701 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Shutdown Message Option");
4702 atree = proto_item_add_subtree(aitem, ett_ndps);
4703 foffset = name_or_id(tvb, atree, foffset);
4704 proto_item_set_end(aitem, tvb, foffset);
4705 /* End of NameorID */
4706 foffset = commonarguments(tvb, ndps_tree, foffset);
4707 case 0x00000014: /* Startup PA */
4708 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4710 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
4711 /* Start of NameorID */
4712 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Startup Message Option");
4713 atree = proto_item_add_subtree(aitem, ett_ndps);
4714 foffset = name_or_id(tvb, atree, foffset);
4715 proto_item_set_end(aitem, tvb, foffset);
4716 /* End of NameorID */
4717 foffset = commonarguments(tvb, ndps_tree, foffset);
4719 case 0x00000015: /* Reorder Job */
4720 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4722 /* Start of NWDPPrtContainedObjectId */
4723 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job Identification");
4724 atree = proto_item_add_subtree(aitem, ett_ndps);
4725 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4726 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4728 proto_item_set_end(aitem, tvb, foffset);
4729 /* End of NWDPPrtContainedObjectId */
4730 /* Start of NWDPPrtContainedObjectId */
4731 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Reference Job ID");
4732 atree = proto_item_add_subtree(aitem, ett_ndps);
4733 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
4734 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
4736 proto_item_set_end(aitem, tvb, foffset);
4737 /* End of NWDPPrtContainedObjectId */
4738 foffset = commonarguments(tvb, ndps_tree, foffset);
4740 case 0x00000016: /* Pause PA */
4741 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4743 /* Start of NameorID */
4744 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Pause Message Option");
4745 atree = proto_item_add_subtree(aitem, ett_ndps);
4746 foffset = name_or_id(tvb, atree, foffset);
4747 proto_item_set_end(aitem, tvb, foffset);
4748 /* End of NameorID */
4749 foffset = commonarguments(tvb, ndps_tree, foffset);
4751 case 0x00000017: /* Resume PA */
4752 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4754 /* Start of NameorID */
4755 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Resume Message Option");
4756 atree = proto_item_add_subtree(aitem, ett_ndps);
4757 foffset = name_or_id(tvb, atree, foffset);
4758 proto_item_set_end(aitem, tvb, foffset);
4759 /* End of NameorID */
4760 foffset = commonarguments(tvb, ndps_tree, foffset);
4762 case 0x00000018: /* Transfer Data */
4763 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4765 proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, FALSE);
4767 proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), FALSE);
4769 case 0x00000019: /* Device Control */
4770 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4772 /* Start of Object Identifier */
4773 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Operation ID");
4774 atree = proto_item_add_subtree(aitem, ett_ndps);
4775 foffset = objectidentifier(tvb, atree, foffset);
4776 proto_item_set_end(aitem, tvb, foffset);
4777 /* End of Object Identifier */
4778 foffset = commonarguments(tvb, ndps_tree, foffset);
4780 case 0x0000001a: /* Add Event Profile */
4781 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4783 /* Start of Eventhandling2 */
4784 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
4786 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
4788 foffset = qualifiedname(tvb, ndps_tree, foffset);
4789 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL, 0);
4790 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
4792 /* Start of NameorID */
4793 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
4794 atree = proto_item_add_subtree(aitem, ett_ndps);
4795 foffset = name_or_id(tvb, atree, foffset);
4796 foffset += align_4(tvb, foffset);
4797 proto_item_set_end(aitem, tvb, foffset);
4798 /* End of NameorID */
4799 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Address");
4800 atree = proto_item_add_subtree(aitem, ett_ndps);
4801 number_of_items = tvb_get_ntohl(tvb, foffset);
4802 proto_tree_add_uint(atree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
4804 for (i = 1 ; i <= number_of_items; i++ )
4806 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Address %u", i);
4807 btree = proto_item_add_subtree(bitem, ett_ndps);
4808 foffset = address_item(tvb, btree, foffset);
4809 proto_item_set_end(bitem, tvb, foffset);
4811 proto_item_set_end(aitem, tvb, foffset);
4812 foffset = event_object_set(tvb, ndps_tree, foffset);
4813 foffset = qualifiedname(tvb, ndps_tree, foffset);
4815 case 0x0000001b: /* Remove Event Profile */
4816 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4818 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
4821 case 0x0000001c: /* Modify Event Profile */
4822 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4824 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
4826 supplier_flag = tvb_get_ntohl(tvb, foffset);
4827 proto_tree_add_boolean(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, supplier_flag);
4831 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Supplier ID");
4832 atree = proto_item_add_subtree(aitem, ett_ndps);
4833 length = tvb_get_ntohl(tvb, foffset);
4837 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
4840 proto_item_set_end(aitem, tvb, foffset);
4842 language_flag = tvb_get_ntohl(tvb, foffset);
4843 proto_tree_add_boolean(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, language_flag);
4847 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
4850 method_flag = tvb_get_ntohl(tvb, foffset);
4851 proto_tree_add_boolean(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, method_flag);
4855 /* Start of NameorID */
4856 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
4857 atree = proto_item_add_subtree(aitem, ett_ndps);
4858 foffset = name_or_id(tvb, atree, foffset);
4859 proto_item_set_end(aitem, tvb, foffset);
4860 /* End of NameorID */
4862 delivery_address_flag = tvb_get_ntohl(tvb, foffset);
4863 proto_tree_add_boolean(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, delivery_address_flag);
4865 if (delivery_address_flag)
4867 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Address");
4868 atree = proto_item_add_subtree(aitem, ett_ndps);
4869 foffset = print_address(tvb, atree, foffset);
4870 proto_item_set_end(aitem, tvb, foffset);
4872 foffset = event_object_set(tvb, ndps_tree, foffset);
4874 case 0x0000001d: /* List Event Profiles */
4875 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4877 profiles_type = tvb_get_ntohl(tvb, foffset);
4878 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, profiles_type);
4880 if (profiles_type==0) /* Spec */
4882 foffset = qualifiedname(tvb, ndps_tree, foffset);
4883 profiles_choice_type = tvb_get_ntohl(tvb, foffset);
4884 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, profiles_choice_type);
4886 if (profiles_choice_type==0) /* Choice */
4888 foffset = cardinal_seq(tvb, ndps_tree, foffset);
4892 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer");
4893 atree = proto_item_add_subtree(aitem, ett_ndps);
4894 foffset = qualifiedname(tvb, atree, foffset);
4895 proto_item_set_end(aitem, tvb, foffset);
4896 /* Start of NameorID */
4897 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
4898 atree = proto_item_add_subtree(aitem, ett_ndps);
4899 foffset = name_or_id(tvb, atree, foffset);
4900 /* End of NameorID */
4901 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
4903 proto_item_set_end(aitem, tvb, foffset);
4905 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, FALSE);
4907 /* Start of integeroption */
4908 integer_type_flag = tvb_get_ntohl(tvb, foffset);
4909 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
4911 if (integer_type_flag!=0)
4913 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
4916 /* End of integeroption */
4920 length = tvb_get_ntohl(tvb, foffset);
4921 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
4925 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
4928 foffset += (length%2);
4929 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
4933 case 0x0000001f: /* Cancel PSM Shutdown */
4934 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4936 /* Start of NameorID */
4937 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Cancel Shutdown Message Option");
4938 atree = proto_item_add_subtree(aitem, ett_ndps);
4939 foffset = name_or_id(tvb, atree, foffset);
4940 proto_item_set_end(aitem, tvb, foffset);
4941 /* End of NameorID */
4942 foffset = commonarguments(tvb, ndps_tree, foffset);
4944 case 0x00000020: /* Set Printer DS Information */
4945 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4947 proto_tree_add_item(ndps_tree, hf_ndps_ds_info_type, tvb, foffset, 4, FALSE);
4949 foffset = ndps_string(tvb, hf_printer_name, ndps_tree, foffset, NULL, 0);
4950 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "DS Object Name");
4951 atree = proto_item_add_subtree(aitem, ett_ndps);
4952 foffset = qualifiedname(tvb, atree, foffset);
4953 proto_item_set_end(aitem, tvb, foffset);
4955 case 0x00000021: /* Clean User Jobs */
4956 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4958 /* Start of NameorID */
4959 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Clean 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);
4966 case 0x00000022: /* Map GUID to NDS Name */
4967 length = tvb_get_ntohl(tvb, foffset);
4971 proto_tree_add_item(ndps_tree, hf_ndps_guid, tvb, foffset, length, FALSE);
4975 case 0x00000023: /* AddEventProfile2 */
4976 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
4978 /* Start of Eventhandling2 */
4979 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
4981 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
4983 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer Name");
4984 atree = proto_item_add_subtree(aitem, ett_ndps);
4985 foffset = qualifiedname(tvb, atree, foffset);
4986 proto_item_set_end(aitem, tvb, foffset);
4987 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL, 0);
4988 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
4990 /* Start of NameorID */
4991 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
4992 atree = proto_item_add_subtree(aitem, ett_ndps);
4993 foffset = name_or_id(tvb, atree, foffset);
4994 foffset += align_4(tvb, foffset);
4995 proto_item_set_end(aitem, tvb, foffset);
4996 /* End of NameorID */
4997 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Address");
4998 atree = proto_item_add_subtree(aitem, ett_ndps);
4999 number_of_items = tvb_get_ntohl(tvb, foffset);
5000 proto_tree_add_uint(atree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
5002 for (i = 1 ; i <= number_of_items; i++ )
5004 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Address %u", i);
5005 btree = proto_item_add_subtree(bitem, ett_ndps);
5006 foffset = address_item(tvb, btree, foffset);
5007 proto_item_set_end(bitem, tvb, foffset);
5009 proto_item_set_end(aitem, tvb, foffset);
5010 foffset = event_object_set(tvb, ndps_tree, foffset);
5011 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Account");
5012 atree = proto_item_add_subtree(aitem, ett_ndps);
5013 foffset = qualifiedname(tvb, atree, foffset);
5014 proto_item_set_end(aitem, tvb, foffset);
5015 /* Start of object identifier set */
5016 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Notify Attributes");
5017 atree = proto_item_add_subtree(aitem, ett_ndps);
5018 number_of_items = tvb_get_ntohl(tvb, foffset);
5019 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
5021 for (i = 1 ; i <= number_of_items; i++ )
5023 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %u", i);
5024 btree = proto_item_add_subtree(bitem, ett_ndps);
5025 foffset = objectidentifier(tvb, btree, foffset);
5026 proto_item_set_end(bitem, tvb, foffset);
5028 proto_item_set_end(aitem, tvb, foffset);
5029 /* End of object identifier set */
5030 proto_tree_add_item(ndps_tree, hf_notify_time_interval, tvb, foffset, 4, FALSE);
5032 proto_tree_add_item(ndps_tree, hf_notify_sequence_number, tvb, foffset, 4, FALSE);
5034 proto_tree_add_item(ndps_tree, hf_notify_lease_exp_time, tvb, foffset, 4, FALSE);
5036 foffset = ndps_string(tvb, hf_notify_printer_uri, ndps_tree, foffset, NULL, 0);
5037 /* End of Eventhandling2 */
5039 case 0x00000024: /* ListEventProfiles2 */
5040 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5042 profiles_type = tvb_get_ntohl(tvb, foffset);
5043 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, profiles_type);
5045 if (profiles_type==0) /* Spec */
5047 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Supplier Alias");
5048 atree = proto_item_add_subtree(aitem, ett_ndps);
5049 foffset = qualifiedname(tvb, atree, foffset);
5050 proto_item_set_end(aitem, tvb, foffset);
5051 profiles_choice_type = tvb_get_ntohl(tvb, foffset);
5052 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, profiles_choice_type);
5054 if (profiles_choice_type==0) /* Choice */
5056 foffset = cardinal_seq(tvb, ndps_tree, foffset);
5060 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer");
5061 atree = proto_item_add_subtree(aitem, ett_ndps);
5062 foffset = qualifiedname(tvb, atree, foffset);
5063 proto_item_set_end(aitem, tvb, foffset);
5064 /* Start of NameorID */
5065 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5066 atree = proto_item_add_subtree(aitem, ett_ndps);
5067 foffset = name_or_id(tvb, atree, foffset);
5068 proto_item_set_end(aitem, tvb, foffset);
5069 /* End of NameorID */
5070 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5073 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, FALSE);
5075 /* Start of integeroption */
5076 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5077 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5079 if (integer_type_flag!=0)
5081 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
5084 /* End of integeroption */
5088 length = tvb_get_ntohl(tvb, foffset);
5089 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5093 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
5096 foffset += (length%2);
5097 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
5105 case 0x060977: /* Broker */
5108 case 0x00000001: /* Bind */
5109 foffset = credentials(tvb, ndps_tree, foffset);
5110 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
5112 number_of_items=tvb_get_ntohl(tvb, foffset);
5113 proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items);
5115 for (i = 1 ; i <= number_of_items; i++ )
5117 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Security %u", i);
5118 atree = proto_item_add_subtree(aitem, ett_ndps);
5119 length = tvb_get_ntohl(tvb, foffset);
5123 proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, FALSE);
5125 proto_item_set_end(aitem, tvb, foffset);
5128 case 0x00000002: /* Unbind */
5130 case 0x00000003: /* List Services */
5131 proto_tree_add_item(ndps_tree, hf_ndps_list_services_type, tvb, foffset, 4, FALSE);
5134 case 0x00000004: /* Enable Service */
5135 proto_tree_add_item(ndps_tree, hf_ndps_service_type, tvb, foffset, 4, FALSE);
5137 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Parameters");
5138 atree = proto_item_add_subtree(aitem, ett_ndps);
5139 number_of_items=tvb_get_ntohl(tvb, foffset);
5140 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5142 for (i = 1 ; i <= number_of_items; i++ )
5144 length = tvb_get_ntohl(tvb, foffset);
5148 proto_tree_add_item(atree, hf_ndps_item_bytes, tvb, foffset, length, FALSE);
5152 proto_item_set_end(aitem, tvb, foffset);
5154 case 0x00000005: /* Disable Service */
5155 proto_tree_add_item(ndps_tree, hf_ndps_list_services_type, tvb, foffset, 4, FALSE);
5158 case 0x00000006: /* Down Broker */
5159 case 0x00000007: /* Get Broker NDS Object Name */
5160 case 0x00000008: /* Get Broker Session Information */
5165 case 0x060978: /* Registry */
5168 case 0x00000001: /* Bind */
5169 foffset = credentials(tvb, ndps_tree, foffset);
5170 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
5172 number_of_items=tvb_get_ntohl(tvb, foffset);
5173 proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items);
5175 for (i = 1 ; i <= number_of_items; i++ )
5177 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Security %d", i);
5178 atree = proto_item_add_subtree(aitem, ett_ndps);
5179 length = tvb_get_ntohl(tvb, foffset);
5183 proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, FALSE);
5185 proto_item_set_end(aitem, tvb, foffset);
5188 case 0x00000002: /* Unbind */
5190 case 0x00000003: /* Register Server */
5191 foffset = server_entry(tvb, ndps_tree, foffset);
5193 case 0x00000004: /* Deregister Server */
5194 case 0x00000006: /* Deregister Registry */
5195 case 0x0000000b: /* Get Registry NDS Object Name */
5196 case 0x0000000c: /* Get Registry Session Information */
5199 case 0x00000005: /* Register Registry */
5200 foffset = ndps_string(tvb, hf_ndps_registry_name, ndps_tree, foffset, NULL, 0);
5201 foffset = print_address(tvb, ndps_tree, foffset);
5203 case 0x00000007: /* Registry Update */
5204 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Add");
5205 atree = proto_item_add_subtree(aitem, ett_ndps);
5206 number_of_items = tvb_get_ntohl(tvb, foffset);
5207 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5209 for (i = 1 ; i <= number_of_items; i++ )
5211 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Entry %u", i);
5212 btree = proto_item_add_subtree(bitem, ett_ndps);
5213 foffset = server_entry(tvb, btree, foffset);
5214 proto_item_set_end(bitem, tvb, foffset);
5216 proto_item_set_end(aitem, tvb, foffset);
5217 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Remove");
5218 atree = proto_item_add_subtree(aitem, ett_ndps);
5219 number_of_items = tvb_get_ntohl(tvb, foffset);
5220 proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5222 for (i = 1 ; i <= number_of_items; i++ )
5224 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Entry %u", i);
5225 btree = proto_item_add_subtree(bitem, ett_ndps);
5226 foffset = server_entry(tvb, btree, foffset);
5227 proto_item_set_end(bitem, tvb, foffset);
5229 proto_item_set_end(aitem, tvb, foffset);
5231 case 0x00000008: /* List Local Servers */
5232 case 0x00000009: /* List Servers */
5233 case 0x0000000a: /* List Known Registries */
5234 local_servers_type = tvb_get_ntohl(tvb, foffset);
5235 proto_tree_add_uint(ndps_tree, hf_ndps_list_local_servers_type, tvb, foffset, 4, local_servers_type);
5237 if (local_servers_type==0)
5239 /* Start of integeroption */
5240 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5241 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5243 if (integer_type_flag!=0)
5245 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
5248 /* End of integeroption */
5252 length = tvb_get_ntohl(tvb, foffset);
5253 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5257 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
5260 foffset += (length%2);
5261 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
5269 case 0x060979: /* Notify */
5272 case 0x00000001: /* Notify Bind */
5273 foffset = credentials(tvb, ndps_tree, foffset);
5274 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
5276 number_of_items=tvb_get_ntohl(tvb, foffset);
5278 for (i = 1 ; i <= number_of_items; i++ )
5280 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Security %d", i);
5281 atree = proto_item_add_subtree(aitem, ett_ndps);
5282 length = tvb_get_ntohl(tvb, foffset);
5286 proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, FALSE);
5288 proto_item_set_end(aitem, tvb, foffset);
5291 case 0x00000002: /* Notify Unbind */
5292 case 0x0000000a: /* List Supported Languages */
5293 case 0x00000010: /* Get Notify NDS Object Name */
5294 case 0x00000011: /* Get Notify Session Information */
5297 case 0x00000003: /* Register Supplier */
5298 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL, 0);
5299 /* Start of QualifiedName Set*/
5300 number_of_items = tvb_get_ntohl(tvb, foffset);
5301 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5303 for (i = 1 ; i <= number_of_items; i++ )
5305 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Supplier Alias %u", i);
5306 atree = proto_item_add_subtree(aitem, ett_ndps);
5307 foffset = qualifiedname(tvb, atree, foffset);
5308 proto_item_set_end(aitem, tvb, foffset);
5310 /* End of QualifiedName Set*/
5312 case 0x00000004: /* Deregister Supplier */
5313 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5316 case 0x00000005: /* Add Profile */
5317 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5319 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Supplier Alias");
5320 atree = proto_item_add_subtree(aitem, ett_ndps);
5321 foffset = qualifiedname(tvb, atree, foffset);
5322 proto_item_set_end(aitem, tvb, foffset);
5323 /* Start of Eventhandling */
5324 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5326 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
5328 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer Name");
5329 atree = proto_item_add_subtree(aitem, ett_ndps);
5330 foffset = qualifiedname(tvb, atree, foffset);
5331 proto_item_set_end(aitem, tvb, foffset);
5332 length = tvb_get_ntohl(tvb, foffset);
5336 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
5339 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5341 /* Start of NameorID */
5342 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5343 atree = proto_item_add_subtree(aitem, ett_ndps);
5344 foffset = name_or_id(tvb, atree, foffset);
5345 proto_item_set_end(aitem, tvb, foffset);
5346 /* End of NameorID */
5347 number_of_items = tvb_get_ntohl(tvb, foffset);
5348 proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
5350 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Addresses");
5351 atree = proto_item_add_subtree(aitem, ett_ndps);
5352 for (i = 1 ; i <= number_of_items; i++ )
5354 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Address %d", i);
5355 btree = proto_item_add_subtree(bitem, ett_ndps);
5356 foffset = address_item(tvb, btree, foffset);
5357 proto_item_set_end(bitem, tvb, foffset);
5359 proto_item_set_end(aitem, tvb, foffset);
5360 foffset = event_object_set(tvb, ndps_tree, foffset);
5361 /* End of Eventhandling */
5363 case 0x00000006: /* Remove Profile */
5364 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5366 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5369 case 0x00000007: /* Modify Profile */
5370 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5372 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
5374 supplier_flag = tvb_get_ntohl(tvb, foffset);
5375 proto_tree_add_boolean(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, supplier_flag);
5379 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Supplier ID");
5380 atree = proto_item_add_subtree(aitem, ett_ndps);
5381 length = tvb_get_ntohl(tvb, foffset);
5385 proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
5388 proto_item_set_end(aitem, tvb, foffset);
5390 language_flag = tvb_get_ntohl(tvb, foffset);
5391 proto_tree_add_boolean(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, language_flag);
5395 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5398 method_flag = tvb_get_ntohl(tvb, foffset);
5399 proto_tree_add_boolean(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, method_flag);
5403 /* Start of NameorID */
5404 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5405 atree = proto_item_add_subtree(aitem, ett_ndps);
5406 foffset = name_or_id(tvb, atree, foffset);
5407 proto_item_set_end(aitem, tvb, foffset);
5408 /* End of NameorID */
5410 delivery_address_flag = tvb_get_ntohl(tvb, foffset);
5411 proto_tree_add_boolean(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, delivery_address_flag);
5413 if (delivery_address_flag)
5415 foffset = print_address(tvb, ndps_tree, foffset);
5417 foffset = event_object_set(tvb, ndps_tree, foffset);
5419 case 0x00000008: /* List Profiles */
5420 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5422 profiles_type = tvb_get_ntohl(tvb, foffset);
5423 proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, profiles_type);
5425 if (profiles_type==0) /* Spec */
5427 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Supplier Alias");
5428 atree = proto_item_add_subtree(aitem, ett_ndps);
5429 foffset = qualifiedname(tvb, atree, foffset);
5430 profiles_choice_type = tvb_get_ntohl(tvb, foffset);
5431 proto_tree_add_uint(atree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, profiles_choice_type);
5433 proto_item_set_end(aitem, tvb, foffset);
5434 if (profiles_choice_type==0) /* Choice */
5436 foffset = cardinal_seq(tvb, ndps_tree, foffset);
5440 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer");
5441 atree = proto_item_add_subtree(aitem, ett_ndps);
5442 foffset = qualifiedname(tvb, atree, foffset);
5443 proto_item_set_end(aitem, tvb, foffset);
5444 /* Start of NameorID */
5445 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5446 atree = proto_item_add_subtree(aitem, ett_ndps);
5447 foffset = name_or_id(tvb, atree, foffset);
5448 /* End of NameorID */
5449 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5451 proto_item_set_end(aitem, tvb, foffset);
5453 proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, FALSE);
5455 /* Start of integeroption */
5456 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5457 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5459 if (integer_type_flag!=0)
5461 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
5464 /* End of integeroption */
5468 length = tvb_get_ntohl(tvb, foffset);
5469 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5473 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
5476 foffset += (length%2);
5477 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
5481 case 0x00000009: /* Report Event */
5482 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
5484 /* Start of ReportEventItemSet */
5485 number_of_items = tvb_get_ntohl(tvb, foffset);
5486 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5488 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event Items");
5489 atree = proto_item_add_subtree(aitem, ett_ndps);
5490 for (i = 1 ; i <= number_of_items; i++ )
5492 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Item %d", i);
5493 btree = proto_item_add_subtree(bitem, ett_ndps);
5494 /* Start of ReportEventItem */
5495 proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
5497 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Containing Class");
5498 ctree = proto_item_add_subtree(citem, ett_ndps);
5499 foffset = objectidentifier(tvb, ctree, foffset);
5500 proto_item_set_end(citem, tvb, foffset);
5501 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Containing Object");
5502 ctree = proto_item_add_subtree(citem, ett_ndps);
5503 foffset = objectidentification(tvb, ctree, foffset);
5504 proto_item_set_end(citem, tvb, foffset);
5505 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Filter Class");
5506 ctree = proto_item_add_subtree(citem, ett_ndps);
5507 foffset = objectidentifier(tvb, ctree, foffset);
5508 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Object Class");
5509 ctree = proto_item_add_subtree(citem, ett_ndps);
5510 foffset = objectidentifier(tvb, ctree, foffset);
5511 proto_item_set_end(citem, tvb, foffset);
5512 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Object ID");
5513 ctree = proto_item_add_subtree(citem, ett_ndps);
5514 foffset = objectidentification(tvb, ctree, foffset);
5515 proto_item_set_end(citem, tvb, foffset);
5516 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Event Object ID");
5517 ctree = proto_item_add_subtree(citem, ett_ndps);
5518 foffset = objectidentifier(tvb, ctree, foffset);
5519 proto_item_set_end(citem, tvb, foffset);
5520 /* Start of AttributeSet */
5521 number_of_items = tvb_get_ntohl(tvb, foffset);
5522 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
5524 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Attribute Modifications");
5525 ctree = proto_item_add_subtree(citem, ett_ndps);
5526 for (j = 1 ; j <= number_of_items; j++ )
5528 ditem = proto_tree_add_text(ctree, tvb, foffset, -1, "Modification %d", j);
5529 dtree = proto_item_add_subtree(ditem, ett_ndps);
5530 foffset = attribute_value(tvb, dtree, foffset); /* Object Attribute Set */
5531 proto_item_set_end(ditem, tvb, foffset);
5533 proto_item_set_end(citem, tvb, foffset);
5534 /* End of AttributeSet */
5535 foffset = ndps_string(tvb, hf_ndps_message, btree, foffset, NULL, 0);
5536 proto_tree_add_item(btree, hf_time, tvb, foffset, 4, FALSE);
5538 proto_item_set_end(bitem, tvb, foffset);
5539 /* End of ReportEventItem */
5541 proto_item_set_end(aitem, tvb, foffset);
5542 /* End of ReportEventItemSet */
5544 case 0x0000000b: /* Report Notification */
5545 /* Start of DestinationSet */
5546 number_of_items = tvb_get_ntohl(tvb, foffset);
5547 proto_tree_add_uint(ndps_tree, hf_ndps_num_destinations, tvb, foffset, 4, number_of_items);
5549 for (i = 1 ; i <= number_of_items; i++ )
5551 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Destination %d", i);
5552 atree = proto_item_add_subtree(aitem, ett_ndps);
5553 /* Start of Destination */
5554 /* Start of NameorID */
5555 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Method ID");
5556 btree = proto_item_add_subtree(bitem, ett_ndps);
5557 foffset = name_or_id(tvb, btree, foffset);
5558 proto_item_set_end(bitem, tvb, foffset);
5559 /* End of NameorID */
5560 /* Start of NotifyDeliveryAddr */
5561 proto_tree_add_item(atree, hf_address_len, tvb, foffset, 4, FALSE);
5563 foffset = print_address(tvb, atree, foffset);
5564 /* End of NotifyDeliveryAddr */
5565 proto_item_set_end(aitem, tvb, foffset);
5566 /* End of Destination */
5568 /* End of DestinationSet */
5569 foffset = ndps_string(tvb, hf_ndps_supplier_name, ndps_tree, foffset, NULL, 0);
5570 proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
5572 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Containing Class");
5573 atree = proto_item_add_subtree(aitem, ett_ndps);
5574 foffset = objectidentifier(tvb, atree, foffset);
5575 proto_item_set_end(aitem, tvb, foffset);
5576 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Containing Object");
5577 atree = proto_item_add_subtree(aitem, ett_ndps);
5578 foffset = objectidentification(tvb, atree, foffset);
5579 proto_item_set_end(aitem, tvb, foffset);
5580 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Filter Class");
5581 atree = proto_item_add_subtree(aitem, ett_ndps);
5582 foffset = objectidentifier(tvb, atree, foffset);
5583 proto_item_set_end(aitem, tvb, foffset);
5584 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Class");
5585 atree = proto_item_add_subtree(aitem, ett_ndps);
5586 foffset = objectidentifier(tvb, atree, foffset);
5587 proto_item_set_end(aitem, tvb, foffset);
5588 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object ID");
5589 atree = proto_item_add_subtree(aitem, ett_ndps);
5590 foffset = objectidentification(tvb, atree, foffset);
5591 proto_item_set_end(aitem, tvb, foffset);
5592 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event Object ID");
5593 atree = proto_item_add_subtree(aitem, ett_ndps);
5594 foffset = objectidentifier(tvb, atree, foffset);
5595 proto_item_set_end(aitem, tvb, foffset);
5596 /* Start of AttributeSet */
5597 number_of_items = tvb_get_ntohl(tvb, foffset);
5598 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
5600 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Attributes");
5601 atree = proto_item_add_subtree(aitem, ett_ndps);
5602 for (i = 1 ; i <= number_of_items; i++ )
5604 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %d", i);
5605 btree = proto_item_add_subtree(bitem, ett_ndps);
5606 foffset = attribute_value(tvb, btree, foffset);
5607 proto_item_set_end(bitem, tvb, foffset);
5609 proto_item_set_end(aitem, tvb, foffset);
5610 /* End of AttributeSet */
5611 foffset = ndps_string(tvb, hf_ndps_message, ndps_tree, foffset, NULL, 0);
5612 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
5614 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Account");
5615 atree = proto_item_add_subtree(aitem, ett_ndps);
5616 foffset = qualifiedname(tvb, atree, foffset);
5617 proto_item_set_end(aitem, tvb, foffset);
5619 case 0x0000000c: /* Add Delivery Method */
5620 foffset = ndps_string(tvb, hf_ndps_file_name, ndps_tree, foffset, NULL, 0);
5622 case 0x0000000d: /* Remove Delivery Method */
5623 /* Start of NameorID */
5624 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5625 atree = proto_item_add_subtree(aitem, ett_ndps);
5626 foffset = name_or_id(tvb, atree, foffset);
5627 proto_item_set_end(aitem, tvb, foffset);
5628 /* End of NameorID */
5630 case 0x0000000e: /* List Delivery Methods */
5631 cred_type = tvb_get_ntohl(tvb, foffset);
5632 proto_tree_add_item(ndps_tree, hf_delivery_method_type, tvb, foffset, 4, FALSE);
5636 case 0: /* Specification */
5637 /* Start of integeroption */
5638 integer_type_flag = tvb_get_ntohl(tvb, foffset);
5639 proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag);
5641 if (integer_type_flag!=0)
5643 proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, FALSE);
5646 /* End of integeroption */
5647 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5650 case 1: /* Continuation */
5651 length = tvb_get_ntohl(tvb, foffset);
5652 proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length);
5656 proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, FALSE);
5659 foffset += (length%2);
5660 proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, FALSE);
5667 case 0x0000000f: /* Get Delivery Method Information */
5668 /* Start of NameorID */
5669 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
5670 atree = proto_item_add_subtree(aitem, ett_ndps);
5671 foffset = name_or_id(tvb, atree, foffset);
5672 proto_item_set_end(aitem, tvb, foffset);
5673 /* End of NameorID */
5674 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5681 case 0x06097a: /* Resman */
5684 case 0x00000001: /* Bind */
5685 foffset = credentials(tvb, ndps_tree, foffset);
5686 proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, FALSE);
5688 number_of_items=tvb_get_ntohl(tvb, foffset);
5689 proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items);
5691 for (i = 1 ; i <= number_of_items; i++ )
5693 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Security %d", i);
5694 atree = proto_item_add_subtree(aitem, ett_ndps);
5695 length = tvb_get_ntohl(tvb, foffset);
5699 proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, FALSE);
5701 proto_item_set_end(aitem, tvb, foffset);
5704 case 0x00000002: /* Unbind */
5705 case 0x00000008: /* Get Resource Manager NDS Object Name */
5706 case 0x00000009: /* Get Resource Manager Session Information */
5709 case 0x00000003: /* Add Resource File */
5710 proto_tree_add_item(ndps_tree, hf_packet_count, tvb, foffset, 4, FALSE);
5712 proto_tree_add_item(ndps_tree, hf_last_packet_flag, tvb, foffset, 4, FALSE);
5714 proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, FALSE);
5716 foffset = res_add_input_data(tvb, ndps_tree, foffset);
5717 number_of_items=tvb_get_ntohl(tvb, foffset);
5718 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5720 for (i = 1 ; i <= number_of_items; i++ )
5722 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
5723 atree = proto_item_add_subtree(aitem, ett_ndps);
5724 length=tvb_get_ntohl(tvb, foffset);
5725 length_remaining = tvb_length_remaining(tvb, foffset);
5726 if(length_remaining == -1 || (guint32) length_remaining < length)
5730 proto_tree_add_item(atree, hf_ndps_item_ptr, tvb, foffset, length, FALSE);
5732 proto_item_set_end(aitem, tvb, foffset);
5735 case 0x00000004: /* Delete Resource File */
5736 foffset = res_add_input_data(tvb, ndps_tree, foffset);
5738 case 0x00000005: /* List Resources */
5739 proto_tree_add_item(ndps_tree, hf_ndps_max_items, tvb, foffset, 4, FALSE);
5741 proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
5743 proto_tree_add_item(ndps_tree, hf_ndps_resource_list_type, tvb, foffset, 4, FALSE);
5744 resource_type = tvb_get_ntohl(tvb, foffset);
5746 switch (resource_type)
5748 case 0: /* Print Drivers */
5749 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5752 case 1: /* Printer Definitions */
5753 case 2: /* Printer Definitions Short */
5754 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL, 0);
5756 case 3: /* Banner Page Files */
5757 proto_tree_add_item(ndps_tree, hf_banner_type, tvb, foffset, 4, FALSE);
5760 case 4: /* Font Types */
5761 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
5763 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5766 case 5: /* Printer Driver Files */
5767 case 12: /* Printer Driver Files 2 */
5768 case 9: /* Generic Files */
5769 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5771 foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL, 0);
5772 foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL, 0);
5773 foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL, 0);
5774 field_len = tvb_get_ntohl(tvb, foffset);
5776 proto_tree_add_item(ndps_tree, hf_printer_id, tvb, foffset, field_len, FALSE);
5778 case 6: /* Printer Definition File */
5779 case 10: /* Printer Definition File 2 */
5780 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL, 0);
5782 foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL, 0);
5783 foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL, 0);
5784 foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL, 0);
5785 field_len = tvb_get_ntohl(tvb, foffset);
5787 proto_tree_add_item(ndps_tree, hf_printer_id, tvb, foffset, field_len, FALSE);
5789 case 7: /* Font Files */
5790 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5792 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
5794 foffset = ndps_string(tvb, hf_ndps_font_name, ndps_tree, foffset, NULL, 0);
5796 case 8: /* Generic Type */
5797 case 11: /* Printer Driver Types 2 */
5798 case 13: /* Printer Driver Types Archive */
5799 foffset = ndps_string(tvb, hf_ndps_printer_manuf, ndps_tree, foffset, NULL, 0);
5800 foffset = ndps_string(tvb, hf_ndps_printer_type, ndps_tree, foffset, NULL, 0);
5801 foffset = ndps_string(tvb, hf_ndps_inf_file_name, ndps_tree, foffset, NULL, 0);
5803 case 14: /* Languages Available */
5809 case 0x00000006: /* Get Resource File */
5810 proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, FALSE);
5812 proto_tree_add_item(ndps_tree, hf_res_type, tvb, foffset, 4, FALSE);
5813 resource_type = tvb_get_ntohl(tvb, foffset);
5815 switch (resource_type)
5817 case 0: /* Print Drivers */
5818 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5820 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL, 0);
5821 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
5823 case 1: /* Printer Definitions */
5824 foffset = ndps_string(tvb, hf_ndps_vendor_dir, ndps_tree, foffset, NULL, 0);
5825 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
5827 case 2: /* Banner Page Files */
5828 foffset = ndps_string(tvb, hf_ndps_banner_name, ndps_tree, foffset, NULL, 0);
5830 case 3: /* Font Types */
5831 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5833 proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, FALSE);
5835 foffset = ndps_string(tvb, hf_ndps_prn_file_name, ndps_tree, foffset, NULL, 0);
5837 case 4: /* Generic Files/ Archive */
5838 case 5: /* Printer Driver Archive */
5839 proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, FALSE);
5841 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL, 0);
5842 proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, FALSE);
5849 case 0x00000007: /* Get Resource File Date */
5850 proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
5852 foffset = res_add_input_data(tvb, ndps_tree, foffset);
5854 case 0x0000000a: /* Set Resource Language Context */
5855 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
5862 case 0x06097b: /* Delivery */
5865 case 0x00000001: /* Delivery Bind */
5866 foffset = credentials(tvb, ndps_tree, foffset);
5868 case 0x00000002: /* Delivery Unbind */
5871 case 0x00000003: /* Delivery Send */
5872 number_of_items = tvb_get_ntohl(tvb, foffset);
5873 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
5875 for (i = 1 ; i <= number_of_items; i++ )
5877 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
5878 atree = proto_item_add_subtree(aitem, ett_ndps);
5879 proto_tree_add_item(atree, hf_ndps_session, tvb, foffset, 4, FALSE);
5881 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Supplier ID");
5882 btree = proto_item_add_subtree(bitem, ett_ndps);
5883 length = tvb_get_ntohl(tvb, foffset);
5887 proto_tree_add_item(btree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
5890 proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
5892 proto_item_set_end(bitem, tvb, foffset);
5893 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Containing Class");
5894 btree = proto_item_add_subtree(bitem, ett_ndps);
5895 foffset = objectidentifier(tvb, btree, foffset);
5896 proto_item_set_end(bitem, tvb, foffset);
5897 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Containing Object");
5898 btree = proto_item_add_subtree(bitem, ett_ndps);
5899 foffset = objectidentification(tvb, btree, foffset);
5900 proto_item_set_end(bitem, tvb, foffset);
5901 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Filter Class");
5902 btree = proto_item_add_subtree(bitem, ett_ndps);
5903 foffset = objectidentifier(tvb, btree, foffset);
5904 proto_item_set_end(bitem, tvb, foffset);
5905 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object Class");
5906 btree = proto_item_add_subtree(bitem, ett_ndps);
5907 foffset = objectidentifier(tvb, btree, foffset);
5908 proto_item_set_end(bitem, tvb, foffset);
5909 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object ID");
5910 btree = proto_item_add_subtree(bitem, ett_ndps);
5911 foffset = objectidentification(tvb, btree, foffset);
5912 proto_item_set_end(bitem, tvb, foffset);
5913 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Event Object ID");
5914 btree = proto_item_add_subtree(bitem, ett_ndps);
5915 foffset = objectidentifier(tvb, btree, foffset);
5916 foffset = attribute_value(tvb, atree, foffset);
5917 foffset = ndps_string(tvb, hf_ndps_message, atree, foffset, NULL, 0);
5918 proto_tree_add_item(atree, hf_time, tvb, foffset, 4, FALSE);
5920 proto_item_set_end(bitem, tvb, foffset);
5921 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Account");
5922 btree = proto_item_add_subtree(bitem, ett_ndps);
5923 foffset = qualifiedname(tvb, btree, foffset);
5924 proto_item_set_end(bitem, tvb, foffset);
5925 proto_item_set_end(aitem, tvb, foffset);
5928 case 0x00000004: /* Delivery Send2 */
5929 number_of_items = tvb_get_ntohl(tvb, foffset);
5930 proto_tree_add_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items);
5932 for (i = 1 ; i <= number_of_items; i++ )
5934 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object %d", i);
5935 atree = proto_item_add_subtree(aitem, ett_ndps);
5936 proto_tree_add_item(atree, hf_ndps_session, tvb, foffset, 4, FALSE);
5938 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Supplier ID");
5939 btree = proto_item_add_subtree(bitem, ett_ndps);
5940 length = tvb_get_ntohl(tvb, foffset);
5944 proto_tree_add_item(btree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
5947 proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, FALSE);
5949 proto_item_set_end(bitem, tvb, foffset);
5950 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Containing Class");
5951 btree = proto_item_add_subtree(bitem, ett_ndps);
5952 foffset = objectidentifier(tvb, btree, foffset);
5953 proto_item_set_end(bitem, tvb, foffset);
5954 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Containing Object");
5955 btree = proto_item_add_subtree(bitem, ett_ndps);
5956 foffset = objectidentification(tvb, btree, foffset);
5957 proto_item_set_end(bitem, tvb, foffset);
5958 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Filter Class");
5959 btree = proto_item_add_subtree(bitem, ett_ndps);
5960 foffset = objectidentifier(tvb, btree, foffset);
5961 proto_item_set_end(bitem, tvb, foffset);
5962 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object Class");
5963 btree = proto_item_add_subtree(bitem, ett_ndps);
5964 foffset = objectidentifier(tvb, btree, foffset);
5965 proto_item_set_end(bitem, tvb, foffset);
5966 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object ID");
5967 btree = proto_item_add_subtree(bitem, ett_ndps);
5968 foffset = objectidentification(tvb, btree, foffset);
5969 proto_item_set_end(bitem, tvb, foffset);
5970 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Event Object ID");
5971 btree = proto_item_add_subtree(bitem, ett_ndps);
5972 foffset = objectidentifier(tvb, btree, foffset);
5973 proto_item_set_end(bitem, tvb, foffset);
5974 /* Start of AttributeSet */
5975 number_of_items = tvb_get_ntohl(tvb, foffset);
5976 proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
5978 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute");
5979 btree = proto_item_add_subtree(bitem, ett_ndps);
5980 for (i = 1 ; i <= number_of_items; i++ )
5982 foffset = attribute_value(tvb, btree, foffset);
5984 proto_item_set_end(bitem, tvb, foffset);
5985 /* End of AttributeSet */
5986 foffset = ndps_string(tvb, hf_ndps_message, atree, foffset, NULL, 0);
5987 proto_tree_add_item(atree, hf_time, tvb, foffset, 4, FALSE);
5989 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Account");
5990 btree = proto_item_add_subtree(bitem, ett_ndps);
5991 foffset = qualifiedname(tvb, btree, foffset);
5992 proto_item_set_end(bitem, tvb, foffset);
5993 proto_item_set_end(aitem, tvb, foffset);
6007 ndps_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
6009 guint32 number_of_items;
6010 guint32 ndps_problem_type;
6011 guint32 problem_type;
6018 ndps_problem_type = tvb_get_ntohl(tvb, foffset);
6019 if (check_col(pinfo->cinfo, COL_INFO))
6020 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
6021 proto_tree_add_uint(ndps_tree, hf_ndps_problem_type, tvb, foffset, 4, ndps_problem_type);
6023 switch(ndps_problem_type)
6025 case 0: /* Security Error */
6026 problem_type = tvb_get_ntohl(tvb, foffset);
6027 proto_tree_add_uint(ndps_tree, hf_problem_type, tvb, foffset, 4, problem_type);
6029 if (problem_type==0) /* Standard Error */
6031 proto_tree_add_item(ndps_tree, hf_security_problem_type, tvb, foffset, 4, FALSE);
6034 else /* Extended Error */
6036 /* Start of objectidentifier */
6037 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6038 atree = proto_item_add_subtree(aitem, ett_ndps);
6039 foffset = objectidentifier(tvb, atree, foffset);
6040 proto_item_set_end(aitem, tvb, foffset);
6041 /* End of objectidentifier */
6043 /* Start of NameorID */
6044 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Message");
6045 atree = proto_item_add_subtree(aitem, ett_ndps);
6046 foffset = name_or_id(tvb, atree, foffset);
6047 proto_item_set_end(aitem, tvb, foffset);
6048 /* End of NameorID */
6050 case 1: /* Service Error */
6051 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6053 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6055 proto_tree_add_item(ndps_tree, hf_service_problem_type, tvb, foffset, 4, FALSE);
6058 else /* Extended Error */
6060 /* Start of objectidentifier */
6061 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6062 atree = proto_item_add_subtree(aitem, ett_ndps);
6063 foffset = objectidentifier(tvb, atree, foffset);
6064 proto_item_set_end(aitem, tvb, foffset);
6065 /* End of objectidentifier */
6067 foffset = objectidentification(tvb, ndps_tree, foffset);
6068 foffset = attribute_value(tvb, ndps_tree, foffset); /* Object Attribute Set */
6069 proto_tree_add_item(ndps_tree, hf_ndps_lib_error, tvb, foffset, 4, FALSE);
6071 proto_tree_add_item(ndps_tree, hf_ndps_other_error, tvb, foffset, 4, FALSE);
6073 proto_tree_add_item(ndps_tree, hf_ndps_other_error_2, tvb, foffset, 4, FALSE);
6076 case 2: /* Access Error */
6077 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6079 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6081 proto_tree_add_item(ndps_tree, hf_access_problem_type, tvb, foffset, 4, FALSE);
6084 else /* Extended Error */
6086 /* Start of objectidentifier */
6087 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6088 atree = proto_item_add_subtree(aitem, ett_ndps);
6089 foffset = objectidentifier(tvb, atree, foffset);
6090 proto_item_set_end(aitem, tvb, foffset);
6091 /* End of objectidentifier */
6093 foffset = objectidentification(tvb, ndps_tree, foffset);
6095 case 3: /* Printer Error */
6096 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6098 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6100 proto_tree_add_item(ndps_tree, hf_printer_problem_type, tvb, foffset, 4, FALSE);
6103 else /* Extended Error */
6105 /* Start of objectidentifier */
6106 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6107 atree = proto_item_add_subtree(aitem, ett_ndps);
6108 foffset = objectidentifier(tvb, atree, foffset);
6109 proto_item_set_end(aitem, tvb, foffset);
6110 /* End of objectidentifier */
6112 foffset = objectidentification(tvb, ndps_tree, foffset);
6114 case 4: /* Selection Error */
6115 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6117 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6119 proto_tree_add_item(ndps_tree, hf_selection_problem_type, tvb, foffset, 4, FALSE);
6122 else /* Extended Error */
6124 /* Start of objectidentifier */
6125 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6126 atree = proto_item_add_subtree(aitem, ett_ndps);
6127 foffset = objectidentifier(tvb, atree, foffset);
6128 proto_item_set_end(aitem, tvb, foffset);
6129 /* End of objectidentifier */
6131 foffset = objectidentification(tvb, ndps_tree, foffset);
6132 foffset = attribute_value(tvb, ndps_tree, foffset); /* Object Attribute Set */
6134 case 5: /* Document Access Error */
6135 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6137 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6139 proto_tree_add_item(ndps_tree, hf_doc_access_problem_type, tvb, foffset, 4, FALSE);
6140 foffset = objectidentifier(tvb, ndps_tree, foffset);
6142 else /* Extended Error */
6144 /* Start of objectidentifier */
6145 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6146 atree = proto_item_add_subtree(aitem, ett_ndps);
6147 foffset = objectidentifier(tvb, atree, foffset);
6148 proto_item_set_end(aitem, tvb, foffset);
6149 /* End of objectidentifier */
6151 foffset = objectidentification(tvb, ndps_tree, foffset);
6153 case 6: /* Attribute Error */
6154 number_of_items = tvb_get_ntohl(tvb, foffset);
6155 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6157 for (i = 1 ; i <= number_of_items; i++ )
6159 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
6160 atree = proto_item_add_subtree(aitem, ett_ndps);
6161 proto_tree_add_item(atree, hf_problem_type, tvb, foffset, 4, FALSE);
6163 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6165 proto_tree_add_item(atree, hf_attribute_problem_type, tvb, foffset, 4, FALSE);
6168 else /* Extended Error */
6170 /* Start of objectidentifier */
6171 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Extended Error");
6172 btree = proto_item_add_subtree(bitem, ett_ndps);
6173 foffset = objectidentifier(tvb, btree, foffset);
6174 proto_item_set_end(bitem, tvb, foffset);
6175 /* End of objectidentifier */
6177 foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
6178 proto_item_set_end(aitem, tvb, foffset);
6181 case 7: /* Update Error */
6182 proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, FALSE);
6184 if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */
6186 proto_tree_add_item(ndps_tree, hf_update_problem_type, tvb, foffset, 4, FALSE);
6189 else /* Extended Error */
6191 /* Start of objectidentifier */
6192 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Extended Error");
6193 atree = proto_item_add_subtree(aitem, ett_ndps);
6194 foffset = objectidentifier(tvb, atree, foffset);
6195 proto_item_set_end(aitem, tvb, foffset);
6196 /* End of objectidentifier */
6198 foffset = objectidentification(tvb, ndps_tree, foffset);
6207 return_code(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
6209 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
6211 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
6212 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
6213 if (tvb_get_ntohl(tvb, foffset-4) == 0)
6217 proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, FALSE);
6223 dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset)
6225 conversation_t *conversation = NULL;
6226 ndps_req_hash_value *request_value = NULL;
6238 guint32 number_of_items=0;
6239 guint32 number_of_items2=0;
6240 guint32 number_of_items3=0;
6242 guint32 ndps_func=0;
6243 guint32 ndps_prog=0;
6244 guint32 error_val=0;
6245 guint32 resource_type=0;
6246 gint length_remaining;
6248 if (!pinfo->fd->flags.visited) {
6249 /* Find the conversation whence the request would have come. */
6250 conversation = find_conversation(&pinfo->src, &pinfo->dst,
6251 PT_NCP, (guint32) pinfo->destport, (guint32) pinfo->destport, 0);
6252 if (conversation != NULL) {
6253 /* find the record telling us the request made that caused
6255 request_value = ndps_hash_lookup(conversation, (guint32) pinfo->destport);
6256 p_add_proto_data(pinfo->fd, proto_ndps, (void*) request_value);
6258 /* else... we haven't seen an NDPS Request for that conversation. */
6261 request_value = p_get_proto_data(pinfo->fd, proto_ndps);
6263 if (request_value) {
6264 ndps_prog = request_value->ndps_prog;
6265 ndps_func = request_value->ndps_func;
6266 proto_tree_add_uint_format(ndps_tree, hf_ndps_reqframe, tvb, 0,
6267 0, request_value->ndps_frame_num,
6268 "Response to Request in Frame Number: %u",
6269 request_value->ndps_frame_num);
6272 if (tvb_length_remaining(tvb, foffset) < 12 && tvb_get_ntohl(tvb, foffset) == 0) /* No error and no return data */
6274 proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
6275 if (check_col(pinfo->cinfo, COL_INFO))
6276 col_append_str(pinfo->cinfo, COL_INFO, "- Ok");
6279 if(ndps_func == 1 || ndps_func == 2)
6281 proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_stat, tvb, foffset, 4, FALSE);
6283 if (tvb_length_remaining(tvb,foffset) < 4 ) {
6284 if (check_col(pinfo->cinfo, COL_INFO))
6285 col_append_str(pinfo->cinfo, COL_INFO, "- Error");
6288 proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_results, tvb, foffset, 4, FALSE);
6290 if (tvb_length_remaining(tvb,foffset) < 4) {
6291 if (check_col(pinfo->cinfo, COL_INFO))
6292 col_append_str(pinfo->cinfo, COL_INFO, "- Error");
6296 error_val = tvb_get_ntohl(tvb, foffset);
6297 proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
6299 /* Some functions return an error with no data, 0 is ok */
6300 if (match_strval(tvb_get_ntohl(tvb, foffset), ndps_error_types) && tvb_length_remaining(tvb,foffset) < 8 && (tvb_get_ntohl(tvb, foffset)!=0))
6302 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
6303 if (check_col(pinfo->cinfo, COL_INFO))
6304 col_append_str(pinfo->cinfo, COL_INFO, "- Error");
6307 if (check_col(pinfo->cinfo, COL_INFO))
6308 col_append_str(pinfo->cinfo, COL_INFO, "- Ok");
6311 case 0x060976: /* Print */
6314 case 0x00000001: /* Bind PSM */
6315 proto_tree_add_item(ndps_tree, hf_ndps_oid, tvb, foffset, 4, FALSE);
6319 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6320 if(tvb_length_remaining(tvb, foffset) < 4)
6324 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
6327 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "PSM Name");
6328 atree = proto_item_add_subtree(aitem, ett_ndps);
6329 foffset = qualifiedname(tvb, atree, foffset);
6330 proto_item_set_end(aitem, tvb, foffset);
6332 case 0x00000002: /* Bind PA */
6333 proto_tree_add_item(ndps_tree, hf_ndps_oid, tvb, foffset, 4, FALSE);
6337 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6338 if(tvb_length_remaining(tvb, foffset) < 4)
6342 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
6345 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
6347 case 0x00000003: /* Unbind */
6349 case 0x00000004: /* Print */
6350 foffset = ndps_string(tvb, hf_ndps_pa_name, ndps_tree, foffset, NULL, 0);
6351 proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, FALSE);
6355 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6358 case 0x00000005: /* Modify Job */
6359 case 0x00000006: /* Cancel Job */
6360 case 0x00000008: /* Promote Job */
6361 case 0x0000000b: /* Resume */
6362 case 0x0000000d: /* Create */
6363 /* Start of AttributeSet */
6364 number_of_items = tvb_get_ntohl(tvb, foffset);
6365 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6367 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Attribute Set");
6368 atree = proto_item_add_subtree(aitem, ett_ndps);
6369 for (i = 1 ; i <= number_of_items; i++ )
6371 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %d", i);
6372 btree = proto_item_add_subtree(bitem, ett_ndps);
6373 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
6374 proto_item_set_end(bitem, tvb, foffset);
6376 proto_item_set_end(aitem, tvb, foffset);
6377 /* End of AttributeSet */
6380 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6383 case 0x00000007: /* List Object Attributes */
6384 proto_tree_add_item(ndps_tree, hf_answer_time, tvb, foffset, 4, FALSE);
6386 /* Continuation Option */
6387 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Continuation Option");
6388 atree = proto_item_add_subtree(aitem, ett_ndps);
6389 number_of_items=tvb_get_ntohl(tvb, foffset);
6390 proto_tree_add_uint(atree, hf_ndps_num_options, tvb, foffset, 4, number_of_items);
6392 for (i = 1 ; i <= number_of_items; i++ )
6394 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Option %d", i);
6395 btree = proto_item_add_subtree(bitem, ett_ndps);
6396 length=tvb_get_ntohl(tvb, foffset);
6397 length_remaining = tvb_length_remaining(tvb, foffset);
6398 if(length_remaining == -1 || (guint32) length_remaining < length)
6402 proto_tree_add_item(btree, hf_ndps_item_ptr, tvb, foffset, length, FALSE);
6404 proto_item_set_end(bitem, tvb, foffset);
6406 proto_item_set_end(aitem, tvb, foffset);
6407 /* Limit Encountered Option */
6408 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Limit Encountered Option");
6409 atree = proto_item_add_subtree(aitem, ett_ndps);
6410 proto_tree_add_item(atree, hf_ndps_len, tvb, foffset, 4, FALSE);
6412 proto_tree_add_item(atree, hf_limit_enc, tvb, foffset, 4, FALSE);
6414 proto_item_set_end(aitem, tvb, foffset);
6415 /* Object Results Set */
6416 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Results Set");
6417 atree = proto_item_add_subtree(aitem, ett_ndps);
6418 number_of_items=tvb_get_ntohl(tvb, foffset);
6419 proto_tree_add_uint(atree, hf_ndps_num_results, tvb, foffset, 4, number_of_items);
6421 for (i = 1 ; i <= number_of_items; i++ )
6423 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Result %d", i);
6424 btree = proto_item_add_subtree(bitem, ett_ndps);
6425 foffset = objectidentification(tvb, btree, foffset);
6426 number_of_items2 = tvb_get_ntohl(tvb, foffset);
6427 proto_tree_add_uint(btree, hf_ndps_num_objects, tvb, foffset, 4, number_of_items2);
6429 for (j = 1 ; j <= number_of_items2; j++ )
6431 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Attribute %d", j);
6432 ctree = proto_item_add_subtree(citem, ett_ndps);
6433 foffset = objectidentifier(tvb, ctree, foffset);
6434 foffset += align_4(tvb, foffset);
6435 number_of_items3 = tvb_get_ntohl(tvb, foffset);
6436 proto_tree_add_uint(ctree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items3);
6438 for (k = 1 ; k <= number_of_items3; k++ )
6440 ditem = proto_tree_add_text(ctree, tvb, foffset, -1, "Value %d", k);
6441 dtree = proto_item_add_subtree(ditem, ett_ndps);
6442 foffset = attribute_value(tvb, dtree, foffset);
6443 foffset += align_4(tvb, foffset);
6444 proto_item_set_end(ditem, tvb, foffset);
6446 proto_tree_add_item(ctree, hf_ndps_qualifier, tvb, foffset, 4, FALSE);
6448 proto_item_set_end(citem, tvb, foffset);
6450 foffset = objectidentifier(tvb, btree, foffset);
6452 proto_item_set_end(bitem, tvb, foffset);
6454 proto_item_set_end(aitem, tvb, foffset);
6457 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6460 case 0x00000009: /* Interrupt */
6461 case 0x0000000a: /* Pause */
6462 /* Start of NWDPPrtContainedObjectId */
6463 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job ID");
6464 atree = proto_item_add_subtree(aitem, ett_ndps);
6465 foffset = ndps_string(tvb, hf_ndps_pa_name, atree, foffset, NULL, 0);
6466 proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, FALSE);
6468 proto_item_set_end(aitem, tvb, foffset);
6469 /* End of NWDPPrtContainedObjectId */
6470 /* Start of AttributeSet */
6471 number_of_items = tvb_get_ntohl(tvb, foffset);
6472 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6474 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Object Attribute Set");
6475 atree = proto_item_add_subtree(aitem, ett_ndps);
6476 for (i = 1 ; i <= number_of_items; i++ )
6478 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Attribute %d", i);
6479 btree = proto_item_add_subtree(bitem, ett_ndps);
6480 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
6481 proto_item_set_end(bitem, tvb, foffset);
6483 proto_item_set_end(aitem, tvb, foffset);
6484 /* End of AttributeSet */
6487 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6490 case 0x0000000c: /* Clean */
6491 case 0x0000000e: /* Delete */
6492 case 0x0000000f: /* Disable PA */
6493 case 0x00000010: /* Enable PA */
6494 case 0x00000012: /* Set */
6495 case 0x00000013: /* Shutdown PA */
6496 case 0x00000014: /* Startup PA */
6497 case 0x00000018: /* Transfer Data */
6498 case 0x00000019: /* Device Control */
6499 case 0x0000001b: /* Remove Event Profile */
6500 case 0x0000001c: /* Modify Event Profile */
6501 case 0x0000001e: /* Shutdown PSM */
6502 case 0x0000001f: /* Cancel PSM Shutdown */
6503 case 0x00000020: /* Set Printer DS Information */
6504 case 0x00000021: /* Clean User Jobs */
6507 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6510 case 0x00000011: /* Resubmit Jobs */
6511 number_of_items = tvb_get_ntohl(tvb, foffset); /* Start of ResubmitJob Set */
6512 proto_tree_add_uint(ndps_tree, hf_ndps_num_jobs, tvb, foffset, 4, number_of_items);
6514 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Resubmit Job");
6515 atree = proto_item_add_subtree(aitem, ett_ndps);
6516 for (i = 1 ; i <= number_of_items; i++ )
6518 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Job %d", i);
6519 btree = proto_item_add_subtree(bitem, ett_ndps);
6520 /* Start of NWDPPrtContainedObjectId */
6521 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Old Job");
6522 ctree = proto_item_add_subtree(citem, ett_ndps);
6523 foffset = ndps_string(tvb, hf_ndps_pa_name, ctree, foffset, NULL, 0);
6524 proto_tree_add_item(ctree, hf_local_id, tvb, foffset, 4, FALSE);
6526 proto_item_set_end(citem, tvb, foffset);
6527 /* End of NWDPPrtContainedObjectId */
6528 /* Start of NWDPPrtContainedObjectId */
6529 citem = proto_tree_add_text(btree, tvb, foffset, -1, "New Job");
6530 ctree = proto_item_add_subtree(citem, ett_ndps);
6531 foffset = ndps_string(tvb, hf_ndps_pa_name, ctree, foffset, NULL, 0);
6532 proto_tree_add_item(ctree, hf_local_id, tvb, foffset, 4, FALSE);
6534 proto_item_set_end(citem, tvb, foffset);
6535 /* End of NWDPPrtContainedObjectId */
6536 /* Start of AttributeSet */
6537 number_of_items2 = tvb_get_ntohl(tvb, foffset);
6538 proto_tree_add_uint(ctree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2);
6540 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Job Status");
6541 ctree = proto_item_add_subtree(citem, ett_ndps);
6542 for (j = 1 ; j <= number_of_items2; j++ )
6544 ditem = proto_tree_add_text(ctree, tvb, foffset, -1, "Object %d", j);
6545 dtree = proto_item_add_subtree(ditem, ett_ndps);
6546 foffset = attribute_value(tvb, dtree, foffset); /* Object Attribute Set */
6547 proto_item_set_end(ditem, tvb, foffset);
6549 proto_item_set_end(citem, tvb, foffset);
6550 proto_item_set_end(bitem, tvb, foffset);
6551 /* End of AttributeSet */
6553 proto_item_set_end(aitem, tvb, foffset);
6554 /* End of ResubmitJob Set */
6557 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6560 case 0x00000015: /* Reorder Job */
6561 /* Start of AttributeSet */
6562 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Job Status");
6563 atree = proto_item_add_subtree(aitem, ett_ndps);
6564 number_of_items = tvb_get_ntohl(tvb, foffset);
6565 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6567 for (i = 1 ; i <= number_of_items; i++ )
6569 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object %d", i);
6570 btree = proto_item_add_subtree(bitem, ett_ndps);
6571 foffset = attribute_value(tvb, btree, foffset); /* Object Attribute Set */
6572 proto_item_set_end(bitem, tvb, foffset);
6574 proto_item_set_end(aitem, tvb, foffset);
6575 /* End of AttributeSet */
6578 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6581 case 0x00000016: /* Pause PA */
6582 case 0x00000017: /* Resume PA */
6583 /* Start of AttributeSet */
6584 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Printer Status");
6585 atree = proto_item_add_subtree(aitem, ett_ndps);
6586 number_of_items = tvb_get_ntohl(tvb, foffset);
6587 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
6589 for (i = 1 ; i <= number_of_items; i++ )
6591 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Object %d", i);
6592 btree = proto_item_add_subtree(bitem, ett_ndps);
6593 foffset = attribute_value(tvb, atree, foffset); /* Object Attribute Set */
6594 proto_item_set_end(bitem, tvb, foffset);
6596 proto_item_set_end(aitem, tvb, foffset);
6597 /* End of AttributeSet */
6600 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6603 case 0x0000001a: /* Add Event Profile */
6604 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
6608 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6611 case 0x0000001d: /* List Event Profiles */
6612 length = tvb_get_ntohl(tvb, foffset);
6616 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
6619 /* Start of Eventhandling */
6620 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
6622 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
6624 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer Name");
6625 atree = proto_item_add_subtree(aitem, ett_ndps);
6626 foffset = qualifiedname(tvb, atree, foffset);
6627 length = tvb_get_ntohl(tvb, foffset);
6631 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
6634 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
6636 proto_item_set_end(aitem, tvb, foffset);
6637 /* Start of NameorID */
6638 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
6639 atree = proto_item_add_subtree(aitem, ett_ndps);
6640 foffset = name_or_id(tvb, atree, foffset);
6641 proto_item_set_end(aitem, tvb, foffset);
6642 /* End of NameorID */
6643 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Addresses");
6644 atree = proto_item_add_subtree(aitem, ett_ndps);
6645 number_of_items = tvb_get_ntohl(tvb, foffset);
6646 proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
6648 for (i = 1 ; i <= number_of_items; i++ )
6650 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Address %d", i);
6651 btree = proto_item_add_subtree(bitem, ett_ndps);
6652 foffset = address_item(tvb, btree, foffset);
6653 proto_item_set_end(bitem, tvb, foffset);
6655 proto_item_set_end(aitem, tvb, foffset);
6656 foffset = event_object_set(tvb, ndps_tree, foffset);
6657 /* End of Eventhandling */
6658 length = tvb_get_ntohl(tvb, foffset);
6662 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
6667 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6670 case 0x00000022: /* Map GUID to NDS Name */
6671 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "NDS Printer Name");
6672 atree = proto_item_add_subtree(aitem, ett_ndps);
6673 foffset = qualifiedname(tvb, atree, foffset);
6674 proto_item_set_end(aitem, tvb, foffset);
6677 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6680 case 0x00000023: /* AddEventProfile2 */
6681 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
6683 proto_tree_add_item(ndps_tree, hf_notify_lease_exp_time, tvb, foffset, 4, FALSE);
6687 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6690 case 0x00000024: /* ListEventProfiles2 */
6691 number_of_items = tvb_get_ntohl(tvb, foffset);
6692 proto_tree_add_uint(ndps_tree, hf_ndps_num_events, tvb, foffset, 4, number_of_items);
6694 for (i = 1 ; i <= number_of_items; i++ )
6696 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Event %d", i);
6697 atree = proto_item_add_subtree(aitem, ett_ndps);
6698 /* Start of Eventhandling2 */
6699 proto_tree_add_item(atree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
6701 proto_tree_add_item(atree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
6703 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Consumer Name");
6704 btree = proto_item_add_subtree(bitem, ett_ndps);
6705 foffset = qualifiedname(tvb, btree, foffset);
6706 foffset = ndps_string(tvb, hf_ndps_supplier_name, atree, foffset, NULL, 0);
6707 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
6709 proto_item_set_end(bitem, tvb, foffset);
6710 /* Start of NameorID */
6711 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Method ID");
6712 btree = proto_item_add_subtree(bitem, ett_ndps);
6713 foffset = name_or_id(tvb, btree, foffset);
6714 foffset += align_4(tvb, foffset);
6715 proto_item_set_end(bitem, tvb, foffset);
6716 /* End of NameorID */
6717 number_of_items = tvb_get_ntohl(tvb, foffset);
6718 proto_tree_add_uint(atree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
6720 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Delivery Addresses");
6721 btree = proto_item_add_subtree(bitem, ett_ndps);
6722 for (i = 1 ; i <= number_of_items; i++ )
6724 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Address %d", i);
6725 ctree = proto_item_add_subtree(citem, ett_ndps);
6726 foffset = address_item(tvb, ctree, foffset);
6727 proto_item_set_end(citem, tvb, foffset);
6729 proto_item_set_end(bitem, tvb, foffset);
6730 foffset = event_object_set(tvb, atree, foffset);
6731 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Account");
6732 btree = proto_item_add_subtree(bitem, ett_ndps);
6733 foffset = qualifiedname(tvb, btree, foffset);
6734 proto_item_set_end(bitem, tvb, foffset);
6735 /* Start of object identifier set */
6736 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Notify Attributes");
6737 btree = proto_item_add_subtree(bitem, ett_ndps);
6738 number_of_items = tvb_get_ntohl(tvb, foffset);
6739 proto_tree_add_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6741 for (i = 1 ; i <= number_of_items; i++ )
6743 citem = proto_tree_add_text(btree, tvb, foffset, -1, "Attribute %d", i);
6744 ctree = proto_item_add_subtree(citem, ett_ndps);
6745 foffset = objectidentifier(tvb, ctree, foffset);
6746 proto_item_set_end(citem, tvb, foffset);
6748 proto_item_set_end(bitem, tvb, foffset);
6749 /* End of object identifier set */
6750 proto_tree_add_item(atree, hf_notify_time_interval, tvb, foffset, 4, FALSE);
6752 proto_tree_add_item(atree, hf_notify_sequence_number, tvb, foffset, 4, FALSE);
6754 proto_tree_add_item(atree, hf_notify_lease_exp_time, tvb, foffset, 4, FALSE);
6756 foffset = ndps_string(tvb, hf_notify_printer_uri, atree, foffset, NULL, 0);
6757 proto_item_set_end(aitem, tvb, foffset);
6758 /* End of Eventhandling2 */
6759 length = tvb_get_ntohl(tvb, foffset); /* Added on 10-17-03 */
6763 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
6768 foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
6776 case 0x060977: /* Broker */
6779 case 0x00000001: /* Bind */
6780 case 0x00000002: /* Unbind */
6781 case 0x00000004: /* Enable Service */
6782 case 0x00000005: /* Disable Service */
6783 case 0x00000006: /* Down Broker */
6784 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
6786 case 0x00000003: /* List Services */
6787 number_of_items = tvb_get_ntohl(tvb, foffset);
6788 proto_tree_add_uint(ndps_tree, hf_ndps_num_services, tvb, foffset, 4, number_of_items);
6790 for (i = 1 ; i <= number_of_items; i++ )
6792 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Service %d", i);
6793 atree = proto_item_add_subtree(aitem, ett_ndps);
6794 proto_tree_add_item(atree, hf_ndps_service_type, tvb, foffset, 4, FALSE);
6796 proto_tree_add_item(atree, hf_ndps_service_enabled, tvb, foffset, 4, FALSE);
6798 proto_item_set_end(aitem, tvb, foffset);
6800 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
6802 case 0x00000007: /* Get Broker NDS Object Name */
6803 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset,
6804 4, FALSE); /* XXX - what does this count? */
6806 foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset, NULL, 0);
6807 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
6808 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
6810 case 0x00000008: /* Get Broker Session Information */
6815 case 0x060978: /* Registry */
6818 case 0x00000001: /* Bind */
6819 number_of_items = tvb_get_ntohl(tvb, foffset);
6820 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6822 for (i = 1 ; i <= number_of_items; i++ )
6824 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Attribute %d", i);
6825 atree = proto_item_add_subtree(aitem, ett_ndps);
6826 length = tvb_get_ntohl(tvb, foffset);
6830 proto_tree_add_item(atree, hf_ndps_attribute_set, tvb, foffset, length, FALSE);
6832 proto_item_set_end(aitem, tvb, foffset);
6835 case 0x00000002: /* Unbind */
6838 case 0x00000003: /* Register Server */
6839 case 0x00000004: /* Deregister Server */
6840 case 0x00000005: /* Register Registry */
6841 case 0x00000006: /* Deregister Registry */
6842 case 0x00000007: /* Registry Update */
6843 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
6845 case 0x00000008: /* List Local Servers */
6846 case 0x00000009: /* List Servers */
6847 number_of_items = tvb_get_ntohl(tvb, foffset);
6848 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
6850 for (i = 1 ; i <= number_of_items; i++ )
6852 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
6853 atree = proto_item_add_subtree(aitem, ett_ndps);
6854 foffset = server_entry(tvb, atree, foffset);
6855 proto_item_set_end(aitem, tvb, foffset);
6857 length = tvb_get_ntohl(tvb, foffset);
6861 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
6864 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
6866 case 0x0000000a: /* List Known Registries */
6867 number_of_items = tvb_get_ntohl(tvb, foffset);
6868 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, FALSE);
6870 for (i = 1 ; i <= number_of_items; i++ )
6872 aitem = proto_tree_add_item(ndps_tree, hf_ndps_client_server_type, tvb, foffset, 4, FALSE);
6873 atree = proto_item_add_subtree(aitem, ett_ndps);
6875 foffset = ndps_string(tvb, hf_ndps_registry_name, atree, foffset, NULL, 0);
6876 foffset = print_address(tvb, atree, foffset);
6878 length = tvb_get_ntohl(tvb, foffset);
6882 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
6885 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
6887 case 0x0000000b: /* Get Registry NDS Object Name */
6888 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "NDS Printer Name");
6889 atree = proto_item_add_subtree(aitem, ett_ndps);
6890 foffset = qualifiedname(tvb, atree, foffset);
6891 proto_item_set_end(aitem, tvb, foffset);
6892 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
6894 case 0x0000000c: /* Get Registry Session Information */
6895 proto_tree_add_item(ndps_tree, hf_ndps_session_type, tvb, foffset, 4, FALSE);
6897 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
6899 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
6905 case 0x060979: /* Notify */
6908 case 0x00000001: /* Notify Bind */
6909 number_of_items = tvb_get_ntohl(tvb, foffset);
6910 proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items);
6912 for (i = 1 ; i <= number_of_items; i++ )
6914 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Attribute %d", i);
6915 atree = proto_item_add_subtree(aitem, ett_ndps);
6916 length = tvb_get_ntohl(tvb, foffset);
6920 proto_tree_add_item(atree, hf_ndps_attribute_set, tvb, foffset, length, FALSE);
6922 proto_item_set_end(aitem, tvb, foffset);
6925 case 0x00000002: /* Notify Unbind */
6928 case 0x00000003: /* Register Supplier */
6929 proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, FALSE);
6931 foffset = event_object_set(tvb, ndps_tree, foffset);
6932 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
6934 case 0x00000004: /* Deregister Supplier */
6935 case 0x0000000b: /* Report Notification */
6936 case 0x0000000d: /* Remove Delivery Method */
6937 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
6939 case 0x00000005: /* Add Profile */
6940 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
6942 foffset = event_object_set(tvb, ndps_tree, foffset);
6943 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
6945 case 0x00000006: /* Remove Profile */
6946 case 0x00000007: /* Modify Profile */
6947 case 0x00000009: /* Report Event */
6948 foffset = event_object_set(tvb, ndps_tree, foffset);
6949 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
6951 case 0x00000008: /* List Profiles */
6952 /* Start of ProfileResultSet */
6953 proto_tree_add_item(ndps_tree, hf_ndps_len, tvb, foffset, 4, FALSE);
6955 /* Start of Eventhandling */
6956 proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, FALSE);
6958 proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, FALSE);
6960 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Consumer Name");
6961 atree = proto_item_add_subtree(aitem, ett_ndps);
6962 foffset = qualifiedname(tvb, atree, foffset);
6963 proto_item_set_end(aitem, tvb, foffset);
6964 length = tvb_get_ntohl(tvb, foffset);
6968 proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, FALSE);
6971 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
6973 /* Start of NameorID */
6974 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
6975 atree = proto_item_add_subtree(aitem, ett_ndps);
6976 foffset = name_or_id(tvb, atree, foffset);
6977 proto_item_set_end(aitem, tvb, foffset);
6978 /* End of NameorID */
6979 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Addresses");
6980 atree = proto_item_add_subtree(aitem, ett_ndps);
6981 number_of_items = tvb_get_ntohl(tvb, foffset);
6982 proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
6984 for (i = 1 ; i <= number_of_items; i++ )
6986 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Address %d", i);
6987 btree = proto_item_add_subtree(bitem, ett_ndps);
6988 foffset = address_item(tvb, btree, foffset);
6989 proto_item_set_end(bitem, tvb, foffset);
6991 proto_item_set_end(aitem, tvb, foffset);
6992 foffset = event_object_set(tvb, ndps_tree, foffset);
6993 /* End of Eventhandling */
6994 /* End of ProfileResultSet */
6995 length = tvb_get_ntohl(tvb, foffset);
6999 proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, FALSE);
7002 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7004 case 0x0000000a: /* List Supported Languages */
7005 /* Start of IntegerSeq */
7006 length = tvb_get_ntohl(tvb, foffset);
7010 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, length, FALSE);
7013 /* End of IntegerSeq */
7014 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7016 case 0x0000000c: /* Add Delivery Method */
7017 /* Start of NameorID */
7018 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
7019 atree = proto_item_add_subtree(aitem, ett_ndps);
7020 foffset = name_or_id(tvb, atree, foffset);
7021 proto_item_set_end(aitem, tvb, foffset);
7022 /* End of NameorID */
7023 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7025 case 0x0000000e: /* List Delivery Methods */
7026 /* Start of DeliveryMethodSet */
7027 number_of_items = tvb_get_ntohl(tvb, foffset);
7028 proto_tree_add_uint(ndps_tree, hf_ndps_delivery_method_count, tvb, foffset, 4, number_of_items);
7030 for (i = 1 ; i <= number_of_items; i++ )
7032 /* Start of DeliveryMethod */
7033 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method %d", i);
7034 atree = proto_item_add_subtree(aitem, ett_ndps);
7035 /* Start of NameorID */
7036 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Method ID");
7037 btree = proto_item_add_subtree(bitem, ett_ndps);
7038 foffset = name_or_id(tvb, btree, foffset);
7039 foffset += align_4(tvb, foffset);
7040 proto_item_set_end(bitem, tvb, foffset);
7041 /* End of NameorID */
7042 foffset = ndps_string(tvb, hf_ndps_method_name, atree, foffset, NULL, 0);
7043 foffset = ndps_string(tvb, hf_ndps_method_ver, atree, foffset, NULL, 0);
7044 foffset = ndps_string(tvb, hf_ndps_file_name, atree, foffset, NULL, 0);
7045 proto_tree_add_item(atree, hf_ndps_admin_submit, tvb, foffset, 4, FALSE);
7047 proto_item_set_end(aitem, tvb, foffset);
7048 /* End of DeliveryMethod */
7050 /* End of DeliveryMethodSet */
7051 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7053 case 0x0000000f: /* Get Delivery Method Information */
7054 /* Start of DeliveryMethod */
7055 /* Start of NameorID */
7056 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Method ID");
7057 atree = proto_item_add_subtree(aitem, ett_ndps);
7058 foffset = name_or_id(tvb, atree, foffset);
7059 /* End of NameorID */
7060 foffset = ndps_string(tvb, hf_ndps_method_name, atree, foffset, NULL, 0);
7061 foffset = ndps_string(tvb, hf_ndps_method_ver, atree, foffset, NULL, 0);
7062 foffset = ndps_string(tvb, hf_ndps_file_name, atree, foffset, NULL, 0);
7063 proto_tree_add_item(atree, hf_ndps_admin_submit, tvb, foffset, 4, FALSE);
7065 proto_item_set_end(aitem, tvb, foffset);
7066 /* End of DeliveryMethod */
7067 number_of_items = tvb_get_ntohl(tvb, foffset);
7068 proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items);
7070 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Delivery Addresses");
7071 atree = proto_item_add_subtree(aitem, ett_ndps);
7072 for (i = 1 ; i <= number_of_items; i++ )
7074 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Address %d", i);
7075 btree = proto_item_add_subtree(bitem, ett_ndps);
7076 foffset = address_item(tvb, btree, foffset);
7077 proto_item_set_end(bitem, tvb, foffset);
7079 proto_item_set_end(aitem, tvb, foffset);
7080 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7082 case 0x00000010: /* Get Notify NDS Object Name */
7083 proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset,
7084 4, FALSE); /* XXX - what does this count? */
7086 foffset = ndps_string(tvb, hf_ndps_broker_name, ndps_tree, foffset, NULL, 0);
7087 foffset = ndps_string(tvb, hf_ndps_tree, ndps_tree, foffset, NULL, 0);
7088 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7090 case 0x00000011: /* Get Notify Session Information */
7091 proto_tree_add_item(ndps_tree, hf_ndps_get_session_type, tvb, foffset, 4, FALSE);
7093 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
7095 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7101 case 0x06097a: /* Resman */
7104 case 0x00000001: /* Bind */
7105 length = tvb_get_ntohl(tvb, foffset);
7109 proto_tree_add_item(ndps_tree, hf_ndps_attribute_set, tvb, foffset, length, FALSE);
7112 case 0x00000002: /* Unbind */
7115 case 0x00000003: /* Add Resource File */
7116 case 0x00000004: /* Delete Resource File */
7117 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7119 case 0x00000005: /* List Resources */
7120 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7122 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
7123 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7124 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7128 proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, FALSE);
7130 proto_tree_add_item(ndps_tree, hf_ndps_resource_list_type, tvb, foffset, 4, FALSE);
7131 resource_type = tvb_get_ntohl(tvb, foffset);
7133 switch (resource_type)
7135 case 0: /* Print Drivers */
7136 case 1: /* Printer Definitions */
7137 case 2: /* Printer Definitions Short */
7138 number_of_items = tvb_get_ntohl(tvb, foffset);
7139 proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items);
7141 for (i = 1 ; i <= number_of_items; i++ )
7143 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Definition %d", i);
7144 atree = proto_item_add_subtree(aitem, ett_ndps);
7145 if (tvb_get_ntohl(tvb, foffset)==0) { /* Offset for old type support */
7148 foffset += 4; /* Item always == 1 */
7149 foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL, 0);
7150 if (tvb_get_ntohl(tvb, foffset)==0) {
7154 foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL, 0);
7155 if (tvb_get_ntohl(tvb, foffset)==0) {
7159 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL, 0);
7160 proto_item_set_end(aitem, tvb, foffset);
7163 case 3: /* Banner Page Files */
7164 number_of_items = tvb_get_ntohl(tvb, foffset);
7165 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7167 for (i = 1 ; i <= number_of_items; i++ )
7169 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Banner %d", i);
7170 atree = proto_item_add_subtree(aitem, ett_ndps);
7171 foffset = ndps_string(tvb, hf_ndps_banner_name, atree, foffset, NULL, 0);
7172 proto_item_set_end(aitem, tvb, foffset);
7175 case 4: /* Font Types */
7176 number_of_items = tvb_get_ntohl(tvb, foffset);
7177 proto_tree_add_uint(ndps_tree, hf_ndps_font_type_count, tvb, foffset, 4, number_of_items);
7179 for (i = 1 ; i <= number_of_items; i++ )
7181 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Font %d", i);
7182 atree = proto_item_add_subtree(aitem, ett_ndps);
7183 foffset = ndps_string(tvb, hf_font_type_name, atree, foffset, NULL, 0);
7184 proto_item_set_end(aitem, tvb, foffset);
7187 case 7: /* Font Files */
7188 number_of_items = tvb_get_ntohl(tvb, foffset);
7189 proto_tree_add_uint(ndps_tree, hf_ndps_font_file_count, tvb, foffset, 4, number_of_items);
7191 for (i = 1 ; i <= number_of_items; i++ )
7193 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Font File %d", i);
7194 atree = proto_item_add_subtree(aitem, ett_ndps);
7195 foffset = ndps_string(tvb, hf_font_file_name, atree, foffset, NULL, 0);
7196 proto_item_set_end(aitem, tvb, foffset);
7199 case 5: /* Printer Driver Files */
7200 case 12: /* Printer Driver Files 2 */
7201 case 9: /* Generic Files */
7202 number_of_items = tvb_get_ntohl(tvb, foffset);
7203 proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items);
7205 for (i = 1 ; i <= number_of_items; i++ )
7207 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "File %d", i);
7208 atree = proto_item_add_subtree(aitem, ett_ndps);
7209 foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL, 0);
7210 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL, 0);
7211 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL, 0);
7212 proto_item_set_end(aitem, tvb, foffset);
7215 case 6: /* Printer Definition File */
7216 number_of_items = tvb_get_ntohl(tvb, foffset);
7217 proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items);
7219 for (i = 1 ; i <= number_of_items; i++ )
7221 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Definition %d", i);
7222 atree = proto_item_add_subtree(aitem, ett_ndps);
7223 foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL, 0);
7224 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL, 0);
7225 foffset = ndps_string(tvb, hf_ndps_inf_file_name, atree, foffset, NULL, 0);
7226 proto_item_set_end(aitem, tvb, foffset);
7228 number_of_items = tvb_get_ntohl(tvb, foffset);
7229 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7231 for (i = 1 ; i <= number_of_items; i++ )
7233 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", i);
7234 atree = proto_item_add_subtree(aitem, ett_ndps);
7235 foffset = ndps_string(tvb, hf_ndps_def_file_name, atree, foffset, NULL, 0);
7236 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7237 proto_tree_add_uint(atree, hf_ndps_num_win31_keys, tvb, foffset, 4, number_of_items2);
7238 bitem = proto_tree_add_text(atree, tvb, foffset, 4, "Windows 3.1 Keys");
7239 btree = proto_item_add_subtree(bitem, ett_ndps);
7241 for (i = 1 ; i <= number_of_items2; i++ )
7243 foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL, 0);
7245 proto_item_set_end(bitem, tvb, foffset);
7246 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7247 proto_tree_add_uint(atree, hf_ndps_num_win95_keys, tvb, foffset, 4, number_of_items2);
7248 bitem = proto_tree_add_text(atree, tvb, foffset, 4, "Windows 95 Keys");
7249 btree = proto_item_add_subtree(bitem, ett_ndps);
7251 for (i = 1 ; i <= number_of_items2; i++ )
7253 foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL, 0);
7255 proto_item_set_end(bitem, tvb, foffset);
7256 proto_item_set_end(aitem, tvb, foffset);
7259 case 10: /* Printer Definition File 2 */
7260 foffset = ndps_string(tvb, hf_ndps_def_file_name, ndps_tree, foffset, NULL, 0);
7261 number_of_items = tvb_get_ntohl(tvb, foffset);
7262 proto_tree_add_uint(ndps_tree, hf_os_count, tvb, foffset, 4, number_of_items);
7264 for (i = 1 ; i <= number_of_items; i++ )
7266 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "OS %d", i);
7267 atree = proto_item_add_subtree(aitem, ett_ndps);
7268 proto_tree_add_item(atree, hf_os_type, tvb, foffset, 4, FALSE);
7270 number_of_items2 = tvb_get_ntohl(tvb, foffset);
7271 proto_tree_add_uint(atree, hf_ndps_num_windows_keys, tvb, foffset, 4, number_of_items2);
7273 for (i = 1 ; i <= number_of_items2; i++ )
7275 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Key %d", i);
7276 btree = proto_item_add_subtree(bitem, ett_ndps);
7277 foffset = ndps_string(tvb, hf_ndps_windows_key, btree, foffset, NULL, 0);
7278 proto_item_set_end(bitem, tvb, foffset);
7280 proto_item_set_end(aitem, tvb, foffset);
7283 case 8: /* Generic Type */
7284 case 11: /* Printer Driver Types 2 */
7285 case 13: /* Printer Driver Types Archive */
7286 number_of_items = tvb_get_ntohl(tvb, foffset);
7287 proto_tree_add_uint(ndps_tree, hf_ndps_printer_type_count, tvb, foffset, 4, number_of_items);
7289 for (i = 1 ; i <= number_of_items; i++ )
7291 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Type %d", i);
7292 atree = proto_item_add_subtree(aitem, ett_ndps);
7293 foffset = ndps_string(tvb, hf_ndps_printer_manuf, atree, foffset, NULL, 0);
7294 foffset = ndps_string(tvb, hf_ndps_printer_type, atree, foffset, NULL, 0);
7295 foffset = ndps_string(tvb, hf_ndps_prn_file_name, atree, foffset, NULL, 0);
7296 foffset = ndps_string(tvb, hf_ndps_prn_dir_name, atree, foffset, NULL, 0);
7297 proto_tree_add_item(atree, hf_archive_type, tvb, foffset, 4, FALSE);
7299 proto_tree_add_item(atree, hf_archive_file_size, tvb, foffset, 4, FALSE);
7301 proto_item_set_end(aitem, tvb, foffset);
7304 case 14: /* Languages Available */
7305 number_of_items = tvb_get_ntohl(tvb, foffset);
7306 proto_tree_add_uint(ndps_tree, hf_ndps_language_count, tvb, foffset, 4, number_of_items);
7308 for (i = 1 ; i <= number_of_items; i++ )
7310 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Language %d", i);
7311 atree = proto_item_add_subtree(aitem, ett_ndps);
7312 proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
7314 proto_item_set_end(aitem, tvb, foffset);
7321 case 0x00000006: /* Get Resource File */
7322 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7324 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
7325 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7326 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7330 proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, FALSE);
7332 proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, FALSE);
7334 proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset, -1, FALSE);
7336 case 0x00000007: /* Get Resource File Date */
7337 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7339 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
7340 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7341 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7345 proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, FALSE);
7348 case 0x00000008: /* Get Resource Manager NDS Object Name */
7349 foffset = qualifiedname(tvb, ndps_tree, foffset);
7350 proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
7353 case 0x00000009: /* Get Resource Manager Session Information */
7354 proto_tree_add_item(ndps_tree, hf_ndps_get_resman_session_type, tvb, foffset, 4, FALSE);
7356 proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, FALSE);
7358 foffset = return_code(tvb, pinfo, ndps_tree, foffset);
7360 case 0x0000000a: /* Set Resource Language Context */
7361 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7363 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
7364 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7365 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7369 proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, FALSE);
7376 case 0x06097b: /* Delivery */
7379 case 0x00000001: /* Delivery Bind */
7380 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7382 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
7383 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7385 case 0x00000002: /* Delivery Unbind */
7388 case 0x00000003: /* Delivery Send */
7389 case 0x00000004: /* Delivery Send2 */
7390 proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, FALSE);
7392 if (check_col(pinfo->cinfo, COL_INFO) && tvb_get_ntohl(tvb, foffset-4) != 0)
7393 col_add_fstr(pinfo->cinfo, COL_INFO, "R NDPS - Error");
7394 if (tvb_get_ntohl(tvb, foffset-4) != 0)
7398 number_of_items=tvb_get_ntohl(tvb, foffset);
7399 proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items);
7401 aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Failed Items");
7402 atree = proto_item_add_subtree(aitem, ett_ndps);
7403 for (i = 1 ; i <= number_of_items; i++ )
7405 bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Item %d", i);
7406 btree = proto_item_add_subtree(bitem, ett_ndps);
7407 length=tvb_get_ntohl(tvb, foffset);
7408 length_remaining = tvb_length_remaining(tvb, foffset);
7409 if(length_remaining == -1 || (guint32) length_remaining < length)
7413 proto_tree_add_item(btree, hf_ndps_item_ptr, tvb, foffset, length, FALSE);
7415 proto_item_set_end(bitem, tvb, foffset);
7417 proto_item_set_end(aitem, tvb, foffset);
7430 proto_register_ndps(void)
7432 static hf_register_info hf_ndps[] = {
7433 { &hf_ndps_record_mark,
7434 { "Record Mark", "ndps.record_mark", FT_UINT16, BASE_HEX, NULL, 0x0,
7435 "Record Mark", HFILL }},
7437 { &hf_ndps_packet_type,
7438 { "Packet Type", "ndps.packet_type",
7439 FT_UINT32, BASE_HEX, VALS(ndps_packet_types), 0x0,
7440 "Packet Type", HFILL }},
7443 { "Record Length", "ndps.record_length",
7444 FT_UINT16, BASE_DEC, NULL, 0x0,
7445 "Record Length", HFILL }},
7448 { "Exchange ID", "ndps.xid",
7449 FT_UINT32, BASE_HEX, NULL, 0x0,
7450 "Exchange ID", HFILL }},
7452 { &hf_ndps_rpc_version,
7453 { "RPC Version", "ndps.rpc_version",
7454 FT_UINT32, BASE_HEX, NULL, 0x0,
7455 "RPC Version", HFILL }},
7457 { &hf_spx_ndps_program,
7458 { "NDPS Program Number", "spx.ndps_program",
7459 FT_UINT32, BASE_HEX, VALS(spx_ndps_program_vals), 0x0,
7460 "NDPS Program Number", HFILL }},
7462 { &hf_spx_ndps_version,
7463 { "Program Version", "spx.ndps_version",
7464 FT_UINT32, BASE_DEC, NULL, 0x0,
7465 "Program Version", HFILL }},
7468 { "NDPS Error", "spx.ndps_error",
7469 FT_UINT32, BASE_HEX, NULL, 0x0,
7470 "NDPS Error", HFILL }},
7472 { &hf_spx_ndps_func_print,
7473 { "Print Program", "spx.ndps_func_print",
7474 FT_UINT32, BASE_HEX, VALS(spx_ndps_print_func_vals), 0x0,
7475 "Print Program", HFILL }},
7477 { &hf_spx_ndps_func_notify,
7478 { "Notify Program", "spx.ndps_func_notify",
7479 FT_UINT32, BASE_HEX, VALS(spx_ndps_notify_func_vals), 0x0,
7480 "Notify Program", HFILL }},
7482 { &hf_spx_ndps_func_delivery,
7483 { "Delivery Program", "spx.ndps_func_delivery",
7484 FT_UINT32, BASE_HEX, VALS(spx_ndps_deliver_func_vals), 0x0,
7485 "Delivery Program", HFILL }},
7487 { &hf_spx_ndps_func_registry,
7488 { "Registry Program", "spx.ndps_func_registry",
7489 FT_UINT32, BASE_HEX, VALS(spx_ndps_registry_func_vals), 0x0,
7490 "Registry Program", HFILL }},
7492 { &hf_spx_ndps_func_resman,
7493 { "ResMan Program", "spx.ndps_func_resman",
7494 FT_UINT32, BASE_HEX, VALS(spx_ndps_resman_func_vals), 0x0,
7495 "ResMan Program", HFILL }},
7497 { &hf_spx_ndps_func_broker,
7498 { "Broker Program", "spx.ndps_func_broker",
7499 FT_UINT32, BASE_HEX, VALS(spx_ndps_broker_func_vals), 0x0,
7500 "Broker Program", HFILL }},
7502 { &hf_ndps_num_objects,
7503 { "Number of Objects", "ndps.num_objects",
7504 FT_UINT32, BASE_DEC, NULL, 0x0,
7505 "Number of Objects", HFILL }},
7507 { &hf_ndps_num_attributes,
7508 { "Number of Attributes", "ndps.num_attributes",
7509 FT_UINT32, BASE_DEC, NULL, 0x0,
7510 "Number of Attributes", HFILL }},
7513 { "Server", "ndps.sbuffer",
7514 FT_UINT32, BASE_DEC, NULL, 0x0,
7518 { "Connection", "ndps.rbuffer",
7519 FT_UINT32, BASE_DEC, NULL, 0x0,
7520 "Connection", HFILL }},
7522 { &hf_ndps_user_name,
7523 { "Trustee Name", "ndps.user_name",
7524 FT_STRING, BASE_NONE, NULL, 0x0,
7525 "Trustee Name", HFILL }},
7527 { &hf_ndps_broker_name,
7528 { "Broker Name", "ndps.broker_name",
7529 FT_STRING, BASE_NONE, NULL, 0x0,
7530 "Broker Name", HFILL }},
7532 { &hf_ndps_num_results,
7533 { "Number of Results", "ndps.num_results",
7534 FT_UINT32, BASE_DEC, NULL, 0x0,
7535 "Number of Results", HFILL }},
7537 { &hf_ndps_num_options,
7538 { "Number of Options", "ndps.num_options",
7539 FT_UINT32, BASE_DEC, NULL, 0x0,
7540 "Number of Options", HFILL }},
7542 { &hf_ndps_num_jobs,
7543 { "Number of Jobs", "ndps.num_jobs",
7544 FT_UINT32, BASE_DEC, NULL, 0x0,
7545 "Number of Jobs", HFILL }},
7548 { "Printer Name", "ndps.pa_name",
7549 FT_STRING, BASE_NONE, NULL, 0x0,
7550 "Printer Name", HFILL }},
7553 { "Tree", "ndps.tree",
7554 FT_STRING, BASE_NONE, NULL, 0x0,
7557 { &hf_ndps_reqframe,
7558 { "Request Frame", "ndps.reqframe",
7559 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
7560 "Request Frame", HFILL }},
7562 { &hf_ndps_error_val,
7563 { "Return Status", "ndps.error_val",
7564 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
7565 "Return Status", HFILL }},
7568 { "Object ID", "ndps.object",
7569 FT_UINT32, BASE_HEX, NULL, 0x0,
7570 "Object ID", HFILL }},
7572 { &hf_ndps_cred_type,
7573 { "Credential Type", "ndps.cred_type",
7574 FT_UINT32, BASE_HEX, VALS(ndps_credential_enum), 0x0,
7575 "Credential Type", HFILL }},
7577 { &hf_ndps_server_name,
7578 { "Server Name", "ndps.server_name",
7579 FT_STRING, BASE_DEC, NULL, 0x0,
7580 "Server Name", HFILL }},
7582 { &hf_ndps_connection,
7583 { "Connection", "ndps.connection",
7584 FT_UINT16, BASE_DEC, NULL, 0x0,
7585 "Connection", HFILL }},
7587 { &hf_ndps_ext_error,
7588 { "Extended Error Code", "ndps.ext_error",
7589 FT_UINT32, BASE_HEX, NULL, 0x0,
7590 "Extended Error Code", HFILL }},
7592 { &hf_ndps_auth_null,
7593 { "Auth Null", "ndps.auth_null",
7594 FT_BYTES, BASE_NONE, NULL, 0x0,
7595 "Auth Null", HFILL }},
7597 { &hf_ndps_rpc_accept,
7598 { "RPC Accept or Deny", "ndps.rpc_acc",
7599 FT_UINT32, BASE_HEX, VALS(true_false), 0x0,
7600 "RPC Accept or Deny", HFILL }},
7602 { &hf_ndps_rpc_acc_stat,
7603 { "RPC Accept Status", "ndps.rpc_acc_stat",
7604 FT_UINT32, BASE_HEX, VALS(accept_stat), 0x0,
7605 "RPC Accept Status", HFILL }},
7607 { &hf_ndps_rpc_rej_stat,
7608 { "RPC Reject Status", "ndps.rpc_rej_stat",
7609 FT_UINT32, BASE_HEX, VALS(reject_stat), 0x0,
7610 "RPC Reject Status", HFILL }},
7612 { &hf_ndps_rpc_acc_results,
7613 { "RPC Accept Results", "ndps.rpc_acc_res",
7614 FT_UINT32, BASE_HEX, NULL, 0x0,
7615 "RPC Accept Results", HFILL }},
7617 { &hf_ndps_problem_type,
7618 { "Problem Type", "ndps.rpc_prob_type",
7619 FT_UINT32, BASE_HEX, VALS(error_type_enum), 0x0,
7620 "Problem Type", HFILL }},
7622 { &hf_security_problem_type,
7623 { "Security Problem", "ndps.rpc_sec_prob",
7624 FT_UINT32, BASE_HEX, VALS(security_problem_enum), 0x0,
7625 "Security Problem", HFILL }},
7627 { &hf_service_problem_type,
7628 { "Service Problem", "ndps.rpc_serv_prob",
7629 FT_UINT32, BASE_HEX, VALS(service_problem_enum), 0x0,
7630 "Service Problem", HFILL }},
7632 { &hf_access_problem_type,
7633 { "Access Problem", "ndps.rpc_acc_prob",
7634 FT_UINT32, BASE_HEX, VALS(access_problem_enum), 0x0,
7635 "Access Problem", HFILL }},
7637 { &hf_printer_problem_type,
7638 { "Printer Problem", "ndps.rpc_print_prob",
7639 FT_UINT32, BASE_HEX, VALS(printer_problem_enum), 0x0,
7640 "Printer Problem", HFILL }},
7642 { &hf_selection_problem_type,
7643 { "Selection Problem", "ndps.rpc_sel_prob",
7644 FT_UINT32, BASE_HEX, VALS(selection_problem_enum), 0x0,
7645 "Selection Problem", HFILL }},
7647 { &hf_doc_access_problem_type,
7648 { "Document Access Problem", "ndps.rpc_doc_acc_prob",
7649 FT_UINT32, BASE_HEX, VALS(doc_access_problem_enum), 0x0,
7650 "Document Access Problem", HFILL }},
7652 { &hf_attribute_problem_type,
7653 { "Attribute Problem", "ndps.rpc_attr_prob",
7654 FT_UINT32, BASE_HEX, VALS(attribute_problem_enum), 0x0,
7655 "Attribute Problem", HFILL }},
7657 { &hf_update_problem_type,
7658 { "Update Problem", "ndps.rpc_update_prob",
7659 FT_UINT32, BASE_HEX, VALS(update_problem_enum), 0x0,
7660 "Update Problem", HFILL }},
7663 { "Object ID Type", "ndps.rpc_obj_id_type",
7664 FT_UINT32, BASE_HEX, VALS(obj_identification_enum), 0x0,
7665 "Object ID Type", HFILL }},
7667 { &hf_oid_struct_size,
7668 { "OID Struct Size", "ndps.rpc_oid_struct_size",
7669 FT_UINT16, BASE_DEC, NULL, 0x0,
7670 "OID Struct Size", HFILL }},
7673 { "Object Name", "ndps.ndps_object_name",
7674 FT_STRING, BASE_NONE, NULL, 0x0,
7675 "Object Name", HFILL }},
7677 { &hf_ndps_document_number,
7678 { "Document Number", "ndps.ndps_doc_num",
7679 FT_UINT32, BASE_HEX, NULL, 0x0,
7680 "Document Number", HFILL }},
7682 { &hf_ndps_nameorid,
7683 { "Name or ID Type", "ndps.ndps_nameorid",
7684 FT_UINT32, BASE_HEX, VALS(nameorid_enum), 0x0,
7685 "Name or ID Type", HFILL }},
7687 { &hf_local_object_name,
7688 { "Local Object Name", "ndps.ndps_loc_object_name",
7689 FT_STRING, BASE_NONE, NULL, 0x0,
7690 "Local Object Name", HFILL }},
7693 { "Printer Name", "ndps.ndps_printer_name",
7694 FT_STRING, BASE_NONE, NULL, 0x0,
7695 "Printer Name", HFILL }},
7697 { &hf_ndps_qualified_name,
7698 { "Qualified Name Type", "ndps.ndps_qual_name_type",
7699 FT_UINT32, BASE_HEX, VALS(qualified_name_enum), 0x0,
7700 "Qualified Name Type", HFILL }},
7702 { &hf_ndps_qualified_name2,
7703 { "Qualified Name Type", "ndps.ndps_qual_name_type2",
7704 FT_UINT32, BASE_HEX, VALS(qualified_name_enum2), 0x0,
7705 "Qualified Name Type", HFILL }},
7707 { &hf_ndps_item_count,
7708 { "Number of Items", "ndps.ndps_item_count",
7709 FT_UINT32, BASE_DEC, NULL, 0x0,
7710 "Number of Items", HFILL }},
7712 { &hf_ndps_num_passwords,
7713 { "Number of Passwords", "ndps.num_passwords",
7714 FT_UINT32, BASE_DEC, NULL, 0x0,
7715 "Number of Passwords", HFILL }},
7717 { &hf_ndps_num_servers,
7718 { "Number of Servers", "ndps.num_servers",
7719 FT_UINT32, BASE_DEC, NULL, 0x0,
7720 "Number of Servers", HFILL }},
7722 { &hf_ndps_num_locations,
7723 { "Number of Locations", "ndps.num_locations",
7724 FT_UINT32, BASE_DEC, NULL, 0x0,
7725 "Number of Locations", HFILL }},
7727 { &hf_ndps_num_areas,
7728 { "Number of Areas", "ndps.num_areas",
7729 FT_UINT32, BASE_DEC, NULL, 0x0,
7730 "Number of Areas", HFILL }},
7732 { &hf_ndps_num_address_items,
7733 { "Number of Address Items", "ndps.num_address_items",
7734 FT_UINT32, BASE_DEC, NULL, 0x0,
7735 "Number of Address Items", HFILL }},
7737 { &hf_ndps_num_job_categories,
7738 { "Number of Job Categories", "ndps.num_job_categories",
7739 FT_UINT32, BASE_DEC, NULL, 0x0,
7740 "Number of Job Categories", HFILL }},
7742 { &hf_ndps_num_page_selects,
7743 { "Number of Page Select Items", "ndps.num_page_selects",
7744 FT_UINT32, BASE_DEC, NULL, 0x0,
7745 "Number of Page Select Items", HFILL }},
7747 { &hf_ndps_num_page_informations,
7748 { "Number of Page Information Items", "ndps.num_page_informations",
7749 FT_UINT32, BASE_DEC, NULL, 0x0,
7750 "Number of Page Information Items", HFILL }},
7752 { &hf_ndps_num_names,
7753 { "Number of Names", "ndps.num_names",
7754 FT_UINT32, BASE_DEC, NULL, 0x0,
7755 "Number of Names", HFILL }},
7757 { &hf_ndps_num_categories,
7758 { "Number of Categories", "ndps.num_categories",
7759 FT_UINT32, BASE_DEC, NULL, 0x0,
7760 "Number of Categories", HFILL }},
7762 { &hf_ndps_num_colorants,
7763 { "Number of Colorants", "ndps.num_colorants",
7764 FT_UINT32, BASE_DEC, NULL, 0x0,
7765 "Number of Colorants", HFILL }},
7767 { &hf_ndps_num_events,
7768 { "Number of Events", "ndps.num_events",
7769 FT_UINT32, BASE_DEC, NULL, 0x0,
7770 "Number of Events", HFILL }},
7772 { &hf_ndps_num_args,
7773 { "Number of Arguments", "ndps.num_argss",
7774 FT_UINT32, BASE_DEC, NULL, 0x0,
7775 "Number of Arguments", HFILL }},
7777 { &hf_ndps_num_transfer_methods,
7778 { "Number of Transfer Methods", "ndps.num_transfer_methods",
7779 FT_UINT32, BASE_DEC, NULL, 0x0,
7780 "Number of Transfer Methods", HFILL }},
7782 { &hf_ndps_num_doc_types,
7783 { "Number of Document Types", "ndps.num_doc_types",
7784 FT_UINT32, BASE_DEC, NULL, 0x0,
7785 "Number of Document Types", HFILL }},
7787 { &hf_ndps_num_destinations,
7788 { "Number of Destinations", "ndps.num_destinations",
7789 FT_UINT32, BASE_DEC, NULL, 0x0,
7790 "Number of Destinations", HFILL }},
7792 { &hf_ndps_qualifier,
7793 { "Qualifier", "ndps.ndps_qual",
7794 FT_UINT32, BASE_HEX, NULL, 0x0,
7795 "Qualifier", HFILL }},
7797 { &hf_ndps_lib_error,
7798 { "Lib Error", "ndps.ndps_lib_error",
7799 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
7800 "Lib Error", HFILL }},
7802 { &hf_ndps_other_error,
7803 { "Other Error", "ndps.ndps_other_error",
7804 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
7805 "Other Error", HFILL }},
7807 { &hf_ndps_other_error_2,
7808 { "Other Error 2", "ndps.ndps_other_error_2",
7809 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
7810 "Other Error 2", HFILL }},
7813 { "Session Handle", "ndps.ndps_session",
7814 FT_UINT32, BASE_HEX, NULL, 0x0,
7815 "Session Handle", HFILL }},
7817 { &hf_ndps_abort_flag,
7818 { "Abort?", "ndps.ndps_abort",
7819 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
7822 { &hf_obj_attribute_type,
7823 { "Value Syntax", "ndps.ndps_attrib_type",
7824 FT_UINT32, BASE_HEX, VALS(ndps_attribute_enum), 0x0,
7825 "Value Syntax", HFILL }},
7827 { &hf_ndps_attribute_value,
7828 { "Value", "ndps.attribue_value",
7829 FT_UINT32, BASE_HEX, NULL, 0x0,
7832 { &hf_ndps_lower_range,
7833 { "Lower Range", "ndps.lower_range",
7834 FT_UINT32, BASE_HEX, NULL, 0x0,
7835 "Lower Range", HFILL }},
7837 { &hf_ndps_upper_range,
7838 { "Upper Range", "ndps.upper_range",
7839 FT_UINT32, BASE_HEX, NULL, 0x0,
7840 "Upper Range", HFILL }},
7843 { "Value", "ndps.n64",
7844 FT_BYTES, BASE_NONE, NULL, 0x0,
7847 { &hf_ndps_lower_range_n64,
7848 { "Lower Range", "ndps.lower_range_n64",
7849 FT_BYTES, BASE_NONE, NULL, 0x0,
7850 "Lower Range", HFILL }},
7852 { &hf_ndps_upper_range_n64,
7853 { "Upper Range", "ndps.upper_range_n64",
7854 FT_BYTES, BASE_NONE, NULL, 0x0,
7855 "Upper Range", HFILL }},
7857 { &hf_ndps_attrib_boolean,
7858 { "Value?", "ndps.ndps_attrib_boolean",
7859 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
7862 { &hf_ndps_realization,
7863 { "Realization Type", "ndps.ndps_realization",
7864 FT_UINT32, BASE_HEX, VALS(ndps_realization_enum), 0x0,
7865 "Realization Type", HFILL }},
7867 { &hf_ndps_xdimension_n64,
7868 { "X Dimension", "ndps.xdimension_n64",
7869 FT_BYTES, BASE_NONE, NULL, 0x0,
7870 "X Dimension", HFILL }},
7872 { &hf_ndps_ydimension_n64,
7873 { "Y Dimension", "ndps.xdimension_n64",
7874 FT_BYTES, BASE_NONE, NULL, 0x0,
7875 "Y Dimension", HFILL }},
7877 { &hf_ndps_dim_value,
7878 { "Dimension Value Type", "ndps.ndps_dim_value",
7879 FT_UINT32, BASE_HEX, VALS(ndps_dim_value_enum), 0x0,
7880 "Dimension Value Type", HFILL }},
7882 { &hf_ndps_dim_flag,
7883 { "Dimension Flag", "ndps.ndps_dim_falg",
7884 FT_UINT32, BASE_HEX, NULL, 0x0,
7885 "Dimension Flag", HFILL }},
7887 { &hf_ndps_xydim_value,
7888 { "XY Dimension Value Type", "ndps.ndps_xydim_value",
7889 FT_UINT32, BASE_HEX, VALS(ndps_xydim_value_enum), 0x0,
7890 "XY Dimension Value Type", HFILL }},
7892 { &hf_ndps_location_value,
7893 { "Location Value Type", "ndps.ndps_location_value",
7894 FT_UINT32, BASE_HEX, VALS(ndps_location_value_enum), 0x0,
7895 "Location Value Type", HFILL }},
7897 { &hf_ndps_xmin_n64,
7898 { "Minimum X Dimension", "ndps.xmin_n64",
7899 FT_BYTES, BASE_NONE, NULL, 0x0,
7900 "Minimum X Dimension", HFILL }},
7902 { &hf_ndps_xmax_n64,
7903 { "Maximum X Dimension", "ndps.xmax_n64",
7904 FT_BYTES, BASE_NONE, NULL, 0x0,
7905 "Maximum X Dimension", HFILL }},
7907 { &hf_ndps_ymin_n64,
7908 { "Minimum Y Dimension", "ndps.ymin_n64",
7909 FT_BYTES, BASE_NONE, NULL, 0x0,
7910 "Minimum Y Dimension", HFILL }},
7912 { &hf_ndps_ymax_n64,
7913 { "Maximum Y Dimension", "ndps.ymax_n64",
7914 FT_BYTES, BASE_NONE, NULL, 0x0,
7915 "Maximum Y Dimension", HFILL }},
7917 { &hf_ndps_edge_value,
7918 { "Edge Value", "ndps.ndps_edge_value",
7919 FT_UINT32, BASE_HEX, VALS(ndps_edge_value_enum), 0x0,
7920 "Edge Value", HFILL }},
7922 { &hf_ndps_cardinal_or_oid,
7923 { "Cardinal or OID", "ndps.ndps_car_or_oid",
7924 FT_UINT32, BASE_HEX, VALS(ndps_card_or_oid_enum), 0x0,
7925 "Cardinal or OID", HFILL }},
7927 { &hf_ndps_cardinal_name_or_oid,
7928 { "Cardinal Name or OID", "ndps.ndps_car_name_or_oid",
7929 FT_UINT32, BASE_HEX, VALS(ndps_card_name_or_oid_enum), 0x0,
7930 "Cardinal Name or OID", HFILL }},
7932 { &hf_ndps_integer_or_oid,
7933 { "Integer or OID", "ndps.ndps_integer_or_oid",
7934 FT_UINT32, BASE_HEX, VALS(ndps_integer_or_oid_enum), 0x0,
7935 "Integer or OID", HFILL }},
7937 { &hf_ndps_profile_id,
7938 { "Profile ID", "ndps.ndps_profile_id",
7939 FT_UINT32, BASE_HEX, NULL, 0x0,
7940 "Profile ID", HFILL }},
7942 { &hf_ndps_persistence,
7943 { "Persistence", "ndps.ndps_persistence",
7944 FT_UINT32, BASE_HEX, VALS(ndps_persistence_enum), 0x0,
7945 "Persistence", HFILL }},
7947 { &hf_ndps_language_count,
7948 { "Number of Languages", "ndps.ndps_language_count",
7949 FT_UINT32, BASE_DEC, NULL, 0x0,
7950 "Number of Languages", HFILL }},
7952 { &hf_ndps_language_id,
7953 { "Language ID", "ndps.ndps_lang_id",
7954 FT_UINT32, BASE_HEX, NULL, 0x0,
7955 "Language ID", HFILL }},
7958 { "Address Type", "ndps.ndps_address_type",
7959 FT_UINT32, BASE_HEX, VALS(ndps_address_type_enum), 0x0,
7960 "Address Type", HFILL }},
7963 { "Address", "ndps.ndps_address",
7964 FT_UINT32, BASE_HEX, VALS(ndps_address_enum), 0x0,
7965 "Address", HFILL }},
7967 { &hf_ndps_add_bytes,
7968 { "Address Bytes", "ndps.add_bytes",
7969 FT_BYTES, BASE_NONE, NULL, 0x0,
7970 "Address Bytes", HFILL }},
7972 { &hf_ndps_event_type,
7973 { "Event Type", "ndps.ndps_event_type",
7974 FT_UINT32, BASE_HEX, NULL, 0x0,
7975 "Event Type", HFILL }},
7977 { &hf_ndps_event_object_identifier,
7978 { "Event Object Type", "ndps.ndps_event_object_identifier",
7979 FT_UINT32, BASE_HEX, VALS(ndps_event_object_enum), 0x0,
7980 "Event Object Type", HFILL }},
7982 { &hf_ndps_octet_string,
7983 { "Octet String", "ndps.octet_string",
7984 FT_BYTES, BASE_NONE, NULL, 0x0,
7985 "Octet String", HFILL }},
7988 { "Scope", "ndps.scope",
7989 FT_UINT32, BASE_HEX, NULL, 0x0,
7993 { "Address Length", "ndps.addr_len",
7994 FT_UINT32, BASE_DEC, NULL, 0x0,
7995 "Address Length", HFILL }},
7998 { "IPX Network", "ndps.net",
7999 FT_IPXNET, BASE_NONE, NULL, 0x0,
8003 { "Node", "ndps.node",
8004 FT_ETHER, BASE_NONE, NULL, 0x0,
8008 { "IPX Socket", "ndps.socket",
8009 FT_UINT16, BASE_HEX, NULL, 0x0,
8010 "IPX Socket", HFILL }},
8013 { "IP Port", "ndps.port",
8014 FT_UINT16, BASE_DEC, NULL, 0x0,
8015 "IP Port", HFILL }},
8018 { "IP Address", "ndps.ip",
8019 FT_IPv4, BASE_DEC, NULL, 0x0,
8020 "IP Address", HFILL }},
8022 { &hf_ndps_server_type,
8023 { "NDPS Server Type", "ndps.ndps_server_type",
8024 FT_UINT32, BASE_HEX, VALS(ndps_server_type_enum), 0x0,
8025 "NDPS Server Type", HFILL }},
8027 { &hf_ndps_num_services,
8028 { "Number of Services", "ndps.ndps_num_services",
8029 FT_UINT32, BASE_DEC, NULL, 0x0,
8030 "Number of Services", HFILL }},
8032 { &hf_ndps_service_type,
8033 { "NDPS Service Type", "ndps.ndps_service_type",
8034 FT_UINT32, BASE_HEX, VALS(ndps_service_type_enum), 0x0,
8035 "NDPS Service Type", HFILL }},
8037 { &hf_ndps_service_enabled,
8038 { "Service Enabled?", "ndps.ndps_service_enabled",
8039 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8040 "Service Enabled?", HFILL }},
8042 { &hf_ndps_method_name,
8043 { "Method Name", "ndps.method_name",
8044 FT_STRING, BASE_NONE, NULL, 0x0,
8045 "Method Name", HFILL }},
8047 { &hf_ndps_method_ver,
8048 { "Method Version", "ndps.method_ver",
8049 FT_STRING, BASE_NONE, NULL, 0x0,
8050 "Method Version", HFILL }},
8052 { &hf_ndps_file_name,
8053 { "File Name", "ndps.file_name",
8054 FT_STRING, BASE_NONE, NULL, 0x0,
8055 "File Name", HFILL }},
8057 { &hf_ndps_admin_submit,
8058 { "Admin Submit Flag?", "ndps.admin_submit_flag",
8059 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8060 "Admin Submit Flag?", HFILL }},
8063 { "Object ID", "ndps.oid",
8064 FT_BYTES, BASE_NONE, NULL, 0x0,
8065 "Object ID", HFILL }},
8067 { &hf_ndps_object_op,
8068 { "Operation", "ndps.ndps_object_op",
8069 FT_UINT32, BASE_HEX, VALS(ndps_object_op_enum), 0x0,
8070 "Operation", HFILL }},
8073 { "Answer Time", "ndps.answer_time",
8074 FT_UINT32, BASE_DEC, NULL, 0x0,
8075 "Answer Time", HFILL }},
8077 { &hf_oid_asn1_type,
8078 { "ASN.1 Type", "ndps.asn1_type",
8079 FT_UINT16, BASE_DEC, NULL, 0x0,
8080 "ASN.1 Type", HFILL }},
8082 { &hf_ndps_item_ptr,
8083 { "Item Pointer", "ndps.item_ptr",
8084 FT_BYTES, BASE_DEC, NULL, 0x0,
8085 "Item Pointer", HFILL }},
8088 { "Length", "ndps.ndps_len",
8089 FT_UINT16, BASE_DEC, NULL, 0x0,
8093 { "Limit Encountered", "ndps.ndps_limit_enc",
8094 FT_UINT32, BASE_HEX, VALS(ndps_limit_enc_enum), 0x0,
8095 "Limit Encountered", HFILL }},
8097 { &hf_ndps_delivery_add_count,
8098 { "Number of Delivery Addresses", "ndps.delivery_add_count",
8099 FT_UINT32, BASE_DEC, NULL, 0x0,
8100 "Number of Delivery Addresses", HFILL }},
8102 { &hf_ndps_delivery_add_type,
8103 { "Delivery Address Type", "ndps.ndps_delivery_add_type",
8104 FT_UINT32, BASE_HEX, VALS(ndps_delivery_add_enum), 0x0,
8105 "Delivery Address Type", HFILL }},
8107 { &hf_ndps_criterion_type,
8108 { "Criterion Type", "ndps.ndps_criterion_type",
8109 FT_UINT32, BASE_HEX, VALS(ndps_attribute_enum), 0x0,
8110 "Criterion Type", HFILL }},
8112 { &hf_ndps_num_ignored_attributes,
8113 { "Number of Ignored Attributes", "ndps.num_ignored_attributes",
8114 FT_UINT32, BASE_DEC, NULL, 0x0,
8115 "Number of Ignored Attributes", HFILL }},
8117 { &hf_ndps_ignored_type,
8118 { "Ignored Type", "ndps.ndps_ignored_type",
8119 FT_UINT32, BASE_HEX, VALS(ndps_attribute_enum), 0x0,
8120 "Ignored Type", HFILL }},
8122 { &hf_ndps_num_resources,
8123 { "Number of Resources", "ndps.ndps_num_resources",
8124 FT_UINT32, BASE_DEC, NULL, 0x0,
8125 "Number of Resources", HFILL }},
8127 { &hf_ndps_resource_type,
8128 { "Resource Type", "ndps.ndps_resource_type",
8129 FT_UINT32, BASE_HEX, VALS(ndps_resource_enum), 0x0,
8130 "Resource Type", HFILL }},
8132 { &hf_ndps_identifier_type,
8133 { "Identifier Type", "ndps.ndps_identifier_type",
8134 FT_UINT32, BASE_HEX, VALS(ndps_identifier_enum), 0x0,
8135 "Identifier Type", HFILL }},
8137 { &hf_ndps_page_flag,
8138 { "Page Flag", "ndps.ndps_page_flag",
8139 FT_UINT32, BASE_HEX, NULL, 0x0,
8140 "Page Flag", HFILL }},
8142 { &hf_ndps_media_type,
8143 { "Media Type", "ndps.ndps_media_type",
8144 FT_UINT32, BASE_HEX, VALS(ndps_media_enum), 0x0,
8145 "Media Type", HFILL }},
8147 { &hf_ndps_page_size,
8148 { "Page Size", "ndps.ndps_page_size",
8149 FT_UINT32, BASE_HEX, VALS(ndps_page_size_enum), 0x0,
8150 "Page Size", HFILL }},
8152 { &hf_ndps_direction,
8153 { "Direction", "ndps.ndps_direction",
8154 FT_UINT32, BASE_HEX, VALS(ndps_pres_direction_enum), 0x0,
8155 "Direction", HFILL }},
8157 { &hf_ndps_page_order,
8158 { "Page Order", "ndps.ndps_page_order",
8159 FT_UINT32, BASE_HEX, VALS(ndps_page_order_enum), 0x0,
8160 "Page Order", HFILL }},
8162 { &hf_ndps_medium_size,
8163 { "Medium Size", "ndps.ndps_medium_size",
8164 FT_UINT32, BASE_HEX, VALS(ndps_medium_size_enum), 0x0,
8165 "Medium Size", HFILL }},
8167 { &hf_ndps_long_edge_feeds,
8168 { "Long Edge Feeds?", "ndps.ndps_long_edge_feeds",
8169 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8170 "Long Edge Feeds?", HFILL }},
8172 { &hf_ndps_inc_across_feed,
8173 { "Increment Across Feed", "ndps.inc_across_feed",
8174 FT_BYTES, BASE_NONE, NULL, 0x0,
8175 "Increment Across Feed", HFILL }},
8177 { &hf_ndps_size_inc_in_feed,
8178 { "Size Increment in Feed", "ndps.size_inc_in_feed",
8179 FT_BYTES, BASE_NONE, NULL, 0x0,
8180 "Size Increment in Feed", HFILL }},
8182 { &hf_ndps_page_orientation,
8183 { "Page Orientation", "ndps.ndps_page_orientation",
8184 FT_UINT32, BASE_HEX, VALS(ndps_page_orientation_enum), 0x0,
8185 "Page Orientation", HFILL }},
8187 { &hf_ndps_numbers_up,
8188 { "Numbers Up", "ndps.ndps_numbers_up",
8189 FT_UINT32, BASE_HEX, VALS(ndps_numbers_up_enum), 0x0,
8190 "Numbers Up", HFILL }},
8192 { &hf_ndps_xdimension,
8193 { "X Dimension", "ndps.ndps_xdimension",
8194 FT_UINT32, BASE_HEX, NULL, 0x0,
8195 "X Dimension", HFILL }},
8197 { &hf_ndps_ydimension,
8198 { "Y Dimension", "ndps.ndps_ydimension",
8199 FT_UINT32, BASE_HEX, NULL, 0x0,
8200 "Y Dimension", HFILL }},
8202 { &hf_ndps_state_severity,
8203 { "State Severity", "ndps.ndps_state_severity",
8204 FT_UINT32, BASE_HEX, VALS(ndps_state_severity_enum), 0x0,
8205 "State Severity", HFILL }},
8207 { &hf_ndps_training,
8208 { "Training", "ndps.ndps_training",
8209 FT_UINT32, BASE_HEX, VALS(ndps_training_enum), 0x0,
8210 "Training", HFILL }},
8212 { &hf_ndps_colorant_set,
8213 { "Colorant Set", "ndps.ndps_colorant_set",
8214 FT_UINT32, BASE_HEX, VALS(ndps_colorant_set_enum), 0x0,
8215 "Colorant Set", HFILL }},
8217 { &hf_ndps_card_enum_time,
8218 { "Cardinal, Enum, or Time", "ndps.ndps_card_enum_time",
8219 FT_UINT32, BASE_HEX, VALS(ndps_card_enum_time_enum), 0x0,
8220 "Cardinal, Enum, or Time", HFILL }},
8222 { &hf_ndps_attrs_arg,
8223 { "List Attribute Operation", "ndps.ndps_attrs_arg",
8224 FT_UINT32, BASE_HEX, VALS(ndps_attrs_arg_enum), 0x0,
8225 "List Attribute Operation", HFILL }},
8227 { &hf_ndps_context_len,
8228 { "Context Length", "ndps.context_len",
8229 FT_UINT32, BASE_DEC, NULL, 0x0,
8230 "Context Length", HFILL }},
8233 { "Context", "ndps.context",
8234 FT_BYTES, BASE_NONE, NULL, 0x0,
8235 "Context", HFILL }},
8238 { "Filter Type", "ndps.ndps_filter",
8239 FT_UINT32, BASE_HEX, VALS(ndps_filter_enum), 0x0,
8240 "Filter Type", HFILL }},
8242 { &hf_ndps_item_filter,
8243 { "Filter Item Operation", "ndps.ndps_filter_item",
8244 FT_UINT32, BASE_HEX, VALS(ndps_filter_item_enum), 0x0,
8245 "Filter Item Operation", HFILL }},
8247 { &hf_ndps_substring_match,
8248 { "Substring Match", "ndps.ndps_substring_match",
8249 FT_UINT32, BASE_HEX, VALS(ndps_match_criteria_enum), 0x0,
8250 "Substring Match", HFILL }},
8252 { &hf_ndps_time_limit,
8253 { "Time Limit", "ndps.ndps_time_limit",
8254 FT_UINT32, BASE_DEC, NULL, 0x0,
8255 "Time Limit", HFILL }},
8257 { &hf_ndps_count_limit,
8258 { "Count Limit", "ndps.ndps_count_limit",
8259 FT_UINT32, BASE_DEC, NULL, 0x0,
8260 "Count Limit", HFILL }},
8262 { &hf_ndps_operator,
8263 { "Operator Type", "ndps.ndps_operator",
8264 FT_UINT32, BASE_DEC, VALS(ndps_operator_enum), 0x0,
8265 "Operator Type", HFILL }},
8267 { &hf_ndps_password,
8268 { "Password", "ndps.password",
8269 FT_BYTES, BASE_NONE, NULL, 0x0,
8270 "Password", HFILL }},
8272 { &hf_ndps_retrieve_restrictions,
8273 { "Retrieve Restrictions", "ndps.ndps_ret_restrict",
8274 FT_UINT32, BASE_DEC, NULL, 0x0,
8275 "Retrieve Restrictions", HFILL }},
8277 { &hf_ndps_bind_security_option_count,
8278 { "Number of Bind Security Options", "ndps.ndps_bind_security_count",
8279 FT_UINT32, BASE_DEC, NULL, 0x0,
8280 "Number of Bind Security Options", HFILL }},
8282 { &hf_bind_security,
8283 { "Bind Security Options", "ndps.ndps_bind_security",
8284 FT_UINT32, BASE_DEC, NULL, 0x0,
8285 "Bind Security Options", HFILL }},
8287 { &hf_ndps_max_items,
8288 { "Maximum Items in List", "ndps.ndps_max_items",
8289 FT_UINT32, BASE_DEC, NULL, 0x0,
8290 "Maximum Items in List", HFILL }},
8292 { &hf_ndps_status_flags,
8293 { "Status Flag", "ndps.ndps_status_flags",
8294 FT_UINT32, BASE_DEC, NULL, 0x0,
8295 "Status Flag", HFILL }},
8297 { &hf_ndps_resource_list_type,
8298 { "Resource Type", "ndps.ndps_resource_type",
8299 FT_UINT32, BASE_DEC, VALS(ndps_resource_type_enum), 0x0,
8300 "Resource Type", HFILL }},
8303 { "Number of OSes", "ndps.os_count",
8304 FT_UINT32, BASE_DEC, NULL, 0x0,
8305 "Number of OSes", HFILL }},
8308 { "OS Type", "ndps.os_type",
8309 FT_UINT32, BASE_DEC, VALS(ndps_os_type_enum), 0x0,
8310 "OS Type", HFILL }},
8312 { &hf_ndps_printer_type_count,
8313 { "Number of Printer Types", "ndps.printer_type_count",
8314 FT_UINT32, BASE_DEC, NULL, 0x0,
8315 "Number of Printer Types", HFILL }},
8317 { &hf_ndps_printer_type,
8318 { "Printer Type", "ndps.prn_type",
8319 FT_STRING, BASE_NONE, NULL, 0x0,
8320 "Printer Type", HFILL }},
8322 { &hf_ndps_printer_manuf,
8323 { "Printer Manufacturer", "ndps.prn_manuf",
8324 FT_STRING, BASE_NONE, NULL, 0x0,
8325 "Printer Manufacturer", HFILL }},
8327 { &hf_ndps_inf_file_name,
8328 { "INF File Name", "ndps.inf_file_name",
8329 FT_STRING, BASE_NONE, NULL, 0x0,
8330 "INF File Name", HFILL }},
8332 { &hf_ndps_vendor_dir,
8333 { "Vendor Directory", "ndps.vendor_dir",
8334 FT_STRING, BASE_NONE, NULL, 0x0,
8335 "Vendor Directory", HFILL }},
8338 { "Banner Type", "ndps.banner_type",
8339 FT_UINT32, BASE_DEC, VALS(ndps_banner_type_enum), 0x0,
8340 "Banner Type", HFILL }},
8343 { "Font Type", "ndps.font_type",
8344 FT_UINT32, BASE_DEC, VALS(ndps_font_type_enum), 0x0,
8345 "Font Type", HFILL }},
8348 { "Printer ID", "ndps.printer_id",
8349 FT_BYTES, BASE_NONE, NULL, 0x0,
8350 "Printer ID", HFILL }},
8352 { &hf_ndps_font_name,
8353 { "Font Name", "ndps.font_name",
8354 FT_STRING, BASE_NONE, NULL, 0x0,
8355 "Font Name", HFILL }},
8357 { &hf_ndps_return_code,
8358 { "Return Code", "ndps.ret_code",
8359 FT_UINT32, BASE_HEX, VALS(ndps_error_types), 0x0,
8360 "Return Code", HFILL }},
8362 { &hf_ndps_banner_count,
8363 { "Number of Banners", "ndps.banner_count",
8364 FT_UINT32, BASE_DEC, NULL, 0x0,
8365 "Number of Banners", HFILL }},
8367 { &hf_ndps_banner_name,
8368 { "Banner Name", "ndps.banner_name",
8369 FT_STRING, BASE_NONE, NULL, 0x0,
8370 "Banner Name", HFILL }},
8372 { &hf_ndps_font_type_count,
8373 { "Number of Font Types", "ndps.font_type_count",
8374 FT_UINT32, BASE_DEC, NULL, 0x0,
8375 "Number of Font Types", HFILL }},
8377 { &hf_font_type_name,
8378 { "Font Type Name", "ndps.font_type_name",
8379 FT_STRING, BASE_NONE, NULL, 0x0,
8380 "Font Type Name", HFILL }},
8382 { &hf_ndps_font_file_count,
8383 { "Number of Font Files", "ndps.font_file_count",
8384 FT_UINT32, BASE_DEC, NULL, 0x0,
8385 "Number of Font Files", HFILL }},
8387 { &hf_font_file_name,
8388 { "Font File Name", "ndps.font_file_name",
8389 FT_STRING, BASE_NONE, NULL, 0x0,
8390 "Font File Name", HFILL }},
8392 { &hf_ndps_printer_def_count,
8393 { "Number of Printer Definitions", "ndps.printer_def_count",
8394 FT_UINT32, BASE_DEC, NULL, 0x0,
8395 "Number of Printer Definitions", HFILL }},
8397 { &hf_ndps_prn_file_name,
8398 { "Printer File Name", "ndps.print_file_name",
8399 FT_STRING, BASE_NONE, NULL, 0x0,
8400 "Printer File Name", HFILL }},
8402 { &hf_ndps_prn_dir_name,
8403 { "Printer Directory Name", "ndps.print_dir_name",
8404 FT_STRING, BASE_NONE, NULL, 0x0,
8405 "Printer Directory Name", HFILL }},
8407 { &hf_ndps_def_file_name,
8408 { "Printer Definition Name", "ndps.print_def_name",
8409 FT_STRING, BASE_NONE, NULL, 0x0,
8410 "Printer Definition Name", HFILL }},
8412 { &hf_ndps_num_win31_keys,
8413 { "Number of Windows 3.1 Keys", "ndps.num_win31_keys",
8414 FT_UINT32, BASE_DEC, NULL, 0x0,
8415 "Number of Windows 3.1 Keys", HFILL }},
8417 { &hf_ndps_num_win95_keys,
8418 { "Number of Windows 95 Keys", "ndps.num_win95_keys",
8419 FT_UINT32, BASE_DEC, NULL, 0x0,
8420 "Number of Windows 95 Keys", HFILL }},
8422 { &hf_ndps_num_windows_keys,
8423 { "Number of Windows Keys", "ndps.num_windows_keys",
8424 FT_UINT32, BASE_DEC, NULL, 0x0,
8425 "Number of Windows Keys", HFILL }},
8427 { &hf_ndps_windows_key,
8428 { "Windows Key", "ndps.windows_key",
8429 FT_STRING, BASE_NONE, NULL, 0x0,
8430 "Windows Key", HFILL }},
8433 { "Archive Type", "ndps.archive_type",
8434 FT_UINT32, BASE_DEC, VALS(ndps_archive_enum), 0x0,
8435 "Archive Type", HFILL }},
8437 { &hf_archive_file_size,
8438 { "Archive File Size", "ndps.archive_size",
8439 FT_UINT32, BASE_DEC, NULL, 0x0,
8440 "Archive File Size", HFILL }},
8442 { &hf_ndps_segment_overlap,
8443 { "Segment overlap", "ndps.segment.overlap", FT_BOOLEAN, BASE_NONE,
8444 NULL, 0x0, "Segment overlaps with other segments", HFILL }},
8446 { &hf_ndps_segment_overlap_conflict,
8447 { "Conflicting data in segment overlap", "ndps.segment.overlap.conflict",
8448 FT_BOOLEAN, BASE_NONE,
8449 NULL, 0x0, "Overlapping segments contained conflicting data", HFILL }},
8451 { &hf_ndps_segment_multiple_tails,
8452 { "Multiple tail segments found", "ndps.segment.multipletails",
8453 FT_BOOLEAN, BASE_NONE,
8454 NULL, 0x0, "Several tails were found when desegmenting the packet", HFILL }},
8456 { &hf_ndps_segment_too_long_segment,
8457 { "Segment too long", "ndps.segment.toolongsegment", FT_BOOLEAN, BASE_NONE,
8458 NULL, 0x0, "Segment contained data past end of packet", HFILL }},
8460 { &hf_ndps_segment_error,
8461 {"Desegmentation error", "ndps.segment.error", FT_FRAMENUM, BASE_NONE,
8462 NULL, 0x0, "Desegmentation error due to illegal segments", HFILL }},
8465 { "NDPS Fragment", "ndps.fragment", FT_FRAMENUM, BASE_NONE,
8466 NULL, 0x0, "NDPS Fragment", HFILL }},
8468 { &hf_ndps_segments,
8469 { "NDPS Fragments", "ndps.fragments", FT_NONE, BASE_NONE,
8470 NULL, 0x0, "NDPS Fragments", HFILL }},
8473 { "[Data]", "ndps.data", FT_NONE, BASE_NONE,
8474 NULL, 0x0, "[Data]", HFILL }},
8476 { &hf_get_status_flag,
8477 { "Get Status Flag", "ndps.get_status_flags",
8478 FT_UINT32, BASE_DEC, NULL, 0x0,
8479 "Get Status Flag", HFILL }},
8482 { "Resource Type", "ndps.res_type",
8483 FT_UINT32, BASE_DEC, VALS(ndps_res_type_enum), 0x0,
8484 "Resource Type", HFILL }},
8486 { &hf_file_timestamp,
8487 { "File Time Stamp", "ndps.file_time_stamp",
8488 FT_UINT32, BASE_DEC, NULL, 0x0,
8489 "File Time Stamp", HFILL }},
8492 { "Print Type", "ndps.print_arg",
8493 FT_UINT32, BASE_DEC, VALS(ndps_print_arg_enum), 0x0,
8494 "Print Type", HFILL }},
8497 { "Submission Complete?", "ndps.sub_complete", FT_BOOLEAN, BASE_NONE,
8498 NULL, 0x0, "Submission Complete?", HFILL }},
8501 { "Document Content", "ndps.doc_content",
8502 FT_UINT32, BASE_DEC, VALS(ndps_doc_content_enum), 0x0,
8503 "Document Content", HFILL }},
8505 { &hf_ndps_doc_name,
8506 { "Document Name", "ndps.doc_name",
8507 FT_STRING, BASE_NONE, NULL, 0x0,
8508 "Document Name", HFILL }},
8511 { "Local ID", "ndps.local_id",
8512 FT_UINT32, BASE_DEC, NULL, 0x0,
8513 "Local ID", HFILL }},
8515 { &hf_ndps_included_doc_len,
8516 { "Included Document Length", "ndps.included_doc_len",
8517 FT_UINT32, BASE_DEC, NULL, 0x0,
8518 "Included Document Length", HFILL }},
8520 { &hf_ndps_included_doc,
8521 { "Included Document", "ndps.included_doc",
8522 FT_BYTES, BASE_NONE, NULL, 0x0,
8523 "Included Document", HFILL }},
8525 { &hf_ndps_ref_name,
8526 { "Referenced Document Name", "ndps.ref_doc_name",
8527 FT_STRING, BASE_NONE, NULL, 0x0,
8528 "Referenced Document Name", HFILL }},
8530 { &hf_interrupt_job_type,
8531 { "Interrupt Job Identifier", "ndps.interrupt_job_type",
8532 FT_UINT32, BASE_DEC, VALS(ndps_interrupt_job_enum), 0x0,
8533 "Interrupt Job Identifier", HFILL }},
8535 { &hf_pause_job_type,
8536 { "Pause Job Identifier", "ndps.pause_job_type",
8537 FT_UINT32, BASE_DEC, VALS(ndps_pause_job_enum), 0x0,
8538 "Pause Job Identifier", HFILL }},
8541 { "Force?", "ndps.ndps_force",
8542 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8545 { &hf_resubmit_op_type,
8546 { "Resubmit Operation Type", "ndps.resubmit_op_type",
8547 FT_UINT32, BASE_DEC, VALS(ndps_resubmit_op_enum), 0x0,
8548 "Resubmit Operation Type", HFILL }},
8550 { &hf_shutdown_type,
8551 { "Shutdown Type", "ndps.shutdown_type",
8552 FT_UINT32, BASE_DEC, VALS(ndps_shutdown_enum), 0x0,
8553 "Shutdown Type", HFILL }},
8555 { &hf_ndps_supplier_flag,
8556 { "Supplier Data?", "ndps.supplier_flag",
8557 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8558 "Supplier Data?", HFILL }},
8560 { &hf_ndps_language_flag,
8561 { "Language Data?", "ndps.language_flag",
8562 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8563 "Language Data?", HFILL }},
8565 { &hf_ndps_method_flag,
8566 { "Method Data?", "ndps.method_flag",
8567 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8568 "Method Data?", HFILL }},
8570 { &hf_ndps_delivery_address_flag,
8571 { "Delivery Address Data?", "ndps.delivery_flag",
8572 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8573 "Delivery Address Data?", HFILL }},
8575 { &hf_ndps_list_profiles_type,
8576 { "List Profiles Type", "ndps.ndps_list_profiles_type",
8577 FT_UINT32, BASE_HEX, VALS(ndps_attrs_arg_enum), 0x0,
8578 "List Profiles Type", HFILL }},
8580 { &hf_ndps_list_profiles_choice_type,
8581 { "List Profiles Choice Type", "ndps.ndps_list_profiles_choice_type",
8582 FT_UINT32, BASE_HEX, VALS(ndps_list_profiles_choice_enum), 0x0,
8583 "List Profiles Choice Type", HFILL }},
8585 { &hf_ndps_list_profiles_result_type,
8586 { "List Profiles Result Type", "ndps.ndps_list_profiles_result_type",
8587 FT_UINT32, BASE_HEX, VALS(ndps_list_profiles_result_enum), 0x0,
8588 "List Profiles Result Type", HFILL }},
8590 { &hf_ndps_integer_type_flag,
8591 { "Integer Type Flag", "ndps.ndps_integer_type_flag",
8592 FT_UINT32, BASE_HEX, NULL, 0x0,
8593 "Integer Type Flag", HFILL }},
8595 { &hf_ndps_integer_type_value,
8596 { "Integer Type Value", "ndps.ndps_integer_type_value",
8597 FT_UINT32, BASE_HEX, NULL, 0x0,
8598 "Integer Type Value", HFILL }},
8600 { &hf_ndps_continuation_option,
8601 { "Continuation Option", "ndps.ndps_continuation_option",
8602 FT_BYTES, BASE_HEX, NULL, 0x0,
8603 "Continuation Option", HFILL }},
8605 { &hf_ndps_ds_info_type,
8606 { "DS Info Type", "ndps.ndps_ds_info_type",
8607 FT_UINT32, BASE_HEX, VALS(ndps_ds_info_enum), 0x0,
8608 "DS Info Type", HFILL }},
8611 { "GUID", "ndps.guid",
8612 FT_BYTES, BASE_NONE, NULL, 0x0,
8615 { &hf_ndps_list_services_type,
8616 { "Services Type", "ndps.ndps_list_services_type",
8617 FT_UINT32, BASE_HEX, VALS(ndps_list_services_enum), 0x0,
8618 "Services Type", HFILL }},
8620 { &hf_ndps_item_bytes,
8621 { "Item Ptr", "ndps.item_bytes",
8622 FT_BYTES, BASE_NONE, NULL, 0x0,
8623 "Item Ptr", HFILL }},
8625 { &hf_ndps_certified,
8626 { "Certified", "ndps.certified",
8627 FT_BYTES, BASE_NONE, NULL, 0x0,
8628 "Certified", HFILL }},
8630 { &hf_ndps_attribute_set,
8631 { "Attribute Set", "ndps.attribute_set",
8632 FT_BYTES, BASE_NONE, NULL, 0x0,
8633 "Attribute Set", HFILL }},
8635 { &hf_ndps_data_item_type,
8636 { "Item Type", "ndps.ndps_data_item_type",
8637 FT_UINT32, BASE_HEX, VALS(ndps_data_item_enum), 0x0,
8638 "Item Type", HFILL }},
8641 { "Integer Value", "ndps.info_int",
8642 FT_UINT8, BASE_HEX, NULL, 0x0,
8643 "Integer Value", HFILL }},
8646 { "16 Bit Integer Value", "ndps.info_int16",
8647 FT_UINT16, BASE_HEX, NULL, 0x0,
8648 "16 Bit Integer Value", HFILL }},
8651 { "32 Bit Integer Value", "ndps.info_int32",
8652 FT_UINT32, BASE_HEX, NULL, 0x0,
8653 "32 Bit Integer Value", HFILL }},
8656 { "Boolean Value", "ndps.info_boolean",
8657 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
8658 "Boolean Value", HFILL }},
8661 { "String Value", "ndps.info_string",
8662 FT_STRING, BASE_NONE, NULL, 0x0,
8663 "String Value", HFILL }},
8666 { "Byte Value", "ndps.info_bytes",
8667 FT_BYTES, BASE_NONE, NULL, 0x0,
8668 "Byte Value", HFILL }},
8670 { &hf_ndps_list_local_servers_type,
8671 { "Server Type", "ndps.ndps_list_local_server_type",
8672 FT_UINT32, BASE_HEX, VALS(ndps_list_local_servers_enum), 0x0,
8673 "Server Type", HFILL }},
8675 { &hf_ndps_registry_name,
8676 { "Registry Name", "ndps.registry_name",
8677 FT_STRING, BASE_NONE, NULL, 0x0,
8678 "Registry Name", HFILL }},
8680 { &hf_ndps_client_server_type,
8681 { "Client/Server Type", "ndps.ndps_client_server_type",
8682 FT_UINT32, BASE_HEX, VALS(ndps_client_server_enum), 0x0,
8683 "Client/Server Type", HFILL }},
8685 { &hf_ndps_session_type,
8686 { "Session Type", "ndps.ndps_session_type",
8687 FT_UINT32, BASE_HEX, VALS(ndps_session_type_enum), 0x0,
8688 "Session Type", HFILL }},
8691 { "Time", "ndps.time",
8692 FT_UINT32, BASE_DEC, NULL, 0x0,
8695 { &hf_ndps_supplier_name,
8696 { "Supplier Name", "ndps.supplier_name",
8697 FT_STRING, BASE_NONE, NULL, 0x0,
8698 "Supplier Name", HFILL }},
8701 { "Message", "ndps.message",
8702 FT_STRING, BASE_NONE, NULL, 0x0,
8703 "Message", HFILL }},
8705 { &hf_ndps_delivery_method_count,
8706 { "Number of Delivery Methods", "ndps.delivery_method_count",
8707 FT_UINT32, BASE_DEC, NULL, 0x0,
8708 "Number of Delivery Methods", HFILL }},
8710 { &hf_delivery_method_type,
8711 { "Delivery Method Type", "ndps.delivery_method_type",
8712 FT_UINT32, BASE_HEX, VALS(ndps_delivery_method_enum), 0x0,
8713 "Delivery Method Type", HFILL }},
8715 { &hf_ndps_get_session_type,
8716 { "Session Type", "ndps.ndps_get_session_type",
8717 FT_UINT32, BASE_HEX, VALS(ndps_get_session_type_enum), 0x0,
8718 "Session Type", HFILL }},
8721 { "Packet Count", "ndps.packet_count",
8722 FT_UINT32, BASE_DEC, NULL, 0x0,
8723 "Packet Count", HFILL }},
8725 { &hf_last_packet_flag,
8726 { "Last Packet Flag", "ndps.last_packet_flag",
8727 FT_UINT32, BASE_DEC, NULL, 0x0,
8728 "Last Packet Flag", HFILL }},
8730 { &hf_ndps_get_resman_session_type,
8731 { "Session Type", "ndps.ndps_get_resman_session_type",
8732 FT_UINT32, BASE_HEX, VALS(ndps_get_resman_session_type_enum), 0x0,
8733 "Session Type", HFILL }},
8736 { "Problem Type", "ndps.ndps_get_resman_session_type",
8737 FT_UINT32, BASE_HEX, VALS(problem_type_enum), 0x0,
8738 "Problem Type", HFILL }},
8740 { &hf_ndps_num_values,
8741 { "Number of Values", "ndps.num_values",
8742 FT_UINT32, BASE_DEC, NULL, 0x0,
8743 "Number of Values", HFILL }},
8745 { &hf_ndps_object_ids_7,
8746 { "Object ID Definition", "ndps.objectid_def7",
8747 FT_NONE, BASE_HEX, NULL,
8748 0x0, "Object ID Definition", HFILL }},
8750 { &hf_ndps_object_ids_8,
8751 { "Object ID Definition", "ndps.objectid_def8",
8752 FT_NONE, BASE_HEX, NULL,
8753 0x0, "Object ID Definition", HFILL }},
8755 { &hf_ndps_object_ids_9,
8756 { "Object ID Definition", "ndps.objectid_def9",
8757 FT_NONE, BASE_HEX, NULL,
8758 0x0, "Object ID Definition", HFILL }},
8760 { &hf_ndps_object_ids_10,
8761 { "Object ID Definition", "ndps.objectid_def10",
8762 FT_NONE, BASE_HEX, NULL,
8763 0x0, "Object ID Definition", HFILL }},
8765 { &hf_ndps_object_ids_11,
8766 { "Object ID Definition", "ndps.objectid_def11",
8767 FT_NONE, BASE_HEX, NULL,
8768 0x0, "Object ID Definition", HFILL }},
8770 { &hf_ndps_object_ids_12,
8771 { "Object ID Definition", "ndps.objectid_def12",
8772 FT_NONE, BASE_HEX, NULL,
8773 0x0, "Object ID Definition", HFILL }},
8775 { &hf_ndps_object_ids_13,
8776 { "Object ID Definition", "ndps.objectid_def13",
8777 FT_NONE, BASE_HEX, NULL,
8778 0x0, "Object ID Definition", HFILL }},
8780 { &hf_ndps_object_ids_14,
8781 { "Object ID Definition", "ndps.objectid_def14",
8782 FT_NONE, BASE_HEX, NULL,
8783 0x0, "Object ID Definition", HFILL }},
8785 { &hf_ndps_object_ids_15,
8786 { "Object ID Definition", "ndps.objectid_def15",
8787 FT_NONE, BASE_HEX, NULL,
8788 0x0, "Object ID Definition", HFILL }},
8790 { &hf_ndps_object_ids_16,
8791 { "Object ID Definition", "ndps.objectid_def16",
8792 FT_NONE, BASE_HEX, NULL,
8793 0x0, "Object ID Definition", HFILL }},
8795 { &hf_ndps_attribute_time,
8796 { "Time", "ndps.attribute_time",
8797 FT_ABSOLUTE_TIME, BASE_DEC, NULL, 0x0,
8800 { &hf_print_security,
8801 { "Printer Security", "ndps.print_security",
8802 FT_UINT32, BASE_HEX, VALS(ndps_print_security), 0x0,
8803 "Printer Security", HFILL }},
8805 { &hf_notify_time_interval,
8806 { "Notify Time Interval", "ndps.notify_time_interval",
8807 FT_UINT32, BASE_HEX, NULL, 0x0,
8808 "Notify Time Interval", HFILL }},
8810 { &hf_notify_sequence_number,
8811 { "Notify Sequence Number", "ndps.notify_seq_number",
8812 FT_UINT32, BASE_HEX, NULL, 0x0,
8813 "Notify Sequence Number", HFILL }},
8815 { &hf_notify_lease_exp_time,
8816 { "Notify Lease Expiration Time", "ndps.notify_lease_exp_time",
8817 FT_UINT32, BASE_HEX, NULL, 0x0,
8818 "Notify Lease Expiration Time", HFILL }},
8820 { &hf_notify_printer_uri,
8821 { "Notify Printer URI", "ndps.notify_printer_uri",
8822 FT_STRING, BASE_NONE, NULL, 0x0,
8823 "Notify Printer URI", HFILL }},
8826 { "Level", "ndps.level",
8827 FT_UINT32, BASE_HEX, NULL, 0x0,
8831 { "Interval", "ndps.interval",
8832 FT_UINT32, BASE_HEX, NULL, 0x0,
8833 "Interval", HFILL }},
8836 static gint *ett[] = {
8841 module_t *ndps_module;
8843 proto_ndps = proto_register_protocol("Novell Distributed Print System", "NDPS", "ndps");
8844 proto_register_field_array(proto_ndps, hf_ndps, array_length(hf_ndps));
8845 proto_register_subtree_array(ett, array_length(ett));
8847 ndps_module = prefs_register_protocol(proto_ndps, NULL);
8848 prefs_register_bool_preference(ndps_module, "desegment_tcp",
8849 "Reassemble NDPS messages spanning multiple TCP segments",
8850 "Whether the NDPS dissector should reassemble messages spanning multiple TCP segments."
8851 " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
8853 prefs_register_bool_preference(ndps_module, "desegment_spx",
8854 "Reassemble fragmented NDPS messages spanning multiple SPX packets",
8855 "Whether the NDPS dissector should reassemble fragmented NDPS messages spanning multiple SPX packets",
8857 prefs_register_bool_preference(ndps_module, "show_oid",
8858 "Display NDPS Details",
8859 "Whether or not the NDPS dissector should show object id's and other details",
8862 register_init_routine(&ndps_init_protocol);
8863 register_postseq_cleanup_routine(&ndps_postseq_cleanup);
8867 proto_reg_handoff_ndps(void)
8869 dissector_handle_t ndps_handle, ndps_tcp_handle;
8871 ndps_handle = create_dissector_handle(dissect_ndps_ipx, proto_ndps);
8872 ndps_tcp_handle = create_dissector_handle(dissect_ndps_tcp, proto_ndps);
8874 dissector_add("spx.socket", SPX_SOCKET_PA, ndps_handle);
8875 dissector_add("spx.socket", SPX_SOCKET_BROKER, ndps_handle);
8876 dissector_add("spx.socket", SPX_SOCKET_SRS, ndps_handle);
8877 dissector_add("spx.socket", SPX_SOCKET_ENS, ndps_handle);
8878 dissector_add("spx.socket", SPX_SOCKET_RMS, ndps_handle);
8879 dissector_add("spx.socket", SPX_SOCKET_NOTIFY_LISTENER, ndps_handle);
8880 dissector_add("tcp.port", TCP_PORT_PA, ndps_tcp_handle);
8881 dissector_add("tcp.port", TCP_PORT_BROKER, ndps_tcp_handle);
8882 dissector_add("tcp.port", TCP_PORT_SRS, ndps_tcp_handle);
8883 dissector_add("tcp.port", TCP_PORT_ENS, ndps_tcp_handle);
8884 dissector_add("tcp.port", TCP_PORT_RMS, ndps_tcp_handle);
8885 dissector_add("tcp.port", TCP_PORT_NOTIFY_LISTENER, ndps_tcp_handle);
8886 ndps_data_handle = find_dissector("data");