/src/wireshark/epan/dissectors/packet-ndps.c
Line | Count | Source |
1 | | /* packet-ndps.c |
2 | | * Routines for NetWare's NDPS |
3 | | * Greg Morris <gmorris@novell.com> |
4 | | * Copyright (c) Novell, Inc. 2002-2003 |
5 | | * |
6 | | * Wireshark - Network traffic analyzer |
7 | | * By Gerald Combs <gerald@wireshark.org> |
8 | | * Copyright 1998 Gerald Combs |
9 | | * |
10 | | * SPDX-License-Identifier: GPL-2.0-or-later |
11 | | */ |
12 | | |
13 | | #include "config.h" |
14 | | |
15 | | #include <epan/packet.h> |
16 | | #include <epan/exceptions.h> |
17 | | #include <epan/prefs.h> |
18 | | #include <epan/reassemble.h> |
19 | | #include <epan/expert.h> |
20 | | #include <epan/strutil.h> |
21 | | #include <epan/proto_data.h> |
22 | | #include <epan/wmem_scopes.h> |
23 | | |
24 | | #include "packet-ipx.h" |
25 | | #include "packet-tcp.h" |
26 | | #include "packet-ndps.h" |
27 | | |
28 | | void proto_register_ndps(void); |
29 | | void proto_reg_handoff_ndps(void); |
30 | | |
31 | | static dissector_handle_t ndps_handle, ndps_tcp_handle; |
32 | | |
33 | | /* Limit the number of items we can add to the tree. */ |
34 | 0 | #define NDPS_MAX_ITEMS 100 |
35 | | |
36 | | /* Table for reassembly of fragments. */ |
37 | | static reassembly_table ndps_reassembly_table; |
38 | | |
39 | | /* desegmentation of ndps */ |
40 | | static bool ndps_defragment = true; |
41 | | |
42 | | static uint32_t tid = 1; |
43 | | |
44 | | /* Show ID's value */ |
45 | | static bool ndps_show_oids=false; |
46 | | |
47 | | /* Global Attribute for evaluation of Values */ |
48 | | static const char *global_attribute_name; |
49 | | |
50 | | static unsigned dissect_ndps_request(tvbuff_t*, packet_info*, proto_tree*, uint32_t, uint32_t, unsigned); |
51 | | |
52 | | static unsigned dissect_ndps_reply(tvbuff_t *, packet_info*, proto_tree*, unsigned); |
53 | | |
54 | | static int hf_ndps_segments; |
55 | | static int hf_ndps_segment; |
56 | | static int hf_ndps_segment_overlap; |
57 | | static int hf_ndps_segment_overlap_conflict; |
58 | | static int hf_ndps_segment_multiple_tails; |
59 | | static int hf_ndps_segment_too_long_segment; |
60 | | static int hf_ndps_segment_error; |
61 | | static int hf_ndps_segment_count; |
62 | | static int hf_ndps_reassembled_length; |
63 | | |
64 | | static int ett_ndps_segments; |
65 | | static int ett_ndps_segment; |
66 | | |
67 | | static int proto_ndps; |
68 | | static int hf_ndps_record_mark; |
69 | | static int hf_ndps_length; |
70 | | static int hf_ndps_xid; |
71 | | static int hf_ndps_packet_type; |
72 | | static int hf_ndps_rpc_version; |
73 | | /* static int hf_ndps_error; */ |
74 | | static int hf_ndps_num_objects; |
75 | | static int hf_ndps_num_attributes; |
76 | | /* static int hf_ndps_sbuffer; */ |
77 | | /* static int hf_ndps_rbuffer; */ |
78 | | static int hf_ndps_user_name; |
79 | | static int hf_ndps_broker_name; |
80 | | static int hf_ndps_num_results; |
81 | | static int hf_ndps_num_options; |
82 | | static int hf_ndps_num_jobs; |
83 | | static int hf_ndps_pa_name; |
84 | | static int hf_ndps_tree; |
85 | | static int hf_ndps_reqframe; |
86 | | static int hf_ndps_error_val; |
87 | | static int hf_ndps_ext_error; |
88 | | static int hf_ndps_object; |
89 | | static int hf_ndps_cred_type; |
90 | | static int hf_ndps_server_name; |
91 | | static int hf_ndps_connection; |
92 | | static int hf_ndps_auth_null; |
93 | | static int hf_ndps_rpc_accept; |
94 | | static int hf_ndps_rpc_acc_stat; |
95 | | static int hf_ndps_rpc_rej_stat; |
96 | | static int hf_ndps_rpc_acc_results; |
97 | | static int hf_ndps_problem_type; |
98 | | static int hf_security_problem_type; |
99 | | static int hf_service_problem_type; |
100 | | static int hf_access_problem_type; |
101 | | static int hf_printer_problem_type; |
102 | | static int hf_selection_problem_type; |
103 | | static int hf_doc_access_problem_type; |
104 | | static int hf_attribute_problem_type; |
105 | | static int hf_update_problem_type; |
106 | | static int hf_obj_id_type; |
107 | | static int hf_oid_struct_size; |
108 | | static int hf_object_name; |
109 | | static int hf_ndps_document_number; |
110 | | static int hf_ndps_nameorid; |
111 | | static int hf_ndps_local_object_name; |
112 | | static int hf_ndps_printer_name; |
113 | | static int hf_ndps_qualified_name; |
114 | | static int hf_ndps_item_count; |
115 | | static int hf_ndps_num_passwords; |
116 | | static int hf_ndps_num_servers; |
117 | | static int hf_ndps_num_locations; |
118 | | static int hf_ndps_num_areas; |
119 | | static int hf_ndps_num_address_items; |
120 | | static int hf_ndps_num_job_categories; |
121 | | static int hf_ndps_num_page_selects; |
122 | | static int hf_ndps_num_page_informations; |
123 | | static int hf_ndps_num_names; |
124 | | static int hf_ndps_num_categories; |
125 | | static int hf_ndps_num_colorants; |
126 | | static int hf_ndps_num_events; |
127 | | static int hf_ndps_num_args; |
128 | | static int hf_ndps_num_transfer_methods; |
129 | | static int hf_ndps_num_doc_types; |
130 | | static int hf_ndps_num_destinations; |
131 | | static int hf_ndps_qualifier; |
132 | | static int hf_ndps_lib_error; |
133 | | static int hf_ndps_other_error; |
134 | | static int hf_ndps_other_error_2; |
135 | | static int hf_ndps_session; |
136 | | static int hf_ndps_abort_flag; |
137 | | static int hf_ndps_obj_attribute_type; |
138 | | static int hf_ndps_attribute_value; |
139 | | static int hf_ndps_lower_range; |
140 | | static int hf_ndps_upper_range; |
141 | | static int hf_ndps_n64; |
142 | | static int hf_ndps_lower_range_n64; |
143 | | static int hf_ndps_upper_range_n64; |
144 | | static int hf_ndps_attrib_boolean; |
145 | | static int hf_ndps_realization; |
146 | | static int hf_ndps_xdimension_n64; |
147 | | static int hf_ndps_ydimension_n64; |
148 | | static int hf_ndps_dim_value; |
149 | | static int hf_ndps_dim_flag; |
150 | | static int hf_ndps_xydim_value; |
151 | | static int hf_ndps_location_value; |
152 | | static int hf_ndps_xmin_n64; |
153 | | static int hf_ndps_xmax_n64; |
154 | | static int hf_ndps_ymin_n64; |
155 | | static int hf_ndps_ymax_n64; |
156 | | static int hf_ndps_edge_value; |
157 | | static int hf_ndps_cardinal_or_oid; |
158 | | static int hf_ndps_cardinal_name_or_oid; |
159 | | static int hf_ndps_integer_or_oid; |
160 | | static int hf_ndps_profile_id; |
161 | | static int hf_ndps_persistence; |
162 | | static int hf_ndps_language_count; |
163 | | static int hf_ndps_language_id; |
164 | | static int hf_address_type; |
165 | | static int hf_ndps_address; |
166 | | static int hf_ndps_add_bytes; |
167 | | static int hf_ndps_event_type; |
168 | | static int hf_ndps_event_object_identifier; |
169 | | static int hf_ndps_octet_string; |
170 | | static int hf_ndps_scope; |
171 | | static int hf_address_len; |
172 | | static int hf_ndps_net; |
173 | | static int hf_ndps_node; |
174 | | static int hf_ndps_socket; |
175 | | static int hf_ndps_port; |
176 | | static int hf_ndps_ip; |
177 | | static int hf_ndps_server_type; |
178 | | static int hf_ndps_num_services; |
179 | | static int hf_ndps_service_type; |
180 | | static int hf_ndps_service_enabled; |
181 | | static int hf_ndps_method_name; |
182 | | static int hf_ndps_method_ver; |
183 | | static int hf_ndps_file_name; |
184 | | static int hf_ndps_admin_submit; |
185 | | static int hf_ndps_oid; |
186 | | static int hf_ndps_object_op; |
187 | | static int hf_answer_time; |
188 | | static int hf_oid_asn1_type; |
189 | | static int hf_ndps_item_ptr; |
190 | | static int hf_ndps_len; |
191 | | static int hf_ndps_limit_enc; |
192 | | static int hf_ndps_delivery_add_count; |
193 | | /* static int hf_ndps_qualified_name2; */ |
194 | | static int hf_ndps_delivery_add_type; |
195 | | static int hf_ndps_criterion_type; |
196 | | static int hf_ndps_num_ignored_attributes; |
197 | | static int hf_ndps_ignored_type; |
198 | | static int hf_ndps_num_resources; |
199 | | static int hf_ndps_resource_type; |
200 | | static int hf_ndps_identifier_type; |
201 | | static int hf_ndps_page_flag; |
202 | | static int hf_ndps_media_type; |
203 | | static int hf_ndps_doc_content; |
204 | | static int hf_ndps_page_size; |
205 | | static int hf_ndps_direction; |
206 | | static int hf_ndps_page_order; |
207 | | static int hf_ndps_medium_size; |
208 | | static int hf_ndps_long_edge_feeds; |
209 | | static int hf_ndps_inc_across_feed; |
210 | | static int hf_ndps_size_inc_in_feed; |
211 | | static int hf_ndps_page_orientation; |
212 | | static int hf_ndps_numbers_up; |
213 | | static int hf_ndps_xdimension; |
214 | | static int hf_ndps_ydimension; |
215 | | static int hf_ndps_state_severity; |
216 | | static int hf_ndps_training; |
217 | | static int hf_ndps_colorant_set; |
218 | | static int hf_ndps_card_enum_time; |
219 | | static int hf_ndps_attrs_arg; |
220 | | static int hf_ndps_context_len; |
221 | | static int hf_ndps_context; |
222 | | static int hf_ndps_filter; |
223 | | /* static int hf_ndps_item_filter; */ |
224 | | /* static int hf_ndps_substring_match; */ |
225 | | static int hf_ndps_time_limit; |
226 | | static int hf_ndps_count_limit; |
227 | | static int hf_ndps_operator; |
228 | | static int hf_ndps_password; |
229 | | static int hf_ndps_retrieve_restrictions; |
230 | | static int hf_ndps_bind_security_option_count; |
231 | | static int hf_bind_security; |
232 | | static int hf_ndps_max_items; |
233 | | static int hf_ndps_status_flags; |
234 | | static int hf_ndps_resource_list_type; |
235 | | static int hf_os_count; |
236 | | static int hf_os_type; |
237 | | static int hf_ndps_printer_type_count; |
238 | | static int hf_ndps_printer_type; |
239 | | static int hf_ndps_printer_manuf; |
240 | | static int hf_ndps_inf_file_name; |
241 | | static int hf_ndps_vendor_dir; |
242 | | static int hf_banner_type; |
243 | | static int hf_font_type; |
244 | | static int hf_printer_id; |
245 | | static int hf_ndps_font_name; |
246 | | static int hf_ndps_return_code; |
247 | | /* static int hf_ndps_banner_count; */ |
248 | | static int hf_ndps_banner_name; |
249 | | static int hf_ndps_font_type_count; |
250 | | static int hf_font_type_name; |
251 | | static int hf_ndps_font_file_count; |
252 | | static int hf_font_file_name; |
253 | | static int hf_ndps_printer_def_count; |
254 | | static int hf_ndps_prn_file_name; |
255 | | static int hf_ndps_prn_dir_name; |
256 | | static int hf_ndps_def_file_name; |
257 | | static int hf_ndps_num_win31_keys; |
258 | | static int hf_ndps_num_win95_keys; |
259 | | static int hf_ndps_num_windows_keys; |
260 | | static int hf_ndps_windows_key; |
261 | | static int hf_archive_type; |
262 | | static int hf_archive_file_size; |
263 | | static int hf_ndps_data; |
264 | | static int hf_get_status_flag; |
265 | | static int hf_res_type; |
266 | | static int hf_file_timestamp; |
267 | | static int hf_sub_complete; |
268 | | static int hf_doc_content; |
269 | | /* static int hf_ndps_doc_name; */ |
270 | | static int hf_print_arg; |
271 | | static int hf_local_id; |
272 | | static int hf_ndps_included_doc_len; |
273 | | static int hf_ndps_included_doc; |
274 | | static int hf_ndps_ref_name; |
275 | | static int hf_interrupt_job_type; |
276 | | static int hf_pause_job_type; |
277 | | static int hf_ndps_force; |
278 | | static int hf_resubmit_op_type; |
279 | | static int hf_shutdown_type; |
280 | | static int hf_ndps_supplier_flag; |
281 | | static int hf_ndps_language_flag; |
282 | | static int hf_ndps_method_flag; |
283 | | static int hf_ndps_delivery_address_flag; |
284 | | static int hf_ndps_list_profiles_type; |
285 | | static int hf_ndps_list_profiles_choice_type; |
286 | | static int hf_ndps_list_profiles_result_type; |
287 | | static int hf_ndps_integer_type_flag; |
288 | | static int hf_ndps_integer_type_value; |
289 | | static int hf_ndps_continuation_option; |
290 | | static int hf_ndps_ds_info_type; |
291 | | static int hf_ndps_guid; |
292 | | static int hf_ndps_list_services_type; |
293 | | static int hf_ndps_item_bytes; |
294 | | static int hf_ndps_certified; |
295 | | static int hf_ndps_attribute_set; |
296 | | static int hf_ndps_data_item_type; |
297 | | static int hf_info_int; |
298 | | static int hf_info_int16; |
299 | | static int hf_info_int32; |
300 | | static int hf_info_boolean; |
301 | | static int hf_info_string; |
302 | | /* static int hf_info_bytes; */ |
303 | | static int hf_ndps_list_local_servers_type; |
304 | | static int hf_ndps_registry_name; |
305 | | static int hf_ndps_client_server_type; |
306 | | static int hf_ndps_session_type; |
307 | | static int hf_time; |
308 | | static int hf_ndps_supplier_name; |
309 | | static int hf_ndps_message; |
310 | | static int hf_ndps_delivery_method_count; |
311 | | static int hf_delivery_method_type; |
312 | | static int hf_ndps_get_session_type; |
313 | | static int hf_packet_count; |
314 | | static int hf_last_packet_flag; |
315 | | static int hf_ndps_get_resman_session_type; |
316 | | static int hf_problem_type; |
317 | | static int hf_ndps_num_values; |
318 | | static int hf_ndps_object_ids_7; |
319 | | static int hf_ndps_object_ids_8; |
320 | | static int hf_ndps_object_ids_9; |
321 | | static int hf_ndps_object_ids_10; |
322 | | static int hf_ndps_object_ids_11; |
323 | | static int hf_ndps_object_ids_12; |
324 | | static int hf_ndps_object_ids_13; |
325 | | static int hf_ndps_object_ids_14; |
326 | | static int hf_ndps_object_ids_15; |
327 | | static int hf_ndps_object_ids_16; |
328 | | /* static int hf_ndps_attribute_time; */ |
329 | | static int hf_print_security; |
330 | | static int hf_notify_time_interval; |
331 | | static int hf_notify_sequence_number; |
332 | | static int hf_notify_lease_exp_time; |
333 | | static int hf_notify_printer_uri; |
334 | | static int hf_level; |
335 | | static int hf_interval; |
336 | | static int hf_ndps_other_error_string; |
337 | | |
338 | | static int hf_spx_ndps_program; |
339 | | static int hf_spx_ndps_version; |
340 | | static int hf_spx_ndps_func_print; |
341 | | static int hf_spx_ndps_func_registry; |
342 | | static int hf_spx_ndps_func_notify; |
343 | | static int hf_spx_ndps_func_resman; |
344 | | static int hf_spx_ndps_func_delivery; |
345 | | static int hf_spx_ndps_func_broker; |
346 | | |
347 | | static int ett_ndps; |
348 | | |
349 | | static expert_field ei_ndps_problem_type; |
350 | | static expert_field ei_ndps_return_code; |
351 | | static expert_field ei_ndps_rpc_acc_stat; |
352 | | static expert_field ei_ndps_truncated; |
353 | | |
354 | | |
355 | | /* desegmentation of NDPS over TCP */ |
356 | | static bool ndps_desegment = true; |
357 | | |
358 | | static const value_string true_false[] = { |
359 | | { 0x00000000, "Accept" }, |
360 | | { 0x00000001, "Deny" }, |
361 | | { 0, NULL } |
362 | | }; |
363 | | |
364 | | static const value_string ndps_limit_enc_enum[] = { |
365 | | { 0x00000000, "Time" }, |
366 | | { 0x00000001, "Count" }, |
367 | | { 0x00000002, "Error" }, |
368 | | { 0, NULL } |
369 | | }; |
370 | | |
371 | | static const value_string problem_type_enum[] = { |
372 | | { 0x00000000, "Standard" }, |
373 | | { 0x00000001, "Extended" }, |
374 | | { 0, NULL } |
375 | | }; |
376 | | |
377 | | static const value_string accept_stat[] = { |
378 | | { 0x00000000, "Success" }, |
379 | | { 0x00000001, "Program Unavailable" }, |
380 | | { 0x00000002, "Program Mismatch" }, |
381 | | { 0x00000003, "Procedure Unavailable" }, |
382 | | { 0x00000004, "Garbage Arguments" }, |
383 | | { 0x00000005, "System Error" }, |
384 | | { 0, NULL } |
385 | | }; |
386 | | |
387 | | static const value_string reject_stat[] = { |
388 | | { 0x00000000, "RPC Mismatch" }, |
389 | | { 0x00000001, "Authentication Error" }, |
390 | | { 0, NULL } |
391 | | }; |
392 | | |
393 | | static const value_string error_type_enum[] = { |
394 | | { 0x00000000, "Security Error" }, |
395 | | { 0x00000001, "Service Error" }, |
396 | | { 0x00000002, "Access Error" }, |
397 | | { 0x00000003, "Printer Error" }, |
398 | | { 0x00000004, "Selection Error" }, |
399 | | { 0x00000005, "Document Access Error" }, |
400 | | { 0x00000006, "Attribute Error" }, |
401 | | { 0x00000007, "Update Error" }, |
402 | | { 0, NULL } |
403 | | }; |
404 | | |
405 | | static const value_string security_problem_enum[] = { |
406 | | { 0x00000000, "Authentication" }, |
407 | | { 0x00000001, "Credentials" }, |
408 | | { 0x00000002, "Rights" }, |
409 | | { 0x00000003, "Invalid PAC" }, |
410 | | { 0, NULL } |
411 | | }; |
412 | | |
413 | | static const value_string service_problem_enum[] = { |
414 | | { 0x00000000, "Sever Busy" }, |
415 | | { 0x00000001, "Server Unavailable" }, |
416 | | { 0x00000002, "Complex Operation" }, |
417 | | { 0x00000003, "Resource Limit" }, |
418 | | { 0x00000004, "Unclassified Server Error" }, |
419 | | { 0x00000005, "Too Many Items in List" }, |
420 | | { 0x00000006, "Resource not Available" }, |
421 | | { 0x00000007, "Cancel Document Support" }, |
422 | | { 0x00000008, "Modify Document Support" }, |
423 | | { 0x00000009, "Multiple Document Support" }, |
424 | | { 0x0000000a, "Parameter Valid Support" }, |
425 | | { 0x0000000b, "Invalid Checkpoint" }, |
426 | | { 0x0000000c, "Continuation Context" }, |
427 | | { 0x0000000d, "Pause Limit Exceeded" }, |
428 | | { 0x0000000e, "Unsupported Operation" }, |
429 | | { 0x0000000f, "Notify Service Error" }, |
430 | | { 0x00000010, "Accounting Service Error" }, |
431 | | { 0, NULL } |
432 | | }; |
433 | | static value_string_ext service_problem_enum_ext = VALUE_STRING_EXT_INIT(service_problem_enum); |
434 | | |
435 | | static const value_string access_problem_enum[] = { |
436 | | { 0x00000000, "Wrong Object Class" }, |
437 | | { 0x00000001, "Lack of Access Rights" }, |
438 | | { 0x00000002, "Can't Interrupt Job" }, |
439 | | { 0x00000003, "Wrong Object State" }, |
440 | | { 0x00000004, "Client Not Bound" }, |
441 | | { 0x00000005, "Not Available" }, |
442 | | { 0x00000006, "Notify Service Not Connected" }, |
443 | | { 0x00000007, "PDS Not Connected" }, |
444 | | { 0, NULL } |
445 | | }; |
446 | | |
447 | | static const value_string printer_problem_enum[] = { |
448 | | { 0x00000000, "Printer Error" }, |
449 | | { 0x00000001, "Printer Needs Attention" }, |
450 | | { 0x00000002, "Printer Needs Key Operator" }, |
451 | | { 0, NULL } |
452 | | }; |
453 | | |
454 | | static const value_string selection_problem_enum[] = { |
455 | | { 0x00000000, "Invalid ID" }, |
456 | | { 0x00000001, "Unknown ID" }, |
457 | | { 0x00000002, "Object Exists" }, |
458 | | { 0x00000003, "ID Changed" }, |
459 | | { 0, NULL } |
460 | | }; |
461 | | |
462 | | static const value_string doc_access_problem_enum[] = { |
463 | | { 0x00000000, "Access Not Available" }, |
464 | | { 0x00000001, "Time Expired" }, |
465 | | { 0x00000002, "Access Denied" }, |
466 | | { 0x00000003, "Unknown Document" }, |
467 | | { 0x00000004, "No Documents in Job" }, |
468 | | { 0, NULL } |
469 | | }; |
470 | | |
471 | | static const value_string attribute_problem_enum[] = { |
472 | | { 0x00000000, "Invalid Syntax" }, |
473 | | { 0x00000001, "Undefined Type" }, |
474 | | { 0x00000002, "Wrong Matching" }, |
475 | | { 0x00000003, "Constraint Violated" }, |
476 | | { 0x00000004, "Unsupported Type" }, |
477 | | { 0x00000005, "Illegal Modification" }, |
478 | | { 0x00000006, "Consists With Other Attribute" }, |
479 | | { 0x00000007, "Undefined Attribute Value" }, |
480 | | { 0x00000008, "Unsupported Value" }, |
481 | | { 0x00000009, "Invalid Noncompulsed Modification" }, |
482 | | { 0x0000000a, "Per Job Inadmissible" }, |
483 | | { 0x0000000b, "Not Multivalued" }, |
484 | | { 0x0000000c, "Mandatory Omitted" }, |
485 | | { 0x0000000d, "Illegal For Class" }, |
486 | | { 0, NULL } |
487 | | }; |
488 | | static value_string_ext attribute_problem_enum_ext = VALUE_STRING_EXT_INIT(attribute_problem_enum); |
489 | | |
490 | | static const value_string update_problem_enum[] = { |
491 | | { 0x00000000, "No Modifications Allowed" }, |
492 | | { 0x00000001, "Insufficient Rights" }, |
493 | | { 0x00000002, "Previous Operation Incomplete" }, |
494 | | { 0x00000003, "Cancel Not Possible" }, |
495 | | { 0, NULL } |
496 | | }; |
497 | | |
498 | | static const value_string obj_identification_enum[] = { |
499 | | { 0x00000000, "Printer Contained Object ID" }, |
500 | | { 0x00000001, "Document Identifier" }, |
501 | | { 0x00000002, "Object Identifier" }, |
502 | | { 0x00000003, "Object Name" }, |
503 | | { 0x00000004, "Name or Object ID" }, |
504 | | { 0x00000005, "Simple Name" }, |
505 | | { 0x00000006, "Printer Configuration Object ID" }, |
506 | | { 0x00000007, "Qualified Name" }, |
507 | | { 0x00000008, "Event Object ID" }, |
508 | | { 0, NULL } |
509 | | }; |
510 | | |
511 | | static const value_string nameorid_enum[] = { |
512 | | { 0x00000000, "None" }, |
513 | | { 0x00000001, "Global" }, |
514 | | { 0x00000002, "Local" }, |
515 | | { 0, NULL } |
516 | | }; |
517 | | |
518 | | static const value_string qualified_name_enum[] = { |
519 | | { 0x00000000, "None" }, |
520 | | { 0x00000001, "Simple" }, |
521 | | { 0x00000002, "NDS" }, |
522 | | { 0, NULL } |
523 | | }; |
524 | | |
525 | | #if 0 |
526 | | static const value_string qualified_name_enum2[] = { |
527 | | { 0x00000000, "NDS" }, |
528 | | { 0, NULL } |
529 | | }; |
530 | | #endif |
531 | | |
532 | | static const value_string spx_ndps_program_vals[] = { |
533 | | { 0x00060976, "Print Program" }, |
534 | | { 0x00060977, "Broker Program" }, |
535 | | { 0x00060978, "Registry Program" }, |
536 | | { 0x00060979, "Notify Program" }, |
537 | | { 0x0006097a, "Resource Manager Program" }, |
538 | | { 0x0006097b, "Programmatic Delivery Program" }, |
539 | | { 0, NULL } |
540 | | }; |
541 | | |
542 | | static const value_string spx_ndps_print_func_vals[] = { |
543 | | { 0x00000000, "None" }, |
544 | | { 0x00000001, "Bind PSM" }, |
545 | | { 0x00000002, "Bind PA" }, |
546 | | { 0x00000003, "Unbind" }, |
547 | | { 0x00000004, "Print" }, |
548 | | { 0x00000005, "Modify Job" }, |
549 | | { 0x00000006, "Cancel Job" }, |
550 | | { 0x00000007, "List Object Attributes" }, |
551 | | { 0x00000008, "Promote Job" }, |
552 | | { 0x00000009, "Interrupt" }, |
553 | | { 0x0000000a, "Pause" }, |
554 | | { 0x0000000b, "Resume" }, |
555 | | { 0x0000000c, "Clean" }, |
556 | | { 0x0000000d, "Create" }, |
557 | | { 0x0000000e, "Delete" }, |
558 | | { 0x0000000f, "Disable PA" }, |
559 | | { 0x00000010, "Enable PA" }, |
560 | | { 0x00000011, "Resubmit Jobs" }, |
561 | | { 0x00000012, "Set" }, |
562 | | { 0x00000013, "Shutdown PA" }, |
563 | | { 0x00000014, "Startup PA" }, |
564 | | { 0x00000015, "Reorder Job" }, |
565 | | { 0x00000016, "Pause PA" }, |
566 | | { 0x00000017, "Resume PA" }, |
567 | | { 0x00000018, "Transfer Data" }, |
568 | | { 0x00000019, "Device Control" }, |
569 | | { 0x0000001a, "Add Event Profile" }, |
570 | | { 0x0000001b, "Remove Event Profile" }, |
571 | | { 0x0000001c, "Modify Event Profile" }, |
572 | | { 0x0000001d, "List Event Profiles" }, |
573 | | { 0x0000001e, "Shutdown PSM" }, |
574 | | { 0x0000001f, "Cancel PSM Shutdown" }, |
575 | | { 0x00000020, "Set Printer DS Information" }, |
576 | | { 0x00000021, "Clean User Jobs" }, |
577 | | { 0x00000022, "Map GUID to NDS Name" }, |
578 | | { 0x00000023, "Add Event Profile 2" }, |
579 | | { 0x00000024, "List Event Profile 2" }, |
580 | | { 0, NULL } |
581 | | }; |
582 | | static value_string_ext spx_ndps_print_func_vals_ext = VALUE_STRING_EXT_INIT(spx_ndps_print_func_vals); |
583 | | |
584 | | static const value_string spx_ndps_notify_func_vals[] = { |
585 | | { 0x00000000, "None" }, |
586 | | { 0x00000001, "Notify Bind" }, |
587 | | { 0x00000002, "Notify Unbind" }, |
588 | | { 0x00000003, "Register Supplier" }, |
589 | | { 0x00000004, "Deregister Supplier" }, |
590 | | { 0x00000005, "Add Profile" }, |
591 | | { 0x00000006, "Remove Profile" }, |
592 | | { 0x00000007, "Modify Profile" }, |
593 | | { 0x00000008, "List Profiles" }, |
594 | | { 0x00000009, "Report Event" }, |
595 | | { 0x0000000a, "List Supported Languages" }, |
596 | | { 0x0000000b, "Report Notification" }, |
597 | | { 0x0000000c, "Add Delivery Method" }, |
598 | | { 0x0000000d, "Remove Delivery Method" }, |
599 | | { 0x0000000e, "List Delivery Methods" }, |
600 | | { 0x0000000f, "Get Delivery Method Information" }, |
601 | | { 0x00000010, "Get Notify NDS Object Name" }, |
602 | | { 0x00000011, "Get Notify Session Information" }, |
603 | | { 0, NULL } |
604 | | }; |
605 | | static value_string_ext spx_ndps_notify_func_vals_ext = VALUE_STRING_EXT_INIT(spx_ndps_notify_func_vals); |
606 | | |
607 | | static const value_string spx_ndps_deliver_func_vals[] = { |
608 | | { 0x00000000, "None" }, |
609 | | { 0x00000001, "Delivery Bind" }, |
610 | | { 0x00000002, "Delivery Unbind" }, |
611 | | { 0x00000003, "Delivery Send" }, |
612 | | { 0x00000004, "Delivery Send2" }, |
613 | | { 0, NULL } |
614 | | }; |
615 | | |
616 | | static const value_string spx_ndps_registry_func_vals[] = { |
617 | | { 0x00000000, "None" }, |
618 | | { 0x00000001, "Bind" }, |
619 | | { 0x00000002, "Unbind" }, |
620 | | { 0x00000003, "Register Server" }, |
621 | | { 0x00000004, "Deregister Server" }, |
622 | | { 0x00000005, "Register Registry" }, |
623 | | { 0x00000006, "Deregister Registry" }, |
624 | | { 0x00000007, "Registry Update" }, |
625 | | { 0x00000008, "List Local Servers" }, |
626 | | { 0x00000009, "List Servers" }, |
627 | | { 0x0000000a, "List Known Registries" }, |
628 | | { 0x0000000b, "Get Registry NDS Object Name" }, |
629 | | { 0x0000000c, "Get Registry Session Information" }, |
630 | | { 0, NULL } |
631 | | }; |
632 | | static value_string_ext spx_ndps_registry_func_vals_ext = VALUE_STRING_EXT_INIT(spx_ndps_registry_func_vals); |
633 | | |
634 | | static const value_string spx_ndps_resman_func_vals[] = { |
635 | | { 0x00000000, "None" }, |
636 | | { 0x00000001, "Bind" }, |
637 | | { 0x00000002, "Unbind" }, |
638 | | { 0x00000003, "Add Resource File" }, |
639 | | { 0x00000004, "Delete Resource File" }, |
640 | | { 0x00000005, "List Resources" }, |
641 | | { 0x00000006, "Get Resource File" }, |
642 | | { 0x00000007, "Get Resource File Date" }, |
643 | | { 0x00000008, "Get Resource Manager NDS Object Name" }, |
644 | | { 0x00000009, "Get Resource Manager Session Information" }, |
645 | | { 0x0000000a, "Set Resource Language Context" }, |
646 | | { 0, NULL } |
647 | | }; |
648 | | static value_string_ext spx_ndps_resman_func_vals_ext = VALUE_STRING_EXT_INIT(spx_ndps_resman_func_vals); |
649 | | |
650 | | static const value_string spx_ndps_broker_func_vals[] = { |
651 | | { 0x00000000, "None" }, |
652 | | { 0x00000001, "Bind" }, |
653 | | { 0x00000002, "Unbind" }, |
654 | | { 0x00000003, "List Services" }, |
655 | | { 0x00000004, "Enable Service" }, |
656 | | { 0x00000005, "Disable Service" }, |
657 | | { 0x00000006, "Down Broker" }, |
658 | | { 0x00000007, "Get Broker NDS Object Name" }, |
659 | | { 0x00000008, "Get Broker Session Information" }, |
660 | | { 0, NULL } |
661 | | }; |
662 | | static value_string_ext spx_ndps_broker_func_vals_ext = VALUE_STRING_EXT_INIT(spx_ndps_broker_func_vals); |
663 | | |
664 | | static const value_string ndps_packet_types[] = { |
665 | | { 0x00000000, "Request" }, |
666 | | { 0x00000001, "Reply" }, |
667 | | { 0, NULL } |
668 | | }; |
669 | | |
670 | | static const value_string ndps_realization_enum[] = { |
671 | | { 0x00000000, "Logical" }, |
672 | | { 0x00000001, "Physical" }, |
673 | | { 0x00000002, "Logical & Physical" }, |
674 | | { 0, NULL } |
675 | | }; |
676 | | |
677 | | static const value_string ndps_dim_value_enum[] = { |
678 | | { 0x00000000, "Numeric" }, |
679 | | { 0x00000001, "Named" }, |
680 | | { 0, NULL } |
681 | | }; |
682 | | |
683 | | static const value_string ndps_xydim_value_enum[] = { |
684 | | { 0x00000000, "Real" }, |
685 | | { 0x00000001, "Named" }, |
686 | | { 0x00000002, "Cardinal" }, |
687 | | { 0, NULL } |
688 | | }; |
689 | | |
690 | | static const value_string ndps_location_value_enum[] = { |
691 | | { 0x00000000, "Numeric" }, |
692 | | { 0x00000001, "Named" }, |
693 | | { 0, NULL } |
694 | | }; |
695 | | |
696 | | static const value_string ndps_edge_value_enum[] = { |
697 | | { 0x00000000, "Bottom" }, |
698 | | { 0x00000001, "Right" }, |
699 | | { 0x00000002, "Top" }, |
700 | | { 0x00000003, "Left" }, |
701 | | { 0, NULL } |
702 | | }; |
703 | | |
704 | | static const value_string ndps_card_or_oid_enum[] = { |
705 | | { 0x00000000, "Number" }, |
706 | | { 0x00000001, "ID" }, |
707 | | { 0, NULL } |
708 | | }; |
709 | | |
710 | | static const value_string ndps_card_name_or_oid_enum[] = { |
711 | | { 0x00000000, "Number" }, |
712 | | { 0x00000001, "ID" }, |
713 | | { 0, NULL } |
714 | | }; |
715 | | |
716 | | static const value_string ndps_integer_or_oid_enum[] = { |
717 | | { 0x00000000, "ID" }, |
718 | | { 0x00000001, "Number" }, |
719 | | { 0, NULL } |
720 | | }; |
721 | | |
722 | | static const value_string ndps_persistence_enum[] = { |
723 | | { 0x00000000, "Permanent" }, |
724 | | { 0x00000001, "Volatile" }, |
725 | | { 0, NULL } |
726 | | }; |
727 | | |
728 | | static const value_string ndps_address_type_enum[] = { |
729 | | { 0x00000000, "User" }, |
730 | | { 0x00000001, "Server" }, |
731 | | { 0x00000002, "Volume" }, |
732 | | { 0x00000003, "Organization Unit" }, |
733 | | { 0x00000004, "Organization" }, |
734 | | { 0x00000005, "Group" }, |
735 | | { 0x00000006, "Distinguished Name" }, |
736 | | { 0x00000007, "User or Container" }, |
737 | | { 0x00000008, "Case Exact String" }, |
738 | | { 0x00000009, "Case Ignore String" }, |
739 | | { 0x0000000a, "Numeric String" }, |
740 | | { 0x0000000b, "DOS File Name" }, |
741 | | { 0x0000000c, "Phone Number" }, |
742 | | { 0x0000000d, "Boolean" }, |
743 | | { 0x0000000e, "Integer" }, |
744 | | { 0x0000000f, "Network Address" }, |
745 | | { 0x00000010, "Choice" }, |
746 | | { 0x00000011, "GroupWise User" }, |
747 | | { 0, NULL } |
748 | | }; |
749 | | static value_string_ext ndps_address_type_enum_ext = VALUE_STRING_EXT_INIT(ndps_address_type_enum); |
750 | | |
751 | | static const value_string ndps_address_enum[] = { |
752 | | { 0x00000000, "IPX" }, |
753 | | { 0x00000001, "IP" }, |
754 | | { 0x00000002, "SDLC" }, |
755 | | { 0x00000003, "Token Ring to Ethernet" }, |
756 | | { 0x00000004, "OSI" }, |
757 | | { 0x00000005, "AppleTalk" }, |
758 | | { 0x00000006, "Count" }, |
759 | | { 0, NULL } |
760 | | }; |
761 | | |
762 | | |
763 | | static const value_string ndps_server_type_enum[] = { |
764 | | { 0x00000000, "All" }, |
765 | | { 0x00000001, "Public Access Printer Agent" }, |
766 | | { 0x00000002, "Notification Server" }, |
767 | | { 0x00000003, "Resource Manager" }, |
768 | | { 0x00000004, "Network Port Handler" }, |
769 | | { 0, NULL } |
770 | | }; |
771 | | |
772 | | static const value_string ndps_event_object_enum[] = { |
773 | | { 0x00000000, "Object" }, |
774 | | { 0x00000001, "Filter" }, |
775 | | { 0x00000002, "Detail" }, |
776 | | { 0, NULL } |
777 | | }; |
778 | | |
779 | | static const value_string ndps_service_type_enum[] = { |
780 | | { 0x00000000, "SRS" }, |
781 | | { 0x00000001, "ENS" }, |
782 | | { 0x00000002, "RMS" }, |
783 | | { 0, NULL } |
784 | | }; |
785 | | |
786 | | static const value_string ndps_delivery_add_enum[] = { |
787 | | { 0x00000000, "MHS Address" }, |
788 | | { 0x00000001, "Distinguished Name" }, |
789 | | { 0x00000002, "Text" }, |
790 | | { 0x00000003, "Octet String" }, |
791 | | { 0x00000004, "Distinguished Name String" }, |
792 | | { 0x00000005, "RPC Address" }, |
793 | | { 0x00000006, "Qualified Name" }, |
794 | | { 0, NULL } |
795 | | }; |
796 | | |
797 | | static const value_string ndps_resource_enum[] = { |
798 | | { 0x00000000, "Name or ID" }, |
799 | | { 0x00000001, "Text" }, |
800 | | { 0, NULL } |
801 | | }; |
802 | | |
803 | | |
804 | | static const value_string ndps_identifier_enum[] = { |
805 | | { 0x00000000, "ID Nominal Number" }, |
806 | | { 0x00000001, "ID Alpha-numeric" }, |
807 | | { 0x00000002, "ID Tag" }, |
808 | | { 0, NULL } |
809 | | }; |
810 | | |
811 | | static const value_string ndps_media_enum[] = { |
812 | | { 0x00000000, "Select All Pages" }, |
813 | | { 0x00000001, "Selected Pages" }, |
814 | | { 0, NULL } |
815 | | }; |
816 | | |
817 | | static const value_string ndps_page_size_enum[] = { |
818 | | { 0x00000000, "ID" }, |
819 | | { 0x00000001, "Dimensions" }, |
820 | | { 0, NULL } |
821 | | }; |
822 | | |
823 | | static const value_string ndps_pres_direction_enum[] = { |
824 | | { 0x00000000, "Right to Bottom" }, |
825 | | { 0x00000001, "Left to Bottom" }, |
826 | | { 0x00000002, "Bidirectional to Bottom" }, |
827 | | { 0x00000003, "Right to Top" }, |
828 | | { 0x00000004, "Left to Top" }, |
829 | | { 0x00000005, "Bidirectional to Top" }, |
830 | | { 0x00000006, "Bottom to Right" }, |
831 | | { 0x00000007, "Bottom to Left" }, |
832 | | { 0x00000008, "Top to Left" }, |
833 | | { 0x00000009, "Top to Right" }, |
834 | | { 0, NULL } |
835 | | }; |
836 | | static value_string_ext ndps_pres_direction_enum_ext = VALUE_STRING_EXT_INIT(ndps_pres_direction_enum); |
837 | | |
838 | | static const value_string ndps_page_order_enum[] = { |
839 | | { 0x00000000, "Unknown" }, |
840 | | { 0x00000001, "First to Last" }, |
841 | | { 0x00000002, "Last to First" }, |
842 | | { 0, NULL } |
843 | | }; |
844 | | |
845 | | static const value_string ndps_medium_size_enum[] = { |
846 | | { 0x00000000, "Discrete" }, |
847 | | { 0x00000001, "Continuous" }, |
848 | | { 0, NULL } |
849 | | }; |
850 | | |
851 | | static const value_string ndps_page_orientation_enum[] = { |
852 | | { 0x00000000, "Unknown" }, |
853 | | { 0x00000001, "Face Up" }, |
854 | | { 0x00000002, "Face Down" }, |
855 | | { 0, NULL } |
856 | | }; |
857 | | |
858 | | static const value_string ndps_print_security[] = { |
859 | | { 0x00000001, "Low" }, |
860 | | { 0x00000002, "Medium" }, |
861 | | { 0x00000003, "High" }, |
862 | | { 0, NULL } |
863 | | }; |
864 | | |
865 | | static const value_string ndps_numbers_up_enum[] = { |
866 | | { 0x00000000, "Cardinal" }, |
867 | | { 0x00000001, "Name or Object ID" }, |
868 | | { 0x00000002, "Cardinal Range" }, |
869 | | { 0, NULL } |
870 | | }; |
871 | | |
872 | | |
873 | | static const value_string ndps_state_severity_enum[] = { |
874 | | { 0x00000001, "Other" }, |
875 | | { 0x00000002, "Warning" }, |
876 | | { 0x00000003, "Critical" }, |
877 | | { 0, NULL } |
878 | | }; |
879 | | |
880 | | |
881 | | static const value_string ndps_training_enum[] = { |
882 | | { 0x00000001, "Other" }, |
883 | | { 0x00000002, "Unknown" }, |
884 | | { 0x00000003, "Untrained" }, |
885 | | { 0x00000004, "Trained" }, |
886 | | { 0x00000005, "Field Service" }, |
887 | | { 0x00000006, "Management" }, |
888 | | { 0, NULL } |
889 | | }; |
890 | | |
891 | | static const value_string ndps_colorant_set_enum[] = { |
892 | | { 0x00000000, "Name" }, |
893 | | { 0x00000001, "Description" }, |
894 | | { 0, NULL } |
895 | | }; |
896 | | |
897 | | static const value_string ndps_card_enum_time_enum[] = { |
898 | | { 0x00000000, "Cardinal" }, |
899 | | { 0x00000001, "Enumeration" }, |
900 | | { 0x00000002, "Time" }, |
901 | | { 0, NULL } |
902 | | }; |
903 | | |
904 | | static const value_string ndps_attrs_arg_enum[] = { |
905 | | { 0x00000000, "Continuation" }, |
906 | | { 0x00000001, "Specification" }, |
907 | | { 0, NULL } |
908 | | }; |
909 | | |
910 | | |
911 | | static const value_string ndps_filter_enum[] = { |
912 | | { 0x00000000, "Item" }, |
913 | | { 0x00000001, "And" }, |
914 | | { 0x00000002, "Or" }, |
915 | | { 0x00000003, "Not" }, |
916 | | { 0, NULL } |
917 | | }; |
918 | | |
919 | | |
920 | | #if 0 |
921 | | static const value_string ndps_filter_item_enum[] = { |
922 | | { 0x00000000, "Equality" }, |
923 | | { 0x00000001, "Substrings" }, |
924 | | { 0x00000002, "Greater than or Equal to" }, |
925 | | { 0x00000003, "Less then or Equal to" }, |
926 | | { 0x00000004, "Present" }, |
927 | | { 0x00000005, "Subset of" }, |
928 | | { 0x00000006, "Superset of" }, |
929 | | { 0x00000007, "Non NULL Set Intersect" }, |
930 | | { 0, NULL } |
931 | | }; |
932 | | |
933 | | static const value_string ndps_match_criteria_enum[] = { |
934 | | { 0x00000000, "Exact" }, |
935 | | { 0x00000001, "Case Insensitive" }, |
936 | | { 0x00000002, "Same Letter" }, |
937 | | { 0x00000003, "Approximate" }, |
938 | | { 0, NULL } |
939 | | }; |
940 | | #endif |
941 | | |
942 | | static const value_string ndps_operator_enum[] = { |
943 | | { 0x00000000, "Attributes" }, |
944 | | { 0x00000002, "Ordered Jobs" }, |
945 | | { 0, NULL } |
946 | | }; |
947 | | |
948 | | static const value_string ndps_resource_type_enum[] = { |
949 | | { 0x00000000, "Printer Drivers" }, |
950 | | { 0x00000001, "Printer Definitions" }, |
951 | | { 0x00000002, "Printer Definitions Short" }, |
952 | | { 0x00000003, "Banner Page Files" }, |
953 | | { 0x00000004, "Font Types" }, |
954 | | { 0x00000005, "Printer Driver Files" }, |
955 | | { 0x00000006, "Printer Definition File" }, |
956 | | { 0x00000007, "Font Files" }, |
957 | | { 0x00000008, "Generic Type" }, |
958 | | { 0x00000009, "Generic Files" }, |
959 | | { 0x0000000a, "Printer Definition File 2" }, |
960 | | { 0x0000000b, "Printer Driver Types 2" }, |
961 | | { 0x0000000c, "Printer Driver Files 2" }, |
962 | | { 0x0000000d, "Printer Driver Types Archive" }, |
963 | | { 0x0000000e, "Languages Available" }, |
964 | | { 0, NULL } |
965 | | }; |
966 | | static value_string_ext ndps_resource_type_enum_ext = VALUE_STRING_EXT_INIT(ndps_resource_type_enum); |
967 | | |
968 | | static const value_string ndps_os_type_enum[] = { |
969 | | { 0x00000000, "DOS" }, |
970 | | { 0x00000001, "Windows 3.1" }, |
971 | | { 0x00000002, "Windows 95" }, |
972 | | { 0x00000003, "Windows NT" }, |
973 | | { 0x00000004, "OS2" }, |
974 | | { 0x00000005, "MAC" }, |
975 | | { 0x00000006, "UNIX" }, |
976 | | { 0x00000007, "Windows NT 4.0" }, |
977 | | { 0x00000008, "Windows 2000/XP" }, |
978 | | { 0x00000009, "Windows 98" }, |
979 | | { 0xffffffff, "None" }, |
980 | | { 0, NULL } |
981 | | }; |
982 | | static value_string_ext ndps_os_type_enum_ext = VALUE_STRING_EXT_INIT(ndps_os_type_enum); |
983 | | |
984 | | static const value_string ndps_banner_type_enum[] = { |
985 | | { 0x00000000, "All" }, |
986 | | { 0x00000001, "PCL" }, |
987 | | { 0x00000002, "PostScript" }, |
988 | | { 0x00000003, "ASCII Text" }, |
989 | | { 0, NULL } |
990 | | }; |
991 | | |
992 | | static const value_string ndps_font_type_enum[] = { |
993 | | { 0x00000000, "TrueType" }, |
994 | | { 0x00000001, "PostScript" }, |
995 | | { 0x00000002, "System" }, |
996 | | { 0x00000003, "SPD" }, |
997 | | { 0x00000004, "True Doc" }, |
998 | | { 0, NULL } |
999 | | }; |
1000 | | |
1001 | | static const value_string ndps_archive_enum[] = { |
1002 | | { 0x00000000, "ZIP" }, |
1003 | | { 0x00000001, "JAR" }, |
1004 | | { 0, NULL } |
1005 | | }; |
1006 | | |
1007 | | |
1008 | | static const value_string ndps_res_type_enum[] = { |
1009 | | { 0x00000000, "Printer Driver" }, |
1010 | | { 0x00000001, "Printer Definition" }, |
1011 | | { 0x00000002, "Banner Page" }, |
1012 | | { 0x00000003, "Font" }, |
1013 | | { 0x00000004, "Generic Resource" }, |
1014 | | { 0x00000005, "Print Driver Archive" }, |
1015 | | { 0, NULL } |
1016 | | }; |
1017 | | |
1018 | | static const value_string ndps_print_arg_enum[] = { |
1019 | | { 0x00000000, "Create Job" }, |
1020 | | { 0x00000001, "Add Document" }, |
1021 | | { 0x00000002, "Close Job" }, |
1022 | | { 0, NULL } |
1023 | | }; |
1024 | | |
1025 | | static const value_string ndps_doc_content_enum[] = { |
1026 | | { 0x00000000, "Content Included" }, |
1027 | | { 0x00000001, "Content Referenced" }, |
1028 | | { 0, NULL } |
1029 | | }; |
1030 | | |
1031 | | static const value_string ndps_interrupt_job_enum[] = { |
1032 | | { 0x00000000, "Job ID" }, |
1033 | | { 0x00000001, "Name" }, |
1034 | | { 0, NULL } |
1035 | | }; |
1036 | | |
1037 | | static const value_string ndps_pause_job_enum[] = { |
1038 | | { 0x00000000, "Job ID" }, |
1039 | | { 0x00000001, "Name" }, |
1040 | | { 0, NULL } |
1041 | | }; |
1042 | | |
1043 | | static const value_string ndps_resubmit_op_enum[] = { |
1044 | | { 0x00000000, "Copy" }, |
1045 | | { 0x00000001, "Move" }, |
1046 | | { 0, NULL } |
1047 | | }; |
1048 | | |
1049 | | static const value_string ndps_shutdown_enum[] = { |
1050 | | { 0x00000000, "Do Current Jobs" }, |
1051 | | { 0x00000001, "Immediate" }, |
1052 | | { 0x00000002, "Do Pending Jobs" }, |
1053 | | { 0, NULL } |
1054 | | }; |
1055 | | |
1056 | | static const value_string ndps_list_profiles_choice_enum[] = { |
1057 | | { 0x00000000, "ID" }, |
1058 | | { 0x00000001, "Filter" }, |
1059 | | { 0, NULL } |
1060 | | }; |
1061 | | |
1062 | | static const value_string ndps_list_profiles_result_enum[] = { |
1063 | | { 0x00000000, "Complete" }, |
1064 | | { 0x00000001, "No Event Objects" }, |
1065 | | { 0x00000002, "Profile ID's" }, |
1066 | | { 0, NULL } |
1067 | | }; |
1068 | | |
1069 | | static const value_string ndps_ds_info_enum[] = { |
1070 | | { 0x00000000, "Add" }, |
1071 | | { 0x00000001, "Remove" }, |
1072 | | { 0x00000002, "Update" }, |
1073 | | { 0, NULL } |
1074 | | }; |
1075 | | |
1076 | | static const value_string ndps_list_services_enum[] = { |
1077 | | { 0x00000000, "Supported" }, |
1078 | | { 0x00000001, "Enabled" }, |
1079 | | { 0, NULL } |
1080 | | }; |
1081 | | |
1082 | | static const value_string ndps_data_item_enum[] = { |
1083 | | { 0x00000000, "Int8" }, |
1084 | | { 0x00000001, "Int16" }, |
1085 | | { 0x00000002, "Int32" }, |
1086 | | { 0x00000003, "Boolean" }, |
1087 | | { 0x00000004, "Character String" }, |
1088 | | { 0x00000005, "Byte String" }, |
1089 | | { 0, NULL } |
1090 | | }; |
1091 | | |
1092 | | static const value_string ndps_list_local_servers_enum[] = { |
1093 | | { 0x00000000, "Specification" }, |
1094 | | { 0x00000001, "Continuation" }, |
1095 | | { 0, NULL } |
1096 | | }; |
1097 | | |
1098 | | static const value_string ndps_delivery_method_enum[] = { |
1099 | | { 0x00000000, "Specification" }, |
1100 | | { 0x00000001, "Continuation" }, |
1101 | | { 0, NULL } |
1102 | | }; |
1103 | | |
1104 | | static const value_string ndps_attribute_enum[] = { |
1105 | | { 0x00000000, "Null" }, |
1106 | | { 0x00000001, "Text" }, |
1107 | | { 0x00000002, "Descriptive Name" }, |
1108 | | { 0x00000003, "Descriptor" }, |
1109 | | { 0x00000004, "Message" }, |
1110 | | { 0x00000005, "Error Message" }, |
1111 | | { 0x00000006, "Simple Name" }, |
1112 | | { 0x00000007, "Distinguished Name String" }, |
1113 | | { 0x00000008, "Distinguished Name Seq" }, |
1114 | | { 0x00000009, "Delta Time" }, |
1115 | | { 0x0000000a, "Time" }, |
1116 | | { 0x0000000b, "Integer" }, |
1117 | | { 0x0000000c, "Integer Seq" }, |
1118 | | { 0x0000000d, "Cardinal" }, |
1119 | | { 0x0000000e, "Cardinal Seq" }, |
1120 | | { 0x0000000f, "Positive Integer" }, |
1121 | | { 0x00000010, "Integer Range" }, |
1122 | | { 0x00000011, "Cardinal Range" }, |
1123 | | { 0x00000012, "Maximum Integer" }, |
1124 | | { 0x00000013, "Minimum Integer" }, |
1125 | | { 0x00000014, "Integer 64" }, |
1126 | | { 0x00000015, "Integer 64 Seq" }, |
1127 | | { 0x00000016, "Cardinal 64" }, |
1128 | | { 0x00000017, "Cardinal 64 Seq" }, |
1129 | | { 0x00000018, "Positive Integer 64" }, |
1130 | | { 0x00000019, "Integer 64 Range" }, |
1131 | | { 0x0000001a, "Cardinal 64 Range" }, |
1132 | | { 0x0000001b, "Maximum Integer 64" }, |
1133 | | { 0x0000001c, "Minimum Integer 64" }, |
1134 | | { 0x0000001d, "Real" }, |
1135 | | { 0x0000001e, "Real Seq" }, |
1136 | | { 0x0000001f, "Non-Negative Real" }, |
1137 | | { 0x00000020, "Real Range" }, |
1138 | | { 0x00000021, "Non-Negative Real Range" }, |
1139 | | { 0x00000022, "Boolean" }, |
1140 | | { 0x00000023, "Percent" }, |
1141 | | { 0x00000024, "Object Identifier" }, |
1142 | | { 0x00000025, "Object Identifier Seq" }, |
1143 | | { 0x00000026, "Name or OID" }, |
1144 | | { 0x00000027, "Name or OID Seq" }, |
1145 | | { 0x00000028, "Distinguished Name" }, |
1146 | | { 0x00000029, "Relative Distinguished Name Seq" }, |
1147 | | { 0x0000002a, "Realization" }, |
1148 | | { 0x0000002b, "Medium Dimensions" }, |
1149 | | { 0x0000002c, "Dimension" }, |
1150 | | { 0x0000002d, "XY Dimensions" }, |
1151 | | { 0x0000002e, "Locations" }, |
1152 | | { 0x0000002f, "Area" }, |
1153 | | { 0x00000030, "Area Seq" }, |
1154 | | { 0x00000031, "Edge" }, |
1155 | | { 0x00000032, "Font Reference" }, |
1156 | | { 0x00000033, "Cardinal or OID" }, |
1157 | | { 0x00000034, "OID Cardinal Map" }, |
1158 | | { 0x00000035, "Cardinal or Name or OID" }, |
1159 | | { 0x00000036, "Positive Integer or OID" }, |
1160 | | { 0x00000037, "Event Handling Profile" }, |
1161 | | { 0x00000038, "Octet String" }, |
1162 | | { 0x00000039, "Priority" }, |
1163 | | { 0x0000003a, "Locale" }, |
1164 | | { 0x0000003b, "Method Delivery Address" }, |
1165 | | { 0x0000003c, "Object Identification" }, |
1166 | | { 0x0000003d, "Results Profile" }, |
1167 | | { 0x0000003e, "Criteria" }, |
1168 | | { 0x0000003f, "Job Password" }, |
1169 | | { 0x00000040, "Job Level" }, |
1170 | | { 0x00000041, "Job Categories" }, |
1171 | | { 0x00000042, "Print Checkpoint" }, |
1172 | | { 0x00000043, "Ignored Attribute" }, |
1173 | | { 0x00000044, "Resource" }, |
1174 | | { 0x00000045, "Medium Substitution" }, |
1175 | | { 0x00000046, "Font Substitution" }, |
1176 | | { 0x00000047, "Resource Context Seq" }, |
1177 | | { 0x00000048, "Sides" }, |
1178 | | { 0x00000049, "Page Select Seq" }, |
1179 | | { 0x0000004a, "Page Media Select" }, |
1180 | | { 0x0000004b, "Document Content" }, |
1181 | | { 0x0000004c, "Page Size" }, |
1182 | | { 0x0000004d, "Presentation Direction" }, |
1183 | | { 0x0000004e, "Page Order" }, |
1184 | | { 0x0000004f, "File Reference" }, |
1185 | | { 0x00000050, "Medium Source Size" }, |
1186 | | { 0x00000051, "Input Tray Medium" }, |
1187 | | { 0x00000052, "Output Bins Chars" }, |
1188 | | { 0x00000053, "Page ID Type" }, |
1189 | | { 0x00000054, "Level Range" }, |
1190 | | { 0x00000055, "Category Set" }, |
1191 | | { 0x00000056, "Numbers Up Supported" }, |
1192 | | { 0x00000057, "Finishing" }, |
1193 | | { 0x00000058, "Print Contained Object ID" }, |
1194 | | { 0x00000059, "Print Config Object ID" }, |
1195 | | { 0x0000005a, "Typed Name" }, |
1196 | | { 0x0000005b, "Network Address" }, |
1197 | | { 0x0000005c, "XY Dimensions Value" }, |
1198 | | { 0x0000005d, "Name or OID Dimensions Map" }, |
1199 | | { 0x0000005e, "Printer State Reason" }, |
1200 | | { 0x0000005f, "Enumeration" }, |
1201 | | { 0x00000060, "Qualified Name" }, |
1202 | | { 0x00000061, "Qualified Name Set" }, |
1203 | | { 0x00000062, "Colorant Set" }, |
1204 | | { 0x00000063, "Resource Printer ID" }, |
1205 | | { 0x00000064, "Event Object ID" }, |
1206 | | { 0x00000065, "Qualified Name Map" }, |
1207 | | { 0x00000066, "File Path" }, |
1208 | | { 0x00000067, "Uniform Resource Identifier" }, |
1209 | | { 0x00000068, "Cardinal or Enum or Time" }, |
1210 | | { 0x00000069, "Print Contained Object ID Set" }, |
1211 | | { 0x0000006a, "Octet String Pair" }, |
1212 | | { 0x0000006b, "Octet String Integer Pair" }, |
1213 | | { 0x0000006c, "Extended Resource Identifier" }, |
1214 | | { 0x0000006d, "Event Handling Profile 2" }, |
1215 | | { 0, NULL } |
1216 | | }; |
1217 | | static value_string_ext ndps_attribute_enum_ext = VALUE_STRING_EXT_INIT(ndps_attribute_enum); |
1218 | | |
1219 | | /* XXX: There are a number of duplicate values in the following. */ |
1220 | | /* (I've commented out the duplicate values which would not have |
1221 | | been found via a linear search in the original (unsorted) |
1222 | | version of this value_string array). */ |
1223 | | /* ToDo: Fixme */ |
1224 | | static const value_string ndps_error_types[] = { |
1225 | | { 0x00000000, "Ok" }, |
1226 | | { 0x00000001, "Error" }, |
1227 | | /* { 0x01000001, "Invalid Parameter" },*/ /* Dup */ |
1228 | | { 0x01000002, "Parameter Value Unrecognized" }, |
1229 | | { 0x01000003, "Call Back Error" }, |
1230 | | { 0x01000004, "Standard IO Error" }, |
1231 | | { 0x01000005, "NDS Error" }, |
1232 | | { 0x01000006, "Unicode Error" }, |
1233 | | { 0x01000007, "Invalid Operator" }, |
1234 | | { 0x01000009, "Parameter Value Unsupported" }, |
1235 | | { 0x0100000a, "Windows Error" }, |
1236 | | { 0x0100000b, "WSA Last Error" }, |
1237 | | { 0x0100000c, "SLP Error" }, |
1238 | | { 0x0100000d, "NetWare Client Error" }, |
1239 | | { 0x03000005, "NDS Error with Position" }, |
1240 | | { 0x030a0001, "No Memory" }, |
1241 | | { 0x030a0009, "Artificial Memory Limit" }, |
1242 | | { 0x030a000c, "Memory Allocated with Wrong NLM ID" }, |
1243 | | |
1244 | | { 0xffffe872, "(-6030) Error Abort Transaction" }, |
1245 | | { 0xffffe873, "(-6029) Attribute Maintenance in Progress" }, |
1246 | | { 0xffffe874, "(-6028) Error Must Wait Checkpoint" }, |
1247 | | { 0xffffe875, "(-6027) Unsupported Version" }, |
1248 | | { 0xffffe876, "(-6026) Referral Device Full" }, |
1249 | | { 0xffffe877, "(-6025) Error Backup Active" }, |
1250 | | { 0xffffe878, "(-6024) Referral File Not Found" }, |
1251 | | { 0xffffe879, "(-6023) Bad Referral File Number" }, |
1252 | | { 0xffffe87a, "(-6022) Error Referral Trans Gap" }, |
1253 | | { 0xffffe87b, "(-6021) Invalid File Sequence" }, |
1254 | | { 0xffffe87c, "(-6020) Bad Referral Serial Number" }, |
1255 | | { 0xffffe87d, "(-6019) Bad Referral Database Serial Number" }, |
1256 | | { 0xffffe87e, "(-6018) Serial Number Mismatch" }, |
1257 | | { 0xffffe87f, "(-6017) No Such Schema" }, |
1258 | | { 0xffffe880, "(-6016) Error Returning Partial Results" }, |
1259 | | { 0xffffe881, "(-6015) Server in Skulk" }, |
1260 | | { 0xffffe882, "(-6014) Error Old View" }, |
1261 | | { 0xffffe883, "(-6013) Error Setting up for Write" }, |
1262 | | { 0xffffe884, "(-6012) Error Setting Up for Read" }, |
1263 | | { 0xffffe885, "(-6011) Error Flushing File" }, |
1264 | | { 0xffffe886, "(-6010) Error Initializing IO System" }, |
1265 | | { 0xffffe887, "(-6009) Error Renaming File" }, |
1266 | | { 0xffffe888, "(-6008) Error Deleting File" }, |
1267 | | { 0xffffe889, "(-6007) Error Checking File Existence" }, |
1268 | | { 0xffffe88a, "(-6006) Error Getting Free Blocks" }, |
1269 | | { 0xffffe88b, "(-6005) Error Expanding File" }, |
1270 | | { 0xffffe88c, "(-6004) Error Getting File Info" }, |
1271 | | { 0xffffe88d, "(-6003) Error Closing File" }, |
1272 | | { 0xffffe88e, "(-6002) Error Parsing File Name" }, |
1273 | | { 0xffffe88f, "(-6001) Error Truncating File" }, |
1274 | | |
1275 | | { 0xFFFFFAFD, "Notify Failed to Authenticate Connection Error" }, |
1276 | | { 0xFFFFFAFE, "Notify Failed to Authenticate Internal Error" }, |
1277 | | { 0xFFFFFAFF, "Notify Failed to Authenticate Protocol Mismatch" }, |
1278 | | |
1279 | | { 0xFFFFFB00, "Notify Failed to Authenticate" }, |
1280 | | { 0xFFFFFB01, "Notify Duplicate Session ID" }, |
1281 | | { 0xFFFFFB02, "Notify Unknown Attribute Object ID" }, |
1282 | | { 0xFFFFFB03, "Notify Invalid SLP URL Format" }, |
1283 | | { 0xFFFFFB04, "Notify Invalid SLP Attribute Format" }, |
1284 | | { 0xFFFFFB05, "Notify Failed to Launch RPC Server" }, |
1285 | | { 0xFFFFFB06, "Notify No Protocols Available" }, |
1286 | | { 0xFFFFFB07, "Notify Failed to Startup Winsock" }, |
1287 | | { 0xFFFFFB08, "Notify IP Not Supported By Method" }, |
1288 | | { 0xFFFFFB09, "Notify IPX Not Supported By Method" }, |
1289 | | { 0xFFFFFB0A, "Notify No Filter Provided" }, |
1290 | | { 0xFFFFFB0B, "Notify Maximum Methods Supported" }, |
1291 | | { 0xFFFFFB0C, "Notify Broker Has No File Rights" }, |
1292 | | { 0xFFFFFB0D, "Notify Bad Volume in Address" }, |
1293 | | { 0xFFFFFB0E, "Notify Failed to Send Notification" }, |
1294 | | { 0xFFFFFB0F, "Notify User Object No Default Server" }, |
1295 | | { 0xFFFFFB10, "Notify Unsupported Delivery Address Type" }, |
1296 | | { 0xFFFFFB11, "Notify Delivery Method Rejected Address" }, |
1297 | | { 0xFFFFFB12, "Notify Foreign NDS Tree Name" }, |
1298 | | { 0xFFFFFB13, "Notify Service Not Fully Enabled" }, |
1299 | | { 0xFFFFFB14, "Notify Using Unknown Methods" }, |
1300 | | { 0xFFFFFB15, "Notify Public Already Defined" }, |
1301 | | { 0xFFFFFB16, "Notify Unresolved External" }, |
1302 | | { 0xFFFFFB17, "Notify Autoload Modules Not Loaded" }, |
1303 | | { 0xFFFFFB18, "Notify Can't Load at Startup" }, |
1304 | | { 0xFFFFFB19, "Notify Inconsistent File Format" }, |
1305 | | { 0xFFFFFB1A, "Notify Initialization Failure" }, |
1306 | | { 0xFFFFFB1B, "Notify Already in Progress" }, |
1307 | | { 0xFFFFFB1C, "Notify Reentrant Initialization Failure" }, |
1308 | | { 0xFFFFFB1D, "Notify Wrong NLM File Version" }, |
1309 | | { 0xFFFFFB1E, "Notify Not NLM File Format" }, |
1310 | | { 0xFFFFFB1F, "Notify Error Reading File" }, |
1311 | | { 0xFFFFFB20, "Notify Could Not Find File" }, |
1312 | | { 0xFFFFFB21, "Notify Invalid Continuation Handle" }, |
1313 | | { 0xFFFFFB22, "Notify Unknown Continuation Handle" }, |
1314 | | { 0xFFFFFB23, "Notify Bad Method Filename" }, |
1315 | | { 0xFFFFFB24, "Notify No Persistent Storage" }, |
1316 | | { 0xFFFFFB25, "Notify No Effective Rights" }, |
1317 | | { 0xFFFFFB26, "Notify Initialization Error" }, |
1318 | | { 0xFFFFFB27, "Notify Unknown RPC Session" }, |
1319 | | { 0xFFFFFB28, "Notify Option Not Supported" }, |
1320 | | { 0xFFFFFB29, "Notify Unknown Notify Handle" }, |
1321 | | { 0xFFFFFB2A, "Notify Empty Event Object Set" }, |
1322 | | { 0xFFFFFB2B, "Notify Failed to Register With Any Server" }, |
1323 | | { 0xFFFFFB2C, "Notify No Service Registry Available" }, |
1324 | | { 0xFFFFFB2D, "Notify Not Admin Type Session" }, |
1325 | | { 0xFFFFFB2E, "Notify Not Supplied Type of Session" }, |
1326 | | { 0xFFFFFB2F, "Notify User Interface Not Supported" }, |
1327 | | { 0xFFFFFB30, "Notify Failed to Make Change Permanent" }, |
1328 | | { 0xFFFFFB31, "Notify Unknown Designator" }, |
1329 | | { 0xFFFFFB32, "Notify Unknown Object ID" }, |
1330 | | { 0xFFFFFB33, "Notify Error Writing Database" }, |
1331 | | { 0xFFFFFB34, "Notify Unknown Attribute Value" }, |
1332 | | { 0xFFFFFB35, "Notify Unknown Choice" }, |
1333 | | { 0xFFFFFB36, "Notify Invalid Credentials" }, |
1334 | | { 0xFFFFFB37, "Notify Duplicate Session ID" }, |
1335 | | { 0xFFFFFB38, "Notify Invalid Arguments" }, |
1336 | | { 0xFFFFFB39, "Notify Can't Load Delivery Method" }, |
1337 | | { 0xFFFFFB3A, "Notify Queue Empty" }, |
1338 | | { 0xFFFFFB3B, "Notify Unknown Language ID" }, |
1339 | | { 0xFFFFFB3C, "Out of Notify Entries" }, |
1340 | | { 0xFFFFFB3D, "Notify Unknown Modify Operation" }, |
1341 | | { 0xFFFFFB3E, "Notify Service Disabled" }, |
1342 | | { 0xFFFFFB3F, "Notify Unknown Method" }, |
1343 | | { 0xFFFFFB40, "Notify Method Already Installed" }, |
1344 | | { 0xFFFFFB41, "Notify Unknown Event Object ID" }, |
1345 | | { 0xFFFFFB42, "Corrupted Notify Database" }, |
1346 | | { 0xFFFFFB43, "Wrong Notify Database Version" }, |
1347 | | { 0xFFFFFB44, "Notify Error Writing File" }, |
1348 | | { 0xFFFFFB45, "Notify Error Reading File" }, |
1349 | | { 0xFFFFFB46, "Notify Unknown Notify Profile" }, |
1350 | | { 0xFFFFFB47, "Notify Unknown Session" }, |
1351 | | { 0xFFFFFB48, "Notify No Attribute Values" }, |
1352 | | { 0xFFFFFB49, "Notify DS Value Size Too Large" }, |
1353 | | { 0xFFFFFB4A, "Notify Service Name Must be Fully Distinguished" }, |
1354 | | { 0xFFFFFB4B, "Notify Failed Login" }, |
1355 | | { 0xFFFFFB4C, "Notify Failed to Create Context" }, |
1356 | | { 0xFFFFFB4D, "Notify Failed to Get Messages" }, |
1357 | | { 0xFFFFFB4E, "Notify Failed to Create Thread" }, |
1358 | | { 0xFFFFFB4F, "Notify Bad NetWare Version" }, |
1359 | | { 0xFFFFFB50, "Notify Out of Memory" }, /* Notification Service Errors */ |
1360 | | { 0xFFFFFB99, "Registry Invalid Continuation Handle" }, |
1361 | | { 0xFFFFFB9A, "Registry Not in List Iteration" }, |
1362 | | { 0xFFFFFB9B, "Registry Option Not Supported" }, |
1363 | | { 0xFFFFFB9C, "Registry Unknown Designator" }, |
1364 | | { 0xFFFFFB9D, "Not Registry Type Session" }, |
1365 | | { 0xFFFFFB9E, "Registry Not Server Type Session" }, |
1366 | | { 0xFFFFFB9F, "Registry Server Type Session" }, |
1367 | | { 0xFFFFFBA0, "Registry Type Session" }, |
1368 | | { 0xFFFFFBA1, "Registry Invalid Credential" }, |
1369 | | { 0xFFFFFBA2, "Registry Unknown Server Entry" }, |
1370 | | { 0xFFFFFBA3, "Registry Duplicate Session ID" }, |
1371 | | { 0xFFFFFBA4, "Registry Invalid Arguments" }, |
1372 | | { 0xFFFFFBA5, "Registry Can't Create Client" }, |
1373 | | { 0xFFFFFBA6, "Registry Can't Bind to Registry" }, |
1374 | | { 0xFFFFFBA7, "Registry Duplicate Server Entry" }, |
1375 | | { 0xFFFFFBA8, "Registry Can't Start Advertise" }, |
1376 | | { 0xFFFFFBA9, "Registry Unknown Modify Operation" }, |
1377 | | { 0xFFFFFBAA, "Registry Service Disabled" }, |
1378 | | { 0xFFFFFBAB, "Registry Unknown Session" }, |
1379 | | { 0xFFFFFBAC, "Registry No Attribute Values" }, |
1380 | | { 0xFFFFFBAD, "Registry DS Value Size Too Large" }, |
1381 | | { 0xFFFFFBAE, "Registry Service Name Must Be Fully Distinguished" }, |
1382 | | { 0xFFFFFBAF, "Registry Failed to Get Messages" }, |
1383 | | { 0xFFFFFBB0, "Registry Failed to Create Thread" }, |
1384 | | { 0xFFFFFBB1, "Registry Failed Login" }, |
1385 | | { 0xFFFFFBB2, "Registry Failed to Create Context" }, |
1386 | | { 0xFFFFFBB3, "Registry Bad NetWare Version" }, |
1387 | | { 0xFFFFFBB4, "Registry Out of Memory" }, /* SRS Errors */ |
1388 | | { 0xFFFFFBEE, "Broker Service Failed to Initialize" }, |
1389 | | { 0xFFFFFBEF, "Broker Other Broker Using Object" }, |
1390 | | { 0xFFFFFBF0, "Broker Public Already Defined" }, |
1391 | | { 0xFFFFFBF1, "Broker Unresolved External" }, |
1392 | | { 0xFFFFFBF2, "Broker Autoload Modules Not Loaded" }, |
1393 | | { 0xFFFFFBF3, "Broker Can't Load at Startup" }, |
1394 | | { 0xFFFFFBF4, "Broker Inconsistent File Format" }, |
1395 | | { 0xFFFFFBF5, "Broker Initialize Failure" }, |
1396 | | { 0xFFFFFBF6, "Broker Already in Progress" }, |
1397 | | { 0xFFFFFBF7, "Broker Reentrant Initialization Failure" }, |
1398 | | { 0xFFFFFBF8, "Broker Wrong NLM File Version" }, |
1399 | | { 0xFFFFFBF9, "Broker Not NLM File Format" }, |
1400 | | { 0xFFFFFBFA, "Broker Error Reading File" }, |
1401 | | { 0xFFFFFBFB, "Broker Could Not Find File" }, |
1402 | | { 0xFFFFFBFC, "Broker No Effective Rights" }, |
1403 | | { 0xFFFFFBFD, "Broker Option Not Supported" }, |
1404 | | { 0xFFFFFBFE, "Broker Not Admin Type Session" }, |
1405 | | { 0xFFFFFBFF, "Broker Failed to Make Change Permanent" }, |
1406 | | |
1407 | | { 0xFFFFFC00, "Broker Unknown Designator" }, |
1408 | | { 0xFFFFFC01, "Broker Invalid Credential" }, |
1409 | | { 0xFFFFFC02, "Broker Service Already Disabled" }, |
1410 | | { 0xFFFFFC03, "Broker Service Already Enabled" }, |
1411 | | { 0xFFFFFC04, "Broker Unknown Service" }, |
1412 | | { 0xFFFFFC05, "Broker Duplicate Session ID" }, |
1413 | | { 0xFFFFFC06, "Broker Invalid Arguments" }, |
1414 | | { 0xFFFFFC07, "Broker Unknown Modify Operation" }, |
1415 | | { 0xFFFFFC08, "Broker Service Disabled" }, |
1416 | | { 0xFFFFFC09, "Broker Unknown Session" }, |
1417 | | { 0xFFFFFC0A, "Broker No Attribute Values" }, |
1418 | | { 0xFFFFFC0B, "Broker DS Value Size Too Large" }, |
1419 | | { 0xFFFFFC0C, "Broker Uninitialized Module" }, |
1420 | | { 0xFFFFFC0D, "Broker Service Name Must be Fully Distinguished" }, |
1421 | | { 0xFFFFFC0E, "Broker Failed to Allocate Resources" }, |
1422 | | { 0xFFFFFC0F, "Broker Failed to Get Messages" }, |
1423 | | { 0xFFFFFC10, "Broker Failed to Initialize NUT" }, |
1424 | | { 0xFFFFFC11, "Broker Failed to Create Thread" }, |
1425 | | { 0xFFFFFC12, "Invalid Broker Name" }, |
1426 | | { 0xFFFFFC13, "Invalid Broker Password" }, |
1427 | | { 0xFFFFFC14, "Not Broker Class" }, |
1428 | | { 0xFFFFFC15, "Broker Name Not Given" }, |
1429 | | { 0xFFFFFC16, "Broker Wrong Command Line Arguments" }, |
1430 | | { 0xFFFFFC17, "Broker Bad NetWare Version" }, |
1431 | | { 0xFFFFFC18, "Broker Out of Memory" }, /* Broker Errors */ |
1432 | | { 0xFFFFFC2F, "Resource Manager Failed to Write INF in Address" }, |
1433 | | { 0xFFFFFC30, "Resource Manager File is Zero Length" }, |
1434 | | { 0xFFFFFC31, "Resource Manager Can't Create Resource Reference" }, |
1435 | | { 0xFFFFFC32, "Resource Manager Can't Initialize NDPS Library" }, |
1436 | | { 0xFFFFFC33, "Resource Manager No Rights to Remote Resdir" }, |
1437 | | { 0xFFFFFC34, "Resource Manager Failed to Authenticate Connection Error" }, |
1438 | | { 0xFFFFFC35, "Resource Manager Failed to Authenticate Internal Error" }, |
1439 | | { 0xFFFFFC36, "Resource Manager Failed to Authenticate Protocol Mismatch" }, |
1440 | | { 0xFFFFFC37, "Resource Manager Failed to Authenticate" }, |
1441 | | { 0xFFFFFC38, "Resource Manager Unresolved External" }, |
1442 | | { 0xFFFFFC39, "Resource Manager Invalid SLP URL Format" }, |
1443 | | { 0xFFFFFC3A, "Resource Manager Invalid SLP Attribute Format" }, |
1444 | | { 0xFFFFFC3B, "Resource Manager Failed to Launch RPC Server" }, |
1445 | | { 0xFFFFFC3C, "Resource Manager No Protocols Available" }, |
1446 | | { 0xFFFFFC3D, "Resource Manager Failed to Start Winsock" }, |
1447 | | { 0xFFFFFC3E, "Resource Manager Connection Lost RMS Data" }, |
1448 | | { 0xFFFFFC3F, "Resource Manager Duplicate TIRPC Session" }, |
1449 | | { 0xFFFFFC40, "Resource Manager Font Manager Failure" }, |
1450 | | { 0xFFFFFC41, "Resource Manager Font Manager Path Too Long" }, |
1451 | | { 0xFFFFFC42, "Resource Manager Font Manager Bad Parameter" }, |
1452 | | { 0xFFFFFC43, "Resource Manager Font Manager System Error" }, |
1453 | | { 0xFFFFFC44, "Resource Manager Font Manager Not Initialized" }, |
1454 | | { 0xFFFFFC45, "Resource Manager Font Manager No Such Font" }, |
1455 | | { 0xFFFFFC46, "Resource Manager Font Manager Corrupt Index File" }, |
1456 | | { 0xFFFFFC47, "Resource Manager Font Manager Sequence Error" }, |
1457 | | { 0xFFFFFC48, "Resource Manager Font Manager Reentrancy" }, |
1458 | | { 0xFFFFFC49, "Resource Manager Font Manager IO Error" }, |
1459 | | { 0xFFFFFC4B, "Resource Manager Session Being Removed" }, |
1460 | | { 0xFFFFFC4C, "Resource Manager Unknown RPC Session" }, |
1461 | | { 0xFFFFFC4D, "Resource Manager Document ID Format Error" }, |
1462 | | { 0xFFFFFC4E, "Resource Manager Bad File Attribute" }, |
1463 | | { 0xFFFFFC4F, "Resource Manager No Effective Rights" }, |
1464 | | { 0xFFFFFC50, "Resource Manager Not Admin Session" }, |
1465 | | { 0xFFFFFC51, "Resource Manager Unknown Designator" }, |
1466 | | { 0xFFFFFC52, "Resource Manager Failed to Register to Any Server" }, |
1467 | | { 0xFFFFFC53, "Resource Manager No Service Registry Available" }, |
1468 | | { 0xFFFFFC54, "Resource Manager Initialization Error" }, |
1469 | | { 0xFFFFFC55, "Resource Manager Invalid Arguments" }, |
1470 | | { 0xFFFFFC56, "Resource Manager Unicode Convention Error" }, |
1471 | | { 0xFFFFFC57, "Resource Manager Option Not Supported" }, |
1472 | | { 0xFFFFFC58, "Resource Manager No Printer Types in List" }, |
1473 | | { 0xFFFFFC59, "Resource Manager Printer Definition Type Unknown" }, |
1474 | | { 0xFFFFFC5A, "Resource Manager No Banner Files Present" }, |
1475 | | { 0xFFFFFC5B, "Resource Manager OS Not Supported" }, |
1476 | | { 0xFFFFFC5C, "Resource Manager List Type Unknown" }, |
1477 | | { 0xFFFFFC5D, "Resource Manager Banner Type Invalid" }, |
1478 | | { 0xFFFFFC5E, "Resource Manager No Such Filename" }, |
1479 | | { 0xFFFFFC5F, "Resource Manager Resource Type Invalid" }, |
1480 | | { 0xFFFFFC60, "Resource Manager Write File Error" }, |
1481 | | { 0xFFFFFC61, "Resource Manager Read File Error" }, |
1482 | | { 0xFFFFFC62, "Resource Manager File Open Error" }, |
1483 | | { 0xFFFFFC63, "Resource Manager No INF Files Present" }, |
1484 | | { 0xFFFFFC64, "Resource Manager No Printer Type in INF File" }, |
1485 | | { 0xFFFFFC65, "Resource Manager INF File Format Error" }, |
1486 | | { 0xFFFFFC66, "Resource Manager NPD Files Generation Error" }, |
1487 | | { 0xFFFFFC67, "Resource Manager Failed to Login" }, |
1488 | | { 0xFFFFFC68, "Resource Manager Failed to Create Context" }, |
1489 | | { 0xFFFFFC69, "Resource Manager Failed to Get Messages" }, |
1490 | | { 0xFFFFFC6A, "Resource Manager Failed to Register With any Server" }, |
1491 | | { 0xFFFFFC6B, "Resource Manager No Service Registry Available" }, |
1492 | | { 0xFFFFFC6C, "Resource Manager Invalid Credentials" }, |
1493 | | { 0xFFFFFC6D, "Resource Manager Duplicate Session ID" }, |
1494 | | { 0xFFFFFC6E, "Resource Manager Unknown Modify Operation" }, |
1495 | | { 0xFFFFFC6F, "Resource Manager Service Disabled" }, |
1496 | | { 0xFFFFFC70, "Resource Manager Error Writing File" }, |
1497 | | { 0xFFFFFC71, "Resource Manager Error Reading File" }, |
1498 | | { 0xFFFFFC72, "Resource Manager Unknown Session" }, |
1499 | | { 0xFFFFFC73, "Resource Manager No Attribute Values" }, |
1500 | | { 0xFFFFFC74, "Resource Manager DS Value Size Too Large" }, |
1501 | | { 0xFFFFFC75, "Resource Manager Service Name Must be Fully Distinguished" }, |
1502 | | { 0xFFFFFC76, "Resource Manager Failed to Create Thread" }, |
1503 | | { 0xFFFFFC77, "Resource Manager Invalid Broker Name" }, |
1504 | | { 0xFFFFFC78, "Resource Manager Invalid Broker Password" }, |
1505 | | { 0xFFFFFC79, "Resource Manager Broker Name Not Given" }, |
1506 | | { 0xFFFFFC7A, "Resource Manager Wrong Command Line Arguments" }, |
1507 | | { 0xFFFFFC7B, "Resource Manager Bad NetWare Version" }, |
1508 | | { 0xFFFFFC7C, "Resource Manager Out of Memory" }, /* ResMan Errors */ |
1509 | | #if 0 /* Dups */ |
1510 | | { 0xFFFFFC6D, "Database Descriptor Being Deleted" }, |
1511 | | { 0xFFFFFC6E, "Database Descriptor In Use" }, |
1512 | | { 0xFFFFFC6F, "Database Object Exists" }, |
1513 | | { 0xFFFFFC70, "Database Already Deleted" }, |
1514 | | { 0xFFFFFC71, "Database Can't Delete Printer Agent Directory" }, |
1515 | | { 0xFFFFFC72, "Database Can't Write Index File" }, |
1516 | | { 0xFFFFFC73, "Database Can't Write Data File" }, |
1517 | | { 0xFFFFFC74, "Database Can't Read Index File" }, |
1518 | | { 0xFFFFFC75, "Database Can't Read Data File" }, |
1519 | | { 0xFFFFFC76, "Database Can't Rename File" }, |
1520 | | { 0xFFFFFC77, "Database Index File Not Open" }, |
1521 | | { 0xFFFFFC78, "Database Can't Open Index File" }, |
1522 | | { 0xFFFFFC79, "Database Can't Open Data File" }, |
1523 | | { 0xFFFFFC7A, "Database Can't Find Data File" }, |
1524 | | { 0xFFFFFC7B, "Database Can't Create File" }, |
1525 | | #endif |
1526 | | { 0xFFFFFCAD, "NDPSM SRS Service Error" }, |
1527 | | { 0xFFFFFCAE, "NDPSM Broker Server Connecting" }, |
1528 | | { 0xFFFFFCAF, "NDPSM Failed Validation" }, |
1529 | | { 0xFFFFFCB0, "NDPSM RMS Service Error" }, |
1530 | | { 0xFFFFFCB1, "NDPSM Accounting Service Error" }, |
1531 | | { 0xFFFFFCB2, "NDPSM Could not Create Account Reference" }, |
1532 | | { 0xFFFFFCB3, "NDPSM Changing Connection" }, |
1533 | | { 0xFFFFFCB4, "NDPSM No Scheduler" }, |
1534 | | { 0xFFFFFCB5, "NDPSM Job is Active" }, |
1535 | | { 0xFFFFFCB6, "NDPSM Can't Write Document File" }, |
1536 | | { 0xFFFFFCB7, "NDPSM Can't Open Document File" }, |
1537 | | { 0xFFFFFCB8, "NDPSM Can't Delete Document File" }, |
1538 | | { 0xFFFFFCB9, "NDPSM Can't Create Document File" }, |
1539 | | { 0xFFFFFCBA, "NDPSM Too Many NetWare Servers" }, |
1540 | | { 0xFFFFFCBB, "NDPSM Can't Attach" }, |
1541 | | { 0xFFFFFCBC, "NDPSM Already Attached" }, |
1542 | | { 0xFFFFFCBD, "NDPSM No Mandatory Attribute" }, |
1543 | | { 0xFFFFFCBE, "NDPSM PDS Refuses Rename" }, |
1544 | | { 0xFFFFFCBF, "NDPSM Duplicate Value" }, |
1545 | | { 0xFFFFFCC0, "NDPSM RPC Failure" }, |
1546 | | { 0xFFFFFCC1, "NDPSM Session Not Found" }, |
1547 | | { 0xFFFFFCC2, "NDPSM PDS Not Responding" }, |
1548 | | { 0xFFFFFCC3, "NDPSM Medium Needs Mounted" }, |
1549 | | { 0xFFFFFCC4, "NDPSM Notification Service Error" }, |
1550 | | { 0xFFFFFCC5, "NDPSM PSM Going Down" }, |
1551 | | { 0xFFFFFCC6, "NDPSM PSM Initializing" }, |
1552 | | { 0xFFFFFCC7, "NDPSM Version Incompatible" }, |
1553 | | { 0xFFFFFCC8, "NDPSM Object Not Locked" }, |
1554 | | { 0xFFFFFCC9, "NDPSM Bad Printer Agent Handle" }, |
1555 | | { 0xFFFFFCCA, "NDPSM Printer Agent Paused" }, |
1556 | | { 0xFFFFFCCB, "NDPSM Printer Agent Disabled" }, |
1557 | | { 0xFFFFFCCC, "NDPSM Printer Agent Going Down" }, |
1558 | | { 0xFFFFFCCD, "NDPSM Printer Agent Initializing" }, |
1559 | | { 0xFFFFFCCE, "NDPSM Communications Error" }, |
1560 | | { 0xFFFFFCCF, "NDPSM Job Not Found" }, |
1561 | | { 0xFFFFFCD0, "NDPSM Invalid Value Syntax" }, |
1562 | | { 0xFFFFFCD1, "NDPSM Values Not Comparable" }, |
1563 | | { 0xFFFFFCD2, "NDPSM Value Not Found" }, |
1564 | | { 0xFFFFFCD3, "NDPSM Attribute Not Found" }, |
1565 | | { 0xFFFFFCD4, "NDPSM Object Not Found" }, |
1566 | | { 0xFFFFFCD5, "NDPSM Bad Parameter" }, |
1567 | | { 0xFFFFFCD6, "NDPSM Invalid Class" }, |
1568 | | { 0xFFFFFCD7, "NDPSM No PDS" }, |
1569 | | { 0xFFFFFCD8, "NDPSM Error Accessing Database" }, |
1570 | | { 0xFFFFFCD9, "NDPSM Unsupported Operation" }, |
1571 | | { 0xFFFFFCDA, "NDPSM Undefined Type" }, |
1572 | | { 0xFFFFFCDB, "NDPSM Unsupported Type" }, |
1573 | | { 0xFFFFFCDC, "NDPSM Job Retention Limit" }, |
1574 | | { 0xFFFFFCDD, "NDPSM Job Storage Limit" }, |
1575 | | { 0xFFFFFCDE, "NDPSM Memory Not Found" }, |
1576 | | { 0xFFFFFCDF, "NDPSM No Memory" }, /* NDPSM Errors */ |
1577 | | { 0xfffffce1, "(-799) Error Getting File Size" }, |
1578 | | { 0xfffffce2, "(-798) Error Positioning in File" }, |
1579 | | { 0xfffffce3, "(-797) Error Direct Writing File" }, |
1580 | | { 0xfffffce4, "(-796) Error Writing File" }, |
1581 | | { 0xfffffce5, "(-795) Error Direct Reading File" }, |
1582 | | { 0xfffffce6, "(-794) Error Reading File" }, |
1583 | | { 0xfffffce7, "(-793) Error Direct Creating File" }, |
1584 | | { 0xfffffce8, "(-792) Error Creating File" }, |
1585 | | { 0xfffffce9, "(-791) Error Direct Opening File" }, |
1586 | | { 0xfffffcea, "(-790) Error Opening File" }, |
1587 | | { 0xfffffceb, "(-789) Invalid Template" }, |
1588 | | { 0xfffffcec, "(-788) Error Schema Partition" }, |
1589 | | { 0xfffffced, "(-787) Illegal Schema Attribute" }, |
1590 | | { 0xfffffcee, "(-786) DIB IO Failure" }, |
1591 | | { 0xfffffcef, "(-785) DIB Error" }, |
1592 | | { 0xfffffcf0, "(-784) Wait Timeout" }, |
1593 | | { 0xfffffcf1, "(-783) VRDIM Not Initialized" }, |
1594 | | { 0xfffffcf2, "(-782) Root Unreachable" }, |
1595 | | { 0xfffffcf3, "(-781) Entry Not Local" }, |
1596 | | { 0xfffffcf4, "(-780) Request not Supported" }, |
1597 | | { 0xfffffcf5, "(-779) Error Cannot Go Remote" }, |
1598 | | { 0xfffffcf6, "(-778) VpVector and VpvUser which must be correlated, are out of sync" }, |
1599 | | { 0xfffffcf7, "(-777) Attempted to modify an object's attribute that is not stored on the sparse replica" }, |
1600 | | { 0xfffffcf8, "(-776) Attempted to perform an NDS operation, and the DS agent on this server is closing" }, |
1601 | | { 0xfffffcf9, "(-775) Invalid OID Format" }, |
1602 | | { 0xfffffcfa, "(-774) Repairing DIB" }, |
1603 | | { 0xfffffcfb, "(-773) Iterator Syntax" }, |
1604 | | { 0xfffffcfc, "(-772) Illegal Transaction Operation" }, |
1605 | | { 0xfffffcfd, "(-771) Transaction Active" }, |
1606 | | { 0xfffffcfe, "(-770) No Transaction Active" }, |
1607 | | { 0xfffffcff, "(-769) Duplicate Naming" }, |
1608 | | |
1609 | | { 0xfffffd00, "(-768) Query Maximum Count" }, |
1610 | | { 0xfffffd01, "(-767) Query Timeout" }, |
1611 | | { 0xfffffd02, "(-766) Incompatible Replica Version" }, |
1612 | | { 0xfffffd03, "(-765) EOF Hit" }, |
1613 | | { 0xfffffd04, "(-764) BOF Hit" }, |
1614 | | { 0xfffffd05, "(-763) Verb Exceeds Table Length" }, |
1615 | | { 0xfffffd06, "(-762) Verb Locked" }, |
1616 | | { 0xfffffd07, "(-761) Have Seen State" }, |
1617 | | { 0xfffffd08, "(-760) Auxiliary On Alias" }, |
1618 | | { 0xfffffd09, "(-759) Auxiliary Not Effective" }, |
1619 | | { 0xfffffd0a, "(-758) Auxiliary Not Container" }, |
1620 | | { 0xfffffd0b, "(-757) Auxiliary Has Containment" }, |
1621 | | { 0xfffffd0c, "(-756) Stream Exists" }, |
1622 | | { 0xfffffd0d, "(-755) Invalid Synchronization Data" }, |
1623 | | { 0xfffffd0e, "(-754) Callback Cancel" }, |
1624 | | { 0xfffffd0f, "(-753) Incompatible OS" }, |
1625 | | { 0xfffffd10, "(-752) GUID Failure" }, |
1626 | | { 0xfffffd11, "(-751) Unknown Target" }, |
1627 | | { 0xfffffd12, "(-750) Operation Cancelled" }, |
1628 | | { 0xfffffd13, "(-749) Too Many Referrals" }, |
1629 | | { 0xfffffd14, "(-748) Connection Timeout" }, |
1630 | | { 0xfffffd15, "(-747) Would Block" }, |
1631 | | { 0xfffffd16, "(-746) Zero Creation Time" }, |
1632 | | { 0xfffffd17, "(-745) Cache in Use" }, |
1633 | | { 0xfffffd18, "(-744) Invalid Control State" }, |
1634 | | { 0xfffffd19, "(-743) Invalid Control Function" }, |
1635 | | { 0xfffffd1a, "(-742) Wrong DS Version" }, |
1636 | | { 0xfffffd1b, "(-741) Name Type Not Supported" }, |
1637 | | { 0xfffffd1c, "(-740) SAS Already Registered" }, |
1638 | | { 0xfffffd1d, "(-739) Invalid SAS Version" }, |
1639 | | { 0xfffffd1e, "(-738) SAS Locked" }, |
1640 | | { 0xfffffd1f, "(-737) No Such Template" }, |
1641 | | { 0xfffffd20, "(-736) End of Stream" }, |
1642 | | { 0xfffffd21, "(-735) Nothing to Abort" }, |
1643 | | { 0xfffffd24, "(-732) Database Locked" }, |
1644 | | { 0xfffffd25, "(-731) Value Data" }, |
1645 | | { 0xfffffd26, "(-730) MASV Bad Range" }, |
1646 | | { 0xfffffd27, "(-729) MASV Not Found" }, |
1647 | | { 0xfffffd28, "(-728) MASV Already Exists" }, |
1648 | | { 0xfffffd29, "(-727) MASV Failure" }, |
1649 | | { 0xfffffd2a, "(-726) MASV Invalid Request" }, |
1650 | | { 0xfffffd2b, "(-725) MASV No Access" }, |
1651 | | { 0xfffffd2c, "(-724) DClient Unavailable" }, |
1652 | | { 0xFFFFFD2D, "JPM Accounting Already Serviced" }, |
1653 | | { 0xFFFFFD2E, "JPM No CLIB Context" }, |
1654 | | { 0xFFFFFD2F, "JPM Printer Agent Shutdown" }, |
1655 | | { 0xFFFFFD30, "JPM Printer Agent Paused" }, |
1656 | | { 0xFFFFFD31, "JPM Version Incompatible" }, |
1657 | | { 0xFFFFFD32, "JPM Print Handler Not Registered" }, |
1658 | | { 0xFFFFFD33, "JPM Document Already Closed" }, |
1659 | | { 0xFFFFFD34, "JPM Job Already Closed" }, |
1660 | | { 0xFFFFFD35, "JPM Bad Object Type" }, |
1661 | | { 0xFFFFFD36, "JPM Could not Access Database" }, |
1662 | | { 0xFFFFFD37, "JPM Job Not Found" }, |
1663 | | { 0xFFFFFD38, "JPM No Job" }, |
1664 | | { 0xFFFFFD39, "JPM Printer Agent Already Serviced By PDS" }, |
1665 | | { 0xFFFFFD3A, "JPM Not Accepting Requests" }, |
1666 | | { 0xFFFFFD3B, "JPM Invalid Request" }, |
1667 | | { 0xFFFFFD3C, "JPM Printer Agent Not Found" }, |
1668 | | { 0xFFFFFD3D, "JPM Request Queue Full" }, |
1669 | | { 0xFFFFFD3E, "JPM Unsupported Operation" }, |
1670 | | { 0xFFFFFD3F, "JPM Bad Document Handle" }, |
1671 | | { 0xFFFFFD40, "JPM Bad Job Handle" }, |
1672 | | { 0xFFFFFD41, "JPM Bad Printer Agent Handle" }, |
1673 | | { 0xFFFFFD42, "JPM Failed to Read Document File" }, |
1674 | | { 0xFFFFFD43, "JPM Failed to Open Document" }, |
1675 | | { 0xFFFFFD44, "JPM Execute Request Later" }, |
1676 | | #if 0 /* dups */ |
1677 | | { 0xfffffd2d, "(-723) Stream Not Found" }, |
1678 | | { 0xfffffd2e, "(-722) Operational Schema Mismatch" }, |
1679 | | { 0xfffffd2f, "(-721) No Such Federation Link" }, |
1680 | | { 0xfffffd30, "(-720) Connection Denied" }, |
1681 | | { 0xfffffd31, "(-719) Invalid Value Handle" }, |
1682 | | { 0xfffffd32, "(-718) Invalid Entry Handle" }, |
1683 | | { 0xfffffd33, "(-717) CRC Failure" }, |
1684 | | { 0xfffffd34, "(-716) Checksumming Not Supported" }, |
1685 | | { 0xfffffd35, "(-715) Checksum Failure" }, |
1686 | | { 0xfffffd36, "(-714) Not Implemented" }, |
1687 | | { 0xfffffd37, "(-713) Invalid Delimiters" }, |
1688 | | { 0xfffffd38, "(-712) Invalid Escape Character" }, |
1689 | | { 0xfffffd39, "(-711) Invalid Code Page" }, |
1690 | | { 0xfffffd3a, "(-710) Database Read Fail" }, |
1691 | | { 0xfffffd3b, "(-709) Insufficient Sockets" }, |
1692 | | { 0xfffffd3c, "(-708) Invalid Response" }, |
1693 | | { 0xfffffd3d, "(-707) Invalid Signature" }, |
1694 | | { 0xfffffd3e, "(-706) Not a Sibling" }, |
1695 | | { 0xfffffd3f, "(-705) Duplicate Containment" }, |
1696 | | { 0xfffffd40, "(-704) No Master Replica" }, |
1697 | | { 0xfffffd41, "(-703) Duplicate Template" }, |
1698 | | { 0xfffffd42, "(-702) Invalid Parameter" }, |
1699 | | { 0xfffffd43, "(-701) Synchronization Disabled" }, |
1700 | | { 0xfffffd44, "(-700) Obsolete API" }, |
1701 | | #endif |
1702 | | { 0xfffffd45, "(-699) Fatal" }, |
1703 | | { 0xfffffd46, "(-698) Replica in Skulk" }, |
1704 | | { 0xfffffd47, "(-697) DS Cannot Reload" }, |
1705 | | { 0xfffffd48, "(-696) DS Loader Busy" }, |
1706 | | { 0xfffffd49, "(-695) Agent Already Registered" }, |
1707 | | { 0xfffffd4a, "(-694) Lost Entry" }, |
1708 | | { 0xfffffd4b, "(-693) Missing Reference" }, |
1709 | | { 0xfffffd4c, "(-692) Incorrect Base Class" }, |
1710 | | { 0xfffffd4d, "(-691) Modification Time Not Current" }, |
1711 | | { 0xfffffd4e, "(-690) Invalid RDN" }, |
1712 | | { 0xfffffd4f, "(-689) Invalid Subordinate Count" }, |
1713 | | { 0xfffffd50, "(-688) Cache Overflow" }, |
1714 | | { 0xfffffd51, "(-687) Cannot Abort" }, |
1715 | | { 0xfffffd52, "(-686) Not a Leaf Partition" }, |
1716 | | { 0xfffffd53, "(-685) Move in Progress" }, |
1717 | | { 0xfffffd54, "(-684) Secure NCP Violation" }, |
1718 | | { 0xfffffd55, "(-683) Invalid API Version" }, |
1719 | | { 0xfffffd56, "(-682) Auditing Failed" }, |
1720 | | { 0xfffffd57, "(-681) Alias of an Alias" }, |
1721 | | { 0xfffffd58, "(-680) Transport Modified" }, |
1722 | | { 0xfffffd59, "(-679) Partition Already Exists" }, |
1723 | | { 0xfffffd5a, "(-678) Duplicate ACL" }, |
1724 | | { 0xfffffd5b, "(-677) Invalid Identity" }, |
1725 | | { 0xfffffd5c, "(-676) Invalid Connection Handle" }, |
1726 | | { 0xfffffd5d, "(-675) Invalid Task" }, |
1727 | | { 0xfffffd5e, "(-674) Invalid Name Service" }, |
1728 | | { 0xfffffd5f, "(-673) Replica Not On" }, |
1729 | | { 0xfffffd60, "(-672) No Access" }, |
1730 | | { 0xfffffd61, "(-671) No Such Parent" }, |
1731 | | { 0xfffffd62, "(-670) Invalid Context" }, |
1732 | | { 0xfffffd63, "(-669) Failed Authentication" }, |
1733 | | { 0xfffffd64, "(-668) Entry Not Container" }, |
1734 | | { 0xfffffd65, "(-667) Partition Root" }, |
1735 | | { 0xfffffd66, "(-666) Incompatible DS Version" }, |
1736 | | { 0xfffffd67, "(-665) New Epoch" }, |
1737 | | { 0xfffffd68, "(-664) Old Epoch" }, |
1738 | | { 0xfffffd69, "(-663) DS Locked" }, |
1739 | | { 0xfffffd6a, "(-662) DS Volume IO Failure" }, |
1740 | | { 0xfffffd6b, "(-661) DS Volume Not Mounted" }, |
1741 | | { 0xfffffd6c, "(-660) Record in Use" }, |
1742 | | { 0xfffffd6d, "(-659) Time Not Synchronized" }, |
1743 | | { 0xfffffd6e, "(-658) Skulk in Progress" }, |
1744 | | { 0xfffffd6f, "(-657) Schema Sync in Progress" }, |
1745 | | { 0xfffffd70, "(-656) Crucial Replica" }, |
1746 | | { 0xfffffd71, "(-655) Multiple Replicas" }, |
1747 | | { 0xfffffd72, "(-654) Partition Busy" }, |
1748 | | { 0xfffffd73, "(-653) Duplicate Optional" }, |
1749 | | { 0xfffffd74, "(-652) Duplicate Mandatory" }, |
1750 | | { 0xfffffd75, "(-651) Ambiguous Naming" }, |
1751 | | { 0xfffffd76, "(-650) Ambiguous Containment" }, |
1752 | | { 0xfffffd77, "(-649) Insufficient Buffer" }, |
1753 | | { 0xfffffd78, "(-648) Insufficient Stack" }, |
1754 | | { 0xfffffd79, "(-647) Not Root Partition" }, |
1755 | | { 0xfffffd7a, "(-646) Bad Naming Attributes" }, |
1756 | | { 0xfffffd7b, "(-645) Class Already Exists" }, |
1757 | | { 0xfffffd7c, "(-644) Schema is in Use" }, |
1758 | | { 0xfffffd7d, "(-643) Schema is Non-removable" }, |
1759 | | { 0xfffffd7e, "(-642) Invalid Iteration" }, |
1760 | | { 0xfffffd7f, "(-641) Invalid Request" }, |
1761 | | { 0xfffffd80, "(-640) Invalid Certificate" }, |
1762 | | { 0xfffffd81, "(-639) Incomplete Authentication" }, |
1763 | | { 0xfffffd82, "(-638) No Character Mapping" }, |
1764 | | { 0xfffffd83, "(-637) Previous Move in Progress" }, |
1765 | | { 0xfffffd84, "(-636) Unreachable Server" }, |
1766 | | { 0xfffffd85, "(-635) Remote Failure" }, |
1767 | | { 0xfffffd86, "(-634) No Referrals" }, |
1768 | | { 0xfffffd87, "(-633) Invalid Entry for Root" }, |
1769 | | { 0xfffffd88, "(-632) System Failure" }, |
1770 | | { 0xfffffd89, "(-631) Illegal Replica Type" }, |
1771 | | { 0xfffffd8a, "(-630) Different Tree" }, |
1772 | | { 0xfffffd8b, "(-629) Entry is Not Leaf" }, |
1773 | | { 0xfffffd8c, "(-628) Object Class Violation" }, |
1774 | | { 0xfffffd8d, "(-627) Can't Remove Naming Value" }, |
1775 | | { 0xfffffd8e, "(-626) All Referrals Failed" }, |
1776 | | { 0xfffffd8f, "(-625) Transport Failure" }, |
1777 | | { 0xfffffd90, "(-624) Replica Already Exists" }, |
1778 | | { 0xfffffd91, "(-623) Syntax Invalid in Name" }, |
1779 | | { 0xfffffd92, "(-622) Invalid Transport" }, |
1780 | | { 0xfffffd93, "(-621) Transaction Tracking Disabled" }, |
1781 | | { 0xfffffd94, "(-620) Comparison Failed" }, |
1782 | | { 0xfffffd95, "(-619) Invalid Comparison" }, |
1783 | | { 0xfffffd96, "(-618) Inconsistent Database" }, |
1784 | | { 0xfffffd97, "(-617) Database Format" }, |
1785 | | { 0xfffffd98, "(-616) Maximum Entries Exist" }, |
1786 | | { 0xfffffd99, "(-615) Attribute Already Exists" }, |
1787 | | { 0xfffffd9a, "(-614) Duplicate Value" }, |
1788 | | { 0xfffffd9b, "(-613) Syntax Violation" }, |
1789 | | { 0xfffffd9c, "(-612) Can't Have Multiple Values" }, |
1790 | | { 0xfffffd9d, "(-611) Illegal Containment" }, |
1791 | | { 0xfffffd9e, "(-610) Illegal DS Name" }, |
1792 | | { 0xfffffd9f, "(-609) Missing Mandatory" }, |
1793 | | { 0xfffffda0, "(-608) Illegal Attribute" }, |
1794 | | { 0xfffffda1, "(-607) Not Effective Class" }, |
1795 | | { 0xfffffda2, "(-606) Entry Already Exists" }, |
1796 | | { 0xfffffda3, "(-605) No Such Partition" }, |
1797 | | { 0xfffffda4, "(-604) No Such Class" }, |
1798 | | { 0xfffffda5, "(-603) No Such Attribute" }, |
1799 | | { 0xfffffda6, "(-602) No Such Value" }, |
1800 | | { 0xfffffda7, "(-601) No Such Entry" }, |
1801 | | |
1802 | | { 0xfffffe97, "(-361) Iterator Invalid Scope" }, |
1803 | | { 0xfffffe98, "(-360) Iterator Invalid Search Data" }, |
1804 | | { 0xfffffe99, "(-359) Iterator Invalid Position" }, |
1805 | | { 0xfffffe9a, "(-358) Iterator Invalid Handle" }, |
1806 | | { 0xfffffe9b, "(-357) NDS for NT - Sync Disabled" }, |
1807 | | { 0xfffffe9c, "(-356) NDS for NT - No Domain" }, |
1808 | | { 0xfffffe9d, "(-355) Not NDS for NT" }, |
1809 | | { 0xfffffe9e, "(-354) Rename Not Allowed" }, |
1810 | | { 0xfffffe9f, "(-353) DN Too Long" }, |
1811 | | { 0xfffffea0, "(-352) No Writable Replicas" }, |
1812 | | { 0xfffffea1, "(-351) Attempt to Authenticate" }, |
1813 | | { 0xfffffea2, "(-350) Not Context Owner" }, |
1814 | | { 0xfffffea3, "(-349) Unicode Already Loaded" }, |
1815 | | { 0xfffffea4, "(-348) Unicode File Not Found" }, |
1816 | | { 0xfffffea5, "(-347) Schema Name Too Long" }, |
1817 | | { 0xfffffea6, "(-346) Unicode Translation" }, |
1818 | | { 0xfffffea7, "(-345) Invalid DS Version" }, |
1819 | | { 0xfffffea8, "(-344) Invalid TDS" }, |
1820 | | { 0xfffffea9, "(-343) Attribute Name Too Long" }, |
1821 | | { 0xfffffeaa, "(-342) Invalid DS Name" }, |
1822 | | { 0xfffffeab, "(-341) No Such Syntax" }, |
1823 | | { 0xfffffeac, "(-340) Transport Failed" }, |
1824 | | { 0xfffffead, "(-339) Failed Server Authentication" }, |
1825 | | { 0xfffffeae, "(-338) Invalid Password Characters" }, |
1826 | | { 0xfffffeaf, "(-337) Not Logged In" }, |
1827 | | { 0xfffffeb0, "(-336) Data Store Failure" }, |
1828 | | { 0xfffffeb1, "(-335) Duplicate Type" }, |
1829 | | { 0xfffffeb2, "(-334) RDN Too Long" }, |
1830 | | { 0xfffffeb3, "(-333) No Connection" }, |
1831 | | { 0xfffffeb4, "(-332) No Server Found" }, |
1832 | | { 0xfffffeb5, "(-331) Null Pointer" }, |
1833 | | { 0xfffffeb6, "(-330) Invalid Server Response" }, |
1834 | | { 0xfffffeb7, "(-329) Invalid Union Tag" }, |
1835 | | { 0xfffffeb8, "(-328) Unicode Error during Context Creation" }, |
1836 | | { 0xfffffeba, "(-326) Invalid Filter Syntax" }, |
1837 | | { 0xfffffebb, "(-325) Invalid Attribute Syntax" }, |
1838 | | { 0xfffffebc, "(-324) Invalid Replica Type" }, |
1839 | | { 0xfffffebd, "(-323) Buffer Zero Length" }, |
1840 | | { 0xfffffebe, "(-322) Invalid Iteration Handle" }, |
1841 | | { 0xfffffebf, "(-321) Unable to Attach" }, |
1842 | | { 0xfffffec0, "(-320) Can't Add Root" }, |
1843 | | { 0xfffffec1, "(-319) Internal Error" }, |
1844 | | { 0xfffffec2, "(-318) Country Name Too Long" }, |
1845 | | { 0xfffffec3, "(-317) Inconsistent MultiAVA" }, |
1846 | | { 0xfffffec4, "(-316) Too Many Tokens" }, |
1847 | | { 0xfffffec5, "(-315) Expected RDN Delimiter" }, |
1848 | | { 0xfffffec6, "(-314) Invalid Object Name" }, |
1849 | | { 0xfffffec7, "(-313) Filter Tree Empty" }, |
1850 | | { 0xfffffec8, "(-312) Attribute Type Not Expected" }, |
1851 | | { 0xfffffec9, "(-311) Attribute Type Expected" }, |
1852 | | { 0xfffffeca, "(-310) Expected Equals" }, |
1853 | | { 0xfffffecb, "(-309) Expected Identifier" }, |
1854 | | { 0xfffffecc, "(-308) Bad Verb" }, |
1855 | | { 0xfffffecd, "(-307) Buffer Empty" }, |
1856 | | { 0xfffffece, "(-306) Bad Syntax" }, |
1857 | | { 0xfffffecf, "(-305) List Empty" }, |
1858 | | { 0xfffffed0, "(-304) Buffer Full" }, |
1859 | | { 0xfffffed1, "(-303) Bad Context" }, |
1860 | | { 0xfffffed2, "(-302) Bad Key" }, |
1861 | | { 0xfffffed3, "(-301) Not Enough Memory" }, |
1862 | | |
1863 | | { 0xffffff01, "(-255) Hard Failure" }, |
1864 | | { 0xffffff02, "(-254) Bindery Locked/Directory Locked/Spool Delete/Trustee not Found/Timeout" }, |
1865 | | { 0xffffff03, "(-253) Bad Station Number" }, |
1866 | | { 0xffffff04, "(-252) Message Queue Full/Target Already Has Message/No Such Object" }, |
1867 | | { 0xffffff05, "(-251) Unknown Request/No Such Property" }, |
1868 | | { 0xffffff06, "(-250) Temp Remap" }, |
1869 | | { 0xffffff07, "(-249) No Property Read Rights" }, |
1870 | | { 0xffffff08, "(-248) No Property Write Rights" }, |
1871 | | { 0xffffff09, "(-247) No Property Create Rights" }, |
1872 | | { 0xffffff0a, "(-246) No Property Delete Rights" }, |
1873 | | { 0xffffff0b, "(-245) No Object Create Rights" }, |
1874 | | { 0xffffff0c, "(-244) No Object Delete Rights" }, |
1875 | | { 0xffffff0d, "(-243) No Object Rename Rights" }, |
1876 | | { 0xffffff0e, "(-242) No Object Read Rights" }, |
1877 | | { 0xffffff0f, "(-241) Bindery Security" }, |
1878 | | { 0xffffff10, "(-240) Illegal Wildcard" }, |
1879 | | { 0xffffff11, "(-239) Illegal Name" }, |
1880 | | { 0xffffff12, "(-238) Object Already Exists" }, |
1881 | | { 0xffffff13, "(-237) Property Already Exists" }, |
1882 | | { 0xffffff14, "(-236) No Such Value Set" }, |
1883 | | { 0xffffff15, "(-235) Property Not Group" }, |
1884 | | { 0xffffff16, "(-234) No Such Member" }, |
1885 | | { 0xffffff17, "(-233) Member Already Exists" }, |
1886 | | { 0xffffff18, "(-232) Write to Group Property" }, |
1887 | | { 0xffffff20, "(-224) No Login Connection Available" }, |
1888 | | { 0xffffff21, "(-223) Password Expired" }, |
1889 | | { 0xffffff22, "(-222) Bad Password" }, |
1890 | | { 0xffffff24, "(-220) Login Account Expired" }, |
1891 | | { 0xffffff25, "(-219) Queue Maximum Servers/Node Address Violation" }, |
1892 | | { 0xffffff26, "(-218) Queue Halted/Bad Login Time" }, |
1893 | | { 0xffffff27, "(-217) Queue Station Not Server/Maximum Logins Exceeded" }, |
1894 | | { 0xffffff28, "(-216) Queue Not Active/Password Too Short" }, |
1895 | | { 0xffffff29, "(-215) Queue In Service/Duplicate Password" }, |
1896 | | { 0xffffff2a, "(-214) No Queue Job Rights/Unencrypted Not Allowed" }, |
1897 | | { 0xffffff2b, "(-213) No Queue Job" }, |
1898 | | { 0xffffff2c, "(-212) Queue Full" }, |
1899 | | { 0xffffff2d, "(-211) No Queue Rights" }, |
1900 | | { 0xffffff2e, "(-210) No Queue Server" }, |
1901 | | { 0xffffff2f, "(-209) No Queue" }, |
1902 | | { 0xffffff30, "(-208) Queue IO Failure" }, |
1903 | | { 0xffffff3a, "(-198) No Console Rights" }, |
1904 | | { 0xffffff3b, "(-197) Intruder Login Lockout" }, |
1905 | | { 0xffffff3c, "(-196) Accounting Disabled" }, |
1906 | | { 0xffffff3d, "(-195) Too Many Holds" }, |
1907 | | { 0xffffff3e, "(-194) Credit Limit Exceeded" }, |
1908 | | { 0xffffff3f, "(-193) No Account Balance" }, |
1909 | | { 0xffffff40, "(-192) No Accounting Privileges" }, |
1910 | | { 0xffffff41, "(-191) Invalid Name Space" }, |
1911 | | { 0xffffff42, "(-190) Invalid Data Stream" }, |
1912 | | { 0xffffff43, "(-189) Login Encryption Required" }, |
1913 | | { 0xffffff44, "(-188) Login Signing Required" }, |
1914 | | { 0xffffff58, "(-168) Access Denied" }, |
1915 | | { 0xffffff59, "(-167) Invalid Resource Tag" }, |
1916 | | { 0xffffff5a, "(-166) Already in Use" }, |
1917 | | { 0xffffff5b, "(-165) Invalid Open/Create Mode" }, |
1918 | | { 0xffffff5c, "(-164) Rename Directory Invalid" }, |
1919 | | { 0xffffff5d, "(-163) Transaction Restarted" }, |
1920 | | { 0xffffff5e, "(-162) IO Locked" }, |
1921 | | { 0xffffff5f, "(-161) Directory IO Error" }, |
1922 | | { 0xffffff60, "(-160) Directory Not Empty" }, |
1923 | | { 0xffffff61, "(-159) Directory Active" }, |
1924 | | { 0xffffff62, "(-158) Bad File Name" }, |
1925 | | { 0xffffff63, "(-157) No Directory Handles" }, |
1926 | | { 0xffffff64, "(-156) Invalid Path/No Such Extension" }, |
1927 | | { 0xffffff65, "(-155) Bad Directory Handle" }, |
1928 | | { 0xffffff66, "(-154) Rename Across Volume" }, |
1929 | | { 0xffffff67, "(-153) Directory Full" }, |
1930 | | { 0xffffff68, "(-152) Invalid Volume" }, |
1931 | | { 0xffffff69, "(-151) No Spool Space" }, |
1932 | | { 0xffffff6a, "(-150) No Alloc Space/Target Not a Subdirectory/Insufficient Memory" }, |
1933 | | { 0xffffff6b, "(-149) File Detached" }, |
1934 | | { 0xffffff6c, "(-148) No Write Privilege" }, |
1935 | | { 0xffffff6d, "(-147) No Read Privilege" }, |
1936 | | { 0xffffff6e, "(-146) All Names Exist" }, |
1937 | | { 0xffffff6f, "(-145) Some names Exist" }, |
1938 | | { 0xffffff70, "(-144) All Read Only" }, |
1939 | | { 0xffffff71, "(-143) Some Read Only" }, |
1940 | | { 0xffffff72, "(-142) All File in Use" }, |
1941 | | { 0xffffff73, "(-141) Some File in Use" }, |
1942 | | { 0xffffff74, "(-140) No Set Privilege" }, |
1943 | | { 0xffffff75, "(-139) No Rename Privilege" }, |
1944 | | { 0xffffff76, "(-138) No Delete Privilege" }, |
1945 | | { 0xffffff77, "(-137) No Search Privilege" }, |
1946 | | { 0xffffff78, "(-136) Invalid File Handle" }, |
1947 | | { 0xffffff79, "(-135) Create File with Invalid Name" }, |
1948 | | { 0xffffff7a, "(-134) Create Duplicate When Read Only" }, |
1949 | | { 0xffffff7b, "(-133) No Create Delete Privilege" }, |
1950 | | { 0xffffff7c, "(-132) No Create Privilege" }, |
1951 | | { 0xffffff7d, "(-131) Hard IO Error" }, |
1952 | | { 0xffffff7e, "(-130) No Open Privilege" }, |
1953 | | { 0xffffff7f, "(-129) Out of Handles" }, |
1954 | | { 0xffffff80, "(-128) Lock Fail" }, |
1955 | | { 0xffffff81, "(-127) Lock Waiting" }, |
1956 | | { 0xffffff82, "(-126) NCP Boundary Check Failed" }, |
1957 | | { 0xffffff83, "(-125) Connection Not Logged In" }, |
1958 | | { 0xffffff84, "(-124) Connection Not Authenticated" }, |
1959 | | { 0xffffff85, "(-123) Connection Already Logged In" }, |
1960 | | { 0xffffff86, "(-122) Connection Already Temporary" }, |
1961 | | { 0xffffff87, "(-121) No Items Found" }, |
1962 | | { 0xffffff88, "(-120) RR Volume Flag Not Set" }, |
1963 | | { 0xffffff89, "(-119) Buffer too Small" }, |
1964 | | |
1965 | | { 0xffffffff, "(-1) Insufficient Space" }, |
1966 | | { 0, NULL } |
1967 | | }; |
1968 | | static value_string_ext ndps_error_types_ext = VALUE_STRING_EXT_INIT(ndps_error_types); |
1969 | | |
1970 | | static const value_string ndps_credential_enum[] = { |
1971 | | { 0, "SIMPLE" }, |
1972 | | { 1, "CERTIFIED" }, |
1973 | | { 2, "NDPS 0" }, |
1974 | | { 3, "NDPS 1" }, |
1975 | | { 4, "NDPS 2" }, |
1976 | | { 0, NULL } |
1977 | | }; |
1978 | | |
1979 | | static const value_string ndps_object_op_enum[] = { |
1980 | | { 0, "None" }, |
1981 | | { 1, "Add" }, |
1982 | | { 2, "Delete" }, |
1983 | | { 3, "Delete Object" }, |
1984 | | { 0, NULL } |
1985 | | }; |
1986 | | |
1987 | | static const value_string ndps_client_server_enum[] = { |
1988 | | { 0, "Client" }, |
1989 | | { 1, "Server" }, |
1990 | | { 2, "Client and Server" }, |
1991 | | { 0, NULL } |
1992 | | }; |
1993 | | |
1994 | | static const value_string ndps_session_type_enum[] = { |
1995 | | { 0, "Unknown" }, |
1996 | | { 1, "User" }, |
1997 | | { 2, "Admin" }, |
1998 | | { 3, "Server" }, |
1999 | | { 4, "Registry" }, |
2000 | | { 0, NULL } |
2001 | | }; |
2002 | | |
2003 | | static const value_string ndps_get_session_type_enum[] = { |
2004 | | { 0, "Unknown" }, |
2005 | | { 1, "User" }, |
2006 | | { 2, "Admin" }, |
2007 | | { 3, "Supplier" }, |
2008 | | { 0, NULL } |
2009 | | }; |
2010 | | |
2011 | | static const value_string ndps_get_resman_session_type_enum[] = { |
2012 | | { 0, "Unknown" }, |
2013 | | { 1, "User" }, |
2014 | | { 2, "Admin" }, |
2015 | | { 0, NULL } |
2016 | | }; |
2017 | | |
2018 | | static int |
2019 | | align_4(tvbuff_t *tvb, int aoffset) |
2020 | 0 | { |
2021 | 0 | if(tvb_captured_length_remaining(tvb, aoffset) > 4 ) |
2022 | 0 | { |
2023 | 0 | return (aoffset%4); |
2024 | 0 | } |
2025 | 0 | return 0; |
2026 | 0 | } |
2027 | | |
2028 | | /* |
2029 | | * XXX - is there something in the packet to indicate whether a string |
2030 | | * is ASCII or Unicode, or is it a characteristic of the attribute? |
2031 | | * Currently, we use a heuristic - if the length is odd, we assume |
2032 | | * it's ASCII (as it's a length in bytes, not characters), otherwise if |
2033 | | * if the length is 2, we assume it's ASCII (as strings are null- |
2034 | | * terminated, so a Unicode string would have to be at least 4 bytes), |
2035 | | * otherwise if the second byte of the string is 0, we assume it's |
2036 | | * Unicode (as an ASCII string would, in that case, have at least two |
2037 | | * characters before the terminating NUL). |
2038 | | */ |
2039 | | static unsigned |
2040 | | ndps_string(tvbuff_t* tvb, wmem_allocator_t* allocator, int hfinfo, proto_tree *ndps_tree, unsigned offset, char **stringval) |
2041 | 0 | { |
2042 | 0 | unsigned foffset = offset; |
2043 | 0 | uint32_t str_length; |
2044 | 0 | char *string; |
2045 | |
|
2046 | 0 | str_length = tvb_get_ntohl(tvb, foffset); |
2047 | 0 | foffset += 4; |
2048 | 0 | if(str_length == 0) |
2049 | 0 | { |
2050 | 0 | proto_tree_add_string(ndps_tree, hfinfo, tvb, offset, 4, "<Not Specified>"); |
2051 | 0 | if (stringval != NULL) |
2052 | 0 | *stringval = wmem_strdup(allocator, ""); |
2053 | 0 | return foffset; |
2054 | 0 | } |
2055 | 0 | if (str_length <= 2 || (str_length & 0x01) || tvb_get_uint8(tvb, foffset + 1) != 0) { |
2056 | | /* |
2057 | | * ASCII. |
2058 | | */ |
2059 | 0 | string = (char*)tvb_get_string_enc(allocator, tvb, foffset, str_length, ENC_ASCII|ENC_NA); /* XXX - extended ASCII? */; |
2060 | 0 | } else { |
2061 | | /* |
2062 | | * Unicode. |
2063 | | */ |
2064 | 0 | string = (char*)tvb_get_string_enc(allocator, tvb, foffset, str_length, ENC_UTF_16|ENC_LITTLE_ENDIAN); |
2065 | 0 | } |
2066 | 0 | foffset += str_length; |
2067 | 0 | proto_tree_add_string(ndps_tree, hfinfo, tvb, offset, str_length + 4, string); |
2068 | 0 | foffset += align_4(tvb, foffset); |
2069 | 0 | if (stringval != NULL) |
2070 | 0 | *stringval = string; |
2071 | 0 | return foffset; |
2072 | 0 | } |
2073 | | |
2074 | | static int |
2075 | | objectidentifier(tvbuff_t* tvb, wmem_allocator_t* allocator, proto_tree *ndps_tree, unsigned foffset) |
2076 | 0 | { |
2077 | 0 | uint32_t length; |
2078 | 0 | const char *label=NULL; |
2079 | 0 | uint32_t label_value=0; |
2080 | 0 | proto_tree *atree; |
2081 | 0 | proto_item *aitem; |
2082 | 0 | bool found=true; |
2083 | |
|
2084 | 0 | length = tvb_get_ntohl(tvb, foffset); |
2085 | 0 | if (length==0) |
2086 | 0 | { |
2087 | 0 | return foffset; |
2088 | 0 | } |
2089 | 0 | if (ndps_show_oids) |
2090 | 0 | { |
2091 | 0 | proto_tree_add_uint(ndps_tree, hf_oid_struct_size, tvb, foffset, 4, length); |
2092 | 0 | } |
2093 | 0 | foffset += 4; |
2094 | 0 | switch (length) |
2095 | 0 | { |
2096 | 0 | case 9: |
2097 | 0 | label_value = tvb_get_ntohl(tvb, foffset+5); |
2098 | 0 | label = try_val_to_str(label_value, object_ids_7); |
2099 | 0 | if (label==NULL) |
2100 | 0 | { |
2101 | 0 | label = wmem_strdup(allocator, "Unknown ID"); |
2102 | 0 | found=false; |
2103 | 0 | } |
2104 | 0 | aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_7, tvb, foffset, length, label_value, "%s", label); |
2105 | 0 | break; |
2106 | 0 | case 10: |
2107 | 0 | label_value = tvb_get_ntohl(tvb, foffset+6); |
2108 | 0 | label = try_val_to_str(label_value, object_ids_8); |
2109 | 0 | if (label==NULL) |
2110 | 0 | { |
2111 | 0 | label = wmem_strdup(allocator, "Unknown ID"); |
2112 | 0 | found=false; |
2113 | 0 | } |
2114 | 0 | aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_8, tvb, foffset, length, label_value, "%s", label); |
2115 | 0 | break; |
2116 | 0 | case 11: |
2117 | 0 | label_value = tvb_get_ntohl(tvb, foffset+7); |
2118 | 0 | label = try_val_to_str(label_value, object_ids_9); |
2119 | 0 | if (label==NULL) |
2120 | 0 | { |
2121 | 0 | label = wmem_strdup(allocator, "Unknown ID"); |
2122 | 0 | found=false; |
2123 | 0 | } |
2124 | 0 | aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_9, tvb, foffset, length, label_value, "%s", label); |
2125 | 0 | break; |
2126 | 0 | case 12: |
2127 | 0 | label_value = tvb_get_ntohl(tvb, foffset+8); |
2128 | 0 | label = try_val_to_str(label_value, object_ids_10); |
2129 | 0 | if (label==NULL) |
2130 | 0 | { |
2131 | 0 | label = wmem_strdup(allocator, "Unknown ID"); |
2132 | 0 | found=false; |
2133 | 0 | } |
2134 | 0 | aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_10, tvb, foffset, length, label_value, "%s", label); |
2135 | 0 | break; |
2136 | 0 | case 13: |
2137 | 0 | label_value = tvb_get_ntohl(tvb, foffset+9); |
2138 | 0 | label = try_val_to_str(label_value, object_ids_11); |
2139 | 0 | if (label==NULL) |
2140 | 0 | { |
2141 | 0 | label = wmem_strdup(allocator, "Unknown ID"); |
2142 | 0 | found=false; |
2143 | 0 | } |
2144 | 0 | aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_11, tvb, foffset, length, label_value, "%s", label); |
2145 | 0 | break; |
2146 | 0 | case 14: |
2147 | 0 | label_value = tvb_get_ntohl(tvb, foffset+10); |
2148 | 0 | label = try_val_to_str(label_value, object_ids_12); |
2149 | 0 | if (label==NULL) |
2150 | 0 | { |
2151 | 0 | label = wmem_strdup(allocator, "Unknown ID"); |
2152 | 0 | found=false; |
2153 | 0 | } |
2154 | 0 | aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_12, tvb, foffset, length, label_value, "%s", label); |
2155 | 0 | break; |
2156 | 0 | case 15: |
2157 | 0 | label_value = tvb_get_ntohl(tvb, foffset+11); |
2158 | 0 | label = try_val_to_str(label_value, object_ids_13); |
2159 | 0 | if (label==NULL) |
2160 | 0 | { |
2161 | 0 | label = wmem_strdup(allocator, "Unknown ID"); |
2162 | 0 | found=false; |
2163 | 0 | } |
2164 | 0 | aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_13, tvb, foffset, length, label_value, "%s", label); |
2165 | 0 | break; |
2166 | 0 | case 16: |
2167 | 0 | label_value = tvb_get_ntohl(tvb, foffset+12); |
2168 | 0 | label = try_val_to_str(label_value, object_ids_14); |
2169 | 0 | if (label==NULL) |
2170 | 0 | { |
2171 | 0 | label = wmem_strdup(allocator, "Unknown ID"); |
2172 | 0 | found=false; |
2173 | 0 | } |
2174 | 0 | aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_14, tvb, foffset, length, label_value, "%s", label); |
2175 | 0 | break; |
2176 | 0 | case 17: |
2177 | 0 | label_value = tvb_get_ntohl(tvb, foffset+13); |
2178 | 0 | label = try_val_to_str(label_value, object_ids_15); |
2179 | 0 | if (label==NULL) |
2180 | 0 | { |
2181 | 0 | label = wmem_strdup(allocator, "Unknown ID"); |
2182 | 0 | found=false; |
2183 | 0 | } |
2184 | 0 | aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_15, tvb, foffset, length, label_value, "%s", label); |
2185 | 0 | break; |
2186 | 0 | case 18: |
2187 | 0 | label_value = tvb_get_ntohl(tvb, foffset+14); |
2188 | 0 | label = try_val_to_str(label_value, object_ids_16); |
2189 | 0 | if (label==NULL) |
2190 | 0 | { |
2191 | 0 | label = wmem_strdup(allocator, "Unknown ID"); |
2192 | 0 | found=false; |
2193 | 0 | } |
2194 | 0 | aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_16, tvb, foffset, length, label_value, "%s", label); |
2195 | 0 | break; |
2196 | 0 | default: |
2197 | 0 | aitem = proto_tree_add_uint_format(ndps_tree, hf_ndps_object_ids_7, tvb, foffset, length, 1, "Unknown ID"); |
2198 | 0 | found=false; |
2199 | 0 | break; |
2200 | 0 | } |
2201 | 0 | if (!found) |
2202 | 0 | { |
2203 | 0 | label_value = 1; |
2204 | 0 | label = try_val_to_str(label_value, object_ids_7); |
2205 | 0 | } |
2206 | 0 | if (ndps_show_oids) |
2207 | 0 | { |
2208 | 0 | atree = proto_item_add_subtree(aitem, ett_ndps); |
2209 | 0 | proto_tree_add_item(atree, hf_oid_asn1_type, tvb, foffset, 1, ENC_BIG_ENDIAN); |
2210 | 0 | foffset += 1; |
2211 | 0 | length = tvb_get_uint8(tvb, foffset); |
2212 | 0 | foffset += 1; |
2213 | 0 | proto_tree_add_item(atree, hf_ndps_oid, tvb, foffset, length, ENC_NA); |
2214 | 0 | foffset += length; |
2215 | 0 | } |
2216 | 0 | else |
2217 | 0 | { |
2218 | 0 | if (!found) |
2219 | 0 | { |
2220 | 0 | tvb_ensure_bytes_exist(tvb, foffset, length); |
2221 | 0 | foffset += length; |
2222 | 0 | } |
2223 | 0 | else |
2224 | 0 | { |
2225 | 0 | foffset += 1; |
2226 | 0 | length = tvb_get_uint8(tvb, foffset); |
2227 | 0 | foffset += 1; |
2228 | 0 | tvb_ensure_bytes_exist(tvb, foffset, length); |
2229 | 0 | foffset += length; |
2230 | 0 | } |
2231 | 0 | } |
2232 | 0 | global_attribute_name = label; |
2233 | 0 | return foffset+(length%2); |
2234 | 0 | } |
2235 | | |
2236 | | static unsigned |
2237 | | name_or_id(tvbuff_t* tvb, wmem_allocator_t* allocator, proto_tree *ndps_tree, unsigned foffset) |
2238 | 0 | { |
2239 | 0 | uint32_t name_or_id_val; |
2240 | |
|
2241 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_nameorid, tvb, foffset, 4, ENC_BIG_ENDIAN, &name_or_id_val); |
2242 | 0 | foffset += 4; |
2243 | 0 | switch (name_or_id_val) |
2244 | 0 | { |
2245 | 0 | case 1: /* Global */ |
2246 | 0 | foffset = objectidentifier(tvb, allocator, ndps_tree, foffset); |
2247 | 0 | break; |
2248 | | |
2249 | 0 | case 2: /* Local */ |
2250 | 0 | foffset = ndps_string(tvb, allocator, hf_ndps_local_object_name, ndps_tree, foffset, NULL); |
2251 | 0 | break; |
2252 | 0 | } |
2253 | 0 | foffset += align_4(tvb, foffset); |
2254 | 0 | return foffset; |
2255 | 0 | } |
2256 | | |
2257 | | static unsigned |
2258 | | qualifiedname(tvbuff_t* tvb, wmem_allocator_t* allocator, proto_tree *ndps_tree, unsigned foffset) |
2259 | 0 | { |
2260 | 0 | uint32_t qualified_name_type=0; |
2261 | |
|
2262 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_qualified_name, tvb, foffset, 4, ENC_BIG_ENDIAN, &qualified_name_type); |
2263 | 0 | foffset += 4; |
2264 | 0 | if (qualified_name_type != 0) { |
2265 | 0 | if (qualified_name_type == 1) { |
2266 | 0 | foffset = ndps_string(tvb, allocator, hf_ndps_printer_name, ndps_tree, foffset, NULL); |
2267 | 0 | } |
2268 | 0 | else |
2269 | 0 | { |
2270 | 0 | foffset = ndps_string(tvb, allocator, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
2271 | 0 | foffset = ndps_string(tvb, allocator, hf_ndps_tree, ndps_tree, foffset, NULL); |
2272 | 0 | } |
2273 | 0 | } |
2274 | 0 | return foffset; |
2275 | 0 | } |
2276 | | |
2277 | | static unsigned |
2278 | | objectidentification(tvbuff_t* tvb, wmem_allocator_t* allocator, proto_tree *ndps_tree, unsigned foffset) |
2279 | 0 | { |
2280 | 0 | uint32_t object_type=0; |
2281 | 0 | proto_tree *atree; |
2282 | 0 | proto_item *aitem; |
2283 | |
|
2284 | 0 | object_type = tvb_get_ntohl(tvb, foffset); |
2285 | 0 | aitem = proto_tree_add_item(ndps_tree, hf_obj_id_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2286 | 0 | atree = proto_item_add_subtree(aitem, ett_ndps); |
2287 | 0 | foffset += 4; |
2288 | 0 | switch(object_type) |
2289 | 0 | { |
2290 | 0 | case 0: /* Printer Contained Object ID */ |
2291 | 0 | foffset = ndps_string(tvb, allocator, hf_ndps_printer_name, atree, foffset, NULL); |
2292 | 0 | proto_tree_add_item(atree, hf_ndps_object, tvb, foffset, |
2293 | 0 | 4, ENC_BIG_ENDIAN); |
2294 | 0 | foffset += 4; |
2295 | 0 | break; |
2296 | 0 | case 1: /* Document Identifier */ |
2297 | 0 | foffset = ndps_string(tvb, allocator, hf_ndps_printer_name, atree, foffset, NULL); |
2298 | 0 | proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset, |
2299 | 0 | 4, ENC_BIG_ENDIAN); |
2300 | 0 | foffset += 4; |
2301 | 0 | break; |
2302 | 0 | case 2: /* Object Identifier */ |
2303 | 0 | foffset = objectidentifier(tvb, allocator, atree, foffset); |
2304 | 0 | break; |
2305 | 0 | case 3: /* Object Name */ |
2306 | 0 | foffset = ndps_string(tvb, allocator, hf_object_name, atree, foffset, NULL); |
2307 | 0 | if (foffset > tvb_captured_length_remaining(tvb, foffset)) { |
2308 | 0 | return foffset; |
2309 | 0 | } |
2310 | 0 | foffset = name_or_id(tvb, allocator, atree, foffset); |
2311 | 0 | break; |
2312 | 0 | case 4: /* Name or Object ID */ |
2313 | 0 | foffset = name_or_id(tvb, allocator, atree, foffset); |
2314 | 0 | break; |
2315 | 0 | case 5: /* Simple Name */ |
2316 | 0 | foffset = ndps_string(tvb, allocator, hf_object_name, atree, foffset, NULL); |
2317 | 0 | break; |
2318 | 0 | case 6: /* Printer Configuration Object ID */ |
2319 | 0 | foffset = ndps_string(tvb, allocator, hf_ndps_printer_name, atree, foffset, NULL); |
2320 | 0 | break; |
2321 | 0 | case 7: /* Qualified Name */ |
2322 | 0 | foffset = qualifiedname(tvb, allocator, ndps_tree, foffset); |
2323 | 0 | break; |
2324 | 0 | case 8: /* Event Object ID */ |
2325 | 0 | foffset = ndps_string(tvb, allocator, hf_object_name, atree, foffset, NULL); |
2326 | 0 | foffset = objectidentifier(tvb, allocator, atree, foffset); |
2327 | 0 | proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, |
2328 | 0 | 4, ENC_BIG_ENDIAN); |
2329 | 0 | foffset += 4; |
2330 | 0 | default: |
2331 | 0 | break; |
2332 | 0 | } |
2333 | 0 | return foffset; |
2334 | 0 | } |
2335 | | |
2336 | | static int |
2337 | | print_address(tvbuff_t* tvb, proto_tree *ndps_tree, unsigned foffset) |
2338 | 0 | { |
2339 | 0 | uint32_t addr_type=0; |
2340 | 0 | uint32_t addr_len=0; |
2341 | |
|
2342 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_address, tvb, foffset, 4, ENC_BIG_ENDIAN, &addr_type); |
2343 | 0 | foffset += 4; |
2344 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_address_len, tvb, foffset, 4, ENC_BIG_ENDIAN, &addr_len); |
2345 | 0 | foffset += 4; |
2346 | | /* |
2347 | | * XXX - are these address types the same as the NDS_PTYPE_ #defines |
2348 | | * in packet-ncp2222.inc? |
2349 | | * |
2350 | | * XXX - should this code - and the code in packet-ncp2222.inc to |
2351 | | * dissect addresses - check the length for the types it supports? |
2352 | | */ |
2353 | 0 | switch(addr_type) |
2354 | 0 | { |
2355 | 0 | case 0x00000000: |
2356 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_net, tvb, foffset, 4, ENC_NA); |
2357 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_node, tvb, foffset+4, 6, ENC_NA); |
2358 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_socket, tvb, foffset+10, 2, ENC_BIG_ENDIAN); |
2359 | 0 | break; |
2360 | 0 | case 0x00000001: |
2361 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_port, tvb, foffset, 2, ENC_BIG_ENDIAN); |
2362 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ip, tvb, foffset+2, 4, ENC_BIG_ENDIAN); |
2363 | 0 | break; |
2364 | 0 | default: |
2365 | 0 | break; |
2366 | 0 | } |
2367 | 0 | tvb_ensure_bytes_exist(tvb, foffset, addr_len); |
2368 | 0 | foffset += addr_len; |
2369 | 0 | return foffset+(addr_len%4); |
2370 | 0 | } |
2371 | | |
2372 | | static int |
2373 | | address_item(tvbuff_t* tvb, wmem_allocator_t* allocator, proto_tree *ndps_tree, unsigned foffset) |
2374 | 0 | { |
2375 | 0 | uint32_t addr_type=0; |
2376 | |
|
2377 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_address_type, tvb, foffset, 4, ENC_BIG_ENDIAN, &addr_type); |
2378 | 0 | foffset += 4; |
2379 | 0 | switch(addr_type) |
2380 | 0 | { |
2381 | 0 | case 0: |
2382 | 0 | case 1: |
2383 | 0 | case 2: |
2384 | 0 | case 3: |
2385 | 0 | case 4: |
2386 | 0 | case 5: |
2387 | 0 | case 6: |
2388 | 0 | case 7: |
2389 | 0 | foffset = qualifiedname(tvb, allocator, ndps_tree, foffset); |
2390 | 0 | break; |
2391 | 0 | case 8: |
2392 | 0 | case 9: |
2393 | 0 | case 10: |
2394 | 0 | case 11: |
2395 | 0 | case 12: |
2396 | 0 | foffset = ndps_string(tvb, allocator, hf_object_name, ndps_tree, foffset, NULL); |
2397 | 0 | break; |
2398 | 0 | case 13: |
2399 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attrib_boolean, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2400 | 0 | foffset += 4; |
2401 | 0 | break; |
2402 | 0 | case 14: |
2403 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2404 | 0 | foffset += 4; |
2405 | 0 | break; |
2406 | 0 | case 15: |
2407 | 0 | foffset = print_address(tvb, ndps_tree, foffset); |
2408 | 0 | break; |
2409 | 0 | case 16: |
2410 | 0 | case 17: |
2411 | 0 | default: |
2412 | 0 | foffset = ndps_string(tvb, allocator, hf_object_name, ndps_tree, foffset, NULL); |
2413 | 0 | break; |
2414 | 0 | } |
2415 | 0 | return foffset; |
2416 | 0 | } |
2417 | | |
2418 | | static int |
2419 | | credentials(tvbuff_t* tvb, packet_info *pinfo, proto_tree *ndps_tree, unsigned foffset) |
2420 | 0 | { |
2421 | 0 | uint32_t cred_type=0; |
2422 | 0 | uint32_t length=0; |
2423 | 0 | uint32_t number_of_items; |
2424 | 0 | uint32_t ii; |
2425 | 0 | proto_tree *atree; |
2426 | 0 | proto_item *aitem, *expert_item; |
2427 | |
|
2428 | 0 | cred_type = tvb_get_ntohl(tvb, foffset); |
2429 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_cred_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2430 | 0 | foffset += 4; |
2431 | 0 | switch (cred_type) |
2432 | 0 | { |
2433 | 0 | case 0: |
2434 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_user_name, ndps_tree, foffset, NULL); |
2435 | 0 | number_of_items=tvb_get_ntohl(tvb, foffset); |
2436 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_passwords, tvb, foffset, 4, number_of_items); |
2437 | 0 | foffset += 4; |
2438 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
2439 | 0 | { |
2440 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
2441 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
2442 | 0 | break; |
2443 | 0 | } |
2444 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Password %d", ii+1); |
2445 | 0 | length = tvb_get_ntohl(tvb, foffset); |
2446 | 0 | foffset += 4; |
2447 | 0 | if (length!=0) |
2448 | 0 | { |
2449 | 0 | proto_tree_add_item(atree, hf_ndps_password, tvb, foffset, length, ENC_NA); |
2450 | 0 | } |
2451 | 0 | proto_item_set_end(aitem, tvb, foffset); |
2452 | 0 | foffset += length; |
2453 | 0 | } |
2454 | 0 | break; |
2455 | 0 | case 1: |
2456 | 0 | length = tvb_get_ntohl(tvb, foffset); |
2457 | 0 | foffset += 4; |
2458 | 0 | if (length!=0) |
2459 | 0 | { |
2460 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_certified, tvb, foffset, length, ENC_NA); |
2461 | 0 | } |
2462 | 0 | foffset += length; |
2463 | 0 | break; |
2464 | 0 | case 2: |
2465 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_server_name, ndps_tree, foffset, NULL); |
2466 | 0 | foffset += 2; |
2467 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, ENC_BIG_ENDIAN); |
2468 | 0 | foffset += 2; |
2469 | 0 | break; |
2470 | 0 | case 3: |
2471 | 0 | length=tvb_get_ntohl(tvb, foffset); |
2472 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_server_name, ndps_tree, foffset, NULL); |
2473 | 0 | if (length == 0) |
2474 | 0 | { |
2475 | 0 | foffset += 2; |
2476 | 0 | } |
2477 | 0 | if (tvb_get_ntohs(tvb, foffset)==0) /* NDPS 1.0 */ |
2478 | 0 | { |
2479 | 0 | foffset+=2; |
2480 | 0 | if (tvb_get_ntohs(tvb, foffset)==0) /* NDPS 1.1 */ |
2481 | 0 | { |
2482 | 0 | foffset += 2; |
2483 | 0 | } |
2484 | 0 | } |
2485 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, ENC_BIG_ENDIAN); |
2486 | 0 | foffset += 2; |
2487 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_user_name, ndps_tree, foffset, NULL); |
2488 | 0 | break; |
2489 | 0 | case 4: |
2490 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_server_name, ndps_tree, foffset, NULL); |
2491 | 0 | foffset += 2; |
2492 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_connection, tvb, foffset, 2, ENC_BIG_ENDIAN); |
2493 | 0 | foffset += 2; |
2494 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_user_name, ndps_tree, foffset, NULL); |
2495 | 0 | foffset += 8; /* Don't know what these 8 bytes signify */ |
2496 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2497 | 0 | foffset += 4; /* XXX - what does this count? */ |
2498 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
2499 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_tree, ndps_tree, foffset, NULL); |
2500 | 0 | break; |
2501 | 0 | default: |
2502 | 0 | break; |
2503 | 0 | } |
2504 | 0 | return foffset; |
2505 | 0 | } |
2506 | | |
2507 | | |
2508 | | static int |
2509 | | event_object_set(tvbuff_t* tvb, packet_info *pinfo, proto_tree *ndps_tree, unsigned foffset) |
2510 | 0 | { |
2511 | 0 | uint32_t number_of_items; |
2512 | 0 | uint32_t number_of_items2; |
2513 | 0 | uint32_t ii; |
2514 | 0 | uint32_t jj; |
2515 | 0 | uint32_t object_identifier; |
2516 | 0 | proto_tree *atree, *btree, *ctree; |
2517 | 0 | proto_item *aitem, *bitem, *citem, *expert_item; |
2518 | |
|
2519 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Event"); |
2520 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_events, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
2521 | 0 | foffset += 4; |
2522 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
2523 | 0 | { |
2524 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
2525 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
2526 | 0 | break; |
2527 | 0 | } |
2528 | 0 | btree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &bitem, "Event %u", ii+1); |
2529 | 0 | proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2530 | 0 | foffset += 4; |
2531 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
2532 | 0 | foffset += align_4(tvb, foffset); |
2533 | 0 | foffset = objectidentification(tvb, pinfo->pool, btree, foffset); |
2534 | 0 | foffset += align_4(tvb, foffset); |
2535 | 0 | proto_tree_add_item(btree, hf_ndps_object_op, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2536 | 0 | foffset += 4; |
2537 | 0 | proto_tree_add_item_ret_uint(btree, hf_ndps_event_object_identifier, tvb, foffset, 4, ENC_BIG_ENDIAN, &object_identifier); |
2538 | 0 | foffset += 4; |
2539 | 0 | switch (object_identifier) |
2540 | 0 | { |
2541 | 0 | case 1: |
2542 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
2543 | 0 | foffset += align_4(tvb, foffset); |
2544 | 0 | break; |
2545 | | |
2546 | 0 | case 2: |
2547 | 0 | expert_item = proto_tree_add_item_ret_uint(btree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items2); |
2548 | 0 | foffset += 4; |
2549 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
2550 | 0 | { |
2551 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
2552 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
2553 | 0 | break; |
2554 | 0 | } |
2555 | 0 | ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Item %u", jj+1); |
2556 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ctree, foffset); |
2557 | 0 | foffset += align_4(tvb, foffset); |
2558 | 0 | proto_item_set_end(citem, tvb, foffset); |
2559 | 0 | } |
2560 | 0 | break; |
2561 | 0 | } |
2562 | 0 | proto_item_set_end(bitem, tvb, foffset); |
2563 | 0 | } |
2564 | 0 | proto_item_set_end(aitem, tvb, foffset); |
2565 | 0 | return foffset; |
2566 | 0 | } |
2567 | | |
2568 | | |
2569 | | static int |
2570 | | cardinal_seq(tvbuff_t* tvb, packet_info* pinfo, proto_tree *ndps_tree, unsigned foffset) |
2571 | 0 | { |
2572 | 0 | uint32_t number_of_items; |
2573 | 0 | uint32_t length; |
2574 | 0 | uint32_t ii; |
2575 | 0 | proto_tree *atree; |
2576 | 0 | proto_item *aitem, *expert_item; |
2577 | |
|
2578 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
2579 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items); |
2580 | 0 | foffset += 4; |
2581 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
2582 | 0 | { |
2583 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
2584 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
2585 | 0 | break; |
2586 | 0 | } |
2587 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Cardinal %u", ii+1); |
2588 | 0 | length = tvb_get_ntohl(tvb, foffset); |
2589 | 0 | foffset += 4; |
2590 | 0 | if (length==4) |
2591 | 0 | { |
2592 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
2593 | 0 | } |
2594 | 0 | tvb_ensure_bytes_exist(tvb, foffset, length+length%2); |
2595 | 0 | foffset += length; |
2596 | 0 | foffset += (length%2); |
2597 | 0 | proto_item_set_end(aitem, tvb, foffset); |
2598 | 0 | } |
2599 | 0 | return foffset; |
2600 | 0 | } |
2601 | | |
2602 | | |
2603 | | static int |
2604 | | server_entry(tvbuff_t* tvb, packet_info* pinfo, proto_tree *ndps_tree, unsigned foffset) |
2605 | 0 | { |
2606 | 0 | char *server_name; |
2607 | 0 | uint32_t number_of_items; |
2608 | 0 | uint32_t ii; |
2609 | 0 | uint32_t data_type; |
2610 | 0 | proto_tree *atree, *btree; |
2611 | 0 | proto_item *aitem, *bitem, *expert_item; |
2612 | |
|
2613 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Server Info"); |
2614 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_server_name, ndps_tree, foffset, &server_name); |
2615 | 0 | proto_item_append_text(aitem, ": %s", format_text(pinfo->pool, server_name, strlen(server_name))); |
2616 | 0 | proto_tree_add_item(atree, hf_ndps_server_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2617 | 0 | foffset += 4; |
2618 | 0 | foffset = print_address(tvb, atree, foffset); |
2619 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
2620 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_num_servers, tvb, foffset, 4, number_of_items); |
2621 | 0 | foffset += 4; |
2622 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
2623 | 0 | { |
2624 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
2625 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
2626 | 0 | break; |
2627 | 0 | } |
2628 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Info %u", ii+1); |
2629 | 0 | data_type = tvb_get_ntohl(tvb, foffset); |
2630 | 0 | proto_tree_add_item(btree, hf_ndps_data_item_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2631 | 0 | foffset += 4; |
2632 | 0 | switch (data_type) |
2633 | 0 | { |
2634 | 0 | case 0: /* Int8 */ |
2635 | 0 | proto_tree_add_item(btree, hf_info_int, tvb, foffset, 1, ENC_BIG_ENDIAN); |
2636 | 0 | foffset++; |
2637 | 0 | break; |
2638 | 0 | case 1: /* Int16 */ |
2639 | 0 | proto_tree_add_item(btree, hf_info_int16, tvb, foffset, 2, ENC_BIG_ENDIAN); |
2640 | 0 | foffset += 2; |
2641 | 0 | break; |
2642 | 0 | case 2: /* Int32 */ |
2643 | 0 | proto_tree_add_item(btree, hf_info_int32, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2644 | 0 | foffset += 4; |
2645 | 0 | break; |
2646 | 0 | case 3: /* Boolean */ |
2647 | 0 | proto_tree_add_item(btree, hf_info_boolean, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2648 | 0 | foffset += 4; |
2649 | 0 | break; |
2650 | 0 | case 4: /* String */ |
2651 | 0 | case 5: /* Bytes */ |
2652 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_info_string, btree, foffset, NULL); |
2653 | 0 | break; |
2654 | 0 | default: |
2655 | 0 | break; |
2656 | 0 | } |
2657 | 0 | proto_item_set_end(bitem, tvb, foffset); |
2658 | 0 | } |
2659 | 0 | proto_item_set_end(aitem, tvb, foffset); |
2660 | 0 | return foffset; |
2661 | 0 | } |
2662 | | |
2663 | | |
2664 | | static int |
2665 | | attribute_value(tvbuff_t* tvb, packet_info* pinfo, proto_tree *ndps_tree, unsigned foffset) |
2666 | 0 | { |
2667 | 0 | uint32_t ii; |
2668 | 0 | uint32_t jj; |
2669 | 0 | uint32_t number_of_items; |
2670 | 0 | uint32_t number_of_items2; |
2671 | 0 | uint32_t attribute_type; |
2672 | 0 | uint32_t integer_or_oid; |
2673 | 0 | uint32_t event_object_type; |
2674 | 0 | uint32_t ignored_type; |
2675 | 0 | uint32_t resource_type; |
2676 | 0 | uint32_t identifier_type; |
2677 | 0 | uint32_t criterion_type; |
2678 | 0 | uint32_t card_enum_time; |
2679 | 0 | uint32_t media_type; |
2680 | 0 | uint32_t doc_content; |
2681 | 0 | uint32_t page_size; |
2682 | 0 | uint32_t medium_size; |
2683 | 0 | uint32_t numbers_up; |
2684 | 0 | uint32_t colorant_set; |
2685 | 0 | uint32_t length; |
2686 | 0 | uint32_t dimension; |
2687 | 0 | uint32_t location; |
2688 | 0 | uint32_t cardinal; |
2689 | 0 | const char *label; |
2690 | 0 | uint32_t label_value; |
2691 | 0 | proto_tree *atree, *btree; |
2692 | 0 | proto_item *aitem, *bitem, *expert_item; |
2693 | |
|
2694 | 0 | if (global_attribute_name==NULL) |
2695 | 0 | { |
2696 | 0 | label_value = 1; |
2697 | 0 | label = try_val_to_str(label_value, object_ids_7); |
2698 | 0 | global_attribute_name = label; |
2699 | 0 | } |
2700 | 0 | attribute_type = tvb_get_ntohl(tvb, foffset); |
2701 | 0 | if (ndps_show_oids) |
2702 | 0 | { |
2703 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_obj_attribute_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2704 | 0 | } |
2705 | 0 | foffset += 4; |
2706 | 0 | switch(attribute_type) |
2707 | 0 | { |
2708 | 0 | case 0: /* Null */ |
2709 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), ENC_NA); |
2710 | 0 | break; |
2711 | 0 | case 1: /* Text */ |
2712 | 0 | case 2: /* Descriptive Name */ |
2713 | 0 | case 3: /* Descriptor */ |
2714 | 0 | case 6: /* Simple Name */ |
2715 | 0 | case 40: /* Distinguished Name*/ |
2716 | 0 | case 50: /* Font Reference */ |
2717 | 0 | case 58: /* Locale */ |
2718 | 0 | case 102: /* File Path */ |
2719 | 0 | case 103: /* Uniform Resource Identifier */ |
2720 | 0 | case 108: /* Extended Resource Identifier */ |
2721 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_object_name, ndps_tree, foffset, NULL); |
2722 | 0 | break; |
2723 | 0 | case 4: /* Message */ |
2724 | 0 | case 5: /* Error Message */ |
2725 | 0 | case 38: /* Name or OID */ |
2726 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
2727 | 0 | break; |
2728 | 0 | case 39: /* Name or OID Seq */ |
2729 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
2730 | 0 | foffset += 4; |
2731 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
2732 | 0 | { |
2733 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
2734 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
2735 | 0 | break; |
2736 | 0 | } |
2737 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %d", ii+1); |
2738 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
2739 | 0 | proto_item_set_end(aitem, tvb, foffset); |
2740 | 0 | } |
2741 | 0 | break; |
2742 | 0 | case 7: /* Distinguished Name String*/ |
2743 | 0 | case 79: /* File Reference */ |
2744 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_object_name, ndps_tree, foffset, NULL); |
2745 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
2746 | 0 | break; |
2747 | 0 | case 8: /* Distinguished Name String Seq */ |
2748 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
2749 | 0 | foffset += 4; |
2750 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
2751 | 0 | { |
2752 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
2753 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
2754 | 0 | break; |
2755 | 0 | } |
2756 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Name %u", ii+1); |
2757 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_object_name, atree, foffset, NULL); |
2758 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
2759 | 0 | proto_item_set_end(aitem, tvb, foffset); |
2760 | 0 | } |
2761 | 0 | break; |
2762 | 0 | case 9: /* Delta Time */ |
2763 | 0 | case 10: /* Time */ |
2764 | 0 | case 11: /* Integer */ |
2765 | 0 | case 13: /* Cardinal */ |
2766 | 0 | case 15: /* Positive Integer */ |
2767 | 0 | case 18: /* Maximum Integer */ |
2768 | 0 | case 19: /* Minimum Integer */ |
2769 | 0 | case 35: /* Percent */ |
2770 | 0 | case 57: /* Job Priority */ |
2771 | 0 | case 72: /* Sides */ |
2772 | 0 | case 95: /* Enumeration */ |
2773 | 0 | if (global_attribute_name != NULL && |
2774 | 0 | strcmp(global_attribute_name,"(Novell) Attribute PRINTER SECURITY LEVEL")==0) |
2775 | 0 | { |
2776 | 0 | proto_tree_add_item(ndps_tree, hf_print_security, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2777 | 0 | foffset += 4; |
2778 | 0 | } |
2779 | 0 | else |
2780 | 0 | { |
2781 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2782 | 0 | foffset += 4; |
2783 | 0 | } |
2784 | 0 | break; |
2785 | 0 | case 12: /* Integer Seq */ |
2786 | 0 | case 14: /* Cardinal Seq */ |
2787 | 0 | length = tvb_get_ntohl(tvb, foffset); |
2788 | 0 | foffset += 4; |
2789 | 0 | if (length==4) |
2790 | 0 | { |
2791 | 0 | proto_tree_add_item(ndps_tree, hf_info_int32, tvb, foffset, length, ENC_BIG_ENDIAN); |
2792 | 0 | } |
2793 | 0 | tvb_ensure_bytes_exist(tvb, foffset, length); |
2794 | 0 | foffset += length; |
2795 | 0 | break; |
2796 | 0 | case 16: /* Integer Range */ |
2797 | 0 | case 17: /* Cardinal Range */ |
2798 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_lower_range, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2799 | 0 | foffset += 4; |
2800 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_upper_range, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2801 | 0 | foffset += 4; |
2802 | 0 | break; |
2803 | 0 | case 20: /* Integer 64 */ |
2804 | 0 | case 22: /* Cardinal 64 */ |
2805 | 0 | case 24: /* Positive Integer 64 */ |
2806 | 0 | case 31: /* Non-Negative Real */ |
2807 | 0 | case 29: /* Real */ |
2808 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, ENC_NA); |
2809 | 0 | foffset += 8; |
2810 | 0 | break; |
2811 | 0 | case 21: /* Integer 64 Seq */ |
2812 | 0 | case 23: /* Cardinal 64 Seq */ |
2813 | 0 | case 30: /* Real Seq */ |
2814 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
2815 | 0 | foffset += 4; |
2816 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
2817 | 0 | { |
2818 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
2819 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
2820 | 0 | break; |
2821 | 0 | } |
2822 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %u", ii+1); |
2823 | 0 | proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, ENC_NA); |
2824 | 0 | foffset += 8; |
2825 | 0 | proto_item_set_end(aitem, tvb, foffset); |
2826 | 0 | } |
2827 | 0 | break; |
2828 | 0 | case 25: /* Integer 64 Range */ |
2829 | 0 | case 26: /* Cardinal 64 Range */ |
2830 | 0 | case 32: /* Real Range */ |
2831 | 0 | case 33: /* Non-Negative Real Range */ |
2832 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, ENC_NA); |
2833 | 0 | foffset += 8; |
2834 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, ENC_NA); |
2835 | 0 | foffset += 8; |
2836 | 0 | break; |
2837 | 0 | case 27: /* Maximum Integer 64 */ |
2838 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, ENC_NA); |
2839 | 0 | foffset += 8; |
2840 | 0 | break; |
2841 | 0 | case 28: /* Minimum Integer 64 */ |
2842 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, ENC_NA); |
2843 | 0 | foffset += 8; |
2844 | 0 | break; |
2845 | 0 | case 34: /* Boolean */ |
2846 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attrib_boolean, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2847 | 0 | foffset += 4; |
2848 | 0 | break; |
2849 | 0 | case 36: /* Object Identifier */ |
2850 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
2851 | 0 | break; |
2852 | 0 | case 37: /* Object Identifier Seq */ |
2853 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
2854 | 0 | foffset += 4; |
2855 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
2856 | 0 | { |
2857 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
2858 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
2859 | 0 | break; |
2860 | 0 | } |
2861 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object %d", ii+1); |
2862 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
2863 | 0 | proto_item_set_end(aitem, tvb, foffset); |
2864 | 0 | } |
2865 | 0 | break; |
2866 | 0 | case 41: /* Relative Distinguished Name Seq */ |
2867 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_names, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
2868 | 0 | foffset += 4; |
2869 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
2870 | 0 | { |
2871 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
2872 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
2873 | 0 | break; |
2874 | 0 | } |
2875 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Name %u", ii+1); |
2876 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_object_name, atree, foffset, NULL); |
2877 | 0 | proto_item_set_end(aitem, tvb, foffset); |
2878 | 0 | } |
2879 | 0 | break; |
2880 | 0 | case 42: /* Realization */ |
2881 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_realization, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2882 | 0 | foffset += 4; |
2883 | 0 | break; |
2884 | 0 | case 43: /* Medium Dimensions */ |
2885 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, ENC_NA); |
2886 | 0 | foffset += 8; |
2887 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, ENC_NA); |
2888 | 0 | foffset += 8; |
2889 | 0 | break; |
2890 | 0 | case 44: /* Dimension */ |
2891 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_dim_value, tvb, foffset, 4, ENC_BIG_ENDIAN, &dimension); |
2892 | 0 | foffset += 4; |
2893 | 0 | if (dimension == 0) { |
2894 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, ENC_NA); |
2895 | 0 | foffset += 8; |
2896 | 0 | } |
2897 | 0 | else |
2898 | 0 | { |
2899 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
2900 | 0 | } |
2901 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_dim_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2902 | 0 | foffset += 4; |
2903 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, ENC_NA); |
2904 | 0 | foffset += 8; |
2905 | 0 | break; |
2906 | 0 | case 45: /* XY Dimensions */ |
2907 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_xydim_value, tvb, foffset, 4, ENC_BIG_ENDIAN, &dimension); |
2908 | 0 | foffset += 4; |
2909 | 0 | if (dimension == 1) { |
2910 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
2911 | 0 | } |
2912 | 0 | else |
2913 | 0 | { |
2914 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, ENC_NA); |
2915 | 0 | foffset += 8; |
2916 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, ENC_NA); |
2917 | 0 | foffset += 8; |
2918 | 0 | } |
2919 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_dim_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2920 | 0 | foffset += 4; |
2921 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, ENC_NA); |
2922 | 0 | foffset += 8; |
2923 | 0 | break; |
2924 | 0 | case 46: /* Locations */ |
2925 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_location_value, tvb, foffset, 4, ENC_BIG_ENDIAN, &location); |
2926 | 0 | foffset += 4; |
2927 | 0 | if (location == 0) { |
2928 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_locations, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
2929 | 0 | foffset += 4; |
2930 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
2931 | 0 | { |
2932 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
2933 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
2934 | 0 | break; |
2935 | 0 | } |
2936 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Location %u", ii+1); |
2937 | 0 | proto_tree_add_item(atree, hf_ndps_n64, tvb, foffset, 8, ENC_NA); |
2938 | 0 | foffset += 8; |
2939 | 0 | proto_item_set_end(aitem, tvb, foffset); |
2940 | 0 | } |
2941 | 0 | } |
2942 | 0 | else |
2943 | 0 | { |
2944 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
2945 | 0 | } |
2946 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_dim_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2947 | 0 | foffset += 4; |
2948 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_n64, tvb, foffset, 8, ENC_NA); |
2949 | 0 | foffset += 8; |
2950 | 0 | break; |
2951 | 0 | case 47: /* Area */ |
2952 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xmin_n64, tvb, foffset, 8, ENC_NA); |
2953 | 0 | foffset += 8; |
2954 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xmax_n64, tvb, foffset, 8, ENC_NA); |
2955 | 0 | foffset += 8; |
2956 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ymin_n64, tvb, foffset, 8, ENC_NA); |
2957 | 0 | foffset += 8; |
2958 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ymax_n64, tvb, foffset, 8, ENC_NA); |
2959 | 0 | foffset += 8; |
2960 | 0 | break; |
2961 | 0 | case 48: /* Area Seq */ |
2962 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_areas, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
2963 | 0 | foffset += 4; |
2964 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
2965 | 0 | { |
2966 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
2967 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
2968 | 0 | break; |
2969 | 0 | } |
2970 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Area %u", ii+1); |
2971 | 0 | proto_tree_add_item(atree, hf_ndps_xmin_n64, tvb, foffset, 8, ENC_NA); |
2972 | 0 | foffset += 8; |
2973 | 0 | proto_tree_add_item(atree, hf_ndps_xmax_n64, tvb, foffset, 8, ENC_NA); |
2974 | 0 | foffset += 8; |
2975 | 0 | proto_tree_add_item(atree, hf_ndps_ymin_n64, tvb, foffset, 8, ENC_NA); |
2976 | 0 | foffset += 8; |
2977 | 0 | proto_tree_add_item(atree, hf_ndps_ymax_n64, tvb, foffset, 8, ENC_NA); |
2978 | 0 | foffset += 8; |
2979 | 0 | proto_item_set_end(aitem, tvb, foffset); |
2980 | 0 | } |
2981 | 0 | break; |
2982 | 0 | case 49: /* Edge */ |
2983 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_edge_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2984 | 0 | foffset += 4; |
2985 | 0 | break; |
2986 | 0 | case 51: /* Cardinal or OID */ |
2987 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_cardinal_or_oid, tvb, foffset, 4, ENC_BIG_ENDIAN, &cardinal); |
2988 | 0 | foffset += 4; |
2989 | 0 | if (cardinal==0) { |
2990 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
2991 | 0 | foffset += 4; |
2992 | 0 | } |
2993 | 0 | else |
2994 | 0 | { |
2995 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
2996 | 0 | } |
2997 | 0 | break; |
2998 | 0 | case 52: /* OID Cardinal Map */ |
2999 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3000 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3001 | 0 | foffset += 4; |
3002 | 0 | break; |
3003 | 0 | case 53: /* Cardinal or Name or OID */ |
3004 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_cardinal_name_or_oid, tvb, foffset, 4, ENC_BIG_ENDIAN, &cardinal); |
3005 | 0 | foffset += 4; |
3006 | 0 | if (cardinal==0) { |
3007 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3008 | 0 | foffset += 4; |
3009 | 0 | } |
3010 | 0 | else |
3011 | 0 | { |
3012 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3013 | 0 | } |
3014 | 0 | break; |
3015 | 0 | case 54: /* Positive Integer or OID */ |
3016 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_integer_or_oid, tvb, foffset, 4, ENC_BIG_ENDIAN, &integer_or_oid); |
3017 | 0 | foffset += 4; |
3018 | 0 | if (integer_or_oid==0) { |
3019 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3020 | 0 | } |
3021 | 0 | else |
3022 | 0 | { |
3023 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3024 | 0 | foffset += 4; |
3025 | 0 | } |
3026 | 0 | break; |
3027 | 0 | case 55: /* Event Handling Profile */ |
3028 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3029 | 0 | foffset += 4; |
3030 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3031 | 0 | foffset += 4; |
3032 | 0 | foffset = qualifiedname(tvb, pinfo->pool,ndps_tree, foffset); |
3033 | 0 | length = tvb_get_ntohl(tvb, foffset); |
3034 | 0 | foffset += 4; |
3035 | 0 | if (length==4) |
3036 | 0 | { |
3037 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
3038 | 0 | } |
3039 | 0 | foffset += length; |
3040 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3041 | 0 | foffset += 4; |
3042 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3043 | |
|
3044 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_address_items, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3045 | 0 | foffset += 4; |
3046 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3047 | 0 | { |
3048 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3049 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3050 | 0 | break; |
3051 | 0 | } |
3052 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Address Item %u", ii+1); |
3053 | 0 | foffset = address_item(tvb, pinfo->pool, atree, foffset); |
3054 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3055 | 0 | } |
3056 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_events, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3057 | 0 | foffset += 4; |
3058 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3059 | 0 | { |
3060 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3061 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3062 | 0 | break; |
3063 | 0 | } |
3064 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Event %u", ii+1); |
3065 | 0 | proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3066 | 0 | foffset += 4; |
3067 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
3068 | 0 | foffset += align_4(tvb, foffset); |
3069 | 0 | foffset = objectidentification(tvb, pinfo->pool, atree, foffset); |
3070 | 0 | proto_tree_add_item(atree, hf_ndps_object_op, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3071 | 0 | foffset += 4; |
3072 | 0 | proto_tree_add_item_ret_uint(atree, hf_ndps_event_object_identifier, tvb, foffset, 4, ENC_BIG_ENDIAN, &event_object_type); |
3073 | 0 | foffset += 4; |
3074 | 0 | switch (event_object_type) |
3075 | 0 | { |
3076 | 0 | case 2: |
3077 | | /* Number of Objects */ |
3078 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items2); |
3079 | 0 | foffset += 4; |
3080 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
3081 | 0 | { |
3082 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
3083 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3084 | 0 | break; |
3085 | 0 | } |
3086 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
3087 | 0 | } |
3088 | 0 | foffset += 4; |
3089 | 0 | break; |
3090 | | |
3091 | 0 | case 1: |
3092 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
3093 | 0 | break; |
3094 | | |
3095 | 0 | case 0: |
3096 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items2); |
3097 | 0 | foffset += 4; |
3098 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
3099 | 0 | { |
3100 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
3101 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3102 | 0 | break; |
3103 | 0 | } |
3104 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object %u", jj+1); |
3105 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
3106 | 0 | proto_item_set_end(bitem, tvb, foffset); |
3107 | 0 | } |
3108 | 0 | break; |
3109 | 0 | } |
3110 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3111 | 0 | } |
3112 | 0 | break; |
3113 | 0 | case 56: /* Octet String */ |
3114 | 0 | case 63: /* Job Password */ |
3115 | 0 | case 66: /* Print Checkpoint */ |
3116 | 0 | length = tvb_get_ntohl(tvb, foffset); |
3117 | 0 | ndps_string(tvb, pinfo->pool, hf_info_string, ndps_tree, foffset, NULL); |
3118 | 0 | foffset += length+2; |
3119 | 0 | foffset += align_4(tvb, foffset); |
3120 | 0 | break; |
3121 | 0 | case 59: /* Method Delivery Address */ |
3122 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_delivery_add_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3123 | 0 | event_object_type = tvb_get_ntohl(tvb, foffset); |
3124 | 0 | foffset += 4; |
3125 | 0 | switch(event_object_type) |
3126 | 0 | { |
3127 | 0 | case 0: /*MHS ADDR*/ |
3128 | 0 | case 1: /*DISTINGUISHED_NAME*/ |
3129 | 0 | case 2: /*TEXT*/ |
3130 | 0 | case 3: /*OCTET_STRING*/ |
3131 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_info_string, ndps_tree, foffset, NULL); |
3132 | 0 | break; |
3133 | 0 | case 4: /*DIST_NAME_STRING*/ |
3134 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_object_name, ndps_tree, foffset, NULL); |
3135 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3136 | 0 | break; |
3137 | 0 | case 5: /*RPC_ADDRESS*/ |
3138 | 0 | case 6: /*QUALIFIED_NAME*/ |
3139 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3140 | 0 | foffset = qualifiedname(tvb, pinfo->pool,ndps_tree, foffset); |
3141 | 0 | break; |
3142 | 0 | default: |
3143 | 0 | break; |
3144 | 0 | } |
3145 | 0 | break; |
3146 | 0 | case 60: /* Object Identification */ |
3147 | 0 | foffset = objectidentification(tvb, pinfo->pool, ndps_tree, foffset); |
3148 | 0 | break; |
3149 | 0 | case 61: /* Results Profile */ |
3150 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3151 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3152 | 0 | foffset = address_item(tvb, pinfo->pool, ndps_tree, foffset); |
3153 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3154 | 0 | foffset += 4; |
3155 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3156 | 0 | break; |
3157 | 0 | case 62: /* Criteria */ |
3158 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3159 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_criterion_type, tvb, foffset, 4, ENC_BIG_ENDIAN, &criterion_type); |
3160 | 0 | foffset += 4; |
3161 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3162 | 0 | foffset += 4; |
3163 | 0 | break; |
3164 | 0 | case 64: /* Job Level */ |
3165 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3166 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3167 | 0 | foffset += 4; |
3168 | 0 | break; |
3169 | 0 | case 65: /* Job Categories */ |
3170 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3171 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_job_categories, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3172 | 0 | foffset += 4; |
3173 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3174 | 0 | { |
3175 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3176 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3177 | 0 | break; |
3178 | 0 | } |
3179 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job %u", ii+1); |
3180 | 0 | length = tvb_get_ntohl(tvb, foffset); |
3181 | 0 | foffset += 4; |
3182 | 0 | if (length==4) |
3183 | 0 | { |
3184 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
3185 | 0 | } |
3186 | 0 | tvb_ensure_bytes_exist(tvb, foffset, length+length%2); |
3187 | 0 | foffset += length; |
3188 | 0 | foffset += (length%2); |
3189 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3190 | 0 | } |
3191 | 0 | break; |
3192 | 0 | case 67: /* Ignored Attribute */ |
3193 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3194 | 0 | foffset += 4; |
3195 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3196 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
3197 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_ignored_attributes, tvb, foffset, 4, number_of_items); |
3198 | 0 | foffset += 4; |
3199 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3200 | 0 | { |
3201 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3202 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3203 | 0 | break; |
3204 | 0 | } |
3205 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Ignored Attribute %u", ii+1); |
3206 | 0 | proto_tree_add_item_ret_uint(atree, hf_ndps_ignored_type, tvb, foffset, 4, ENC_BIG_ENDIAN, &ignored_type); |
3207 | 0 | foffset += 4; |
3208 | 0 | if (ignored_type == 38) |
3209 | 0 | { |
3210 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
3211 | 0 | } |
3212 | 0 | else |
3213 | 0 | { |
3214 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
3215 | 0 | } |
3216 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3217 | 0 | } |
3218 | 0 | break; |
3219 | 0 | case 68: /* Resource */ |
3220 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_resource_type, tvb, foffset, 4, ENC_BIG_ENDIAN, &resource_type); |
3221 | 0 | foffset += 4; |
3222 | 0 | if (resource_type == 0) |
3223 | 0 | { |
3224 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3225 | 0 | } |
3226 | 0 | else |
3227 | 0 | { |
3228 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_tree, ndps_tree, foffset, NULL); |
3229 | 0 | } |
3230 | 0 | break; |
3231 | 0 | case 69: /* Medium Substitution */ |
3232 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3233 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3234 | 0 | break; |
3235 | 0 | case 70: /* Font Substitution */ |
3236 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_tree, ndps_tree, foffset, NULL); |
3237 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_tree, ndps_tree, foffset, NULL); |
3238 | 0 | break; |
3239 | 0 | case 71: /* Resource Context Seq */ |
3240 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_resources, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3241 | 0 | foffset += 4; |
3242 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3243 | 0 | { |
3244 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3245 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3246 | 0 | break; |
3247 | 0 | } |
3248 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Resource %u", ii+1); |
3249 | 0 | proto_tree_add_item_ret_uint(atree, hf_ndps_resource_type, tvb, foffset, 4, ENC_BIG_ENDIAN, &resource_type); |
3250 | 0 | foffset += 4; |
3251 | 0 | if (resource_type == 0) |
3252 | 0 | { |
3253 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
3254 | 0 | } |
3255 | 0 | else |
3256 | 0 | { |
3257 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_tree, atree, foffset, NULL); |
3258 | 0 | } |
3259 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3260 | 0 | } |
3261 | 0 | break; |
3262 | 0 | case 73: /* Page Select Seq */ |
3263 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_page_selects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3264 | 0 | foffset += 4; |
3265 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3266 | 0 | { |
3267 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3268 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3269 | 0 | break; |
3270 | 0 | } |
3271 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Page Select %u", ii+1); |
3272 | 0 | proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3273 | 0 | foffset += 4; |
3274 | 0 | proto_tree_add_item_ret_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, ENC_BIG_ENDIAN, &identifier_type); |
3275 | 0 | foffset += 4; |
3276 | 0 | if (identifier_type == 0) |
3277 | 0 | { |
3278 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3279 | 0 | foffset += 4; |
3280 | 0 | } |
3281 | 0 | if (identifier_type == 1) |
3282 | 0 | { |
3283 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_tree, atree, foffset, NULL); |
3284 | 0 | } |
3285 | 0 | if (identifier_type == 2) |
3286 | 0 | { |
3287 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
3288 | 0 | } |
3289 | 0 | proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3290 | 0 | foffset += 4; |
3291 | 0 | proto_tree_add_item_ret_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, ENC_BIG_ENDIAN, &identifier_type); |
3292 | 0 | foffset += 4; |
3293 | 0 | if (identifier_type == 0) |
3294 | 0 | { |
3295 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3296 | 0 | foffset += 4; |
3297 | 0 | } |
3298 | 0 | if (identifier_type == 1) |
3299 | 0 | { |
3300 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_tree, atree, foffset, NULL); |
3301 | 0 | } |
3302 | 0 | if (identifier_type == 2) |
3303 | 0 | { |
3304 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
3305 | 0 | } |
3306 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3307 | 0 | } |
3308 | 0 | break; |
3309 | 0 | case 74: /* Page Media Select */ |
3310 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_media_type, tvb, foffset, 4, ENC_BIG_ENDIAN, &media_type); |
3311 | 0 | foffset += 4; |
3312 | 0 | if (media_type == 0) |
3313 | 0 | { |
3314 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3315 | 0 | } |
3316 | 0 | else |
3317 | 0 | { |
3318 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_tree, ndps_tree, foffset, NULL); |
3319 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3320 | 0 | foffset += 4; |
3321 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3322 | 0 | { |
3323 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3324 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3325 | 0 | break; |
3326 | 0 | } |
3327 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %u", ii+1); |
3328 | 0 | proto_tree_add_item(atree, hf_ndps_page_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3329 | 0 | foffset += 4; |
3330 | 0 | proto_tree_add_item_ret_uint(atree, hf_ndps_identifier_type, tvb, foffset, 4, ENC_BIG_ENDIAN, &identifier_type); |
3331 | 0 | foffset += 4; |
3332 | 0 | if (identifier_type == 0) |
3333 | 0 | { |
3334 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3335 | 0 | foffset += 4; |
3336 | 0 | } |
3337 | 0 | if (identifier_type == 1) |
3338 | 0 | { |
3339 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_tree, atree, foffset, NULL); |
3340 | 0 | } |
3341 | 0 | if (identifier_type == 2) |
3342 | 0 | { |
3343 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
3344 | 0 | } |
3345 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3346 | 0 | } |
3347 | 0 | } |
3348 | 0 | break; |
3349 | 0 | case 75: /* Document Content */ |
3350 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_doc_content, tvb, foffset, 4, ENC_BIG_ENDIAN, &doc_content); |
3351 | 0 | foffset += 4; |
3352 | 0 | if (doc_content == 0) |
3353 | 0 | { |
3354 | 0 | length = tvb_get_ntohl(tvb, foffset); |
3355 | 0 | foffset += 4; |
3356 | 0 | if (length!=0) |
3357 | 0 | { |
3358 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, ENC_NA); |
3359 | 0 | } |
3360 | 0 | foffset += length; |
3361 | 0 | foffset += (length%2); |
3362 | 0 | } |
3363 | 0 | else |
3364 | 0 | { |
3365 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_object_name, ndps_tree, foffset, NULL); |
3366 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3367 | 0 | } |
3368 | 0 | break; |
3369 | 0 | case 76: /* Page Size */ |
3370 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_page_size, tvb, foffset, 4, ENC_BIG_ENDIAN, &page_size); |
3371 | 0 | foffset += 4; |
3372 | 0 | if (page_size == 0) |
3373 | 0 | { |
3374 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3375 | 0 | } |
3376 | 0 | else |
3377 | 0 | { |
3378 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, ENC_NA); |
3379 | 0 | foffset += 8; |
3380 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, ENC_NA); |
3381 | 0 | foffset += 8; |
3382 | 0 | } |
3383 | 0 | break; |
3384 | 0 | case 77: /* Presentation Direction */ |
3385 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_direction, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3386 | 0 | foffset += 4; |
3387 | 0 | break; |
3388 | 0 | case 78: /* Page Order */ |
3389 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_page_order, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3390 | 0 | foffset += 4; |
3391 | 0 | break; |
3392 | 0 | case 80: /* Medium Source Size */ |
3393 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3394 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_medium_size, tvb, foffset, 4, ENC_BIG_ENDIAN, &medium_size); |
3395 | 0 | foffset += 4; |
3396 | 0 | if (medium_size == 0) |
3397 | 0 | { |
3398 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_page_size, tvb, foffset, 4, ENC_BIG_ENDIAN, &page_size); |
3399 | 0 | foffset += 4; |
3400 | 0 | if (page_size == 0) |
3401 | 0 | { |
3402 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3403 | 0 | } |
3404 | 0 | else |
3405 | 0 | { |
3406 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, ENC_NA); |
3407 | 0 | foffset += 8; |
3408 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, ENC_NA); |
3409 | 0 | foffset += 8; |
3410 | 0 | } |
3411 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_long_edge_feeds, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3412 | 0 | foffset += 4; |
3413 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xmin_n64, tvb, foffset, 8, ENC_NA); |
3414 | 0 | foffset += 8; |
3415 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xmax_n64, tvb, foffset, 8, ENC_NA); |
3416 | 0 | foffset += 8; |
3417 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ymin_n64, tvb, foffset, 8, ENC_NA); |
3418 | 0 | foffset += 8; |
3419 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ymax_n64, tvb, foffset, 8, ENC_NA); |
3420 | 0 | foffset += 8; |
3421 | 0 | } |
3422 | 0 | else |
3423 | 0 | { |
3424 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, ENC_NA); |
3425 | 0 | foffset += 8; |
3426 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, ENC_NA); |
3427 | 0 | foffset += 8; |
3428 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_inc_across_feed, tvb, foffset, 8, ENC_NA); |
3429 | 0 | foffset += 8; |
3430 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_lower_range_n64, tvb, foffset, 8, ENC_NA); |
3431 | 0 | foffset += 8; |
3432 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_upper_range_n64, tvb, foffset, 8, ENC_NA); |
3433 | 0 | foffset += 8; |
3434 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_size_inc_in_feed, tvb, foffset, 8, ENC_NA); |
3435 | 0 | foffset += 8; |
3436 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_long_edge_feeds, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3437 | 0 | foffset += 4; |
3438 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xmin_n64, tvb, foffset, 8, ENC_NA); |
3439 | 0 | foffset += 8; |
3440 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xmax_n64, tvb, foffset, 8, ENC_NA); |
3441 | 0 | foffset += 8; |
3442 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ymin_n64, tvb, foffset, 8, ENC_NA); |
3443 | 0 | foffset += 8; |
3444 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ymax_n64, tvb, foffset, 8, ENC_NA); |
3445 | 0 | foffset += 8; |
3446 | 0 | } |
3447 | 0 | break; |
3448 | 0 | case 81: /* Input Tray Medium */ |
3449 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3450 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3451 | 0 | break; |
3452 | 0 | case 82: /* Output Bins Characteristics */ |
3453 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_page_informations, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3454 | 0 | foffset += 4; |
3455 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3456 | 0 | { |
3457 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3458 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3459 | 0 | break; |
3460 | 0 | } |
3461 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Page Information %u", ii+1); |
3462 | 0 | proto_tree_add_item(atree, hf_ndps_page_order, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3463 | 0 | foffset += 4; |
3464 | 0 | proto_tree_add_item(atree, hf_ndps_page_orientation, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3465 | 0 | foffset += 4; |
3466 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3467 | 0 | } |
3468 | 0 | break; |
3469 | 0 | case 83: /* Page ID Type */ |
3470 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_identifier_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3471 | 0 | foffset += 4; |
3472 | 0 | break; |
3473 | 0 | case 84: /* Level Range */ |
3474 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3475 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_lower_range, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3476 | 0 | foffset += 4; |
3477 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_upper_range, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3478 | 0 | foffset += 4; |
3479 | 0 | break; |
3480 | 0 | case 85: /* Category Set */ |
3481 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3482 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_categories, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3483 | 0 | foffset += 4; |
3484 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3485 | 0 | { |
3486 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3487 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3488 | 0 | break; |
3489 | 0 | } |
3490 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Category %u", ii+1); |
3491 | 0 | length = tvb_get_ntohl(tvb, foffset); |
3492 | 0 | foffset += 4; |
3493 | 0 | if (length==4) |
3494 | 0 | { |
3495 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
3496 | 0 | } |
3497 | 0 | foffset += length; |
3498 | 0 | foffset += (length%2); |
3499 | 0 | } |
3500 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_values, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3501 | 0 | foffset += 4; |
3502 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3503 | 0 | { |
3504 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3505 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3506 | 0 | break; |
3507 | 0 | } |
3508 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Value %d", ii+1); |
3509 | 0 | length = tvb_get_ntohl(tvb, foffset); |
3510 | 0 | foffset += 4; |
3511 | 0 | if (length==4) |
3512 | 0 | { |
3513 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
3514 | 0 | } |
3515 | 0 | tvb_ensure_bytes_exist(tvb, foffset, length+length%2); |
3516 | 0 | foffset += length; |
3517 | 0 | foffset += (length%2); |
3518 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3519 | 0 | } |
3520 | 0 | break; |
3521 | 0 | case 86: /* Numbers Up Supported */ |
3522 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_numbers_up, tvb, foffset, 4, ENC_BIG_ENDIAN, &numbers_up); |
3523 | 0 | foffset += 4; |
3524 | 0 | switch(numbers_up) |
3525 | 0 | { |
3526 | 0 | case 0: /*Cardinal*/ |
3527 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3528 | 0 | foffset += 4; |
3529 | 0 | break; |
3530 | 0 | case 1: /*Name or OID*/ |
3531 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3532 | 0 | break; |
3533 | 0 | case 2: /*Cardinal Range*/ |
3534 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_lower_range, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3535 | 0 | foffset += 4; |
3536 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_upper_range, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3537 | 0 | foffset += 4; |
3538 | 0 | break; |
3539 | 0 | default: |
3540 | 0 | break; |
3541 | 0 | } |
3542 | 0 | break; |
3543 | 0 | case 87: /* Finishing */ |
3544 | 0 | case 88: /* Print Contained Object ID */ |
3545 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_object_name, ndps_tree, foffset, NULL); |
3546 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3547 | 0 | foffset += 4; |
3548 | 0 | break; |
3549 | 0 | case 89: /* Print Config Object ID */ |
3550 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_object_name, ndps_tree, foffset, NULL); |
3551 | 0 | foffset = qualifiedname(tvb, pinfo->pool,ndps_tree, foffset); |
3552 | 0 | break; |
3553 | 0 | case 90: /* Typed Name */ |
3554 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_object_name, ndps_tree, foffset, NULL); |
3555 | 0 | proto_tree_add_item(ndps_tree, hf_level, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3556 | 0 | foffset += 4; |
3557 | 0 | proto_tree_add_item(ndps_tree, hf_interval, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3558 | 0 | foffset += 4; |
3559 | 0 | break; |
3560 | 0 | case 91: /* Network Address */ |
3561 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_address, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3562 | 0 | foffset += 4; |
3563 | 0 | length = tvb_get_ntohl(tvb, foffset); |
3564 | 0 | foffset += 4; |
3565 | 0 | if (length!=0) |
3566 | 0 | { |
3567 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_add_bytes, tvb, foffset, 4, ENC_NA); |
3568 | 0 | } |
3569 | 0 | foffset += length; |
3570 | 0 | break; |
3571 | 0 | case 92: /* XY Dimensions Value */ |
3572 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_xydim_value, tvb, foffset, 4, ENC_BIG_ENDIAN, &dimension); |
3573 | 0 | foffset += 4; |
3574 | 0 | switch (dimension) |
3575 | 0 | { |
3576 | 0 | case 1: |
3577 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3578 | 0 | break; |
3579 | | |
3580 | 0 | case 0: |
3581 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xdimension_n64, tvb, foffset, 8, ENC_NA); |
3582 | 0 | foffset += 8; |
3583 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ydimension_n64, tvb, foffset, 8, ENC_NA); |
3584 | 0 | foffset += 8; |
3585 | 0 | break; |
3586 | | |
3587 | 0 | default: |
3588 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xdimension, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3589 | 0 | foffset += 4; |
3590 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ydimension, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3591 | 0 | foffset += 4; |
3592 | 0 | break; |
3593 | 0 | } |
3594 | 0 | break; |
3595 | 0 | case 93: /* Name or OID Dimensions Map */ |
3596 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3597 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_xdimension, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3598 | 0 | foffset += 4; |
3599 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ydimension, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3600 | 0 | foffset += 4; |
3601 | 0 | break; |
3602 | 0 | case 94: /* Printer State Reason */ |
3603 | 0 | foffset += 4; |
3604 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3605 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_state_severity, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3606 | 0 | foffset += 4; |
3607 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_training, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3608 | 0 | foffset += 4; |
3609 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3610 | 0 | foffset += align_4(tvb, foffset); |
3611 | 0 | foffset = objectidentification(tvb, pinfo->pool, ndps_tree, foffset); |
3612 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3613 | 0 | foffset += 4; |
3614 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
3615 | 0 | foffset += 4*number_of_items; |
3616 | | /*foffset += align_4(tvb, foffset);*/ |
3617 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3618 | |
|
3619 | 0 | break; |
3620 | 0 | case 96: /* Qualified Name */ |
3621 | 0 | foffset = qualifiedname(tvb, pinfo->pool,ndps_tree, foffset); |
3622 | 0 | break; |
3623 | 0 | case 97: /* Qualified Name Set */ |
3624 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_names, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3625 | 0 | foffset += 4; |
3626 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3627 | 0 | { |
3628 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3629 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3630 | 0 | break; |
3631 | 0 | } |
3632 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Name %u", ii+1); |
3633 | 0 | foffset = qualifiedname(tvb, pinfo->pool,atree, foffset); |
3634 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3635 | 0 | } |
3636 | 0 | break; |
3637 | 0 | case 98: /* Colorant Set */ |
3638 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_colorant_set, tvb, foffset, 4, ENC_BIG_ENDIAN, &colorant_set); |
3639 | 0 | foffset += 4; |
3640 | 0 | if (colorant_set==0) |
3641 | 0 | { |
3642 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3643 | 0 | } |
3644 | 0 | else |
3645 | 0 | { |
3646 | |
|
3647 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3648 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_colorants, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3649 | 0 | foffset += 4; |
3650 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3651 | 0 | { |
3652 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3653 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3654 | 0 | break; |
3655 | 0 | } |
3656 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Colorant %u", ii+1); |
3657 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
3658 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3659 | 0 | } |
3660 | 0 | } |
3661 | 0 | break; |
3662 | 0 | case 99: /* Resource Printer ID */ |
3663 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3664 | 0 | foffset += 4; |
3665 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3666 | 0 | { |
3667 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3668 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3669 | 0 | break; |
3670 | 0 | } |
3671 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Printer %u", ii+1); |
3672 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_type, atree, foffset, NULL); |
3673 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_manuf, atree, foffset, NULL); |
3674 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_inf_file_name, atree, foffset, NULL); |
3675 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3676 | 0 | } |
3677 | 0 | proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3678 | 0 | foffset += 4; |
3679 | 0 | break; |
3680 | 0 | case 100: /* Event Object ID */ |
3681 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
3682 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3683 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3684 | 0 | foffset += 4; |
3685 | 0 | break; |
3686 | 0 | case 101: /* Qualified Name Map */ |
3687 | 0 | foffset = qualifiedname(tvb, pinfo->pool,ndps_tree, foffset); |
3688 | 0 | foffset = qualifiedname(tvb, pinfo->pool,ndps_tree, foffset); |
3689 | 0 | break; |
3690 | 0 | case 104: /* Cardinal or Enum or Time */ |
3691 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_card_enum_time, tvb, foffset, 4, ENC_BIG_ENDIAN, &card_enum_time); |
3692 | 0 | foffset += 4; |
3693 | 0 | switch (card_enum_time) |
3694 | 0 | { |
3695 | 0 | case 0: |
3696 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3697 | 0 | foffset += 4; |
3698 | 0 | break; |
3699 | | |
3700 | 0 | case 1: |
3701 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3702 | 0 | foffset += 4; |
3703 | 0 | break; |
3704 | | |
3705 | 0 | default: |
3706 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3707 | 0 | foffset += 4; |
3708 | 0 | break; |
3709 | 0 | } |
3710 | 0 | break; |
3711 | 0 | case 105: /* Print Contained Object ID Set */ |
3712 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3713 | 0 | foffset += 4; |
3714 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3715 | 0 | { |
3716 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3717 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3718 | 0 | break; |
3719 | 0 | } |
3720 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object %u", ii+1); |
3721 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, atree, foffset, NULL); |
3722 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3723 | 0 | foffset += 4; |
3724 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3725 | 0 | } |
3726 | 0 | break; |
3727 | 0 | case 106: /* Octet String Pair */ |
3728 | 0 | length = tvb_get_ntohl(tvb, foffset); |
3729 | 0 | foffset += 4; |
3730 | 0 | if (length!=0) |
3731 | 0 | { |
3732 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, ENC_NA); |
3733 | 0 | } |
3734 | 0 | foffset += length; |
3735 | 0 | foffset += (length%2); |
3736 | 0 | length = tvb_get_ntohl(tvb, foffset); |
3737 | 0 | foffset += 4; |
3738 | 0 | if (length!=0) |
3739 | 0 | { |
3740 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, ENC_NA); |
3741 | 0 | } |
3742 | 0 | foffset += length; |
3743 | 0 | foffset += (length%2); |
3744 | 0 | break; |
3745 | 0 | case 107: /* Octet String Integer Pair */ |
3746 | 0 | length = tvb_get_ntohl(tvb, foffset); |
3747 | 0 | foffset += 4; |
3748 | 0 | if (length!=0) |
3749 | 0 | { |
3750 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, ENC_NA); |
3751 | 0 | } |
3752 | 0 | foffset += length; |
3753 | 0 | foffset += (length%2); |
3754 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3755 | 0 | foffset += 4; |
3756 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3757 | 0 | foffset += 4; |
3758 | 0 | break; |
3759 | 0 | case 109: /* Event Handling Profile 2 */ |
3760 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3761 | 0 | foffset += 4; |
3762 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3763 | 0 | foffset += 4; |
3764 | 0 | foffset = qualifiedname(tvb, pinfo->pool,ndps_tree, foffset); |
3765 | 0 | length = tvb_get_ntohl(tvb, foffset); |
3766 | 0 | foffset += 4; |
3767 | 0 | if (length!=0) |
3768 | 0 | { |
3769 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, ENC_NA); |
3770 | 0 | } |
3771 | 0 | foffset += length; |
3772 | 0 | foffset += (length%2); |
3773 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3774 | 0 | foffset += 4; |
3775 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3776 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_delivery_add_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3777 | 0 | event_object_type = tvb_get_ntohl(tvb, foffset); |
3778 | 0 | foffset += 4; |
3779 | 0 | switch(event_object_type) |
3780 | 0 | { |
3781 | 0 | case 0: /*MHS ADDR*/ |
3782 | 0 | case 1: /*DISTINGUISHED_NAME*/ |
3783 | 0 | case 2: /*TEXT*/ |
3784 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_tree, ndps_tree, foffset, NULL); |
3785 | 0 | break; |
3786 | 0 | case 3: /*OCTET_STRING*/ |
3787 | 0 | length = tvb_get_ntohl(tvb, foffset); |
3788 | 0 | foffset += 4; |
3789 | 0 | if (length!=0) |
3790 | 0 | { |
3791 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_octet_string, tvb, foffset, length, ENC_NA); |
3792 | 0 | } |
3793 | 0 | foffset += length; |
3794 | 0 | foffset += (length%2); |
3795 | 0 | break; |
3796 | 0 | case 4: /*DIST_NAME_STRING*/ |
3797 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_object_name, ndps_tree, foffset, NULL); |
3798 | 0 | foffset = name_or_id(tvb, pinfo->pool, ndps_tree, foffset); |
3799 | 0 | break; |
3800 | 0 | case 5: /*RPC_ADDRESS*/ |
3801 | 0 | case 6: /*QUALIFIED_NAME*/ |
3802 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3803 | 0 | foffset = qualifiedname(tvb, pinfo->pool,ndps_tree, foffset); |
3804 | 0 | break; |
3805 | 0 | default: |
3806 | 0 | break; |
3807 | 0 | } |
3808 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_events, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3809 | 0 | foffset += 4; |
3810 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3811 | 0 | { |
3812 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3813 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3814 | 0 | break; |
3815 | 0 | } |
3816 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Event %u", ii+1); |
3817 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_object_name, atree, foffset, NULL); |
3818 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
3819 | 0 | proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3820 | 0 | foffset += 4; |
3821 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3822 | 0 | } |
3823 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
3824 | 0 | foffset = qualifiedname(tvb, pinfo->pool,ndps_tree, foffset); |
3825 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
3826 | 0 | foffset += 4; |
3827 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3828 | 0 | { |
3829 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3830 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3831 | 0 | break; |
3832 | 0 | } |
3833 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object %u", ii+1); |
3834 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
3835 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3836 | 0 | } |
3837 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3838 | 0 | foffset += 4; |
3839 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3840 | 0 | foffset += 4; |
3841 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3842 | 0 | foffset += 4; |
3843 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
3844 | 0 | break; |
3845 | 0 | default: |
3846 | 0 | break; |
3847 | 0 | } |
3848 | 0 | return foffset; |
3849 | 0 | } |
3850 | | |
3851 | | |
3852 | | static int |
3853 | | commonarguments(tvbuff_t* tvb, packet_info* pinfo, proto_tree *ndps_tree, unsigned foffset) |
3854 | 0 | { |
3855 | 0 | uint32_t number_of_items; |
3856 | 0 | uint32_t ii; |
3857 | 0 | proto_tree *atree, *btree; |
3858 | 0 | proto_item *aitem, *bitem, *expert_item; |
3859 | |
|
3860 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Common Arguments"); |
3861 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
3862 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_num_args, tvb, foffset, 4, number_of_items); |
3863 | 0 | foffset += 4; |
3864 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
3865 | 0 | { |
3866 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
3867 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
3868 | 0 | break; |
3869 | 0 | } |
3870 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Argument %u", ii+1); |
3871 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); |
3872 | 0 | proto_item_set_end(bitem, tvb, foffset); |
3873 | 0 | } |
3874 | 0 | proto_item_set_end(aitem, tvb, foffset); |
3875 | 0 | return foffset; |
3876 | 0 | } |
3877 | | |
3878 | | static int |
3879 | | res_add_input_data(tvbuff_t* tvb, packet_info* pinfo, proto_tree *ndps_tree, unsigned foffset) |
3880 | 0 | { |
3881 | 0 | uint32_t resource_type=0; |
3882 | |
|
3883 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_res_type, tvb, foffset, 4, ENC_BIG_ENDIAN, &resource_type); |
3884 | 0 | foffset += 4; |
3885 | 0 | switch (resource_type) |
3886 | 0 | { |
3887 | 0 | case 0: /* Print Drivers */ |
3888 | 0 | proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3889 | 0 | foffset += 4; |
3890 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL); |
3891 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_file_name, ndps_tree, foffset, NULL); |
3892 | 0 | break; |
3893 | 0 | case 1: /* Printer Definitions */ |
3894 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_vendor_dir, ndps_tree, foffset, NULL); |
3895 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_file_name, ndps_tree, foffset, NULL); |
3896 | 0 | break; |
3897 | 0 | case 2: /* Banner Page Files */ |
3898 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_banner_name, ndps_tree, foffset, NULL); |
3899 | 0 | break; |
3900 | 0 | case 3: /* Font Types */ |
3901 | 0 | proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3902 | 0 | foffset += 4; |
3903 | 0 | proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3904 | 0 | foffset += 4; |
3905 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_file_name, ndps_tree, foffset, NULL); |
3906 | 0 | break; |
3907 | 0 | case 4: /* Generic Files/ Archive */ |
3908 | 0 | case 5: /* Printer Driver Archive */ |
3909 | 0 | proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3910 | 0 | foffset += 4; |
3911 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL); |
3912 | 0 | proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
3913 | 0 | foffset += 4; |
3914 | 0 | break; |
3915 | 0 | default: |
3916 | 0 | break; |
3917 | 0 | } |
3918 | 0 | return foffset; |
3919 | 0 | } |
3920 | | |
3921 | | |
3922 | | static const fragment_items ndps_frag_items = { |
3923 | | &ett_ndps_segment, |
3924 | | &ett_ndps_segments, |
3925 | | &hf_ndps_segments, |
3926 | | &hf_ndps_segment, |
3927 | | &hf_ndps_segment_overlap, |
3928 | | &hf_ndps_segment_overlap_conflict, |
3929 | | &hf_ndps_segment_multiple_tails, |
3930 | | &hf_ndps_segment_too_long_segment, |
3931 | | &hf_ndps_segment_error, |
3932 | | &hf_ndps_segment_count, |
3933 | | NULL, |
3934 | | &hf_ndps_reassembled_length, |
3935 | | /* Reassembled data field */ |
3936 | | NULL, |
3937 | | "segments" |
3938 | | }; |
3939 | | |
3940 | | /* NDPS packets come in request/reply pairs. The request packets tell the |
3941 | | * Function and Program numbers. The response, unfortunately, only |
3942 | | * identifies itself via the Exchange ID; you have to know what type of NDPS |
3943 | | * request the request packet contained in order to successfully parse the |
3944 | | * response. A global method for doing this does not exist in wireshark yet |
3945 | | * (NFS also requires it), so for now the NDPS section will keep its own hash |
3946 | | * table keeping track of NDPS packets. |
3947 | | * |
3948 | | * We construct a conversation specified by the client and server |
3949 | | * addresses and the connection number; the key representing the unique |
3950 | | * NDPS request then is composed of the pointer to the conversation |
3951 | | * structure, cast to a "uint" (which may throw away the upper 32 |
3952 | | * bits of the pointer on a P64 platform, but the low-order 32 bits |
3953 | | * are more likely to differ between conversations than the upper 32 bits), |
3954 | | * and the sequence number. |
3955 | | * |
3956 | | * The value stored in the hash table is the ncp_req_hash_value pointer. This |
3957 | | * struct tells us the NDPS Program and Function and gives the NDPS_record pointer. |
3958 | | */ |
3959 | | typedef struct { |
3960 | | conversation_t *conversation; |
3961 | | uint32_t ndps_xport; |
3962 | | } ndps_req_hash_key; |
3963 | | |
3964 | | typedef struct { |
3965 | | uint32_t ndps_prog; |
3966 | | uint32_t ndps_func; |
3967 | | uint32_t ndps_frame_num; |
3968 | | bool ndps_frag; |
3969 | | uint32_t ndps_end_frag; |
3970 | | } ndps_req_hash_value; |
3971 | | |
3972 | | static wmem_map_t *ndps_req_hash; |
3973 | | |
3974 | | /* Hash Functions */ |
3975 | | static int |
3976 | | ndps_equal(const void *v, const void *v2) |
3977 | 0 | { |
3978 | 0 | const ndps_req_hash_key *val1 = (const ndps_req_hash_key*)v; |
3979 | 0 | const ndps_req_hash_key *val2 = (const ndps_req_hash_key*)v2; |
3980 | |
|
3981 | 0 | if (val1->conversation == val2->conversation && |
3982 | 0 | val1->ndps_xport == val2->ndps_xport ) { |
3983 | 0 | return 1; |
3984 | 0 | } |
3985 | 0 | return 0; |
3986 | 0 | } |
3987 | | |
3988 | | static unsigned |
3989 | | ndps_hash(const void *v) |
3990 | 0 | { |
3991 | 0 | const ndps_req_hash_key *ndps_key = (const ndps_req_hash_key*)v; |
3992 | 0 | return GPOINTER_TO_UINT(ndps_key->conversation) + ndps_key->ndps_xport; |
3993 | 0 | } |
3994 | | |
3995 | | static ndps_req_hash_value* |
3996 | | ndps_hash_insert(conversation_t *conversation, uint32_t ndps_xport) |
3997 | 0 | { |
3998 | 0 | ndps_req_hash_key *request_key; |
3999 | 0 | ndps_req_hash_value *request_value; |
4000 | | |
4001 | | /* Now remember the request, so we can find it if we later |
4002 | | a reply to it. */ |
4003 | 0 | request_key = wmem_new(wmem_file_scope(), ndps_req_hash_key); |
4004 | 0 | request_key->conversation = conversation; |
4005 | 0 | request_key->ndps_xport = ndps_xport; |
4006 | |
|
4007 | 0 | request_value = wmem_new(wmem_file_scope(), ndps_req_hash_value); |
4008 | 0 | request_value->ndps_prog = 0; |
4009 | 0 | request_value->ndps_func = 0; |
4010 | 0 | request_value->ndps_frame_num = 0; |
4011 | 0 | request_value->ndps_frag = false; |
4012 | 0 | request_value->ndps_end_frag = 0; |
4013 | |
|
4014 | 0 | wmem_map_insert(ndps_req_hash, request_key, request_value); |
4015 | |
|
4016 | 0 | return request_value; |
4017 | 0 | } |
4018 | | |
4019 | | /* Returns the ncp_rec*, or NULL if not found. */ |
4020 | | static ndps_req_hash_value* |
4021 | | ndps_hash_lookup(conversation_t *conversation, uint32_t ndps_xport) |
4022 | 0 | { |
4023 | 0 | ndps_req_hash_key request_key; |
4024 | |
|
4025 | 0 | request_key.conversation = conversation; |
4026 | 0 | request_key.ndps_xport = ndps_xport; |
4027 | |
|
4028 | 0 | return (ndps_req_hash_value *)wmem_map_lookup(ndps_req_hash, &request_key); |
4029 | 0 | } |
4030 | | |
4031 | | /* ================================================================= */ |
4032 | | /* NDPS */ |
4033 | | /* ================================================================= */ |
4034 | | |
4035 | | static void |
4036 | | dissect_ndps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree) |
4037 | 48 | { |
4038 | 48 | uint32_t ndps_xid; |
4039 | 48 | uint32_t ndps_prog; |
4040 | 48 | uint32_t ndps_packet_type; |
4041 | 48 | int foffset; |
4042 | 48 | uint32_t ndps_hfname; |
4043 | 48 | uint32_t ndps_func; |
4044 | 48 | const char *ndps_program_string; |
4045 | 48 | const char *ndps_func_string; |
4046 | | |
4047 | | |
4048 | 48 | ndps_packet_type = tvb_get_ntohl(tvb, 8); |
4049 | 48 | if (ndps_packet_type != 0 && ndps_packet_type != 1) { /* Packet Type */ |
4050 | 10 | col_set_str(pinfo->cinfo, COL_INFO, "(Continuation Data)"); |
4051 | 10 | proto_tree_add_bytes_format(ndps_tree, hf_ndps_data, tvb, 0, -1, NULL, "Data - (%d Bytes)", tvb_reported_length(tvb)); |
4052 | 10 | return; |
4053 | 10 | } |
4054 | 38 | foffset = 0; |
4055 | 38 | proto_tree_add_item(ndps_tree, hf_ndps_record_mark, tvb, |
4056 | 38 | foffset, 2, ENC_BIG_ENDIAN); |
4057 | 38 | foffset += 2; |
4058 | 38 | proto_tree_add_item(ndps_tree, hf_ndps_length, tvb, |
4059 | 38 | foffset, 2, ENC_BIG_ENDIAN); |
4060 | 38 | foffset += 2; |
4061 | | |
4062 | 38 | ndps_xid = tvb_get_ntohl(tvb, foffset); |
4063 | 38 | proto_tree_add_uint(ndps_tree, hf_ndps_xid, tvb, foffset, 4, ndps_xid); |
4064 | 38 | foffset += 4; |
4065 | 38 | ndps_packet_type = tvb_get_ntohl(tvb, foffset); |
4066 | 38 | proto_tree_add_uint(ndps_tree, hf_ndps_packet_type, tvb, foffset, 4, ndps_packet_type); |
4067 | 38 | foffset += 4; |
4068 | 38 | if(ndps_packet_type == 0x00000001) /* Reply packet */ |
4069 | 2 | { |
4070 | 2 | col_set_str(pinfo->cinfo, COL_INFO, "R NDPS "); |
4071 | 2 | proto_tree_add_item(ndps_tree, hf_ndps_rpc_accept, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4072 | 2 | if (tvb_get_ntohl(tvb, foffset)==0) { |
4073 | 0 | foffset += 4; |
4074 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 8, ENC_NA); |
4075 | 0 | foffset += 8; |
4076 | 0 | } |
4077 | 2 | else |
4078 | 2 | { |
4079 | 2 | foffset += 4; |
4080 | 2 | proto_tree_add_item(ndps_tree, hf_ndps_rpc_rej_stat, tvb, foffset+4, 4, ENC_BIG_ENDIAN); |
4081 | 2 | foffset += 4; |
4082 | 2 | } |
4083 | 2 | dissect_ndps_reply(tvb, pinfo, ndps_tree, foffset); |
4084 | 2 | } |
4085 | 36 | else |
4086 | 36 | { |
4087 | 36 | col_set_str(pinfo->cinfo, COL_INFO, "C NDPS "); |
4088 | 36 | proto_tree_add_item(ndps_tree, hf_ndps_rpc_version, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4089 | 36 | foffset += 4; |
4090 | 36 | ndps_prog = tvb_get_ntohl(tvb, foffset); |
4091 | 36 | ndps_program_string = try_val_to_str(ndps_prog, spx_ndps_program_vals); |
4092 | 36 | if( ndps_program_string != NULL) |
4093 | 0 | { |
4094 | 0 | proto_tree_add_item(ndps_tree, hf_spx_ndps_program, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4095 | 0 | foffset += 4; |
4096 | 0 | col_append_str(pinfo->cinfo, COL_INFO, (const char*) ndps_program_string); |
4097 | 0 | col_append_str(pinfo->cinfo, COL_INFO, ", "); |
4098 | |
|
4099 | 0 | proto_tree_add_item(ndps_tree, hf_spx_ndps_version, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4100 | 0 | foffset += 4; |
4101 | 0 | ndps_func = tvb_get_ntohl(tvb, foffset); |
4102 | 0 | switch(ndps_prog) |
4103 | 0 | { |
4104 | 0 | case 0x060976: |
4105 | 0 | ndps_hfname = hf_spx_ndps_func_print; |
4106 | 0 | ndps_func_string = try_val_to_str_ext(ndps_func, &spx_ndps_print_func_vals_ext); |
4107 | 0 | break; |
4108 | 0 | case 0x060977: |
4109 | 0 | ndps_hfname = hf_spx_ndps_func_broker; |
4110 | 0 | ndps_func_string = try_val_to_str_ext(ndps_func, &spx_ndps_broker_func_vals_ext); |
4111 | 0 | break; |
4112 | 0 | case 0x060978: |
4113 | 0 | ndps_hfname = hf_spx_ndps_func_registry; |
4114 | 0 | ndps_func_string = try_val_to_str_ext(ndps_func, &spx_ndps_registry_func_vals_ext); |
4115 | 0 | break; |
4116 | 0 | case 0x060979: |
4117 | 0 | ndps_hfname = hf_spx_ndps_func_notify; |
4118 | 0 | ndps_func_string = try_val_to_str_ext(ndps_func, &spx_ndps_notify_func_vals_ext); |
4119 | 0 | break; |
4120 | 0 | case 0x06097a: |
4121 | 0 | ndps_hfname = hf_spx_ndps_func_resman; |
4122 | 0 | ndps_func_string = try_val_to_str_ext(ndps_func, &spx_ndps_resman_func_vals_ext); |
4123 | 0 | break; |
4124 | 0 | case 0x06097b: |
4125 | 0 | ndps_hfname = hf_spx_ndps_func_delivery; |
4126 | 0 | ndps_func_string = try_val_to_str(ndps_func, spx_ndps_deliver_func_vals); |
4127 | 0 | break; |
4128 | 0 | default: |
4129 | 0 | ndps_hfname = 0; |
4130 | 0 | ndps_func_string = NULL; |
4131 | 0 | break; |
4132 | 0 | } |
4133 | 0 | if(ndps_hfname != 0) |
4134 | 0 | { |
4135 | 0 | proto_tree_add_item(ndps_tree, ndps_hfname, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4136 | 0 | if (ndps_func_string != NULL) |
4137 | 0 | { |
4138 | 0 | col_append_str(pinfo->cinfo, COL_INFO, (const char*) ndps_func_string); |
4139 | |
|
4140 | 0 | foffset += 4; |
4141 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_auth_null, tvb, foffset, 16, ENC_NA); |
4142 | 0 | foffset+=16; |
4143 | 0 | dissect_ndps_request(tvb, pinfo, ndps_tree, ndps_prog, ndps_func, foffset); |
4144 | 0 | } |
4145 | 0 | } |
4146 | 0 | } |
4147 | 36 | } |
4148 | 38 | } |
4149 | | |
4150 | | static unsigned |
4151 | | get_ndps_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) |
4152 | 48 | { |
4153 | 48 | return tvb_get_ntohs(tvb, offset +2) + 4; |
4154 | 48 | } |
4155 | | |
4156 | | static int |
4157 | | dissect_ndps_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
4158 | 48 | { |
4159 | 48 | proto_tree *ndps_tree; |
4160 | 48 | proto_item *ti; |
4161 | | |
4162 | 48 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS"); |
4163 | | |
4164 | 48 | col_clear(pinfo->cinfo, COL_INFO); |
4165 | | |
4166 | 48 | ti = proto_tree_add_item(tree, proto_ndps, tvb, 0, -1, ENC_NA); |
4167 | 48 | ndps_tree = proto_item_add_subtree(ti, ett_ndps); |
4168 | | |
4169 | 48 | dissect_ndps(tvb, pinfo, ndps_tree); |
4170 | 48 | return tvb_captured_length(tvb); |
4171 | 48 | } |
4172 | | |
4173 | | /* |
4174 | | * Defrag logic |
4175 | | * |
4176 | | * SPX EOM not being set indicates we are inside or at the |
4177 | | * beginning of a fragment. But when the end of the fragment |
4178 | | * is encountered the flag is set. So we must mark what the |
4179 | | * frame number is of the end fragment so that we will be |
4180 | | * able to redissect if the user clicks on the packet |
4181 | | * or resorts/filters the trace. |
4182 | | * |
4183 | | * Once we are certain that we are in a fragment sequence |
4184 | | * then we can just process each fragment in this conversation |
4185 | | * until we reach the eom message packet. We can tell we are at |
4186 | | * the final fragment because it is flagged as SPX EOM. |
4187 | | * |
4188 | | * We will be able to easily determine if a conversation is a fragment |
4189 | | * with the exception of the last packet in the fragment. So remember |
4190 | | * the last fragment packet number. |
4191 | | */ |
4192 | | static void |
4193 | | ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, spx_info *spx_info_p) |
4194 | 0 | { |
4195 | 0 | unsigned len=0; |
4196 | 0 | tvbuff_t *next_tvb = NULL; |
4197 | 0 | fragment_head *fd_head; |
4198 | 0 | ndps_req_hash_value *request_value = NULL; |
4199 | 0 | conversation_t *conversation; |
4200 | | |
4201 | | /* Check to see if defragmentation is enabled in the dissector */ |
4202 | 0 | if (!ndps_defragment) { |
4203 | 0 | dissect_ndps(tvb, pinfo, tree); |
4204 | 0 | return; |
4205 | 0 | } |
4206 | | /* Has this already been dissected? */ |
4207 | 0 | if (!pinfo->fd->visited) |
4208 | 0 | { |
4209 | | /* Lets see if this is a new conversation */ |
4210 | 0 | conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, |
4211 | 0 | CONVERSATION_NCP, (uint32_t) pinfo->srcport, (uint32_t) pinfo->srcport, 0); |
4212 | |
|
4213 | 0 | if (conversation == NULL) |
4214 | 0 | { |
4215 | | /* It's not part of any conversation - create a new one. */ |
4216 | 0 | conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, |
4217 | 0 | CONVERSATION_NCP, (uint32_t) pinfo->srcport, (uint32_t) pinfo->srcport, 0); |
4218 | 0 | } |
4219 | | |
4220 | | /* So now we need to get the request info for this conversation */ |
4221 | 0 | request_value = ndps_hash_lookup(conversation, (uint32_t) pinfo->srcport); |
4222 | 0 | if (request_value == NULL) |
4223 | 0 | { |
4224 | | /* We haven't seen a packet with this conversation yet so create one. */ |
4225 | 0 | request_value = ndps_hash_insert(conversation, (uint32_t) pinfo->srcport); |
4226 | 0 | } |
4227 | | /* Add it to pinfo so we can get it on further dissection requests */ |
4228 | 0 | p_add_proto_data(wmem_file_scope(), pinfo, proto_ndps, 0, (void*) request_value); |
4229 | 0 | } |
4230 | 0 | else |
4231 | 0 | { |
4232 | | /* Get request value data */ |
4233 | 0 | request_value = (ndps_req_hash_value *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ndps, 0); |
4234 | 0 | } |
4235 | 0 | if (!request_value) |
4236 | 0 | { |
4237 | | /* Can't find the original request packet so this is not any fragment packet */ |
4238 | 0 | dissect_ndps(tvb, pinfo, tree); |
4239 | 0 | return; |
4240 | 0 | } |
4241 | | /* Check to see of this is a fragment. If so then mark as a fragment. */ |
4242 | 0 | if (!spx_info_p->eom) { |
4243 | 0 | request_value->ndps_frag = true; |
4244 | 0 | } |
4245 | | /* Now we process the fragments */ |
4246 | 0 | if (request_value->ndps_frag || (request_value->ndps_end_frag == pinfo->num)) |
4247 | 0 | { |
4248 | | /* |
4249 | | * Fragment |
4250 | | */ |
4251 | 0 | tid = (pinfo->srcport+pinfo->destport); |
4252 | 0 | len = tvb_reported_length(tvb); |
4253 | 0 | if (tvb_captured_length(tvb) >= len) |
4254 | 0 | { |
4255 | 0 | fd_head = fragment_add_seq_next(&ndps_reassembly_table, tvb, 0, pinfo, tid, NULL, len, !spx_info_p->eom); |
4256 | 0 | if (fd_head != NULL) |
4257 | 0 | { |
4258 | | /* Is this the last fragment? EOM will indicate */ |
4259 | 0 | if (fd_head->next != NULL && spx_info_p->eom) |
4260 | 0 | { |
4261 | 0 | proto_item *frag_tree_item; |
4262 | |
|
4263 | 0 | next_tvb = tvb_new_chain(tvb, fd_head->tvb_data); |
4264 | 0 | add_new_data_source(pinfo, |
4265 | 0 | next_tvb, |
4266 | 0 | "Reassembled NDPS"); |
4267 | | /* Show all fragments. */ |
4268 | 0 | if (tree) |
4269 | 0 | { |
4270 | 0 | show_fragment_seq_tree(fd_head, |
4271 | 0 | &ndps_frag_items, |
4272 | 0 | tree, pinfo, |
4273 | 0 | next_tvb, &frag_tree_item); |
4274 | 0 | tid++; |
4275 | 0 | } |
4276 | | /* Remember this fragment number so we can dissect again */ |
4277 | 0 | request_value->ndps_end_frag = pinfo->num; |
4278 | |
|
4279 | 0 | } |
4280 | 0 | else |
4281 | 0 | { |
4282 | | /* This is either a beginning or middle fragment on second dissection */ |
4283 | 0 | next_tvb = tvb_new_subset_remaining(tvb, 0); |
4284 | 0 | if (!spx_info_p->eom) |
4285 | 0 | { |
4286 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "[NDPS Fragment]"); |
4287 | 0 | } |
4288 | 0 | } |
4289 | 0 | } |
4290 | 0 | else |
4291 | 0 | { |
4292 | | /* Fragment from first pass of dissection */ |
4293 | 0 | if (!spx_info_p->eom) |
4294 | 0 | { |
4295 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "[NDPS Fragment]"); |
4296 | 0 | } |
4297 | |
|
4298 | 0 | next_tvb = NULL; |
4299 | 0 | } |
4300 | 0 | } |
4301 | 0 | else |
4302 | 0 | { |
4303 | | /* |
4304 | | * There are no bytes so Dissect this |
4305 | | */ |
4306 | 0 | next_tvb = tvb_new_subset_remaining(tvb, 0); |
4307 | 0 | } |
4308 | 0 | if (next_tvb == NULL) |
4309 | 0 | { |
4310 | | /* This is a fragment packet */ |
4311 | 0 | next_tvb = tvb_new_subset_remaining (tvb, 0); |
4312 | 0 | call_data_dissector(next_tvb, pinfo, tree); |
4313 | 0 | } |
4314 | 0 | else |
4315 | 0 | { |
4316 | | /* This is the end fragment so dissect and mark end */ |
4317 | 0 | if (spx_info_p->eom) { |
4318 | 0 | request_value->ndps_frag = false; |
4319 | 0 | dissect_ndps(next_tvb, pinfo, tree); |
4320 | 0 | } |
4321 | 0 | } |
4322 | 0 | } |
4323 | 0 | else |
4324 | 0 | { |
4325 | | /* This is not any fragment packet */ |
4326 | 0 | request_value->ndps_frag = false; |
4327 | 0 | dissect_ndps(tvb, pinfo, tree); |
4328 | 0 | } |
4329 | 0 | } |
4330 | | |
4331 | | static int |
4332 | | dissect_ndps_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
4333 | 12 | { |
4334 | 12 | tcp_dissect_pdus(tvb, pinfo, tree, ndps_desegment, 4, get_ndps_pdu_len, dissect_ndps_pdu, data); |
4335 | 12 | return tvb_captured_length(tvb); |
4336 | 12 | } |
4337 | | |
4338 | | |
4339 | | static int |
4340 | | dissect_ndps_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) |
4341 | 0 | { |
4342 | 0 | proto_tree *ndps_tree; |
4343 | 0 | proto_item *ti; |
4344 | | |
4345 | | /* Reject the packet if data is NULL */ |
4346 | 0 | if (data == NULL) |
4347 | 0 | return 0; |
4348 | | |
4349 | 0 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDPS"); |
4350 | |
|
4351 | 0 | col_clear(pinfo->cinfo, COL_INFO); |
4352 | |
|
4353 | 0 | ti = proto_tree_add_item(tree, proto_ndps, tvb, 0, -1, ENC_NA); |
4354 | 0 | ndps_tree = proto_item_add_subtree(ti, ett_ndps); |
4355 | |
|
4356 | 0 | ndps_defrag(tvb, pinfo, ndps_tree, (spx_info*)data); |
4357 | 0 | return tvb_captured_length(tvb); |
4358 | 0 | } |
4359 | | |
4360 | | static unsigned |
4361 | | dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, uint32_t ndps_prog, uint32_t ndps_func, unsigned foffset) |
4362 | 0 | { |
4363 | 0 | ndps_req_hash_value *request_value = NULL; |
4364 | 0 | conversation_t *conversation; |
4365 | 0 | uint32_t ii; |
4366 | 0 | uint32_t jj; |
4367 | 0 | uint32_t field_len; |
4368 | 0 | uint32_t cred_type; |
4369 | 0 | uint32_t resource_type; |
4370 | 0 | uint32_t filter_type; |
4371 | 0 | uint32_t print_type; |
4372 | 0 | uint32_t length; |
4373 | 0 | uint32_t number_of_items; |
4374 | 0 | uint32_t number_of_items2; |
4375 | 0 | uint32_t doc_content; |
4376 | 0 | uint32_t list_attr_op; |
4377 | 0 | uint32_t scope; |
4378 | 0 | uint32_t job_type; |
4379 | 0 | uint32_t supplier_flag; |
4380 | 0 | bool language_flag; |
4381 | 0 | bool method_flag; |
4382 | 0 | bool delivery_address_flag; |
4383 | 0 | uint32_t profiles_type; |
4384 | 0 | uint32_t profiles_choice_type; |
4385 | 0 | uint32_t integer_type_flag; |
4386 | 0 | uint32_t local_servers_type; |
4387 | 0 | int length_remaining; |
4388 | 0 | proto_tree *atree, *btree, *ctree, *dtree; |
4389 | 0 | proto_item *aitem, *bitem, *citem, *ditem, *expert_item; |
4390 | |
|
4391 | 0 | if (!pinfo->fd->visited) |
4392 | 0 | { |
4393 | | /* This is the first time we've looked at this packet. |
4394 | | Keep track of the Program and connection whence the request |
4395 | | came, and the address and connection to which the request |
4396 | | is being sent, so that we can match up calls with replies. |
4397 | | (We don't include the sequence number, as we may want |
4398 | | to have all packets over the same connection treated |
4399 | | as being part of a single conversation so that we can |
4400 | | let the user select that conversation to be displayed.) */ |
4401 | |
|
4402 | 0 | conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, |
4403 | 0 | CONVERSATION_NCP, (uint32_t) pinfo->srcport, (uint32_t) pinfo->srcport, 0); |
4404 | |
|
4405 | 0 | if (conversation == NULL) |
4406 | 0 | { |
4407 | | /* It's not part of any conversation - create a new one. */ |
4408 | 0 | conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, |
4409 | 0 | CONVERSATION_NCP, (uint32_t) pinfo->srcport, (uint32_t) pinfo->srcport, 0); |
4410 | 0 | } |
4411 | |
|
4412 | 0 | request_value = ndps_hash_insert(conversation, (uint32_t) pinfo->srcport); |
4413 | 0 | request_value->ndps_prog = ndps_prog; |
4414 | 0 | request_value->ndps_func = ndps_func; |
4415 | 0 | request_value->ndps_frame_num = pinfo->num; |
4416 | 0 | } |
4417 | 0 | switch(ndps_prog) |
4418 | 0 | { |
4419 | 0 | case 0x060976: /* Print */ |
4420 | 0 | switch(ndps_func) |
4421 | 0 | { |
4422 | 0 | case 0x00000001: /* Bind PSM */ |
4423 | 0 | foffset = credentials(tvb, pinfo, ndps_tree, foffset); |
4424 | 0 | break; |
4425 | 0 | case 0x00000002: /* Bind PA */ |
4426 | 0 | foffset = credentials(tvb, pinfo, ndps_tree, foffset); |
4427 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4428 | 0 | foffset += 4; |
4429 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4430 | 0 | foffset += 4; |
4431 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4432 | 0 | { |
4433 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4434 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4435 | 0 | break; |
4436 | 0 | } |
4437 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Security %u", ii+1); |
4438 | 0 | length = tvb_get_ntohl(tvb, foffset); |
4439 | 0 | if (length==4) |
4440 | 0 | { |
4441 | 0 | proto_tree_add_uint(atree, hf_bind_security, tvb, foffset, 4, length); |
4442 | 0 | } |
4443 | 0 | foffset += 4; |
4444 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4445 | 0 | } |
4446 | 0 | foffset = qualifiedname(tvb, pinfo->pool,ndps_tree, foffset); |
4447 | 0 | break; |
4448 | 0 | case 0x00000003: /* Unbind */ |
4449 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, |
4450 | 0 | 4, ENC_BIG_ENDIAN); |
4451 | 0 | break; |
4452 | 0 | case 0x00000004: /* Print */ |
4453 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4454 | 0 | foffset += 4; |
4455 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_print_arg, tvb, foffset, 4, ENC_BIG_ENDIAN, &print_type); |
4456 | 0 | foffset += 4; |
4457 | 0 | switch (print_type) |
4458 | 0 | { |
4459 | 0 | case 0: /* Create Job */ |
4460 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
4461 | 0 | proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4462 | 0 | foffset += 4; |
4463 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Transfer Method"); |
4464 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4465 | 0 | foffset += 4; |
4466 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4467 | 0 | { |
4468 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4469 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4470 | 0 | break; |
4471 | 0 | } |
4472 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1); |
4473 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
4474 | 0 | expert_item = proto_tree_add_item_ret_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items2); |
4475 | 0 | foffset += 4; |
4476 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
4477 | 0 | { |
4478 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
4479 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4480 | 0 | break; |
4481 | 0 | } |
4482 | 0 | ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Value %u", jj+1); |
4483 | 0 | foffset = attribute_value(tvb, pinfo, ctree, foffset); |
4484 | 0 | proto_item_set_end(citem, tvb, foffset); |
4485 | 0 | } |
4486 | 0 | proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4487 | 0 | foffset += 4; |
4488 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4489 | 0 | } |
4490 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4491 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Document Content"); |
4492 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4493 | 0 | foffset += 4; |
4494 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4495 | 0 | { |
4496 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4497 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4498 | 0 | break; |
4499 | 0 | } |
4500 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Type %u", ii+1); |
4501 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
4502 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4503 | 0 | } |
4504 | 0 | foffset += align_4(tvb, foffset); |
4505 | 0 | proto_tree_add_item_ret_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4506 | 0 | foffset += 4; |
4507 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_doc_content, tvb, foffset, 4, ENC_BIG_ENDIAN, &doc_content); |
4508 | 0 | foffset += 4; |
4509 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4510 | 0 | { |
4511 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4512 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4513 | 0 | break; |
4514 | 0 | } |
4515 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Value %u", ii+1); |
4516 | 0 | if (doc_content==0) |
4517 | 0 | { |
4518 | 0 | proto_tree_add_item_ret_uint(btree, hf_ndps_included_doc_len, tvb, foffset, 4, ENC_BIG_ENDIAN, &length); |
4519 | 0 | foffset += 4; |
4520 | 0 | length_remaining = tvb_reported_length_remaining(tvb, foffset); |
4521 | 0 | if (length_remaining == -1 || length > (uint32_t) length_remaining) /* Segmented Data */ |
4522 | 0 | { |
4523 | 0 | proto_tree_add_item(btree, hf_ndps_data, tvb, foffset, -1, ENC_NA); |
4524 | 0 | return foffset; |
4525 | 0 | } |
4526 | 0 | if (length==4) |
4527 | 0 | { |
4528 | 0 | proto_tree_add_item(btree, hf_ndps_included_doc, tvb, foffset, length, ENC_NA); |
4529 | 0 | } |
4530 | 0 | foffset += length; |
4531 | 0 | foffset += (length%2); |
4532 | 0 | } |
4533 | 0 | else |
4534 | 0 | { |
4535 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_ref_name, btree, foffset, NULL); |
4536 | 0 | foffset = name_or_id(tvb, pinfo->pool, btree, foffset); |
4537 | 0 | } |
4538 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4539 | 0 | } |
4540 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4541 | 0 | foffset += 4; |
4542 | 0 | if (align_4(tvb, foffset)>0) { |
4543 | 0 | foffset += align_4(tvb, foffset); |
4544 | 0 | } |
4545 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Document Type"); |
4546 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4547 | 0 | foffset += 4; |
4548 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4549 | 0 | { |
4550 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4551 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4552 | 0 | break; |
4553 | 0 | } |
4554 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1); |
4555 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
4556 | 0 | expert_item = proto_tree_add_item_ret_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items2); |
4557 | 0 | foffset += 4; |
4558 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
4559 | 0 | { |
4560 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
4561 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4562 | 0 | break; |
4563 | 0 | } |
4564 | 0 | ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Value %u", jj+1); |
4565 | 0 | foffset = attribute_value(tvb, pinfo, ctree, foffset); |
4566 | 0 | proto_item_set_end(citem, tvb, foffset); |
4567 | 0 | } |
4568 | 0 | proto_tree_add_item(btree, hf_ndps_qualifier, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4569 | 0 | foffset += 4; |
4570 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4571 | 0 | } |
4572 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4573 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Document Attributes"); |
4574 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
4575 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items); |
4576 | 0 | foffset += 4; |
4577 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4578 | 0 | { |
4579 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4580 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4581 | 0 | break; |
4582 | 0 | } |
4583 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1); |
4584 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); /* Document Attributes */ |
4585 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4586 | 0 | } |
4587 | 0 | break; |
4588 | 0 | case 1: /* Add Job */ |
4589 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
4590 | 0 | proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4591 | 0 | foffset += 4; |
4592 | 0 | proto_tree_add_item(ndps_tree, hf_sub_complete, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4593 | 0 | foffset += 4; |
4594 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Transfer Method"); |
4595 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_transfer_methods, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4596 | 0 | foffset += 4; |
4597 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4598 | 0 | { |
4599 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4600 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4601 | 0 | break; |
4602 | 0 | } |
4603 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Method %u", ii+1); |
4604 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); /* Transfer Method */ |
4605 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4606 | 0 | } |
4607 | 0 | proto_tree_add_item(ndps_tree, hf_doc_content, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4608 | 0 | foffset += 4; |
4609 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4610 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Document Type"); |
4611 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_doc_types, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4612 | 0 | foffset += 4; |
4613 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4614 | 0 | { |
4615 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4616 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4617 | 0 | break; |
4618 | 0 | } |
4619 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Type %u", ii+1); |
4620 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); /* Document Type */ |
4621 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4622 | 0 | } |
4623 | 0 | foffset += align_4(tvb, foffset); |
4624 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4625 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Document Attributes"); |
4626 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4627 | 0 | foffset += 4; |
4628 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4629 | 0 | { |
4630 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4631 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4632 | 0 | break; |
4633 | 0 | } |
4634 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1); |
4635 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); /* Document Attributes */ |
4636 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4637 | 0 | } |
4638 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4639 | 0 | break; |
4640 | 0 | case 2: /* Close Job */ |
4641 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
4642 | 0 | proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4643 | 0 | foffset += 4; |
4644 | 0 | break; |
4645 | 0 | default: |
4646 | 0 | break; |
4647 | 0 | } |
4648 | 0 | break; |
4649 | 0 | case 0x00000005: /* Modify Job */ |
4650 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4651 | 0 | foffset += 4; |
4652 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
4653 | 0 | proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4654 | 0 | foffset += 4; |
4655 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_document_number, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4656 | 0 | foffset += 4; |
4657 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job Modifications"); |
4658 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4659 | 0 | foffset += 4; |
4660 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4661 | 0 | { |
4662 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4663 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4664 | 0 | break; |
4665 | 0 | } |
4666 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Modification %u", ii+1); |
4667 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); /* Job Modifications */ |
4668 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4669 | 0 | } |
4670 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4671 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Document Modifications"); |
4672 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
4673 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items); |
4674 | 0 | foffset += 4; |
4675 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4676 | 0 | { |
4677 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4678 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4679 | 0 | break; |
4680 | 0 | } |
4681 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Modification %u", ii+1); |
4682 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); /* Document Modifications */ |
4683 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4684 | 0 | } |
4685 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4686 | 0 | break; |
4687 | 0 | case 0x00000006: /* Cancel Job */ |
4688 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4689 | 0 | foffset += 4; |
4690 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
4691 | 0 | proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4692 | 0 | foffset += 4; |
4693 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_document_number, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4694 | 0 | foffset += 4; |
4695 | | /* XXX - what does this count? */ |
4696 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4697 | 0 | foffset += 4; |
4698 | | /* Start of nameorid */ |
4699 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Cancel Message"); |
4700 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
4701 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4702 | | /* End of nameorid */ |
4703 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Retention Period"); |
4704 | 0 | proto_tree_add_item(atree, hf_ndps_status_flags, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4705 | 0 | foffset += 4; |
4706 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4707 | 0 | foffset += 4; |
4708 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4709 | 0 | break; |
4710 | 0 | case 0x00000007: /* List Object Attributes */ |
4711 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4712 | 0 | foffset += 4; |
4713 | 0 | list_attr_op = tvb_get_ntohl(tvb, foffset); |
4714 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_attrs_arg, tvb, foffset, 4, list_attr_op); |
4715 | 0 | foffset += 4; |
4716 | 0 | if (list_attr_op==0) /* Continuation */ |
4717 | 0 | { |
4718 | 0 | length = tvb_get_ntohl(tvb, foffset); |
4719 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length); |
4720 | 0 | foffset += 4; |
4721 | 0 | if (length!=0) |
4722 | 0 | { |
4723 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, ENC_NA); |
4724 | 0 | } |
4725 | 0 | foffset += length; |
4726 | 0 | foffset += (length%2); |
4727 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4728 | 0 | foffset += 4; |
4729 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
4730 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items); |
4731 | 0 | foffset += 4; |
4732 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4733 | 0 | { |
4734 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4735 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4736 | 0 | break; |
4737 | 0 | } |
4738 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Attribute %u", ii+1); |
4739 | 0 | foffset = attribute_value(tvb, pinfo, atree, foffset); |
4740 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4741 | 0 | } |
4742 | 0 | } |
4743 | 0 | else /* Specification */ |
4744 | 0 | { |
4745 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Class"); |
4746 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
4747 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4748 | 0 | foffset += 4; |
4749 | 0 | foffset += align_4(tvb, foffset); |
4750 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_scope, tvb, foffset, 4, ENC_BIG_ENDIAN, &scope); |
4751 | 0 | foffset += 4; |
4752 | 0 | if (scope!=0) /* Scope Does not equal 0 */ |
4753 | 0 | { |
4754 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Selector Option"); |
4755 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_options, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4756 | 0 | foffset += 4; |
4757 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4758 | 0 | { |
4759 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4760 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4761 | 0 | break; |
4762 | 0 | } |
4763 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Option %u", ii+1); |
4764 | 0 | foffset = objectidentification(tvb, pinfo->pool, btree, foffset); |
4765 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4766 | 0 | } |
4767 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4768 | 0 | foffset += align_4(tvb, foffset); |
4769 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_filter, tvb, foffset, 4, ENC_BIG_ENDIAN, &filter_type); |
4770 | 0 | foffset += 4; |
4771 | | #if 0 |
4772 | | if (filter_type == 0 || filter_type == 3 ) |
4773 | | { |
4774 | | foffset = filteritem(tvb, ndps_tree, foffset); |
4775 | | } |
4776 | | else |
4777 | | { |
4778 | | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Filter Items"); |
4779 | | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4780 | | foffset += 4; |
4781 | | for (ii = 0; ii < number_of_items; ii++ ) |
4782 | | { |
4783 | | if (ii >= NDPS_MAX_ITEMS) { |
4784 | | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4785 | | break; |
4786 | | } |
4787 | | foffset = filteritem(tvb, pinfo->pool, ndps_tree, foffset); |
4788 | | } |
4789 | | proto_item_set_end(aitem, tvb, foffset); |
4790 | | } |
4791 | | #endif |
4792 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_time_limit, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4793 | 0 | foffset += 4; |
4794 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_count_limit, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4795 | 0 | foffset += 4; /* End of NWDPSelector */ |
4796 | 0 | } |
4797 | 0 | foffset += 4; /* Don't know what this is */ |
4798 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Requested Attributes"); |
4799 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_objects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4800 | 0 | foffset += 4; |
4801 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4802 | 0 | { |
4803 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4804 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4805 | 0 | break; |
4806 | 0 | } |
4807 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1); |
4808 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
4809 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4810 | 0 | } |
4811 | 0 | proto_item_set_end(aitem, tvb, foffset); /* End of NWDPObjectIdentifierSet */ |
4812 | 0 | if (number_of_items == 0) |
4813 | 0 | { |
4814 | 0 | break; |
4815 | 0 | } |
4816 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_operator, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4817 | 0 | foffset += 4; |
4818 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
4819 | 0 | } |
4820 | 0 | break; |
4821 | 0 | case 0x00000008: /* Promote Job */ |
4822 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4823 | 0 | foffset += 4; |
4824 | | /* Start of NWDPPrtContainedObjectId */ |
4825 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job ID"); |
4826 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, atree, foffset, NULL); |
4827 | 0 | proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4828 | 0 | foffset += 4; |
4829 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4830 | | /* End of NWDPPrtContainedObjectId */ |
4831 | | /* Start of nameorid */ |
4832 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Message Option"); |
4833 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
4834 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4835 | | /* End of nameorid */ |
4836 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
4837 | 0 | break; |
4838 | 0 | case 0x00000009: /* Interrupt */ |
4839 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4840 | 0 | foffset += 4; |
4841 | 0 | job_type = tvb_get_ntohl(tvb, foffset); |
4842 | 0 | proto_tree_add_uint(ndps_tree, hf_interrupt_job_type, tvb, foffset, 4, job_type); |
4843 | 0 | foffset += 4; |
4844 | 0 | if (job_type==0) |
4845 | 0 | { |
4846 | | /* Start of NWDPPrtContainedObjectId */ |
4847 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job ID"); |
4848 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, atree, foffset, NULL); |
4849 | 0 | proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4850 | 0 | foffset += 4; |
4851 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4852 | | /* End of NWDPPrtContainedObjectId */ |
4853 | 0 | } |
4854 | 0 | else |
4855 | 0 | { |
4856 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
4857 | 0 | } |
4858 | | /* Start of nameorid */ |
4859 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Interrupt Message Option"); |
4860 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
4861 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4862 | | /* End of nameorid */ |
4863 | | /* Start of NWDPPrtContainedObjectId */ |
4864 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Interrupting Job"); |
4865 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, atree, foffset, NULL); |
4866 | 0 | proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4867 | 0 | foffset += 4; |
4868 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4869 | | /* End of NWDPPrtContainedObjectId */ |
4870 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
4871 | 0 | break; |
4872 | 0 | case 0x0000000a: /* Pause */ |
4873 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4874 | 0 | foffset += 4; |
4875 | 0 | job_type = tvb_get_ntohl(tvb, foffset); |
4876 | 0 | proto_tree_add_uint(ndps_tree, hf_pause_job_type, tvb, foffset, 4, job_type); |
4877 | 0 | foffset += 4; |
4878 | 0 | if (job_type==0) |
4879 | 0 | { |
4880 | | /* Start of NWDPPrtContainedObjectId */ |
4881 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job ID"); |
4882 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, atree, foffset, NULL); |
4883 | 0 | proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4884 | 0 | foffset += 4; |
4885 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4886 | | /* End of NWDPPrtContainedObjectId */ |
4887 | 0 | } |
4888 | 0 | else |
4889 | 0 | { |
4890 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
4891 | 0 | } |
4892 | | /* Start of nameorid */ |
4893 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Pause Message Option"); |
4894 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
4895 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4896 | | /* End of nameorid */ |
4897 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
4898 | 0 | break; |
4899 | 0 | case 0x0000000b: /* Resume */ |
4900 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4901 | 0 | foffset += 4; |
4902 | | /* Start of NWDPPrtContainedObjectId */ |
4903 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job ID"); |
4904 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, atree, foffset, NULL); |
4905 | 0 | proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4906 | 0 | foffset += 4; |
4907 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4908 | | /* End of NWDPPrtContainedObjectId */ |
4909 | | /* Start of nameorid */ |
4910 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Resume Message Option"); |
4911 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
4912 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4913 | | /* End of nameorid */ |
4914 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
4915 | 0 | break; |
4916 | 0 | case 0x0000000c: /* Clean */ |
4917 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4918 | 0 | foffset += 4; |
4919 | | /* Start of nameorid */ |
4920 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Clean Message Option"); |
4921 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
4922 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4923 | | /* End of nameorid */ |
4924 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
4925 | 0 | break; |
4926 | 0 | case 0x0000000d: /* Create */ |
4927 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4928 | 0 | foffset += 4; |
4929 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Class"); |
4930 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
4931 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4932 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object ID"); |
4933 | 0 | foffset = objectidentification(tvb, pinfo->pool, atree, foffset); |
4934 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4935 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_force, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4936 | 0 | foffset += 4; |
4937 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Reference Object Option"); |
4938 | 0 | foffset = objectidentification(tvb, pinfo->pool, atree, foffset); |
4939 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4940 | | /* Start of AttributeSet */ |
4941 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Attribute"); |
4942 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4943 | 0 | foffset += 4; |
4944 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
4945 | 0 | { |
4946 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
4947 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
4948 | 0 | break; |
4949 | 0 | } |
4950 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1); |
4951 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); /* Object Attribute Set */ |
4952 | 0 | proto_item_set_end(bitem, tvb, foffset); |
4953 | 0 | } |
4954 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4955 | | /* End of AttributeSet */ |
4956 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
4957 | 0 | break; |
4958 | 0 | case 0x0000000e: /* Delete */ |
4959 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4960 | 0 | foffset += 4; |
4961 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Class"); |
4962 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
4963 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4964 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object ID"); |
4965 | 0 | foffset = objectidentification(tvb, pinfo->pool, atree, foffset); |
4966 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4967 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
4968 | 0 | break; |
4969 | 0 | case 0x0000000f: /* Disable PA */ |
4970 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4971 | 0 | foffset += 4; |
4972 | | /* Start of NameorID */ |
4973 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Disable PA Message Option"); |
4974 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
4975 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4976 | | /* End of NameorID */ |
4977 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
4978 | 0 | break; |
4979 | 0 | case 0x00000010: /* Enable PA */ |
4980 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4981 | 0 | foffset += 4; |
4982 | | /* Start of NameorID */ |
4983 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Enable PA Message Option"); |
4984 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
4985 | 0 | proto_item_set_end(aitem, tvb, foffset); |
4986 | | /* End of NameorID */ |
4987 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
4988 | 0 | break; |
4989 | 0 | case 0x00000011: /* Resubmit Jobs */ |
4990 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4991 | 0 | foffset += 4; |
4992 | 0 | foffset = qualifiedname(tvb, pinfo->pool, ndps_tree, foffset); |
4993 | 0 | foffset = address_item(tvb, pinfo->pool,ndps_tree, foffset); |
4994 | 0 | proto_tree_add_item(ndps_tree, hf_resubmit_op_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
4995 | 0 | foffset += 4; |
4996 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Resubmit Job"); |
4997 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
4998 | 0 | foffset += 4; |
4999 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5000 | 0 | { |
5001 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5002 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5003 | 0 | break; |
5004 | 0 | } |
5005 | | /* Start of NWDPPrtContainedObjectId */ |
5006 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Job ID"); |
5007 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, btree, foffset, NULL); |
5008 | 0 | proto_tree_add_item(btree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5009 | 0 | foffset += 4; |
5010 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5011 | | /* End of NWDPPrtContainedObjectId */ |
5012 | 0 | proto_tree_add_item(atree, hf_ndps_document_number, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5013 | 0 | foffset += 4; |
5014 | | /* Start of AttributeSet */ |
5015 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Job Attributes"); |
5016 | 0 | expert_item = proto_tree_add_item_ret_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items2); |
5017 | 0 | foffset += 4; |
5018 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
5019 | 0 | { |
5020 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
5021 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5022 | 0 | break; |
5023 | 0 | } |
5024 | 0 | ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Attribute %u", jj+1); |
5025 | 0 | foffset = attribute_value(tvb, pinfo, ctree, foffset); /* Object Attribute Set */ |
5026 | 0 | proto_item_set_end(citem, tvb, foffset); |
5027 | 0 | } |
5028 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5029 | | /* End of AttributeSet */ |
5030 | | /* Start of AttributeSet */ |
5031 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Document Attributes"); |
5032 | 0 | expert_item = proto_tree_add_item_ret_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items2); |
5033 | 0 | foffset += 4; |
5034 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
5035 | 0 | { |
5036 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
5037 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5038 | 0 | break; |
5039 | 0 | } |
5040 | 0 | ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Attribute %u", jj+1); |
5041 | 0 | foffset = attribute_value(tvb, pinfo, ctree, foffset); /* Object Attribute Set */ |
5042 | 0 | proto_item_set_end(citem, tvb, foffset); |
5043 | 0 | } |
5044 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5045 | | /* End of AttributeSet */ |
5046 | 0 | } |
5047 | 0 | proto_item_set_end(aitem, tvb, foffset); /* End of ResubmitJob Set */ |
5048 | | /* Start of NameorID */ |
5049 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Resubmit Message Option"); |
5050 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5051 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5052 | | /* End of NameorID */ |
5053 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
5054 | 0 | break; |
5055 | 0 | case 0x00000012: /* Set */ |
5056 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5057 | 0 | foffset += 4; |
5058 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Class"); |
5059 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
5060 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5061 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object ID"); |
5062 | 0 | foffset = objectidentification(tvb, pinfo->pool, atree, foffset); |
5063 | | /* Start of AttributeSet */ |
5064 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Attribute Modifications"); |
5065 | 0 | expert_item = proto_tree_add_item_ret_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
5066 | 0 | foffset += 4; |
5067 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5068 | 0 | { |
5069 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5070 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5071 | 0 | break; |
5072 | 0 | } |
5073 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Modification `%d", ii+1); |
5074 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); /* Object Attribute Set */ |
5075 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5076 | 0 | } |
5077 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5078 | | /* End of AttributeSet */ |
5079 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
5080 | 0 | break; |
5081 | 0 | case 0x00000013: /* Shutdown PA */ |
5082 | 0 | case 0x0000001e: /* Shutdown PSM */ |
5083 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5084 | 0 | foffset += 4; |
5085 | 0 | proto_tree_add_item(ndps_tree, hf_shutdown_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5086 | 0 | foffset += 4; |
5087 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
5088 | | /* Start of NameorID */ |
5089 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Shutdown Message Option"); |
5090 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5091 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5092 | | /* End of NameorID */ |
5093 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
5094 | 0 | break; |
5095 | 0 | case 0x00000014: /* Startup PA */ |
5096 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5097 | 0 | foffset += 4; |
5098 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
5099 | | /* Start of NameorID */ |
5100 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Startup Message Option"); |
5101 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5102 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5103 | | /* End of NameorID */ |
5104 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
5105 | 0 | break; |
5106 | 0 | case 0x00000015: /* Reorder Job */ |
5107 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5108 | 0 | foffset += 4; |
5109 | | /* Start of NWDPPrtContainedObjectId */ |
5110 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job Identification"); |
5111 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, atree, foffset, NULL); |
5112 | 0 | proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5113 | 0 | foffset += 4; |
5114 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5115 | | /* End of NWDPPrtContainedObjectId */ |
5116 | | /* Start of NWDPPrtContainedObjectId */ |
5117 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Reference Job ID"); |
5118 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, atree, foffset, NULL); |
5119 | 0 | proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5120 | 0 | foffset += 4; |
5121 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5122 | | /* End of NWDPPrtContainedObjectId */ |
5123 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
5124 | 0 | break; |
5125 | 0 | case 0x00000016: /* Pause PA */ |
5126 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5127 | 0 | foffset += 4; |
5128 | | /* Start of NameorID */ |
5129 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Pause Message Option"); |
5130 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5131 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5132 | | /* End of NameorID */ |
5133 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
5134 | 0 | break; |
5135 | 0 | case 0x00000017: /* Resume PA */ |
5136 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5137 | 0 | foffset += 4; |
5138 | | /* Start of NameorID */ |
5139 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Resume Message Option"); |
5140 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5141 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5142 | | /* End of NameorID */ |
5143 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
5144 | 0 | break; |
5145 | 0 | case 0x00000018: /* Transfer Data */ |
5146 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5147 | 0 | foffset += 4; |
5148 | 0 | proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5149 | 0 | foffset += 4; |
5150 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset+4, tvb_get_ntohl(tvb, foffset), ENC_NA); |
5151 | 0 | break; |
5152 | 0 | case 0x00000019: /* Device Control */ |
5153 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5154 | 0 | foffset += 4; |
5155 | | /* Start of Object Identifier */ |
5156 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Operation ID"); |
5157 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
5158 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5159 | | /* End of Object Identifier */ |
5160 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
5161 | 0 | break; |
5162 | 0 | case 0x0000001a: /* Add Event Profile */ |
5163 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5164 | 0 | foffset += 4; |
5165 | | /* Start of Eventhandling2 */ |
5166 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5167 | 0 | foffset += 4; |
5168 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5169 | 0 | foffset += 4; |
5170 | 0 | foffset = qualifiedname(tvb, pinfo->pool, ndps_tree, foffset); |
5171 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_supplier_name, ndps_tree, foffset, NULL); |
5172 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5173 | 0 | foffset += 4; |
5174 | | /* Start of NameorID */ |
5175 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
5176 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5177 | 0 | foffset += align_4(tvb, foffset); |
5178 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5179 | | /* End of NameorID */ |
5180 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Address"); |
5181 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
5182 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items); |
5183 | 0 | foffset += 4; |
5184 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5185 | 0 | { |
5186 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5187 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5188 | 0 | break; |
5189 | 0 | } |
5190 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Address %u", ii+1); |
5191 | 0 | foffset = address_item(tvb, pinfo->pool,btree, foffset); |
5192 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5193 | 0 | } |
5194 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5195 | 0 | foffset = event_object_set(tvb, pinfo, ndps_tree, foffset); |
5196 | 0 | foffset = qualifiedname(tvb, pinfo->pool, ndps_tree, foffset); |
5197 | 0 | break; |
5198 | 0 | case 0x0000001b: /* Remove Event Profile */ |
5199 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5200 | 0 | foffset += 4; |
5201 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5202 | 0 | foffset += 4; |
5203 | 0 | break; |
5204 | 0 | case 0x0000001c: /* Modify Event Profile */ |
5205 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5206 | 0 | foffset += 4; |
5207 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5208 | 0 | foffset += 4; |
5209 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &supplier_flag); |
5210 | 0 | foffset += 4; |
5211 | 0 | if (supplier_flag) |
5212 | 0 | { |
5213 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Supplier ID"); |
5214 | 0 | length = tvb_get_ntohl(tvb, foffset); |
5215 | 0 | foffset += 4; |
5216 | 0 | if (length==4) |
5217 | 0 | { |
5218 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
5219 | 0 | } |
5220 | 0 | tvb_ensure_bytes_exist(tvb, foffset, length); |
5221 | 0 | foffset += length; |
5222 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5223 | 0 | } |
5224 | 0 | proto_tree_add_item_ret_boolean(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &language_flag); |
5225 | 0 | foffset += 4; |
5226 | 0 | if (language_flag) |
5227 | 0 | { |
5228 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5229 | 0 | foffset += 4; |
5230 | 0 | } |
5231 | 0 | proto_tree_add_item_ret_boolean(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &method_flag); |
5232 | 0 | foffset += 4; |
5233 | 0 | if (method_flag) |
5234 | 0 | { |
5235 | | /* Start of NameorID */ |
5236 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
5237 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5238 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5239 | | /* End of NameorID */ |
5240 | 0 | } |
5241 | 0 | proto_tree_add_item_ret_boolean(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &delivery_address_flag); |
5242 | 0 | foffset += 4; |
5243 | 0 | if (delivery_address_flag) |
5244 | 0 | { |
5245 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Address"); |
5246 | 0 | foffset = print_address(tvb, atree, foffset); |
5247 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5248 | 0 | } |
5249 | 0 | foffset = event_object_set(tvb, pinfo, ndps_tree, foffset); |
5250 | 0 | break; |
5251 | 0 | case 0x0000001d: /* List Event Profiles */ |
5252 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5253 | 0 | foffset += 4; |
5254 | 0 | profiles_type = tvb_get_ntohl(tvb, foffset); |
5255 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, profiles_type); |
5256 | 0 | foffset += 4; |
5257 | 0 | if (profiles_type==0) /* Spec */ |
5258 | 0 | { |
5259 | 0 | foffset = qualifiedname(tvb, pinfo->pool, ndps_tree, foffset); |
5260 | 0 | profiles_choice_type = tvb_get_ntohl(tvb, foffset); |
5261 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, profiles_choice_type); |
5262 | 0 | foffset += 4; |
5263 | 0 | if (profiles_choice_type==0) /* Choice */ |
5264 | 0 | { |
5265 | 0 | foffset = cardinal_seq(tvb, pinfo, ndps_tree, foffset); |
5266 | 0 | } |
5267 | 0 | else |
5268 | 0 | { |
5269 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer"); |
5270 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
5271 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5272 | | /* Start of NameorID */ |
5273 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
5274 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5275 | | /* End of NameorID */ |
5276 | 0 | proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5277 | 0 | foffset += 4; |
5278 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5279 | 0 | } |
5280 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5281 | 0 | foffset += 4; |
5282 | | /* Start of integeroption */ |
5283 | 0 | integer_type_flag = tvb_get_ntohl(tvb, foffset); |
5284 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag); |
5285 | 0 | foffset += 4; |
5286 | 0 | if (integer_type_flag!=0) |
5287 | 0 | { |
5288 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5289 | 0 | foffset += 4; |
5290 | 0 | } |
5291 | | /* End of integeroption */ |
5292 | 0 | } |
5293 | 0 | else /* Cont */ |
5294 | 0 | { |
5295 | 0 | length = tvb_get_ntohl(tvb, foffset); |
5296 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length); |
5297 | 0 | foffset += 4; |
5298 | 0 | if (length!=0) |
5299 | 0 | { |
5300 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, ENC_NA); |
5301 | 0 | } |
5302 | 0 | foffset += length; |
5303 | 0 | foffset += (length%2); |
5304 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5305 | 0 | foffset += 4; |
5306 | 0 | } |
5307 | 0 | break; |
5308 | 0 | case 0x0000001f: /* Cancel PSM Shutdown */ |
5309 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5310 | 0 | foffset += 4; |
5311 | | /* Start of NameorID */ |
5312 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Cancel Shutdown Message Option"); |
5313 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5314 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5315 | | /* End of NameorID */ |
5316 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
5317 | 0 | break; |
5318 | 0 | case 0x00000020: /* Set Printer DS Information */ |
5319 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5320 | 0 | foffset += 4; |
5321 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ds_info_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5322 | 0 | foffset += 4; |
5323 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_name, ndps_tree, foffset, NULL); |
5324 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "DS Object Name"); |
5325 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
5326 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5327 | 0 | break; |
5328 | 0 | case 0x00000021: /* Clean User Jobs */ |
5329 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5330 | 0 | foffset += 4; |
5331 | | /* Start of NameorID */ |
5332 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Clean Message Option"); |
5333 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5334 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5335 | | /* End of NameorID */ |
5336 | 0 | foffset = commonarguments(tvb, pinfo, ndps_tree, foffset); |
5337 | 0 | break; |
5338 | 0 | case 0x00000022: /* Map GUID to NDS Name */ |
5339 | 0 | length = tvb_get_ntohl(tvb, foffset); |
5340 | 0 | foffset += 4; |
5341 | 0 | if (length!=0) |
5342 | 0 | { |
5343 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_guid, tvb, foffset, length, ENC_NA); |
5344 | 0 | } |
5345 | 0 | foffset += length; |
5346 | 0 | break; |
5347 | 0 | case 0x00000023: /* AddEventProfile2 */ |
5348 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5349 | 0 | foffset += 4; |
5350 | | /* Start of Eventhandling2 */ |
5351 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5352 | 0 | foffset += 4; |
5353 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5354 | 0 | foffset += 4; |
5355 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer Name"); |
5356 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
5357 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5358 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_supplier_name, ndps_tree, foffset, NULL); |
5359 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5360 | 0 | foffset += 4; |
5361 | | /* Start of NameorID */ |
5362 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
5363 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5364 | 0 | foffset += align_4(tvb, foffset); |
5365 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5366 | | /* End of NameorID */ |
5367 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Address"); |
5368 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
5369 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items); |
5370 | 0 | foffset += 4; |
5371 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5372 | 0 | { |
5373 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5374 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5375 | 0 | break; |
5376 | 0 | } |
5377 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Address %u", ii+1); |
5378 | 0 | foffset = address_item(tvb, pinfo->pool,btree, foffset); |
5379 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5380 | 0 | } |
5381 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5382 | 0 | foffset = event_object_set(tvb, pinfo, ndps_tree, foffset); |
5383 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Account"); |
5384 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
5385 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5386 | | /* Start of object identifier set */ |
5387 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Notify Attributes"); |
5388 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
5389 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items); |
5390 | 0 | foffset += 4; |
5391 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5392 | 0 | { |
5393 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5394 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5395 | 0 | break; |
5396 | 0 | } |
5397 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %u", ii+1); |
5398 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
5399 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5400 | 0 | } |
5401 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5402 | | /* End of object identifier set */ |
5403 | 0 | proto_tree_add_item(ndps_tree, hf_notify_time_interval, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5404 | 0 | foffset += 4; |
5405 | 0 | proto_tree_add_item(ndps_tree, hf_notify_sequence_number, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5406 | 0 | foffset += 4; |
5407 | 0 | proto_tree_add_item(ndps_tree, hf_notify_lease_exp_time, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5408 | 0 | foffset += 4; |
5409 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_notify_printer_uri, ndps_tree, foffset, NULL); |
5410 | | /* End of Eventhandling2 */ |
5411 | 0 | break; |
5412 | 0 | case 0x00000024: /* ListEventProfiles2 */ |
5413 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5414 | 0 | foffset += 4; |
5415 | 0 | profiles_type = tvb_get_ntohl(tvb, foffset); |
5416 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, profiles_type); |
5417 | 0 | foffset += 4; |
5418 | 0 | if (profiles_type==0) /* Spec */ |
5419 | 0 | { |
5420 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Supplier Alias"); |
5421 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
5422 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5423 | 0 | profiles_choice_type = tvb_get_ntohl(tvb, foffset); |
5424 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, profiles_choice_type); |
5425 | 0 | foffset += 4; |
5426 | 0 | if (profiles_choice_type==0) /* Choice */ |
5427 | 0 | { |
5428 | 0 | foffset = cardinal_seq(tvb, pinfo, ndps_tree, foffset); |
5429 | 0 | } |
5430 | 0 | else |
5431 | 0 | { |
5432 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer"); |
5433 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
5434 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5435 | | /* Start of NameorID */ |
5436 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
5437 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5438 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5439 | | /* End of NameorID */ |
5440 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5441 | 0 | foffset += 4; |
5442 | 0 | } |
5443 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5444 | 0 | foffset += 4; |
5445 | | /* Start of integeroption */ |
5446 | 0 | integer_type_flag = tvb_get_ntohl(tvb, foffset); |
5447 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag); |
5448 | 0 | foffset += 4; |
5449 | 0 | if (integer_type_flag!=0) |
5450 | 0 | { |
5451 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5452 | 0 | foffset += 4; |
5453 | 0 | } |
5454 | | /* End of integeroption */ |
5455 | 0 | } |
5456 | 0 | else /* Cont */ |
5457 | 0 | { |
5458 | 0 | length = tvb_get_ntohl(tvb, foffset); |
5459 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length); |
5460 | 0 | foffset += 4; |
5461 | 0 | if (length!=0) |
5462 | 0 | { |
5463 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, ENC_NA); |
5464 | 0 | } |
5465 | 0 | foffset += length; |
5466 | 0 | foffset += (length%2); |
5467 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5468 | 0 | foffset += 4; |
5469 | 0 | } |
5470 | 0 | break; |
5471 | 0 | default: |
5472 | 0 | break; |
5473 | 0 | } |
5474 | 0 | break; |
5475 | 0 | case 0x060977: /* Broker */ |
5476 | 0 | switch(ndps_func) |
5477 | 0 | { |
5478 | 0 | case 0x00000001: /* Bind */ |
5479 | 0 | foffset = credentials(tvb, pinfo, ndps_tree, foffset); |
5480 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5481 | 0 | foffset += 4; |
5482 | 0 | number_of_items=tvb_get_ntohl(tvb, foffset); |
5483 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items); |
5484 | 0 | foffset += 4; |
5485 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5486 | 0 | { |
5487 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5488 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5489 | 0 | break; |
5490 | 0 | } |
5491 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Security %u", ii+1); |
5492 | 0 | length = tvb_get_ntohl(tvb, foffset); |
5493 | 0 | foffset += 4; |
5494 | 0 | if (length==4) |
5495 | 0 | { |
5496 | 0 | proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, ENC_BIG_ENDIAN); |
5497 | 0 | } |
5498 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5499 | 0 | } |
5500 | 0 | break; |
5501 | 0 | case 0x00000002: /* Unbind */ |
5502 | 0 | break; |
5503 | 0 | case 0x00000003: /* List Services */ |
5504 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_list_services_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5505 | 0 | foffset += 4; |
5506 | 0 | break; |
5507 | 0 | case 0x00000004: /* Enable Service */ |
5508 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_service_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5509 | 0 | foffset += 4; |
5510 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Parameters"); |
5511 | 0 | number_of_items=tvb_get_ntohl(tvb, foffset); |
5512 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items); |
5513 | 0 | foffset += 4; |
5514 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5515 | 0 | { |
5516 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5517 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5518 | 0 | break; |
5519 | 0 | } |
5520 | 0 | length = tvb_get_ntohl(tvb, foffset); |
5521 | 0 | foffset += 4; |
5522 | 0 | if (length!=0) |
5523 | 0 | { |
5524 | 0 | proto_tree_add_item(atree, hf_ndps_item_bytes, tvb, foffset, length, ENC_NA); |
5525 | 0 | } |
5526 | 0 | foffset += length; |
5527 | 0 | } |
5528 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5529 | 0 | break; |
5530 | 0 | case 0x00000005: /* Disable Service */ |
5531 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_list_services_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5532 | 0 | foffset += 4; |
5533 | 0 | break; |
5534 | 0 | case 0x00000006: /* Down Broker */ |
5535 | 0 | case 0x00000007: /* Get Broker NDS Object Name */ |
5536 | 0 | case 0x00000008: /* Get Broker Session Information */ |
5537 | 0 | default: |
5538 | 0 | break; |
5539 | 0 | } |
5540 | 0 | break; |
5541 | 0 | case 0x060978: /* Registry */ |
5542 | 0 | switch(ndps_func) |
5543 | 0 | { |
5544 | 0 | case 0x00000001: /* Bind */ |
5545 | 0 | foffset = credentials(tvb, pinfo, ndps_tree, foffset); |
5546 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5547 | 0 | foffset += 4; |
5548 | 0 | number_of_items=tvb_get_ntohl(tvb, foffset); |
5549 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, number_of_items); |
5550 | 0 | foffset += 4; |
5551 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5552 | 0 | { |
5553 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5554 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5555 | 0 | break; |
5556 | 0 | } |
5557 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Security %d", ii+1); |
5558 | 0 | length = tvb_get_ntohl(tvb, foffset); |
5559 | 0 | foffset += 4; |
5560 | 0 | if (length==4) |
5561 | 0 | { |
5562 | 0 | proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, ENC_BIG_ENDIAN); |
5563 | 0 | } |
5564 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5565 | 0 | } |
5566 | 0 | break; |
5567 | 0 | case 0x00000002: /* Unbind */ |
5568 | 0 | break; |
5569 | 0 | case 0x00000003: /* Register Server */ |
5570 | 0 | foffset = server_entry(tvb, pinfo, ndps_tree, foffset); |
5571 | 0 | break; |
5572 | 0 | case 0x00000004: /* Deregister Server */ |
5573 | 0 | case 0x00000006: /* Deregister Registry */ |
5574 | 0 | case 0x0000000b: /* Get Registry NDS Object Name */ |
5575 | 0 | case 0x0000000c: /* Get Registry Session Information */ |
5576 | | /* NoOp */ |
5577 | 0 | break; |
5578 | 0 | case 0x00000005: /* Register Registry */ |
5579 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_registry_name, ndps_tree, foffset, NULL); |
5580 | 0 | foffset = print_address(tvb, ndps_tree, foffset); |
5581 | 0 | break; |
5582 | 0 | case 0x00000007: /* Registry Update */ |
5583 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Add"); |
5584 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
5585 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items); |
5586 | 0 | foffset += 4; |
5587 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5588 | 0 | { |
5589 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5590 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5591 | 0 | break; |
5592 | 0 | } |
5593 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Entry %u", ii+1); |
5594 | 0 | foffset = server_entry(tvb, pinfo, btree, foffset); |
5595 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5596 | 0 | } |
5597 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5598 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Remove"); |
5599 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
5600 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_item_count, tvb, foffset, 4, number_of_items); |
5601 | 0 | foffset += 4; |
5602 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5603 | 0 | { |
5604 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5605 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5606 | 0 | break; |
5607 | 0 | } |
5608 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Entry %u", ii+1); |
5609 | 0 | foffset = server_entry(tvb, pinfo, btree, foffset); |
5610 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5611 | 0 | } |
5612 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5613 | 0 | break; |
5614 | 0 | case 0x00000008: /* List Local Servers */ |
5615 | 0 | case 0x00000009: /* List Servers */ |
5616 | 0 | case 0x0000000a: /* List Known Registries */ |
5617 | 0 | local_servers_type = tvb_get_ntohl(tvb, foffset); |
5618 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_list_local_servers_type, tvb, foffset, 4, local_servers_type); |
5619 | 0 | foffset += 4; |
5620 | 0 | if (local_servers_type==0) |
5621 | 0 | { |
5622 | | /* Start of integeroption */ |
5623 | 0 | integer_type_flag = tvb_get_ntohl(tvb, foffset); |
5624 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag); |
5625 | 0 | foffset += 4; |
5626 | 0 | if (integer_type_flag!=0) |
5627 | 0 | { |
5628 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5629 | 0 | foffset += 4; |
5630 | 0 | } |
5631 | | /* End of integeroption */ |
5632 | 0 | } |
5633 | 0 | else |
5634 | 0 | { |
5635 | 0 | length = tvb_get_ntohl(tvb, foffset); |
5636 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length); |
5637 | 0 | foffset += 4; |
5638 | 0 | if (length!=0) |
5639 | 0 | { |
5640 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, ENC_NA); |
5641 | 0 | } |
5642 | 0 | foffset += length; |
5643 | 0 | foffset += (length%2); |
5644 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5645 | 0 | foffset += 4; |
5646 | 0 | } |
5647 | 0 | break; |
5648 | 0 | default: |
5649 | 0 | break; |
5650 | 0 | } |
5651 | 0 | break; |
5652 | 0 | case 0x060979: /* Notify */ |
5653 | 0 | switch(ndps_func) |
5654 | 0 | { |
5655 | 0 | case 0x00000001: /* Notify Bind */ |
5656 | 0 | foffset = credentials(tvb, pinfo, ndps_tree, foffset); |
5657 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5658 | 0 | foffset += 4; |
5659 | 0 | number_of_items=tvb_get_ntohl(tvb, foffset); |
5660 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items); |
5661 | 0 | foffset += 4; |
5662 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5663 | 0 | { |
5664 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5665 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5666 | 0 | break; |
5667 | 0 | } |
5668 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Security %d", ii+1); |
5669 | 0 | length = tvb_get_ntohl(tvb, foffset); |
5670 | 0 | foffset += 4; |
5671 | 0 | if (length==4) |
5672 | 0 | { |
5673 | 0 | proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, ENC_BIG_ENDIAN); |
5674 | 0 | } |
5675 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5676 | 0 | } |
5677 | 0 | break; |
5678 | 0 | case 0x00000002: /* Notify Unbind */ |
5679 | 0 | case 0x0000000a: /* List Supported Languages */ |
5680 | 0 | case 0x00000010: /* Get Notify NDS Object Name */ |
5681 | 0 | case 0x00000011: /* Get Notify Session Information */ |
5682 | | /* NoOp */ |
5683 | 0 | break; |
5684 | 0 | case 0x00000003: /* Register Supplier */ |
5685 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_supplier_name, ndps_tree, foffset, NULL); |
5686 | | /* Start of QualifiedName Set*/ |
5687 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
5688 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items); |
5689 | 0 | foffset += 4; |
5690 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5691 | 0 | { |
5692 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5693 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5694 | 0 | break; |
5695 | 0 | } |
5696 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Supplier Alias %u", ii+1); |
5697 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
5698 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5699 | 0 | } |
5700 | | /* End of QualifiedName Set*/ |
5701 | 0 | break; |
5702 | 0 | case 0x00000004: /* Deregister Supplier */ |
5703 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5704 | 0 | foffset += 4; |
5705 | 0 | break; |
5706 | 0 | case 0x00000005: /* Add Profile */ |
5707 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5708 | 0 | foffset += 4; |
5709 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Supplier Alias"); |
5710 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
5711 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5712 | | /* Start of Eventhandling */ |
5713 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5714 | 0 | foffset += 4; |
5715 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5716 | 0 | foffset += 4; |
5717 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer Name"); |
5718 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
5719 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5720 | 0 | length = tvb_get_ntohl(tvb, foffset); |
5721 | 0 | foffset += 4; |
5722 | 0 | if (length==4) |
5723 | 0 | { |
5724 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
5725 | 0 | } |
5726 | 0 | foffset += length; |
5727 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5728 | 0 | foffset += 4; |
5729 | | /* Start of NameorID */ |
5730 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
5731 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5732 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5733 | | /* End of NameorID */ |
5734 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
5735 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items); |
5736 | 0 | foffset += 4; |
5737 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Addresses"); |
5738 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5739 | 0 | { |
5740 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5741 | 0 | expert_add_info(pinfo, aitem, &ei_ndps_truncated); |
5742 | 0 | break; |
5743 | 0 | } |
5744 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Address %d", ii+1); |
5745 | 0 | foffset = address_item(tvb, pinfo->pool,btree, foffset); |
5746 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5747 | 0 | } |
5748 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5749 | 0 | foffset = event_object_set(tvb, pinfo, ndps_tree, foffset); |
5750 | | /* End of Eventhandling */ |
5751 | 0 | break; |
5752 | 0 | case 0x00000006: /* Remove Profile */ |
5753 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5754 | 0 | foffset += 4; |
5755 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5756 | 0 | foffset += 4; |
5757 | 0 | break; |
5758 | 0 | case 0x00000007: /* Modify Profile */ |
5759 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5760 | 0 | foffset += 4; |
5761 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5762 | 0 | foffset += 4; |
5763 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &supplier_flag); |
5764 | 0 | foffset += 4; |
5765 | 0 | if (supplier_flag) |
5766 | 0 | { |
5767 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Supplier ID"); |
5768 | 0 | length = tvb_get_ntohl(tvb, foffset); |
5769 | 0 | foffset += 4; |
5770 | 0 | if (length==4) |
5771 | 0 | { |
5772 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
5773 | 0 | } |
5774 | 0 | tvb_ensure_bytes_exist(tvb, foffset, length); |
5775 | 0 | foffset += length; |
5776 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5777 | 0 | } |
5778 | 0 | proto_tree_add_item_ret_boolean(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &language_flag); |
5779 | 0 | foffset += 4; |
5780 | 0 | if (language_flag) |
5781 | 0 | { |
5782 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5783 | 0 | foffset += 4; |
5784 | 0 | } |
5785 | 0 | proto_tree_add_item_ret_boolean(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &method_flag); |
5786 | 0 | foffset += 4; |
5787 | 0 | if (method_flag) |
5788 | 0 | { |
5789 | | /* Start of NameorID */ |
5790 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
5791 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5792 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5793 | | /* End of NameorID */ |
5794 | 0 | } |
5795 | 0 | proto_tree_add_item_ret_boolean(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &delivery_address_flag); |
5796 | 0 | foffset += 4; |
5797 | 0 | if (delivery_address_flag) |
5798 | 0 | { |
5799 | 0 | foffset = print_address(tvb, ndps_tree, foffset); |
5800 | 0 | } |
5801 | 0 | foffset = event_object_set(tvb, pinfo, ndps_tree, foffset); |
5802 | 0 | break; |
5803 | 0 | case 0x00000008: /* List Profiles */ |
5804 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5805 | 0 | foffset += 4; |
5806 | 0 | profiles_type = tvb_get_ntohl(tvb, foffset); |
5807 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_list_profiles_type, tvb, foffset, 4, profiles_type); |
5808 | 0 | foffset += 4; |
5809 | 0 | if (profiles_type==0) /* Spec */ |
5810 | 0 | { |
5811 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Supplier Alias"); |
5812 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
5813 | 0 | profiles_choice_type = tvb_get_ntohl(tvb, foffset); |
5814 | 0 | proto_tree_add_uint(atree, hf_ndps_list_profiles_choice_type, tvb, foffset, 4, profiles_choice_type); |
5815 | 0 | foffset += 4; |
5816 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5817 | 0 | if (profiles_choice_type==0) /* Choice */ |
5818 | 0 | { |
5819 | 0 | foffset = cardinal_seq(tvb, pinfo, ndps_tree, foffset); |
5820 | 0 | } |
5821 | 0 | else |
5822 | 0 | { |
5823 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer"); |
5824 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
5825 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5826 | | /* Start of NameorID */ |
5827 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
5828 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
5829 | | /* End of NameorID */ |
5830 | 0 | proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5831 | 0 | foffset += 4; |
5832 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5833 | 0 | } |
5834 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_list_profiles_result_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5835 | 0 | foffset += 4; |
5836 | | /* Start of integeroption */ |
5837 | 0 | integer_type_flag = tvb_get_ntohl(tvb, foffset); |
5838 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, integer_type_flag); |
5839 | 0 | foffset += 4; |
5840 | 0 | if (integer_type_flag!=0) |
5841 | 0 | { |
5842 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5843 | 0 | foffset += 4; |
5844 | 0 | } |
5845 | | /* End of integeroption */ |
5846 | 0 | } |
5847 | 0 | else /* Cont */ |
5848 | 0 | { |
5849 | 0 | length = tvb_get_ntohl(tvb, foffset); |
5850 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, length); |
5851 | 0 | foffset += 4; |
5852 | 0 | if (length!=0) |
5853 | 0 | { |
5854 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, ENC_NA); |
5855 | 0 | } |
5856 | 0 | foffset += length; |
5857 | 0 | foffset += (length%2); |
5858 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5859 | 0 | foffset += 4; |
5860 | 0 | } |
5861 | 0 | break; |
5862 | 0 | case 0x00000009: /* Report Event */ |
5863 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5864 | 0 | foffset += 4; |
5865 | | /* Start of ReportEventItemSet */ |
5866 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
5867 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items); |
5868 | 0 | foffset += 4; |
5869 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Event Items"); |
5870 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5871 | 0 | { |
5872 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5873 | 0 | expert_add_info(pinfo, aitem, &ei_ndps_truncated); |
5874 | 0 | break; |
5875 | 0 | } |
5876 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Item %d", ii+1); |
5877 | | /* Start of ReportEventItem */ |
5878 | 0 | proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5879 | 0 | foffset += 4; |
5880 | 0 | ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Containing Class"); |
5881 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ctree, foffset); |
5882 | 0 | proto_item_set_end(citem, tvb, foffset); |
5883 | 0 | ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Containing Object"); |
5884 | 0 | foffset = objectidentification(tvb, pinfo->pool, ctree, foffset); |
5885 | 0 | proto_item_set_end(citem, tvb, foffset); |
5886 | 0 | ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Filter Class"); |
5887 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ctree, foffset); |
5888 | 0 | ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Object Class"); |
5889 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ctree, foffset); |
5890 | 0 | proto_item_set_end(citem, tvb, foffset); |
5891 | 0 | ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Object ID"); |
5892 | 0 | foffset = objectidentification(tvb, pinfo->pool, ctree, foffset); |
5893 | 0 | proto_item_set_end(citem, tvb, foffset); |
5894 | 0 | ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Event Object ID"); |
5895 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ctree, foffset); |
5896 | 0 | proto_item_set_end(citem, tvb, foffset); |
5897 | | /* Start of AttributeSet */ |
5898 | 0 | proto_tree_add_item_ret_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
5899 | 0 | foffset += 4; |
5900 | 0 | ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Attribute Modifications"); |
5901 | 0 | for (jj = 0; jj < number_of_items; jj++ ) |
5902 | 0 | { |
5903 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
5904 | 0 | expert_add_info(pinfo, citem, &ei_ndps_truncated); |
5905 | 0 | break; |
5906 | 0 | } |
5907 | 0 | dtree = proto_tree_add_subtree_format(ctree, tvb, foffset, -1, ett_ndps, &ditem, "Modification %d", jj+1); |
5908 | 0 | foffset = attribute_value(tvb, pinfo, dtree, foffset); /* Object Attribute Set */ |
5909 | 0 | proto_item_set_end(ditem, tvb, foffset); |
5910 | 0 | } |
5911 | 0 | proto_item_set_end(citem, tvb, foffset); |
5912 | | /* End of AttributeSet */ |
5913 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_message, btree, foffset, NULL); |
5914 | 0 | proto_tree_add_item(btree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5915 | 0 | foffset += 4; |
5916 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5917 | | /* End of ReportEventItem */ |
5918 | 0 | } |
5919 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5920 | | /* End of ReportEventItemSet */ |
5921 | 0 | break; |
5922 | 0 | case 0x0000000b: /* Report Notification */ |
5923 | | /* Start of DestinationSet */ |
5924 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
5925 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_destinations, tvb, foffset, 4, number_of_items); |
5926 | 0 | foffset += 4; |
5927 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5928 | 0 | { |
5929 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5930 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
5931 | 0 | break; |
5932 | 0 | } |
5933 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Destination %d", ii+1); |
5934 | | /* Start of Destination */ |
5935 | | /* Start of NameorID */ |
5936 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Method ID"); |
5937 | 0 | foffset = name_or_id(tvb, pinfo->pool, btree, foffset); |
5938 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5939 | | /* End of NameorID */ |
5940 | | /* Start of NotifyDeliveryAddr */ |
5941 | 0 | proto_tree_add_item(atree, hf_address_len, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5942 | 0 | foffset += 4; |
5943 | 0 | foffset = print_address(tvb, atree, foffset); |
5944 | | /* End of NotifyDeliveryAddr */ |
5945 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5946 | | /* End of Destination */ |
5947 | 0 | } |
5948 | | /* End of DestinationSet */ |
5949 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_supplier_name, ndps_tree, foffset, NULL); |
5950 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5951 | 0 | foffset += 4; |
5952 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Containing Class"); |
5953 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
5954 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5955 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Containing Object"); |
5956 | 0 | foffset = objectidentification(tvb, pinfo->pool, atree, foffset); |
5957 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5958 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Filter Class"); |
5959 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
5960 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5961 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Class"); |
5962 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
5963 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5964 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object ID"); |
5965 | 0 | foffset = objectidentification(tvb, pinfo->pool, atree, foffset); |
5966 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5967 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Event Object ID"); |
5968 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
5969 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5970 | | /* Start of AttributeSet */ |
5971 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
5972 | 0 | foffset += 4; |
5973 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Attributes"); |
5974 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
5975 | 0 | { |
5976 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
5977 | 0 | expert_add_info(pinfo, aitem, &ei_ndps_truncated); |
5978 | 0 | break; |
5979 | 0 | } |
5980 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %d", ii+1); |
5981 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); |
5982 | 0 | proto_item_set_end(bitem, tvb, foffset); |
5983 | 0 | } |
5984 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5985 | | /* End of AttributeSet */ |
5986 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_message, ndps_tree, foffset, NULL); |
5987 | 0 | proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN); |
5988 | 0 | foffset += 4; |
5989 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Account"); |
5990 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
5991 | 0 | proto_item_set_end(aitem, tvb, foffset); |
5992 | 0 | break; |
5993 | 0 | case 0x0000000c: /* Add Delivery Method */ |
5994 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_file_name, ndps_tree, foffset, NULL); |
5995 | 0 | break; |
5996 | 0 | case 0x0000000d: /* Remove Delivery Method */ |
5997 | | /* Start of NameorID */ |
5998 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
5999 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
6000 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6001 | | /* End of NameorID */ |
6002 | 0 | break; |
6003 | 0 | case 0x0000000e: /* List Delivery Methods */ |
6004 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_delivery_method_type, tvb, foffset, 4, ENC_BIG_ENDIAN, &cred_type); |
6005 | 0 | foffset += 4; |
6006 | 0 | switch (cred_type) |
6007 | 0 | { |
6008 | 0 | case 0: /* Specification */ |
6009 | | /* Start of integeroption */ |
6010 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_integer_type_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &integer_type_flag); |
6011 | 0 | foffset += 4; |
6012 | 0 | if (integer_type_flag!=0) |
6013 | 0 | { |
6014 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_integer_type_value, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6015 | 0 | foffset += 4; |
6016 | 0 | } |
6017 | | /* End of integeroption */ |
6018 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6019 | 0 | foffset += 4; |
6020 | 0 | break; |
6021 | 0 | case 1: /* Continuation */ |
6022 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_context_len, tvb, foffset, 4, ENC_BIG_ENDIAN, &length); |
6023 | 0 | foffset += 4; |
6024 | 0 | if (length!=0) |
6025 | 0 | { |
6026 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_context, tvb, foffset, length, ENC_NA); |
6027 | 0 | } |
6028 | 0 | foffset += length; |
6029 | 0 | foffset += (length%2); |
6030 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_abort_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6031 | 0 | foffset += 4; |
6032 | 0 | break; |
6033 | 0 | default: |
6034 | 0 | break; |
6035 | 0 | } |
6036 | 0 | break; |
6037 | 0 | case 0x0000000f: /* Get Delivery Method Information */ |
6038 | | /* Start of NameorID */ |
6039 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
6040 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
6041 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6042 | | /* End of NameorID */ |
6043 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6044 | 0 | foffset += 4; |
6045 | 0 | break; |
6046 | 0 | default: |
6047 | 0 | break; |
6048 | 0 | } |
6049 | 0 | break; |
6050 | 0 | case 0x06097a: /* Resman */ |
6051 | 0 | switch(ndps_func) |
6052 | 0 | { |
6053 | 0 | case 0x00000001: /* Bind */ |
6054 | 0 | foffset = credentials(tvb, pinfo, ndps_tree, foffset); |
6055 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_retrieve_restrictions, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6056 | 0 | foffset += 4; |
6057 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_bind_security_option_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
6058 | 0 | foffset += 4; |
6059 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
6060 | 0 | { |
6061 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
6062 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
6063 | 0 | break; |
6064 | 0 | } |
6065 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Security %d", ii+1); |
6066 | 0 | length = tvb_get_ntohl(tvb, foffset); |
6067 | 0 | foffset += 4; |
6068 | 0 | if (length==4) |
6069 | 0 | { |
6070 | 0 | proto_tree_add_item(atree, hf_bind_security, tvb, foffset, length, ENC_BIG_ENDIAN); |
6071 | 0 | } |
6072 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6073 | 0 | } |
6074 | 0 | break; |
6075 | 0 | case 0x00000002: /* Unbind */ |
6076 | 0 | case 0x00000008: /* Get Resource Manager NDS Object Name */ |
6077 | 0 | case 0x00000009: /* Get Resource Manager Session Information */ |
6078 | | /* NoOp */ |
6079 | 0 | break; |
6080 | 0 | case 0x00000003: /* Add Resource File */ |
6081 | 0 | proto_tree_add_item(ndps_tree, hf_packet_count, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6082 | 0 | foffset += 4; |
6083 | 0 | proto_tree_add_item(ndps_tree, hf_last_packet_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6084 | 0 | foffset += 4; |
6085 | 0 | proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6086 | 0 | foffset += 4; |
6087 | 0 | foffset = res_add_input_data(tvb, pinfo, ndps_tree, foffset); |
6088 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
6089 | 0 | foffset += 4; |
6090 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
6091 | 0 | { |
6092 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
6093 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
6094 | 0 | break; |
6095 | 0 | } |
6096 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %d", ii+1); |
6097 | 0 | length=tvb_get_ntohl(tvb, foffset); |
6098 | 0 | length_remaining = tvb_reported_length_remaining(tvb, foffset); |
6099 | 0 | if(length_remaining == -1 || (uint32_t) length_remaining < length) |
6100 | 0 | { |
6101 | 0 | return foffset; |
6102 | 0 | } |
6103 | 0 | proto_tree_add_item(atree, hf_ndps_item_ptr, tvb, foffset, length, ENC_NA); |
6104 | 0 | foffset += length; |
6105 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6106 | 0 | } |
6107 | 0 | break; |
6108 | 0 | case 0x00000004: /* Delete Resource File */ |
6109 | 0 | foffset = res_add_input_data(tvb, pinfo, ndps_tree, foffset); |
6110 | 0 | break; |
6111 | 0 | case 0x00000005: /* List Resources */ |
6112 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_max_items, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6113 | 0 | foffset += 4; |
6114 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6115 | 0 | foffset += 4; |
6116 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_resource_list_type, tvb, foffset, 4, ENC_BIG_ENDIAN, &resource_type); |
6117 | 0 | foffset += 4; |
6118 | 0 | switch (resource_type) |
6119 | 0 | { |
6120 | 0 | case 0: /* Print Drivers */ |
6121 | 0 | proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6122 | 0 | foffset += 4; |
6123 | 0 | break; |
6124 | 0 | case 1: /* Printer Definitions */ |
6125 | 0 | case 2: /* Printer Definitions Short */ |
6126 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_vendor_dir, ndps_tree, foffset, NULL); |
6127 | 0 | break; |
6128 | 0 | case 3: /* Banner Page Files */ |
6129 | 0 | proto_tree_add_item(ndps_tree, hf_banner_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6130 | 0 | foffset += 4; |
6131 | 0 | break; |
6132 | 0 | case 4: /* Font Types */ |
6133 | 0 | proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6134 | 0 | foffset += 4; |
6135 | 0 | proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6136 | 0 | foffset += 4; |
6137 | 0 | break; |
6138 | 0 | case 5: /* Printer Driver Files */ |
6139 | 0 | case 12: /* Printer Driver Files 2 */ |
6140 | 0 | case 9: /* Generic Files */ |
6141 | 0 | proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6142 | 0 | foffset += 4; |
6143 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_type, ndps_tree, foffset, NULL); |
6144 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_manuf, ndps_tree, foffset, NULL); |
6145 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_inf_file_name, ndps_tree, foffset, NULL); |
6146 | 0 | field_len = tvb_get_ntohl(tvb, foffset); |
6147 | 0 | foffset += 4; |
6148 | 0 | proto_tree_add_item(ndps_tree, hf_printer_id, tvb, foffset, field_len, ENC_NA); |
6149 | 0 | break; |
6150 | 0 | case 6: /* Printer Definition File */ |
6151 | 0 | case 10: /* Printer Definition File 2 */ |
6152 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_vendor_dir, ndps_tree, foffset, NULL); |
6153 | 0 | foffset += 4; |
6154 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_type, ndps_tree, foffset, NULL); |
6155 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_manuf, ndps_tree, foffset, NULL); |
6156 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_inf_file_name, ndps_tree, foffset, NULL); |
6157 | 0 | field_len = tvb_get_ntohl(tvb, foffset); |
6158 | 0 | foffset += 4; |
6159 | 0 | proto_tree_add_item(ndps_tree, hf_printer_id, tvb, foffset, field_len, ENC_NA); |
6160 | 0 | break; |
6161 | 0 | case 7: /* Font Files */ |
6162 | 0 | proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6163 | 0 | foffset += 4; |
6164 | 0 | proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6165 | 0 | foffset += 4; |
6166 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_font_name, ndps_tree, foffset, NULL); |
6167 | 0 | break; |
6168 | 0 | case 8: /* Generic Type */ |
6169 | 0 | case 11: /* Printer Driver Types 2 */ |
6170 | 0 | case 13: /* Printer Driver Types Archive */ |
6171 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_manuf, ndps_tree, foffset, NULL); |
6172 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_type, ndps_tree, foffset, NULL); |
6173 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_inf_file_name, ndps_tree, foffset, NULL); |
6174 | 0 | break; |
6175 | 0 | case 14: /* Languages Available */ |
6176 | 0 | break; |
6177 | 0 | default: |
6178 | 0 | break; |
6179 | 0 | } |
6180 | 0 | break; |
6181 | 0 | case 0x00000006: /* Get Resource File */ |
6182 | 0 | proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6183 | 0 | foffset += 4; |
6184 | 0 | proto_tree_add_item(ndps_tree, hf_res_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6185 | 0 | resource_type = tvb_get_ntohl(tvb, foffset); |
6186 | 0 | foffset += 4; |
6187 | 0 | switch (resource_type) |
6188 | 0 | { |
6189 | 0 | case 0: /* Print Drivers */ |
6190 | 0 | proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6191 | 0 | foffset += 4; |
6192 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL); |
6193 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_file_name, ndps_tree, foffset, NULL); |
6194 | 0 | break; |
6195 | 0 | case 1: /* Printer Definitions */ |
6196 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_vendor_dir, ndps_tree, foffset, NULL); |
6197 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_file_name, ndps_tree, foffset, NULL); |
6198 | 0 | break; |
6199 | 0 | case 2: /* Banner Page Files */ |
6200 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_banner_name, ndps_tree, foffset, NULL); |
6201 | 0 | break; |
6202 | 0 | case 3: /* Font Types */ |
6203 | 0 | proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6204 | 0 | foffset += 4; |
6205 | 0 | proto_tree_add_item(ndps_tree, hf_font_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6206 | 0 | foffset += 4; |
6207 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_file_name, ndps_tree, foffset, NULL); |
6208 | 0 | break; |
6209 | 0 | case 4: /* Generic Files/ Archive */ |
6210 | 0 | case 5: /* Printer Driver Archive */ |
6211 | 0 | proto_tree_add_item(ndps_tree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6212 | 0 | foffset += 4; |
6213 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_dir_name, ndps_tree, foffset, NULL); |
6214 | 0 | proto_tree_add_item(ndps_tree, hf_archive_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6215 | 0 | foffset += 4; |
6216 | 0 | break; |
6217 | 0 | default: |
6218 | 0 | break; |
6219 | 0 | } |
6220 | 0 | break; |
6221 | 0 | case 0x00000007: /* Get Resource File Date */ |
6222 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6223 | 0 | foffset += 4; |
6224 | 0 | foffset = res_add_input_data(tvb, pinfo, ndps_tree, foffset); |
6225 | 0 | break; |
6226 | 0 | case 0x0000000a: /* Set Resource Language Context */ |
6227 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6228 | 0 | foffset += 4; |
6229 | 0 | break; |
6230 | 0 | default: |
6231 | 0 | break; |
6232 | 0 | } |
6233 | 0 | break; |
6234 | 0 | case 0x06097b: /* Delivery */ |
6235 | 0 | switch(ndps_func) |
6236 | 0 | { |
6237 | 0 | case 0x00000001: /* Delivery Bind */ |
6238 | 0 | foffset = credentials(tvb, pinfo, ndps_tree, foffset); |
6239 | 0 | break; |
6240 | 0 | case 0x00000002: /* Delivery Unbind */ |
6241 | | /* NoOp */ |
6242 | 0 | break; |
6243 | 0 | case 0x00000003: /* Delivery Send */ |
6244 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
6245 | 0 | foffset += 4; |
6246 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
6247 | 0 | { |
6248 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
6249 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
6250 | 0 | break; |
6251 | 0 | } |
6252 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %d", ii+1); |
6253 | 0 | proto_tree_add_item(atree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6254 | 0 | foffset += 4; |
6255 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Supplier ID"); |
6256 | 0 | length = tvb_get_ntohl(tvb, foffset); |
6257 | 0 | foffset += 4; |
6258 | 0 | if (length==4) |
6259 | 0 | { |
6260 | 0 | proto_tree_add_item(btree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
6261 | 0 | } |
6262 | 0 | foffset += length; |
6263 | 0 | proto_tree_add_item(btree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6264 | 0 | foffset += 4; |
6265 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6266 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Containing Class"); |
6267 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
6268 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6269 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Containing Object"); |
6270 | 0 | foffset = objectidentification(tvb, pinfo->pool, btree, foffset); |
6271 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6272 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Filter Class"); |
6273 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
6274 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6275 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object Class"); |
6276 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
6277 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6278 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object ID"); |
6279 | 0 | foffset = objectidentification(tvb, pinfo->pool, btree, foffset); |
6280 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6281 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Event Object ID"); |
6282 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
6283 | 0 | foffset = attribute_value(tvb, pinfo, atree, foffset); |
6284 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_message, atree, foffset, NULL); |
6285 | 0 | proto_tree_add_item(atree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6286 | 0 | foffset += 4; |
6287 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6288 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Account"); |
6289 | 0 | foffset = qualifiedname(tvb, pinfo->pool, btree, foffset); |
6290 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6291 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6292 | 0 | } |
6293 | 0 | break; |
6294 | 0 | case 0x00000004: /* Delivery Send2 */ |
6295 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_objects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
6296 | 0 | foffset += 4; |
6297 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
6298 | 0 | { |
6299 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
6300 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
6301 | 0 | break; |
6302 | 0 | } |
6303 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object %d", ii+1); |
6304 | 0 | proto_tree_add_item(atree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6305 | 0 | foffset += 4; |
6306 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Supplier ID"); |
6307 | 0 | length = tvb_get_ntohl(tvb, foffset); |
6308 | 0 | foffset += 4; |
6309 | 0 | if (length==4) |
6310 | 0 | { |
6311 | 0 | proto_tree_add_item(btree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
6312 | 0 | } |
6313 | 0 | foffset += length; |
6314 | 0 | proto_tree_add_item(atree, hf_ndps_event_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6315 | 0 | foffset += 4; |
6316 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6317 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Containing Class"); |
6318 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
6319 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6320 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Containing Object"); |
6321 | 0 | foffset = objectidentification(tvb, pinfo->pool, btree, foffset); |
6322 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6323 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Filter Class"); |
6324 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
6325 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6326 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object Class"); |
6327 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
6328 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6329 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object ID"); |
6330 | 0 | foffset = objectidentification(tvb, pinfo->pool, btree, foffset); |
6331 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6332 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Event Object ID"); |
6333 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
6334 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6335 | | /* Start of AttributeSet */ |
6336 | 0 | number_of_items2 = tvb_get_ntohl(tvb, foffset); |
6337 | 0 | proto_tree_add_uint(atree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items2); |
6338 | 0 | foffset += 4; |
6339 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute"); |
6340 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
6341 | 0 | { |
6342 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
6343 | 0 | expert_add_info(pinfo, bitem, &ei_ndps_truncated); |
6344 | 0 | break; |
6345 | 0 | } |
6346 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); |
6347 | 0 | } |
6348 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6349 | | /* End of AttributeSet */ |
6350 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_message, atree, foffset, NULL); |
6351 | 0 | proto_tree_add_item(atree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6352 | 0 | foffset += 4; |
6353 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Account"); |
6354 | 0 | foffset = qualifiedname(tvb, pinfo->pool, btree, foffset); |
6355 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6356 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6357 | 0 | } |
6358 | 0 | break; |
6359 | 0 | default: |
6360 | 0 | break; |
6361 | 0 | } |
6362 | 0 | break; |
6363 | 0 | default: |
6364 | 0 | break; |
6365 | 0 | } |
6366 | 0 | return foffset; |
6367 | 0 | } |
6368 | | |
6369 | | static int |
6370 | | ndps_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, unsigned foffset) |
6371 | 0 | { |
6372 | 0 | uint32_t number_of_items; |
6373 | 0 | uint32_t ndps_problem_type; |
6374 | 0 | uint32_t problem_type; |
6375 | 0 | uint32_t ii; |
6376 | 0 | proto_tree *atree; |
6377 | 0 | proto_item *aitem; |
6378 | 0 | proto_tree *btree; |
6379 | 0 | proto_item *bitem; |
6380 | 0 | proto_item *expert_item; |
6381 | |
|
6382 | 0 | ndps_problem_type = tvb_get_ntohl(tvb, foffset); |
6383 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error"); |
6384 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_problem_type, tvb, foffset, 4, ndps_problem_type); |
6385 | 0 | expert_add_info_format(pinfo, expert_item, &ei_ndps_problem_type, "Fault: %s", val_to_str(pinfo->pool, ndps_problem_type, error_type_enum, "Unknown NDPS Error (0x%08x)")); |
6386 | 0 | foffset += 4; |
6387 | 0 | switch(ndps_problem_type) |
6388 | 0 | { |
6389 | 0 | case 0: /* Security Error */ |
6390 | 0 | problem_type = tvb_get_ntohl(tvb, foffset); |
6391 | 0 | proto_tree_add_uint(ndps_tree, hf_problem_type, tvb, foffset, 4, problem_type); |
6392 | 0 | foffset += 4; |
6393 | 0 | if (problem_type==0) /* Standard Error */ |
6394 | 0 | { |
6395 | 0 | proto_tree_add_item(ndps_tree, hf_security_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6396 | 0 | foffset += 4; |
6397 | 0 | } |
6398 | 0 | else /* Extended Error */ |
6399 | 0 | { |
6400 | | /* Start of objectidentifier */ |
6401 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error"); |
6402 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
6403 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6404 | | /* End of objectidentifier */ |
6405 | 0 | } |
6406 | | /* Start of NameorID */ |
6407 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Message"); |
6408 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
6409 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6410 | | /* End of NameorID */ |
6411 | 0 | break; |
6412 | 0 | case 1: /* Service Error */ |
6413 | 0 | proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6414 | 0 | foffset += 4; |
6415 | 0 | if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */ |
6416 | 0 | { |
6417 | 0 | proto_tree_add_item(ndps_tree, hf_service_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6418 | 0 | foffset += 4; |
6419 | 0 | } |
6420 | 0 | else /* Extended Error */ |
6421 | 0 | { |
6422 | | /* Start of objectidentifier */ |
6423 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error"); |
6424 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
6425 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6426 | | /* End of objectidentifier */ |
6427 | 0 | } |
6428 | 0 | foffset = objectidentification(tvb, pinfo->pool, ndps_tree, foffset); |
6429 | 0 | foffset = attribute_value(tvb, pinfo, ndps_tree, foffset); /* Object Attribute Set */ |
6430 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_lib_error, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6431 | 0 | foffset += 4; |
6432 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_other_error, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6433 | 0 | foffset += 4; |
6434 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_other_error_2, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6435 | 0 | foffset += 4; |
6436 | 0 | if (tvb_reported_length_remaining(tvb, foffset) >= 4) { |
6437 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_other_error_string, ndps_tree, foffset, NULL); |
6438 | 0 | } |
6439 | 0 | break; |
6440 | 0 | case 2: /* Access Error */ |
6441 | 0 | proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6442 | 0 | foffset += 4; |
6443 | 0 | if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */ |
6444 | 0 | { |
6445 | 0 | proto_tree_add_item(ndps_tree, hf_access_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6446 | 0 | foffset += 4; |
6447 | 0 | } |
6448 | 0 | else /* Extended Error */ |
6449 | 0 | { |
6450 | | /* Start of objectidentifier */ |
6451 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error"); |
6452 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
6453 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6454 | | /* End of objectidentifier */ |
6455 | 0 | } |
6456 | 0 | foffset = objectidentification(tvb, pinfo->pool, ndps_tree, foffset); |
6457 | 0 | break; |
6458 | 0 | case 3: /* Printer Error */ |
6459 | 0 | proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6460 | 0 | foffset += 4; |
6461 | 0 | if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */ |
6462 | 0 | { |
6463 | 0 | proto_tree_add_item(ndps_tree, hf_printer_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6464 | 0 | foffset += 4; |
6465 | 0 | } |
6466 | 0 | else /* Extended Error */ |
6467 | 0 | { |
6468 | | /* Start of objectidentifier */ |
6469 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error"); |
6470 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
6471 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6472 | | /* End of objectidentifier */ |
6473 | 0 | } |
6474 | 0 | foffset = objectidentification(tvb, pinfo->pool, ndps_tree, foffset); |
6475 | 0 | break; |
6476 | 0 | case 4: /* Selection Error */ |
6477 | 0 | proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6478 | 0 | foffset += 4; |
6479 | 0 | if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */ |
6480 | 0 | { |
6481 | 0 | proto_tree_add_item(ndps_tree, hf_selection_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6482 | 0 | foffset += 4; |
6483 | 0 | } |
6484 | 0 | else /* Extended Error */ |
6485 | 0 | { |
6486 | | /* Start of objectidentifier */ |
6487 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error"); |
6488 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
6489 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6490 | | /* End of objectidentifier */ |
6491 | 0 | } |
6492 | 0 | foffset = objectidentification(tvb, pinfo->pool, ndps_tree, foffset); |
6493 | 0 | foffset = attribute_value(tvb, pinfo, ndps_tree, foffset); /* Object Attribute Set */ |
6494 | 0 | break; |
6495 | 0 | case 5: /* Document Access Error */ |
6496 | 0 | proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6497 | 0 | foffset += 4; |
6498 | 0 | if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */ |
6499 | 0 | { |
6500 | 0 | proto_tree_add_item(ndps_tree, hf_doc_access_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6501 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ndps_tree, foffset); |
6502 | 0 | } |
6503 | 0 | else /* Extended Error */ |
6504 | 0 | { |
6505 | | /* Start of objectidentifier */ |
6506 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error"); |
6507 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
6508 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6509 | | /* End of objectidentifier */ |
6510 | 0 | } |
6511 | 0 | foffset = objectidentification(tvb, pinfo->pool, ndps_tree, foffset); |
6512 | 0 | break; |
6513 | 0 | case 6: /* Attribute Error */ |
6514 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
6515 | 0 | foffset += 4; |
6516 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
6517 | 0 | { |
6518 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
6519 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
6520 | 0 | break; |
6521 | 0 | } |
6522 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %d", ii+1); |
6523 | 0 | proto_tree_add_item(atree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6524 | 0 | foffset += 4; |
6525 | 0 | if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */ |
6526 | 0 | { |
6527 | 0 | proto_tree_add_item(atree, hf_attribute_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6528 | 0 | foffset += 4; |
6529 | 0 | } |
6530 | 0 | else /* Extended Error */ |
6531 | 0 | { |
6532 | | /* Start of objectidentifier */ |
6533 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Extended Error"); |
6534 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
6535 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6536 | | /* End of objectidentifier */ |
6537 | 0 | } |
6538 | 0 | foffset = attribute_value(tvb, pinfo, atree, foffset); /* Object Attribute Set */ |
6539 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6540 | 0 | } |
6541 | 0 | break; |
6542 | 0 | case 7: /* Update Error */ |
6543 | 0 | proto_tree_add_item(ndps_tree, hf_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6544 | 0 | foffset += 4; |
6545 | 0 | if (tvb_get_ntohl(tvb, foffset-4)==0) /* Standard Error */ |
6546 | 0 | { |
6547 | 0 | proto_tree_add_item(ndps_tree, hf_update_problem_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6548 | 0 | foffset += 4; |
6549 | 0 | } |
6550 | 0 | else /* Extended Error */ |
6551 | 0 | { |
6552 | | /* Start of objectidentifier */ |
6553 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Extended Error"); |
6554 | 0 | foffset = objectidentifier(tvb, pinfo->pool, atree, foffset); |
6555 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6556 | | /* End of objectidentifier */ |
6557 | 0 | } |
6558 | 0 | foffset = objectidentification(tvb, pinfo->pool, ndps_tree, foffset); |
6559 | 0 | break; |
6560 | 0 | default: |
6561 | 0 | break; |
6562 | 0 | } |
6563 | 0 | return foffset; |
6564 | 0 | } |
6565 | | |
6566 | | static int |
6567 | | return_code(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, unsigned foffset) |
6568 | 0 | { |
6569 | 0 | uint32_t expert_status; |
6570 | 0 | proto_item *expert_item; |
6571 | |
|
6572 | 0 | expert_status = tvb_get_ntohl(tvb, foffset); |
6573 | 0 | expert_item = proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6574 | 0 | if (expert_status != 0) { |
6575 | 0 | expert_add_info_format(pinfo, expert_item, &ei_ndps_return_code, "Fault: %s", |
6576 | 0 | val_to_str_ext(pinfo->pool, expert_status, &ndps_error_types_ext, "Unknown NDPS Error (0x%08x)")); |
6577 | 0 | } |
6578 | 0 | foffset += 4; |
6579 | 0 | if (tvb_get_ntohl(tvb, foffset-4) != 0) |
6580 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error"); |
6581 | 0 | if (tvb_get_ntohl(tvb, foffset-4) == 0) |
6582 | 0 | { |
6583 | 0 | return foffset; |
6584 | 0 | } |
6585 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_ext_error, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6586 | 0 | foffset += 4; |
6587 | 0 | return foffset; |
6588 | 0 | } |
6589 | | |
6590 | | static unsigned |
6591 | | dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, unsigned foffset) |
6592 | 2 | { |
6593 | 2 | conversation_t *conversation = NULL; |
6594 | 2 | ndps_req_hash_value *request_value = NULL; |
6595 | 2 | proto_tree *atree; |
6596 | 2 | proto_item *aitem; |
6597 | 2 | proto_tree *btree; |
6598 | 2 | proto_item *bitem; |
6599 | 2 | proto_tree *ctree; |
6600 | 2 | proto_item *citem; |
6601 | 2 | proto_tree *dtree; |
6602 | 2 | proto_item *ditem; |
6603 | 2 | uint32_t ii; |
6604 | 2 | uint32_t jj; |
6605 | 2 | uint32_t kk; |
6606 | 2 | uint32_t number_of_items=0; |
6607 | 2 | uint32_t number_of_items2=0; |
6608 | 2 | uint32_t number_of_items3=0; |
6609 | 2 | uint32_t length=0; |
6610 | 2 | uint32_t ndps_func=0; |
6611 | 2 | uint32_t ndps_prog=0; |
6612 | 2 | uint32_t error_val=0; |
6613 | 2 | uint32_t resource_type=0; |
6614 | 2 | int length_remaining; |
6615 | 2 | proto_item *expert_item; |
6616 | 2 | uint32_t expert_status; |
6617 | | |
6618 | 2 | if (!pinfo->fd->visited) { |
6619 | | /* Find the conversation whence the request would have come. */ |
6620 | 2 | conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, |
6621 | 2 | CONVERSATION_NCP, (uint32_t) pinfo->destport, (uint32_t) pinfo->destport, 0); |
6622 | 2 | if (conversation != NULL) { |
6623 | | /* find the record telling us the request made that caused |
6624 | | this reply */ |
6625 | 0 | request_value = ndps_hash_lookup(conversation, (uint32_t) pinfo->destport); |
6626 | 0 | p_add_proto_data(wmem_file_scope(), pinfo, proto_ndps, 0, (void*) request_value); |
6627 | 0 | } |
6628 | | /* else... we haven't seen an NDPS Request for that conversation. */ |
6629 | 2 | } |
6630 | 0 | else { |
6631 | 0 | request_value = (ndps_req_hash_value *)p_get_proto_data(wmem_file_scope(), pinfo, proto_ndps, 0); |
6632 | 0 | } |
6633 | 2 | if (request_value) { |
6634 | 0 | ndps_prog = request_value->ndps_prog; |
6635 | 0 | ndps_func = request_value->ndps_func; |
6636 | 0 | proto_tree_add_uint_format(ndps_tree, hf_ndps_reqframe, tvb, 0, |
6637 | 0 | 0, request_value->ndps_frame_num, |
6638 | 0 | "Response to Request in Frame Number: %u", |
6639 | 0 | request_value->ndps_frame_num); |
6640 | 0 | } |
6641 | | |
6642 | 2 | if (tvb_reported_length_remaining(tvb, foffset) < 12 && tvb_get_ntohl(tvb, foffset) == 0) /* No error and no return data */ |
6643 | 0 | { |
6644 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val); |
6645 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "- Ok"); |
6646 | 0 | return foffset; |
6647 | 0 | } |
6648 | 2 | if(ndps_func == 1 || ndps_func == 2) |
6649 | 0 | { |
6650 | 0 | expert_item = proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_stat, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6651 | 0 | expert_status = tvb_get_ntohl(tvb, foffset); |
6652 | 0 | if (expert_status != 0) { |
6653 | 0 | expert_add_info_format(pinfo, expert_item, &ei_ndps_rpc_acc_stat, "Fault: %s", val_to_str(pinfo->pool, expert_status, accept_stat, "Unknown NDPS Error (0x%08x)")); |
6654 | 0 | } |
6655 | 0 | foffset += 4; |
6656 | 0 | if (tvb_reported_length_remaining(tvb,foffset) < 4 ) { |
6657 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "- Error"); |
6658 | 0 | return foffset; |
6659 | 0 | } |
6660 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_results, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6661 | 0 | foffset += 4; |
6662 | 0 | if (tvb_reported_length_remaining(tvb,foffset) < 4) { |
6663 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "- Error"); |
6664 | 0 | return foffset; |
6665 | 0 | } |
6666 | 0 | } |
6667 | 2 | error_val = tvb_get_ntohl(tvb, foffset); |
6668 | 2 | proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val); |
6669 | 2 | foffset += 4; |
6670 | | /* Some functions return an error with no data, 0 is ok */ |
6671 | 2 | if (try_val_to_str_ext(tvb_get_ntohl(tvb, foffset), &ndps_error_types_ext) && tvb_reported_length_remaining(tvb,foffset) < 8 && (tvb_get_ntohl(tvb, foffset)!=0)) |
6672 | 0 | { |
6673 | 0 | expert_status = tvb_get_ntohl(tvb, foffset); |
6674 | 0 | expert_item = proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6675 | 0 | expert_add_info_format(pinfo, expert_item, &ei_ndps_return_code, "Fault: %s", val_to_str_ext(pinfo->pool, expert_status, &ndps_error_types_ext, "Unknown NDPS Error (0x%08x)")); |
6676 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "- Error"); |
6677 | 0 | return foffset; |
6678 | 0 | } |
6679 | 2 | col_append_str(pinfo->cinfo, COL_INFO, "- Ok"); |
6680 | 2 | switch(ndps_prog) |
6681 | 2 | { |
6682 | 0 | case 0x060976: /* Print */ |
6683 | 0 | switch(ndps_func) |
6684 | 0 | { |
6685 | 0 | case 0x00000001: /* Bind PSM */ |
6686 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6687 | 0 | foffset += 4; |
6688 | 0 | if(error_val != 0) |
6689 | 0 | { |
6690 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
6691 | 0 | if(tvb_reported_length_remaining(tvb, foffset) < 4) |
6692 | 0 | { |
6693 | 0 | break; |
6694 | 0 | } |
6695 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6696 | 0 | foffset += 4; |
6697 | 0 | } |
6698 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "PSM Name"); |
6699 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
6700 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6701 | 0 | break; |
6702 | 0 | case 0x00000002: /* Bind PA */ |
6703 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6704 | 0 | foffset += 4; |
6705 | 0 | if(error_val != 0) |
6706 | 0 | { |
6707 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
6708 | 0 | if(tvb_reported_length_remaining(tvb, foffset) < 4) |
6709 | 0 | { |
6710 | 0 | break; |
6711 | 0 | } |
6712 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6713 | 0 | foffset += 4; |
6714 | 0 | } |
6715 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
6716 | 0 | break; |
6717 | 0 | case 0x00000003: /* Unbind */ |
6718 | 0 | break; |
6719 | 0 | case 0x00000004: /* Print */ |
6720 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ndps_tree, foffset, NULL); |
6721 | 0 | proto_tree_add_item(ndps_tree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6722 | 0 | foffset += 4; |
6723 | 0 | if(error_val != 0) |
6724 | 0 | { |
6725 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
6726 | 0 | } |
6727 | 0 | break; |
6728 | 0 | case 0x00000005: /* Modify Job */ |
6729 | 0 | case 0x00000006: /* Cancel Job */ |
6730 | 0 | case 0x00000008: /* Promote Job */ |
6731 | 0 | case 0x0000000b: /* Resume */ |
6732 | 0 | case 0x0000000d: /* Create */ |
6733 | | /* Start of AttributeSet */ |
6734 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
6735 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items); |
6736 | 0 | foffset += 4; |
6737 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Attribute Set"); |
6738 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
6739 | 0 | { |
6740 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
6741 | 0 | expert_add_info(pinfo, aitem, &ei_ndps_truncated); |
6742 | 0 | break; |
6743 | 0 | } |
6744 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %d", ii+1); |
6745 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); /* Object Attribute Set */ |
6746 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6747 | 0 | } |
6748 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6749 | | /* End of AttributeSet */ |
6750 | 0 | if(error_val != 0) |
6751 | 0 | { |
6752 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
6753 | 0 | } |
6754 | 0 | break; |
6755 | 0 | case 0x00000007: /* List Object Attributes */ |
6756 | 0 | proto_tree_add_item(ndps_tree, hf_answer_time, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6757 | 0 | foffset += 4; |
6758 | | /* Continuation Option */ |
6759 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Continuation Option"); |
6760 | 0 | number_of_items=tvb_get_ntohl(tvb, foffset); |
6761 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_num_options, tvb, foffset, 4, number_of_items); |
6762 | 0 | foffset += 4; |
6763 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
6764 | 0 | { |
6765 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
6766 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
6767 | 0 | break; |
6768 | 0 | } |
6769 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Option %d", ii+1); |
6770 | 0 | length=tvb_get_ntohl(tvb, foffset); |
6771 | 0 | length_remaining = tvb_reported_length_remaining(tvb, foffset); |
6772 | 0 | if(length_remaining == -1 || (uint32_t) length_remaining < length) |
6773 | 0 | { |
6774 | 0 | return foffset; |
6775 | 0 | } |
6776 | 0 | proto_tree_add_item(btree, hf_ndps_item_ptr, tvb, foffset, length, ENC_NA); |
6777 | 0 | foffset += length; |
6778 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6779 | 0 | } |
6780 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6781 | | /* Limit Encountered Option */ |
6782 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Limit Encountered Option"); |
6783 | 0 | proto_tree_add_item(atree, hf_ndps_len, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6784 | 0 | foffset += 4; |
6785 | 0 | proto_tree_add_item(atree, hf_ndps_limit_enc, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6786 | 0 | foffset += 4; |
6787 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6788 | | /* Object Results Set */ |
6789 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Results Set"); |
6790 | 0 | number_of_items=tvb_get_ntohl(tvb, foffset); |
6791 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_num_results, tvb, foffset, 4, number_of_items); |
6792 | 0 | foffset += 4; |
6793 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
6794 | 0 | { |
6795 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
6796 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
6797 | 0 | break; |
6798 | 0 | } |
6799 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Results: (%d)", ii+1); |
6800 | 0 | if (ii>0) { |
6801 | 0 | foffset += 2; |
6802 | 0 | } |
6803 | 0 | foffset = objectidentification(tvb, pinfo->pool, btree, foffset); |
6804 | 0 | expert_item = proto_tree_add_item_ret_uint(btree, hf_ndps_num_objects, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items2); |
6805 | 0 | foffset += 4; |
6806 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
6807 | 0 | { |
6808 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
6809 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
6810 | 0 | break; |
6811 | 0 | } |
6812 | 0 | ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Object: (%d)", jj+1); |
6813 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ctree, foffset); |
6814 | 0 | foffset += align_4(tvb, foffset); |
6815 | 0 | expert_item = proto_tree_add_item_ret_uint(ctree, hf_ndps_num_values, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items3); |
6816 | 0 | foffset += 4; |
6817 | 0 | for (kk = 0; kk < number_of_items3; kk++ ) |
6818 | 0 | { |
6819 | 0 | if (kk >= NDPS_MAX_ITEMS) { |
6820 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
6821 | 0 | break; |
6822 | 0 | } |
6823 | 0 | dtree = proto_tree_add_subtree_format(ctree, tvb, foffset, -1, ett_ndps, &ditem, "Value: (%d)", kk+1); |
6824 | 0 | foffset = attribute_value(tvb, pinfo, dtree, foffset); |
6825 | 0 | proto_item_set_end(ditem, tvb, foffset); |
6826 | 0 | } |
6827 | 0 | proto_tree_add_item(ctree, hf_ndps_qualifier, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6828 | 0 | foffset += 4; |
6829 | 0 | foffset += align_4(tvb, foffset); |
6830 | 0 | proto_item_set_end(citem, tvb, foffset); |
6831 | 0 | } |
6832 | | |
6833 | | /*foffset += align_4(tvb, foffset);*/ |
6834 | 0 | foffset = objectidentifier(tvb, pinfo->pool, btree, foffset); |
6835 | | /*foffset += align_4(tvb, foffset);*/ |
6836 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6837 | 0 | } |
6838 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6839 | 0 | if(error_val != 0) |
6840 | 0 | { |
6841 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
6842 | 0 | } |
6843 | 0 | break; |
6844 | 0 | case 0x00000009: /* Interrupt */ |
6845 | 0 | case 0x0000000a: /* Pause */ |
6846 | | /* Start of NWDPPrtContainedObjectId */ |
6847 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job ID"); |
6848 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, atree, foffset, NULL); |
6849 | 0 | proto_tree_add_item(atree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6850 | 0 | foffset += 4; |
6851 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6852 | | /* End of NWDPPrtContainedObjectId */ |
6853 | | /* Start of AttributeSet */ |
6854 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
6855 | 0 | foffset += 4; |
6856 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Object Attribute Set"); |
6857 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
6858 | 0 | { |
6859 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
6860 | 0 | expert_add_info(pinfo, aitem, &ei_ndps_truncated); |
6861 | 0 | break; |
6862 | 0 | } |
6863 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Attribute %d", ii+1); |
6864 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); /* Object Attribute Set */ |
6865 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6866 | 0 | } |
6867 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6868 | | /* End of AttributeSet */ |
6869 | 0 | if(error_val != 0) |
6870 | 0 | { |
6871 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
6872 | 0 | } |
6873 | 0 | break; |
6874 | 0 | case 0x0000000c: /* Clean */ |
6875 | 0 | case 0x0000000e: /* Delete */ |
6876 | 0 | case 0x0000000f: /* Disable PA */ |
6877 | 0 | case 0x00000010: /* Enable PA */ |
6878 | 0 | case 0x00000012: /* Set */ |
6879 | 0 | case 0x00000013: /* Shutdown PA */ |
6880 | 0 | case 0x00000014: /* Startup PA */ |
6881 | 0 | case 0x00000018: /* Transfer Data */ |
6882 | 0 | case 0x00000019: /* Device Control */ |
6883 | 0 | case 0x0000001b: /* Remove Event Profile */ |
6884 | 0 | case 0x0000001c: /* Modify Event Profile */ |
6885 | 0 | case 0x0000001e: /* Shutdown PSM */ |
6886 | 0 | case 0x0000001f: /* Cancel PSM Shutdown */ |
6887 | 0 | case 0x00000020: /* Set Printer DS Information */ |
6888 | 0 | case 0x00000021: /* Clean User Jobs */ |
6889 | 0 | if(error_val != 0) |
6890 | 0 | { |
6891 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
6892 | 0 | } |
6893 | 0 | break; |
6894 | 0 | case 0x00000011: /* Resubmit Jobs */ |
6895 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_jobs, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
6896 | 0 | foffset += 4; |
6897 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Resubmit Job"); |
6898 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
6899 | 0 | { |
6900 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
6901 | 0 | expert_add_info(pinfo, aitem, &ei_ndps_truncated); |
6902 | 0 | break; |
6903 | 0 | } |
6904 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Job %d", ii+1); |
6905 | | /* Start of NWDPPrtContainedObjectId */ |
6906 | 0 | ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Old Job"); |
6907 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ctree, foffset, NULL); |
6908 | 0 | proto_tree_add_item(ctree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6909 | 0 | foffset += 4; |
6910 | 0 | proto_item_set_end(citem, tvb, foffset); |
6911 | | /* End of NWDPPrtContainedObjectId */ |
6912 | | /* Start of NWDPPrtContainedObjectId */ |
6913 | 0 | ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "New Job"); |
6914 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_pa_name, ctree, foffset, NULL); |
6915 | 0 | proto_tree_add_item(ctree, hf_local_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6916 | 0 | foffset += 4; |
6917 | 0 | proto_item_set_end(citem, tvb, foffset); |
6918 | | /* End of NWDPPrtContainedObjectId */ |
6919 | | /* Start of AttributeSet */ |
6920 | 0 | proto_tree_add_item_ret_uint(ctree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items2); |
6921 | 0 | foffset += 4; |
6922 | 0 | ctree = proto_tree_add_subtree(btree, tvb, foffset, -1, ett_ndps, &citem, "Job Status"); |
6923 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
6924 | 0 | { |
6925 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
6926 | 0 | expert_add_info(pinfo, citem, &ei_ndps_truncated); |
6927 | 0 | break; |
6928 | 0 | } |
6929 | 0 | dtree = proto_tree_add_subtree_format(ctree, tvb, foffset, -1, ett_ndps, &ditem, "Object %d", jj+1); |
6930 | 0 | foffset = attribute_value(tvb, pinfo, dtree, foffset); /* Object Attribute Set */ |
6931 | 0 | proto_item_set_end(ditem, tvb, foffset); |
6932 | 0 | } |
6933 | 0 | proto_item_set_end(citem, tvb, foffset); |
6934 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6935 | | /* End of AttributeSet */ |
6936 | 0 | } |
6937 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6938 | | /* End of ResubmitJob Set */ |
6939 | 0 | if(error_val != 0) |
6940 | 0 | { |
6941 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
6942 | 0 | } |
6943 | 0 | break; |
6944 | 0 | case 0x00000015: /* Reorder Job */ |
6945 | | /* Start of AttributeSet */ |
6946 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Job Status"); |
6947 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
6948 | 0 | foffset += 4; |
6949 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
6950 | 0 | { |
6951 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
6952 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
6953 | 0 | break; |
6954 | 0 | } |
6955 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object %d", ii+1); |
6956 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); /* Object Attribute Set */ |
6957 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6958 | 0 | } |
6959 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6960 | | /* End of AttributeSet */ |
6961 | 0 | if(error_val != 0) |
6962 | 0 | { |
6963 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
6964 | 0 | } |
6965 | 0 | break; |
6966 | 0 | case 0x00000016: /* Pause PA */ |
6967 | 0 | case 0x00000017: /* Resume PA */ |
6968 | | /* Start of AttributeSet */ |
6969 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Printer Status"); |
6970 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
6971 | 0 | foffset += 4; |
6972 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
6973 | 0 | { |
6974 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
6975 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
6976 | 0 | break; |
6977 | 0 | } |
6978 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Object %d", ii+1); |
6979 | 0 | foffset = attribute_value(tvb, pinfo, btree, foffset); /* Object Attribute Set */ |
6980 | 0 | proto_item_set_end(bitem, tvb, foffset); |
6981 | 0 | } |
6982 | 0 | proto_item_set_end(aitem, tvb, foffset); |
6983 | | /* End of AttributeSet */ |
6984 | 0 | if(error_val != 0) |
6985 | 0 | { |
6986 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
6987 | 0 | } |
6988 | 0 | break; |
6989 | 0 | case 0x0000001a: /* Add Event Profile */ |
6990 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
6991 | 0 | foffset += 4; |
6992 | 0 | if(error_val != 0) |
6993 | 0 | { |
6994 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
6995 | 0 | } |
6996 | 0 | break; |
6997 | 0 | case 0x0000001d: /* List Event Profiles */ |
6998 | 0 | length = tvb_get_ntohl(tvb, foffset); |
6999 | 0 | foffset += 4; |
7000 | 0 | if (length==4) |
7001 | 0 | { |
7002 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
7003 | 0 | } |
7004 | 0 | foffset += length; |
7005 | | /* Start of Eventhandling */ |
7006 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7007 | 0 | foffset += 4; |
7008 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7009 | 0 | foffset += 4; |
7010 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer Name"); |
7011 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
7012 | 0 | length = tvb_get_ntohl(tvb, foffset); |
7013 | 0 | foffset += 4; |
7014 | 0 | if (length==4) |
7015 | 0 | { |
7016 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
7017 | 0 | } |
7018 | 0 | foffset += length; |
7019 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7020 | 0 | foffset += 4; |
7021 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7022 | | /* Start of NameorID */ |
7023 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
7024 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
7025 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7026 | | /* End of NameorID */ |
7027 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Addresses"); |
7028 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7029 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items); |
7030 | 0 | foffset += 4; |
7031 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7032 | 0 | { |
7033 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7034 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7035 | 0 | break; |
7036 | 0 | } |
7037 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Address %d", ii+1); |
7038 | 0 | foffset = address_item(tvb, pinfo->pool,btree, foffset); |
7039 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7040 | 0 | } |
7041 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7042 | 0 | foffset = event_object_set(tvb, pinfo, ndps_tree, foffset); |
7043 | | /* End of Eventhandling */ |
7044 | 0 | length = tvb_get_ntohl(tvb, foffset); |
7045 | 0 | foffset += 4; |
7046 | 0 | if (length!=0) |
7047 | 0 | { |
7048 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, ENC_NA); |
7049 | 0 | } |
7050 | 0 | foffset += length; |
7051 | 0 | if(error_val != 0) |
7052 | 0 | { |
7053 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
7054 | 0 | } |
7055 | 0 | break; |
7056 | 0 | case 0x00000022: /* Map GUID to NDS Name */ |
7057 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "NDS Printer Name"); |
7058 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
7059 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7060 | 0 | if(error_val != 0) |
7061 | 0 | { |
7062 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
7063 | 0 | } |
7064 | 0 | break; |
7065 | 0 | case 0x00000023: /* AddEventProfile2 */ |
7066 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7067 | 0 | foffset += 4; |
7068 | 0 | proto_tree_add_item(ndps_tree, hf_notify_lease_exp_time, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7069 | 0 | foffset += 4; |
7070 | 0 | if(error_val != 0) |
7071 | 0 | { |
7072 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
7073 | 0 | } |
7074 | 0 | break; |
7075 | 0 | case 0x00000024: /* ListEventProfiles2 */ |
7076 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7077 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_events, tvb, foffset, 4, number_of_items); |
7078 | 0 | foffset += 4; |
7079 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7080 | 0 | { |
7081 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7082 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7083 | 0 | break; |
7084 | 0 | } |
7085 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Event %d", ii+1); |
7086 | | /* Start of Eventhandling2 */ |
7087 | 0 | proto_tree_add_item(atree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7088 | 0 | foffset += 4; |
7089 | 0 | proto_tree_add_item(atree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7090 | 0 | foffset += 4; |
7091 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Consumer Name"); |
7092 | 0 | foffset = qualifiedname(tvb, pinfo->pool, btree, foffset); |
7093 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_supplier_name, atree, foffset, NULL); |
7094 | 0 | proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7095 | 0 | foffset += 4; |
7096 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7097 | | /* Start of NameorID */ |
7098 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Method ID"); |
7099 | 0 | foffset = name_or_id(tvb, pinfo->pool, btree, foffset); |
7100 | 0 | foffset += align_4(tvb, foffset); |
7101 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7102 | | /* End of NameorID */ |
7103 | 0 | number_of_items2 = tvb_get_ntohl(tvb, foffset); |
7104 | 0 | proto_tree_add_uint(atree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items2); |
7105 | 0 | foffset += 4; |
7106 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Delivery Addresses"); |
7107 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
7108 | 0 | { |
7109 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
7110 | 0 | expert_add_info(pinfo, bitem, &ei_ndps_truncated); |
7111 | 0 | break; |
7112 | 0 | } |
7113 | 0 | ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Address %d", ii+1); |
7114 | 0 | foffset = address_item(tvb, pinfo->pool,ctree, foffset); |
7115 | 0 | proto_item_set_end(citem, tvb, foffset); |
7116 | 0 | } |
7117 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7118 | 0 | foffset = event_object_set(tvb, pinfo, atree, foffset); |
7119 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Account"); |
7120 | 0 | foffset = qualifiedname(tvb, pinfo->pool, btree, foffset); |
7121 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7122 | | /* Start of object identifier set */ |
7123 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, -1, ett_ndps, &bitem, "Notify Attributes"); |
7124 | 0 | expert_item = proto_tree_add_item_ret_uint(btree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items2); |
7125 | 0 | foffset += 4; |
7126 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
7127 | 0 | { |
7128 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
7129 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7130 | 0 | break; |
7131 | 0 | } |
7132 | 0 | ctree = proto_tree_add_subtree_format(btree, tvb, foffset, -1, ett_ndps, &citem, "Attribute %d", ii+1); |
7133 | 0 | foffset = objectidentifier(tvb, pinfo->pool, ctree, foffset); |
7134 | 0 | proto_item_set_end(citem, tvb, foffset); |
7135 | 0 | } |
7136 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7137 | | /* End of object identifier set */ |
7138 | 0 | proto_tree_add_item(atree, hf_notify_time_interval, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7139 | 0 | foffset += 4; |
7140 | 0 | proto_tree_add_item(atree, hf_notify_sequence_number, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7141 | 0 | foffset += 4; |
7142 | 0 | proto_tree_add_item(atree, hf_notify_lease_exp_time, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7143 | 0 | foffset += 4; |
7144 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_notify_printer_uri, atree, foffset, NULL); |
7145 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7146 | | /* End of Eventhandling2 */ |
7147 | 0 | length = tvb_get_ntohl(tvb, foffset); /* Added on 10-17-03 */ |
7148 | 0 | foffset += 4; |
7149 | 0 | if (length!=0) |
7150 | 0 | { |
7151 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, ENC_NA); |
7152 | 0 | } |
7153 | 0 | foffset += length; |
7154 | 0 | if(error_val != 0) |
7155 | 0 | { |
7156 | 0 | foffset = ndps_error(tvb, pinfo, ndps_tree, foffset); |
7157 | 0 | } |
7158 | 0 | } |
7159 | 0 | break; |
7160 | 0 | default: |
7161 | 0 | break; |
7162 | 0 | } |
7163 | 0 | break; |
7164 | 0 | case 0x060977: /* Broker */ |
7165 | 0 | switch(ndps_func) |
7166 | 0 | { |
7167 | 0 | case 0x00000001: /* Bind */ |
7168 | 0 | case 0x00000002: /* Unbind */ |
7169 | 0 | case 0x00000004: /* Enable Service */ |
7170 | 0 | case 0x00000005: /* Disable Service */ |
7171 | 0 | case 0x00000006: /* Down Broker */ |
7172 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7173 | 0 | break; |
7174 | 0 | case 0x00000003: /* List Services */ |
7175 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_services, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
7176 | 0 | foffset += 4; |
7177 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7178 | 0 | { |
7179 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7180 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7181 | 0 | break; |
7182 | 0 | } |
7183 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Service %d", ii+1); |
7184 | 0 | proto_tree_add_item(atree, hf_ndps_service_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7185 | 0 | foffset += 4; |
7186 | 0 | proto_tree_add_item(atree, hf_ndps_service_enabled, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7187 | 0 | foffset += 4; |
7188 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7189 | 0 | } |
7190 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7191 | 0 | break; |
7192 | 0 | case 0x00000007: /* Get Broker NDS Object Name */ |
7193 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, |
7194 | 0 | 4, ENC_BIG_ENDIAN); /* XXX - what does this count? */ |
7195 | 0 | foffset += 4; |
7196 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_broker_name, ndps_tree, foffset, NULL); |
7197 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_tree, ndps_tree, foffset, NULL); |
7198 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7199 | 0 | break; |
7200 | 0 | case 0x00000008: /* Get Broker Session Information */ |
7201 | 0 | default: |
7202 | 0 | break; |
7203 | 0 | } |
7204 | 0 | break; |
7205 | 0 | case 0x060978: /* Registry */ |
7206 | 0 | switch(ndps_func) |
7207 | 0 | { |
7208 | 0 | case 0x00000001: /* Bind */ |
7209 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
7210 | 0 | foffset += 4; |
7211 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7212 | 0 | { |
7213 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7214 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7215 | 0 | break; |
7216 | 0 | } |
7217 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Attribute %d", ii+1); |
7218 | 0 | length = tvb_get_ntohl(tvb, foffset); |
7219 | 0 | foffset += 4; |
7220 | 0 | if (length!=0) |
7221 | 0 | { |
7222 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_set, tvb, foffset, length, ENC_NA); |
7223 | 0 | } |
7224 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7225 | 0 | } |
7226 | 0 | break; |
7227 | 0 | case 0x00000002: /* Unbind */ |
7228 | | /* NoOp */ |
7229 | 0 | break; |
7230 | 0 | case 0x00000003: /* Register Server */ |
7231 | 0 | case 0x00000004: /* Deregister Server */ |
7232 | 0 | case 0x00000005: /* Register Registry */ |
7233 | 0 | case 0x00000006: /* Deregister Registry */ |
7234 | 0 | case 0x00000007: /* Registry Update */ |
7235 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7236 | 0 | break; |
7237 | 0 | case 0x00000008: /* List Local Servers */ |
7238 | 0 | case 0x00000009: /* List Servers */ |
7239 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
7240 | 0 | foffset += 4; |
7241 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7242 | 0 | { |
7243 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7244 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7245 | 0 | break; |
7246 | 0 | } |
7247 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %d", ii+1); |
7248 | 0 | foffset = server_entry(tvb, pinfo, atree, foffset); |
7249 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7250 | 0 | } |
7251 | 0 | length = tvb_get_ntohl(tvb, foffset); |
7252 | 0 | foffset += 4; |
7253 | 0 | if (length!=0) |
7254 | 0 | { |
7255 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, ENC_NA); |
7256 | 0 | } |
7257 | 0 | foffset += length; |
7258 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7259 | 0 | break; |
7260 | 0 | case 0x0000000a: /* List Known Registries */ |
7261 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7262 | 0 | expert_item = proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7263 | 0 | foffset += 4; |
7264 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7265 | 0 | { |
7266 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7267 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7268 | 0 | break; |
7269 | 0 | } |
7270 | 0 | aitem = proto_tree_add_item(ndps_tree, hf_ndps_client_server_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7271 | 0 | atree = proto_item_add_subtree(aitem, ett_ndps); |
7272 | 0 | foffset += 4; |
7273 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_registry_name, atree, foffset, NULL); |
7274 | 0 | foffset = print_address(tvb, atree, foffset); |
7275 | 0 | } |
7276 | 0 | length = tvb_get_ntohl(tvb, foffset); |
7277 | 0 | foffset += 4; |
7278 | 0 | if (length!=0) |
7279 | 0 | { |
7280 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, ENC_NA); |
7281 | 0 | } |
7282 | 0 | foffset += length; |
7283 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7284 | 0 | break; |
7285 | 0 | case 0x0000000b: /* Get Registry NDS Object Name */ |
7286 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "NDS Printer Name"); |
7287 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
7288 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7289 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7290 | 0 | break; |
7291 | 0 | case 0x0000000c: /* Get Registry Session Information */ |
7292 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7293 | 0 | foffset += 4; |
7294 | 0 | proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7295 | 0 | foffset += 4; |
7296 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7297 | 0 | break; |
7298 | 0 | default: |
7299 | 0 | break; |
7300 | 0 | } |
7301 | 0 | break; |
7302 | 0 | case 0x060979: /* Notify */ |
7303 | 0 | switch(ndps_func) |
7304 | 0 | { |
7305 | 0 | case 0x00000001: /* Notify Bind */ |
7306 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7307 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_num_attributes, tvb, foffset, 4, number_of_items); |
7308 | 0 | foffset += 4; |
7309 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7310 | 0 | { |
7311 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7312 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7313 | 0 | break; |
7314 | 0 | } |
7315 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Attribute %d", ii+1); |
7316 | 0 | length = tvb_get_ntohl(tvb, foffset); |
7317 | 0 | foffset += 4; |
7318 | 0 | if (length!=0) |
7319 | 0 | { |
7320 | 0 | proto_tree_add_item(atree, hf_ndps_attribute_set, tvb, foffset, length, ENC_NA); |
7321 | 0 | } |
7322 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7323 | 0 | } |
7324 | 0 | break; |
7325 | 0 | case 0x00000002: /* Notify Unbind */ |
7326 | | /* NoOp */ |
7327 | 0 | break; |
7328 | 0 | case 0x00000003: /* Register Supplier */ |
7329 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_session, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7330 | 0 | foffset += 4; |
7331 | 0 | foffset = event_object_set(tvb, pinfo, ndps_tree, foffset); |
7332 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7333 | 0 | break; |
7334 | 0 | case 0x00000004: /* Deregister Supplier */ |
7335 | 0 | case 0x0000000b: /* Report Notification */ |
7336 | 0 | case 0x0000000d: /* Remove Delivery Method */ |
7337 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7338 | 0 | break; |
7339 | 0 | case 0x00000005: /* Add Profile */ |
7340 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7341 | 0 | foffset += 4; |
7342 | 0 | foffset = event_object_set(tvb, pinfo, ndps_tree, foffset); |
7343 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7344 | 0 | break; |
7345 | 0 | case 0x00000006: /* Remove Profile */ |
7346 | 0 | case 0x00000007: /* Modify Profile */ |
7347 | 0 | case 0x00000009: /* Report Event */ |
7348 | 0 | foffset = event_object_set(tvb, pinfo, ndps_tree, foffset); |
7349 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7350 | 0 | break; |
7351 | 0 | case 0x00000008: /* List Profiles */ |
7352 | | /* Start of ProfileResultSet */ |
7353 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_len, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7354 | 0 | foffset += 4; |
7355 | | /* Start of Eventhandling */ |
7356 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7357 | 0 | foffset += 4; |
7358 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_persistence, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7359 | 0 | foffset += 4; |
7360 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Consumer Name"); |
7361 | 0 | foffset = qualifiedname(tvb, pinfo->pool, atree, foffset); |
7362 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7363 | 0 | length = tvb_get_ntohl(tvb, foffset); |
7364 | 0 | foffset += 4; |
7365 | 0 | if (length==4) |
7366 | 0 | { |
7367 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_value, tvb, foffset, length, ENC_BIG_ENDIAN); |
7368 | 0 | } |
7369 | 0 | foffset += length; |
7370 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7371 | 0 | foffset += 4; |
7372 | | /* Start of NameorID */ |
7373 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
7374 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
7375 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7376 | | /* End of NameorID */ |
7377 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Addresses"); |
7378 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7379 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, number_of_items); |
7380 | 0 | foffset += 4; |
7381 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7382 | 0 | { |
7383 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7384 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7385 | 0 | break; |
7386 | 0 | } |
7387 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Address %d", ii+1); |
7388 | 0 | foffset = address_item(tvb, pinfo->pool,btree, foffset); |
7389 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7390 | 0 | } |
7391 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7392 | 0 | foffset = event_object_set(tvb, pinfo, ndps_tree, foffset); |
7393 | | /* End of Eventhandling */ |
7394 | | /* End of ProfileResultSet */ |
7395 | 0 | length = tvb_get_ntohl(tvb, foffset); |
7396 | 0 | foffset += 4; |
7397 | 0 | if (length!=0) |
7398 | 0 | { |
7399 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_continuation_option, tvb, foffset, length, ENC_NA); |
7400 | 0 | } |
7401 | 0 | foffset += length; |
7402 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7403 | 0 | break; |
7404 | 0 | case 0x0000000a: /* List Supported Languages */ |
7405 | | /* Start of IntegerSeq */ |
7406 | 0 | length = tvb_get_ntohl(tvb, foffset); |
7407 | 0 | foffset += 4; |
7408 | 0 | if (length==4) |
7409 | 0 | { |
7410 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, length, ENC_BIG_ENDIAN); |
7411 | 0 | } |
7412 | 0 | foffset += length; |
7413 | | /* End of IntegerSeq */ |
7414 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7415 | 0 | break; |
7416 | 0 | case 0x0000000c: /* Add Delivery Method */ |
7417 | | /* Start of NameorID */ |
7418 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
7419 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
7420 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7421 | | /* End of NameorID */ |
7422 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7423 | 0 | break; |
7424 | 0 | case 0x0000000e: /* List Delivery Methods */ |
7425 | | /* Start of DeliveryMethodSet */ |
7426 | 0 | expert_item = proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_delivery_method_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
7427 | 0 | foffset += 4; |
7428 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7429 | 0 | { |
7430 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7431 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7432 | 0 | break; |
7433 | 0 | } |
7434 | | /* Start of DeliveryMethod */ |
7435 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method %d", ii+1); |
7436 | | /* Start of NameorID */ |
7437 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Method ID"); |
7438 | 0 | foffset = name_or_id(tvb, pinfo->pool, btree, foffset); |
7439 | 0 | foffset += align_4(tvb, foffset); |
7440 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7441 | | /* End of NameorID */ |
7442 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_method_name, atree, foffset, NULL); |
7443 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_method_ver, atree, foffset, NULL); |
7444 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_file_name, atree, foffset, NULL); |
7445 | 0 | proto_tree_add_item(atree, hf_ndps_admin_submit, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7446 | 0 | foffset += 4; |
7447 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7448 | | /* End of DeliveryMethod */ |
7449 | 0 | } |
7450 | | /* End of DeliveryMethodSet */ |
7451 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7452 | 0 | break; |
7453 | 0 | case 0x0000000f: /* Get Delivery Method Information */ |
7454 | | /* Start of DeliveryMethod */ |
7455 | | /* Start of NameorID */ |
7456 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Method ID"); |
7457 | 0 | foffset = name_or_id(tvb, pinfo->pool, atree, foffset); |
7458 | | /* End of NameorID */ |
7459 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_method_name, atree, foffset, NULL); |
7460 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_method_ver, atree, foffset, NULL); |
7461 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_file_name, atree, foffset, NULL); |
7462 | 0 | proto_tree_add_item(atree, hf_ndps_admin_submit, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7463 | 0 | foffset += 4; |
7464 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7465 | | /* End of DeliveryMethod */ |
7466 | 0 | proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_delivery_add_count, tvb, foffset, 4, ENC_BIG_ENDIAN, &number_of_items); |
7467 | 0 | foffset += 4; |
7468 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Delivery Addresses"); |
7469 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7470 | 0 | { |
7471 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7472 | 0 | expert_add_info(pinfo, aitem, &ei_ndps_truncated); |
7473 | 0 | break; |
7474 | 0 | } |
7475 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Address %d", ii+1); |
7476 | 0 | foffset = address_item(tvb, pinfo->pool,btree, foffset); |
7477 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7478 | 0 | } |
7479 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7480 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7481 | 0 | break; |
7482 | 0 | case 0x00000010: /* Get Notify NDS Object Name */ |
7483 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_item_count, tvb, foffset, |
7484 | 0 | 4, ENC_BIG_ENDIAN); /* XXX - what does this count? */ |
7485 | 0 | foffset += 4; |
7486 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_broker_name, ndps_tree, foffset, NULL); |
7487 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_tree, ndps_tree, foffset, NULL); |
7488 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7489 | 0 | break; |
7490 | 0 | case 0x00000011: /* Get Notify Session Information */ |
7491 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_get_session_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7492 | 0 | foffset += 4; |
7493 | 0 | proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7494 | 0 | foffset += 4; |
7495 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7496 | 0 | break; |
7497 | 0 | default: |
7498 | 0 | break; |
7499 | 0 | } |
7500 | 0 | break; |
7501 | 0 | case 0x06097a: /* Resman */ |
7502 | 0 | switch(ndps_func) |
7503 | 0 | { |
7504 | 0 | case 0x00000001: /* Bind */ |
7505 | 0 | length = tvb_get_ntohl(tvb, foffset); |
7506 | 0 | foffset += 4; |
7507 | 0 | if (length!=0) |
7508 | 0 | { |
7509 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_attribute_set, tvb, foffset, length, ENC_NA); |
7510 | 0 | } |
7511 | 0 | break; |
7512 | 0 | case 0x00000002: /* Unbind */ |
7513 | | /* NoOp */ |
7514 | 0 | break; |
7515 | 0 | case 0x00000003: /* Add Resource File */ |
7516 | 0 | case 0x00000004: /* Delete Resource File */ |
7517 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7518 | 0 | break; |
7519 | 0 | case 0x00000005: /* List Resources */ |
7520 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7521 | 0 | foffset += 4; |
7522 | 0 | if (tvb_get_ntohl(tvb, foffset-4) != 0) |
7523 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error"); |
7524 | 0 | if (tvb_get_ntohl(tvb, foffset-4) != 0) |
7525 | 0 | { |
7526 | 0 | break; |
7527 | 0 | } |
7528 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_status_flags, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7529 | 0 | foffset += 4; |
7530 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_resource_list_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7531 | 0 | resource_type = tvb_get_ntohl(tvb, foffset); |
7532 | 0 | foffset += 4; |
7533 | 0 | switch (resource_type) |
7534 | 0 | { |
7535 | 0 | case 0: /* Print Drivers */ |
7536 | 0 | case 1: /* Printer Definitions */ |
7537 | 0 | case 2: /* Printer Definitions Short */ |
7538 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7539 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items); |
7540 | 0 | foffset += 4; |
7541 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7542 | 0 | { |
7543 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7544 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7545 | 0 | break; |
7546 | 0 | } |
7547 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Definition %d", ii+1); |
7548 | 0 | if (tvb_get_ntohl(tvb, foffset)==0) { /* Offset for old type support */ |
7549 | 0 | foffset += 2; |
7550 | 0 | } |
7551 | 0 | foffset += 4; /* Item always == 1 */ |
7552 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_manuf, atree, foffset, NULL); |
7553 | 0 | if (tvb_get_ntohl(tvb, foffset)==0) { |
7554 | 0 | foffset += 2; |
7555 | 0 | } |
7556 | 0 | foffset += 4; |
7557 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_type, atree, foffset, NULL); |
7558 | 0 | if (tvb_get_ntohl(tvb, foffset)==0) { |
7559 | 0 | foffset += 2; |
7560 | 0 | } |
7561 | 0 | foffset += 4; |
7562 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_inf_file_name, atree, foffset, NULL); |
7563 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7564 | 0 | } |
7565 | 0 | break; |
7566 | 0 | case 3: /* Banner Page Files */ |
7567 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7568 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items); |
7569 | 0 | foffset += 4; |
7570 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7571 | 0 | { |
7572 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7573 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7574 | 0 | break; |
7575 | 0 | } |
7576 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Banner %d", ii+1); |
7577 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_banner_name, atree, foffset, NULL); |
7578 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7579 | 0 | } |
7580 | 0 | break; |
7581 | 0 | case 4: /* Font Types */ |
7582 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7583 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_font_type_count, tvb, foffset, 4, number_of_items); |
7584 | 0 | foffset += 4; |
7585 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7586 | 0 | { |
7587 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7588 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7589 | 0 | break; |
7590 | 0 | } |
7591 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Font %d", ii+1); |
7592 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_font_type_name, atree, foffset, NULL); |
7593 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7594 | 0 | } |
7595 | 0 | break; |
7596 | 0 | case 7: /* Font Files */ |
7597 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7598 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_font_file_count, tvb, foffset, 4, number_of_items); |
7599 | 0 | foffset += 4; |
7600 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7601 | 0 | { |
7602 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7603 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7604 | 0 | break; |
7605 | 0 | } |
7606 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Font File %d", ii+1); |
7607 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_font_file_name, atree, foffset, NULL); |
7608 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7609 | 0 | } |
7610 | 0 | break; |
7611 | 0 | case 5: /* Printer Driver Files */ |
7612 | 0 | case 12: /* Printer Driver Files 2 */ |
7613 | 0 | case 9: /* Generic Files */ |
7614 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7615 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items); |
7616 | 0 | foffset += 4; |
7617 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7618 | 0 | { |
7619 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7620 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7621 | 0 | break; |
7622 | 0 | } |
7623 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "File %d", ii+1); |
7624 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_file_name, atree, foffset, NULL); |
7625 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_dir_name, atree, foffset, NULL); |
7626 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_inf_file_name, atree, foffset, NULL); |
7627 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7628 | 0 | } |
7629 | 0 | break; |
7630 | 0 | case 6: /* Printer Definition File */ |
7631 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7632 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_printer_def_count, tvb, foffset, 4, number_of_items); |
7633 | 0 | foffset += 4; |
7634 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7635 | 0 | { |
7636 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7637 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7638 | 0 | break; |
7639 | 0 | } |
7640 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Definition %d", ii+1); |
7641 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_file_name, atree, foffset, NULL); |
7642 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_dir_name, atree, foffset, NULL); |
7643 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_inf_file_name, atree, foffset, NULL); |
7644 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7645 | 0 | } |
7646 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7647 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items); |
7648 | 0 | foffset += 4; |
7649 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7650 | 0 | { |
7651 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7652 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7653 | 0 | break; |
7654 | 0 | } |
7655 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Item %d", ii+1); |
7656 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_def_file_name, atree, foffset, NULL); |
7657 | 0 | number_of_items2 = tvb_get_ntohl(tvb, foffset); |
7658 | 0 | proto_tree_add_uint(atree, hf_ndps_num_win31_keys, tvb, foffset, 4, number_of_items2); |
7659 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, 4, ett_ndps, &bitem, "Windows 3.1 Keys"); |
7660 | 0 | foffset += 4; |
7661 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
7662 | 0 | { |
7663 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
7664 | 0 | expert_add_info(pinfo, bitem, &ei_ndps_truncated); |
7665 | 0 | break; |
7666 | 0 | } |
7667 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_windows_key, btree, foffset, NULL); |
7668 | 0 | } |
7669 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7670 | 0 | number_of_items2 = tvb_get_ntohl(tvb, foffset); |
7671 | 0 | proto_tree_add_uint(atree, hf_ndps_num_win95_keys, tvb, foffset, 4, number_of_items2); |
7672 | 0 | btree = proto_tree_add_subtree(atree, tvb, foffset, 4, ett_ndps, &bitem, "Windows 95 Keys"); |
7673 | 0 | foffset += 4; |
7674 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
7675 | 0 | { |
7676 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
7677 | 0 | expert_add_info(pinfo, bitem, &ei_ndps_truncated); |
7678 | 0 | break; |
7679 | 0 | } |
7680 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_windows_key, btree, foffset, NULL); |
7681 | 0 | } |
7682 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7683 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7684 | 0 | } |
7685 | 0 | break; |
7686 | 0 | case 10: /* Printer Definition File 2 */ |
7687 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_def_file_name, ndps_tree, foffset, NULL); |
7688 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7689 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_os_count, tvb, foffset, 4, number_of_items); |
7690 | 0 | foffset += 4; |
7691 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7692 | 0 | { |
7693 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7694 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7695 | 0 | break; |
7696 | 0 | } |
7697 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "OS %d", ii+1); |
7698 | 0 | proto_tree_add_item(atree, hf_os_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7699 | 0 | foffset += 4; |
7700 | 0 | number_of_items2 = tvb_get_ntohl(tvb, foffset); |
7701 | 0 | expert_item = proto_tree_add_uint(atree, hf_ndps_num_windows_keys, tvb, foffset, 4, number_of_items2); |
7702 | 0 | foffset += 4; |
7703 | 0 | for (jj = 0; jj < number_of_items2; jj++ ) |
7704 | 0 | { |
7705 | 0 | if (jj >= NDPS_MAX_ITEMS) { |
7706 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7707 | 0 | break; |
7708 | 0 | } |
7709 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Key %d", jj+1); |
7710 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_windows_key, btree, foffset, NULL); |
7711 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7712 | 0 | } |
7713 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7714 | 0 | } |
7715 | 0 | break; |
7716 | 0 | case 8: /* Generic Type */ |
7717 | 0 | case 11: /* Printer Driver Types 2 */ |
7718 | 0 | case 13: /* Printer Driver Types Archive */ |
7719 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7720 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_printer_type_count, tvb, foffset, 4, number_of_items); |
7721 | 0 | foffset += 4; |
7722 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7723 | 0 | { |
7724 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7725 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7726 | 0 | break; |
7727 | 0 | } |
7728 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Type %d", ii+1); |
7729 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_manuf, atree, foffset, NULL); |
7730 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_printer_type, atree, foffset, NULL); |
7731 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_file_name, atree, foffset, NULL); |
7732 | 0 | foffset = ndps_string(tvb, pinfo->pool, hf_ndps_prn_dir_name, atree, foffset, NULL); |
7733 | 0 | proto_tree_add_item(atree, hf_archive_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7734 | 0 | foffset += 4; |
7735 | 0 | proto_tree_add_item(atree, hf_archive_file_size, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7736 | 0 | foffset += 4; |
7737 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7738 | 0 | } |
7739 | 0 | break; |
7740 | 0 | case 14: /* Languages Available */ |
7741 | 0 | number_of_items = tvb_get_ntohl(tvb, foffset); |
7742 | 0 | expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_language_count, tvb, foffset, 4, number_of_items); |
7743 | 0 | foffset += 4; |
7744 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7745 | 0 | { |
7746 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7747 | 0 | expert_add_info(pinfo, expert_item, &ei_ndps_truncated); |
7748 | 0 | break; |
7749 | 0 | } |
7750 | 0 | atree = proto_tree_add_subtree_format(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Language %d", ii+1); |
7751 | 0 | proto_tree_add_item(atree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7752 | 0 | foffset += 4; |
7753 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7754 | 0 | } |
7755 | 0 | break; |
7756 | 0 | default: |
7757 | 0 | break; |
7758 | 0 | } |
7759 | 0 | break; |
7760 | 0 | case 0x00000006: /* Get Resource File */ |
7761 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7762 | 0 | foffset += 4; |
7763 | 0 | if (tvb_get_ntohl(tvb, foffset-4) != 0) |
7764 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error"); |
7765 | 0 | if (tvb_get_ntohl(tvb, foffset-4) != 0) |
7766 | 0 | { |
7767 | 0 | break; |
7768 | 0 | } |
7769 | 0 | proto_tree_add_item(ndps_tree, hf_get_status_flag, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7770 | 0 | foffset += 4; |
7771 | 0 | proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7772 | 0 | foffset += 4; |
7773 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_data, tvb, foffset, -1, ENC_NA); |
7774 | 0 | break; |
7775 | 0 | case 0x00000007: /* Get Resource File Date */ |
7776 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7777 | 0 | foffset += 4; |
7778 | 0 | if (tvb_get_ntohl(tvb, foffset-4) != 0) |
7779 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error"); |
7780 | 0 | if (tvb_get_ntohl(tvb, foffset-4) != 0) |
7781 | 0 | { |
7782 | 0 | break; |
7783 | 0 | } |
7784 | 0 | proto_tree_add_item(ndps_tree, hf_file_timestamp, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7785 | 0 | foffset += 4; |
7786 | 0 | break; |
7787 | 0 | case 0x00000008: /* Get Resource Manager NDS Object Name */ |
7788 | 0 | foffset = qualifiedname(tvb, pinfo->pool, ndps_tree, foffset); |
7789 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val); |
7790 | 0 | foffset += 4; |
7791 | 0 | break; |
7792 | 0 | case 0x00000009: /* Get Resource Manager Session Information */ |
7793 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_get_resman_session_type, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7794 | 0 | foffset += 4; |
7795 | 0 | proto_tree_add_item(ndps_tree, hf_time, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7796 | 0 | foffset += 4; |
7797 | 0 | foffset = return_code(tvb, pinfo, ndps_tree, foffset); |
7798 | 0 | break; |
7799 | 0 | case 0x0000000a: /* Set Resource Language Context */ |
7800 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7801 | 0 | foffset += 4; |
7802 | 0 | if (tvb_get_ntohl(tvb, foffset-4) != 0) |
7803 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error"); |
7804 | 0 | if (tvb_get_ntohl(tvb, foffset-4) != 0) |
7805 | 0 | { |
7806 | 0 | break; |
7807 | 0 | } |
7808 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7809 | 0 | foffset += 4; |
7810 | 0 | break; |
7811 | 0 | default: |
7812 | 0 | break; |
7813 | 0 | } |
7814 | 0 | break; |
7815 | 0 | case 0x06097b: /* Delivery */ |
7816 | 0 | switch(ndps_func) |
7817 | 0 | { |
7818 | 0 | case 0x00000001: /* Delivery Bind */ |
7819 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7820 | 0 | foffset += 4; |
7821 | 0 | if (tvb_get_ntohl(tvb, foffset-4) != 0) |
7822 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error"); |
7823 | 0 | break; |
7824 | 0 | case 0x00000002: /* Delivery Unbind */ |
7825 | | /* NoOp */ |
7826 | 0 | break; |
7827 | 0 | case 0x00000003: /* Delivery Send */ |
7828 | 0 | case 0x00000004: /* Delivery Send2 */ |
7829 | 0 | proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN); |
7830 | 0 | foffset += 4; |
7831 | 0 | if (tvb_get_ntohl(tvb, foffset-4) != 0) |
7832 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error"); |
7833 | 0 | if (tvb_get_ntohl(tvb, foffset-4) != 0) |
7834 | 0 | { |
7835 | 0 | break; |
7836 | 0 | } |
7837 | 0 | number_of_items=tvb_get_ntohl(tvb, foffset); |
7838 | 0 | proto_tree_add_uint(ndps_tree, hf_ndps_item_count, tvb, foffset, 4, number_of_items); |
7839 | 0 | foffset += 4; |
7840 | 0 | atree = proto_tree_add_subtree(ndps_tree, tvb, foffset, -1, ett_ndps, &aitem, "Failed Items"); |
7841 | 0 | for (ii = 0; ii < number_of_items; ii++ ) |
7842 | 0 | { |
7843 | 0 | if (ii >= NDPS_MAX_ITEMS) { |
7844 | 0 | expert_add_info(pinfo, aitem, &ei_ndps_truncated); |
7845 | 0 | break; |
7846 | 0 | } |
7847 | 0 | btree = proto_tree_add_subtree_format(atree, tvb, foffset, -1, ett_ndps, &bitem, "Item %d", ii+1); |
7848 | 0 | length=tvb_get_ntohl(tvb, foffset); |
7849 | 0 | length_remaining = tvb_reported_length_remaining(tvb, foffset); |
7850 | 0 | if(length_remaining == -1 || (uint32_t) length_remaining < length) |
7851 | 0 | { |
7852 | 0 | return foffset; |
7853 | 0 | } |
7854 | 0 | proto_tree_add_item(btree, hf_ndps_item_ptr, tvb, foffset, length, ENC_NA); |
7855 | 0 | foffset += length; |
7856 | 0 | proto_item_set_end(bitem, tvb, foffset); |
7857 | 0 | } |
7858 | 0 | proto_item_set_end(aitem, tvb, foffset); |
7859 | 0 | break; |
7860 | 0 | default: |
7861 | 0 | break; |
7862 | 0 | } |
7863 | 0 | break; |
7864 | 2 | default: |
7865 | 2 | break; |
7866 | 2 | } |
7867 | 2 | return foffset; |
7868 | 2 | } |
7869 | | |
7870 | | void |
7871 | | proto_register_ndps(void) |
7872 | 14 | { |
7873 | 14 | static hf_register_info hf_ndps[] = { |
7874 | 14 | { &hf_ndps_record_mark, |
7875 | 14 | { "Record Mark", "ndps.record_mark", FT_UINT16, BASE_HEX, NULL, 0x0, |
7876 | 14 | NULL, HFILL }}, |
7877 | | |
7878 | 14 | { &hf_ndps_packet_type, |
7879 | 14 | { "Packet Type", "ndps.packet_type", |
7880 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_packet_types), 0x0, |
7881 | 14 | NULL, HFILL }}, |
7882 | | |
7883 | 14 | { &hf_ndps_length, |
7884 | 14 | { "Record Length", "ndps.record_length", |
7885 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
7886 | 14 | NULL, HFILL }}, |
7887 | | |
7888 | 14 | { &hf_ndps_xid, |
7889 | 14 | { "Exchange ID", "ndps.xid", |
7890 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
7891 | 14 | NULL, HFILL }}, |
7892 | | |
7893 | 14 | { &hf_ndps_rpc_version, |
7894 | 14 | { "RPC Version", "ndps.rpc_version", |
7895 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
7896 | 14 | NULL, HFILL }}, |
7897 | | |
7898 | 14 | { &hf_spx_ndps_program, |
7899 | 14 | { "NDPS Program Number", "spx.ndps_program", |
7900 | 14 | FT_UINT32, BASE_HEX, VALS(spx_ndps_program_vals), 0x0, |
7901 | 14 | NULL, HFILL }}, |
7902 | | |
7903 | 14 | { &hf_spx_ndps_version, |
7904 | 14 | { "Program Version", "spx.ndps_version", |
7905 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7906 | 14 | NULL, HFILL }}, |
7907 | | |
7908 | | #if 0 |
7909 | | { &hf_ndps_error, |
7910 | | { "NDPS Error", "spx.ndps_error", |
7911 | | FT_UINT32, BASE_HEX, NULL, 0x0, |
7912 | | NULL, HFILL }}, |
7913 | | #endif |
7914 | | |
7915 | 14 | { &hf_ndps_other_error_string, |
7916 | 14 | { "Extended Error String", "ndps.ext_err_string", |
7917 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
7918 | 14 | NULL, HFILL }}, |
7919 | | |
7920 | 14 | { &hf_spx_ndps_func_print, |
7921 | 14 | { "Print Program", "spx.ndps_func_print", |
7922 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &spx_ndps_print_func_vals_ext, 0x0, |
7923 | 14 | NULL, HFILL }}, |
7924 | | |
7925 | 14 | { &hf_spx_ndps_func_notify, |
7926 | 14 | { "Notify Program", "spx.ndps_func_notify", |
7927 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &spx_ndps_notify_func_vals_ext, 0x0, |
7928 | 14 | NULL, HFILL }}, |
7929 | | |
7930 | 14 | { &hf_spx_ndps_func_delivery, |
7931 | 14 | { "Delivery Program", "spx.ndps_func_delivery", |
7932 | 14 | FT_UINT32, BASE_HEX, VALS(spx_ndps_deliver_func_vals), 0x0, |
7933 | 14 | NULL, HFILL }}, |
7934 | | |
7935 | 14 | { &hf_spx_ndps_func_registry, |
7936 | 14 | { "Registry Program", "spx.ndps_func_registry", |
7937 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &spx_ndps_registry_func_vals_ext, 0x0, |
7938 | 14 | NULL, HFILL }}, |
7939 | | |
7940 | 14 | { &hf_spx_ndps_func_resman, |
7941 | 14 | { "ResMan Program", "spx.ndps_func_resman", |
7942 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &spx_ndps_resman_func_vals_ext, 0x0, |
7943 | 14 | NULL, HFILL }}, |
7944 | | |
7945 | 14 | { &hf_spx_ndps_func_broker, |
7946 | 14 | { "Broker Program", "spx.ndps_func_broker", |
7947 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &spx_ndps_broker_func_vals_ext, 0x0, |
7948 | 14 | NULL, HFILL }}, |
7949 | | |
7950 | 14 | { &hf_ndps_num_objects, |
7951 | 14 | { "Number of Objects", "ndps.num_objects", |
7952 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7953 | 14 | NULL, HFILL }}, |
7954 | | |
7955 | 14 | { &hf_ndps_num_attributes, |
7956 | 14 | { "Number of Attributes", "ndps.num_attributes", |
7957 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7958 | 14 | NULL, HFILL }}, |
7959 | | |
7960 | | #if 0 |
7961 | | { &hf_ndps_sbuffer, |
7962 | | { "Server", "ndps.sbuffer", |
7963 | | FT_UINT32, BASE_DEC, NULL, 0x0, |
7964 | | NULL, HFILL }}, |
7965 | | #endif |
7966 | | |
7967 | | #if 0 |
7968 | | { &hf_ndps_rbuffer, |
7969 | | { "Connection", "ndps.rbuffer", |
7970 | | FT_UINT32, BASE_DEC, NULL, 0x0, |
7971 | | NULL, HFILL }}, |
7972 | | #endif |
7973 | | |
7974 | 14 | { &hf_ndps_user_name, |
7975 | 14 | { "Trustee Name", "ndps.user_name", |
7976 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
7977 | 14 | NULL, HFILL }}, |
7978 | | |
7979 | 14 | { &hf_ndps_broker_name, |
7980 | 14 | { "Broker Name", "ndps.broker_name", |
7981 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
7982 | 14 | NULL, HFILL }}, |
7983 | | |
7984 | 14 | { &hf_ndps_num_results, |
7985 | 14 | { "Number of Results", "ndps.num_results", |
7986 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7987 | 14 | NULL, HFILL }}, |
7988 | | |
7989 | 14 | { &hf_ndps_num_options, |
7990 | 14 | { "Number of Options", "ndps.num_options", |
7991 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7992 | 14 | NULL, HFILL }}, |
7993 | | |
7994 | 14 | { &hf_ndps_num_jobs, |
7995 | 14 | { "Number of Jobs", "ndps.num_jobs", |
7996 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
7997 | 14 | NULL, HFILL }}, |
7998 | | |
7999 | 14 | { &hf_ndps_pa_name, |
8000 | 14 | { "Printer Name", "ndps.pa_name", |
8001 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8002 | 14 | NULL, HFILL }}, |
8003 | | |
8004 | 14 | { &hf_ndps_tree, |
8005 | 14 | { "Tree", "ndps.tree", |
8006 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8007 | 14 | NULL, HFILL }}, |
8008 | | |
8009 | 14 | { &hf_ndps_reqframe, |
8010 | 14 | { "Request Frame", "ndps.reqframe", |
8011 | 14 | FT_FRAMENUM, BASE_NONE, NULL, 0x0, |
8012 | 14 | NULL, HFILL }}, |
8013 | | |
8014 | 14 | { &hf_ndps_error_val, |
8015 | 14 | { "Return Status", "ndps.error_val", |
8016 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_error_types_ext, 0x0, |
8017 | 14 | NULL, HFILL }}, |
8018 | | |
8019 | 14 | { &hf_ndps_object, |
8020 | 14 | { "Object ID", "ndps.object", |
8021 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8022 | 14 | NULL, HFILL }}, |
8023 | | |
8024 | 14 | { &hf_ndps_cred_type, |
8025 | 14 | { "Credential Type", "ndps.cred_type", |
8026 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_credential_enum), 0x0, |
8027 | 14 | NULL, HFILL }}, |
8028 | | |
8029 | 14 | { &hf_ndps_server_name, |
8030 | 14 | { "Server Name", "ndps.server_name", |
8031 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8032 | 14 | NULL, HFILL }}, |
8033 | | |
8034 | 14 | { &hf_ndps_connection, |
8035 | 14 | { "Connection", "ndps.connection", |
8036 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8037 | 14 | NULL, HFILL }}, |
8038 | | |
8039 | 14 | { &hf_ndps_ext_error, |
8040 | 14 | { "Extended Error Code", "ndps.ext_error", |
8041 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8042 | 14 | NULL, HFILL }}, |
8043 | | |
8044 | 14 | { &hf_ndps_auth_null, |
8045 | 14 | { "Auth Null", "ndps.auth_null", |
8046 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8047 | 14 | NULL, HFILL }}, |
8048 | | |
8049 | 14 | { &hf_ndps_rpc_accept, |
8050 | 14 | { "RPC Accept or Deny", "ndps.rpc_acc", |
8051 | 14 | FT_UINT32, BASE_HEX, VALS(true_false), 0x0, |
8052 | 14 | NULL, HFILL }}, |
8053 | | |
8054 | 14 | { &hf_ndps_rpc_acc_stat, |
8055 | 14 | { "RPC Accept Status", "ndps.rpc_acc_stat", |
8056 | 14 | FT_UINT32, BASE_HEX, VALS(accept_stat), 0x0, |
8057 | 14 | NULL, HFILL }}, |
8058 | | |
8059 | 14 | { &hf_ndps_rpc_rej_stat, |
8060 | 14 | { "RPC Reject Status", "ndps.rpc_rej_stat", |
8061 | 14 | FT_UINT32, BASE_HEX, VALS(reject_stat), 0x0, |
8062 | 14 | NULL, HFILL }}, |
8063 | | |
8064 | 14 | { &hf_ndps_rpc_acc_results, |
8065 | 14 | { "RPC Accept Results", "ndps.rpc_acc_res", |
8066 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8067 | 14 | NULL, HFILL }}, |
8068 | | |
8069 | 14 | { &hf_ndps_problem_type, |
8070 | 14 | { "Problem Type", "ndps.rpc_prob_type", |
8071 | 14 | FT_UINT32, BASE_HEX, VALS(error_type_enum), 0x0, |
8072 | 14 | NULL, HFILL }}, |
8073 | | |
8074 | 14 | { &hf_security_problem_type, |
8075 | 14 | { "Security Problem", "ndps.rpc_sec_prob", |
8076 | 14 | FT_UINT32, BASE_HEX, VALS(security_problem_enum), 0x0, |
8077 | 14 | NULL, HFILL }}, |
8078 | | |
8079 | 14 | { &hf_service_problem_type, |
8080 | 14 | { "Service Problem", "ndps.rpc_serv_prob", |
8081 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &service_problem_enum_ext, 0x0, |
8082 | 14 | NULL, HFILL }}, |
8083 | | |
8084 | 14 | { &hf_access_problem_type, |
8085 | 14 | { "Access Problem", "ndps.rpc_acc_prob", |
8086 | 14 | FT_UINT32, BASE_HEX, VALS(access_problem_enum), 0x0, |
8087 | 14 | NULL, HFILL }}, |
8088 | | |
8089 | 14 | { &hf_printer_problem_type, |
8090 | 14 | { "Printer Problem", "ndps.rpc_print_prob", |
8091 | 14 | FT_UINT32, BASE_HEX, VALS(printer_problem_enum), 0x0, |
8092 | 14 | NULL, HFILL }}, |
8093 | | |
8094 | 14 | { &hf_selection_problem_type, |
8095 | 14 | { "Selection Problem", "ndps.rpc_sel_prob", |
8096 | 14 | FT_UINT32, BASE_HEX, VALS(selection_problem_enum), 0x0, |
8097 | 14 | NULL, HFILL }}, |
8098 | | |
8099 | 14 | { &hf_doc_access_problem_type, |
8100 | 14 | { "Document Access Problem", "ndps.rpc_doc_acc_prob", |
8101 | 14 | FT_UINT32, BASE_HEX, VALS(doc_access_problem_enum), 0x0, |
8102 | 14 | NULL, HFILL }}, |
8103 | | |
8104 | 14 | { &hf_attribute_problem_type, |
8105 | 14 | { "Attribute Problem", "ndps.rpc_attr_prob", |
8106 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &attribute_problem_enum_ext, 0x0, |
8107 | 14 | NULL, HFILL }}, |
8108 | | |
8109 | 14 | { &hf_update_problem_type, |
8110 | 14 | { "Update Problem", "ndps.rpc_update_prob", |
8111 | 14 | FT_UINT32, BASE_HEX, VALS(update_problem_enum), 0x0, |
8112 | 14 | NULL, HFILL }}, |
8113 | | |
8114 | 14 | { &hf_obj_id_type, |
8115 | 14 | { "Object ID Type", "ndps.rpc_obj_id_type", |
8116 | 14 | FT_UINT32, BASE_HEX, VALS(obj_identification_enum), 0x0, |
8117 | 14 | NULL, HFILL }}, |
8118 | | |
8119 | 14 | { &hf_oid_struct_size, |
8120 | 14 | { "OID Struct Size", "ndps.rpc_oid_struct_size", |
8121 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8122 | 14 | NULL, HFILL }}, |
8123 | | |
8124 | 14 | { &hf_object_name, |
8125 | 14 | { "Object Name", "ndps.object_name", |
8126 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8127 | 14 | NULL, HFILL }}, |
8128 | | |
8129 | 14 | { &hf_ndps_document_number, |
8130 | 14 | { "Document Number", "ndps.doc_num", |
8131 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8132 | 14 | NULL, HFILL }}, |
8133 | | |
8134 | 14 | { &hf_ndps_doc_content, |
8135 | 14 | { "Document Content", "ndps.doc_content", |
8136 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8137 | 14 | NULL, HFILL }}, |
8138 | | |
8139 | 14 | { &hf_ndps_nameorid, |
8140 | 14 | { "Name or ID Type", "ndps.nameorid", |
8141 | 14 | FT_UINT32, BASE_HEX, VALS(nameorid_enum), 0x0, |
8142 | 14 | NULL, HFILL }}, |
8143 | | |
8144 | 14 | { &hf_ndps_local_object_name, |
8145 | 14 | { "Local Object Name", "ndps.loc_object_name", |
8146 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8147 | 14 | NULL, HFILL }}, |
8148 | | |
8149 | 14 | { &hf_ndps_printer_name, |
8150 | 14 | { "Printer Name", "ndps.printer_name", |
8151 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8152 | 14 | NULL, HFILL }}, |
8153 | | |
8154 | 14 | { &hf_ndps_qualified_name, |
8155 | 14 | { "Qualified Name Type", "ndps.qual_name_type", |
8156 | 14 | FT_UINT32, BASE_HEX, VALS(qualified_name_enum), 0x0, |
8157 | 14 | NULL, HFILL }}, |
8158 | | |
8159 | | #if 0 |
8160 | | { &hf_ndps_qualified_name2, |
8161 | | { "Qualified Name Type", "ndps.qual_name_type2", |
8162 | | FT_UINT32, BASE_HEX, VALS(qualified_name_enum2), 0x0, |
8163 | | NULL, HFILL }}, |
8164 | | #endif |
8165 | | |
8166 | 14 | { &hf_ndps_item_count, |
8167 | 14 | { "Number of Items", "ndps.item_count", |
8168 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8169 | 14 | NULL, HFILL }}, |
8170 | | |
8171 | 14 | { &hf_ndps_num_passwords, |
8172 | 14 | { "Number of Passwords", "ndps.num_passwords", |
8173 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8174 | 14 | NULL, HFILL }}, |
8175 | | |
8176 | 14 | { &hf_ndps_num_servers, |
8177 | 14 | { "Number of Servers", "ndps.num_servers", |
8178 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8179 | 14 | NULL, HFILL }}, |
8180 | | |
8181 | 14 | { &hf_ndps_num_locations, |
8182 | 14 | { "Number of Locations", "ndps.num_locations", |
8183 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8184 | 14 | NULL, HFILL }}, |
8185 | | |
8186 | 14 | { &hf_ndps_num_areas, |
8187 | 14 | { "Number of Areas", "ndps.num_areas", |
8188 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8189 | 14 | NULL, HFILL }}, |
8190 | | |
8191 | 14 | { &hf_ndps_num_address_items, |
8192 | 14 | { "Number of Address Items", "ndps.num_address_items", |
8193 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8194 | 14 | NULL, HFILL }}, |
8195 | | |
8196 | 14 | { &hf_ndps_num_job_categories, |
8197 | 14 | { "Number of Job Categories", "ndps.num_job_categories", |
8198 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8199 | 14 | NULL, HFILL }}, |
8200 | | |
8201 | 14 | { &hf_ndps_num_page_selects, |
8202 | 14 | { "Number of Page Select Items", "ndps.num_page_selects", |
8203 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8204 | 14 | NULL, HFILL }}, |
8205 | | |
8206 | 14 | { &hf_ndps_num_page_informations, |
8207 | 14 | { "Number of Page Information Items", "ndps.num_page_informations", |
8208 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8209 | 14 | NULL, HFILL }}, |
8210 | | |
8211 | 14 | { &hf_ndps_num_names, |
8212 | 14 | { "Number of Names", "ndps.num_names", |
8213 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8214 | 14 | NULL, HFILL }}, |
8215 | | |
8216 | 14 | { &hf_ndps_num_categories, |
8217 | 14 | { "Number of Categories", "ndps.num_categories", |
8218 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8219 | 14 | NULL, HFILL }}, |
8220 | | |
8221 | 14 | { &hf_ndps_num_colorants, |
8222 | 14 | { "Number of Colorants", "ndps.num_colorants", |
8223 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8224 | 14 | NULL, HFILL }}, |
8225 | | |
8226 | 14 | { &hf_ndps_num_events, |
8227 | 14 | { "Number of Events", "ndps.num_events", |
8228 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8229 | 14 | NULL, HFILL }}, |
8230 | | |
8231 | 14 | { &hf_ndps_num_args, |
8232 | 14 | { "Number of Arguments", "ndps.num_argss", |
8233 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8234 | 14 | NULL, HFILL }}, |
8235 | | |
8236 | 14 | { &hf_ndps_num_transfer_methods, |
8237 | 14 | { "Number of Transfer Methods", "ndps.num_transfer_methods", |
8238 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8239 | 14 | NULL, HFILL }}, |
8240 | | |
8241 | 14 | { &hf_ndps_num_doc_types, |
8242 | 14 | { "Number of Document Types", "ndps.num_doc_types", |
8243 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8244 | 14 | NULL, HFILL }}, |
8245 | | |
8246 | 14 | { &hf_ndps_num_destinations, |
8247 | 14 | { "Number of Destinations", "ndps.num_destinations", |
8248 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8249 | 14 | NULL, HFILL }}, |
8250 | | |
8251 | 14 | { &hf_ndps_qualifier, |
8252 | 14 | { "Qualifier", "ndps.qual", |
8253 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8254 | 14 | NULL, HFILL }}, |
8255 | | |
8256 | 14 | { &hf_ndps_lib_error, |
8257 | 14 | { "Library Error", "ndps.lib_error", |
8258 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_error_types_ext, 0x0, |
8259 | 14 | NULL, HFILL }}, |
8260 | | |
8261 | 14 | { &hf_ndps_other_error, |
8262 | 14 | { "Other Error", "ndps.other_error", |
8263 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_error_types_ext, 0x0, |
8264 | 14 | NULL, HFILL }}, |
8265 | | |
8266 | 14 | { &hf_ndps_other_error_2, |
8267 | 14 | { "Other Error 2", "ndps.other_error_2", |
8268 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_error_types_ext, 0x0, |
8269 | 14 | NULL, HFILL }}, |
8270 | | |
8271 | 14 | { &hf_ndps_session, |
8272 | 14 | { "Session Handle", "ndps.session", |
8273 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8274 | 14 | NULL, HFILL }}, |
8275 | | |
8276 | 14 | { &hf_ndps_abort_flag, |
8277 | 14 | { "Abort?", "ndps.abort", |
8278 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
8279 | 14 | NULL, HFILL }}, |
8280 | | |
8281 | 14 | { &hf_ndps_obj_attribute_type, |
8282 | 14 | { "Value Syntax", "ndps.attrib_type", |
8283 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_attribute_enum_ext, 0x0, |
8284 | 14 | NULL, HFILL }}, |
8285 | | |
8286 | 14 | { &hf_ndps_attribute_value, |
8287 | 14 | { "Value", "ndps.attribute_value", |
8288 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8289 | 14 | NULL, HFILL }}, |
8290 | | |
8291 | 14 | { &hf_ndps_lower_range, |
8292 | 14 | { "Lower Range", "ndps.lower_range", |
8293 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8294 | 14 | NULL, HFILL }}, |
8295 | | |
8296 | 14 | { &hf_ndps_upper_range, |
8297 | 14 | { "Upper Range", "ndps.upper_range", |
8298 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8299 | 14 | NULL, HFILL }}, |
8300 | | |
8301 | 14 | { &hf_ndps_n64, |
8302 | 14 | { "Value", "ndps.n64", |
8303 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8304 | 14 | NULL, HFILL }}, |
8305 | | |
8306 | 14 | { &hf_ndps_lower_range_n64, |
8307 | 14 | { "Lower Range", "ndps.lower_range_n64", |
8308 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8309 | 14 | NULL, HFILL }}, |
8310 | | |
8311 | 14 | { &hf_ndps_upper_range_n64, |
8312 | 14 | { "Upper Range", "ndps.upper_range_n64", |
8313 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8314 | 14 | NULL, HFILL }}, |
8315 | | |
8316 | 14 | { &hf_ndps_attrib_boolean, |
8317 | 14 | { "Value?", "ndps.attrib_boolean", |
8318 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
8319 | 14 | NULL, HFILL }}, |
8320 | | |
8321 | 14 | { &hf_ndps_realization, |
8322 | 14 | { "Realization Type", "ndps.realization", |
8323 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_realization_enum), 0x0, |
8324 | 14 | NULL, HFILL }}, |
8325 | | |
8326 | 14 | { &hf_ndps_xdimension_n64, |
8327 | 14 | { "X Dimension", "ndps.xdimension_n64", |
8328 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8329 | 14 | NULL, HFILL }}, |
8330 | | |
8331 | 14 | { &hf_ndps_ydimension_n64, |
8332 | 14 | { "Y Dimension", "ndps.ydimension_n64", |
8333 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8334 | 14 | NULL, HFILL }}, |
8335 | | |
8336 | 14 | { &hf_ndps_dim_value, |
8337 | 14 | { "Dimension Value Type", "ndps.dim_value", |
8338 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_dim_value_enum), 0x0, |
8339 | 14 | NULL, HFILL }}, |
8340 | | |
8341 | 14 | { &hf_ndps_dim_flag, |
8342 | 14 | { "Dimension Flag", "ndps.dim_flag", |
8343 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8344 | 14 | NULL, HFILL }}, |
8345 | | |
8346 | 14 | { &hf_ndps_xydim_value, |
8347 | 14 | { "XY Dimension Value Type", "ndps.xydim_value", |
8348 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_xydim_value_enum), 0x0, |
8349 | 14 | NULL, HFILL }}, |
8350 | | |
8351 | 14 | { &hf_ndps_location_value, |
8352 | 14 | { "Location Value Type", "ndps.location_value", |
8353 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_location_value_enum), 0x0, |
8354 | 14 | NULL, HFILL }}, |
8355 | | |
8356 | 14 | { &hf_ndps_xmin_n64, |
8357 | 14 | { "Minimum X Dimension", "ndps.xmin_n64", |
8358 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8359 | 14 | NULL, HFILL }}, |
8360 | | |
8361 | 14 | { &hf_ndps_xmax_n64, |
8362 | 14 | { "Maximum X Dimension", "ndps.xmax_n64", |
8363 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8364 | 14 | NULL, HFILL }}, |
8365 | | |
8366 | 14 | { &hf_ndps_ymin_n64, |
8367 | 14 | { "Minimum Y Dimension", "ndps.ymin_n64", |
8368 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8369 | 14 | NULL, HFILL }}, |
8370 | | |
8371 | 14 | { &hf_ndps_ymax_n64, |
8372 | 14 | { "Maximum Y Dimension", "ndps.ymax_n64", |
8373 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8374 | 14 | NULL, HFILL }}, |
8375 | | |
8376 | 14 | { &hf_ndps_edge_value, |
8377 | 14 | { "Edge Value", "ndps.edge_value", |
8378 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_edge_value_enum), 0x0, |
8379 | 14 | NULL, HFILL }}, |
8380 | | |
8381 | 14 | { &hf_ndps_cardinal_or_oid, |
8382 | 14 | { "Cardinal or OID", "ndps.car_or_oid", |
8383 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_card_or_oid_enum), 0x0, |
8384 | 14 | NULL, HFILL }}, |
8385 | | |
8386 | 14 | { &hf_ndps_cardinal_name_or_oid, |
8387 | 14 | { "Cardinal Name or OID", "ndps.car_name_or_oid", |
8388 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_card_name_or_oid_enum), 0x0, |
8389 | 14 | NULL, HFILL }}, |
8390 | | |
8391 | 14 | { &hf_ndps_integer_or_oid, |
8392 | 14 | { "Integer or OID", "ndps.integer_or_oid", |
8393 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_integer_or_oid_enum), 0x0, |
8394 | 14 | NULL, HFILL }}, |
8395 | | |
8396 | 14 | { &hf_ndps_profile_id, |
8397 | 14 | { "Profile ID", "ndps.profile_id", |
8398 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8399 | 14 | NULL, HFILL }}, |
8400 | | |
8401 | 14 | { &hf_ndps_persistence, |
8402 | 14 | { "Persistence", "ndps.persistence", |
8403 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_persistence_enum), 0x0, |
8404 | 14 | NULL, HFILL }}, |
8405 | | |
8406 | 14 | { &hf_ndps_language_count, |
8407 | 14 | { "Number of Languages", "ndps.language_count", |
8408 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8409 | 14 | NULL, HFILL }}, |
8410 | | |
8411 | 14 | { &hf_ndps_language_id, |
8412 | 14 | { "Language ID", "ndps.lang_id", |
8413 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8414 | 14 | NULL, HFILL }}, |
8415 | | |
8416 | 14 | { &hf_address_type, |
8417 | 14 | { "Address Type", "ndps.address_type", |
8418 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_address_type_enum_ext, 0x0, |
8419 | 14 | NULL, HFILL }}, |
8420 | | |
8421 | 14 | { &hf_ndps_address, |
8422 | 14 | { "Address", "ndps.address", |
8423 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_address_enum), 0x0, |
8424 | 14 | NULL, HFILL }}, |
8425 | | |
8426 | 14 | { &hf_ndps_add_bytes, |
8427 | 14 | { "Address Bytes", "ndps.add_bytes", |
8428 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8429 | 14 | NULL, HFILL }}, |
8430 | | |
8431 | 14 | { &hf_ndps_event_type, |
8432 | 14 | { "Event Type", "ndps.event_type", |
8433 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8434 | 14 | NULL, HFILL }}, |
8435 | | |
8436 | 14 | { &hf_ndps_event_object_identifier, |
8437 | 14 | { "Event Object Type", "ndps.event_object_identifier", |
8438 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_event_object_enum), 0x0, |
8439 | 14 | NULL, HFILL }}, |
8440 | | |
8441 | 14 | { &hf_ndps_octet_string, |
8442 | 14 | { "Octet String", "ndps.octet_string", |
8443 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8444 | 14 | NULL, HFILL }}, |
8445 | | |
8446 | 14 | { &hf_ndps_scope, |
8447 | 14 | { "Scope", "ndps.scope", |
8448 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8449 | 14 | NULL, HFILL }}, |
8450 | | |
8451 | 14 | { &hf_address_len, |
8452 | 14 | { "Address Length", "ndps.addr_len", |
8453 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8454 | 14 | NULL, HFILL }}, |
8455 | | |
8456 | 14 | { &hf_ndps_net, |
8457 | 14 | { "IPX Network", "ndps.net", |
8458 | 14 | FT_IPXNET, BASE_NONE, NULL, 0x0, |
8459 | 14 | "Scope", HFILL }}, |
8460 | | |
8461 | 14 | { &hf_ndps_node, |
8462 | 14 | { "Node", "ndps.node", |
8463 | 14 | FT_ETHER, BASE_NONE, NULL, 0x0, |
8464 | 14 | NULL, HFILL }}, |
8465 | | |
8466 | 14 | { &hf_ndps_socket, |
8467 | 14 | { "IPX Socket", "ndps.socket", |
8468 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
8469 | 14 | NULL, HFILL }}, |
8470 | | |
8471 | 14 | { &hf_ndps_port, |
8472 | 14 | { "IP Port", "ndps.port", |
8473 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8474 | 14 | NULL, HFILL }}, |
8475 | | |
8476 | 14 | { &hf_ndps_ip, |
8477 | 14 | { "IP Address", "ndps.ip", |
8478 | 14 | FT_IPv4, BASE_NONE, NULL, 0x0, |
8479 | 14 | NULL, HFILL }}, |
8480 | | |
8481 | 14 | { &hf_ndps_server_type, |
8482 | 14 | { "NDPS Server Type", "ndps.server_type", |
8483 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_server_type_enum), 0x0, |
8484 | 14 | NULL, HFILL }}, |
8485 | | |
8486 | 14 | { &hf_ndps_num_services, |
8487 | 14 | { "Number of Services", "ndps.num_services", |
8488 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8489 | 14 | NULL, HFILL }}, |
8490 | | |
8491 | 14 | { &hf_ndps_service_type, |
8492 | 14 | { "NDPS Service Type", "ndps.service_type", |
8493 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_service_type_enum), 0x0, |
8494 | 14 | NULL, HFILL }}, |
8495 | | |
8496 | 14 | { &hf_ndps_service_enabled, |
8497 | 14 | { "Service Enabled?", "ndps.service_enabled", |
8498 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
8499 | 14 | NULL, HFILL }}, |
8500 | | |
8501 | 14 | { &hf_ndps_method_name, |
8502 | 14 | { "Method Name", "ndps.method_name", |
8503 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8504 | 14 | NULL, HFILL }}, |
8505 | | |
8506 | 14 | { &hf_ndps_method_ver, |
8507 | 14 | { "Method Version", "ndps.method_ver", |
8508 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8509 | 14 | NULL, HFILL }}, |
8510 | | |
8511 | 14 | { &hf_ndps_file_name, |
8512 | 14 | { "File Name", "ndps.file_name", |
8513 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8514 | 14 | NULL, HFILL }}, |
8515 | | |
8516 | 14 | { &hf_ndps_admin_submit, |
8517 | 14 | { "Admin Submit Flag?", "ndps.admin_submit_flag", |
8518 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
8519 | 14 | NULL, HFILL }}, |
8520 | | |
8521 | 14 | { &hf_ndps_oid, |
8522 | 14 | { "Object ID", "ndps.oid", |
8523 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8524 | 14 | NULL, HFILL }}, |
8525 | | |
8526 | 14 | { &hf_ndps_object_op, |
8527 | 14 | { "Operation", "ndps.object_op", |
8528 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_object_op_enum), 0x0, |
8529 | 14 | NULL, HFILL }}, |
8530 | | |
8531 | 14 | { &hf_answer_time, |
8532 | 14 | { "Answer Time", "ndps.answer_time", |
8533 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8534 | 14 | NULL, HFILL }}, |
8535 | | |
8536 | 14 | { &hf_oid_asn1_type, |
8537 | 14 | { "ASN.1 Type", "ndps.asn1_type", |
8538 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8539 | 14 | NULL, HFILL }}, |
8540 | | |
8541 | 14 | { &hf_ndps_item_ptr, |
8542 | 14 | { "Item Pointer", "ndps.item_ptr", |
8543 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8544 | 14 | NULL, HFILL }}, |
8545 | | |
8546 | 14 | { &hf_ndps_len, |
8547 | 14 | { "Length", "ndps.len", |
8548 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8549 | 14 | NULL, HFILL }}, |
8550 | | |
8551 | 14 | { &hf_ndps_limit_enc, |
8552 | 14 | { "Limit Encountered", "ndps.limit_enc", |
8553 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_limit_enc_enum), 0x0, |
8554 | 14 | NULL, HFILL }}, |
8555 | | |
8556 | 14 | { &hf_ndps_delivery_add_count, |
8557 | 14 | { "Number of Delivery Addresses", "ndps.delivery_add_count", |
8558 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8559 | 14 | NULL, HFILL }}, |
8560 | | |
8561 | 14 | { &hf_ndps_delivery_add_type, |
8562 | 14 | { "Delivery Address Type", "ndps.delivery_add_type", |
8563 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_delivery_add_enum), 0x0, |
8564 | 14 | NULL, HFILL }}, |
8565 | | |
8566 | 14 | { &hf_ndps_criterion_type, |
8567 | 14 | { "Criterion Type", "ndps.criterion_type", |
8568 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_attribute_enum_ext, 0x0, |
8569 | 14 | NULL, HFILL }}, |
8570 | | |
8571 | 14 | { &hf_ndps_num_ignored_attributes, |
8572 | 14 | { "Number of Ignored Attributes", "ndps.num_ignored_attributes", |
8573 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8574 | 14 | NULL, HFILL }}, |
8575 | | |
8576 | 14 | { &hf_ndps_ignored_type, |
8577 | 14 | { "Ignored Type", "ndps.ignored_type", |
8578 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_attribute_enum_ext, 0x0, |
8579 | 14 | NULL, HFILL }}, |
8580 | | |
8581 | 14 | { &hf_ndps_num_resources, |
8582 | 14 | { "Number of Resources", "ndps.num_resources", |
8583 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8584 | 14 | NULL, HFILL }}, |
8585 | | |
8586 | 14 | { &hf_ndps_resource_type, |
8587 | 14 | { "Resource Type", "ndps.resource_type", |
8588 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_resource_enum), 0x0, |
8589 | 14 | NULL, HFILL }}, |
8590 | | |
8591 | 14 | { &hf_ndps_identifier_type, |
8592 | 14 | { "Identifier Type", "ndps.identifier_type", |
8593 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_identifier_enum), 0x0, |
8594 | 14 | NULL, HFILL }}, |
8595 | | |
8596 | 14 | { &hf_ndps_page_flag, |
8597 | 14 | { "Page Flag", "ndps.page_flag", |
8598 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8599 | 14 | NULL, HFILL }}, |
8600 | | |
8601 | 14 | { &hf_ndps_media_type, |
8602 | 14 | { "Media Type", "ndps.media_type", |
8603 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_media_enum), 0x0, |
8604 | 14 | NULL, HFILL }}, |
8605 | | |
8606 | 14 | { &hf_ndps_page_size, |
8607 | 14 | { "Page Size", "ndps.page_size", |
8608 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_page_size_enum), 0x0, |
8609 | 14 | NULL, HFILL }}, |
8610 | | |
8611 | 14 | { &hf_ndps_direction, |
8612 | 14 | { "Direction", "ndps.direction", |
8613 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_pres_direction_enum_ext, 0x0, |
8614 | 14 | NULL, HFILL }}, |
8615 | | |
8616 | 14 | { &hf_ndps_page_order, |
8617 | 14 | { "Page Order", "ndps.page_order", |
8618 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_page_order_enum), 0x0, |
8619 | 14 | NULL, HFILL }}, |
8620 | | |
8621 | 14 | { &hf_ndps_medium_size, |
8622 | 14 | { "Medium Size", "ndps.medium_size", |
8623 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_medium_size_enum), 0x0, |
8624 | 14 | NULL, HFILL }}, |
8625 | | |
8626 | 14 | { &hf_ndps_long_edge_feeds, |
8627 | 14 | { "Long Edge Feeds?", "ndps.long_edge_feeds", |
8628 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
8629 | 14 | NULL, HFILL }}, |
8630 | | |
8631 | 14 | { &hf_ndps_inc_across_feed, |
8632 | 14 | { "Increment Across Feed", "ndps.inc_across_feed", |
8633 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8634 | 14 | NULL, HFILL }}, |
8635 | | |
8636 | 14 | { &hf_ndps_size_inc_in_feed, |
8637 | 14 | { "Size Increment in Feed", "ndps.size_inc_in_feed", |
8638 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8639 | 14 | NULL, HFILL }}, |
8640 | | |
8641 | 14 | { &hf_ndps_page_orientation, |
8642 | 14 | { "Page Orientation", "ndps.page_orientation", |
8643 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_page_orientation_enum), 0x0, |
8644 | 14 | NULL, HFILL }}, |
8645 | | |
8646 | 14 | { &hf_ndps_numbers_up, |
8647 | 14 | { "Numbers Up", "ndps.numbers_up", |
8648 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_numbers_up_enum), 0x0, |
8649 | 14 | NULL, HFILL }}, |
8650 | | |
8651 | 14 | { &hf_ndps_xdimension, |
8652 | 14 | { "X Dimension", "ndps.xdimension", |
8653 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8654 | 14 | NULL, HFILL }}, |
8655 | | |
8656 | 14 | { &hf_ndps_ydimension, |
8657 | 14 | { "Y Dimension", "ndps.ydimension", |
8658 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
8659 | 14 | NULL, HFILL }}, |
8660 | | |
8661 | 14 | { &hf_ndps_state_severity, |
8662 | 14 | { "State Severity", "ndps.state_severity", |
8663 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_state_severity_enum), 0x0, |
8664 | 14 | NULL, HFILL }}, |
8665 | | |
8666 | 14 | { &hf_ndps_training, |
8667 | 14 | { "Training", "ndps.training", |
8668 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_training_enum), 0x0, |
8669 | 14 | NULL, HFILL }}, |
8670 | | |
8671 | 14 | { &hf_ndps_colorant_set, |
8672 | 14 | { "Colorant Set", "ndps.colorant_set", |
8673 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_colorant_set_enum), 0x0, |
8674 | 14 | NULL, HFILL }}, |
8675 | | |
8676 | 14 | { &hf_ndps_card_enum_time, |
8677 | 14 | { "Cardinal, Enum, or Time", "ndps.card_enum_time", |
8678 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_card_enum_time_enum), 0x0, |
8679 | 14 | NULL, HFILL }}, |
8680 | | |
8681 | 14 | { &hf_ndps_attrs_arg, |
8682 | 14 | { "List Attribute Operation", "ndps.attrs_arg", |
8683 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_attrs_arg_enum), 0x0, |
8684 | 14 | NULL, HFILL }}, |
8685 | | |
8686 | 14 | { &hf_ndps_context_len, |
8687 | 14 | { "Context Length", "ndps.context_len", |
8688 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8689 | 14 | NULL, HFILL }}, |
8690 | | |
8691 | 14 | { &hf_ndps_context, |
8692 | 14 | { "Context", "ndps.context", |
8693 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8694 | 14 | NULL, HFILL }}, |
8695 | | |
8696 | 14 | { &hf_ndps_filter, |
8697 | 14 | { "Filter Type", "ndps.filter", |
8698 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_filter_enum), 0x0, |
8699 | 14 | NULL, HFILL }}, |
8700 | | |
8701 | | #if 0 |
8702 | | { &hf_ndps_item_filter, |
8703 | | { "Filter Item Operation", "ndps.filter_item", |
8704 | | FT_UINT32, BASE_HEX, VALS(ndps_filter_item_enum), 0x0, |
8705 | | NULL, HFILL }}, |
8706 | | #endif |
8707 | | |
8708 | | #if 0 |
8709 | | { &hf_ndps_substring_match, |
8710 | | { "Substring Match", "ndps.substring_match", |
8711 | | FT_UINT32, BASE_HEX, VALS(ndps_match_criteria_enum), 0x0, |
8712 | | NULL, HFILL }}, |
8713 | | #endif |
8714 | | |
8715 | 14 | { &hf_ndps_time_limit, |
8716 | 14 | { "Time Limit", "ndps.time_limit", |
8717 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8718 | 14 | NULL, HFILL }}, |
8719 | | |
8720 | 14 | { &hf_ndps_count_limit, |
8721 | 14 | { "Count Limit", "ndps.count_limit", |
8722 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8723 | 14 | NULL, HFILL }}, |
8724 | | |
8725 | 14 | { &hf_ndps_operator, |
8726 | 14 | { "Operator Type", "ndps.operator", |
8727 | 14 | FT_UINT32, BASE_DEC, VALS(ndps_operator_enum), 0x0, |
8728 | 14 | NULL, HFILL }}, |
8729 | | |
8730 | 14 | { &hf_ndps_password, |
8731 | 14 | { "Password", "ndps.password", |
8732 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8733 | 14 | NULL, HFILL }}, |
8734 | | |
8735 | 14 | { &hf_ndps_retrieve_restrictions, |
8736 | 14 | { "Retrieve Restrictions", "ndps.ret_restrict", |
8737 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8738 | 14 | NULL, HFILL }}, |
8739 | | |
8740 | 14 | { &hf_ndps_bind_security_option_count, |
8741 | 14 | { "Number of Bind Security Options", "ndps.bind_security_count", |
8742 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8743 | 14 | NULL, HFILL }}, |
8744 | | |
8745 | 14 | { &hf_bind_security, |
8746 | 14 | { "Bind Security Options", "ndps.bind_security", |
8747 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8748 | 14 | NULL, HFILL }}, |
8749 | | |
8750 | 14 | { &hf_ndps_max_items, |
8751 | 14 | { "Maximum Items in List", "ndps.max_items", |
8752 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8753 | 14 | NULL, HFILL }}, |
8754 | | |
8755 | 14 | { &hf_ndps_status_flags, |
8756 | 14 | { "Status Flag", "ndps.status_flags", |
8757 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8758 | 14 | NULL, HFILL }}, |
8759 | | |
8760 | 14 | { &hf_ndps_resource_list_type, |
8761 | 14 | { "Resource Type", "ndps.resource_type", |
8762 | 14 | FT_UINT32, BASE_DEC | BASE_EXT_STRING, &ndps_resource_type_enum_ext, 0x0, |
8763 | 14 | NULL, HFILL }}, |
8764 | | |
8765 | 14 | { &hf_os_count, |
8766 | 14 | { "Number of OSes", "ndps.os_count", |
8767 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8768 | 14 | NULL, HFILL }}, |
8769 | | |
8770 | 14 | { &hf_os_type, |
8771 | 14 | { "OS Type", "ndps.os_type", |
8772 | 14 | FT_UINT32, BASE_DEC | BASE_EXT_STRING, &ndps_os_type_enum_ext, 0x0, |
8773 | 14 | NULL, HFILL }}, |
8774 | | |
8775 | 14 | { &hf_ndps_printer_type_count, |
8776 | 14 | { "Number of Printer Types", "ndps.printer_type_count", |
8777 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8778 | 14 | NULL, HFILL }}, |
8779 | | |
8780 | 14 | { &hf_ndps_printer_type, |
8781 | 14 | { "Printer Type", "ndps.prn_type", |
8782 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8783 | 14 | NULL, HFILL }}, |
8784 | | |
8785 | 14 | { &hf_ndps_printer_manuf, |
8786 | 14 | { "Printer Manufacturer", "ndps.prn_manuf", |
8787 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8788 | 14 | NULL, HFILL }}, |
8789 | | |
8790 | 14 | { &hf_ndps_inf_file_name, |
8791 | 14 | { "INF File Name", "ndps.inf_file_name", |
8792 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8793 | 14 | NULL, HFILL }}, |
8794 | | |
8795 | 14 | { &hf_ndps_vendor_dir, |
8796 | 14 | { "Vendor Directory", "ndps.vendor_dir", |
8797 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8798 | 14 | NULL, HFILL }}, |
8799 | | |
8800 | 14 | { &hf_banner_type, |
8801 | 14 | { "Banner Type", "ndps.banner_type", |
8802 | 14 | FT_UINT32, BASE_DEC, VALS(ndps_banner_type_enum), 0x0, |
8803 | 14 | NULL, HFILL }}, |
8804 | | |
8805 | 14 | { &hf_font_type, |
8806 | 14 | { "Font Type", "ndps.font_type", |
8807 | 14 | FT_UINT32, BASE_DEC, VALS(ndps_font_type_enum), 0x0, |
8808 | 14 | NULL, HFILL }}, |
8809 | | |
8810 | 14 | { &hf_printer_id, |
8811 | 14 | { "Printer ID", "ndps.printer_id", |
8812 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8813 | 14 | NULL, HFILL }}, |
8814 | | |
8815 | 14 | { &hf_ndps_font_name, |
8816 | 14 | { "Font Name", "ndps.font_name", |
8817 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8818 | 14 | NULL, HFILL }}, |
8819 | | |
8820 | 14 | { &hf_ndps_return_code, |
8821 | 14 | { "Return Code", "ndps.ret_code", |
8822 | 14 | FT_UINT32, BASE_HEX | BASE_EXT_STRING, &ndps_error_types_ext, 0x0, |
8823 | 14 | NULL, HFILL }}, |
8824 | | |
8825 | | #if 0 |
8826 | | { &hf_ndps_banner_count, |
8827 | | { "Number of Banners", "ndps.banner_count", |
8828 | | FT_UINT32, BASE_DEC, NULL, 0x0, |
8829 | | NULL, HFILL }}, |
8830 | | #endif |
8831 | | |
8832 | 14 | { &hf_ndps_banner_name, |
8833 | 14 | { "Banner Name", "ndps.banner_name", |
8834 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8835 | 14 | NULL, HFILL }}, |
8836 | | |
8837 | 14 | { &hf_ndps_font_type_count, |
8838 | 14 | { "Number of Font Types", "ndps.font_type_count", |
8839 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8840 | 14 | NULL, HFILL }}, |
8841 | | |
8842 | 14 | { &hf_font_type_name, |
8843 | 14 | { "Font Type Name", "ndps.font_type_name", |
8844 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8845 | 14 | NULL, HFILL }}, |
8846 | | |
8847 | 14 | { &hf_ndps_font_file_count, |
8848 | 14 | { "Number of Font Files", "ndps.font_file_count", |
8849 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8850 | 14 | NULL, HFILL }}, |
8851 | | |
8852 | 14 | { &hf_font_file_name, |
8853 | 14 | { "Font File Name", "ndps.font_file_name", |
8854 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8855 | 14 | NULL, HFILL }}, |
8856 | | |
8857 | 14 | { &hf_ndps_printer_def_count, |
8858 | 14 | { "Number of Printer Definitions", "ndps.printer_def_count", |
8859 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8860 | 14 | NULL, HFILL }}, |
8861 | | |
8862 | 14 | { &hf_ndps_prn_file_name, |
8863 | 14 | { "Printer File Name", "ndps.print_file_name", |
8864 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8865 | 14 | NULL, HFILL }}, |
8866 | | |
8867 | 14 | { &hf_ndps_prn_dir_name, |
8868 | 14 | { "Printer Directory Name", "ndps.print_dir_name", |
8869 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8870 | 14 | NULL, HFILL }}, |
8871 | | |
8872 | 14 | { &hf_ndps_def_file_name, |
8873 | 14 | { "Printer Definition Name", "ndps.print_def_name", |
8874 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8875 | 14 | NULL, HFILL }}, |
8876 | | |
8877 | 14 | { &hf_ndps_num_win31_keys, |
8878 | 14 | { "Number of Windows 3.1 Keys", "ndps.num_win31_keys", |
8879 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8880 | 14 | NULL, HFILL }}, |
8881 | | |
8882 | 14 | { &hf_ndps_num_win95_keys, |
8883 | 14 | { "Number of Windows 95 Keys", "ndps.num_win95_keys", |
8884 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8885 | 14 | NULL, HFILL }}, |
8886 | | |
8887 | 14 | { &hf_ndps_num_windows_keys, |
8888 | 14 | { "Number of Windows Keys", "ndps.num_windows_keys", |
8889 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8890 | 14 | NULL, HFILL }}, |
8891 | | |
8892 | 14 | { &hf_ndps_windows_key, |
8893 | 14 | { "Windows Key", "ndps.windows_key", |
8894 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
8895 | 14 | NULL, HFILL }}, |
8896 | | |
8897 | 14 | { &hf_archive_type, |
8898 | 14 | { "Archive Type", "ndps.archive_type", |
8899 | 14 | FT_UINT32, BASE_DEC, VALS(ndps_archive_enum), 0x0, |
8900 | 14 | NULL, HFILL }}, |
8901 | | |
8902 | 14 | { &hf_archive_file_size, |
8903 | 14 | { "Archive File Size", "ndps.archive_size", |
8904 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8905 | 14 | NULL, HFILL }}, |
8906 | | |
8907 | 14 | { &hf_ndps_segment_overlap, |
8908 | 14 | { "Segment overlap", "ndps.segment.overlap", FT_BOOLEAN, BASE_NONE, |
8909 | 14 | NULL, 0x0, "Segment overlaps with other segments", HFILL }}, |
8910 | | |
8911 | 14 | { &hf_ndps_segment_overlap_conflict, |
8912 | 14 | { "Conflicting data in segment overlap", "ndps.segment.overlap.conflict", |
8913 | 14 | FT_BOOLEAN, BASE_NONE, |
8914 | 14 | NULL, 0x0, "Overlapping segments contained conflicting data", HFILL }}, |
8915 | | |
8916 | 14 | { &hf_ndps_segment_multiple_tails, |
8917 | 14 | { "Multiple tail segments found", "ndps.segment.multipletails", |
8918 | 14 | FT_BOOLEAN, BASE_NONE, |
8919 | 14 | NULL, 0x0, "Several tails were found when desegmenting the packet", HFILL }}, |
8920 | | |
8921 | 14 | { &hf_ndps_segment_too_long_segment, |
8922 | 14 | { "Segment too long", "ndps.segment.toolongsegment", FT_BOOLEAN, BASE_NONE, |
8923 | 14 | NULL, 0x0, "Segment contained data past end of packet", HFILL }}, |
8924 | | |
8925 | 14 | { &hf_ndps_segment_error, |
8926 | 14 | {"Desegmentation error", "ndps.segment.error", FT_FRAMENUM, BASE_NONE, |
8927 | 14 | NULL, 0x0, "Desegmentation error due to illegal segments", HFILL }}, |
8928 | | |
8929 | 14 | { &hf_ndps_segment_count, |
8930 | 14 | {"Segment count", "ndps.segment.count", FT_UINT32, BASE_DEC, |
8931 | 14 | NULL, 0x0, NULL, HFILL }}, |
8932 | | |
8933 | 14 | { &hf_ndps_reassembled_length, |
8934 | 14 | {"Reassembled NDPS length", "ndps.reassembled.length", FT_UINT32, BASE_DEC, |
8935 | 14 | NULL, 0x0, "The total length of the reassembled payload", HFILL }}, |
8936 | | |
8937 | 14 | { &hf_ndps_segment, |
8938 | 14 | { "NDPS Fragment", "ndps.fragment", FT_FRAMENUM, BASE_NONE, |
8939 | 14 | NULL, 0x0, NULL, HFILL }}, |
8940 | | |
8941 | 14 | { &hf_ndps_segments, |
8942 | 14 | { "NDPS Fragments", "ndps.fragments", FT_NONE, BASE_NONE, |
8943 | 14 | NULL, 0x0, NULL, HFILL }}, |
8944 | | |
8945 | 14 | { &hf_ndps_data, |
8946 | 14 | { "Data", "ndps.data", FT_BYTES, BASE_NONE, |
8947 | 14 | NULL, 0x0, NULL, HFILL }}, |
8948 | | |
8949 | 14 | { &hf_get_status_flag, |
8950 | 14 | { "Get Status Flag", "ndps.get_status_flags", |
8951 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8952 | 14 | NULL, HFILL }}, |
8953 | | |
8954 | 14 | { &hf_res_type, |
8955 | 14 | { "Resource Type", "ndps.res_type", |
8956 | 14 | FT_UINT32, BASE_DEC, VALS(ndps_res_type_enum), 0x0, |
8957 | 14 | NULL, HFILL }}, |
8958 | | |
8959 | 14 | { &hf_file_timestamp, |
8960 | 14 | { "File Time Stamp", "ndps.file_time_stamp", |
8961 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8962 | 14 | NULL, HFILL }}, |
8963 | | |
8964 | 14 | { &hf_print_arg, |
8965 | 14 | { "Print Type", "ndps.print_arg", |
8966 | 14 | FT_UINT32, BASE_DEC, VALS(ndps_print_arg_enum), 0x0, |
8967 | 14 | NULL, HFILL }}, |
8968 | | |
8969 | 14 | { &hf_sub_complete, |
8970 | 14 | { "Submission Complete?", "ndps.sub_complete", FT_BOOLEAN, BASE_NONE, |
8971 | 14 | NULL, 0x0, NULL, HFILL }}, |
8972 | | |
8973 | 14 | { &hf_doc_content, |
8974 | 14 | { "Document Content", "ndps.doc_content", |
8975 | 14 | FT_UINT32, BASE_DEC, VALS(ndps_doc_content_enum), 0x0, |
8976 | 14 | NULL, HFILL }}, |
8977 | | |
8978 | | #if 0 |
8979 | | { &hf_ndps_doc_name, |
8980 | | { "Document Name", "ndps.doc_name", |
8981 | | FT_STRING, BASE_NONE, NULL, 0x0, |
8982 | | NULL, HFILL }}, |
8983 | | #endif |
8984 | | |
8985 | 14 | { &hf_local_id, |
8986 | 14 | { "Local ID", "ndps.local_id", |
8987 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8988 | 14 | NULL, HFILL }}, |
8989 | | |
8990 | 14 | { &hf_ndps_included_doc_len, |
8991 | 14 | { "Included Document Length", "ndps.included_doc_len", |
8992 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8993 | 14 | NULL, HFILL }}, |
8994 | | |
8995 | 14 | { &hf_ndps_included_doc, |
8996 | 14 | { "Included Document", "ndps.included_doc", |
8997 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
8998 | 14 | NULL, HFILL }}, |
8999 | | |
9000 | 14 | { &hf_ndps_ref_name, |
9001 | 14 | { "Referenced Document Name", "ndps.ref_doc_name", |
9002 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9003 | 14 | NULL, HFILL }}, |
9004 | | |
9005 | 14 | { &hf_interrupt_job_type, |
9006 | 14 | { "Interrupt Job Identifier", "ndps.interrupt_job_type", |
9007 | 14 | FT_UINT32, BASE_DEC, VALS(ndps_interrupt_job_enum), 0x0, |
9008 | 14 | NULL, HFILL }}, |
9009 | | |
9010 | 14 | { &hf_pause_job_type, |
9011 | 14 | { "Pause Job Identifier", "ndps.pause_job_type", |
9012 | 14 | FT_UINT32, BASE_DEC, VALS(ndps_pause_job_enum), 0x0, |
9013 | 14 | NULL, HFILL }}, |
9014 | | |
9015 | 14 | { &hf_ndps_force, |
9016 | 14 | { "Force?", "ndps.force", |
9017 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
9018 | 14 | NULL, HFILL }}, |
9019 | | |
9020 | 14 | { &hf_resubmit_op_type, |
9021 | 14 | { "Resubmit Operation Type", "ndps.resubmit_op_type", |
9022 | 14 | FT_UINT32, BASE_DEC, VALS(ndps_resubmit_op_enum), 0x0, |
9023 | 14 | NULL, HFILL }}, |
9024 | | |
9025 | 14 | { &hf_shutdown_type, |
9026 | 14 | { "Shutdown Type", "ndps.shutdown_type", |
9027 | 14 | FT_UINT32, BASE_DEC, VALS(ndps_shutdown_enum), 0x0, |
9028 | 14 | NULL, HFILL }}, |
9029 | | |
9030 | 14 | { &hf_ndps_supplier_flag, |
9031 | 14 | { "Supplier Data?", "ndps.supplier_flag", |
9032 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9033 | 14 | NULL, HFILL }}, |
9034 | | |
9035 | 14 | { &hf_ndps_language_flag, |
9036 | 14 | { "Language Data?", "ndps.language_flag", |
9037 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
9038 | 14 | NULL, HFILL }}, |
9039 | | |
9040 | 14 | { &hf_ndps_method_flag, |
9041 | 14 | { "Method Data?", "ndps.method_flag", |
9042 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
9043 | 14 | NULL, HFILL }}, |
9044 | | |
9045 | 14 | { &hf_ndps_delivery_address_flag, |
9046 | 14 | { "Delivery Address Data?", "ndps.delivery_flag", |
9047 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
9048 | 14 | NULL, HFILL }}, |
9049 | | |
9050 | 14 | { &hf_ndps_list_profiles_type, |
9051 | 14 | { "List Profiles Type", "ndps.list_profiles_type", |
9052 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_attrs_arg_enum), 0x0, |
9053 | 14 | NULL, HFILL }}, |
9054 | | |
9055 | 14 | { &hf_ndps_list_profiles_choice_type, |
9056 | 14 | { "List Profiles Choice Type", "ndps.list_profiles_choice_type", |
9057 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_list_profiles_choice_enum), 0x0, |
9058 | 14 | NULL, HFILL }}, |
9059 | | |
9060 | 14 | { &hf_ndps_list_profiles_result_type, |
9061 | 14 | { "List Profiles Result Type", "ndps.list_profiles_result_type", |
9062 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_list_profiles_result_enum), 0x0, |
9063 | 14 | NULL, HFILL }}, |
9064 | | |
9065 | 14 | { &hf_ndps_integer_type_flag, |
9066 | 14 | { "Integer Type Flag", "ndps.integer_type_flag", |
9067 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9068 | 14 | NULL, HFILL }}, |
9069 | | |
9070 | 14 | { &hf_ndps_integer_type_value, |
9071 | 14 | { "Integer Type Value", "ndps.integer_type_value", |
9072 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9073 | 14 | NULL, HFILL }}, |
9074 | | |
9075 | 14 | { &hf_ndps_continuation_option, |
9076 | 14 | { "Continuation Option", "ndps.continuation_option", |
9077 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9078 | 14 | NULL, HFILL }}, |
9079 | | |
9080 | 14 | { &hf_ndps_ds_info_type, |
9081 | 14 | { "DS Info Type", "ndps.ds_info_type", |
9082 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_ds_info_enum), 0x0, |
9083 | 14 | NULL, HFILL }}, |
9084 | | |
9085 | 14 | { &hf_ndps_guid, |
9086 | 14 | { "GUID", "ndps.guid", |
9087 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9088 | 14 | NULL, HFILL }}, |
9089 | | |
9090 | 14 | { &hf_ndps_list_services_type, |
9091 | 14 | { "Services Type", "ndps.list_services_type", |
9092 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_list_services_enum), 0x0, |
9093 | 14 | NULL, HFILL }}, |
9094 | | |
9095 | 14 | { &hf_ndps_item_bytes, |
9096 | 14 | { "Item Ptr", "ndps.item_bytes", |
9097 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9098 | 14 | NULL, HFILL }}, |
9099 | | |
9100 | 14 | { &hf_ndps_certified, |
9101 | 14 | { "Certified", "ndps.certified", |
9102 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9103 | 14 | NULL, HFILL }}, |
9104 | | |
9105 | 14 | { &hf_ndps_attribute_set, |
9106 | 14 | { "Attribute Set", "ndps.attribute_set", |
9107 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
9108 | 14 | NULL, HFILL }}, |
9109 | | |
9110 | 14 | { &hf_ndps_data_item_type, |
9111 | 14 | { "Item Type", "ndps.data_item_type", |
9112 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_data_item_enum), 0x0, |
9113 | 14 | NULL, HFILL }}, |
9114 | | |
9115 | 14 | { &hf_info_int, |
9116 | 14 | { "Integer Value", "ndps.info_int", |
9117 | 14 | FT_UINT8, BASE_HEX, NULL, 0x0, |
9118 | 14 | NULL, HFILL }}, |
9119 | | |
9120 | 14 | { &hf_info_int16, |
9121 | 14 | { "16 Bit Integer Value", "ndps.info_int16", |
9122 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
9123 | 14 | NULL, HFILL }}, |
9124 | | |
9125 | 14 | { &hf_info_int32, |
9126 | 14 | { "32 Bit Integer Value", "ndps.info_int32", |
9127 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9128 | 14 | NULL, HFILL }}, |
9129 | | |
9130 | 14 | { &hf_info_boolean, |
9131 | 14 | { "Boolean Value", "ndps.info_boolean", |
9132 | 14 | FT_BOOLEAN, BASE_NONE, NULL, 0x0, |
9133 | 14 | NULL, HFILL }}, |
9134 | | |
9135 | 14 | { &hf_info_string, |
9136 | 14 | { "String Value", "ndps.info_string", |
9137 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9138 | 14 | NULL, HFILL }}, |
9139 | | |
9140 | | #if 0 |
9141 | | { &hf_info_bytes, |
9142 | | { "Byte Value", "ndps.info_bytes", |
9143 | | FT_BYTES, BASE_NONE, NULL, 0x0, |
9144 | | NULL, HFILL }}, |
9145 | | #endif |
9146 | | |
9147 | 14 | { &hf_ndps_list_local_servers_type, |
9148 | 14 | { "Server Type", "ndps.list_local_server_type", |
9149 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_list_local_servers_enum), 0x0, |
9150 | 14 | NULL, HFILL }}, |
9151 | | |
9152 | 14 | { &hf_ndps_registry_name, |
9153 | 14 | { "Registry Name", "ndps.registry_name", |
9154 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9155 | 14 | NULL, HFILL }}, |
9156 | | |
9157 | 14 | { &hf_ndps_client_server_type, |
9158 | 14 | { "Client/Server Type", "ndps.client_server_type", |
9159 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_client_server_enum), 0x0, |
9160 | 14 | NULL, HFILL }}, |
9161 | | |
9162 | 14 | { &hf_ndps_session_type, |
9163 | 14 | { "Session Type", "ndps.session_type", |
9164 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_session_type_enum), 0x0, |
9165 | 14 | NULL, HFILL }}, |
9166 | | |
9167 | 14 | { &hf_time, |
9168 | 14 | { "Time", "ndps.time", |
9169 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
9170 | 14 | NULL, HFILL }}, |
9171 | | |
9172 | 14 | { &hf_ndps_supplier_name, |
9173 | 14 | { "Supplier Name", "ndps.supplier_name", |
9174 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9175 | 14 | NULL, HFILL }}, |
9176 | | |
9177 | 14 | { &hf_ndps_message, |
9178 | 14 | { "Message", "ndps.message", |
9179 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9180 | 14 | NULL, HFILL }}, |
9181 | | |
9182 | 14 | { &hf_ndps_delivery_method_count, |
9183 | 14 | { "Number of Delivery Methods", "ndps.delivery_method_count", |
9184 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
9185 | 14 | NULL, HFILL }}, |
9186 | | |
9187 | 14 | { &hf_delivery_method_type, |
9188 | 14 | { "Delivery Method Type", "ndps.delivery_method_type", |
9189 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_delivery_method_enum), 0x0, |
9190 | 14 | NULL, HFILL }}, |
9191 | | |
9192 | 14 | { &hf_ndps_get_session_type, |
9193 | 14 | { "Session Type", "ndps.get_session_type", |
9194 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_get_session_type_enum), 0x0, |
9195 | 14 | NULL, HFILL }}, |
9196 | | |
9197 | 14 | { &hf_packet_count, |
9198 | 14 | { "Packet Count", "ndps.packet_count", |
9199 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
9200 | 14 | NULL, HFILL }}, |
9201 | | |
9202 | 14 | { &hf_last_packet_flag, |
9203 | 14 | { "Last Packet Flag", "ndps.last_packet_flag", |
9204 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
9205 | 14 | NULL, HFILL }}, |
9206 | | |
9207 | 14 | { &hf_ndps_get_resman_session_type, |
9208 | 14 | { "Session Type", "ndps.get_resman_session_type", |
9209 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_get_resman_session_type_enum), 0x0, |
9210 | 14 | NULL, HFILL }}, |
9211 | | |
9212 | 14 | { &hf_problem_type, |
9213 | 14 | { "Problem Type", "ndps.problem_type", |
9214 | 14 | FT_UINT32, BASE_HEX, VALS(problem_type_enum), 0x0, |
9215 | 14 | NULL, HFILL }}, |
9216 | | |
9217 | 14 | { &hf_ndps_num_values, |
9218 | 14 | { "Number of Values", "ndps.num_values", |
9219 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
9220 | 14 | NULL, HFILL }}, |
9221 | | |
9222 | 14 | { &hf_ndps_object_ids_7, |
9223 | 14 | { "Object ID Definition", "ndps.objectid_def7", |
9224 | 14 | FT_UINT32, BASE_DEC, NULL, |
9225 | 14 | 0x0, NULL, HFILL }}, |
9226 | | |
9227 | 14 | { &hf_ndps_object_ids_8, |
9228 | 14 | { "Object ID Definition", "ndps.objectid_def8", |
9229 | 14 | FT_UINT32, BASE_DEC, NULL, |
9230 | 14 | 0x0, NULL, HFILL }}, |
9231 | | |
9232 | 14 | { &hf_ndps_object_ids_9, |
9233 | 14 | { "Object ID Definition", "ndps.objectid_def9", |
9234 | 14 | FT_UINT32, BASE_DEC, NULL, |
9235 | 14 | 0x0, NULL, HFILL }}, |
9236 | | |
9237 | 14 | { &hf_ndps_object_ids_10, |
9238 | 14 | { "Object ID Definition", "ndps.objectid_def10", |
9239 | 14 | FT_UINT32, BASE_DEC, NULL, |
9240 | 14 | 0x0, NULL, HFILL }}, |
9241 | | |
9242 | 14 | { &hf_ndps_object_ids_11, |
9243 | 14 | { "Object ID Definition", "ndps.objectid_def11", |
9244 | 14 | FT_UINT32, BASE_DEC, NULL, |
9245 | 14 | 0x0, NULL, HFILL }}, |
9246 | | |
9247 | 14 | { &hf_ndps_object_ids_12, |
9248 | 14 | { "Object ID Definition", "ndps.objectid_def12", |
9249 | 14 | FT_UINT32, BASE_DEC, NULL, |
9250 | 14 | 0x0, NULL, HFILL }}, |
9251 | | |
9252 | 14 | { &hf_ndps_object_ids_13, |
9253 | 14 | { "Object ID Definition", "ndps.objectid_def13", |
9254 | 14 | FT_UINT32, BASE_DEC, NULL, |
9255 | 14 | 0x0, NULL, HFILL }}, |
9256 | | |
9257 | 14 | { &hf_ndps_object_ids_14, |
9258 | 14 | { "Object ID Definition", "ndps.objectid_def14", |
9259 | 14 | FT_UINT32, BASE_DEC, NULL, |
9260 | 14 | 0x0, NULL, HFILL }}, |
9261 | | |
9262 | 14 | { &hf_ndps_object_ids_15, |
9263 | 14 | { "Object ID Definition", "ndps.objectid_def15", |
9264 | 14 | FT_UINT32, BASE_DEC, NULL, |
9265 | 14 | 0x0, NULL, HFILL }}, |
9266 | | |
9267 | 14 | { &hf_ndps_object_ids_16, |
9268 | 14 | { "Object ID Definition", "ndps.objectid_def16", |
9269 | 14 | FT_UINT32, BASE_DEC, NULL, |
9270 | 14 | 0x0, NULL, HFILL }}, |
9271 | | |
9272 | | #if 0 |
9273 | | { &hf_ndps_attribute_time, |
9274 | | { "Time", "ndps.attribute_time", |
9275 | | FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0, |
9276 | | NULL, HFILL }}, |
9277 | | #endif |
9278 | | |
9279 | 14 | { &hf_print_security, |
9280 | 14 | { "Printer Security", "ndps.print_security", |
9281 | 14 | FT_UINT32, BASE_HEX, VALS(ndps_print_security), 0x0, |
9282 | 14 | NULL, HFILL }}, |
9283 | | |
9284 | 14 | { &hf_notify_time_interval, |
9285 | 14 | { "Notify Time Interval", "ndps.notify_time_interval", |
9286 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9287 | 14 | NULL, HFILL }}, |
9288 | | |
9289 | 14 | { &hf_notify_sequence_number, |
9290 | 14 | { "Notify Sequence Number", "ndps.notify_seq_number", |
9291 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9292 | 14 | NULL, HFILL }}, |
9293 | | |
9294 | 14 | { &hf_notify_lease_exp_time, |
9295 | 14 | { "Notify Lease Expiration Time", "ndps.notify_lease_exp_time", |
9296 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9297 | 14 | NULL, HFILL }}, |
9298 | | |
9299 | 14 | { &hf_notify_printer_uri, |
9300 | 14 | { "Notify Printer URI", "ndps.notify_printer_uri", |
9301 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
9302 | 14 | NULL, HFILL }}, |
9303 | | |
9304 | 14 | { &hf_level, |
9305 | 14 | { "Level", "ndps.level", |
9306 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9307 | 14 | NULL, HFILL }}, |
9308 | | |
9309 | 14 | { &hf_interval, |
9310 | 14 | { "Interval", "ndps.interval", |
9311 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
9312 | 14 | NULL, HFILL }}, |
9313 | 14 | }; |
9314 | | |
9315 | 14 | static int *ett[] = { |
9316 | 14 | &ett_ndps, |
9317 | 14 | &ett_ndps_segments, |
9318 | 14 | &ett_ndps_segment, |
9319 | 14 | }; |
9320 | | |
9321 | 14 | static ei_register_info ei[] = { |
9322 | 14 | { &ei_ndps_problem_type, { "ndps.problem_type.expert", PI_RESPONSE_CODE, PI_NOTE, "Fault", EXPFILL }}, |
9323 | 14 | { &ei_ndps_return_code, { "ndps.return_code.expert", PI_RESPONSE_CODE, PI_NOTE, "Fault", EXPFILL }}, |
9324 | 14 | { &ei_ndps_rpc_acc_stat, { "ndps.rpc_acc_stat.expert", PI_RESPONSE_CODE, PI_NOTE, "Fault", EXPFILL }}, |
9325 | 14 | { &ei_ndps_truncated, { "ndps.truncated", PI_PROTOCOL, PI_WARN, "Truncated", EXPFILL }}, |
9326 | 14 | }; |
9327 | | |
9328 | 14 | module_t *ndps_module; |
9329 | 14 | expert_module_t* expert_ndps; |
9330 | | |
9331 | 14 | proto_ndps = proto_register_protocol("Novell Distributed Print System", "NDPS", "ndps"); |
9332 | 14 | proto_register_field_array(proto_ndps, hf_ndps, array_length(hf_ndps)); |
9333 | 14 | proto_register_subtree_array(ett, array_length(ett)); |
9334 | 14 | expert_ndps = expert_register_protocol(proto_ndps); |
9335 | 14 | expert_register_field_array(expert_ndps, ei, array_length(ei)); |
9336 | | |
9337 | 14 | ndps_handle = register_dissector("ndps.ipx", dissect_ndps_ipx, proto_ndps); |
9338 | 14 | ndps_tcp_handle = register_dissector("ndps.tcp", dissect_ndps_tcp, proto_ndps); |
9339 | | |
9340 | 14 | ndps_module = prefs_register_protocol(proto_ndps, NULL); |
9341 | 14 | prefs_register_bool_preference(ndps_module, "desegment_tcp", |
9342 | 14 | "Reassemble NDPS messages spanning multiple TCP segments", |
9343 | 14 | "Whether the NDPS dissector should reassemble messages spanning multiple TCP segments." |
9344 | 14 | " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", |
9345 | 14 | &ndps_desegment); |
9346 | 14 | prefs_register_bool_preference(ndps_module, "desegment_spx", |
9347 | 14 | "Reassemble fragmented NDPS messages spanning multiple SPX packets", |
9348 | 14 | "Whether the NDPS dissector should reassemble fragmented NDPS messages spanning multiple SPX packets", |
9349 | 14 | &ndps_defragment); |
9350 | 14 | prefs_register_bool_preference(ndps_module, "show_oid", |
9351 | 14 | "Display NDPS Details", |
9352 | 14 | "Whether or not the NDPS dissector should show object id's and other details", |
9353 | 14 | &ndps_show_oids); |
9354 | | |
9355 | 14 | reassembly_table_register(&ndps_reassembly_table, |
9356 | 14 | &addresses_reassembly_table_functions); |
9357 | | |
9358 | 14 | ndps_req_hash = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), ndps_hash, ndps_equal); |
9359 | 14 | } |
9360 | | |
9361 | | void |
9362 | | proto_reg_handoff_ndps(void) |
9363 | 14 | { |
9364 | 14 | dissector_add_uint("spx.socket", SPX_SOCKET_PA, ndps_handle); |
9365 | 14 | dissector_add_uint("spx.socket", SPX_SOCKET_BROKER, ndps_handle); |
9366 | 14 | dissector_add_uint("spx.socket", SPX_SOCKET_SRS, ndps_handle); |
9367 | 14 | dissector_add_uint("spx.socket", SPX_SOCKET_ENS, ndps_handle); |
9368 | 14 | dissector_add_uint("spx.socket", SPX_SOCKET_RMS, ndps_handle); |
9369 | 14 | dissector_add_uint("spx.socket", SPX_SOCKET_NOTIFY_LISTENER, ndps_handle); |
9370 | 14 | dissector_add_uint_range_with_preference("tcp.port", TCP_PORT_RANGE, ndps_tcp_handle); |
9371 | 14 | } |
9372 | | |
9373 | | /* |
9374 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
9375 | | * |
9376 | | * Local variables: |
9377 | | * c-basic-offset: 4 |
9378 | | * tab-width: 8 |
9379 | | * indent-tabs-mode: nil |
9380 | | * End: |
9381 | | * |
9382 | | * vi: set shiftwidth=4 tabstop=8 expandtab: |
9383 | | * :indentSize=4:tabSize=8:noTabs=true: |
9384 | | */ |