1 /* packet-dcerpc-pn-io.c
2 * Routines for PROFINET IO dissection.
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * The PN-IO protocol is a field bus protocol related to decentralized
25 * periphery and is developed by the PROFIBUS Nutzerorganisation e.V. (PNO),
26 * see: www.profibus.com
29 * PN-IO is based on the common DCE-RPC and the "lightweight" PN-RT
30 * (ethernet type 0x8892) protocols.
32 * The context manager (CM) part is handling context information
33 * (like establishing, ...) and is using DCE-RPC as its underlying
36 * The actual cyclic data transfer and acyclic notification uses the
37 * "lightweight" PN-RT protocol.
39 * There are some other related PROFINET protocols (e.g. PN-DCP, which is
40 * handling addressing topics).
42 * Please note: the PROFINET CBA protocol is independent of the PN-IO protocol!
46 * Cyclic PNIO RTC1 Data Dissection:
48 * To dissect cyclic PNIO RTC1 frames, this plug-in has to collect important module
49 * information out of "Ident OK", "Connect Request" and "Write Response"
50 * frames first. This information will be used within "packet-pn-rtc-one.c" to
51 * dissect PNIO and PROFIsafe RTC1 frames.
53 * The data of Stationname-, -type and -id will be gained out of
54 * packet-pn-dcp.c. The header packet-pn.h will save those data.
56 * Overview for cyclic PNIO RTC1 data dissection functions:
57 * -> dissect_IOCRBlockReq_block (Save amount of IODataObjects, IOCS)
58 * -> dissect_DataDescription (Save important values for cyclic data)
59 * -> dissect_ExpectedSubmoduleBlockReq_block (Get GSD information)
60 * -> dissect_ModuleDiffBlock_block (Module has different ID)
61 * -> dissect_ProfiSafeParameterRequest (Save PROFIsafe parameters)
62 * -> dissect_RecordDataWrite (Call ProfiSafeParameterRequest)
63 * -> pnio_rtc1_cleanup (Reset routine of saved RTC1 information)
72 #include <epan/packet.h>
73 #include <epan/to_str.h>
74 #include <epan/wmem/wmem.h>
75 #include <epan/dissectors/packet-dcerpc.h>
76 #include <epan/expert.h>
77 #include <epan/dissector_filters.h>
78 #include <epan/proto_data.h>
80 #include <wsutil/file_util.h>
81 #include <epan/prefs.h>
83 #include "packet-pn.h"
88 void proto_register_pn_io(void);
89 void proto_reg_handoff_pn_io(void);
92 #define MAX_NAMELENGTH 200 /* max. length of the given paths */
93 #define F_MESSAGE_TRAILER_4BYTE 4 /* PROFIsafe: Defines the Amount of Bytes for CRC and Status-/Controlbyte */
94 #define PN_INPUT_CR 1 /* PROFINET Input Connect Request value */
95 #define PN_INPUT_DATADESCRITPION 1 /* PROFINET Input Data Description value */
98 static int proto_pn_io = -1;
99 static int proto_pn_io_device = -1;
100 static int proto_pn_io_controller = -1;
101 static int proto_pn_io_supervisor = -1;
102 static int proto_pn_io_parameterserver = -1;
103 static int proto_pn_io_implicitar = -1;
104 int proto_pn_io_apdu_status = -1;
106 static int hf_pn_io_opnum = -1;
107 static int hf_pn_io_reserved16 = -1;
109 static int hf_pn_io_array = -1;
110 static int hf_pn_io_status = -1;
111 static int hf_pn_io_args_max = -1;
112 static int hf_pn_io_args_len = -1;
113 static int hf_pn_io_array_max_count = -1;
114 static int hf_pn_io_array_offset = -1;
115 static int hf_pn_io_array_act_count = -1;
117 static int hf_pn_io_ar_type = -1;
118 static int hf_pn_io_artype_req = -1;
119 static int hf_pn_io_cminitiator_macadd = -1;
120 static int hf_pn_io_cminitiator_objectuuid = -1;
121 static int hf_pn_io_parameter_server_objectuuid = -1;
122 static int hf_pn_io_ar_data = -1;
123 static int hf_pn_io_ar_properties = -1;
124 static int hf_pn_io_ar_properties_state = -1;
125 static int hf_pn_io_ar_properties_supervisor_takeover_allowed = -1;
126 static int hf_pn_io_ar_properties_parametrization_server = -1;
127 /* removed within 2.3
128 static int hf_pn_io_ar_properties_data_rate = -1;
130 static int hf_pn_io_ar_properties_reserved_1 = -1;
131 static int hf_pn_io_ar_properties_device_access = -1;
132 static int hf_pn_io_ar_properties_companion_ar = -1;
133 static int hf_pn_io_ar_properties_achnowledge_companion_ar = -1;
134 static int hf_pn_io_ar_properties_reserved = -1;
135 static int hf_pn_io_ar_properties_combined_object_container_with_legacy_startupmode = -1;
136 static int hf_pn_io_ar_properties_combined_object_container_with_advanced_startupmode = -1;
137 static int hf_pn_io_ar_properties_pull_module_alarm_allowed = -1;
139 static int hf_pn_RedundancyInfo = -1;
140 static int hf_pn_RedundancyInfo_reserved = -1;
141 static int hf_pn_io_number_of_ARDATAInfo = -1;
143 static int hf_pn_io_cminitiator_activitytimeoutfactor = -1;
144 static int hf_pn_io_cminitiator_udprtport = -1;
145 static int hf_pn_io_station_name_length = -1;
146 static int hf_pn_io_cminitiator_station_name = -1;
147 /* static int hf_pn_io_responder_station_name = -1; */
148 static int hf_pn_io_arproperties_StartupMode = -1;
150 static int hf_pn_io_parameter_server_station_name = -1;
152 static int hf_pn_io_cmresponder_macadd = -1;
153 static int hf_pn_io_cmresponder_udprtport = -1;
155 static int hf_pn_io_number_of_iocrs = -1;
156 static int hf_pn_io_iocr_tree = -1;
157 static int hf_pn_io_iocr_type = -1;
158 static int hf_pn_io_iocr_reference = -1;
159 static int hf_pn_io_iocr_SubframeOffset = -1;
160 static int hf_pn_io_iocr_SubframeData =-1;
161 /* static int hf_pn_io_iocr_txports_port = -1; */
162 /* static int hf_pn_io_iocr_txports_redundantport = -1; */
163 static int hf_pn_io_sr_properties_Reserved_1 = -1;
164 static int hf_pn_io_sr_properties_Mode = -1;
165 static int hf_pn_io_sr_properties_Reserved_2 = -1;
166 static int hf_pn_io_sr_properties_Reserved_3 = -1;
167 static int hf_pn_io_RedundancyDataHoldFactor = -1;
168 static int hf_pn_io_sr_properties = -1;
169 static int hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_0 = -1;
170 static int hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_1 = -1;
172 static int hf_pn_io_arvendor_strucidentifier_if0_low = -1;
173 static int hf_pn_io_arvendor_strucidentifier_if0_high = -1;
174 static int hf_pn_io_arvendor_strucidentifier_if0_is8000= -1;
175 static int hf_pn_io_arvendor_strucidentifier_not0 = -1;
177 static int hf_pn_io_lt = -1;
178 static int hf_pn_io_iocr_properties = -1;
179 static int hf_pn_io_iocr_properties_rtclass = -1;
180 static int hf_pn_io_iocr_properties_reserved_1 = -1;
181 static int hf_pn_io_iocr_properties_media_redundancy = -1;
182 static int hf_pn_io_iocr_properties_reserved_2 = -1;
183 static int hf_pn_io_iocr_properties_reserved_3 = -1;
184 static int hf_pn_io_iocr_properties_fast_forwarding_mac_adr = -1;
185 static int hf_pn_io_iocr_properties_distributed_subframe_watchdog = -1;
186 static int hf_pn_io_iocr_properties_full_subframe_structure = -1;
189 static int hf_pn_io_data_length = -1;
190 static int hf_pn_io_ir_frame_data = -1;
191 static int hf_pn_io_frame_id = -1;
192 static int hf_pn_io_send_clock_factor = -1;
193 static int hf_pn_io_reduction_ratio = -1;
194 static int hf_pn_io_phase = -1;
195 static int hf_pn_io_sequence = -1;
196 static int hf_pn_io_frame_send_offset = -1;
197 static int hf_pn_io_frame_data_properties = -1;
198 static int hf_pn_io_frame_data_properties_forwarding_Mode = -1;
199 static int hf_pn_io_frame_data_properties_FastForwardingMulticastMACAdd = -1;
200 static int hf_pn_io_frame_data_properties_FragmentMode = -1;
201 static int hf_pn_io_frame_data_properties_reserved_1 = -1;
202 static int hf_pn_io_frame_data_properties_reserved_2 = -1;
203 static int hf_pn_io_watchdog_factor = -1;
204 static int hf_pn_io_data_hold_factor = -1;
205 static int hf_pn_io_iocr_tag_header = -1;
206 static int hf_pn_io_iocr_multicast_mac_add = -1;
207 static int hf_pn_io_number_of_apis = -1;
208 static int hf_pn_io_number_of_io_data_objects = -1;
209 static int hf_pn_io_io_data_object_frame_offset = -1;
210 static int hf_pn_io_number_of_iocs = -1;
211 static int hf_pn_io_iocs_frame_offset = -1;
213 static int hf_pn_io_SFIOCRProperties = -1;
214 static int hf_pn_io_DistributedWatchDogFactor = -1;
215 static int hf_pn_io_RestartFactorForDistributedWD = -1;
216 static int hf_pn_io_SFIOCRProperties_DFPmode = -1;
217 static int hf_pn_io_SFIOCRProperties_reserved_1 = -1;
218 static int hf_pn_io_SFIOCRProperties_reserved_2 = -1;
219 static int hf_pn_io_SFIOCRProperties_DFPType =-1;
220 static int hf_pn_io_SFIOCRProperties_DFPRedundantPathLayout = -1;
221 static int hf_pn_io_SFIOCRProperties_SFCRC16 = -1;
223 static int hf_pn_io_subframe_data = -1;
224 static int hf_pn_io_subframe_data_reserved1 = -1;
225 static int hf_pn_io_subframe_data_reserved2 = -1;
227 static int hf_pn_io_subframe_data_position = -1;
228 static int hf_pn_io_subframe_reserved1 = -1;
229 static int hf_pn_io_subframe_data_length = -1;
230 static int hf_pn_io_subframe_reserved2 = -1;
232 static int hf_pn_io_alarmcr_type = -1;
233 static int hf_pn_io_alarmcr_properties = -1;
234 static int hf_pn_io_alarmcr_properties_priority = -1;
235 static int hf_pn_io_alarmcr_properties_transport = -1;
236 static int hf_pn_io_alarmcr_properties_reserved = -1;
238 static int hf_pn_io_rta_timeoutfactor = -1;
239 static int hf_pn_io_rta_retries = -1;
240 static int hf_pn_io_localalarmref = -1;
241 static int hf_pn_io_remotealarmref = -1;
242 static int hf_pn_io_maxalarmdatalength = -1;
243 static int hf_pn_io_alarmcr_tagheaderhigh = -1;
244 static int hf_pn_io_alarmcr_tagheaderlow = -1;
246 static int hf_pn_io_IRData_uuid = -1;
247 static int hf_pn_io_ar_uuid = -1;
248 static int hf_pn_io_target_ar_uuid = -1;
249 static int hf_pn_io_ar_discriminator = -1;
250 static int hf_pn_io_ar_configid = -1;
251 static int hf_pn_io_ar_arnumber = -1;
252 static int hf_pn_io_ar_arresource = -1;
253 static int hf_pn_io_ar_arreserved = -1;
254 static int hf_pn_io_ar_selector = -1;
255 static int hf_pn_io_api_tree = -1;
256 static int hf_pn_io_module_tree = -1;
257 static int hf_pn_io_submodule_tree = -1;
258 static int hf_pn_io_io_data_object = -1;
259 /* General module information */
260 static int hf_pn_io_io_cs = -1;
262 static int hf_pn_io_substitutionmode = -1;
264 static int hf_pn_io_api = -1;
265 static int hf_pn_io_slot_nr = -1;
266 static int hf_pn_io_subslot_nr = -1;
267 static int hf_pn_io_index = -1;
268 static int hf_pn_io_seq_number = -1;
269 static int hf_pn_io_record_data_length = -1;
270 static int hf_pn_io_add_val1 = -1;
271 static int hf_pn_io_add_val2 = -1;
273 static int hf_pn_io_block = -1;
274 static int hf_pn_io_block_header = -1;
275 static int hf_pn_io_block_type = -1;
276 static int hf_pn_io_block_length = -1;
277 static int hf_pn_io_block_version_high = -1;
278 static int hf_pn_io_block_version_low = -1;
280 static int hf_pn_io_sessionkey = -1;
281 static int hf_pn_io_control_command = -1;
282 static int hf_pn_io_control_command_prmend = -1;
283 static int hf_pn_io_control_command_applready = -1;
284 static int hf_pn_io_control_command_release = -1;
285 static int hf_pn_io_control_command_done = -1;
286 static int hf_pn_io_control_command_ready_for_companion = -1;
287 static int hf_pn_io_control_command_ready_for_rt_class3 = -1;
288 static int hf_pn_io_control_command_prmbegin = -1;
289 static int hf_pn_io_control_command_reserved_7_15 = -1;
290 static int hf_pn_io_control_block_properties = -1;
291 static int hf_pn_io_control_block_properties_applready = -1;
292 static int hf_pn_io_control_block_properties_applready0 = -1;
294 /* static int hf_pn_io_AlarmSequenceNumber = -1; */
295 static int hf_pn_io_control_command_reserved = -1;
296 static int hf_pn_io_SubmoduleListEntries = -1;
297 static int hf_pn_io_error_code = -1;
298 static int hf_pn_io_error_decode = -1;
299 static int hf_pn_io_error_code1 = -1;
300 static int hf_pn_io_error_code1_pniorw = -1;
301 static int hf_pn_io_error_code1_pnio = -1;
302 static int hf_pn_io_error_code2 = -1;
303 static int hf_pn_io_error_code2_pniorw = -1;
304 static int hf_pn_io_error_code2_pnio_1 = -1;
305 static int hf_pn_io_error_code2_pnio_2 = -1;
306 static int hf_pn_io_error_code2_pnio_3 = -1;
307 static int hf_pn_io_error_code2_pnio_4 = -1;
308 static int hf_pn_io_error_code2_pnio_5 = -1;
309 static int hf_pn_io_error_code2_pnio_6 = -1;
310 static int hf_pn_io_error_code2_pnio_7 = -1;
311 static int hf_pn_io_error_code2_pnio_8 = -1;
312 static int hf_pn_io_error_code2_pnio_13 = -1;
313 static int hf_pn_io_error_code2_pnio_20 = -1;
314 static int hf_pn_io_error_code2_pnio_21 = -1;
315 static int hf_pn_io_error_code2_pnio_22 = -1;
316 static int hf_pn_io_error_code2_pnio_23 = -1;
317 static int hf_pn_io_error_code2_pnio_40 = -1;
318 static int hf_pn_io_error_code2_pnio_60 = -1;
319 static int hf_pn_io_error_code2_pnio_61 = -1;
320 static int hf_pn_io_error_code2_pnio_62 = -1;
321 static int hf_pn_io_error_code2_pnio_63 = -1;
322 static int hf_pn_io_error_code2_pnio_64 = -1;
323 static int hf_pn_io_error_code2_pnio_65 = -1;
324 static int hf_pn_io_error_code2_pnio_66 = -1;
325 static int hf_pn_io_error_code2_pnio_70 = -1;
326 static int hf_pn_io_error_code2_pnio_71 = -1;
327 static int hf_pn_io_error_code2_pnio_72 = -1;
328 static int hf_pn_io_error_code2_pnio_73 = -1;
329 static int hf_pn_io_error_code2_pnio_74 = -1;
330 static int hf_pn_io_error_code2_pnio_75 = -1;
331 static int hf_pn_io_error_code2_pnio_76 = -1;
332 static int hf_pn_io_error_code2_pnio_77 = -1;
333 static int hf_pn_io_error_code2_pnio_253 = -1;
334 static int hf_pn_io_error_code2_pnio_255 = -1;
336 static int hf_pn_io_alarm_type = -1;
337 static int hf_pn_io_alarm_specifier = -1;
338 static int hf_pn_io_alarm_specifier_sequence = -1;
339 static int hf_pn_io_alarm_specifier_channel = -1;
340 static int hf_pn_io_alarm_specifier_manufacturer = -1;
341 static int hf_pn_io_alarm_specifier_submodule = -1;
342 static int hf_pn_io_alarm_specifier_ardiagnosis = -1;
344 static int hf_pn_io_alarm_dst_endpoint = -1;
345 static int hf_pn_io_alarm_src_endpoint = -1;
346 static int hf_pn_io_pdu_type = -1;
347 static int hf_pn_io_pdu_type_type = -1;
348 static int hf_pn_io_pdu_type_version = -1;
349 static int hf_pn_io_add_flags = -1;
350 static int hf_pn_io_window_size = -1;
351 static int hf_pn_io_tack = -1;
352 static int hf_pn_io_send_seq_num = -1;
353 static int hf_pn_io_ack_seq_num = -1;
354 static int hf_pn_io_var_part_len = -1;
356 static int hf_pn_io_number_of_modules = -1;
357 static int hf_pn_io_module_ident_number = -1;
358 static int hf_pn_io_module_properties = -1;
359 static int hf_pn_io_module_state = -1;
360 static int hf_pn_io_number_of_submodules = -1;
361 static int hf_pn_io_submodule_ident_number = -1;
362 static int hf_pn_io_submodule_properties = -1;
363 static int hf_pn_io_submodule_properties_type = -1;
364 static int hf_pn_io_submodule_properties_shared_input = -1;
365 static int hf_pn_io_submodule_properties_reduce_input_submodule_data_length = -1;
366 static int hf_pn_io_submodule_properties_reduce_output_submodule_data_length = -1;
367 static int hf_pn_io_submodule_properties_discard_ioxs = -1;
368 static int hf_pn_io_submodule_properties_reserved = -1;
370 static int hf_pn_io_submodule_state = -1;
371 static int hf_pn_io_submodule_state_format_indicator = -1;
372 static int hf_pn_io_submodule_state_add_info = -1;
373 static int hf_pn_io_submodule_state_qualified_info = -1;
374 static int hf_pn_io_submodule_state_maintenance_required = -1;
375 static int hf_pn_io_submodule_state_maintenance_demanded = -1;
376 static int hf_pn_io_submodule_state_diag_info = -1;
377 static int hf_pn_io_submodule_state_ar_info = -1;
378 static int hf_pn_io_submodule_state_ident_info = -1;
379 static int hf_pn_io_submodule_state_detail = -1;
381 static int hf_pn_io_data_description_tree = -1;
382 static int hf_pn_io_data_description = -1;
383 static int hf_pn_io_submodule_data_length = -1;
384 static int hf_pn_io_length_iocs = -1;
385 static int hf_pn_io_length_iops = -1;
387 static int hf_pn_io_iocs = -1;
388 static int hf_pn_io_iops = -1;
389 static int hf_pn_io_ioxs_extension = -1;
390 static int hf_pn_io_ioxs_res14 = -1;
391 static int hf_pn_io_ioxs_instance = -1;
392 static int hf_pn_io_ioxs_datastate = -1;
394 static int hf_pn_io_address_resolution_properties = -1;
395 static int hf_pn_io_mci_timeout_factor = -1;
396 static int hf_pn_io_provider_station_name = -1;
398 static int hf_pn_io_user_structure_identifier = -1;
399 static int hf_pn_io_user_structure_identifier_manf = -1;
401 static int hf_pn_io_channel_number = -1;
402 static int hf_pn_io_channel_properties = -1;
403 static int hf_pn_io_channel_properties_type = -1;
404 static int hf_pn_io_channel_properties_accumulative = -1;
405 static int hf_pn_io_channel_properties_maintenance = -1;
408 static int hf_pn_io_NumberOfSubframeBlocks = -1;
409 static int hf_pn_io_channel_properties_specifier = -1;
410 static int hf_pn_io_channel_properties_direction = -1;
412 static int hf_pn_io_channel_error_type = -1;
413 static int hf_pn_io_ext_channel_error_type0 = -1;
414 static int hf_pn_io_ext_channel_error_type0x8000 = -1;
415 static int hf_pn_io_ext_channel_error_type0x8001 = -1;
416 static int hf_pn_io_ext_channel_error_type0x8002 = -1;
417 static int hf_pn_io_ext_channel_error_type0x8003 = -1;
418 static int hf_pn_io_ext_channel_error_type0x8004 = -1;
419 static int hf_pn_io_ext_channel_error_type0x8005 = -1;
420 static int hf_pn_io_ext_channel_error_type0x8007 = -1;
421 static int hf_pn_io_ext_channel_error_type0x8008 = -1;
422 static int hf_pn_io_ext_channel_error_type0x800A = -1;
423 static int hf_pn_io_ext_channel_error_type0x800B = -1;
424 static int hf_pn_io_ext_channel_error_type0x800C = -1;
426 static int hf_pn_io_ext_channel_error_type = -1;
428 static int hf_pn_io_ext_channel_add_value = -1;
430 static int hf_pn_io_ptcp_subdomain_id = -1;
431 static int hf_pn_io_ir_data_id = -1;
432 static int hf_pn_io_max_bridge_delay = -1;
433 static int hf_pn_io_number_of_ports = -1;
434 static int hf_pn_io_max_port_tx_delay = -1;
435 static int hf_pn_io_max_port_rx_delay = -1;
437 static int hf_pn_io_max_line_rx_delay = -1;
438 static int hf_pn_io_yellowtime = -1;
439 static int hf_pn_io_reserved_interval_begin = -1;
440 static int hf_pn_io_reserved_interval_end = -1;
441 static int hf_pn_io_pllwindow = -1;
442 static int hf_pn_io_sync_send_factor = -1;
443 static int hf_pn_io_sync_properties = -1;
444 static int hf_pn_io_sync_frame_address = -1;
445 static int hf_pn_io_ptcp_timeout_factor = -1;
446 static int hf_pn_io_ptcp_takeover_timeout_factor = -1;
447 static int hf_pn_io_ptcp_master_startup_time = -1;
448 static int hf_pn_io_ptcp_master_priority_1 = -1;
449 static int hf_pn_io_ptcp_master_priority_2 = -1;
450 static int hf_pn_io_ptcp_length_subdomain_name = -1;
451 static int hf_pn_io_ptcp_subdomain_name = -1;
453 static int hf_pn_io_MultipleInterfaceMode_NameOfDevice = -1;
454 static int hf_pn_io_MultipleInterfaceMode_reserved_1 = -1;
455 static int hf_pn_io_MultipleInterfaceMode_reserved_2 = -1;
456 /* added Portstatistics */
457 static int hf_pn_io_pdportstatistic_counter_status = -1;
458 static int hf_pn_io_pdportstatistic_counter_status_ifInOctets = -1;
459 static int hf_pn_io_pdportstatistic_counter_status_ifOutOctets = -1;
460 static int hf_pn_io_pdportstatistic_counter_status_ifInDiscards = -1;
461 static int hf_pn_io_pdportstatistic_counter_status_ifOutDiscards = -1;
462 static int hf_pn_io_pdportstatistic_counter_status_ifInErrors = -1;
463 static int hf_pn_io_pdportstatistic_counter_status_ifOutErrors = -1;
464 static int hf_pn_io_pdportstatistic_counter_status_reserved = -1;
465 static int hf_pn_io_pdportstatistic_ifInOctets = -1;
466 static int hf_pn_io_pdportstatistic_ifOutOctets = -1;
467 static int hf_pn_io_pdportstatistic_ifInDiscards = -1;
468 static int hf_pn_io_pdportstatistic_ifOutDiscards = -1;
469 static int hf_pn_io_pdportstatistic_ifInErrors = -1;
470 static int hf_pn_io_pdportstatistic_ifOutErrors = -1;
471 /* end of port statistics */
473 static int hf_pn_io_domain_boundary = -1;
474 static int hf_pn_io_domain_boundary_ingress = -1;
475 static int hf_pn_io_domain_boundary_egress = -1;
476 static int hf_pn_io_multicast_boundary = -1;
477 static int hf_pn_io_adjust_properties = -1;
478 static int hf_pn_io_PreambleLength = -1;
479 static int hf_pn_io_mau_type = -1;
480 static int hf_pn_io_mau_type_mode = -1;
481 static int hf_pn_io_port_state = -1;
482 static int hf_pn_io_line_delay = -1;
483 static int hf_pn_io_line_delay_value = -1;
484 static int hf_pn_io_cable_delay_value = -1;
485 static int hf_pn_io_line_delay_format_indicator = -1;
486 static int hf_pn_io_number_of_peers = -1;
487 static int hf_pn_io_length_peer_port_id = -1;
488 static int hf_pn_io_peer_port_id = -1;
489 static int hf_pn_io_length_peer_chassis_id = -1;
490 static int hf_pn_io_peer_chassis_id = -1;
491 static int hf_pn_io_length_own_port_id = -1;
492 static int hf_pn_io_own_port_id = -1;
493 static int hf_pn_io_peer_macadd = -1;
494 static int hf_pn_io_media_type = -1;
495 static int hf_pn_io_macadd = -1;
496 static int hf_pn_io_length_own_chassis_id = -1;
497 static int hf_pn_io_own_chassis_id = -1;
499 static int hf_pn_io_ethertype = -1;
500 static int hf_pn_io_rx_port = -1;
501 static int hf_pn_io_frame_details = -1;
502 static int hf_pn_io_frame_details_sync_frame = -1;
503 static int hf_pn_io_frame_details_meaning_frame_send_offset = -1;
504 static int hf_pn_io_frame_details_reserved = -1;
505 static int hf_pn_io_nr_of_tx_port_groups = -1;
506 static int hf_pn_io_TxPortGroupProperties = -1;
507 static int hf_pn_io_TxPortGroupProperties_bit0 = -1;
508 static int hf_pn_io_TxPortGroupProperties_bit1 = -1;
509 static int hf_pn_io_TxPortGroupProperties_bit2 = -1;
510 static int hf_pn_io_TxPortGroupProperties_bit3 = -1;
511 static int hf_pn_io_TxPortGroupProperties_bit4 = -1;
512 static int hf_pn_io_TxPortGroupProperties_bit5 = -1;
513 static int hf_pn_io_TxPortGroupProperties_bit6 = -1;
514 static int hf_pn_io_TxPortGroupProperties_bit7 = -1;
516 static int hf_pn_io_start_of_red_frame_id = -1;
517 static int hf_pn_io_end_of_red_frame_id = -1;
518 static int hf_pn_io_ir_begin_end_port = -1;
519 static int hf_pn_io_number_of_assignments = -1;
520 static int hf_pn_io_number_of_phases = -1;
521 static int hf_pn_io_red_orange_period_begin_tx = -1;
522 static int hf_pn_io_orange_period_begin_tx = -1;
523 static int hf_pn_io_green_period_begin_tx = -1;
524 static int hf_pn_io_red_orange_period_begin_rx = -1;
525 static int hf_pn_io_orange_period_begin_rx = -1;
526 static int hf_pn_io_green_period_begin_rx = -1;
527 /* static int hf_pn_io_tx_phase_assignment = -1; */
528 static int hf_pn_ir_tx_phase_assignment = -1;
529 static int hf_pn_ir_rx_phase_assignment = -1;
530 static int hf_pn_io_tx_phase_assignment_begin_value = -1;
531 static int hf_pn_io_tx_phase_assignment_orange_begin = -1;
532 static int hf_pn_io_tx_phase_assignment_end_reserved = -1;
533 static int hf_pn_io_tx_phase_assignment_reserved = -1;
534 /* static int hf_pn_io_rx_phase_assignment = -1; */
536 static int hf_pn_io_slot = -1;
537 static int hf_pn_io_subslot = -1;
538 static int hf_pn_io_number_of_slots = -1;
539 static int hf_pn_io_number_of_subslots = -1;
541 /* static int hf_pn_io_maintenance_required_drop_budget = -1; */
542 /* static int hf_pn_io_maintenance_demanded_drop_budget = -1; */
543 /* static int hf_pn_io_error_drop_budget = -1; */
545 static int hf_pn_io_maintenance_required_power_budget = -1;
546 static int hf_pn_io_maintenance_demanded_power_budget = -1;
547 static int hf_pn_io_error_power_budget = -1;
549 static int hf_pn_io_fiber_optic_type = -1;
550 static int hf_pn_io_fiber_optic_cable_type = -1;
552 static int hf_pn_io_controller_appl_cycle_factor = -1;
553 static int hf_pn_io_time_data_cycle = -1;
554 static int hf_pn_io_time_io_input = -1;
555 static int hf_pn_io_time_io_output = -1;
556 static int hf_pn_io_time_io_input_valid = -1;
557 static int hf_pn_io_time_io_output_valid = -1;
559 static int hf_pn_io_maintenance_status = -1;
560 static int hf_pn_io_maintenance_status_required = -1;
561 static int hf_pn_io_maintenance_status_demanded = -1;
563 static int hf_pn_io_vendor_id_high = -1;
564 static int hf_pn_io_vendor_id_low = -1;
565 static int hf_pn_io_vendor_block_type = -1;
566 static int hf_pn_io_order_id = -1;
567 static int hf_pn_io_im_serial_number = -1;
568 static int hf_pn_io_im_hardware_revision = -1;
569 static int hf_pn_io_im_revision_prefix = -1;
570 static int hf_pn_io_im_sw_revision_functional_enhancement = -1;
571 static int hf_pn_io_im_revision_bugfix = -1;
572 static int hf_pn_io_im_sw_revision_internal_change = -1;
573 static int hf_pn_io_im_revision_counter = -1;
574 static int hf_pn_io_im_profile_id = -1;
575 static int hf_pn_io_im_profile_specific_type = -1;
576 static int hf_pn_io_im_version_major = -1;
577 static int hf_pn_io_im_version_minor = -1;
578 static int hf_pn_io_im_supported = -1;
579 static int hf_pn_io_im_numberofentries = -1;
580 static int hf_pn_io_im_annotation = -1;
581 static int hf_pn_io_im_order_id = -1;
583 static int hf_pn_io_number_of_ars = -1;
585 static int hf_pn_io_cycle_counter = -1;
586 static int hf_pn_io_data_status = -1;
587 static int hf_pn_io_data_status_res67 = -1;
588 static int hf_pn_io_data_status_ok = -1;
589 static int hf_pn_io_data_status_operate = -1;
590 static int hf_pn_io_data_status_res3 = -1;
591 static int hf_pn_io_data_status_valid = -1;
592 static int hf_pn_io_data_status_res1 = -1;
593 static int hf_pn_io_data_status_primary = -1;
594 static int hf_pn_io_transfer_status = -1;
596 static int hf_pn_io_actual_local_time_stamp = -1;
597 static int hf_pn_io_number_of_log_entries = -1;
598 static int hf_pn_io_local_time_stamp = -1;
599 static int hf_pn_io_entry_detail = -1;
601 static int hf_pn_io_ip_address = -1;
602 static int hf_pn_io_subnetmask = -1;
603 static int hf_pn_io_standard_gateway = -1;
605 static int hf_pn_io_mrp_domain_uuid = -1;
606 static int hf_pn_io_mrp_role = -1;
607 static int hf_pn_io_mrp_length_domain_name = -1;
608 static int hf_pn_io_mrp_domain_name = -1;
609 static int hf_pn_io_mrp_instances = -1;
610 static int hf_pn_io_mrp_instance = -1;
612 static int hf_pn_io_mrp_prio = -1;
613 static int hf_pn_io_mrp_topchgt = -1;
614 static int hf_pn_io_mrp_topnrmax = -1;
615 static int hf_pn_io_mrp_tstshortt = -1;
616 static int hf_pn_io_mrp_tstdefaultt = -1;
617 static int hf_pn_io_mrp_tstnrmax = -1;
618 static int hf_pn_io_mrp_check = -1;
619 static int hf_pn_io_mrp_check_mrm = -1;
620 static int hf_pn_io_mrp_check_mrpdomain = -1;
621 static int hf_pn_io_mrp_check_reserved_1 = -1;
622 static int hf_pn_io_mrp_check_reserved_2 = -1;
624 static int hf_pn_io_mrp_rtmode = -1;
625 static int hf_pn_io_mrp_rtmode_rtclass12 = -1;
626 static int hf_pn_io_mrp_rtmode_rtclass3 = -1;
627 static int hf_pn_io_mrp_rtmode_reserved1 = -1;
628 static int hf_pn_io_mrp_rtmode_reserved2 = -1;
630 static int hf_pn_io_mrp_lnkdownt = -1;
631 static int hf_pn_io_mrp_lnkupt = -1;
632 static int hf_pn_io_mrp_lnknrmax = -1;
633 static int hf_pn_io_mrp_version = -1;
635 static int hf_pn_io_substitute_active_flag = -1;
636 static int hf_pn_io_length_data = -1;
638 static int hf_pn_io_mrp_ring_state = -1;
639 static int hf_pn_io_mrp_rt_state = -1;
641 static int hf_pn_io_im_tag_function = -1;
642 static int hf_pn_io_im_tag_location = -1;
643 static int hf_pn_io_im_date = -1;
644 static int hf_pn_io_im_descriptor = -1;
646 static int hf_pn_io_fs_hello_mode = -1;
647 static int hf_pn_io_fs_hello_interval = -1;
648 static int hf_pn_io_fs_hello_retry = -1;
649 static int hf_pn_io_fs_hello_delay = -1;
651 static int hf_pn_io_fs_parameter_mode = -1;
652 static int hf_pn_io_fs_parameter_uuid = -1;
655 static int hf_pn_io_check_sync_mode = -1;
656 static int hf_pn_io_check_sync_mode_reserved = -1;
657 static int hf_pn_io_check_sync_mode_sync_master = -1;
658 static int hf_pn_io_check_sync_mode_cable_delay = -1;
660 /* PROFIsafe fParameters */
661 static int hf_pn_io_ps_f_prm_flag1 = -1;
662 static int hf_pn_io_ps_f_prm_flag1_chck_seq = -1;
663 static int hf_pn_io_ps_f_prm_flag1_chck_ipar = -1;
664 static int hf_pn_io_ps_f_prm_flag1_sil = -1;
665 static int hf_pn_io_ps_f_prm_flag1_crc_len = -1;
666 static int hf_pn_io_ps_f_prm_flag1_crc_seed = -1;
667 static int hf_pn_io_ps_f_prm_flag1_reserved = -1;
668 static int hf_pn_io_ps_f_prm_flag2 = -1;
669 static int hf_pn_io_ps_f_wd_time = -1;
670 static int hf_pn_io_ps_f_ipar_crc = -1;
671 static int hf_pn_io_ps_f_par_crc = -1;
672 static int hf_pn_io_ps_f_src_adr = -1;
673 static int hf_pn_io_ps_f_dest_adr = -1;
674 static int hf_pn_io_ps_f_prm_flag2_reserved = -1;
675 static int hf_pn_io_ps_f_prm_flag2_f_block_id = -1;
676 static int hf_pn_io_ps_f_prm_flag2_f_par_version = -1;
678 static int hf_pn_io_profidrive_request_reference = -1;
679 static int hf_pn_io_profidrive_request_id = -1;
680 static int hf_pn_io_profidrive_do_id = -1;
681 static int hf_pn_io_profidrive_no_of_parameters = -1;
682 static int hf_pn_io_profidrive_response_id = -1;
683 static int hf_pn_io_profidrive_param_attribute = -1;
684 static int hf_pn_io_profidrive_param_no_of_elems = -1;
685 static int hf_pn_io_profidrive_param_number = -1;
686 static int hf_pn_io_profidrive_param_subindex = -1;
687 static int hf_pn_io_profidrive_param_format = -1;
688 static int hf_pn_io_profidrive_param_no_of_values = -1;
689 static int hf_pn_io_profidrive_param_value_byte = -1;
690 static int hf_pn_io_profidrive_param_value_word = -1;
691 static int hf_pn_io_profidrive_param_value_dword = -1;
692 static int hf_pn_io_profidrive_param_value_float = -1;
693 static int hf_pn_io_profidrive_param_value_string = -1;
695 /* Sequence of Events - Reporting System Alarm/Event Information */
696 static int hf_pn_io_rs_alarm_info_reserved_0_7 = -1;
697 static int hf_pn_io_rs_alarm_info_reserved_8_15 = -1;
698 static int hf_pn_io_rs_alarm_info = -1;
699 static int hf_pn_io_rs_event_info = -1;
700 static int hf_pn_io_rs_event_block = -1;
701 static int hf_pn_io_rs_adjust_block = -1;
702 static int hf_pn_io_rs_event_data_extension = -1;
703 static int hf_pn_io_number_of_rs_event_info = -1;
704 static int hf_pn_io_rs_block_type = -1;
705 static int hf_pn_io_rs_block_length = -1;
706 static int hf_pn_io_rs_specifier = -1;
707 static int hf_pn_io_rs_specifier_sequence = -1;
708 static int hf_pn_io_rs_specifier_reserved = -1;
709 static int hf_pn_io_rs_specifier_specifier = -1;
710 static int hf_pn_io_rs_time_stamp = -1;
711 static int hf_pn_io_rs_time_stamp_status = -1;
712 static int hf_pn_io_rs_time_stamp_value = -1;
713 static int hf_pn_io_rs_minus_error = -1;
714 static int hf_pn_io_rs_plus_error = -1;
715 static int hf_pn_io_rs_extension_block_type = -1;
716 static int hf_pn_io_rs_extension_block_length = -1;
717 static int hf_pn_io_rs_reason_code = -1;
718 static int hf_pn_io_rs_reason_code_reason = -1;
719 static int hf_pn_io_rs_reason_code_detail = -1;
720 static int hf_pn_io_rs_domain_identification = -1;
721 static int hf_pn_io_rs_master_identification = -1;
722 static int hf_pn_io_soe_digital_input_current_value = -1;
723 static int hf_pn_io_soe_digital_input_current_value_value = -1;
724 static int hf_pn_io_soe_digital_input_current_value_reserved = -1;
725 static int hf_pn_io_am_device_identification = -1;
726 static int hf_pn_io_am_device_identification_device_sub_id = -1;
727 static int hf_pn_io_am_device_identification_device_id = -1;
728 static int hf_pn_io_am_device_identification_vendor_id = -1;
729 static int hf_pn_io_am_device_identification_organization = -1;
730 static int hf_pn_io_rs_adjust_info = -1;
731 static int hf_pn_io_soe_max_scan_delay = -1;
732 static int hf_pn_io_soe_adjust_specifier = -1;
733 static int hf_pn_io_soe_adjust_specifier_reserved = -1;
734 static int hf_pn_io_soe_adjust_specifier_incident = -1;
735 static int hf_pn_io_rs_properties = -1;
736 static int hf_pn_io_rs_properties_alarm_transport = -1;
737 static int hf_pn_io_rs_properties_reserved1 = -1;
738 static int hf_pn_io_rs_properties_reserved2 = -1;
740 static int hf_pn_io_asset_management_info = -1;
741 static int hf_pn_io_number_of_asset_management_info = -1;
742 static int hf_pn_io_im_uniqueidentifier = -1;
743 static int hf_pn_io_am_location_structure = -1;
744 static int hf_pn_io_am_location_level_0 = -1;
745 static int hf_pn_io_am_location_level_1 = -1;
746 static int hf_pn_io_am_location_level_2 = -1;
747 static int hf_pn_io_am_location_level_3 = -1;
748 static int hf_pn_io_am_location_level_4 = -1;
749 static int hf_pn_io_am_location_level_5 = -1;
750 static int hf_pn_io_am_location_level_6 = -1;
751 static int hf_pn_io_am_location_level_7 = -1;
752 static int hf_pn_io_am_location_level_8 = -1;
753 static int hf_pn_io_am_location_level_9 = -1;
754 static int hf_pn_io_am_location_level_10 = -1;
755 static int hf_pn_io_am_location_level_11 = -1;
756 static int hf_pn_io_am_location = -1;
757 static int hf_pn_io_am_location_reserved1 = -1;
758 static int hf_pn_io_am_location_reserved2 = -1;
759 static int hf_pn_io_am_location_reserved3 = -1;
760 static int hf_pn_io_am_location_reserved4 = -1;
761 static int hf_pn_io_am_software_revision = -1;
762 static int hf_pn_io_am_hardware_revision = -1;
763 static int hf_pn_io_am_type_identification = -1;
765 static int hf_pn_io_dcp_boundary_value = -1;
766 static int hf_pn_io_dcp_boundary_value_bit0 = -1;
767 static int hf_pn_io_dcp_boundary_value_bit1 = -1;
768 static int hf_pn_io_dcp_boundary_value_otherbits = -1;
770 static int hf_pn_io_peer_to_peer_boundary_value = -1;
771 static int hf_pn_io_peer_to_peer_boundary_value_bit0 = -1;
772 static int hf_pn_io_peer_to_peer_boundary_value_bit1 = -1;
773 static int hf_pn_io_peer_to_peer_boundary_value_bit2 = -1;
774 static int hf_pn_io_peer_to_peer_boundary_value_otherbits = -1;
776 static int hf_pn_io_mau_type_extension = -1;
778 /* static int hf_pn_io_packedframe_SFCRC = -1; */
779 static gint ett_pn_io = -1;
780 static gint ett_pn_io_block = -1;
781 static gint ett_pn_io_block_header = -1;
782 static gint ett_pn_io_status = -1;
783 static gint ett_pn_io_rtc = -1;
784 static gint ett_pn_io_rta = -1;
785 static gint ett_pn_io_pdu_type = -1;
786 static gint ett_pn_io_add_flags = -1;
787 static gint ett_pn_io_control_command = -1;
788 static gint ett_pn_io_ioxs = -1;
789 static gint ett_pn_io_api = -1;
790 static gint ett_pn_io_data_description = -1;
791 static gint ett_pn_io_module = -1;
792 static gint ett_pn_io_submodule = -1;
793 static gint ett_pn_io_io_data_object = -1;
794 static gint ett_pn_io_io_cs = -1;
795 static gint ett_pn_io_ar_properties = -1;
796 static gint ett_pn_io_iocr_properties = -1;
797 static gint ett_pn_io_submodule_properties = -1;
798 static gint ett_pn_io_alarmcr_properties = -1;
799 static gint ett_pn_io_submodule_state = -1;
800 static gint ett_pn_io_channel_properties = -1;
801 static gint ett_pn_io_slot = -1;
802 static gint ett_pn_io_subslot = -1;
803 static gint ett_pn_io_maintenance_status = -1;
804 static gint ett_pn_io_data_status = -1;
805 static gint ett_pn_io_iocr = -1;
806 static gint ett_pn_io_mrp_rtmode = -1;
807 static gint ett_pn_io_control_block_properties = -1;
808 static gint ett_pn_io_check_sync_mode = -1;
809 static gint ett_pn_io_ir_frame_data = -1;
810 static gint ett_pn_FrameDataProperties = -1;
811 static gint ett_pn_io_ar_info = -1;
812 static gint ett_pn_io_ar_data = -1;
813 static gint ett_pn_io_ir_begin_end_port = -1;
814 static gint ett_pn_io_ir_tx_phase = -1;
815 static gint ett_pn_io_ir_rx_phase = -1;
816 static gint ett_pn_io_subframe_data =-1;
817 static gint ett_pn_io_SFIOCRProperties = -1;
818 static gint ett_pn_io_frame_defails = -1;
819 static gint ett_pn_io_profisafe_f_parameter = -1;
820 static gint ett_pn_io_profisafe_f_parameter_prm_flag1 = -1;
821 static gint ett_pn_io_profisafe_f_parameter_prm_flag2 = -1;
822 static gint ett_pn_io_profidrive_parameter_request = -1;
823 static gint ett_pn_io_profidrive_parameter_response = -1;
824 static gint ett_pn_io_profidrive_parameter_address = -1;
825 static gint ett_pn_io_profidrive_parameter_value = -1;
826 static gint ett_pn_io_rs_alarm_info = -1;
827 static gint ett_pn_io_rs_event_info = -1;
828 static gint ett_pn_io_rs_event_block = -1;
829 static gint ett_pn_io_rs_adjust_block = -1;
830 static gint ett_pn_io_rs_event_data_extension = -1;
831 static gint ett_pn_io_rs_specifier = -1;
832 static gint ett_pn_io_rs_time_stamp = -1;
833 static gint ett_pn_io_am_device_identification = -1;
834 static gint ett_pn_io_rs_reason_code = -1;
835 static gint ett_pn_io_soe_digital_input_current_value = -1;
836 static gint ett_pn_io_rs_adjust_info = -1;
837 static gint ett_pn_io_soe_adjust_specifier = -1;
838 static gint ett_pn_io_sr_properties = -1;
839 static gint ett_pn_io_line_delay = -1;
840 static gint ett_pn_io_counter_status = -1;
842 static gint ett_pn_io_GroupProperties = -1;
844 static gint ett_pn_io_asset_management_info = -1;
845 static gint ett_pn_io_asset_management_block = -1;
846 static gint ett_pn_io_am_location = -1;
848 static gint ett_pn_io_dcp_boundary = -1;
849 static gint ett_pn_io_peer_to_peer_boundary = -1;
851 static gint ett_pn_io_mau_type_extension = -1;
853 #define PD_SUB_FRAME_BLOCK_FIOCR_PROPERTIES_LENGTH 4
854 #define PD_SUB_FRAME_BLOCK_FRAME_ID_LENGTH 2
855 #define PD_SUB_FRAME_BLOCK_SUB_FRAME_DATA_LENGTH 4
857 static expert_field ei_pn_io_block_version = EI_INIT;
858 static expert_field ei_pn_io_block_length = EI_INIT;
859 static expert_field ei_pn_io_unsupported = EI_INIT;
860 static expert_field ei_pn_io_error_code1 = EI_INIT;
861 static expert_field ei_pn_io_localalarmref = EI_INIT;
862 static expert_field ei_pn_io_mrp_instances = EI_INIT;
863 static expert_field ei_pn_io_error_code2 = EI_INIT;
864 static expert_field ei_pn_io_ar_info_not_found = EI_INIT;
865 static expert_field ei_pn_io_iocr_type = EI_INIT;
866 static expert_field ei_pn_io_frame_id = EI_INIT;
867 static expert_field ei_pn_io_nr_of_tx_port_groups = EI_INIT;
868 static expert_field ei_pn_io_max_recursion_depth_reached = EI_INIT;
870 static e_guid_t uuid_pn_io_device = { 0xDEA00001, 0x6C97, 0x11D1, { 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D } };
871 static guint16 ver_pn_io_device = 1;
873 static e_guid_t uuid_pn_io_controller = { 0xDEA00002, 0x6C97, 0x11D1, { 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D } };
874 static guint16 ver_pn_io_controller = 1;
876 static e_guid_t uuid_pn_io_supervisor = { 0xDEA00003, 0x6C97, 0x11D1, { 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D } };
877 static guint16 ver_pn_io_supervisor = 1;
879 static e_guid_t uuid_pn_io_parameterserver = { 0xDEA00004, 0x6C97, 0x11D1, { 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D } };
880 static guint16 ver_pn_io_parameterserver = 1;
882 /* According to specification:
883 * Value(UUID): 00000000-0000-0000-0000-000000000000
885 * Use: The value NIL indicates the usage of the implicit AR.
887 static e_guid_t uuid_pn_io_implicitar = { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } };
888 static guint16 ver_pn_io_implicitar = 1;
890 /* PNIO Preference Variables */
891 gboolean pnio_ps_selection = TRUE;
892 static const char *pnio_ps_networkpath = "";
895 /* Allow heuristic dissection */
896 static heur_dissector_list_t heur_pn_subdissector_list;
898 static const value_string pn_io_block_type[] = {
899 { 0x0000, "Reserved" },
900 { 0x0001, "Alarm Notification High"},
901 { 0x0002, "Alarm Notification Low"},
902 { 0x0008, "IODWriteReqHeader"},
903 { 0x8008, "IODWriteResHeader"},
904 { 0x0009, "IODReadReqHeader"},
905 { 0x8009, "IODReadResHeader"},
906 { 0x0010, "DiagnosisData"},
907 { 0x0011, "Reserved"},
908 { 0x0012, "ExpectedIdentificationData"},
909 { 0x0013, "RealIdentificationData"},
910 { 0x0014, "SubstituteValue"},
911 { 0x0015, "RecordInputDataObjectElement"},
912 { 0x0016, "RecordOutputDataObjectElement"},
913 { 0x0017, "reserved"},
915 { 0x0019, "LogData"},
916 { 0x001A, "APIData"},
917 { 0x001b, "SRLData"},
934 { 0x0030, "I&M0FilterDataSubmodul"},
935 { 0x0031, "I&M0FilterDataModul"},
936 { 0x0032, "I&M0FilterDataDevice"},
937 { 0x0033, "Reserved" },
938 { 0x0034, "I&M5Data"},
939 { 0x0035, "AssetManagementData"},
940 { 0x0036, "AM_FullInformation"},
941 { 0x0037, "AM_HardwareOnlyInformation"},
942 { 0x0038, "AM_FirmwareOnlyInformation" },
943 { 0x8001, "Alarm Ack High"},
944 { 0x8002, "Alarm Ack Low"},
945 { 0x0101, "ARBlockReq"},
946 { 0x8101, "ARBlockRes"},
947 { 0x0102, "IOCRBlockReq"},
948 { 0x8102, "IOCRBlockRes"},
949 { 0x0103, "AlarmCRBlockReq"},
950 { 0x8103, "AlarmCRBlockRes"},
951 { 0x0104, "ExpectedSubmoduleBlockReq"},
952 { 0x8104, "ModuleDiffBlock"},
953 { 0x0105, "PrmServerBlockReq"},
954 { 0x8105, "PrmServerBlockRes"},
955 { 0x0106, "MCRBlockReq"},
956 { 0x8106, "ARServerBlock"},
957 { 0x0107, "SubFrameBlock"},
958 { 0x0108, "ARVendorBlockReq"},
959 { 0x8108, "ARVendorBlockRes"},
960 { 0x0109, "IRInfoBlock"},
961 { 0x010A, "SRInfoBlock"},
962 { 0x010B, "ARFSUBlock"},
963 { 0x010C, "RSInfoBlock"},
964 { 0x0110, "IODControlReq Prm End.req"},
965 { 0x8110, "IODControlRes Prm End.rsp"},
966 { 0x0111, "IODControlReq Prm End.req"},
967 { 0x8111, "IODControlRes Prm End.rsp"},
968 { 0x0112, "IOXBlockReq Application Ready.req"},
969 { 0x8112, "IOXBlockRes Application Ready.rsp"},
970 { 0x0113, "IOXBlockReq Application Ready.req"},
971 { 0x8113, "IOXBlockRes Application Ready.rsp"},
972 { 0x0114, "IODReleaseReq"},
973 { 0x8114, "IODReleaseRes"},
974 { 0x0115, "ARRPCServerBlockReq"},
975 { 0x8115, "ARRPCServerBlockRes"},
976 { 0x0116, "IOXControlReq Ready for Companion.req"},
977 { 0x8116, "IOXControlRes Ready for Companion.rsp"},
978 { 0x0117, "IOXControlReq Ready for RT_CLASS_3.req"},
979 { 0x8117, "IOXControlRes Ready for RT_CLASS_3.rsp"},
980 { 0x0118, "ControlBlockPrmBegin"},
981 { 0x0119, "SubmoduleListBlock"},
982 { 0x8118, "ControlBlockPrmBeginRes"},
984 { 0x0200, "PDPortDataCheck"},
985 { 0x0201, "PDevData"},
986 { 0x0202, "PDPortDataAdjust"},
987 { 0x0203, "PDSyncData"},
988 { 0x0204, "IsochronousModeData"},
989 { 0x0205, "PDIRData"},
990 { 0x0206, "PDIRGlobalData"},
991 { 0x0207, "PDIRFrameData"},
992 { 0x0208, "PDIRBeginEndData"},
993 { 0x0209, "AdjustDomainBoundary"},
994 { 0x020A, "CheckPeers"},
995 { 0x020B, "CheckLineDelay"},
996 { 0x020C, "Checking MAUType"},
997 { 0x020E, "Adjusting MAUType"},
998 { 0x020F, "PDPortDataReal"},
999 { 0x0210, "AdjustMulticastBoundary"},
1000 { 0x0211, "PDInterfaceMrpDataAdjust"},
1001 { 0x0212, "PDInterfaceMrpDataReal"},
1002 { 0x0213, "PDInterfaceMrpDataCheck"},
1003 { 0x0214, "PDPortMrpDataAdjust"},
1004 { 0x0215, "PDPortMrpDataReal"},
1005 { 0x0216, "Media redundancy manager parameters"},
1006 { 0x0217, "Media redundancy client parameters"},
1007 { 0x0218, "Media redundancy RT mode for manager"},
1008 { 0x0219, "Media redundancy ring state data"},
1009 { 0x021A, "Media redundancy RT ring state data"},
1010 { 0x021B, "Adjust LinkState"},
1011 { 0x021C, "Checking LinkState"},
1012 { 0x021D, "Media redundancy RT mode for clients"},
1013 { 0x021E, "CheckSyncDifference"},
1014 { 0x021F, "CheckMAUTypeDifference"},
1015 { 0x0220, "PDPortFODataReal"},
1016 { 0x0221, "Reading real fiber optic manufacturerspecific data"},
1017 { 0x0222, "PDPortFODataAdjust"},
1018 { 0x0223, "PDPortFODataCheck"},
1019 { 0x0224, "Adjust PeerToPeerBoundary"},
1020 { 0x0225, "Adjust DCPBoundary"},
1021 { 0x0226, "Adjust PreambleLength"},
1022 { 0x0227, "CheckMAUType-Extension"},
1023 { 0x0228, "Reading real fiber optic diagnosis data"},
1024 { 0x0229, "AdjustMAUType-Extension"},
1025 { 0x022A, "PDIRSubframeData"},
1026 { 0x022B, "SubframeBlock"},
1027 { 0x0230, "PDNCDataCheck"},
1028 { 0x0231, "MrpInstanceDataAdjust"},
1029 { 0x0232, "MrpInstanceDataReal"},
1030 { 0x0233, "MrpInstanceDataCheck"},
1031 { 0x0240, "PDInterfaceDataReal"},
1032 { 0x0250, "PDInterfaceAdjust"},
1033 { 0x0251, "PDPortStatistic"},
1034 { 0x0400, "MultipleBlockHeader"},
1035 { 0x0401, "COContainerContent"},
1036 { 0x0500, "RecordDataReadQuery"},
1037 { 0x0600, "FSHello"},
1038 { 0x0601, "FSParameterBlock"},
1039 { 0x0608, "PDInterfaceFSUDataAdjust"},
1040 { 0x0609, "ARFSUDataAdjust"},
1041 { 0x0700, "AutoConfiguration"},
1042 { 0x0701, "AutoConfiguration Communication"},
1043 { 0x0702, "AutoConfiguration Configuration"},
1044 { 0x0900, "RS_AdjustObserver" },
1045 { 0x0901, "RS_GetEvent" },
1046 { 0x0902, "RS_AckEvent" },
1047 { 0xB050, "Ext-PLL Control / RTC+RTA SyncID 0 (EDD)" },
1048 { 0xB051, "Ext-PLL Control / RTA SyncID 1 (GSY)" },
1050 { 0xB060, "EDD Trace Unit (EDD)" },
1051 { 0xB061, "EDD Trace Unit (EDD)" },
1053 { 0xB070, "OHA Info (OHA)" },
1055 { 0x0F00, "MaintenanceItem"},
1056 { 0x0F01, "Upload selected Records within Upload&RetrievalItem"},
1057 { 0x0F02, "iParameterItem"},
1058 { 0x0F03, "Retrieve selected Records within Upload&RetrievalItem"},
1059 { 0x0F04, "Retrieve all Records within Upload&RetrievalItem"},
1063 static const value_string pn_io_alarm_type[] = {
1064 { 0x0000, "Reserved" },
1065 { 0x0001, "Diagnosis" },
1066 { 0x0002, "Process" },
1069 { 0x0005, "Status" },
1070 { 0x0006, "Update" },
1071 { 0x0007, "Redundancy" },
1072 { 0x0008, "Controlled by supervisor" },
1073 { 0x0009, "Released" },
1074 { 0x000A, "Plug wrong submodule" },
1075 { 0x000B, "Return of submodule" },
1076 { 0x000C, "Diagnosis disappears" },
1077 { 0x000D, "Multicast communication mismatch notification" },
1078 { 0x000E, "Port data change notification" },
1079 { 0x000F, "Sync data changed notification" },
1080 { 0x0010, "Isochronous mode problem notification" },
1081 { 0x0011, "Network component problem notification" },
1082 { 0x0012, "Time data changed notification" },
1083 { 0x0013, "Dynamic Frame Packing problem notification" },
1084 /*0x0014 - 0x001D reserved */
1085 { 0x001E, "Upload and retrieval notification" },
1086 { 0x001F, "Pull module" },
1087 /*0x0020 - 0x007F manufacturer specific */
1088 /*0x0080 - 0x00FF reserved for profiles */
1089 /*0x0100 - 0xFFFF reserved */
1093 static const value_string pn_io_pdu_type[] = {
1094 { 0x01, "Data-RTA-PDU" },
1095 { 0x02, "NACK-RTA-PDU" },
1096 { 0x03, "ACK-RTA-PDU" },
1097 { 0x04, "ERR-RTA-PDU" },
1101 static const value_string hf_pn_io_frame_data_properties_forwardingMode[] = {
1102 { 0x00, "absolute mode" },
1103 { 0x01, "relative mode"},
1106 static const value_string hf_pn_io_frame_data_properties_FFMulticastMACAdd[] = {
1107 { 0x00, "Use interface MAC destination unicast address" },
1108 { 0x01, "Use RT_CLASS_3 destination multicast address"},
1109 { 0x02, "Use FastForwardingMulticastMACAdd"},
1110 { 0x03, "reserved"},
1113 static const value_string hf_pn_io_frame_data_properties_FragMode[] = {
1114 { 0x00, "No fragmentation" },
1115 { 0x01, "Fragmentation enabled maximum size for static fragmentation 128 bytes"},
1116 { 0x02, "Fragmentation enabled maximum size for static fragmentation 256 bytes"},
1117 { 0x03, "reserved"},
1120 static const value_string pn_io_SFIOCRProperties_DFPType_vals[] = {
1121 { 0x00, "DFP_INBOUND" },
1122 { 0x01, "DFP_OUTBOUND" },
1126 static const value_string pn_io_DFPRedundantPathLayout_decode[] = {
1127 { 0x00, "The Frame for the redundant path contains the ordering shown by SubframeData" },
1128 { 0x01, "The Frame for the redundant path contains the inverse ordering shown by SubframeData" },
1132 static const value_string pn_io_SFCRC16_Decode[] = {
1133 { 0x00, "SFCRC16 and SFCycleCounter shall be created or set to zero by the sender and not checked by the receiver" },
1134 { 0x01, "SFCRC16 and SFCycleCounter shall be created by the sender and checked by the receiver." },
1138 static const value_string pn_io_txgroup_state[] = {
1139 { 0x00, "Transmission off" },
1140 { 0x01, "Transmission on " },
1144 static const value_string pn_io_error_code[] = {
1147 { 0xCF, "RTA error" },
1148 { 0xDA, "AlarmAck" },
1149 { 0xDB, "IODConnectRes" },
1150 { 0xDC, "IODReleaseRes" },
1151 { 0xDD, "IODControlRes" },
1152 { 0xDE, "IODReadRes" },
1153 { 0xDF, "IODWriteRes" },
1157 static const value_string pn_io_error_decode[] = {
1164 /* dummy for unknown decode */
1165 static const value_string pn_io_error_code1[] = {
1170 /* dummy for unknown decode/code1 combination */
1171 static const value_string pn_io_error_code2[] = {
1176 static const value_string pn_io_error_code1_pniorw[] = {
1177 /* high nibble 0-9 not specified -> legacy codes */
1178 { 0xa0, "application: read error" },
1179 { 0xa1, "application: write error" },
1180 { 0xa2, "application: module failure" },
1181 { 0xa3, "application: not specified" },
1182 { 0xa4, "application: not specified" },
1183 { 0xa5, "application: not specified" },
1184 { 0xa6, "application: not specified" },
1185 { 0xa7, "application: busy" },
1186 { 0xa8, "application: version conflict" },
1187 { 0xa9, "application: feature not supported" },
1188 { 0xaa, "application: User specific 1" },
1189 { 0xab, "application: User specific 2" },
1190 { 0xac, "application: User specific 3" },
1191 { 0xad, "application: User specific 4" },
1192 { 0xae, "application: User specific 5" },
1193 { 0xaf, "application: User specific 6" },
1194 { 0xb0, "access: invalid index" },
1195 { 0xb1, "access: write length error" },
1196 { 0xb2, "access: invalid slot/subslot" },
1197 { 0xb3, "access: type conflict" },
1198 { 0xb4, "access: invalid area" },
1199 { 0xb5, "access: state conflict" },
1200 { 0xb6, "access: access denied" },
1201 { 0xb7, "access: invalid range" },
1202 { 0xb8, "access: invalid parameter" },
1203 { 0xb9, "access: invalid type" },
1204 { 0xba, "access: backup" },
1205 { 0xbb, "access: User specific 7" },
1206 { 0xbc, "access: User specific 8" },
1207 { 0xbd, "access: User specific 9" },
1208 { 0xbe, "access: User specific 10" },
1209 { 0xbf, "access: User specific 11" },
1210 { 0xc0, "resource: read constrain conflict" },
1211 { 0xc1, "resource: write constrain conflict" },
1212 { 0xc2, "resource: resource busy" },
1213 { 0xc3, "resource: resource unavailable" },
1214 { 0xc4, "resource: not specified" },
1215 { 0xc5, "resource: not specified" },
1216 { 0xc6, "resource: not specified" },
1217 { 0xc7, "resource: not specified" },
1218 { 0xc8, "resource: User specific 12" },
1219 { 0xc9, "resource: User specific 13" },
1220 { 0xca, "resource: User specific 14" },
1221 { 0xcb, "resource: User specific 15" },
1222 { 0xcc, "resource: User specific 16" },
1223 { 0xcd, "resource: User specific 17" },
1224 { 0xce, "resource: User specific 18" },
1225 { 0xcf, "resource: User specific 19" },
1226 /* high nibble d-f user specific */
1230 static const value_string pn_io_error_code2_pniorw[] = {
1231 /* all values are user specified */
1235 static const value_string pn_io_error_code1_pnio[] = {
1236 { 0x00 /* 0*/, "Reserved" },
1237 { 0x01 /* 1*/, "Connect: Faulty ARBlockReq" },
1238 { 0x02 /* 2*/, "Connect: Faulty IOCRBlockReq" },
1239 { 0x03 /* 3*/, "Connect: Faulty ExpectedSubmoduleBlockReq" },
1240 { 0x04 /* 4*/, "Connect: Faulty AlarmCRBlockReq" },
1241 { 0x05 /* 5*/, "Connect: Faulty PrmServerBlockReq" },
1242 { 0x06 /* 6*/, "Connect: Faulty MCRBlockReq" },
1243 { 0x07 /* 7*/, "Connect: Faulty ARRPCBlockReq" },
1244 { 0x08 /* 8*/, "Read/Write Record: Faulty Record" },
1245 { 0x09 /* 9*/, "Connect: Faulty SubFrameBlock" },
1246 { 0x0A /* 10*/, "Connect: Faulty IRTFrameBlock" },
1247 { 0x0D /* 13*/, "Connect: Faulty RSInfoBlock" },
1248 { 0x14 /* 20*/, "IODControl: Faulty ControlBlockConnect" },
1249 { 0x15 /* 21*/, "IODControl: Faulty ControlBlockPlug" },
1250 { 0x16 /* 22*/, "IOXControl: Faulty ControlBlock after a connect est." },
1251 { 0x17 /* 23*/, "IOXControl: Faulty ControlBlock a plug alarm" },
1253 { 0x28 /* 40*/, "Release: Faulty ReleaseBlock" },
1255 { 0x32 /* 50*/, "Response: Faulty ARBlockRes" },
1256 { 0x33 /* 51*/, "Response: Faulty IOCRBlockRes" },
1257 { 0x34 /* 52*/, "Response: Faulty AlarmCRBlockRes" },
1258 { 0x35 /* 53*/, "Response: Faulty ModuleDifflock" },
1259 { 0x36 /* 54*/, "Response: Faulty ARRPCBlockRes" },
1261 { 0x3c /* 60*/, "AlarmAck Error Codes" },
1262 { 0x3d /* 61*/, "CMDEV" },
1263 { 0x3e /* 62*/, "CMCTL" },
1264 { 0x3f /* 63*/, "NRPM" },
1265 { 0x40 /* 64*/, "RMPM" },
1266 { 0x41 /* 65*/, "ALPMI" },
1267 { 0x42 /* 66*/, "ALPMR" },
1268 { 0x43 /* 67*/, "LMPM" },
1269 { 0x44 /* 68*/, "MMAC" },
1270 { 0x45 /* 69*/, "RPC" },
1271 { 0x46 /* 70*/, "APMR" },
1272 { 0x47 /* 71*/, "APMS" },
1273 { 0x48 /* 72*/, "CPM" },
1274 { 0x49 /* 73*/, "PPM" },
1275 { 0x4a /* 74*/, "DCPUCS" },
1276 { 0x4b /* 75*/, "DCPUCR" },
1277 { 0x4c /* 76*/, "DCPMCS" },
1278 { 0x4d /* 77*/, "DCPMCR" },
1279 { 0x4e /* 78*/, "FSPM" },
1280 { 0xfd /*253*/, "RTA_ERR_CLS_PROTOCOL" },
1281 { 0xff /*255*/, "User specific" },
1285 static const value_string pn_io_error_code2_pnio_1[] = {
1286 /* CheckingRules for ARBlockReq */
1287 { 0, "Error in Parameter BlockType" },
1288 { 1, "Error in Parameter BlockLength" },
1289 { 2, "Error in Parameter BlockVersionHigh" },
1290 { 3, "Error in Parameter BlockVersionLow" },
1291 { 4, "Error in Parameter ARType" },
1292 { 5, "Error in Parameter ARUUID" },
1293 { 7, "Error in Parameter CMInitiatorMACAddress" },
1294 { 8, "Error in Parameter CMInitiatorObjectUUID" },
1295 { 9, "Error in Parameter ARProperties" },
1296 { 10, "Error in Parameter CMInitiatorActivityTimeoutFactor" },
1297 { 11, "Error in Parameter InitiatorUDPRTPort" },
1298 { 12, "Error in Parameter StationNameLength" },
1299 { 13, "Error in Parameter CMInitiatorStationName" },
1303 static const value_string pn_io_error_code2_pnio_2[] = {
1304 /* CheckingRules for IOCRBlockReq */
1305 { 0, "Error in Parameter BlockType" },
1306 { 1, "Error in Parameter BlockLength" },
1307 { 2, "Error in Parameter BlockVersionHigh" },
1308 { 3, "Error in Parameter BlockVersionLow" },
1309 { 4, "Error in Parameter IOCRType" },
1310 { 5, "Error in Parameter IOCRReference" },
1311 { 6, "Error in Parameter LT" },
1312 { 7, "Error in Parameter IOCRProperties" },
1313 { 8, "Error in Parameter DataLength" },
1314 { 9, "Error in Parameter FrameID" },
1315 { 10, "Error in Parameter SendClockFactor" },
1316 { 11, "Error in Parameter ReductionRatio" },
1317 { 12, "Error in Parameter Phase" },
1318 { 14, "Error in Parameter FrameSendOffset" },
1319 { 15, "Error in Parameter WatchdogFactor" },
1320 { 16, "Error in Parameter DataHoldFactor" },
1321 { 17, "Error in Parameter IOCRTagHeader" },
1322 { 18, "Error in Parameter IOCRMulticastMacAddress" },
1323 { 19, "Error in Parameter NumberOfAPI" },
1324 { 20, "Error in Parameter API" },
1325 { 21, "Error in Parameter NumberOfIODataObjects" },
1326 { 22, "Error in Parameter SlotNumber" },
1327 { 23, "Error in Parameter SubslotNumber" },
1328 { 24, "Error in Parameter IODataObjectFrameOffset" },
1329 { 25, "Error in Parameter NumberOfIOCS" },
1330 { 26, "Error in Parameter SlotNumber" },
1331 { 27, "Error in Parameter SubslotNumber" },
1332 { 28, "Error in Parameter IOCSFrameOffset" },
1336 static const value_string pn_io_error_code2_pnio_3[] = {
1337 /* CheckingRules for ExpectedSubmoduleBlockReq */
1338 { 0, "Error in Parameter BlockType" },
1339 { 1, "Error in Parameter BlockLength" },
1340 { 2, "Error in Parameter BlockVersionHigh" },
1341 { 3, "Error in Parameter BlockVersionLow" },
1342 { 4, "Error in Parameter NumberOfAPI" },
1343 { 5, "Error in Parameter API" },
1344 { 6, "Error in Parameter SlotNumber" },
1345 { 7, "Error in Parameter ModuleIdentNumber" },
1346 { 8, "Error in Parameter ModuleProperties" },
1347 { 9, "Error in Parameter NumberOfSubmodules" },
1348 { 10, "Error in Parameter SubslotNumber" },
1349 { 12, "Error in Parameter SubmoduleProperties" },
1350 { 13, "Error in Parameter DataDescription" },
1351 { 14, "Error in Parameter SubmoduleDataLength" },
1352 { 15, "Error in Parameter LengthIOPS" },
1353 { 16, "Error in Parameter LengthIOCS" },
1358 static const value_string pn_io_error_code2_pnio_4[] = {
1359 /* CheckingRules for AlarmCRBlockReq */
1360 { 0, "Error in Parameter BlockType" },
1361 { 1, "Error in Parameter BlockLength" },
1362 { 2, "Error in Parameter BlockVersionHigh" },
1363 { 3, "Error in Parameter BlockVersionLow" },
1364 { 4, "Error in Parameter AlarmCRType" },
1365 { 5, "Error in Parameter LT" },
1366 { 6, "Error in Parameter AlarmCRProperties" },
1367 { 7, "Error in Parameter RTATimeoutFactor" },
1368 { 8, "Error in Parameter RTARetries" },
1369 { 10, "Error in Parameter MaxAlarmDataLength" },
1370 { 11, "Error in Parameter AlarmCRTagHeaderHigh" },
1371 { 12, "Error in Parameter AlarmCRTagHeaderLow" },
1375 static const value_string pn_io_error_code2_pnio_5[] = {
1376 /* CheckingRules for PrmServerBlockReq */
1377 { 0, "Error in Parameter BlockType" },
1378 { 1, "Error in Parameter BlockLength" },
1379 { 2, "Error in Parameter BlockVersionHigh" },
1380 { 3, "Error in Parameter BlockVersionLow" },
1381 { 6, "Error in Parameter CMInitiatorActivityTimeoutFactor" },
1382 { 7, "Error in Parameter StationNameLength" },
1383 { 8, "Error in Parameter ParameterServerStationName" },
1387 static const value_string pn_io_error_code2_pnio_6[] = {
1388 /* CheckingRules for MCRBlockReq */
1389 { 0, "Error in Parameter BlockType" },
1390 { 1, "Error in Parameter BlockLength" },
1391 { 2, "Error in Parameter BlockVersionHigh" },
1392 { 3, "Error in Parameter BlockVersionLow" },
1393 { 4, "Error in Parameter IOCRReference" },
1394 { 5, "Error in Parameter AddressResolutionProperties" },
1395 { 6, "Error in Parameter MCITimeoutFactor" },
1396 { 7, "Error in Parameter StationNameLength" },
1397 { 8, "Error in Parameter ProviderStationName" },
1401 static const value_string pn_io_error_code2_pnio_7[] = {
1402 /* CheckingRules for MCRBlockReq */
1403 { 0, "Error in Parameter BlockType" },
1404 { 1, "Error in Parameter BlockLength" },
1405 { 2, "Error in Parameter BlockVersionHigh" },
1406 { 3, "Error in Parameter BlockVersionLow" },
1407 { 4, "Error in Parameter InitiatorRPCServerPort" },
1411 static const value_string pn_io_error_code2_pnio_8[] = {
1412 /* CheckingRules for Read/Write ParameterReqHeader */
1413 { 0, "Error in Parameter BlockType" },
1414 { 1, "Error in Parameter BlockLength" },
1415 { 2, "Error in Parameter BlockVersionHigh" },
1416 { 3, "Error in Parameter BlockVersionLow" },
1417 { 5, "Error in Parameter ARUUID" },
1418 { 6, "Error in Parameter API" },
1419 { 7, "Error in Parameter SlotNumber" },
1420 { 8, "Error in Parameter SubslotNumber" },
1421 { 9, "Error in Parameter Padding" },
1422 { 10, "Error in Parameter Index" },
1423 { 11, "Error in Parameter RecordDataLength" },
1424 { 12, "Error in Parameter TargetARUUID" },
1428 static const value_string pn_io_error_code2_pnio_13[] = {
1429 /* CheckingRules for RSInfoBlock */
1430 { 0, "Error in Parameter BlockType" },
1431 { 1, "Error in Parameter BlockLength" },
1432 { 2, "Error in Parameter BlockVersionHigh" },
1433 { 3, "Error in Parameter BlockVersionLow" },
1434 { 4, "Error in Parameter Padding" },
1435 { 5, "Error in Parameter RSProperties" },
1439 static const value_string pn_io_error_code2_pnio_20[] = {
1440 /* CheckingRules for ControlBlockConnect */
1441 { 0, "Error in Parameter BlockType" },
1442 { 1, "Error in Parameter BlockLength" },
1443 { 2, "Error in Parameter BlockVersionHigh" },
1444 { 3, "Error in Parameter BlockVersionLow" },
1445 { 4, "Error in Parameter Padding" },
1446 { 6, "Error in Parameter SessionKey" },
1447 { 7, "Error in Parameter Padding" },
1448 { 8, "Error in Parameter ControlCommand" },
1449 { 9, "Error in Parameter ControlBlockProperties" },
1453 static const value_string pn_io_error_code2_pnio_21[] = {
1454 /* CheckingRules for ControlBlockPlug */
1455 { 0, "Error in Parameter BlockType" },
1456 { 1, "Error in Parameter BlockLength" },
1457 { 2, "Error in Parameter BlockVersionHigh" },
1458 { 3, "Error in Parameter BlockVersionLow" },
1459 { 4, "Error in Parameter Padding" },
1460 { 6, "Error in Parameter SessionKey" },
1461 { 7, "Error in Parameter AlarmSequenceNumber" },
1462 { 8, "Error in Parameter ControlCommand" },
1463 { 9, "Error in Parameter ControlBlockProperties" },
1467 static const value_string pn_io_error_code2_pnio_22[] = {
1468 /* CheckingRule for ControlBlockConnect */
1469 { 0, "Error in Parameter BlockType" },
1470 { 1, "Error in Parameter BlockLength" },
1471 { 2, "Error in Parameter BlockVersionHigh" },
1472 { 3, "Error in Parameter BlockVersionLow" },
1473 { 4, "Error in Parameter Padding" },
1474 { 6, "Error in Parameter SessionKey" },
1475 { 7, "Error in Parameter Padding" },
1476 { 8, "Error in Parameter ControlCommand" },
1477 { 9, "Error in Parameter ControlBlockProperties" },
1481 static const value_string pn_io_error_code2_pnio_23[] = {
1482 /* CheckingRules for ControlBlockPlug */
1483 { 0, "Error in Parameter BlockType" },
1484 { 1, "Error in Parameter BlockLength" },
1485 { 2, "Error in Parameter BlockVersionHigh" },
1486 { 3, "Error in Parameter BlockVersionLow" },
1487 { 4, "Error in Parameter Padding" },
1488 { 6, "Error in Parameter SessionKey" },
1489 { 7, "Error in Parameter AlarmSequenceNumber" },
1490 { 8, "Error in Parameter ControlCommand" },
1491 { 9, "Error in Parameter ControlBlockProperties" },
1495 static const value_string pn_io_error_code2_pnio_40[] = {
1496 /* CheckingRules for ReleaseBlock */
1497 { 0, "Error in Parameter BlockType" },
1498 { 1, "Error in Parameter BlockLength" },
1499 { 2, "Error in Parameter BlockVersionHigh" },
1500 { 3, "Error in Parameter BlockVersionLow" },
1501 { 4, "Error in Parameter Padding" },
1502 { 6, "Error in Parameter SessionKey" },
1503 { 7, "Error in Parameter Padding" },
1504 { 8, "Error in Parameter ControlCommand" },
1505 { 9, "Error in Parameter ControlBlockProperties" },
1509 static const value_string pn_io_error_code2_pnio_60[] = {
1510 /* AlarmAck Error Codes */
1511 { 0, "Alarm Type Not Supported" },
1512 { 1, "Wrong Submodule State" },
1513 { 2, "IOCARSR Backup - Alarm not executed" },
1517 static const value_string pn_io_error_code2_pnio_61[] = {
1519 { 0, "State Conflict" },
1524 static const value_string pn_io_error_code2_pnio_62[] = {
1526 { 0, "State Conflict" },
1528 { 2, "No data send" },
1532 static const value_string pn_io_error_code2_pnio_63[] = {
1534 { 0, "No DCP active" },
1535 { 1, "DNS Unknown_RealStationName" },
1536 { 2, "DCP No_RealStationName" },
1537 { 3, "DCP Multiple_RealStationName" },
1538 { 4, "DCP No_StationName" },
1539 { 5, "No_IP_Addr" },
1540 { 6, "DCP_Set_Error" },
1544 static const value_string pn_io_error_code2_pnio_64[] = {
1546 { 0, "ArgsLength invalid" },
1547 { 1, "Unknown Blocks" },
1548 { 2, "IOCR Missing" },
1549 { 3, "Wrong AlarmCRBlock count" },
1550 { 4, "Out of AR Resources" },
1551 { 5, "AR UUID unknown" },
1552 { 6, "State conflict" },
1553 { 7, "Out of Provider, Consumer or Alarm Resources" },
1554 { 8, "Out of Memory" },
1558 static const value_string pn_io_error_code2_pnio_65[] = {
1560 { 0, "Invalid State" },
1561 { 1, "Wrong ACK-PDU" },
1565 static const value_string pn_io_error_code2_pnio_66[] = {
1567 { 0, "Invalid State" },
1568 { 1, "Wrong Notification PDU" },
1572 static const value_string pn_io_error_code2_pnio_70[] = {
1574 { 0, "Invalid State" },
1575 { 1, "LMPM signaled error" },
1579 static const value_string pn_io_error_code2_pnio_71[] = {
1581 { 0, "Invalid State" },
1582 { 1, "LMPM signaled error" },
1587 static const value_string pn_io_error_code2_pnio_72[] = {
1589 { 1, "Invalid State" },
1593 static const value_string pn_io_error_code2_pnio_73[] = {
1595 { 1, "Invalid State" },
1599 static const value_string pn_io_error_code2_pnio_74[] = {
1601 { 0, "Invalid State" },
1602 { 1, "LMPM signaled an error" },
1607 static const value_string pn_io_error_code2_pnio_75[] = {
1609 { 0, "Invalid State" },
1610 { 1, "LMPM signaled an error" },
1614 static const value_string pn_io_error_code2_pnio_76[] = {
1616 { 0, "Invalid State" },
1617 { 1, "LMPM signaled an error" },
1621 static const value_string pn_io_error_code2_pnio_77[] = {
1623 { 0, "Invalid State" },
1624 { 1, "LMPM signaled an error" },
1628 static const value_string pn_io_error_code2_pnio_253[] = {
1630 { 1, "Error within the coordination of sequence numbers (RTA_ERR_CODE_SEQ) error" },
1631 { 2, "Instance closed (RTA_ERR_ABORT)" },
1632 { 3, "AR out of memory (RTA_ERR_ABORT)" },
1633 { 4, "AR add provider or consumer failed (RTA_ERR_ABORT)" },
1634 { 5, "AR consumer DHT/WDT expired (RTA_ERR_ABORT)" },
1635 { 6, "AR cmi timeout (RTA_ERR_ABORT)" },
1636 { 7, "AR alarm-open failed (RTA_ERR_ABORT)" },
1637 { 8, "AR alarm-send.cnf(-) (RTA_ERR_ABORT)" },
1638 { 9, "AR alarm-ack-send.cnf(-) (RTA_ERR_ABORT)" },
1639 { 10, "AR alarm data too long (RTA_ERR_ABORT)" },
1640 { 11, "AR alarm.ind(err) (RTA_ERR_ABORT)" },
1641 { 12, "AR rpc-client call.cnf(-) (RTA_ERR_ABORT)" },
1642 { 13, "AR abort.req (RTA_ERR_ABORT)" },
1643 { 14, "AR re-run aborts existing (RTA_ERR_ABORT)" },
1644 { 15, "AR release.ind received (RTA_ERR_ABORT)" },
1645 { 16, "AR device deactivated (RTA_ERR_ABORT)" },
1646 { 17, "AR removed (RTA_ERR_ABORT)" },
1647 { 18, "AR protocol violation (RTA_ERR_ABORT)" },
1648 { 19, "AR name resolution error (RTA_ERR_ABORT)" },
1649 { 20, "AR RPC-Bind error (RTA_ERR_ABORT)" },
1650 { 21, "AR RPC-Connect error (RTA_ERR_ABORT)" },
1651 { 22, "AR RPC-Read error (RTA_ERR_ABORT)" },
1652 { 23, "AR RPC-Write error (RTA_ERR_ABORT)" },
1653 { 24, "AR RPC-Control error (RTA_ERR_ABORT)" },
1654 { 25, "AR forbidden pull or plug after check.rsp and before in-data.ind (RTA_ERR_ABORT)" },
1655 { 26, "AR AP removed (RTA_ERR_ABORT)" },
1656 { 27, "AR link down (RTA_ERR_ABORT)" },
1657 { 28, "AR could not register multicast-mac address (RTA_ERR_ABORT)" },
1658 { 29, "not synchronized (cannot start companion-ar) (RTA_ERR_ABORT)" },
1659 { 30, "wrong topology (cannot start companion-ar) (RTA_ERR_ABORT)" },
1660 { 31, "dcp, station-name changed (RTA_ERR_ABORT)" },
1661 { 32, "dcp, reset to factory-settings (RTA_ERR_ABORT)" },
1662 { 33, "cannot start companion-AR because a 0x8ipp submodule in the first AR... (RTA_ERR_ABORT)" },
1663 { 34, "no irdata record yet (RTA_ERR_ABORT)" },
1664 { 35, "PDEV (RTA_ERROR_ABORT)" },
1665 { 36, "PDEV, no port offers required speed/duplexity (RTA_ERROR_ABORT)" },
1666 { 37, "IP-Suite [of the IOC] changed by means of DCP_Set(IPParameter) or local engineering (RTA_ERROR_ABORT)" },
1670 static const value_string pn_io_error_code2_pnio_255[] = {
1672 { 255, "User abort" },
1676 static const value_string pn_io_ioxs[] = {
1677 { 0x00 /* 0*/, "detected by subslot" },
1678 { 0x01 /* 1*/, "detected by slot" },
1679 { 0x02 /* 2*/, "detected by IO device" },
1680 { 0x03 /* 3*/, "detected by IO controller" },
1685 static const value_string pn_io_ar_type[] = {
1686 { 0x0000, "reserved" },
1687 { 0x0001, "IO Controller AR"},
1688 { 0x0002, "reserved" },
1689 { 0x0003, "IOCARCIR" },
1690 { 0x0004, "reserved" },
1691 { 0x0005, "reserved" },
1692 { 0x0006, "IO Supervisor AR / DeviceAccess AR" },
1693 /*0x0007 - 0x000F reserved */
1694 { 0x0010, "IO Controller AR (RT_CLASS_3)" },
1695 /*0x0011 - 0x001F reserved */
1696 { 0x0020, "IO Controller AR (sysred/CiR)" },
1697 /*0x0007 - 0xFFFF reserved */
1701 static const value_string pn_io_iocr_type[] = {
1702 { 0x0000, "reserved" },
1703 { 0x0001, "Input CR" },
1704 { 0x0002, "Output CR" },
1705 { 0x0003, "Multicast Provider CR" },
1706 { 0x0004, "Multicast Consumer CR" },
1707 /*0x0005 - 0xFFFF reserved */
1712 static const value_string pn_io_data_description[] = {
1713 { 0x0000, "reserved" },
1714 { 0x0001, "Input" },
1715 { 0x0002, "Output" },
1716 { 0x0003, "reserved" },
1717 /*0x0004 - 0xFFFF reserved */
1722 static const value_string pn_io_module_state[] = {
1723 { 0x0000, "no module" },
1724 { 0x0001, "wrong module" },
1725 { 0x0002, "proper module" },
1726 { 0x0003, "substitute" },
1727 /*0x0004 - 0xFFFF reserved */
1731 static const value_string pn_io_arproperties_state[] = {
1732 { 0x00000000, "Reserved" },
1733 { 0x00000001, "Active" },
1734 { 0x00000002, "reserved" },
1735 { 0x00000003, "reserved" },
1736 { 0x00000004, "reserved" },
1737 { 0x00000005, "reserved" },
1738 { 0x00000006, "reserved" },
1739 { 0x00000007, "reserved" },
1743 static const value_string pn_io_arproperties_supervisor_takeover_allowed[] = {
1744 { 0x00000000, "not allowed" },
1745 { 0x00000001, "allowed" },
1749 static const value_string pn_io_arproperties_parametrization_server[] = {
1750 { 0x00000000, "External PrmServer" },
1751 { 0x00000001, "CM Initiator" },
1755 static const value_string pn_io_arproperties_DeviceAccess[] = {
1756 { 0x00000000, "Only the submodules from the ExpectedSubmoduleBlock are accessible" },
1757 { 0x00000001, "Submodule access is controlled by IO device application" },
1762 static const value_string pn_io_arproperties_companion_ar[] = {
1763 { 0x00000000, "Single AR" },
1764 { 0x00000001, "First AR of a companion pair and a companion AR shall follow" },
1765 { 0x00000002, "Companion AR" },
1766 { 0x00000003, "Reserved" },
1770 static const value_string pn_io_arproperties_data_rate[] = {
1771 { 0x00000000, "at least 100 MB/s or more" },
1772 { 0x00000001, "100 MB/s" },
1773 { 0x00000002, "1 GB/s" },
1774 { 0x00000003, "10 GB/s" },
1780 static const value_string pn_io_arproperties_acknowldege_companion_ar[] = {
1781 { 0x00000000, "No companion AR or no acknowledge for the companion AR required" },
1782 { 0x00000001, "Companion AR with acknowledge" },
1786 /* bit 29 for legacy startup mode*/
1787 static const value_string pn_io_arproperties_combined_object_container_with_legacy_startupmode[] = {
1788 { 0x00000000, "CombinedObjectContainer not used" },
1789 { 0x00000001, "Reserved" },
1793 /* bit 29 for advanced statup mode*/
1794 static const value_string pn_io_arproperties_combined_object_container_with_advanced_startupmode[] = {
1795 { 0x00000000, "CombinedObjectContainer not used" },
1796 { 0x00000001, "Usage of CombinedObjectContainer required" },
1801 static const value_string pn_io_arpropertiesStartupMode[] = {
1802 { 0x00000000, "Legacy" },
1803 { 0x00000001, "Advanced" },
1808 static const value_string pn_io_arproperties_pull_module_alarm_allowed[] = {
1809 { 0x00000000, "AlarmType(=Pull) shall signal pulling of submodule and module" },
1810 { 0x00000001, "AlarmType(=Pull) shall signal pulling of submodule" },
1814 static const value_string pn_io_RedundancyInfo[] = {
1815 { 0x00000000, "Reserved" },
1816 { 0x00000001, "The delivering node is the left or below one" },
1817 { 0x00000002, "The delivering node is the right or above one" },
1818 { 0x00000003, "Reserved" },
1822 static const value_string pn_io_iocr_properties_rtclass[] = {
1823 { 0x00000000, "reserved" },
1824 { 0x00000001, "RT_CLASS_1" },
1825 { 0x00000002, "RT_CLASS_2" },
1826 { 0x00000003, "RT_CLASS_3" },
1827 { 0x00000004, "RT_CLASS_UDP" },
1828 /*0x00000005 - 0x00000007 reserved */
1832 static const value_string pn_io_MultipleInterfaceMode_NameOfDevice[] = {
1833 { 0x00000000, "PortID of LLDP contains name of port (Default)" },
1834 { 0x00000001, "PortID of LLDP contains name of port and NameOfStation" },
1838 static const true_false_string tfs_pn_io_sr_properties_BackupAR_with_SRProperties_Mode_0 =
1839 { "The device shall deliver valid input data", "The IO controller shall not evaluate the input data." };
1841 static const true_false_string tfs_pn_io_sr_properties_BackupAR_with_SRProperties_Mode_1 =
1842 { "The device shall deliver valid input data", "The IO device shall mark the data as invalid using APDU_Status.DataStatus.DataValid == Invalid." };
1844 static const true_false_string tfs_pn_io_sr_properties_Mode =
1845 { "Default The IO device shall use APDU_Status.DataStatus.DataValid == Invalid if input data is request as not valid.",
1846 "The IO controller do not support APDU_Status.DataStatus.DataValid == Invalid if input data is request as not valid." };
1848 static const true_false_string tfs_pn_io_sr_properties_Reserved1 =
1849 { "Legacy mode", "Shall be set to zero for this standard." };
1851 static const value_string pn_io_iocr_properties_media_redundancy[] = {
1852 { 0x00000000, "No media redundant frame transfer" },
1853 { 0x00000001, "Media redundant frame transfer" },
1858 static const value_string pn_io_submodule_properties_type[] = {
1859 { 0x0000, "no input and no output data" },
1860 { 0x0001, "input data" },
1861 { 0x0002, "output data" },
1862 { 0x0003, "input and output data" },
1866 static const value_string pn_io_submodule_properties_shared_input[] = {
1867 { 0x0000, "IO controller" },
1868 { 0x0001, "IO controller shared" },
1872 static const value_string pn_io_submodule_properties_reduce_input_submodule_data_length[] = {
1873 { 0x0000, "Expected" },
1878 static const value_string pn_io_submodule_properties_reduce_output_submodule_data_length[] = {
1879 { 0x0000, "Expected" },
1884 static const value_string pn_io_submodule_properties_discard_ioxs[] = {
1885 { 0x0000, "Expected" },
1890 static const value_string pn_io_alarmcr_properties_priority[] = {
1891 { 0x0000, "user priority (default)" },
1892 { 0x0001, "use only low priority" },
1896 static const value_string pn_io_alarmcr_properties_transport[] = {
1897 { 0x0000, "RTA_CLASS_1" },
1898 { 0x0001, "RTA_CLASS_UDP" },
1903 static const value_string pn_io_submodule_state_format_indicator[] = {
1904 { 0x0000, "Coding uses Detail" },
1905 { 0x0001, "Coding uses .IdentInfo, ..." },
1909 static const value_string pn_io_submodule_state_add_info[] = {
1911 { 0x0001, "Takeover not allowed" },
1912 /*0x0002 - 0x0007 reserved */
1916 static const value_string pn_io_submodule_state_qualified_info[] = {
1917 { 0x0000, "No QualifiedInfo available" },
1918 { 0x0001, "QualifiedInfo available" },
1922 static const value_string pn_io_submodule_state_maintenance_required[] = {
1923 { 0x0000, "No MaintenanceRequired available" },
1924 { 0x0001, "MaintenanceRequired available" },
1928 static const value_string pn_io_submodule_state_maintenance_demanded[] = {
1929 { 0x0000, "No MaintenanceDemanded available" },
1930 { 0x0001, "MaintenanceDemanded available" },
1934 static const value_string pn_io_submodule_state_diag_info[] = {
1935 { 0x0000, "No DiagnosisData available" },
1936 { 0x0001, "DiagnosisData available" },
1940 static const value_string pn_io_submodule_state_ar_info[] = {
1942 { 0x0001, "ApplicationReadyPending (ARP)" },
1943 { 0x0002, "Superordinated Locked (SO)" },
1944 { 0x0003, "Locked By IO Controller (IOC)" },
1945 { 0x0004, "Locked By IO Supervisor (IOS)" },
1946 /*0x0005 - 0x000F reserved */
1950 static const value_string pn_io_submodule_state_ident_info[] = {
1952 { 0x0001, "Substitute (SU)" },
1953 { 0x0002, "Wrong (WR)" },
1954 { 0x0003, "NoSubmodule (NO)" },
1955 /*0x0004 - 0x000F reserved */
1959 static const value_string pn_io_submodule_state_detail[] = {
1960 { 0x0000, "no submodule" },
1961 { 0x0001, "wrong submodule" },
1962 { 0x0002, "locked by IO controller" },
1963 { 0x0003, "reserved" },
1964 { 0x0004, "application ready pending" },
1965 { 0x0005, "reserved" },
1966 { 0x0006, "reserved" },
1967 { 0x0007, "Substitute" },
1968 /*0x0008 - 0x7FFF reserved */
1972 static const value_string pn_io_substitutionmode[] = {
1974 { 0x0001, "Last value" },
1975 { 0x0002, "Replacement value" },
1976 /*0x0003 - 0xFFFF reserved */
1980 static const value_string pn_io_index[] = {
1981 /*0x0008 - 0x7FFF user specific */
1984 { 0x0100, "PROFISafe" },
1986 /* subslot specific */
1987 { 0x8000, "ExpectedIdentificationData for one subslot" },
1988 { 0x8001, "RealIdentificationData for one subslot" },
1989 /*0x8002 - 0x8009 reserved */
1990 { 0x800A, "Diagnosis in channel coding for one subslot" },
1991 { 0x800B, "Diagnosis in all codings for one subslot" },
1992 { 0x800C, "Diagnosis, Maintenance, Qualified and Status for one subslot" },
1993 /*0x800D - 0x800F reserved */
1994 { 0x8010, "Maintenance required in channel coding for one subslot" },
1995 { 0x8011, "Maintenance demanded in channel coding for one subslot" },
1996 { 0x8012, "Maintenance required in all codings for one subslot" },
1997 { 0x8013, "Maintenance demanded in all codings for one subslot" },
1998 /*0x8014 - 0x801D reserved */
1999 { 0x801E, "SubstituteValues for one subslot" },
2000 /*0x801F - 0x8027 reserved */
2001 { 0x8028, "RecordInputDataObjectElement for one subslot" },
2002 { 0x8029, "RecordOutputDataObjectElement for one subslot" },
2003 { 0x802A, "PDPortDataReal for one subslot" },
2004 { 0x802B, "PDPortDataCheck for one subslot" },
2005 { 0x802C, "PDIRData for one subslot" },
2006 { 0x802D, "Expected PDSyncData for one subslot with SyncID value 0" },
2007 /*0x802E reserved */
2008 { 0x802F, "PDPortDataAdjust for one subslot" },
2009 { 0x8030, "IsochronousModeData for one subslot" },
2010 { 0x8031, "Expected PDSyncData for one subslot with SyncID value 1" },
2011 { 0x8032, "Expected PDSyncData for one subslot with SyncID value 2" },
2012 { 0x8033, "Expected PDSyncData for one subslot with SyncID value 3" },
2013 { 0x8034, "Expected PDSyncData for one subslot with SyncID value 4" },
2014 { 0x8035, "Expected PDSyncData for one subslot with SyncID value 5" },
2015 { 0x8036, "Expected PDSyncData for one subslot with SyncID value 6" },
2016 { 0x8037, "Expected PDSyncData for one subslot with SyncID value 7" },
2017 { 0x8038, "Expected PDSyncData for one subslot with SyncID value 8" },
2018 { 0x8039, "Expected PDSyncData for one subslot with SyncID value 9" },
2019 { 0x803A, "Expected PDSyncData for one subslot with SyncID value 10" },
2020 { 0x803B, "Expected PDSyncData for one subslot with SyncID value 11" },
2021 { 0x803C, "Expected PDSyncData for one subslot with SyncID value 12" },
2022 { 0x803D, "Expected PDSyncData for one subslot with SyncID value 13" },
2023 { 0x803E, "Expected PDSyncData for one subslot with SyncID value 14" },
2024 { 0x803F, "Expected PDSyncData for one subslot with SyncID value 15" },
2025 { 0x8040, "Expected PDSyncData for one subslot with SyncID value 16" },
2026 { 0x8041, "Expected PDSyncData for one subslot with SyncID value 17" },
2027 { 0x8042, "Expected PDSyncData for one subslot with SyncID value 18" },
2028 { 0x8043, "Expected PDSyncData for one subslot with SyncID value 19" },
2029 { 0x8044, "Expected PDSyncData for one subslot with SyncID value 20" },
2030 { 0x8045, "Expected PDSyncData for one subslot with SyncID value 21" },
2031 { 0x8046, "Expected PDSyncData for one subslot with SyncID value 22" },
2032 { 0x8047, "Expected PDSyncData for one subslot with SyncID value 23" },
2033 { 0x8048, "Expected PDSyncData for one subslot with SyncID value 24" },
2034 { 0x8049, "Expected PDSyncData for one subslot with SyncID value 25" },
2035 { 0x804A, "Expected PDSyncData for one subslot with SyncID value 26" },
2036 { 0x804B, "Expected PDSyncData for one subslot with SyncID value 27" },
2037 { 0x804C, "Expected PDSyncData for one subslot with SyncID value 28" },
2038 { 0x804D, "Expected PDSyncData for one subslot with SyncID value 29" },
2039 { 0x804E, "Expected PDSyncData for one subslot with SyncID value 30" },
2040 { 0x804F, "Expected PDSyncData for one subslot with SyncID value 31" },
2041 { 0x8050, "PDInterfaceMrpDataReal for one subslot" },
2042 { 0x8051, "PDInterfaceMrpDataCheck for one subslot" },
2043 { 0x8052, "PDInterfaceMrpDataAdjust for one subslot" },
2044 { 0x8053, "PDPortMrpDataAdjust for one subslot" },
2045 { 0x8054, "PDPortMrpDataReal for one subslot" },
2046 /*0x8055 - 0x805F reserved */
2047 { 0x8060, "PDPortFODataReal for one subslot" },
2048 { 0x8061, "PDPortFODataCheck for one subslot" },
2049 { 0x8062, "PDPortFODataAdjust for one subslot" },
2050 /*0x8063 - 0x806F reserved */
2051 { 0x8070, "PDNCDataCheck for one subslot" },
2052 { 0x8071, "PDInterfaceAdjust for one subslot" },
2053 { 0x8072, "PDPortStatistic for one subslot" },
2054 /*0x8071 - 0x807F reserved */
2055 { 0x8080, "PDInterfaceDataReal" },
2056 /*0x8081 - 0x808F reserved */
2057 { 0x8090, "Expected PDInterfaceFSUDataAdjust" },
2058 /*0x8091 - 0xAFEF reserved except 0x80B0*/
2059 { 0x80B0, "CombinedObjectContainer" },
2060 { 0x80CF, "RS_AdjustObserver" },
2071 { 0xAFFA, "I&M10" },
2072 { 0xAFFB, "I&M11" },
2073 { 0xAFFC, "I&M12" },
2074 { 0xAFFD, "I&M13" },
2075 { 0xAFFE, "I&M14" },
2076 { 0xAFFF, "I&M15" },
2077 /*0xB000 - 0xB02D reserved for profiles */
2078 { 0xB000, "Sync-Log / RTA SyncID 0 (GSY)" },
2079 { 0xB001, "Sync-Log / RTA SyncID 1 (GSY)" },
2080 { 0xB002, "reserved for profiles" },
2081 { 0xB003, "reserved for profiles" },
2082 { 0xB004, "reserved for profiles" },
2083 { 0xB005, "reserved for profiles" },
2084 { 0xB006, "reserved for profiles" },
2085 { 0xB007, "reserved for profiles" },
2086 { 0xB008, "reserved for profiles" },
2087 { 0xB009, "reserved for profiles" },
2088 { 0xB00A, "reserved for profiles" },
2089 { 0xB00B, "reserved for profiles" },
2090 { 0xB00C, "reserved for profiles" },
2091 { 0xB00D, "reserved for profiles" },
2092 { 0xB00E, "reserved for profiles" },
2093 { 0xB00F, "reserved for profiles" },
2094 { 0xB010, "reserved for profiles" },
2095 { 0xB011, "reserved for profiles" },
2096 { 0xB012, "reserved for profiles" },
2097 { 0xB013, "reserved for profiles" },
2098 { 0xB014, "reserved for profiles" },
2099 { 0xB015, "reserved for profiles" },
2100 { 0xB016, "reserved for profiles" },
2101 { 0xB017, "reserved for profiles" },
2102 { 0xB018, "reserved for profiles" },
2103 { 0xB019, "reserved for profiles" },
2104 { 0xB01A, "reserved for profiles" },
2105 { 0xB01B, "reserved for profiles" },
2106 { 0xB01C, "reserved for profiles" },
2107 { 0xB01D, "reserved for profiles" },
2108 { 0xB01E, "reserved for profiles" },
2109 { 0xB01F, "reserved for profiles" },
2110 { 0xB020, "reserved for profiles" },
2111 { 0xB021, "reserved for profiles" },
2112 { 0xB022, "reserved for profiles" },
2113 { 0xB023, "reserved for profiles" },
2114 { 0xB024, "reserved for profiles" },
2115 { 0xB025, "reserved for profiles" },
2116 { 0xB026, "reserved for profiles" },
2117 { 0xB027, "reserved for profiles" },
2118 { 0xB028, "reserved for profiles" },
2119 { 0xB029, "reserved for profiles" },
2120 { 0xB02A, "reserved for profiles" },
2121 { 0xB02B, "reserved for profiles" },
2122 { 0xB02C, "reserved for profiles" },
2123 { 0xB02D, "reserved for profiles" },
2125 { 0xB02E, "PROFIDrive Parameter Access - Local"},
2126 { 0xB02F, "PROFIDrive Parameter Access - Global"},
2128 /*0xB030 - 0xBFFF reserved for profiles */
2129 { 0xB050, "Ext-PLL Control / RTC+RTA SyncID 0 (EDD)" },
2130 { 0xB051, "Ext-PLL Control / RTA SyncID 1 (GSY)" },
2132 { 0xB060, "EDD Trace Unit (EDD" },
2133 { 0xB061, "EDD Trace Unit (EDD" },
2135 { 0xB070, "OHA Info (OHA)" },
2139 { 0xC000, "ExpectedIdentificationData for one slot" },
2140 { 0xC001, "RealIdentificationData for one slot" },
2141 /*0xC002 - 0xC009 reserved */
2142 { 0xC00A, "Diagnosis in channel coding for one slot" },
2143 { 0xC00B, "Diagnosis in all codings for one slot" },
2144 { 0xC00C, "Diagnosis, Maintenance, Qualified and Status for one slot" },
2145 /*0xC00D - 0xC00F reserved */
2146 { 0xC010, "Maintenance required in channel coding for one slot" },
2147 { 0xC011, "Maintenance demanded in channel coding for one slot" },
2148 { 0xC012, "Maintenance required in all codings for one slot" },
2149 { 0xC013, "Maintenance demanded in all codings for one slot" },
2150 /*0xC014 - 0xCFFF reserved */
2151 /*0xD000 - 0xDFFF reserved for profiles */
2154 { 0xE000, "ExpectedIdentificationData for one AR" },
2155 { 0xE001, "RealIdentificationData for one AR" },
2156 { 0xE002, "ModuleDiffBlock for one AR" },
2157 /*0xE003 - 0xE009 reserved */
2158 { 0xE00A, "Diagnosis in channel coding for one AR" },
2159 { 0xE00B, "Diagnosis in all codings for one AR" },
2160 { 0xE00C, "Diagnosis, Maintenance, Qualified and Status for one AR" },
2161 /*0xE00D - 0xE00F reserved */
2162 { 0xE010, "Maintenance required in channel coding for one AR" },
2163 { 0xE011, "Maintenance demanded in channel coding for one AR" },
2164 { 0xE012, "Maintenance required in all codings for one AR" },
2165 { 0xE013, "Maintenance demanded in all codings for one AR" },
2166 /*0xE014 - 0xE02F reserved */
2167 { 0xE030, "IsochronousModeData for one AR" },
2168 /*0xE031 - 0xE03F reserved */
2169 { 0xE040, "MultipleWrite" },
2170 /*0xE041 - 0xE04F reserved */
2171 { 0xE050, "ARFSUDataAdjust data for one AR" },
2172 /*0xE051 - 0xE05F reserved */
2173 { 0xE060, "RS_GetEvent (using RecordDataRead service)" },
2174 { 0xE061, "RS_AckEvent (using RecordDataWrite service)" },
2175 /*0xEC00 - 0xEFFF reserved */
2178 { 0xF000, "RealIdentificationData for one API" },
2179 /*0xF001 - 0xF009 reserved */
2180 { 0xF00A, "Diagnosis in channel coding for one API" },
2181 { 0xF00B, "Diagnosis in all codings for one API" },
2182 { 0xF00C, "Diagnosis, Maintenance, Qualified and Status for one API" },
2183 /*0xF00D - 0xF00F reserved */
2184 { 0xF010, "Maintenance required in channel coding for one API" },
2185 { 0xF011, "Maintenance demanded in channel coding for one API" },
2186 { 0xF012, "Maintenance required in all codings for one API" },
2187 { 0xF013, "Maintenance demanded in all codings for one API" },
2188 /*0xF014 - 0xF01F reserved */
2189 { 0xF020, "ARData for one API" },
2190 /*0xF021 - 0xF3FF reserved */
2191 /*0xF400 - 0xF7FF reserved */
2193 /* device specific */
2194 /*0xF800 - 0xF80B reserved */
2195 { 0xF80C, "Diagnosis, Maintenance, Qualified and Status for one device" },
2196 /*0xF80D - 0xF81F reserved */
2197 { 0xF820, "ARData" },
2198 { 0xF821, "APIData" },
2199 /*0xF822 - 0xF82F reserved */
2200 { 0xF830, "LogData" },
2201 { 0xF831, "PDevData" },
2202 /*0xF832 - 0xF83F reserved */
2203 { 0xF840, "I&M0FilterData" },
2204 { 0xF841, "PDRealData" },
2205 { 0xF842, "PDExpectedData" },
2206 /*0xF843 - 0xF84F reserved */
2207 { 0xF850, "AutoConfigurarion" },
2208 { 0xF880, "AssetManagementData" },
2209 /*0xF851 - 0xFBFF reserved */
2210 /*0xFC00 - 0xFFFF reserved for profiles */
2214 static const value_string pn_io_user_structure_identifier[] = {
2215 /*0x0000 - 0x7FFF manufacturer specific */
2216 { 0x8000, "ChannelDiagnosis" },
2217 { 0x8001, "Multiple" },
2218 { 0x8002, "ExtChannelDiagnosis" },
2219 { 0x8003, "QualifiedChannelDiagnosis" },
2220 /*0x8004 - 0x80FF reserved */
2221 { 0x8100, "Maintenance" },
2222 /*0x8101 - 0x8FFF reserved except 8300, 8301, 8302, 8303 */
2223 { 0x8300, "Sequence of events RS_LowWatermark" },
2224 { 0x8301, "Sequence of events RS_Timeout" },
2225 { 0x8302, "Sequence of events RS_Overflow" },
2226 { 0x8303, "Sequence of events RS_Event" },
2227 /*0x9000 - 0x9FFF reserved for profiles */
2228 /*0xA000 - 0xFFFF reserved */
2232 static const value_string pn_io_channel_error_type[] = {
2233 { 0x0000, "reserved" },
2234 { 0x0001, "short circuit" },
2235 { 0x0002, "Undervoltage" },
2236 { 0x0003, "Overvoltage" },
2237 { 0x0004, "Overload" },
2238 { 0x0005, "Overtemperature" },
2239 { 0x0006, "line break" },
2240 { 0x0007, "upper limit value exceeded" },
2241 { 0x0008, "lower limit value exceeded" },
2242 { 0x0009, "Error" },
2243 /*0x000A - 0x000F reserved */
2244 { 0x0010, "parametrization fault" },
2245 { 0x0011, "power supply fault" },
2246 { 0x0012, "fuse blown / open" },
2247 { 0x0013, "Manufacturer specific" },
2248 { 0x0014, "ground fault" },
2249 { 0x0015, "reference point lost" },
2250 { 0x0016, "process event lost / sampling error" },
2251 { 0x0017, "threshold warning" },
2252 { 0x0018, "output disabled" },
2253 { 0x0019, "safety event" },
2254 { 0x001A, "external fault" },
2255 /*0x001B - 0x001F manufacturer specific */
2256 /*0x0020 - 0x00FF reserved for common profiles */
2257 /*0x0100 - 0x7FFF manufacturer specific */
2258 { 0x8000, "Data transmission impossible" },
2259 { 0x8001, "Remote mismatch" },
2260 { 0x8002, "Media redundancy mismatch" },
2261 { 0x8003, "Sync mismatch" },
2262 { 0x8004, "IsochronousMode mismatch" },
2263 { 0x8005, "Multicast CR mismatch" },
2264 { 0x8006, "reserved" },
2265 { 0x8007, "Fiber optic mismatch" },
2266 { 0x8008, "Network component function mismatch" },
2267 { 0x8009, "Time mismatch" },
2268 /* added values for IEC version 2.3: */
2269 { 0x800A, "Dynamic frame packing function mismatch" },
2270 { 0x800B, "Media redundancy with planned duplication mismatch"},
2271 { 0x800C, "System redundancy mismatch"},
2273 /*0x800D - 0x8FFF reserved */
2274 /*0x9000 - 0x9FFF reserved for profile */
2275 /*0xA000 - 0xFFFF reserved */
2278 /* ExtChannelErrorType for ChannelErrorType 0 - 0x7FFF */
2280 static const value_string pn_io_ext_channel_error_type0[] = {
2281 /* 0x0000 Reserved */
2282 /* 0x0001 - 0x7FFF Manufacturer specific */
2283 { 0x8000, "Accumulative Info"},
2284 /* 0x8001 - 0x8FFF Reserved */
2285 /* 0x9000 - 0x9FFF Reserved for profiles */
2286 /* 0xA000 - 0xFFFF Reserved */
2291 /* ExtChannelErrorType for ChannelErrorType "Data transmission impossible" */
2292 static const value_string pn_io_ext_channel_error_type0x8000[] = {
2293 /* 0x0000 Reserved */
2294 /* 0x0001 - 0x7FFF Manufacturer specific */
2295 { 0x8000, "Link State mismatch - Link down"},
2296 { 0x8001, "MAUType mismatch"},
2297 { 0x8002, "Line Delay mismatch"},
2298 /* 0x8003 - 0x8FFF Reserved */
2299 /* 0x9000 - 0x9FFF Reserved for profiles */
2300 /* 0xA000 - 0xFFFF Reserved */
2304 /* ExtChannelErrorType for ChannelErrorType "Remote mismatch" */
2305 static const value_string pn_io_ext_channel_error_type0x8001[] = {
2306 /* 0x0000 Reserved */
2307 /* 0x0001 - 0x7FFF Manufacturer specific */
2308 { 0x8000, "Peer Chassis ID mismatch"},
2309 { 0x8001, "Peer Port ID mismatch"},
2310 { 0x8002, "Peer RT_CLASS_3 mismatch a"},
2311 { 0x8003, "Peer MAUType mismatch"},
2312 { 0x8004, "Peer MRP domain mismatch"},
2313 { 0x8005, "No peer detected"},
2314 { 0x8006, "Reserved"},
2315 { 0x8007, "Peer Line Delay mismatch"},
2316 { 0x8008, "Peer PTCP mismatch b"},
2317 { 0x8009, "Peer Preamble Length mismatch"},
2318 { 0x800A, "Peer Fragmentation mismatch"},
2319 /* 0x800B - 0x8FFF Reserved */
2320 /* 0x9000 - 0x9FFF Reserved for profiles */
2321 /* 0xA000 - 0xFFFF Reserved */
2325 /* ExtChannelErrorType for ChannelErrorType "Media redundancy mismatch" 0x8002 */
2326 static const value_string pn_io_ext_channel_error_type0x8002[] = {
2327 /* 0x0000 Reserved */
2328 /* 0x0001 - 0x7FFF Manufacturer specific */
2329 { 0x8000, "Manager role fail MRP-instance 1"},
2330 { 0x8001, "MRP-instance 1 ring open"},
2331 { 0x8002, "Reserved"},
2332 { 0x8003, "Multiple manager MRP-instance 1"},
2333 { 0x8010, "Manager role fail MRP-instance 2"},
2334 { 0x8011, "MRP-instance 2 ring open"},
2335 { 0x8012, "Reserved"},
2336 { 0x8013, "Multiple manager MRP-instance 2"},
2337 { 0x8020, "Manager role fail MRP-instance 3"},
2338 { 0x8021, "MRP-instance 3 ring open"},
2339 { 0x8023, "Multiple manager MRP-instance 3"},
2340 { 0x8030, "Manager role fail MRP-instance 4"},
2341 { 0x8031, "MRP-instance 4 ring open"},
2342 { 0x8033, "Multiple manager MRP-instance 4"},
2343 { 0x8040, "Manager role fail MRP-instance 5"},
2344 { 0x8041, "MRP-instance 5 ring open"},
2345 { 0x8043, "Multiple manager MRP-instance 5"},
2346 { 0x8050, "Manager role fail MRP-instance 6"},
2347 { 0x8051, "MRP-instance 6 ring open"},
2348 { 0x8053, "Multiple manager MRP-instance 6"},
2349 { 0x8060, "Manager role fail MRP-instance 7"},
2350 { 0x8061, "MRP-instance 7 ring open"},
2351 { 0x8063, "Multiple manager MRP-instance 7"},
2352 { 0x8070, "Manager role fail MRP-instance 8"},
2353 { 0x8071, "MRP-instance 8 ring open"},
2354 { 0x8073, "Multiple manager MRP-instance 8"},
2355 { 0x8080, "Manager role fail MRP-instance 9"},
2356 { 0x8081, "MRP-instance 9 ring open"},
2357 { 0x8083, "Multiple manager MRP-instance 9"},
2358 { 0x8090, "Manager role fail MRP-instance 10"},
2359 { 0x8091, "MRP-instance 10 ring open"},
2360 { 0x8093, "Multiple manager MRP-instance 10"},
2361 { 0x80A0, "Manager role fail MRP-instance 11"},
2362 { 0x80A1, "MRP-instance 11 ring open"},
2363 { 0x80A3, "Multiple manager MRP-instance 11"},
2364 { 0x80B0, "Manager role fail MRP-instance 12"},
2365 { 0x80B1, "MRP-instance 12 ring open"},
2366 { 0x80B3, "Multiple manager MRP-instance 12"},
2367 { 0x80C0, "Manager role fail MRP-instance 13"},
2368 { 0x80C1, "MRP-instance 13 ring open"},
2369 { 0x80C3, "Multiple manager MRP-instance 13"},
2370 { 0x80D0, "Manager role fail MRP-instance 14"},
2371 { 0x80D1, "MRP-instance 14 ring open"},
2372 { 0x80D3, "Multiple manager MRP-instance 14"},
2373 { 0x80E0, "Manager role fail MRP-instance 15"},
2374 { 0x80E1, "MRP-instance 15 ring open"},
2375 { 0x80E3, "Multiple manager MRP-instance 15"},
2376 { 0x80F0, "Manager role fail MRP-instance 16"},
2377 { 0x80F1, "MRP-instance 16 ring open"},
2378 { 0x80F3, "Multiple manager MRP-instance 16"},
2379 /* 0x8004 - 0x8FFF Reserved */
2380 /* 0x9000 - 0x9FFF Reserved for profiles */
2381 /* 0xA000 - 0xFFFF Reserved */
2385 /* ExtChannelErrorType for ChannelErrorType "Sync mismatch" and for ChannelErrorType "Time mismatch" 0x8003 and 0x8009*/
2386 static const value_string pn_io_ext_channel_error_type0x8003[] = {
2387 /* 0x0000 Reserved */
2388 /* 0x0001 - 0x7FFF Manufacturer specific */
2389 { 0x8000, "No sync message received"},
2390 { 0x8001, "- 0x8002 Reserved"},
2391 { 0x8003, "Jitter out of boundary"},
2392 /* 0x8004 - 0x8FFF Reserved */
2393 /* 0x9000 - 0x9FFF Reserved for profiles */
2394 /* 0xA000 - 0xFFFF Reserved */
2398 /*ExtChannelErrorType for ChannelErrorType "Isochronous mode mismatch" 0x8004 */
2399 static const value_string pn_io_ext_channel_error_type0x8004[] = {
2400 /* 0x0000 Reserved */
2401 /* 0x0001 - 0x7FFF Manufacturer specific */
2402 { 0x8000, "Output Time Failure - Output update missing or out of order"},
2403 { 0x8001, "Input Time Failure"},
2404 { 0x8002, "Master Life Sign Failure - Error in MLS update detected"},
2405 /* 0x8003 - 0x8FFF Reserved */
2406 /* 0x9000 - 0x9FFF Reserved for profiles */
2407 /* 0xA000 - 0xFFFF Reserved */
2411 /* ExtChannelErrorType for ChannelErrorType "Multicast CR mismatch" 0x8005 */
2412 static const value_string pn_io_ext_channel_error_type0x8005[] = {
2413 /* 0x0000 Reserved */
2414 /* 0x0001 - 0x7FFF Manufacturer specific */
2415 { 0x8000, "Multicast Consumer CR timed out"},
2416 { 0x8001, "Address resolution failed"},
2417 /* 0x8002 - 0x8FFF Reserved */
2418 /* 0x9000 - 0x9FFF Reserved for profiles */
2419 /* 0xA000 - 0xFFFF Reserved */
2423 /* ExtChannelErrorType for ChannelErrorType "Fiber optic mismatch" 0x8007*/
2424 static const value_string pn_io_ext_channel_error_type0x8007[] = {
2425 /* 0x0000 Reserved */
2426 /* 0x0001 - 0x7FFF Manufacturer specific */
2427 { 0x8000, "Power Budget"},
2428 /* 0x8001 - 0x8FFF Reserved */
2429 /* 0x9000 - 0x9FFF Reserved for profiles */
2430 /* 0xA000 - 0xFFFF Reserved */
2434 /* ExtChannelErrorType for ChannelErrorType "Network component function mismatch" 0x8008 */
2435 static const value_string pn_io_ext_channel_error_type0x8008[] = {
2436 /* 0x0000 Reserved */
2437 /* 0x0001 - 0x7FFF Manufacturer specific */
2438 { 0x8000, "Frame dropped - no resource"},
2439 /* 0x8001 - 0x8FFF Reserved */
2440 /* 0x9000 - 0x9FFF Reserved for profiles */
2441 /* 0xA000 - 0xFFFF Reserved */
2445 /* ExtChannelErrorType for ChannelErrorType "Dynamic Frame Packing function mismatch" 0x800A */
2446 static const value_string pn_io_ext_channel_error_type0x800A[] = {
2447 /* 0x0000 Reserved */
2448 /* 0x0001 - 0x7FFF Manufacturer specific */
2449 /* 0x8000 - 0x80FF Reserved */
2450 { 0x8100, "Frame late error for FrameID (0x0100)"},
2451 /* 0x8101 + 0x8FFE See Equation (56) */
2452 { 0x8FFF, "Frame late error for FrameID (0x0FFF)"},
2453 /* 0x8001 - 0x8FFF Reserved */
2454 /* 0x9000 - 0x9FFF Reserved for profiles */
2455 /* 0xA000 - 0xFFFF Reserved */
2459 /* ExtChannelErrorType for ChannelErrorType "Media redundancy with planned duplication mismatch" 0x800B */
2460 static const value_string pn_io_ext_channel_error_type0x800B[] = {
2461 /* 0x0000 Reserved */
2462 /* 0x0001 - 0x7FFF Manufacturer specific */
2463 /* 0x8000 - 0x86FF Reserved */
2464 { 0x8700, "MRPD duplication void for FrameID (0x0700)"},
2465 /* 0x8701 + 0x8FFE See Equation (57) */
2466 { 0x8FFF, "MRPD duplication void for FrameID (0x0FFF)"},
2467 /* 0x9000 - 0x9FFF Reserved for profiles */
2468 /* 0xA000 - 0xFFFF Reserved */
2472 /* ExtChannelErrorType for ChannelErrorType "System redundancy mismatch" 0x800C */
2473 static const value_string pn_io_ext_channel_error_type0x800C[] = {
2474 /* 0x0000 Reserved */
2475 /* 0x0001 - 0x7FFF Manufacturer specific */
2476 { 0x8000, "System redundancy event"},
2477 /* 0x8001 - 0x8FFF Reserved */
2478 /* 0x9000 - 0x9FFF Reserved for profiles */
2479 /* 0xA000 - 0xFFFF Reserved */
2483 static const value_string pn_io_channel_properties_type[] = {
2484 { 0x0000, "submodule or unspecified" },
2485 { 0x0001, "1 Bit" },
2486 { 0x0002, "2 Bit" },
2487 { 0x0003, "4 Bit" },
2488 { 0x0004, "8 Bit" },
2489 { 0x0005, "16 Bit" },
2490 { 0x0006, "32 Bit" },
2491 { 0x0007, "64 Bit" },
2492 /*0x0008 - 0x00FF reserved */
2496 static const value_string pn_io_channel_properties_accumulative_vals[] = {
2497 { 0x0000, "Channel" },
2498 { 0x0001, "ChannelGroup" },
2502 /* We are reading this as a two bit value, but the spec specifies each bit
2503 * separately. Beware endianness when reading spec
2505 static const value_string pn_io_channel_properties_maintenance[] = {
2506 { 0x0000, "Failure" },
2507 { 0x0001, "Maintenance required" },
2508 { 0x0002, "Maintenance demanded" },
2509 { 0x0003, "see QualifiedChannelQualifier" },
2513 static const value_string pn_io_channel_properties_specifier[] = {
2514 { 0x0000, "All subsequent disappears" },
2515 { 0x0001, "Appears" },
2516 { 0x0002, "Disappears" },
2517 { 0x0003, "Disappears but others remain" },
2521 static const value_string pn_io_channel_properties_direction[] = {
2522 { 0x0000, "Manufacturer-specific" },
2523 { 0x0001, "Input" },
2524 { 0x0002, "Output" },
2525 { 0x0003, "Input/Output" },
2526 /*0x0004 - 0x0007 reserved */
2530 static const value_string pn_io_alarmcr_type[] = {
2531 { 0x0000, "reserved" },
2532 { 0x0001, "Alarm CR" },
2533 /*0x0002 - 0xFFFF reserved */
2537 static const value_string pn_io_mau_type[] = {
2538 /*0x0000 - 0x0004 reserved */
2539 { 0x0005, "10BASET" },
2540 /*0x0006 - 0x0009 reserved */
2541 { 0x000A, "10BASETXHD" },
2542 { 0x000B, "10BASETXFD" },
2543 { 0x000C, "10BASEFLHD" },
2544 { 0x000D, "10BASEFLFD" },
2545 { 0x000F, "100BASETXHD" },
2546 { 0x0010, "100BASETXFD" },
2547 { 0x0011, "100BASEFXHD" },
2548 { 0x0012, "100BASEFXFD" },
2549 /*0x0013 - 0x0014 reserved */
2550 { 0x0015, "1000BASEXHD" },
2551 { 0x0016, "1000BASEXFD" },
2552 { 0x0017, "1000BASELXHD" },
2553 { 0x0018, "1000BASELXFD" },
2554 { 0x0019, "1000BASESXHD" },
2555 { 0x001A, "1000BASESXFD" },
2556 /*0x001B - 0x001C reserved */
2557 { 0x001D, "1000BASETHD" },
2558 { 0x001E, "1000BASETFD" },
2559 { 0x001F, "10GigBASEFX" },
2560 /*0x0020 - 0x002D reserved */
2561 { 0x002E, "100BASELX10" },
2562 /*0x002F - 0x0035 reserved */
2563 { 0x0036, "100BASEPXFD" },
2564 /*0x0037 - 0xFFFF reserved */
2569 static const value_string pn_io_preamble_length[] = {
2570 { 0x0000, "Seven octets Preamble shall be used" },
2571 { 0x0001, "One octet Preamble shall be used" },
2572 /*0x0002 - 0xFFFF reserved */
2576 static const value_string pn_io_mau_type_mode[] = {
2579 /*0x0002 - 0xFFFF reserved */
2584 static const value_string pn_io_dcp_boundary_value_bit0[] = {
2585 { 0x00, "Do not block the multicast MAC address 01-0E-CF-00-00-00" },
2586 { 0x01, "Block an outgoing DCP_Identify frame (egress filter) with the multicast MAC address 01-0E-CF-00-00-00" },
2590 static const value_string pn_io_dcp_boundary_value_bit1[] = {
2591 { 0x00, "Do not block the multicast MAC address 01-0E-CF-00-00-01" },
2592 { 0x01, "Block an outgoing DCP_Hello frame (egress filter) with the multicast MAC address 01-0E-CF-00-00-01" },
2596 static const value_string pn_io_peer_to_peer_boundary_value_bit0[] = {
2597 { 0x00, "The LLDP agent shall send LLDP frames for this port." },
2598 { 0x01, "The LLDP agent shall not send LLDP frames (egress filter)." },
2602 static const value_string pn_io_peer_to_peer_boundary_value_bit1[] = {
2603 { 0x00, "The PTCP ASE shall send PTCP_DELAY request frames for this port." },
2604 { 0x01, "The PTCP ASE shall not send PTCP_DELAY request frames (egress filter)." },
2608 static const value_string pn_io_peer_to_peer_boundary_value_bit2[] = {
2609 { 0x00, "The Time ASE shall send PATH_DELAY request frames for this port." },
2610 { 0x01, "The Time ASE shall not send PATH_DELAY request frames (egress filter)." },
2614 static const range_string pn_io_mau_type_extension[] = {
2615 { 0x0000, 0x0000, "No SubMAUType" },
2616 { 0x0001, 0x00FF, "Reserved" },
2617 { 0x0100, 0x0100, "POF" },
2618 { 0x0101, 0xFFEF, "Reserved for SubMAUType" },
2619 { 0xFFF0, 0xFFFF, "Reserved" },
2624 static const value_string pn_io_port_state[] = {
2625 { 0x0000, "reserved" },
2628 { 0x0003, "testing" },
2629 { 0x0004, "unknown" },
2630 /*0x0005 - 0xFFFF reserved */
2635 static const value_string pn_io_media_type[] = {
2636 { 0x0000, "Unknown" },
2637 { 0x0001, "Copper cable" },
2638 { 0x0002, "Fiber optic cable" },
2639 { 0x0003, "Radio communication" },
2640 /*0x0004 - 0xFFFF reserved */
2645 static const value_string pn_io_fiber_optic_type[] = {
2646 { 0x0000, "No fiber type adjusted" },
2647 { 0x0001, "9 um single mode fiber" },
2648 { 0x0002, "50 um multi mode fiber" },
2649 { 0x0003, "62,5 um multi mode fiber" },
2650 { 0x0004, "SI-POF, NA=0.5" },
2651 { 0x0005, "SI-PCF, NA=0.36" },
2652 { 0x0006, "LowNA-POF, NA=0.3" },
2653 { 0x0007, "GI-POF" },
2654 /*0x0008 - 0xFFFF reserved */
2659 static const value_string pn_io_fiber_optic_cable_type[] = {
2660 { 0x0000, "No cable specified" },
2661 { 0x0001, "Inside/outside cable, fixed installation" },
2662 { 0x0002, "Inside/outside cable, flexible installation" },
2663 { 0x0003, "Outdoor cable, fixed installation" },
2664 /*0x0004 - 0xFFFF reserved */
2668 static const value_string pn_io_im_revision_prefix_vals[] = {
2669 { 'V', "V - Officially released version" },
2670 { 'R', "R - Revision" },
2671 { 'P', "P - Prototype" },
2672 { 'U', "U - Under Test (Field Test)" },
2673 { 'T', "T - Test Device" },
2674 /*all others reserved */
2679 static const value_string pn_io_mrp_role_vals[] = {
2680 { 0x0000, "Media Redundancy disabled" },
2681 { 0x0001, "Media Redundancy Client" },
2682 { 0x0002, "Media Redundancy Manager" },
2683 /*all others reserved */
2687 static const value_string pn_io_mrp_instance_no[] = {
2688 { 0x0000, "MRP_Instance 1" },
2689 { 0x0001, "MRP_Instance 2" },
2690 { 0x0002, "MRP_Instance 3" },
2691 { 0x0003, "MRP_Instance 4" },
2692 { 0x0004, "MRP_Instance 5" },
2693 { 0x0005, "MRP_Instance 6" },
2694 { 0x0006, "MRP_Instance 7" },
2695 { 0x0007, "MRP_Instance 8" },
2696 { 0x0008, "MRP_Instance 9" },
2697 { 0x0009, "MRP_Instance 10" },
2698 { 0x000A, "MRP_Instance 11" },
2699 { 0x000B, "MRP_Instance 12" },
2700 { 0x000C, "MRP_Instance 13" },
2701 { 0x000D, "MRP_Instance 14" },
2702 { 0x000E, "MRP_Instance 15" },
2703 { 0x000F, "MRP_Instance 16" },
2704 /*all others reserved */
2708 static const value_string pn_io_mrp_mrm_on[] = {
2709 { 0x0000, "Disable MediaRedundancyManager diagnosis" },
2710 { 0x0001, "Enable MediaRedundancyManager diagnosis"},
2713 static const value_string pn_io_mrp_checkUUID[] = {
2714 { 0x0000, "Disable the check of the MRP_DomainUUID" },
2715 { 0x0001, "Enable the check of the MRP_DomainUUID"},
2719 static const value_string pn_io_mrp_prio_vals[] = {
2720 { 0x0000, "Highest priority redundancy manager" },
2721 /* 0x1000 - 0x7000 High priorities */
2722 { 0x8000, "Default priority for redundancy manager" },
2723 /* 0x9000 - 0xE000 Low priorities */
2724 { 0xF000, "Lowest priority redundancy manager" },
2725 /*all others reserved */
2729 static const value_string pn_io_mrp_rtmode_rtclass12_vals[] = {
2730 { 0x0000, "RT_CLASS_1 and RT_CLASS_2 redundancy mode deactivated" },
2731 { 0x0001, "RT_CLASS_1 and RT_CLASS_2 redundancy mode activated" },
2735 static const value_string pn_io_mrp_rtmode_rtclass3_vals[] = {
2736 { 0x0000, "RT_CLASS_3 redundancy mode deactivated" },
2737 { 0x0001, "RT_CLASS_3 redundancy mode activated" },
2741 static const value_string pn_io_mrp_ring_state_vals[] = {
2742 { 0x0000, "Ring open" },
2743 { 0x0001, "Ring closed" },
2747 static const value_string pn_io_mrp_rt_state_vals[] = {
2748 { 0x0000, "RT media redundancy lost" },
2749 { 0x0001, "RT media redundancy available" },
2753 static const value_string pn_io_control_properties_vals[] = {
2754 { 0x0000, "Reserved" },
2758 static const value_string pn_io_control_properties_prmbegin_vals[] = {
2759 { 0x0000, "No PrmBegin" },
2760 { 0x0001, "The IO controller starts the transmisson of the stored start-up parameter" },
2763 static const value_string pn_io_control_properties_application_ready_vals[] = {
2764 { 0x0000, "Wait for explicit ControlCommand.ReadyForCompanion" },
2765 { 0x0001, "Implicit ControlCommand.ReadyForCompanion" },
2769 static const value_string pn_io_fs_hello_mode_vals[] = {
2771 { 0x0001, "Send req on LinkUp" },
2772 { 0x0002, "Send req on LinkUp after HelloDelay" },
2776 static const value_string pn_io_fs_parameter_mode_vals[] = {
2779 { 0x0002, "Reserved" },
2780 { 0x0003, "Reserved" },
2784 static const value_string pn_io_frame_details_sync_master_vals[] = {
2785 { 0x0000, "No Sync Frame" },
2786 { 0x0001, "Primary sync frame" },
2787 { 0x0002, "Secondary sync frame" },
2788 { 0x0003, "Reserved" },
2791 static const value_string pn_io_frame_details_meaning_frame_send_offset_vals[] = {
2792 { 0x0000, "Field FrameSendOffset specifies the point of time for receiving or transmitting a frame " },
2793 { 0x0001, "Field FrameSendOffset specifies the beginning of the RT_CLASS_3 interval within a phase" },
2794 { 0x0002, "Field FrameSendOffset specifies the ending of the RT_CLASS_3 interval within a phase" },
2795 { 0x0003, "Reserved" },
2799 static const value_string pn_io_f_check_seqnr[] = {
2800 { 0x00, "consecutive number not included in crc" },
2801 { 0x01, "consecutive number included in crc" },
2805 static const value_string pn_io_f_check_ipar[] = {
2806 { 0x00, "no check" },
2811 static const value_string pn_io_f_sil[] = {
2819 static const value_string pn_io_f_crc_len[] = {
2820 { 0x00, "3 octet CRC" },
2821 { 0x01, "2 octet CRC" },
2822 { 0x02, "4 octet CRC" },
2823 { 0x03, "reserved" },
2827 static const value_string pn_io_f_crc_seed[] = {
2828 { 0x00, "CRC-FP as seed value and counter" },
2829 { 0x01, "'1' as seed value and CRC-FP+/MNR" },
2833 /* F_Block_ID dissection due to ver2.6 specifikation of PI */
2834 static const value_string pn_io_f_block_id[] = {
2835 { 0x00, "No F_WD_Time_2, no F_iPar_CRC" },
2836 { 0x01, "No F_WD_Time_2, F_iPar_CRC" },
2837 { 0x02, "F_WD_Time_2, no F_iPar_CRC" },
2838 { 0x03, "F_WD_Time_2, F_iPar_CRC" },
2839 /* 0x04..0x07 reserved */
2840 /* { 0x00, "Parameter set for F-Host/F-Device relationship" }, */
2841 /* { 0x01, "Additional F_Address parameter block" }, */
2842 /* 0x02..0x07 reserved */
2846 static const value_string pn_io_f_par_version[] = {
2847 { 0x00, "Valid for V1-mode" },
2848 { 0x01, "Valid for V2-mode" },
2849 /* 0x02..0x03 reserved */
2853 static const value_string pn_io_profidrive_request_id_vals[] = {
2854 { 0x00, "Reserved" },
2855 { 0x01, "Read request" },
2856 { 0x02, "Change request" },
2860 static const value_string pn_io_profidrive_response_id_vals[] = {
2861 { 0x00, "Reserved" },
2862 { 0x01, "Positive read response" },
2863 { 0x02, "Positive change response" },
2864 { 0x81, "Negative read response" },
2865 { 0x82, "Negative change response" },
2869 static const value_string pn_io_profidrive_attribute_vals[] = {
2870 { 0x00, "Reserved" },
2872 { 0x20, "Description" },
2877 static const value_string pn_io_profidrive_format_vals[] = {
2879 {0x02, "Integer8" },
2880 {0x03, "Integer16" },
2881 {0x04, "Integer32" },
2882 {0x05, "Unsigned8" },
2883 {0x06, "Unsigned16" },
2884 {0x07, "Unsigned32" },
2886 {0x09, "VisibleString" },
2887 {0x0A, "OctetString" },
2888 {0x0C, "TimeOfDay" },
2889 {0x0D, "TimeDifference" },
2891 {0x34, "TimeOfDay" },
2892 {0x35, "TimeDifference" },
2893 {0x36, "TimeDifference" },
2897 static const range_string pn_io_rs_block_type[] = {
2898 /* Following ranges are used for events */
2899 { 0x0000, 0x0000, "reserved" },
2900 { 0x0001, 0x3FFF, "Manufacturer specific" },
2901 { 0x4000, 0x4000, "Stop observer - Observer Status Observer" },
2902 { 0x4001, 0x4001, "Buffer observer - RS_BufferObserver" },
2903 { 0x4002, 0x4002, "Time status observer - RS_TimeStatus" },
2904 { 0x4003, 0x4003, "System redundancy layer observer - RS_SRLObserver" },
2905 { 0x4004, 0x4004, "Source identification observer - RS_SourceIdentification" },
2906 { 0x4005, 0x400F, "reserved" },
2907 { 0x4010, 0x4010, "Digital input observer - SoE_DigitalInputObserver" },
2908 { 0x4011, 0x6FFF, "Reserved for normative usage" },
2909 { 0x7000, 0x7FFF, "Reserved for profile usage" },
2910 /* Following ranges are used for adjust */
2911 { 0x8000, 0x8000, "reserved" },
2912 { 0x8001, 0xBFFF, "Manufacturer specific" },
2913 { 0xC000, 0xC00F, "Reserved for normative usage" },
2914 { 0xC010, 0xC010, "Digital input observer - SoE_DigitalInputObserver" },
2915 { 0xC011, 0xEFFF, "Reserved for normative usage"},
2916 { 0xF000, 0xFFFF, "Reserved for profile usage"},
2920 static const value_string pn_io_rs_specifier_specifier[] = {
2921 { 0x0, "Current value" },
2923 { 0x2, "Disappears" },
2924 { 0x3, "Reserved" },
2928 static const value_string pn_io_rs_time_stamp_status[] = {
2929 { 0x0, "TimeStamp related to global synchronized time" },
2930 { 0x1, "TimeStamp related to local time" },
2931 { 0x2, "TimeStamp related to local (arbitrary timescale) time" },
2935 static const value_string pn_io_rs_reason_code_reason[] = {
2936 { 0x00000000, "Reserved" },
2937 { 0x00000001, "Observed data status unclear" },
2938 { 0x00000002, "Buffer overrun" },
2939 /* 0x0003 - 0xFFFF Reserved */
2943 static const value_string pn_io_rs_reason_code_detail[] = {
2944 { 0x00000000, "No Detail" },
2945 /* 0x0001 - 0xFFFF Reserved */
2949 static const value_string pn_io_soe_digital_input_current_value_value[] = {
2950 { 0x0, "Digital input is zero" },
2951 { 0x1, "Digital input is one" },
2955 static const value_string pn_io_soe_adjust_specifier_incident[] = {
2956 { 0x00, "Reserved" },
2957 { 0x01, "Rising edge" },
2958 { 0x02, "Falling edge" },
2959 { 0x03, "Reserved" },
2963 static const value_string pn_io_rs_properties_alarm_transport[] = {
2964 { 0x00000000, "Default Reporting system events need to be read by record " },
2965 { 0x00000001, "Reporting system events shall be forwarded to the IOC using the alarm transport" },
2969 static const value_string pn_io_am_location_structure_vals[] = {
2970 { 0x00, "Reserved" },
2971 { 0x01, "Twelve level tree format" },
2972 { 0x02, "Slot - and SubslotNumber format" },
2976 static const range_string pn_io_am_location_level_vals[] = {
2977 { 0x0000, 0x03FE, "Address information to identify a reported node" },
2978 { 0x03FF, 0x03FF, "Level not used" },
2982 static const value_string pn_io_am_location_reserved_vals[] = {
2983 { 0x00, "Reserved" },
2987 static const range_string pn_io_RedundancyDataHoldFactor[] = {
2988 { 0x0000, 0x0002, "Reserved" },
2989 { 0x0003, 0x00C7, "Optional - An expiration of the time leads to an AR termination." },
2990 { 0x00C8, 0xFFFF, "Mandatory - An expiration of the time leads to an AR termination." },
2994 static const value_string pn_io_ar_arnumber[] = {
2995 { 0x0000, "reserved" },
2996 { 0x0001, "1st AR of an ARset" },
2997 { 0x0002, "2nd AR of an ARset" },
2998 { 0x0003, "3rd AR of an ARset" },
2999 { 0x0004, "4th AR of an ARset" },
3000 /*0x0005 - 0xFFFF reserved */
3004 static const value_string pn_io_ar_arresource[] = {
3005 { 0x0000, "reserved" },
3006 { 0x0002, "Communication endpoint shall allocate two ARs for the ARset" },
3007 /*0x0001 and 0x0003 - 0xFFFF reserved */
3011 static const range_string pn_io_line_delay_value[] = {
3012 { 0x00000000, 0x00000000, "Line delay and cable delay unknown" },
3013 { 0x00000001, 0x7FFFFFFF, "Line delay in nanoseconds" },
3017 static const range_string pn_io_cable_delay_value[] = {
3018 { 0x00000000, 0x00000000, "Reserved" },
3019 { 0x00000001, 0x7FFFFFFF, "Cable delay in nanoseconds" },
3023 static const true_false_string pn_io_pdportstatistic_counter_status_contents = {
3024 "The contents of the field are invalid. They shall be set to zero.",
3025 "The contents of the field are valid"
3028 static const value_string pn_io_pdportstatistic_counter_status_reserved[] = {
3029 { 0x00, "Reserved" },
3034 dissect_profidrive_value(tvbuff_t *tvb, gint offset, packet_info *pinfo,
3035 proto_tree *tree, guint8 *drep, guint8 format_val)
3046 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
3047 hf_pn_io_profidrive_param_value_byte, &value8);
3051 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3052 hf_pn_io_profidrive_param_value_word, &value16);
3056 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
3057 hf_pn_io_profidrive_param_value_dword, &value32);
3060 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
3061 hf_pn_io_profidrive_param_value_float, &value32);
3067 sLen = (gint)tvb_strnlen( tvb, offset, -1);
3068 proto_tree_add_item(tree, hf_pn_io_profidrive_param_value_string, tvb, offset, sLen, ENC_ASCII|ENC_NA);
3069 offset = (offset + sLen);
3073 offset = offset + 1;
3074 expert_add_info_format(pinfo, tree, &ei_pn_io_unsupported, "Not supported or invalid format %u!", format_val);
3080 static GList *pnio_ars;
3082 typedef struct pnio_ar_s {
3085 guint16 inputframeid;
3086 guint16 outputframeid;
3088 /* controller only */
3089 /*const char controllername[33];*/
3090 const guint8 controllermac[6];
3091 guint16 controlleralarmref;
3094 const guint8 devicemac[6];
3095 guint16 devicealarmref;
3102 pnio_ar_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pnio_ar_t *ar)
3104 p_add_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0, ar );
3105 p_add_proto_data(pinfo->pool, pinfo, proto_pn_io, 0, GUINT_TO_POINTER(10));
3109 proto_item *sub_item;
3110 proto_tree *sub_tree;
3111 address controllermac_addr, devicemac_addr;
3113 set_address(&controllermac_addr, AT_ETHER, 6, ar->controllermac);
3114 set_address(&devicemac_addr, AT_ETHER, 6, ar->devicemac);
3116 sub_tree = proto_tree_add_subtree_format(tree, tvb, 0, 0, ett_pn_io_ar_info, &sub_item,
3117 "ARUUID:%s ContrMAC:%s ContrAlRef:0x%x DevMAC:%s DevAlRef:0x%x InCR:0x%x OutCR=0x%x",
3118 guid_to_str(wmem_packet_scope(), (const e_guid_t*) &ar->aruuid),
3119 address_to_str(wmem_packet_scope(), &controllermac_addr), ar->controlleralarmref,
3120 address_to_str(wmem_packet_scope(), &devicemac_addr), ar->devicealarmref,
3121 ar->inputframeid, ar->outputframeid);
3122 PROTO_ITEM_SET_GENERATED(sub_item);
3124 item = proto_tree_add_guid(sub_tree, hf_pn_io_ar_uuid, tvb, 0, 0, (e_guid_t *) &ar->aruuid);
3125 PROTO_ITEM_SET_GENERATED(item);
3127 item = proto_tree_add_ether(sub_tree, hf_pn_io_cminitiator_macadd, tvb, 0, 0, ar->controllermac);
3128 PROTO_ITEM_SET_GENERATED(item);
3129 item = proto_tree_add_uint(sub_tree, hf_pn_io_localalarmref, tvb, 0, 0, ar->controlleralarmref);
3130 PROTO_ITEM_SET_GENERATED(item);
3132 item = proto_tree_add_ether(sub_tree, hf_pn_io_cmresponder_macadd, tvb, 0, 0, ar->devicemac);
3133 PROTO_ITEM_SET_GENERATED(item);
3134 item = proto_tree_add_uint(sub_tree, hf_pn_io_localalarmref, tvb, 0, 0, ar->devicealarmref);
3135 PROTO_ITEM_SET_GENERATED(item);
3137 item = proto_tree_add_uint(sub_tree, hf_pn_io_frame_id, tvb, 0, 0, ar->inputframeid);
3138 PROTO_ITEM_SET_GENERATED(item);
3139 item = proto_tree_add_uint(sub_tree, hf_pn_io_frame_id, tvb, 0, 0, ar->outputframeid);
3140 PROTO_ITEM_SET_GENERATED(item);
3147 static int dissect_block(tvbuff_t *tvb, int offset,
3148 packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar);
3150 static int dissect_a_block(tvbuff_t *tvb, int offset,
3151 packet_info *pinfo, proto_tree *tree, guint8 *drep);
3153 static int dissect_blocks(tvbuff_t *tvb, int offset,
3154 packet_info *pinfo, proto_tree *tree, guint8 *drep);
3156 static int dissect_PNIO_IOxS(tvbuff_t *tvb, int offset,
3157 packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex);
3164 pnio_ar_find_by_aruuid(packet_info *pinfo _U_, e_guid_t *aruuid)
3171 for(ars = pnio_ars; ars != NULL; ars = g_list_next(ars)) {
3172 ar = (pnio_ar_t *)ars->data;
3174 if (memcmp(&ar->aruuid, aruuid, sizeof(e_guid_t)) == 0) {
3184 pnio_ar_new(e_guid_t *aruuid)
3189 ar = (pnio_ar_t *)wmem_alloc0(wmem_file_scope(), sizeof(pnio_ar_t));
3191 memcpy(&ar->aruuid, aruuid, sizeof(e_guid_t));
3193 ar->controlleralarmref = 0xffff;
3194 ar->devicealarmref = 0xffff;
3196 pnio_ars = g_list_append(pnio_ars, ar);
3203 /* dissect the four status (error) fields */
3205 dissect_PNIO_status(tvbuff_t *tvb, int offset,
3206 packet_info *pinfo, proto_tree *tree, guint8 *drep)
3209 guint8 u8ErrorDecode;
3210 guint8 u8ErrorCode1;
3211 guint8 u8ErrorCode2;
3213 proto_item *sub_item;
3214 proto_tree *sub_tree;
3215 guint32 u32SubStart;
3216 int bytemask = (drep[0] & DREP_LITTLE_ENDIAN) ? 3 : 0;
3218 const value_string *error_code1_vals;
3219 const value_string *error_code2_vals = pn_io_error_code2; /* defaults */
3224 sub_item = proto_tree_add_item(tree, hf_pn_io_status, tvb, offset, 0, ENC_NA);
3225 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_status);
3226 u32SubStart = offset;
3228 /* the PNIOStatus field is existing in both the RPC and the application data,
3229 * depending on the current PDU.
3230 * As the byte representation of these layers are different, this has to be handled
3231 * in a somewhat different way than elsewhere. */
3233 dissect_dcerpc_uint8(tvb, offset+(0^bytemask), pinfo, sub_tree, drep,
3234 hf_pn_io_error_code, &u8ErrorCode);
3235 dissect_dcerpc_uint8(tvb, offset+(1^bytemask), pinfo, sub_tree, drep,
3236 hf_pn_io_error_decode, &u8ErrorDecode);
3238 switch (u8ErrorDecode) {
3239 case(0x80): /* PNIORW */
3240 dissect_dcerpc_uint8(tvb, offset+(2^bytemask), pinfo, sub_tree, drep,
3241 hf_pn_io_error_code1_pniorw, &u8ErrorCode1);
3242 error_code1_vals = pn_io_error_code1_pniorw;
3244 /* u8ErrorCode2 for PNIORW is always user specific */
3245 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3246 hf_pn_io_error_code2_pniorw, &u8ErrorCode2);
3248 error_code2_vals = pn_io_error_code2_pniorw;
3251 case(0x81): /* PNIO */
3252 dissect_dcerpc_uint8(tvb, offset+(2^bytemask), pinfo, sub_tree, drep,
3253 hf_pn_io_error_code1_pnio, &u8ErrorCode1);
3254 error_code1_vals = pn_io_error_code1_pnio;
3256 switch (u8ErrorCode1) {
3258 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3259 hf_pn_io_error_code2_pnio_1, &u8ErrorCode2);
3260 error_code2_vals = pn_io_error_code2_pnio_1;
3263 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3264 hf_pn_io_error_code2_pnio_2, &u8ErrorCode2);
3265 error_code2_vals = pn_io_error_code2_pnio_2;
3268 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3269 hf_pn_io_error_code2_pnio_3, &u8ErrorCode2);
3270 error_code2_vals = pn_io_error_code2_pnio_3;
3273 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3274 hf_pn_io_error_code2_pnio_4, &u8ErrorCode2);
3275 error_code2_vals = pn_io_error_code2_pnio_4;
3278 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3279 hf_pn_io_error_code2_pnio_5, &u8ErrorCode2);
3280 error_code2_vals = pn_io_error_code2_pnio_5;
3283 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3284 hf_pn_io_error_code2_pnio_6, &u8ErrorCode2);
3285 error_code2_vals = pn_io_error_code2_pnio_6;
3288 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3289 hf_pn_io_error_code2_pnio_7, &u8ErrorCode2);
3290 error_code2_vals = pn_io_error_code2_pnio_7;
3293 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3294 hf_pn_io_error_code2_pnio_8, &u8ErrorCode2);
3295 error_code2_vals = pn_io_error_code2_pnio_8;
3298 dissect_dcerpc_uint8(tvb, offset + (3 ^ bytemask), pinfo, sub_tree, drep,
3299 hf_pn_io_error_code2_pnio_13, &u8ErrorCode2);
3300 error_code2_vals = pn_io_error_code2_pnio_13;
3303 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3304 hf_pn_io_error_code2_pnio_20, &u8ErrorCode2);
3305 error_code2_vals = pn_io_error_code2_pnio_20;
3308 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3309 hf_pn_io_error_code2_pnio_21, &u8ErrorCode2);
3310 error_code2_vals = pn_io_error_code2_pnio_21;
3313 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3314 hf_pn_io_error_code2_pnio_22, &u8ErrorCode2);
3315 error_code2_vals = pn_io_error_code2_pnio_22;
3318 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3319 hf_pn_io_error_code2_pnio_23, &u8ErrorCode2);
3320 error_code2_vals = pn_io_error_code2_pnio_23;
3323 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3324 hf_pn_io_error_code2_pnio_40, &u8ErrorCode2);
3325 error_code2_vals = pn_io_error_code2_pnio_40;
3328 dissect_dcerpc_uint8(tvb, offset + (3 ^ bytemask), pinfo, sub_tree, drep,
3329 hf_pn_io_error_code2_pnio_60, &u8ErrorCode2);
3330 error_code2_vals = pn_io_error_code2_pnio_60;
3333 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3334 hf_pn_io_error_code2_pnio_61, &u8ErrorCode2);
3335 error_code2_vals = pn_io_error_code2_pnio_61;
3338 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3339 hf_pn_io_error_code2_pnio_62, &u8ErrorCode2);
3340 error_code2_vals = pn_io_error_code2_pnio_62;
3343 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3344 hf_pn_io_error_code2_pnio_63, &u8ErrorCode2);
3345 error_code2_vals = pn_io_error_code2_pnio_63;
3348 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3349 hf_pn_io_error_code2_pnio_64, &u8ErrorCode2);
3350 error_code2_vals = pn_io_error_code2_pnio_64;
3353 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3354 hf_pn_io_error_code2_pnio_65, &u8ErrorCode2);
3355 error_code2_vals = pn_io_error_code2_pnio_65;
3358 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3359 hf_pn_io_error_code2_pnio_66, &u8ErrorCode2);
3360 error_code2_vals = pn_io_error_code2_pnio_66;
3363 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3364 hf_pn_io_error_code2_pnio_70, &u8ErrorCode2);
3365 error_code2_vals = pn_io_error_code2_pnio_70;
3368 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3369 hf_pn_io_error_code2_pnio_71, &u8ErrorCode2);
3370 error_code2_vals = pn_io_error_code2_pnio_71;
3373 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3374 hf_pn_io_error_code2_pnio_72, &u8ErrorCode2);
3375 error_code2_vals = pn_io_error_code2_pnio_72;
3378 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3379 hf_pn_io_error_code2_pnio_73, &u8ErrorCode2);
3380 error_code2_vals = pn_io_error_code2_pnio_73;
3383 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3384 hf_pn_io_error_code2_pnio_74, &u8ErrorCode2);
3385 error_code2_vals = pn_io_error_code2_pnio_74;
3388 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3389 hf_pn_io_error_code2_pnio_75, &u8ErrorCode2);
3390 error_code2_vals = pn_io_error_code2_pnio_75;
3393 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3394 hf_pn_io_error_code2_pnio_76, &u8ErrorCode2);
3395 error_code2_vals = pn_io_error_code2_pnio_76;
3398 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3399 hf_pn_io_error_code2_pnio_77, &u8ErrorCode2);
3400 error_code2_vals = pn_io_error_code2_pnio_77;
3403 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3404 hf_pn_io_error_code2_pnio_253, &u8ErrorCode2);
3405 error_code2_vals = pn_io_error_code2_pnio_253;
3408 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3409 hf_pn_io_error_code2_pnio_255, &u8ErrorCode2);
3410 error_code2_vals = pn_io_error_code2_pnio_255;
3413 /* don't know this u8ErrorCode1 for PNIO, use defaults */
3414 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3415 hf_pn_io_error_code2, &u8ErrorCode2);
3416 expert_add_info_format(pinfo, sub_item, &ei_pn_io_error_code1, "Unknown ErrorCode1 0x%x (for ErrorDecode==PNIO)", u8ErrorCode1);
3421 dissect_dcerpc_uint8(tvb, offset+(2^bytemask), pinfo, sub_tree, drep,
3422 hf_pn_io_error_code1, &u8ErrorCode1);
3423 if (u8ErrorDecode!=0) {
3424 expert_add_info_format(pinfo, sub_item, &ei_pn_io_error_code1, "Unknown ErrorDecode 0x%x", u8ErrorDecode);
3426 error_code1_vals = pn_io_error_code1;
3428 /* don't know this u8ErrorDecode, use defaults */
3429 dissect_dcerpc_uint8(tvb, offset+(3^bytemask), pinfo, sub_tree, drep,
3430 hf_pn_io_error_code2, &u8ErrorCode2);
3431 if (u8ErrorDecode != 0) {
3432 expert_add_info_format(pinfo, sub_item, &ei_pn_io_error_code2, "Unknown ErrorDecode 0x%x", u8ErrorDecode);
3438 if ((u8ErrorCode == 0) && (u8ErrorDecode == 0) && (u8ErrorCode1 == 0) && (u8ErrorCode2 == 0)) {
3439 proto_item_append_text(sub_item, ": OK");
3440 col_append_str(pinfo->cinfo, COL_INFO, ", OK");
3442 proto_item_append_text(sub_item, ": Error: \"%s\", \"%s\", \"%s\", \"%s\"",
3443 val_to_str(u8ErrorCode, pn_io_error_code, "(0x%x)"),
3444 val_to_str(u8ErrorDecode, pn_io_error_decode, "(0x%x)"),
3445 val_to_str(u8ErrorCode1, error_code1_vals, "(0x%x)"),
3446 val_to_str(u8ErrorCode2, error_code2_vals, "(0x%x)"));
3447 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: \"%s\", \"%s\", \"%s\", \"%s\"",
3448 val_to_str(u8ErrorCode, pn_io_error_code, "(0x%x)"),
3449 val_to_str(u8ErrorDecode, pn_io_error_decode, "(0x%x)"),
3450 val_to_str(u8ErrorCode1, error_code1_vals, "(0x%x)"),
3451 val_to_str(u8ErrorCode2, error_code2_vals, "(0x%x)"));
3453 proto_item_set_len(sub_item, offset - u32SubStart);
3459 /* dissect the alarm specifier */
3461 dissect_Alarm_specifier(tvbuff_t *tvb, int offset,
3462 packet_info *pinfo, proto_tree *tree, guint8 *drep)
3464 guint16 u16AlarmSpecifierSequence;
3465 guint16 u16AlarmSpecifierChannel;
3466 guint16 u16AlarmSpecifierManufacturer;
3467 guint16 u16AlarmSpecifierSubmodule;
3468 guint16 u16AlarmSpecifierAR;
3469 proto_item *sub_item;
3470 proto_tree *sub_tree;
3472 /* alarm specifier */
3473 sub_item = proto_tree_add_item(tree, hf_pn_io_alarm_specifier, tvb, offset, 2, ENC_NA);
3474 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_pdu_type);
3476 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3477 hf_pn_io_alarm_specifier_sequence, &u16AlarmSpecifierSequence);
3478 u16AlarmSpecifierSequence &= 0x07FF;
3479 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3480 hf_pn_io_alarm_specifier_channel, &u16AlarmSpecifierChannel);
3481 u16AlarmSpecifierChannel = (u16AlarmSpecifierChannel &0x0800) >> 11;
3482 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3483 hf_pn_io_alarm_specifier_manufacturer, &u16AlarmSpecifierManufacturer);
3484 u16AlarmSpecifierManufacturer = (u16AlarmSpecifierManufacturer &0x1000) >> 12;
3485 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3486 hf_pn_io_alarm_specifier_submodule, &u16AlarmSpecifierSubmodule);
3487 u16AlarmSpecifierSubmodule = (u16AlarmSpecifierSubmodule & 0x2000) >> 13;
3488 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3489 hf_pn_io_alarm_specifier_ardiagnosis, &u16AlarmSpecifierAR);
3490 u16AlarmSpecifierAR = (u16AlarmSpecifierAR & 0x8000) >> 15;
3493 proto_item_append_text(sub_item, ", Sequence: %u, Channel: %u, Manuf: %u, Submodule: %u AR: %u",
3494 u16AlarmSpecifierSequence, u16AlarmSpecifierChannel,
3495 u16AlarmSpecifierManufacturer, u16AlarmSpecifierSubmodule, u16AlarmSpecifierAR);
3501 /* dissect the alarm header */
3503 dissect_Alarm_header(tvbuff_t *tvb, int offset,
3504 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep)
3506 guint16 u16AlarmType;
3509 guint16 u16SubslotNr;
3511 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3512 hf_pn_io_alarm_type, &u16AlarmType);
3513 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
3514 hf_pn_io_api, &u32Api);
3515 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3516 hf_pn_io_slot_nr, &u16SlotNr);
3517 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3518 hf_pn_io_subslot_nr, &u16SubslotNr);
3520 proto_item_append_text(item, ", %s, API:%u, Slot:0x%x/0x%x",
3521 val_to_str(u16AlarmType, pn_io_alarm_type, "(0x%x)"),
3522 u32Api, u16SlotNr, u16SubslotNr);
3524 col_append_fstr(pinfo->cinfo, COL_INFO, ", %s, Slot: 0x%x/0x%x",
3525 val_to_str(u16AlarmType, pn_io_alarm_type, "(0x%x)"),
3526 u16SlotNr, u16SubslotNr);
3533 dissect_ChannelProperties(tvbuff_t *tvb, int offset,
3534 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep)
3536 proto_item *sub_item;
3537 proto_tree *sub_tree;
3538 guint16 u16ChannelProperties;
3541 sub_item = proto_tree_add_item(tree, hf_pn_io_channel_properties, tvb, offset, 2, ENC_BIG_ENDIAN);
3542 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_channel_properties);
3543 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3544 hf_pn_io_channel_properties_direction, &u16ChannelProperties);
3545 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3546 hf_pn_io_channel_properties_specifier, &u16ChannelProperties);
3547 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3548 hf_pn_io_channel_properties_maintenance, &u16ChannelProperties);
3549 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3550 hf_pn_io_channel_properties_accumulative, &u16ChannelProperties);
3551 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3552 hf_pn_io_channel_properties_type, &u16ChannelProperties);
3557 /* dissect the RS_BlockHeader */
3559 dissect_RS_BlockHeader(tvbuff_t *tvb, int offset,
3560 packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep,
3561 guint16 *u16RSBodyLength, guint16 *u16RSBlockType)
3563 guint16 u16RSBlockLength;
3564 guint8 u8BlockVersionHigh;
3565 guint8 u8BlockVersionLow;
3567 /* u16RSBlockType is needed for further dissection */
3568 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3569 hf_pn_io_rs_block_type, u16RSBlockType);
3571 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3572 hf_pn_io_rs_block_length, &u16RSBlockLength);
3574 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
3575 hf_pn_io_block_version_high, &u8BlockVersionHigh);
3576 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
3577 hf_pn_io_block_version_low, &u8BlockVersionLow);
3579 proto_item_append_text(item, ": Type=%s, Length=%u(+4), Version=%u.%u",
3580 rval_to_str(*u16RSBlockType, pn_io_rs_block_type, "Unknown (0x%04x)"),
3581 u16RSBlockLength, u8BlockVersionHigh, u8BlockVersionLow);
3583 /* Block length is without type and length fields, but with version field */
3584 /* as it's already dissected, remove it */
3585 *u16RSBodyLength = u16RSBlockLength - 2;
3587 /* Padding 2 + 2 + 1 + 1 = 6 */
3588 /* Therefore we need 2 byte padding to make the block u32 aligned */
3589 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
3591 /* remove padding */
3592 *u16RSBodyLength -= 2;
3597 dissect_RS_AddressInfo(tvbuff_t *tvb, int offset,
3598 packet_info *pinfo _U_, proto_tree *tree, guint8 *drep, guint16 *u16RSBodyLength)
3600 e_guid_t IM_UniqueIdentifier;
3603 guint16 u16SubslotNr;
3604 guint16 u16ChannelNumber;
3606 /* IM_UniqueIdentifier */
3607 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
3608 hf_pn_io_ar_uuid, &IM_UniqueIdentifier);
3609 *u16RSBodyLength -= 16;
3612 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
3613 hf_pn_io_api, &u32Api);
3614 *u16RSBodyLength -= 4;
3617 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3618 hf_pn_io_slot_nr, &u16SlotNr);
3619 *u16RSBodyLength -= 2;
3622 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3623 hf_pn_io_subslot_nr, &u16SubslotNr);
3624 *u16RSBodyLength -= 2;
3627 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3628 hf_pn_io_channel_number, &u16ChannelNumber);
3629 *u16RSBodyLength -= 2;
3634 /* dissect the RS_EventDataCommon */
3636 dissect_RS_EventDataCommon(tvbuff_t *tvb, int offset,
3637 packet_info *pinfo _U_, proto_tree *tree, guint8 *drep, guint16 *u16RSBodyLength)
3639 guint16 u16RSSpecifierSequenceNumber;
3640 guint16 u16RSSpecifierReserved;
3641 guint16 u16RSSpecifierSpecifier;
3642 guint16 u16RSMinorError;
3643 guint16 u16RSPlusError;
3644 proto_item *sub_item;
3645 proto_tree *sub_tree;
3646 proto_item *sub_item_time_stamp;
3647 proto_tree *sub_tree_time_stamp;
3649 guint16 u16RSTimeStampStatus;
3651 /* RS_AddressInfo */
3652 offset = dissect_RS_AddressInfo(tvb, offset, pinfo, tree, drep, u16RSBodyLength);
3655 sub_item = proto_tree_add_item(tree, hf_pn_io_rs_specifier, tvb, offset, 2, ENC_BIG_ENDIAN);
3656 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_specifier);
3658 /* RS_Specifier.SequenceNumber */
3659 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3660 hf_pn_io_rs_specifier_sequence, &u16RSSpecifierSequenceNumber);
3662 /* RS_Specifier.Reserved */
3663 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3664 hf_pn_io_rs_specifier_reserved, &u16RSSpecifierReserved);
3666 /* RS_Specifier.Specifier */
3667 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3668 hf_pn_io_rs_specifier_specifier, &u16RSSpecifierSpecifier);
3669 *u16RSBodyLength -= 2;
3672 sub_item_time_stamp = proto_tree_add_item(tree, hf_pn_io_rs_time_stamp, tvb, offset, 12, ENC_NA);
3673 sub_tree_time_stamp = proto_item_add_subtree(sub_item_time_stamp, ett_pn_io_rs_time_stamp);
3675 /* RS_TimeStamp.Status */
3676 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree_time_stamp, drep,
3677 hf_pn_io_rs_time_stamp_status, &u16RSTimeStampStatus);
3679 /* RS_TimeStamp.TimeStamp */
3681 /* Start after from 2 bytes Status */
3682 timestamp.secs = (time_t)tvb_get_ntoh48(tvb, offset + 2);
3684 /* Start after from 4 bytes timestamp.secs */
3685 timestamp.nsecs = (int)tvb_get_ntohl(tvb, offset + 8);
3687 /* Start after from 2 bytes Status and get all 10 bytes */
3688 proto_tree_add_time(sub_tree_time_stamp, hf_pn_io_rs_time_stamp_value, tvb, offset + 2, 10, ×tamp);
3689 *u16RSBodyLength -= 12;
3693 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3694 hf_pn_io_rs_minus_error, &u16RSMinorError);
3695 *u16RSBodyLength -= 2;
3698 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3699 hf_pn_io_rs_plus_error, &u16RSPlusError);
3700 *u16RSBodyLength -= 2;
3705 /* dissect the RS_IdentificationInfo */
3707 dissect_RS_IdentificationInfo(tvbuff_t *tvb, int offset,
3708 packet_info *pinfo, proto_tree *tree, guint8 *drep)
3710 dcerpc_info di; /* fake dcerpc_info struct */
3711 guint64 u64AMDeviceIdentificationDeviceSubID;
3712 guint64 u64AMDeviceIdentificationDeviceID;
3713 guint64 u64AMDeviceIdentificationVendorID;
3714 guint64 u64AM_DeviceIdentificationOrganization;
3716 proto_item *sub_item;
3717 proto_tree *sub_tree;
3719 sub_item = proto_tree_add_item(tree, hf_pn_io_am_device_identification, tvb, offset, 8, ENC_BIG_ENDIAN);
3720 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_am_device_identification);
3722 /* AM_DeviceIdentification */
3723 dissect_dcerpc_uint64(tvb, offset, pinfo, sub_tree, &di, drep,
3724 hf_pn_io_am_device_identification_device_sub_id, &u64AMDeviceIdentificationDeviceSubID);
3725 dissect_dcerpc_uint64(tvb, offset, pinfo, sub_tree, &di, drep,
3726 hf_pn_io_am_device_identification_device_id, &u64AMDeviceIdentificationDeviceID);
3727 dissect_dcerpc_uint64(tvb, offset, pinfo, sub_tree, &di, drep,
3728 hf_pn_io_am_device_identification_vendor_id, &u64AMDeviceIdentificationVendorID);
3729 offset = dissect_dcerpc_uint64(tvb, offset, pinfo, sub_tree, &di, drep,
3730 hf_pn_io_am_device_identification_organization, &u64AM_DeviceIdentificationOrganization);
3732 /* IM_Tag_Function [32] */
3733 proto_tree_add_item(tree, hf_pn_io_im_tag_function, tvb, offset, 32, ENC_ASCII|ENC_NA);
3736 /* IM_Tag_Location [22] */
3737 proto_tree_add_item(tree, hf_pn_io_im_tag_location, tvb, offset, 22, ENC_ASCII|ENC_NA);
3743 /* dissect the RS_EventDataExtension_Data */
3745 dissect_RS_EventDataExtension_Data(tvbuff_t *tvb, int offset,
3746 packet_info *pinfo, proto_tree *tree, guint8 *drep,
3747 guint8 *u8RSExtensionBlockLength, guint16 *u16RSBlockType)
3749 guint32 u32RSReasonCodeReason;
3750 guint32 u32RSReasonCodeDetail;
3751 guint8 u8LengthRSDomainIdentification = 16;
3752 guint8 u8LengthRSMasterIdentification = 8;
3753 guint16 u16SoE_DigitalInputCurrentValueValue;
3754 guint16 u16SoE_DigitalInputCurrentValueReserved;
3756 proto_item *sub_item;
3757 proto_tree *sub_tree;
3759 guint16 u16RSTimeStampStatus;
3760 proto_item *sub_item_time_stamp;
3761 proto_tree *sub_tree_time_stamp;
3763 switch (*u16RSBlockType) {
3764 case(0x4000): /* RS_StopObserver */
3767 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3768 hf_pn_io_rs_block_type, u16RSBlockType);
3771 sub_item = proto_tree_add_item(tree, hf_pn_io_rs_reason_code, tvb, offset, 4, ENC_BIG_ENDIAN);
3772 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_reason_code);
3773 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
3774 hf_pn_io_rs_reason_code_reason, &u32RSReasonCodeReason);
3775 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
3776 hf_pn_io_rs_reason_code_detail, &u32RSReasonCodeDetail);
3777 *u8RSExtensionBlockLength -= 6;
3779 case(0x4001): /* RS_BufferObserver */
3780 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, *u8RSExtensionBlockLength, "UserData");
3781 *u8RSExtensionBlockLength = 0;
3783 case(0x4002): /* RS_TimeStatus */
3785 /* Padding 1 + 1 + 16 + 8 = 26 or 1 + 1 + 16 + 8 + 12 = 38 */
3786 /* Therefore we need 2 byte padding to make the block u32 aligned */
3787 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
3788 *u8RSExtensionBlockLength -= 2;
3790 /* RS_DomainIdentification */
3791 proto_tree_add_item(tree, hf_pn_io_rs_domain_identification, tvb, offset, u8LengthRSDomainIdentification, ENC_NA);
3792 offset += u8LengthRSDomainIdentification;
3793 *u8RSExtensionBlockLength -= 16;
3795 /* RS_MasterIdentification */
3796 proto_tree_add_item(tree, hf_pn_io_rs_master_identification, tvb, offset, u8LengthRSMasterIdentification, ENC_NA);
3797 offset += u8LengthRSMasterIdentification;
3798 *u8RSExtensionBlockLength -= 8;
3800 if (*u8RSExtensionBlockLength > 2)
3803 sub_item_time_stamp = proto_tree_add_item(tree, hf_pn_io_rs_time_stamp, tvb, offset, 12, ENC_NA);
3804 sub_tree_time_stamp = proto_item_add_subtree(sub_item_time_stamp, ett_pn_io_rs_time_stamp);
3806 /* RS_TimeStamp.Status */
3807 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree_time_stamp, drep,
3808 hf_pn_io_rs_time_stamp_status, &u16RSTimeStampStatus);
3810 /* RS_TimeStamp.TimeStamp */
3811 timestamp.secs = (time_t)tvb_get_ntoh48(tvb, offset + 2); // Start after from 2 bytes Status
3812 timestamp.nsecs = (int)tvb_get_ntohl(tvb, offset + 8); // Start after from 4 bytes timestamp.secs
3813 // Start after from 2 bytes Status and get all 10 bytes
3814 proto_tree_add_time(sub_tree_time_stamp, hf_pn_io_rs_time_stamp_value, tvb, offset + 2, 10, ×tamp);
3818 case(0x4003): /* RS_SRLObserver */
3819 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, *u8RSExtensionBlockLength, "UserData");
3820 *u8RSExtensionBlockLength = 0;
3822 case(0x4004): /* RS_SourceIdentification */
3823 offset = dissect_RS_IdentificationInfo(tvb, offset, pinfo, tree, drep);
3824 *u8RSExtensionBlockLength = 0;
3826 case(0x4010): /* SoE_DigitalInputObserver */
3827 /* SoE_DigitalInputCurrentValue */
3828 sub_item = proto_tree_add_item(tree, hf_pn_io_soe_digital_input_current_value, tvb, offset, 2, ENC_BIG_ENDIAN);
3829 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_soe_digital_input_current_value);
3831 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3832 hf_pn_io_soe_digital_input_current_value_value, &u16SoE_DigitalInputCurrentValueValue);
3833 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3834 hf_pn_io_soe_digital_input_current_value_reserved, &u16SoE_DigitalInputCurrentValueReserved);
3835 *u8RSExtensionBlockLength -= 2;
3838 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, *u8RSExtensionBlockLength, "UserData");
3839 *u8RSExtensionBlockLength = 0;
3845 /* dissect the RS_EventDataExtension */
3847 dissect_RS_EventDataExtension(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
3848 proto_tree *tree, guint8 *drep, guint16 *u16RSBlockLength, guint16 *u16RSBlockType)
3850 guint8 u8RSExtensionBlockType;
3851 guint8 u8RSExtensionBlockLength;
3853 /* RS_ExtensionBlockType */
3854 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
3855 hf_pn_io_rs_extension_block_type, &u8RSExtensionBlockType);
3856 *u16RSBlockLength -= 1;
3858 /* RS_ExtensionBlockLength */
3859 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
3860 hf_pn_io_rs_extension_block_length, &u8RSExtensionBlockLength);
3861 *u16RSBlockLength -= 1;
3863 /* Data*[Padding] * a*/
3864 while (u8RSExtensionBlockLength) {
3865 *u16RSBlockLength -= u8RSExtensionBlockLength;
3866 offset = dissect_RS_EventDataExtension_Data(tvb, offset, pinfo, tree, drep,
3867 &u8RSExtensionBlockLength, u16RSBlockType);
3873 /* dissect the RS_EventData */
3875 dissect_RS_EventData(tvbuff_t *tvb, int offset,
3876 packet_info *pinfo _U_, proto_tree *tree, guint8 *drep,
3877 guint16 *u16RSBodyLength, guint16 *u16RSBlockType)
3879 proto_item *sub_item;
3880 proto_tree *sub_tree;
3882 /* RS_EventDataCommon */
3883 offset = dissect_RS_EventDataCommon(tvb, offset, pinfo, tree, drep, u16RSBodyLength);
3885 /* optional: RS_EventDataExtension */
3886 while (*u16RSBodyLength > 0) {
3887 sub_item = proto_tree_add_item(tree, hf_pn_io_rs_event_data_extension, tvb, offset, 0, ENC_NA);
3888 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_event_data_extension);
3889 offset = dissect_RS_EventDataExtension(tvb, offset, pinfo, sub_tree, drep,
3890 u16RSBodyLength, u16RSBlockType);
3896 /* dissect the RS_EventBlock */
3898 dissect_RS_EventBlock(tvbuff_t *tvb, int offset,
3899 packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
3901 proto_item *sub_item;
3902 proto_tree *sub_tree;
3904 guint16 u16RSBodyLength;
3905 guint16 u16RSBlockType;
3907 sub_item = proto_tree_add_item(tree, hf_pn_io_rs_event_block, tvb, offset, 0, ENC_NA);
3908 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_event_block);
3910 /* RS_BlockHeader */
3911 offset = dissect_RS_BlockHeader(tvb, offset, pinfo, sub_tree, sub_item, drep,
3912 &u16RSBodyLength, &u16RSBlockType);
3915 offset = dissect_RS_EventData(tvb, offset, pinfo, sub_tree, drep,
3916 &u16RSBodyLength, &u16RSBlockType);
3920 /* dissect the RS_AlarmInfo */
3922 dissect_RS_AlarmInfo(tvbuff_t *tvb, int offset,
3923 packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
3925 proto_item *sub_item;
3926 proto_tree *sub_tree;
3927 guint16 u16RSAlarmInfo;
3929 sub_item = proto_tree_add_item(tree, hf_pn_io_rs_alarm_info, tvb, offset, 2, ENC_BIG_ENDIAN);
3930 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_alarm_info);
3932 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3933 hf_pn_io_rs_alarm_info_reserved_0_7, &u16RSAlarmInfo);
3935 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3936 hf_pn_io_rs_alarm_info_reserved_8_15, &u16RSAlarmInfo);
3941 /* dissect the RS_EventInfo */
3943 dissect_RS_EventInfo(tvbuff_t *tvb, int offset,
3944 packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
3946 proto_item *sub_item;
3947 proto_tree *sub_tree;
3948 guint16 u16NumberofEntries;
3950 sub_item = proto_tree_add_item(tree, hf_pn_io_rs_event_info, tvb, offset, 0, ENC_NA);
3951 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_event_info);
3953 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
3954 hf_pn_io_number_of_rs_event_info, &u16NumberofEntries);
3956 while (u16NumberofEntries > 0) {
3957 u16NumberofEntries--;
3958 offset = dissect_RS_EventBlock(tvb, offset, pinfo, sub_tree, drep);
3964 dissect_AlarmUserStructure(tvbuff_t *tvb, int offset,
3965 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
3966 guint16 *body_length, guint16 u16UserStructureIdentifier)
3968 guint16 u16ChannelNumber;
3969 guint16 u16ChannelErrorType;
3970 guint16 u16ExtChannelErrorType;
3971 guint32 u32ExtChannelAddValue;
3972 guint16 u16Index = 0;
3973 guint32 u32RecDataLen;
3974 pnio_ar_t *ar = NULL;
3977 switch (u16UserStructureIdentifier) {
3978 case(0x8000): /* ChannelDiagnosisData */
3979 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3980 hf_pn_io_channel_number, &u16ChannelNumber);
3981 offset = dissect_ChannelProperties(tvb, offset, pinfo, tree, item, drep);
3982 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3983 hf_pn_io_channel_error_type, &u16ChannelErrorType);
3986 case(0x8002): /* ExtChannelDiagnosisData */
3987 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3988 hf_pn_io_channel_number, &u16ChannelNumber);
3990 offset = dissect_ChannelProperties(tvb, offset, pinfo, tree, item, drep);
3992 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3993 hf_pn_io_channel_error_type, &u16ChannelErrorType);
3995 if (u16ChannelErrorType < 0x7fff)
3997 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
3998 hf_pn_io_ext_channel_error_type0, &u16ExtChannelErrorType);
4000 else if (u16ChannelErrorType == 0x8000)
4002 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4003 hf_pn_io_ext_channel_error_type0x8000, &u16ExtChannelErrorType);
4005 else if (u16ChannelErrorType == 0x8001)
4007 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4008 hf_pn_io_ext_channel_error_type0x8001, &u16ExtChannelErrorType);
4010 else if (u16ChannelErrorType == 0x8002)
4012 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4013 hf_pn_io_ext_channel_error_type0x8002, &u16ExtChannelErrorType);
4015 else if ((u16ChannelErrorType == 0x8003)||(u16ChannelErrorType == 0x8009))
4017 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4018 hf_pn_io_ext_channel_error_type0x8003, &u16ExtChannelErrorType);
4020 else if (u16ChannelErrorType == 0x8004)
4022 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4023 hf_pn_io_ext_channel_error_type0x8004, &u16ExtChannelErrorType);
4025 else if (u16ChannelErrorType == 0x8005)
4027 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4028 hf_pn_io_ext_channel_error_type0x8005, &u16ExtChannelErrorType);
4030 else if (u16ChannelErrorType == 0x8007)
4032 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4033 hf_pn_io_ext_channel_error_type0x8007, &u16ExtChannelErrorType);
4035 else if (u16ChannelErrorType == 0x8008)
4037 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4038 hf_pn_io_ext_channel_error_type0x8008, &u16ExtChannelErrorType);
4040 else if (u16ChannelErrorType == 0x800A)
4042 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4043 hf_pn_io_ext_channel_error_type0x800A, &u16ExtChannelErrorType);
4045 else if (u16ChannelErrorType == 0x800B)
4047 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4048 hf_pn_io_ext_channel_error_type0x800B, &u16ExtChannelErrorType);
4050 else if (u16ChannelErrorType == 0x800C)
4052 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4053 hf_pn_io_ext_channel_error_type0x800C, &u16ExtChannelErrorType);
4057 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4058 hf_pn_io_ext_channel_error_type, &u16ExtChannelErrorType);
4060 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
4061 hf_pn_io_ext_channel_add_value, &u32ExtChannelAddValue);
4064 case(0x8100): /* MaintenanceItem */
4065 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
4068 case(0x8300): /* RS_AlarmInfo (Reporting System Alarm Information) */
4069 case(0x8301): /* RS_AlarmInfo */
4070 case(0x8302): /* RS_AlarmInfo */
4071 offset = dissect_RS_AlarmInfo(tvb, offset, pinfo, tree, drep);
4074 case(0x8303): /* RS_EventInfo (Reporting System Event Information) */
4075 offset = dissect_RS_EventInfo(tvb, offset, pinfo, tree, drep);
4078 /* XXX - dissect remaining user structures of [AlarmItem] */
4079 case(0x8001): /* DiagnosisData */
4080 case(0x8003): /* QualifiedChannelDiagnosisData */
4082 if (u16UserStructureIdentifier >= 0x8000) {
4083 offset = dissect_pn_undecoded(tvb, offset, pinfo, tree, *body_length);
4085 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, *body_length, "UserData");
4096 /* dissect the alarm notification block */
4098 dissect_AlarmNotification_block(tvbuff_t *tvb, int offset,
4099 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
4100 guint16 body_length)
4102 guint32 u32ModuleIdentNumber;
4103 guint32 u32SubmoduleIdentNumber;
4104 guint16 u16UserStructureIdentifier;
4107 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4108 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4109 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4113 offset = dissect_Alarm_header(tvb, offset, pinfo, tree, item, drep);
4115 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
4116 hf_pn_io_module_ident_number, &u32ModuleIdentNumber);
4117 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
4118 hf_pn_io_submodule_ident_number, &u32SubmoduleIdentNumber);
4120 offset = dissect_Alarm_specifier(tvb, offset, pinfo, tree, drep);
4122 proto_item_append_text(item, ", Ident:0x%x, SubIdent:0x%x",
4123 u32ModuleIdentNumber, u32SubmoduleIdentNumber);
4127 /* the rest of the block contains optional: [MaintenanceItem] and/or [AlarmItem] */
4128 while (body_length) {
4129 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4130 hf_pn_io_user_structure_identifier, &u16UserStructureIdentifier);
4131 proto_item_append_text(item, ", USI:0x%x", u16UserStructureIdentifier);
4134 offset = dissect_AlarmUserStructure(tvb, offset, pinfo, tree, item, drep, &body_length, u16UserStructureIdentifier);
4142 dissect_IandM0_block(tvbuff_t *tvb, int offset,
4143 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4145 guint8 u8VendorIDHigh;
4146 guint8 u8VendorIDLow;
4148 char *pIMSerialNumber;
4149 guint16 u16IMHardwareRevision;
4150 guint8 u8SWRevisionPrefix;
4151 guint8 u8IMSWRevisionFunctionalEnhancement;
4152 guint8 u8IMSWRevisionBugFix;
4153 guint8 u8IMSWRevisionInternalChange;
4154 guint16 u16IMRevisionCounter;
4155 guint16 u16IMProfileID;
4156 guint16 u16IMProfileSpecificType;
4157 guint8 u8IMVersionMajor;
4158 guint8 u8IMVersionMinor;
4159 guint16 u16IMSupported;
4162 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4163 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4164 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4168 /* x8 VendorIDHigh */
4169 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4170 hf_pn_io_vendor_id_high, &u8VendorIDHigh);
4171 /* x8 VendorIDLow */
4172 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4173 hf_pn_io_vendor_id_low, &u8VendorIDLow);
4174 /* c8[20] OrderID */
4175 pOrderID = (char *)wmem_alloc(wmem_packet_scope(), 20+1);
4176 tvb_memcpy(tvb, (guint8 *) pOrderID, offset, 20);
4177 pOrderID[20] = '\0';
4178 proto_tree_add_string (tree, hf_pn_io_order_id, tvb, offset, 20, pOrderID);
4181 /* c8[16] IM_Serial_Number */
4182 pIMSerialNumber = (char *)wmem_alloc(wmem_packet_scope(), 16+1);
4183 tvb_memcpy(tvb, (guint8 *) pIMSerialNumber, offset, 16);
4184 pIMSerialNumber[16] = '\0';
4185 proto_tree_add_string (tree, hf_pn_io_im_serial_number, tvb, offset, 16, pIMSerialNumber);
4188 /* x16 IM_Hardware_Revision */
4189 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4190 hf_pn_io_im_hardware_revision, &u16IMHardwareRevision);
4191 /* c8 SWRevisionPrefix */
4192 offset = dissect_dcerpc_char(tvb, offset, pinfo, tree, drep,
4193 hf_pn_io_im_revision_prefix, &u8SWRevisionPrefix);
4194 /* x8 IM_SWRevision_Functional_Enhancement */
4195 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4196 hf_pn_io_im_sw_revision_functional_enhancement, &u8IMSWRevisionFunctionalEnhancement);
4197 /* x8 IM_SWRevision_Bug_Fix */
4198 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4199 hf_pn_io_im_revision_bugfix, &u8IMSWRevisionBugFix);
4200 /* x8 IM_SWRevision_Internal_Change */
4201 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4202 hf_pn_io_im_sw_revision_internal_change, &u8IMSWRevisionInternalChange);
4203 /* x16 IM_Revision_Counter */
4204 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4205 hf_pn_io_im_revision_counter, &u16IMRevisionCounter);
4206 /* x16 IM_Profile_ID */
4207 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4208 hf_pn_io_im_profile_id, &u16IMProfileID);
4209 /* x16 IM_Profile_Specific_Type */
4210 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4211 hf_pn_io_im_profile_specific_type, &u16IMProfileSpecificType);
4212 /* x8 IM_Version_Major (values) */
4213 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4214 hf_pn_io_im_version_major, &u8IMVersionMajor);
4215 /* x8 IM_Version_Minor (values) */
4216 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4217 hf_pn_io_im_version_minor, &u8IMVersionMinor);
4218 /* x16 IM_Supported (bitfield) */
4219 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4220 hf_pn_io_im_supported, &u16IMSupported);
4227 dissect_IandM1_block(tvbuff_t *tvb, int offset,
4228 packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4233 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4234 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4235 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4239 /* IM_Tag_Function [32] */
4240 pTagFunction = (char *)wmem_alloc(wmem_packet_scope(), 32+1);
4241 tvb_memcpy(tvb, (guint8 *) pTagFunction, offset, 32);
4242 pTagFunction[32] = '\0';
4243 proto_tree_add_string (tree, hf_pn_io_im_tag_function, tvb, offset, 32, pTagFunction);
4246 /* IM_Tag_Location [22] */
4247 pTagLocation = (char *)wmem_alloc(wmem_packet_scope(), 22+1);
4248 tvb_memcpy(tvb, (guint8 *) pTagLocation, offset, 22);
4249 pTagLocation[22] = '\0';
4250 proto_tree_add_string (tree, hf_pn_io_im_tag_location, tvb, offset, 22, pTagLocation);
4253 proto_item_append_text(item, ": TagFunction:\"%s\", TagLocation:\"%s\"", pTagFunction, pTagLocation);
4260 dissect_IandM2_block(tvbuff_t *tvb, int offset,
4261 packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4265 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4266 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4267 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4272 pDate = (char *)wmem_alloc(wmem_packet_scope(), 16+1);
4273 tvb_memcpy(tvb, (guint8 *) pDate, offset, 16);
4275 proto_tree_add_string (tree, hf_pn_io_im_date, tvb, offset, 16, pDate);
4278 proto_item_append_text(item, ": Date:\"%s\"", pDate);
4285 dissect_IandM3_block(tvbuff_t *tvb, int offset,
4286 packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4290 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4291 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4292 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4296 /* IM_Descriptor [54] */
4297 pDescriptor = (char *)wmem_alloc(wmem_packet_scope(), 54+1);
4298 tvb_memcpy(tvb, (guint8 *) pDescriptor, offset, 54);
4299 pDescriptor[54] = '\0';
4300 proto_tree_add_string (tree, hf_pn_io_im_descriptor, tvb, offset, 54, pDescriptor);
4303 proto_item_append_text(item, ": Descriptor:\"%s\"", pDescriptor);
4310 dissect_IandM4_block(tvbuff_t *tvb, int offset,
4311 packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4314 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4315 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4316 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4320 dissect_pn_user_data(tvb, offset, pinfo, tree, 54, "IM Signature");
4326 dissect_IandM5_block(tvbuff_t *tvb, int offset,
4327 packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4329 guint16 u16NumberofEntries;
4331 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4332 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4333 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4337 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_im_numberofentries, &u16NumberofEntries);
4339 while(u16NumberofEntries > 0) {
4340 offset = dissect_a_block(tvb, offset, pinfo, tree, drep);
4341 u16NumberofEntries--;
4347 dissect_IandM0FilterData_block(tvbuff_t *tvb, int offset,
4348 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4350 guint16 u16NumberOfAPIs;
4352 guint16 u16NumberOfModules;
4354 guint32 u32ModuleIdentNumber;
4355 guint16 u16NumberOfSubmodules;
4356 guint16 u16SubslotNr;
4357 guint32 u32SubmoduleIdentNumber;
4358 proto_item *subslot_item;
4359 proto_tree *subslot_tree;
4360 proto_item *module_item;
4361 proto_tree *module_tree;
4362 guint32 u32ModuleStart;
4365 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4366 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4367 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4372 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4373 hf_pn_io_number_of_apis, &u16NumberOfAPIs);
4375 while (u16NumberOfAPIs--) {
4377 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
4378 hf_pn_io_api, &u32Api);
4379 /* NumberOfModules */
4380 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4381 hf_pn_io_number_of_modules, &u16NumberOfModules);
4383 while (u16NumberOfModules--) {
4384 module_item = proto_tree_add_item(tree, hf_pn_io_subslot, tvb, offset, 6, ENC_NA);
4385 module_tree = proto_item_add_subtree(module_item, ett_pn_io_module);
4387 u32ModuleStart = offset;
4390 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, module_tree, drep,
4391 hf_pn_io_slot_nr, &u16SlotNr);
4392 /* ModuleIdentNumber */
4393 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, module_tree, drep,
4394 hf_pn_io_module_ident_number, &u32ModuleIdentNumber);
4395 /* NumberOfSubmodules */
4396 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, module_tree, drep,
4397 hf_pn_io_number_of_submodules, &u16NumberOfSubmodules);
4399 proto_item_append_text(module_item, ": Slot:%u, Ident:0x%x Submodules:%u",
4400 u16SlotNr, u32ModuleIdentNumber, u16NumberOfSubmodules);
4402 while (u16NumberOfSubmodules--) {
4403 subslot_item = proto_tree_add_item(module_tree, hf_pn_io_subslot, tvb, offset, 6, ENC_NA);
4404 subslot_tree = proto_item_add_subtree(subslot_item, ett_pn_io_subslot);
4407 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, subslot_tree, drep,
4408 hf_pn_io_subslot_nr, &u16SubslotNr);
4409 /* SubmoduleIdentNumber */
4410 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, subslot_tree, drep,
4411 hf_pn_io_submodule_ident_number, &u32SubmoduleIdentNumber);
4413 proto_item_append_text(subslot_item, ": Number:0x%x, Ident:0x%x",
4414 u16SubslotNr, u32SubmoduleIdentNumber);
4417 proto_item_set_len(module_item, offset-u32ModuleStart);
4426 dissect_IandM5Data_block(tvbuff_t *tvb, int offset,
4427 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep)
4429 char *pIMAnnotation;
4431 guint8 u8VendorIDHigh;
4432 guint8 u8VendorIDLow;
4433 char *pIMSerialNumber;
4434 guint16 u16IMHardwareRevision;
4435 guint8 u8SWRevisionPrefix;
4436 guint8 u8IMSWRevisionFunctionalEnhancement;
4437 guint8 u8IMSWRevisionBugFix;
4438 guint8 u8IMSWRevisionInternalChange;
4440 /* c8[64] IM Annotation */
4441 pIMAnnotation = (char *)wmem_alloc(wmem_packet_scope(), 64+1);
4442 tvb_memcpy(tvb, (guint8 *) pIMAnnotation, offset, 64);
4443 pIMAnnotation[64] = '\0';
4444 proto_tree_add_string(tree, hf_pn_io_im_annotation, tvb, offset, 64, pIMAnnotation);
4447 /* c8[64] IM Order ID */
4448 pIMOrderID = (char *)wmem_alloc(wmem_packet_scope(), 64+1);
4449 tvb_memcpy(tvb, (guint8 *) pIMOrderID, offset, 64);
4450 pIMOrderID[64] = '\0';
4451 proto_tree_add_string(tree, hf_pn_io_im_order_id, tvb, offset, 64, pIMOrderID);
4454 /* x8 VendorIDHigh */
4455 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4456 hf_pn_io_vendor_id_high, &u8VendorIDHigh);
4457 /* x8 VendorIDLow */
4458 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4459 hf_pn_io_vendor_id_low, &u8VendorIDLow);
4461 /* c8[16] IM Serial Number */
4462 pIMSerialNumber = (char *)wmem_alloc(wmem_packet_scope(), 16+1);
4463 tvb_memcpy(tvb, (guint8 *) pIMSerialNumber, offset, 16);
4464 pIMSerialNumber[16] = '\0';
4465 proto_tree_add_string(tree, hf_pn_io_im_serial_number, tvb, offset, 16, pIMSerialNumber);
4468 /* x16 IM_Hardware_Revision */
4469 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4470 hf_pn_io_im_hardware_revision, &u16IMHardwareRevision);
4471 /* c8 SWRevisionPrefix */
4472 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4473 hf_pn_io_im_revision_prefix, &u8SWRevisionPrefix);
4474 /* x8 IM_SWRevision_Functional_Enhancement */
4475 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4476 hf_pn_io_im_sw_revision_functional_enhancement, &u8IMSWRevisionFunctionalEnhancement);
4477 /* x8 IM_SWRevision_Bug_Fix */
4478 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4479 hf_pn_io_im_revision_bugfix, &u8IMSWRevisionBugFix);
4481 /* x8 IM_SWRevision_Internal_Change */
4482 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4483 hf_pn_io_im_sw_revision_internal_change, &u8IMSWRevisionInternalChange);
4489 dissect_AM_Location(tvbuff_t *tvb, int offset,
4490 packet_info *pinfo, proto_tree *tree, guint8 *drep)
4492 proto_item *sub_item;
4493 proto_tree *sub_tree;
4494 guint8 am_location_structtype;
4496 guint8 am_location_reserved1;
4497 guint16 am_location_begin_slot_number;
4498 guint16 am_location_begin_subslot_number;
4499 guint16 am_location_end_slot_number;
4500 guint16 am_location_end_subslot_number;
4501 guint16 am_location_reserved2;
4502 guint16 am_location_reserved3;
4503 guint16 am_location_reserved4;
4504 sub_item = proto_tree_add_item(tree, hf_pn_io_am_location, tvb, offset, 16, ENC_NA);
4505 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_am_location);
4506 offset = dissect_dcerpc_char(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_am_location_structure,
4507 &am_location_structtype);
4509 bit_offset = offset << 3;
4510 switch (am_location_structtype)
4514 proto_tree_add_bits_item(sub_tree, hf_pn_io_am_location_level_0, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
4517 proto_tree_add_bits_item(sub_tree, hf_pn_io_am_location_level_1, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
4520 proto_tree_add_bits_item(sub_tree, hf_pn_io_am_location_level_2, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
4523 proto_tree_add_bits_item(sub_tree, hf_pn_io_am_location_level_3, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
4526 proto_tree_add_bits_item(sub_tree, hf_pn_io_am_location_level_4, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
4529 proto_tree_add_bits_item(sub_tree, hf_pn_io_am_location_level_5, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
4532 proto_tree_add_bits_item(sub_tree, hf_pn_io_am_location_level_6, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
4535 proto_tree_add_bits_item(sub_tree, hf_pn_io_am_location_level_7, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
4538 proto_tree_add_bits_item(sub_tree, hf_pn_io_am_location_level_8, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
4541 proto_tree_add_bits_item(sub_tree, hf_pn_io_am_location_level_9, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
4544 proto_tree_add_bits_item(sub_tree, hf_pn_io_am_location_level_10, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
4547 proto_tree_add_bits_item(sub_tree, hf_pn_io_am_location_level_11, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
4549 offset = bit_offset >> 3;
4553 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
4554 hf_pn_io_am_location_reserved1, &am_location_reserved1);
4556 /* BeginSlotNumber */
4557 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
4558 hf_pn_io_slot_nr, &am_location_begin_slot_number);
4560 /* BeginSubslotNumber */
4561 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
4562 hf_pn_io_subslot_nr, &am_location_begin_subslot_number);
4565 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
4566 hf_pn_io_slot_nr, &am_location_end_slot_number);
4568 /* EndSubSlotNumber*/
4569 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
4570 hf_pn_io_subslot_nr, &am_location_end_subslot_number);
4573 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
4574 hf_pn_io_am_location_reserved2, &am_location_reserved2);
4577 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
4578 hf_pn_io_am_location_reserved3, &am_location_reserved3);
4581 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
4582 hf_pn_io_am_location_reserved4, &am_location_reserved4);
4584 default: /* will not execute because of the line preceding the switch */
4593 dissect_IM_software_revision(tvbuff_t *tvb, int offset,
4594 packet_info *pinfo, proto_tree *tree, guint8 *drep)
4596 guint8 u8SWRevisionPrefix;
4597 guint8 u8IMSWRevisionFunctionalEnhancement;
4598 guint8 u8IMSWRevisionBugFix;
4599 guint8 u8IMSWRevisionInternalChange;
4601 /* SWRevisionPrefix */
4602 offset = dissect_dcerpc_char(tvb, offset, pinfo, tree, drep,
4603 hf_pn_io_im_revision_prefix, &u8SWRevisionPrefix);
4605 /* IM_SWRevision_Functional_Enhancement */
4606 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4607 hf_pn_io_im_sw_revision_functional_enhancement, &u8IMSWRevisionFunctionalEnhancement);
4609 /* IM_SWRevision_Bug_Fix */
4610 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4611 hf_pn_io_im_revision_bugfix, &u8IMSWRevisionBugFix);
4613 /* IM_SWRevision_Internal_Change */
4614 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4615 hf_pn_io_im_sw_revision_internal_change, &u8IMSWRevisionInternalChange);
4621 dissect_AM_device_identification(tvbuff_t *tvb, int offset,
4622 packet_info *pinfo, proto_tree *tree, guint8 *drep)
4624 dcerpc_info di; /* fake dcerpc_info struct */
4625 guint64 u64AMDeviceIdentificationDeviceSubID;
4626 guint64 u64AMDeviceIdentificationDeviceID;
4627 guint64 u64AMDeviceIdentificationVendorID;
4628 guint64 u64AM_DeviceIdentificationOrganization;
4630 proto_item *sub_item;
4631 proto_tree *sub_tree;
4633 sub_item = proto_tree_add_item(tree, hf_pn_io_am_device_identification, tvb, offset, 8, ENC_BIG_ENDIAN);
4634 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_am_device_identification);
4635 dissect_dcerpc_uint64(tvb, offset, pinfo, sub_tree, &di, drep,
4636 hf_pn_io_am_device_identification_device_sub_id, &u64AMDeviceIdentificationDeviceSubID);
4637 dissect_dcerpc_uint64(tvb, offset, pinfo, sub_tree, &di, drep,
4638 hf_pn_io_am_device_identification_device_id, &u64AMDeviceIdentificationDeviceID);
4639 dissect_dcerpc_uint64(tvb, offset, pinfo, sub_tree, &di, drep,
4640 hf_pn_io_am_device_identification_vendor_id, &u64AMDeviceIdentificationVendorID);
4641 offset = dissect_dcerpc_uint64(tvb, offset, pinfo, sub_tree, &di, drep,
4642 hf_pn_io_am_device_identification_organization, &u64AM_DeviceIdentificationOrganization);
4648 dissect_AM_FullInformation_block(tvbuff_t *tvb, int offset,
4649 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
4650 guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4652 e_guid_t IM_UniqueIdentifier;
4653 guint16 u16AM_TypeIdentification;
4654 guint16 u16IMHardwareRevision;
4656 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4657 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4658 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4663 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
4665 /* IM_UniqueIdentifier */
4666 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
4667 hf_pn_io_im_uniqueidentifier, &IM_UniqueIdentifier);
4670 offset = dissect_AM_Location(tvb, offset, pinfo, tree, drep);
4673 proto_tree_add_item(tree, hf_pn_io_im_annotation, tvb, offset, 64, ENC_ASCII|ENC_NA);
4677 proto_tree_add_item(tree, hf_pn_io_im_order_id, tvb, offset, 64, ENC_ASCII|ENC_NA);
4680 /* AM_SoftwareRevision */
4681 proto_tree_add_item(tree, hf_pn_io_am_software_revision, tvb, offset, 64, ENC_ASCII|ENC_NA);
4684 /* AM_HardwareRevision */
4685 proto_tree_add_item(tree, hf_pn_io_am_hardware_revision, tvb, offset, 64, ENC_ASCII|ENC_NA);
4688 /* IM_Serial_Number */
4689 proto_tree_add_item(tree, hf_pn_io_im_serial_number, tvb, offset, 16, ENC_ASCII|ENC_NA);
4692 /* IM_Software_Revision */
4693 offset = dissect_IM_software_revision(tvb, offset, pinfo, tree, drep);
4695 /* AM_DeviceIdentification */
4696 offset = dissect_AM_device_identification(tvb, offset, pinfo, tree, drep);
4698 /* AM_TypeIdentification */
4699 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4700 hf_pn_io_am_type_identification, &u16AM_TypeIdentification);
4702 /* IM_Hardware_Revision */
4703 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4704 hf_pn_io_im_hardware_revision, &u16IMHardwareRevision);
4710 dissect_AM_HardwareOnlyInformation_block(tvbuff_t *tvb, int offset,
4711 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
4712 guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4714 e_guid_t IM_UniqueIdentifier;
4715 guint16 u16AM_TypeIdentification;
4716 guint16 u16IMHardwareRevision;
4718 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4719 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4720 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4725 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
4727 /* IM_UniqueIdentifier */
4728 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
4729 hf_pn_io_im_uniqueidentifier, &IM_UniqueIdentifier);
4732 offset = dissect_AM_Location(tvb, offset, pinfo, tree, drep);
4735 proto_tree_add_item(tree, hf_pn_io_im_annotation, tvb, offset, 64, ENC_ASCII | ENC_NA);
4739 proto_tree_add_item(tree, hf_pn_io_im_order_id, tvb, offset, 64, ENC_ASCII | ENC_NA);
4742 /* AM_HardwareRevision */
4743 proto_tree_add_item(tree, hf_pn_io_am_hardware_revision, tvb, offset, 64, ENC_ASCII | ENC_NA);
4746 /* IM_Serial_Number */
4747 proto_tree_add_item(tree, hf_pn_io_im_serial_number, tvb, offset, 16, ENC_ASCII | ENC_NA);
4750 /* AM_DeviceIdentification */
4751 offset = dissect_AM_device_identification(tvb, offset, pinfo, tree, drep);
4753 /* AM_TypeIdentification */
4754 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4755 hf_pn_io_am_type_identification, &u16AM_TypeIdentification);
4757 /* IM_Hardware_Revision */
4758 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4759 hf_pn_io_im_hardware_revision, &u16IMHardwareRevision);
4765 dissect_AM_FirmwareOnlyInformation_block(tvbuff_t *tvb, int offset,
4766 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
4767 guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4769 e_guid_t IM_UniqueIdentifier;
4770 guint16 u16AM_TypeIdentification;
4772 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4773 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4774 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4778 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
4780 /* IM_UniqueIdentifier */
4781 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
4782 hf_pn_io_im_uniqueidentifier, &IM_UniqueIdentifier);
4785 offset = dissect_AM_Location(tvb, offset, pinfo, tree, drep);
4788 proto_tree_add_item(tree, hf_pn_io_im_annotation, tvb, offset, 64, ENC_ASCII | ENC_NA);
4792 proto_tree_add_item(tree, hf_pn_io_im_order_id, tvb, offset, 64, ENC_ASCII | ENC_NA);
4795 /* AM_SoftwareRevision */
4796 proto_tree_add_item(tree, hf_pn_io_am_software_revision, tvb, offset, 64, ENC_ASCII | ENC_NA);
4799 /* IM_Serial_Number */
4800 proto_tree_add_item(tree, hf_pn_io_im_serial_number, tvb, offset, 16, ENC_ASCII | ENC_NA);
4803 /* IM_Software_Revision */
4804 offset = dissect_IM_software_revision(tvb, offset, pinfo, tree, drep);
4806 /* AM_DeviceIdentification */
4807 offset = dissect_AM_device_identification(tvb, offset, pinfo, tree, drep);
4809 /* AM_TypeIdentification */
4810 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4811 hf_pn_io_am_type_identification, &u16AM_TypeIdentification);
4816 /* dissect the AssetManagementInfo */
4818 dissect_AssetManagementInfo(tvbuff_t *tvb, int offset,
4819 packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
4821 proto_item *sub_item;
4822 proto_tree *sub_tree;
4823 guint16 u16NumberofEntries;
4825 sub_item = proto_tree_add_item(tree, hf_pn_io_asset_management_info, tvb, offset, 0, ENC_NA);
4826 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_asset_management_info);
4828 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
4829 hf_pn_io_number_of_asset_management_info, &u16NumberofEntries);
4831 while (u16NumberofEntries > 0) {
4832 u16NumberofEntries--;
4833 offset = dissect_a_block(tvb, offset, pinfo, sub_tree, drep);
4838 /* dissect the AssetManagementData block */
4840 dissect_AssetManagementData_block(tvbuff_t *tvb, int offset,
4841 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
4842 guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4844 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4845 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4846 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4849 offset = dissect_AssetManagementInfo(tvb, offset, pinfo, tree, drep);
4853 /* dissect the IdentificationData block */
4855 dissect_IdentificationData_block(tvbuff_t *tvb, int offset,
4856 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4858 guint16 u16NumberOfAPIs = 1;
4860 guint16 u16NumberOfSlots;
4862 guint32 u32ModuleIdentNumber;
4863 guint16 u16NumberOfSubslots;
4864 guint32 u32SubmoduleIdentNumber;
4865 guint16 u16SubslotNr;
4866 proto_item *slot_item;
4867 proto_tree *slot_tree;
4868 guint32 u32SlotStart;
4869 proto_item *subslot_item;
4870 proto_tree *subslot_tree;
4873 if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) {
4874 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4875 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4879 if (u8BlockVersionLow == 1) {
4881 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4882 hf_pn_io_number_of_apis, &u16NumberOfAPIs);
4885 proto_item_append_text(item, ": APIs:%u", u16NumberOfAPIs);
4887 while (u16NumberOfAPIs--) {
4888 if (u8BlockVersionLow == 1) {
4890 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
4891 hf_pn_io_api, &u32Api);
4895 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4896 hf_pn_io_number_of_slots, &u16NumberOfSlots);
4898 proto_item_append_text(item, ", Slots:%u", u16NumberOfSlots);
4900 while (u16NumberOfSlots--) {
4901 slot_item = proto_tree_add_item(tree, hf_pn_io_slot, tvb, offset, 0, ENC_NA);
4902 slot_tree = proto_item_add_subtree(slot_item, ett_pn_io_slot);
4903 u32SlotStart = offset;
4906 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, slot_tree, drep,
4907 hf_pn_io_slot_nr, &u16SlotNr);
4908 /* ModuleIdentNumber */
4909 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, slot_tree, drep,
4910 hf_pn_io_module_ident_number, &u32ModuleIdentNumber);
4911 /* NumberOfSubslots */
4912 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, slot_tree, drep,
4913 hf_pn_io_number_of_subslots, &u16NumberOfSubslots);
4915 proto_item_append_text(slot_item, ": SlotNr:%u Ident:0x%x Subslots:%u",
4916 u16SlotNr, u32ModuleIdentNumber, u16NumberOfSubslots);
4918 while (u16NumberOfSubslots--) {
4919 subslot_item = proto_tree_add_item(slot_tree, hf_pn_io_subslot, tvb, offset, 6, ENC_NA);
4920 subslot_tree = proto_item_add_subtree(subslot_item, ett_pn_io_subslot);
4923 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, subslot_tree, drep,
4924 hf_pn_io_subslot_nr, &u16SubslotNr);
4925 /* SubmoduleIdentNumber */
4926 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, subslot_tree, drep,
4927 hf_pn_io_submodule_ident_number, &u32SubmoduleIdentNumber);
4929 proto_item_append_text(subslot_item, ": Number:0x%x, Ident:0x%x",
4930 u16SubslotNr, u32SubmoduleIdentNumber);
4933 proto_item_set_len(slot_item, offset-u32SlotStart);
4941 /* dissect the substitute value block */
4943 dissect_SubstituteValue_block(tvbuff_t *tvb, int offset,
4944 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
4945 guint16 u16BodyLength)
4947 guint16 u16SubstitutionMode;
4949 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4950 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4951 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4955 /* SubstitutionMode */
4956 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4957 hf_pn_io_substitutionmode, &u16SubstitutionMode);
4960 /* SubstituteDataItem */
4962 offset = dissect_PNIO_IOxS(tvb, offset, pinfo, tree, drep, hf_pn_io_iocs);
4964 /* SubstituteDataObjectElement */
4965 dissect_pn_user_data_bytes(tvb, offset, pinfo, tree, u16BodyLength, SUBST_DATA);
4971 /* dissect the RecordInputDataObjectElement block */
4973 dissect_RecordInputDataObjectElement_block(tvbuff_t *tvb, int offset,
4974 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
4976 guint8 u8LengthIOCS;
4977 guint8 u8LengthIOPS;
4978 guint16 u16LengthData;
4981 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
4982 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
4983 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
4988 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4989 hf_pn_io_length_iocs, &u8LengthIOCS);
4991 offset = dissect_PNIO_IOxS(tvb, offset, pinfo, tree, drep, hf_pn_io_iocs);
4993 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
4994 hf_pn_io_length_iops, &u8LengthIOPS);
4996 offset = dissect_PNIO_IOxS(tvb, offset, pinfo, tree, drep, hf_pn_io_iops);
4998 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
4999 hf_pn_io_length_data, &u16LengthData);
5001 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, u16LengthData, "Data");
5007 /* dissect the RecordOutputDataObjectElement block */
5009 dissect_RecordOutputDataObjectElement_block(tvbuff_t *tvb, int offset,
5010 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
5012 guint16 u16SubstituteActiveFlag;
5013 guint8 u8LengthIOCS;
5014 guint8 u8LengthIOPS;
5015 guint16 u16LengthData;
5016 guint16 u16Index = 0;
5017 guint32 u32RecDataLen;
5018 pnio_ar_t *ar = NULL;
5021 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5022 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5023 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5027 /* SubstituteActiveFlag */
5028 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5029 hf_pn_io_substitute_active_flag, &u16SubstituteActiveFlag);
5032 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
5033 hf_pn_io_length_iocs, &u8LengthIOCS);
5035 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
5036 hf_pn_io_length_iops, &u8LengthIOPS);
5038 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5039 hf_pn_io_length_data, &u16LengthData);
5040 /* DataItem (IOCS, Data, IOPS) */
5041 offset = dissect_PNIO_IOxS(tvb, offset, pinfo, tree, drep, hf_pn_io_iocs);
5043 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, u16LengthData, "Data");
5045 offset = dissect_PNIO_IOxS(tvb, offset, pinfo, tree, drep, hf_pn_io_iops);
5047 /* SubstituteValue */
5048 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
5054 /* dissect the alarm acknowledge block */
5056 dissect_Alarm_ack_block(tvbuff_t *tvb, int offset,
5057 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
5059 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5060 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5061 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5065 col_append_str(pinfo->cinfo, COL_INFO, ", Alarm Ack");
5067 offset = dissect_Alarm_header(tvb, offset, pinfo, tree, item, drep);
5069 offset = dissect_Alarm_specifier(tvb, offset, pinfo, tree, drep);
5071 offset = dissect_PNIO_status(tvb, offset, pinfo, tree, drep);
5077 /* dissect the maintenance block */
5079 dissect_Maintenance_block(tvbuff_t *tvb, int offset,
5080 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
5082 proto_item *sub_item;
5083 proto_tree *sub_tree;
5084 guint32 u32MaintenanceStatus;
5087 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5088 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5089 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5093 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5095 sub_item = proto_tree_add_item(tree, hf_pn_io_maintenance_status, tvb, offset, 4, ENC_BIG_ENDIAN);
5096 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_maintenance_status);
5098 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
5099 hf_pn_io_maintenance_status_demanded, &u32MaintenanceStatus);
5100 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
5101 hf_pn_io_maintenance_status_required, &u32MaintenanceStatus);
5103 if (u32MaintenanceStatus & 0x0002) {
5104 proto_item_append_text(item, ", Demanded");
5105 proto_item_append_text(sub_item, ", Demanded");
5108 if (u32MaintenanceStatus & 0x0001) {
5109 proto_item_append_text(item, ", Required");
5110 proto_item_append_text(sub_item, ", Required");
5117 /* dissect the read/write header */
5119 dissect_ReadWrite_header(tvbuff_t *tvb, int offset,
5120 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint16 *u16Index, e_guid_t *aruuid)
5124 guint16 u16SubslotNr;
5127 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5128 hf_pn_io_seq_number, &u16SeqNr);
5130 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
5131 hf_pn_io_ar_uuid, aruuid);
5133 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5134 hf_pn_io_api, &u32Api);
5135 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5136 hf_pn_io_slot_nr, &u16SlotNr);
5137 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5138 hf_pn_io_subslot_nr, &u16SubslotNr);
5139 /* padding doesn't match offset required for align4 */
5140 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
5141 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5142 hf_pn_io_index, u16Index);
5144 proto_item_append_text(item, ": Seq:%u, Api:0x%x, Slot:0x%x/0x%x",
5145 u16SeqNr, u32Api, u16SlotNr, u16SubslotNr);
5147 col_append_fstr(pinfo->cinfo, COL_INFO, ", Api:0x%x, Slot:0x%x/0x%x, Index:%s",
5148 u32Api, u16SlotNr, u16SubslotNr,
5149 val_to_str(*u16Index, pn_io_index, "(0x%x)"));
5155 /* dissect the write request block */
5157 dissect_IODWriteReqHeader_block(tvbuff_t *tvb, int offset,
5158 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
5159 guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t ** ar)
5164 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5165 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5166 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5170 offset = dissect_ReadWrite_header(tvb, offset, pinfo, tree, item, drep, u16Index, &aruuid);
5172 /* The value NIL indicates the usage of the implicit AR*/
5173 *ar = pnio_ar_find_by_aruuid(pinfo, &aruuid);
5175 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5176 hf_pn_io_record_data_length, u32RecDataLen);
5178 memset(&null_uuid, 0, sizeof(e_guid_t));
5179 if (memcmp(&aruuid, &null_uuid, sizeof (e_guid_t)) == 0) {
5180 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
5181 hf_pn_io_target_ar_uuid, &aruuid);
5184 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 24);
5186 proto_item_append_text(item, ", Len:%u", *u32RecDataLen);
5188 if (*u32RecDataLen != 0)
5189 col_append_fstr(pinfo->cinfo, COL_INFO, ", %u bytes",
5196 /* dissect the read request block */
5198 dissect_IODReadReqHeader_block(tvbuff_t *tvb, int offset,
5199 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
5200 guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar)
5205 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5206 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5207 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5211 offset = dissect_ReadWrite_header(tvb, offset, pinfo, tree, item, drep, u16Index, &aruuid);
5213 /* The value NIL indicates the usage of the implicit AR*/
5214 *ar = pnio_ar_find_by_aruuid(pinfo, &aruuid);
5216 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5217 hf_pn_io_record_data_length, u32RecDataLen);
5219 memset(&null_uuid, 0, sizeof(e_guid_t));
5220 if (memcmp(&aruuid, &null_uuid, sizeof (e_guid_t)) == 0) {
5221 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
5222 hf_pn_io_target_ar_uuid, &aruuid);
5223 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 8);
5225 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 24);
5228 proto_item_append_text(item, ", Len:%u", *u32RecDataLen);
5230 if (*u32RecDataLen != 0)
5231 col_append_fstr(pinfo->cinfo, COL_INFO, ", %u bytes",
5238 /* dissect the write response block */
5240 dissect_IODWriteResHeader_block(tvbuff_t *tvb, int offset,
5241 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
5242 guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar)
5250 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5251 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5252 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5256 offset = dissect_ReadWrite_header(tvb, offset, pinfo, tree, item, drep, u16Index, &aruuid);
5258 /* The value NIL indicates the usage of the implicit AR*/
5259 *ar = pnio_ar_find_by_aruuid(pinfo, &aruuid);
5261 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5262 hf_pn_io_record_data_length, u32RecDataLen);
5264 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5265 hf_pn_io_add_val1, &u16AddVal1);
5267 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5268 hf_pn_io_add_val2, &u16AddVal2);
5270 u32Status = ((drep[0] & DREP_LITTLE_ENDIAN)
5271 ? tvb_get_letohl (tvb, offset)
5272 : tvb_get_ntohl (tvb, offset));
5274 offset = dissect_PNIO_status(tvb, offset, pinfo, tree, drep);
5276 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 16);
5278 proto_item_append_text(item, ", Len:%u, Index:0x%x, Status:0x%x, Val1:%u, Val2:%u",
5279 *u32RecDataLen, *u16Index, u32Status, u16AddVal1, u16AddVal2);
5281 if (*u32RecDataLen != 0)
5282 col_append_fstr(pinfo->cinfo, COL_INFO, ", %u bytes",
5289 /* dissect the read response block */
5291 dissect_IODReadResHeader_block(tvbuff_t *tvb, int offset,
5292 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
5293 guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar)
5300 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5301 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5302 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5306 offset = dissect_ReadWrite_header(tvb, offset, pinfo, tree, item, drep, u16Index, &aruuid);
5308 /* The value NIL indicates the usage of the implicit AR*/
5309 *ar = pnio_ar_find_by_aruuid(pinfo, &aruuid);
5311 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5312 hf_pn_io_record_data_length, u32RecDataLen);
5314 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5315 hf_pn_io_add_val1, &u16AddVal1);
5317 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5318 hf_pn_io_add_val2, &u16AddVal2);
5320 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 20);
5322 proto_item_append_text(item, ", Len:%u, AddVal1:%u, AddVal2:%u",
5323 *u32RecDataLen, u16AddVal1, u16AddVal2);
5325 if (*u32RecDataLen != 0)
5326 col_append_fstr(pinfo->cinfo, COL_INFO, ", %u bytes",
5333 /* dissect the control/connect block */
5335 dissect_ControlConnect_block(tvbuff_t *tvb, int offset,
5336 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
5340 guint16 u16SessionKey;
5341 proto_item *sub_item;
5342 proto_tree *sub_tree;
5344 guint16 u16Properties;
5347 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5348 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5349 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5353 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5354 hf_pn_io_reserved16, NULL);
5356 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
5357 hf_pn_io_ar_uuid, &ar_uuid);
5359 /* The value NIL indicates the usage of the implicit AR*/
5360 *ar = pnio_ar_find_by_aruuid(pinfo, &ar_uuid);
5362 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5363 hf_pn_io_sessionkey, &u16SessionKey);
5365 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5366 hf_pn_io_reserved16, NULL);
5368 sub_item = proto_tree_add_item(tree, hf_pn_io_control_command, tvb, offset, 2, ENC_BIG_ENDIAN);
5369 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_control_command);
5371 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5372 hf_pn_io_control_command_prmend, &u16Command);
5373 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5374 hf_pn_io_control_command_applready, &u16Command);
5375 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5376 hf_pn_io_control_command_release, &u16Command);
5377 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5378 hf_pn_io_control_command_done, &u16Command);
5379 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5380 hf_pn_io_control_command_ready_for_companion, &u16Command);
5381 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5382 hf_pn_io_control_command_ready_for_rt_class3, &u16Command);
5384 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5385 hf_pn_io_control_command_prmbegin, &u16Command);
5387 if (u16Command & 0x0002) {
5388 /* ApplicationReady: special decode */
5389 sub_item = proto_tree_add_item(tree, hf_pn_io_control_block_properties_applready, tvb, offset, 2, ENC_BIG_ENDIAN);
5390 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_control_block_properties);
5391 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5392 hf_pn_io_control_block_properties_applready0, &u16Properties);
5394 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5395 hf_pn_io_control_block_properties, &u16Properties);
5398 proto_item_append_text(item, ": Session:%u, Command:", u16SessionKey);
5400 if (u16Command & 0x0001) {
5401 proto_item_append_text(sub_item, ", ParameterEnd");
5402 proto_item_append_text(item, " ParameterEnd");
5403 col_append_str(pinfo->cinfo, COL_INFO, ", Command: ParameterEnd");
5405 if (u16Command & 0x0002) {
5406 proto_item_append_text(sub_item, ", ApplicationReady");
5407 proto_item_append_text(item, " ApplicationReady");
5408 col_append_str(pinfo->cinfo, COL_INFO, ", Command: ApplicationReady");
5410 if (u16Command & 0x0004) {
5411 proto_item_append_text(sub_item, ", Release");
5412 proto_item_append_text(item, " Release");
5413 col_append_str(pinfo->cinfo, COL_INFO, ", Command: Release");
5415 if (u16Command & 0x0008) {
5416 proto_item_append_text(sub_item, ", Done");
5417 proto_item_append_text(item, ", Done");
5418 col_append_str(pinfo->cinfo, COL_INFO, ", Command: Done");
5421 proto_item_append_text(item, ", Properties:0x%x", u16Properties);
5426 /* dissect the ControlBlockPrmBegin block */
5428 dissect_ControlBlockPrmBegin(tvbuff_t *tvb, int offset,
5429 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint32 u32RecDataLen,
5433 guint16 u16SessionKey;
5435 proto_item *sub_item;
5436 proto_tree *sub_tree;
5438 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5439 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5440 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5443 if (u32RecDataLen != 28-2) /* must be 28 see specification (version already dissected) */
5445 expert_add_info_format(pinfo, item, &ei_pn_io_block_length, "Block length of %u is invalid!", u32RecDataLen);
5448 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
5451 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep, hf_pn_io_ar_uuid, &ar_uuid);
5453 /* The value NIL indicates the usage of the implicit AR*/
5454 *ar = pnio_ar_find_by_aruuid(pinfo, &ar_uuid);
5457 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_sessionkey, &u16SessionKey);
5459 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
5461 /* ControlCommand */
5462 sub_item = proto_tree_add_item(tree, hf_pn_io_control_command, tvb, offset, 2, ENC_BIG_ENDIAN);
5463 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_control_command);
5465 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5466 hf_pn_io_control_command_prmend, &u16Command);
5467 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5468 hf_pn_io_control_command_applready, &u16Command);
5469 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5470 hf_pn_io_control_command_release, &u16Command);
5471 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5472 hf_pn_io_control_command_done, &u16Command);
5473 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5474 hf_pn_io_control_command_ready_for_companion, &u16Command);
5475 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5476 hf_pn_io_control_command_ready_for_rt_class3, &u16Command);
5478 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5479 hf_pn_io_control_command_prmbegin, &u16Command);
5481 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
5482 hf_pn_io_control_command_reserved_7_15, &u16Command);
5484 /* ControlBlockProperties.reserved */
5485 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_control_command_reserved, NULL);
5489 /* dissect the SubmoduleListBlock block */
5491 dissect_SubmoduleListBlock(tvbuff_t *tvb, int offset,
5492 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint32 u32RecDataLen _U_,
5497 guint16 u16SlotNumber;
5498 guint16 u16SubSlotNumber;
5500 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5501 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5502 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5506 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_SubmoduleListEntries, &u16Entries);
5508 while (u16Entries --)
5511 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep, hf_pn_io_api, &u32API);
5513 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_slot_nr, &u16SlotNumber);
5515 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_subslot_nr, &u16SubSlotNumber);
5521 /* dissect the PDevData block */
5523 dissect_PDevData_block(tvbuff_t *tvb, int offset,
5524 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
5527 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5528 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5529 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5533 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5535 offset = dissect_blocks(tvb, offset, pinfo, tree, drep);
5540 /* dissect the AdjustPreambleLength block */
5542 dissect_AdjustPreambleLength_block(tvbuff_t *tvb, int offset,
5543 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
5545 guint16 u16AdjustProperties;
5546 guint16 u16PreambleLength;
5548 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5549 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5550 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5554 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5556 /* PreambleLength */
5557 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5558 hf_pn_io_PreambleLength, &u16PreambleLength);
5561 /* AdjustProperties */
5562 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5563 hf_pn_io_adjust_properties, &u16AdjustProperties);
5568 /* dissect the dissect_CheckMAUTypeExtension_block block */
5570 dissect_CheckMAUTypeExtension_block(tvbuff_t *tvb, int offset,
5571 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
5573 guint16 u16MauTypeExtension;
5575 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5576 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5577 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5581 /* MauTypeExtension */
5582 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_mau_type_extension, &u16MauTypeExtension);
5587 /* dissect the PDPortDataAdjust block */
5589 dissect_PDPortData_Adjust_block(tvbuff_t *tvb, int offset,
5590 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
5591 guint16 u16BodyLength)
5594 guint16 u16SubslotNr;
5598 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5599 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5600 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5604 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5607 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5608 hf_pn_io_slot_nr, &u16SlotNr);
5610 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5611 hf_pn_io_subslot_nr, &u16SubslotNr);
5613 proto_item_append_text(item, ": Slot:0x%x/0x%x", u16SlotNr, u16SubslotNr);
5617 new_tvb = tvb_new_subset_length(tvb, offset, u16BodyLength);
5618 dissect_blocks(new_tvb, 0, pinfo, tree, drep);
5619 offset += u16BodyLength;
5621 /* XXX - do we have to free the new_tvb somehow? */
5627 /* dissect the PDPortDataCheck blocks */
5629 dissect_PDPortData_Check_block(tvbuff_t *tvb, int offset,
5630 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
5631 guint16 u16BodyLength)
5634 guint16 u16SubslotNr;
5638 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5639 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5640 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5644 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5647 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5648 hf_pn_io_slot_nr, &u16SlotNr);
5650 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5651 hf_pn_io_subslot_nr, &u16SubslotNr);
5653 proto_item_append_text(item, ": Slot:0x%x/0x%x", u16SlotNr, u16SubslotNr);
5657 new_tvb = tvb_new_subset_length(tvb, offset, u16BodyLength);
5658 dissect_blocks(new_tvb, 0, pinfo, tree, drep);
5659 offset += u16BodyLength;
5661 /* XXX - do we have to free the new_tvb somehow? */
5666 /* dissect the Line Delay */
5668 dissect_Line_Delay(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep,
5669 guint32 *u32LineDelayValue)
5671 proto_item *sub_item;
5672 proto_tree *sub_tree;
5673 guint32 u32FormatIndicator;
5674 guint8 isFormatIndicatorEnabled;
5676 sub_item = proto_tree_add_item(tree, hf_pn_io_line_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
5677 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_line_delay);
5679 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
5680 hf_pn_io_line_delay_format_indicator, &u32FormatIndicator);
5682 isFormatIndicatorEnabled = (guint8)((u32FormatIndicator >> 31) & 0x01);
5683 if (isFormatIndicatorEnabled)
5685 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
5686 hf_pn_io_cable_delay_value, u32LineDelayValue);
5690 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
5691 hf_pn_io_line_delay_value, u32LineDelayValue);
5697 /* dissect the PDPortDataReal blocks */
5699 dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
5700 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
5703 guint16 u16SubslotNr;
5704 guint8 u8LengthOwnPortID;
5706 guint8 u8NumberOfPeers;
5708 guint8 u8LengthPeerPortID;
5710 guint8 u8LengthPeerChassisID;
5711 char *pPeerChassisID;
5714 guint32 u32DomainBoundary;
5715 guint32 u32MulticastBoundary;
5716 guint16 u16PortState;
5717 guint32 u32MediaType;
5718 guint32 u32LineDelayValue;
5720 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
5721 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5722 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5726 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5729 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5730 hf_pn_io_slot_nr, &u16SlotNr);
5732 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5733 hf_pn_io_subslot_nr, &u16SubslotNr);
5735 /* LengthOwnPortID */
5736 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
5737 hf_pn_io_length_own_port_id, &u8LengthOwnPortID);
5739 pOwnPortID = (char *)wmem_alloc(wmem_packet_scope(), u8LengthOwnPortID+1);
5740 tvb_memcpy(tvb, (guint8 *) pOwnPortID, offset, u8LengthOwnPortID);
5741 pOwnPortID[u8LengthOwnPortID] = '\0';
5742 proto_tree_add_string (tree, hf_pn_io_own_port_id, tvb, offset, u8LengthOwnPortID, pOwnPortID);
5743 offset += u8LengthOwnPortID;
5746 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
5747 hf_pn_io_number_of_peers, &u8NumberOfPeers);
5749 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5751 u8I = u8NumberOfPeers;
5753 /* LengthPeerPortID */
5754 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
5755 hf_pn_io_length_peer_port_id, &u8LengthPeerPortID);
5757 pPeerPortID = (char *)wmem_alloc(wmem_packet_scope(), u8LengthPeerPortID+1);
5758 tvb_memcpy(tvb, (guint8 *) pPeerPortID, offset, u8LengthPeerPortID);
5759 pPeerPortID[u8LengthPeerPortID] = '\0';
5760 proto_tree_add_string (tree, hf_pn_io_peer_port_id, tvb, offset, u8LengthPeerPortID, pPeerPortID);
5761 offset += u8LengthPeerPortID;
5763 /* LengthPeerChassisID */
5764 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
5765 hf_pn_io_length_peer_chassis_id, &u8LengthPeerChassisID);
5767 pPeerChassisID = (char *)wmem_alloc(wmem_packet_scope(), u8LengthPeerChassisID+1);
5768 tvb_memcpy(tvb, (guint8 *) pPeerChassisID, offset, u8LengthPeerChassisID);
5769 pPeerChassisID[u8LengthPeerChassisID] = '\0';
5770 proto_tree_add_string (tree, hf_pn_io_peer_chassis_id, tvb, offset, u8LengthPeerChassisID, pPeerChassisID);
5771 offset += u8LengthPeerChassisID;
5774 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5777 offset = dissect_Line_Delay(tvb, offset, pinfo, tree, drep, &u32LineDelayValue);
5779 /* PeerMACAddress */
5780 offset = dissect_pn_mac(tvb, offset, pinfo, tree,
5781 hf_pn_io_peer_macadd, mac);
5783 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5787 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5788 hf_pn_io_mau_type, &u16MAUType);
5790 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5792 /* DomainBoundary */
5793 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5794 hf_pn_io_domain_boundary, &u32DomainBoundary);
5795 /* MulticastBoundary */
5796 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5797 hf_pn_io_multicast_boundary, &u32MulticastBoundary);
5799 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5800 hf_pn_io_port_state, &u16PortState);
5802 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5805 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5806 hf_pn_io_media_type, &u32MediaType);
5808 proto_item_append_text(item, ": Slot:0x%x/0x%x, OwnPortID:%s, Peers:%u PortState:%s MediaType:%s",
5809 u16SlotNr, u16SubslotNr, pOwnPortID, u8NumberOfPeers,
5810 val_to_str(u16PortState, pn_io_port_state, "0x%x"),
5811 val_to_str(u32MediaType, pn_io_media_type, "0x%x"));
5818 dissect_PDInterfaceMrpDataAdjust_block(tvbuff_t *tvb, int offset,
5819 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength)
5823 guint8 u8LengthDomainName;
5824 guint8 u8NumberOfMrpInstances;
5826 int iStartOffset = offset;
5829 if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) { /* added low version == 1 */
5830 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5831 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5835 if (u8BlockVersionLow == 0) /*dissect LowVersion == 0 */
5837 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5839 /* MRP_DomainUUID */
5840 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
5841 hf_pn_io_mrp_domain_uuid, &uuid);
5843 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5844 hf_pn_io_mrp_role, &u16Role);
5846 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5848 /* MRP_LengthDomainName */
5849 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
5850 hf_pn_io_mrp_length_domain_name, &u8LengthDomainName);
5851 /* MRP_DomainName */
5852 pDomainName = (char *)wmem_alloc(wmem_packet_scope(), u8LengthDomainName+1);
5853 tvb_memcpy(tvb, (guint8 *) pDomainName, offset, u8LengthDomainName);
5854 pDomainName[u8LengthDomainName] = '\0';
5855 proto_tree_add_string (tree, hf_pn_io_mrp_domain_name, tvb, offset, u8LengthDomainName, pDomainName);
5856 offset += u8LengthDomainName;
5859 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5860 if ((offset - iStartOffset) < u16BodyLength)
5862 offset = dissect_blocks(tvb, offset, pinfo, tree, drep);
5865 else if (u8BlockVersionLow == 1) /*dissect LowVersion == 1 */
5867 /* Padding one byte */
5868 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 1);
5869 /* Number of Mrp Instances */
5870 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
5871 hf_pn_io_mrp_instances, &u8NumberOfMrpInstances);
5872 if (u8NumberOfMrpInstances > 0xf) {
5873 expert_add_info_format(pinfo, item, &ei_pn_io_mrp_instances, "Number of MrpInstances greater 0x0f is (0x%x)", u8NumberOfMrpInstances);
5876 while(u8NumberOfMrpInstances > 0)
5878 offset = dissect_a_block(tvb, offset, pinfo, tree, drep);
5879 u8NumberOfMrpInstances--;
5887 dissect_PDInterfaceMrpDataReal_block(tvbuff_t *tvb, int offset,
5888 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength)
5893 guint8 u8LengthDomainName;
5894 guint8 u8NumberOfMrpInstances;
5896 int endoffset = offset + u16BodyLength;
5898 /* added blockversion 1 */
5899 if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 2) {
5900 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5901 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5905 if (u8BlockVersionLow < 2) /* dissect low versions 0 and 1 */
5908 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5910 /* MRP_DomainUUID */
5911 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
5912 hf_pn_io_mrp_domain_uuid, &uuid);
5914 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5915 hf_pn_io_mrp_role, &u16Role);
5917 if (u8BlockVersionLow == 1) {
5919 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5920 hf_pn_io_mrp_version, &u16Version);
5922 /* MRP_LengthDomainName */
5923 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
5924 hf_pn_io_mrp_length_domain_name, &u8LengthDomainName);
5925 /* MRP_DomainName */
5926 pDomainName = (char *)wmem_alloc(wmem_packet_scope(), u8LengthDomainName+1);
5927 tvb_memcpy(tvb, (guint8 *) pDomainName, offset, u8LengthDomainName);
5928 pDomainName[u8LengthDomainName] = '\0';
5929 proto_tree_add_string (tree, hf_pn_io_mrp_domain_name, tvb, offset, u8LengthDomainName, pDomainName);
5930 offset += u8LengthDomainName;
5932 if (u8BlockVersionLow == 0) {
5934 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
5935 hf_pn_io_mrp_version, &u16Version);
5938 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5940 while(endoffset > offset)
5942 offset = dissect_a_block(tvb, offset, pinfo, tree, drep);
5945 else if (u8BlockVersionLow == 2)
5947 /* Padding one byte */
5948 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 1);
5949 /* Number of Mrp Instances */
5950 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
5951 hf_pn_io_mrp_instances, &u8NumberOfMrpInstances);
5952 if (u8NumberOfMrpInstances > 0xf) {
5953 expert_add_info_format(pinfo, item, &ei_pn_io_mrp_instances, "Number of MrpInstances greater 0x0f is (0x%x)", u8NumberOfMrpInstances);
5956 while(u8NumberOfMrpInstances > 0)
5958 offset = dissect_a_block(tvb, offset, pinfo, tree, drep);
5959 u8NumberOfMrpInstances--;
5967 dissect_PDInterfaceMrpDataCheck_block(tvbuff_t *tvb, int offset,
5968 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
5972 guint8 u8NumberOfMrpInstances;
5974 /* BlockVersionLow == 1 added */
5975 if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) {
5976 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
5977 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
5980 if (u8BlockVersionLow == 0)
5982 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
5984 /* MRP_DomainUUID */
5985 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
5986 hf_pn_io_mrp_domain_uuid, &uuid);
5989 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5990 hf_pn_io_mrp_check, &u32Check);
5991 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5992 hf_pn_io_mrp_check_mrm, &u32Check);
5993 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5994 hf_pn_io_mrp_check_mrpdomain, &u32Check);
5995 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5996 hf_pn_io_mrp_check_reserved_1, &u32Check);
5997 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
5998 hf_pn_io_mrp_check_reserved_2, &u32Check);
5999 offset +=4; /* MRP_Check (32 bit) done */
6001 else if (u8BlockVersionLow == 1)
6003 /* Padding one byte */
6004 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 1);
6005 /* Number of Mrp Instances */
6006 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
6007 hf_pn_io_mrp_instances, &u8NumberOfMrpInstances);
6008 if (u8NumberOfMrpInstances > 0xf) {
6009 expert_add_info_format(pinfo, item, &ei_pn_io_mrp_instances, "Number of MrpInstances greater 0x0f is (0x%x)", u8NumberOfMrpInstances);
6012 while(u8NumberOfMrpInstances > 0)
6014 offset = dissect_a_block(tvb, offset, pinfo, tree, drep);
6015 u8NumberOfMrpInstances--;
6024 dissect_PDPortMrpData_block(tvbuff_t *tvb, int offset,
6025 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6028 guint8 u8MrpInstance;
6030 /* added BlockVersionLow == 1 */
6031 if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) {
6032 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6033 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6036 if (u8BlockVersionLow == 0) {
6037 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6039 else /*if (u8BlockVersionLow == 1) */
6041 /* Padding one byte */
6042 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 1);
6044 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
6045 hf_pn_io_mrp_instance, &u8MrpInstance);
6047 /* MRP_DomainUUID */
6048 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
6049 hf_pn_io_mrp_domain_uuid, &uuid);
6055 dissect_MrpManagerParams_block(tvbuff_t *tvb, int offset,
6056 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6060 guint16 u16TOPNRmax;
6061 guint16 u16TSTshortT;
6062 guint16 u16TSTdefaultT;
6063 guint16 u16TSTNRmax;
6066 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6067 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6068 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6073 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6074 hf_pn_io_mrp_prio, &u16Prio);
6076 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6077 hf_pn_io_mrp_topchgt, &u16TOPchgT);
6079 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6080 hf_pn_io_mrp_topnrmax, &u16TOPNRmax);
6082 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6083 hf_pn_io_mrp_tstshortt, &u16TSTshortT);
6084 /* MRP_TSTdefaultT */
6085 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6086 hf_pn_io_mrp_tstdefaultt, &u16TSTdefaultT);
6088 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6089 hf_pn_io_mrp_tstnrmax, &u16TSTNRmax);
6091 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6098 dissect_MrpRTMode(tvbuff_t *tvb, int offset,
6099 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep)
6101 proto_item *sub_item;
6102 proto_tree *sub_tree;
6107 sub_item = proto_tree_add_item(tree, hf_pn_io_mrp_rtmode, tvb, offset, 4, ENC_BIG_ENDIAN);
6108 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_mrp_rtmode);
6110 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
6111 hf_pn_io_mrp_rtmode_reserved2, &u32RTMode);
6112 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
6113 hf_pn_io_mrp_rtmode_reserved1, &u32RTMode);
6114 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
6115 hf_pn_io_mrp_rtmode_rtclass3, &u32RTMode);
6116 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
6117 hf_pn_io_mrp_rtmode_rtclass12, &u32RTMode);
6124 dissect_MrpRTModeManagerData_block(tvbuff_t *tvb, int offset,
6125 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6127 guint16 u16TSTNRmax;
6128 guint16 u16TSTdefaultT;
6131 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6132 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6133 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6138 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6139 hf_pn_io_mrp_tstnrmax, &u16TSTNRmax);
6140 /* MRP_TSTdefaultT */
6141 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6142 hf_pn_io_mrp_tstdefaultt, &u16TSTdefaultT);
6144 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6147 offset = dissect_MrpRTMode(tvb, offset, pinfo, tree, item, drep);
6154 dissect_MrpRingStateData_block(tvbuff_t *tvb, int offset,
6155 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6157 guint16 u16RingState;
6160 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6161 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6162 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6167 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6168 hf_pn_io_mrp_ring_state, &u16RingState);
6175 dissect_MrpRTStateData_block(tvbuff_t *tvb, int offset,
6176 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6181 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6182 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6183 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6188 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6189 hf_pn_io_mrp_rt_state, &u16RTState);
6196 dissect_MrpClientParams_block(tvbuff_t *tvb, int offset,
6197 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6199 guint16 u16MRP_LNKdownT;
6200 guint16 u16MRP_LNKupT;
6201 guint16 u16MRP_LNKNRmax;
6204 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6205 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6206 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6211 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6212 hf_pn_io_mrp_lnkdownt, &u16MRP_LNKdownT);
6214 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6215 hf_pn_io_mrp_lnkupt, &u16MRP_LNKupT);
6216 /* MRP_LNKNRmax u16 */
6217 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6218 hf_pn_io_mrp_lnknrmax, &u16MRP_LNKNRmax);
6225 dissect_MrpRTModeClientData_block(tvbuff_t *tvb, int offset,
6226 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6228 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6230 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6231 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6232 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6237 offset = dissect_MrpRTMode(tvb, offset, pinfo, tree, item, drep);
6244 dissect_CheckSyncDifference_block(tvbuff_t *tvb, int offset,
6245 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6247 proto_item *sub_item;
6248 proto_tree *sub_tree;
6249 guint16 u16CheckSyncMode;
6252 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6253 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6254 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6258 sub_item = proto_tree_add_item(tree, hf_pn_io_check_sync_mode, tvb, offset, 2, ENC_BIG_ENDIAN);
6259 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_check_sync_mode);
6261 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
6262 hf_pn_io_check_sync_mode_reserved, &u16CheckSyncMode);
6263 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
6264 hf_pn_io_check_sync_mode_sync_master, &u16CheckSyncMode);
6265 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
6266 hf_pn_io_check_sync_mode_cable_delay, &u16CheckSyncMode);
6269 proto_item_append_text(sub_item, "CheckSyncMode: SyncMaster:%d, CableDelay:%d",
6270 (u16CheckSyncMode >> 1) & 1, u16CheckSyncMode & 1);
6272 proto_item_append_text(item, " : SyncMaster:%d, CableDelay:%d",
6273 (u16CheckSyncMode >> 1) & 1, u16CheckSyncMode & 1);
6280 dissect_CheckMAUTypeDifference_block(tvbuff_t *tvb, int offset,
6281 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6283 guint16 u16MAUTypeMode;
6285 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6286 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6287 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6291 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6292 hf_pn_io_mau_type_mode, &u16MAUTypeMode);
6294 proto_item_append_text(item, ": MAUTypeMode:%s",
6295 val_to_str(u16MAUTypeMode, pn_io_mau_type_mode, "0x%x"));
6301 /* dissect the AdjustDomainBoundary blocks */
6303 dissect_AdjustDomainBoundary_block(tvbuff_t *tvb, int offset,
6304 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6306 guint32 u32DomainBoundary;
6307 guint32 u32DomainBoundaryIngress;
6308 guint32 u32DomainBoundaryEgress;
6309 guint16 u16AdjustProperties;
6312 if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) {
6313 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6314 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6319 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6321 switch (u8BlockVersionLow) {
6323 /* DomainBoundary */
6324 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6325 hf_pn_io_domain_boundary, &u32DomainBoundary);
6326 /* AdjustProperties */
6327 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6328 hf_pn_io_adjust_properties, &u16AdjustProperties);
6330 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6332 proto_item_append_text(item, ": Boundary:0x%x, Properties:0x%x",
6333 u32DomainBoundary, u16AdjustProperties);
6337 /* DomainBoundaryIngress */
6338 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6339 hf_pn_io_domain_boundary_ingress, &u32DomainBoundaryIngress);
6340 /* DomainBoundaryEgress */
6341 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6342 hf_pn_io_domain_boundary_egress, &u32DomainBoundaryEgress);
6343 /* AdjustProperties */
6344 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6345 hf_pn_io_adjust_properties, &u16AdjustProperties);
6347 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6349 proto_item_append_text(item, ": BoundaryIngress:0x%x, BoundaryEgress:0x%x, Properties:0x%x",
6350 u32DomainBoundaryIngress, u32DomainBoundaryEgress, u16AdjustProperties);
6354 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6355 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6363 /* dissect the AdjustMulticastBoundary blocks */
6365 dissect_AdjustMulticastBoundary_block(tvbuff_t *tvb, int offset,
6366 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6368 guint32 u32MulticastBoundary;
6369 guint16 u16AdjustProperties;
6372 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6373 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6374 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6378 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6381 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6382 hf_pn_io_multicast_boundary, &u32MulticastBoundary);
6383 /* AdjustProperties */
6384 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6385 hf_pn_io_adjust_properties, &u16AdjustProperties);
6387 proto_item_append_text(item, ": Boundary:0x%x, Properties:0x%x",
6388 u32MulticastBoundary, u16AdjustProperties);
6394 /* dissect the AdjustMAUType block */
6396 dissect_AdjustMAUType_block(tvbuff_t *tvb, int offset,
6397 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6400 guint16 u16AdjustProperties;
6403 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6404 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6405 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6409 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6412 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6413 hf_pn_io_mau_type, &u16MAUType);
6414 /* AdjustProperties */
6415 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6416 hf_pn_io_adjust_properties, &u16AdjustProperties);
6418 proto_item_append_text(item, ": MAUType:%s, Properties:0x%x",
6419 val_to_str(u16MAUType, pn_io_mau_type, "0x%x"),
6420 u16AdjustProperties);
6426 /* dissect the CheckMAUType block */
6428 dissect_CheckMAUType_block(tvbuff_t *tvb, int offset,
6429 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6434 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6435 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6436 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6441 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6442 hf_pn_io_mau_type, &u16MAUType);
6444 proto_item_append_text(item, ": MAUType:%s",
6445 val_to_str(u16MAUType, pn_io_mau_type, "0x%x"));
6451 /* dissect the CheckLineDelay block */
6453 dissect_CheckLineDelay_block(tvbuff_t *tvb, int offset,
6454 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6456 guint32 u32LineDelay;
6459 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6460 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6461 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6465 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6468 offset = dissect_Line_Delay(tvb, offset, pinfo, tree, drep, &u32LineDelay);
6470 proto_item_append_text(item, ": LineDelay:%uns", u32LineDelay);
6476 /* dissect the CheckPeers block */
6478 dissect_CheckPeers_block(tvbuff_t *tvb, int offset,
6479 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6481 guint8 u8NumberOfPeers;
6483 guint8 u8LengthPeerPortID;
6485 guint8 u8LengthPeerChassisID;
6486 char *pPeerChassisID;
6489 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6490 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6491 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6496 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
6497 hf_pn_io_number_of_peers, &u8NumberOfPeers);
6499 u8I = u8NumberOfPeers;
6501 /* LengthPeerPortID */
6502 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
6503 hf_pn_io_length_peer_port_id, &u8LengthPeerPortID);
6505 pPeerPortID = (char *)wmem_alloc(wmem_packet_scope(), u8LengthPeerPortID+1);
6506 tvb_memcpy(tvb, (guint8 *) pPeerPortID, offset, u8LengthPeerPortID);
6507 pPeerPortID[u8LengthPeerPortID] = '\0';
6508 proto_tree_add_string (tree, hf_pn_io_peer_port_id, tvb, offset, u8LengthPeerPortID, pPeerPortID);
6509 offset += u8LengthPeerPortID;
6511 /* LengthPeerChassisID */
6512 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
6513 hf_pn_io_length_peer_chassis_id, &u8LengthPeerChassisID);
6515 pPeerChassisID = (char *)wmem_alloc(wmem_packet_scope(), u8LengthPeerChassisID+1);
6516 tvb_memcpy(tvb, (guint8 *) pPeerChassisID, offset, u8LengthPeerChassisID);
6517 pPeerChassisID[u8LengthPeerChassisID] = '\0';
6518 proto_tree_add_string (tree, hf_pn_io_peer_chassis_id, tvb, offset, u8LengthPeerChassisID, pPeerChassisID);
6519 offset += u8LengthPeerChassisID;
6522 proto_item_append_text(item, ": NumberOfPeers:%u", u8NumberOfPeers);
6528 /* dissect the AdjustPortState block */
6530 dissect_AdjustPortState_block(tvbuff_t *tvb, int offset,
6531 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6533 guint16 u16PortState;
6534 guint16 u16AdjustProperties;
6537 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6538 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6539 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6543 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6546 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6547 hf_pn_io_port_state, &u16PortState);
6548 /* AdjustProperties */
6549 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6550 hf_pn_io_adjust_properties, &u16AdjustProperties);
6552 proto_item_append_text(item, ": PortState:%s, Properties:0x%x",
6553 val_to_str(u16PortState, pn_io_port_state, "0x%x"),
6554 u16AdjustProperties);
6560 /* dissect the CheckPortState block */
6562 dissect_CheckPortState_block(tvbuff_t *tvb, int offset,
6563 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6565 guint16 u16PortState;
6568 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6569 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6570 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6575 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6576 hf_pn_io_port_state, &u16PortState);
6578 proto_item_append_text(item, ": %s",
6579 val_to_str(u16PortState, pn_io_port_state, "0x%x"));
6584 /* dissect the PDPortFODataReal block */
6586 dissect_PDPortFODataReal_block(tvbuff_t *tvb, int offset,
6587 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
6588 guint16 u16BodyLength)
6590 guint32 u32FiberOpticType;
6591 guint32 u32FiberOpticCableType;
6592 guint16 u16Index = 0;
6593 guint32 u32RecDataLen;
6594 pnio_ar_t *ar = NULL;
6597 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6598 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6599 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6604 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6606 /* FiberOpticType */
6607 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6608 hf_pn_io_fiber_optic_type, &u32FiberOpticType);
6610 /* FiberOpticCableType */
6611 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6612 hf_pn_io_fiber_optic_cable_type, &u32FiberOpticCableType);
6614 /* optional: FiberOpticManufacturerSpecific */
6615 if (u16BodyLength != 10) {
6616 dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
6623 /* dissect the FiberOpticManufacturerSpecific block */
6625 dissect_FiberOpticManufacturerSpecific_block(tvbuff_t *tvb, int offset,
6626 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
6627 guint16 u16BodyLength)
6629 guint8 u8VendorIDHigh;
6630 guint8 u8VendorIDLow;
6631 guint16 u16VendorBlockType;
6634 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6635 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6636 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6640 /* x8 VendorIDHigh */
6641 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
6642 hf_pn_io_vendor_id_high, &u8VendorIDHigh);
6643 /* x8 VendorIDLow */
6644 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
6645 hf_pn_io_vendor_id_low, &u8VendorIDLow);
6647 /* VendorBlockType */
6648 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6649 hf_pn_io_vendor_block_type, &u16VendorBlockType);
6651 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, u16BodyLength-4, "Data");
6657 /* dissect the FiberOpticDiagnosisInfo block */
6659 dissect_FiberOpticDiagnosisInfo_block(tvbuff_t *tvb, int offset,
6660 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6662 guint32 u32FiberOpticPowerBudget;
6665 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6666 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6667 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6671 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
6673 /* decode the u32FiberOpticPowerBudget better */
6674 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6675 hf_pn_io_maintenance_required_power_budget, &u32FiberOpticPowerBudget);
6680 /* dissect the AdjustMAUTypeExtension block */
6682 dissect_AdjustMAUTypeExtension_block(tvbuff_t *tvb, int offset,
6683 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6685 guint16 u16MauTypeExtension;
6686 guint16 u16AdjustProperties;
6688 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6689 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6690 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6695 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6697 /* MauTypeExtension */
6698 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_mau_type_extension, &u16MauTypeExtension);
6701 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6702 hf_pn_io_adjust_properties, &u16AdjustProperties);
6707 /* dissect the PDPortFODataAdjust block */
6709 dissect_PDPortFODataAdjust_block(tvbuff_t *tvb, int offset,
6710 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6712 guint32 u32FiberOpticType;
6713 guint32 u32FiberOpticCableType;
6716 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6717 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6718 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6723 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6725 /* FiberOpticType */
6726 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6727 hf_pn_io_fiber_optic_type, &u32FiberOpticType);
6729 /* FiberOpticCableType */
6730 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6731 hf_pn_io_fiber_optic_cable_type, &u32FiberOpticCableType);
6734 proto_item_append_text(item, ": %s",
6735 val_to_str(u16PortState, pn_io_port_state, "0x%x"));*/
6741 /* dissect the PDPortFODataCheck block */
6743 dissect_PDPortFODataCheck_block(tvbuff_t *tvb, int offset,
6744 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6746 guint32 u32FiberOpticPowerBudget;
6749 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6750 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6751 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6756 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6758 /* MaintenanceRequiredPowerBudget */
6759 /* XXX - decode the u32FiberOpticPowerBudget better */
6760 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6761 hf_pn_io_maintenance_required_power_budget, &u32FiberOpticPowerBudget);
6763 /* MaintenanceDemandedPowerBudget */
6764 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6765 hf_pn_io_maintenance_demanded_power_budget, &u32FiberOpticPowerBudget);
6767 /* ErrorPowerBudget */
6768 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6769 hf_pn_io_error_power_budget, &u32FiberOpticPowerBudget);
6772 proto_item_append_text(item, ": %s",
6773 val_to_str(u16PortState, pn_io_port_state, "0x%x"));*/
6778 /* dissect the AdjustPeerToPeerBoundary block */
6780 dissect_AdjustPeerToPeerBoundary_block(tvbuff_t *tvb, int offset,
6781 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6783 proto_item *sub_item;
6784 proto_tree *sub_tree;
6785 guint32 u32PeerToPeerBoundary;
6786 guint16 u16AdjustProperties;
6788 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6789 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6790 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6795 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6797 sub_item = proto_tree_add_item(tree, hf_pn_io_peer_to_peer_boundary_value, tvb, offset, 4, ENC_BIG_ENDIAN);
6798 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_peer_to_peer_boundary);
6800 /* PeerToPeerBoundary.Bit0 */
6801 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_peer_to_peer_boundary_value_bit0, &u32PeerToPeerBoundary);
6803 /* PeerToPeerBoundary.Bit1 */
6804 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_peer_to_peer_boundary_value_bit1, &u32PeerToPeerBoundary);
6806 /* PeerToPeerBoundary.Bit2 */
6807 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_peer_to_peer_boundary_value_bit2, &u32PeerToPeerBoundary);
6809 /* PeerToPeerBoundary.OtherBits */
6810 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_peer_to_peer_boundary_value_otherbits, &u32PeerToPeerBoundary);
6813 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6814 hf_pn_io_adjust_properties, &u16AdjustProperties);
6820 /* dissect the AdjustDCPBoundary block */
6822 dissect_AdjustDCPBoundary_block(tvbuff_t *tvb, int offset,
6823 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6825 proto_item *sub_item;
6826 proto_tree *sub_tree;
6827 guint32 u32DcpBoundary;
6828 guint16 u16AdjustProperties;
6830 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6831 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6832 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6837 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6839 sub_item = proto_tree_add_item(tree, hf_pn_io_dcp_boundary_value, tvb, offset, 4, ENC_BIG_ENDIAN);
6840 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_dcp_boundary);
6842 /* DcpBoundary.Bit0 */
6843 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_dcp_boundary_value_bit0, &u32DcpBoundary);
6845 /* DcpBoundary.Bit1 */
6846 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_dcp_boundary_value_bit1, &u32DcpBoundary);
6848 /* DcpBoundary.OtherBits */
6849 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_dcp_boundary_value_otherbits, &u32DcpBoundary);
6852 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6853 hf_pn_io_adjust_properties, &u16AdjustProperties);
6859 dissect_MrpInstanceDataAdjust_block(tvbuff_t *tvb, int offset,
6860 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength)
6862 guint8 u8MrpInstance;
6865 guint8 u8LengthDomainName;
6867 int endoffset = offset + u16BodyLength;
6869 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6870 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6871 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6874 /* Padding one byte */
6875 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 1);
6877 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
6878 hf_pn_io_mrp_instance, &u8MrpInstance);
6879 /* MRP_DomainUUID */
6880 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
6881 hf_pn_io_mrp_domain_uuid, &uuid);
6883 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6884 hf_pn_io_mrp_role, &u16Role);
6886 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6887 /* MRP_LengthDomainName */
6888 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
6889 hf_pn_io_mrp_length_domain_name, &u8LengthDomainName);
6890 /* MRP_DomainName */
6891 pDomainName = (char *)wmem_alloc(wmem_packet_scope(), u8LengthDomainName+1);
6892 tvb_memcpy(tvb, (guint8 *) pDomainName, offset, u8LengthDomainName);
6893 pDomainName[u8LengthDomainName] = '\0';
6894 proto_tree_add_string (tree, hf_pn_io_mrp_domain_name, tvb, offset, u8LengthDomainName, pDomainName);
6895 offset += u8LengthDomainName;
6897 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6898 while(endoffset > offset)
6900 offset = dissect_a_block(tvb, offset, pinfo, tree, drep);
6907 dissect_MrpInstanceDataReal_block(tvbuff_t *tvb, int offset,
6908 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength)
6910 guint8 u8MrpInstance;
6914 guint8 u8LengthDomainName;
6916 int endoffset = offset + u16BodyLength;
6918 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6919 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6920 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6923 /* Padding one byte */
6924 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 1);
6926 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
6927 hf_pn_io_mrp_instance, &u8MrpInstance);
6928 /* MRP_DomainUUID */
6929 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
6930 hf_pn_io_mrp_domain_uuid, &uuid);
6932 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6933 hf_pn_io_mrp_role, &u16Role);
6935 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
6936 hf_pn_io_mrp_version, &u16Version);
6937 /* MRP_LengthDomainName */
6938 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
6939 hf_pn_io_mrp_length_domain_name, &u8LengthDomainName);
6940 /* MRP_DomainName */
6941 pDomainName = (char *)wmem_alloc(wmem_packet_scope(), u8LengthDomainName+1);
6942 tvb_memcpy(tvb, (guint8 *) pDomainName, offset, u8LengthDomainName);
6943 pDomainName[u8LengthDomainName] = '\0';
6944 proto_tree_add_string (tree, hf_pn_io_mrp_domain_name, tvb, offset, u8LengthDomainName, pDomainName);
6945 offset += u8LengthDomainName;
6947 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
6949 while(endoffset > offset)
6951 offset = dissect_a_block(tvb, offset, pinfo, tree, drep);
6957 dissect_MrpInstanceDataCheck_block(tvbuff_t *tvb, int offset,
6958 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength _U_)
6960 guint8 u8MrpInstance;
6964 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
6965 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
6966 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
6969 /* Padding one byte */
6970 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 1);
6972 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
6973 hf_pn_io_mrp_instance, &u8MrpInstance);
6974 /* MRP_DomainUUID */
6975 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
6976 hf_pn_io_mrp_domain_uuid, &uuid);
6979 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6980 hf_pn_io_mrp_check, &u32Check);
6981 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6982 hf_pn_io_mrp_check_mrm, &u32Check);
6983 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6984 hf_pn_io_mrp_check_mrpdomain, &u32Check);
6985 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6986 hf_pn_io_mrp_check_reserved_1, &u32Check);
6987 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
6988 hf_pn_io_mrp_check_reserved_2, &u32Check);
6989 offset +=4; /* MRP_Check (32 bit) done */
6994 /* PDInterfaceAdjust */
6996 dissect_PDInterfaceAdjust_block(tvbuff_t *tvb, int offset,
6997 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
6999 guint32 u32SMultipleInterfaceMode;
7001 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
7002 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
7003 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
7007 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
7008 /* MultipleInterfaceMode */
7009 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7010 hf_pn_io_MultipleInterfaceMode_NameOfDevice, &u32SMultipleInterfaceMode);
7011 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7012 hf_pn_io_MultipleInterfaceMode_reserved_1, &u32SMultipleInterfaceMode);
7013 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7014 hf_pn_io_MultipleInterfaceMode_reserved_2, &u32SMultipleInterfaceMode);
7018 /* PDPortStatistic for one subslot */
7020 dissect_PDPortStatistic_block(tvbuff_t *tvb, int offset,
7021 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
7023 guint32 u32StatValue;
7024 guint16 u16CounterStatus;
7025 proto_item *sub_item;
7026 proto_tree *sub_tree;
7027 if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) {
7028 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
7029 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
7032 switch (u8BlockVersionLow) {
7035 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
7038 sub_item = proto_tree_add_item(tree, hf_pn_io_pdportstatistic_counter_status, tvb, offset, 2, ENC_BIG_ENDIAN);
7039 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_counter_status);
7041 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
7042 hf_pn_io_pdportstatistic_counter_status_ifInOctets, &u16CounterStatus);
7044 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
7045 hf_pn_io_pdportstatistic_counter_status_ifOutOctets, &u16CounterStatus);
7047 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
7048 hf_pn_io_pdportstatistic_counter_status_ifInDiscards, &u16CounterStatus);
7050 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
7051 hf_pn_io_pdportstatistic_counter_status_ifOutDiscards, &u16CounterStatus);
7053 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
7054 hf_pn_io_pdportstatistic_counter_status_ifInErrors, &u16CounterStatus);
7056 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
7057 hf_pn_io_pdportstatistic_counter_status_ifOutErrors, &u16CounterStatus);
7059 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
7060 hf_pn_io_pdportstatistic_counter_status_reserved, &u16CounterStatus);
7062 default: /* will not execute because of the line preceding the switch */
7066 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7067 hf_pn_io_pdportstatistic_ifInOctets, &u32StatValue);
7068 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7069 hf_pn_io_pdportstatistic_ifOutOctets, &u32StatValue);
7071 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7072 hf_pn_io_pdportstatistic_ifInDiscards, &u32StatValue);
7073 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7074 hf_pn_io_pdportstatistic_ifOutDiscards, &u32StatValue);
7076 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7077 hf_pn_io_pdportstatistic_ifInErrors, &u32StatValue);
7078 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7079 hf_pn_io_pdportstatistic_ifOutErrors, &u32StatValue);
7085 /* dissect the PDInterfaceDataReal block */
7087 dissect_PDInterfaceDataReal_block(tvbuff_t *tvb, int offset,
7088 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
7090 guint8 u8LengthOwnChassisID;
7091 char *pOwnChassisID;
7096 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
7097 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
7098 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
7102 /* LengthOwnChassisID */
7103 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
7104 hf_pn_io_length_own_chassis_id, &u8LengthOwnChassisID);
7106 pOwnChassisID = (char *)wmem_alloc(wmem_packet_scope(), u8LengthOwnChassisID+1);
7107 tvb_memcpy(tvb, (guint8 *) pOwnChassisID, offset, u8LengthOwnChassisID);
7108 pOwnChassisID[u8LengthOwnChassisID] = '\0';
7109 proto_tree_add_string (tree, hf_pn_io_own_chassis_id, tvb, offset, u8LengthOwnChassisID, pOwnChassisID);
7110 offset += u8LengthOwnChassisID;
7113 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
7115 /* MACAddressValue */
7116 offset = dissect_pn_mac(tvb, offset, pinfo, tree, hf_pn_io_macadd, mac);
7119 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
7122 offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_io_ip_address, &ip);
7123 /*proto_item_append_text(block_item, ", IP: %s", ip_to_str((guint8*)&ip));*/
7126 offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_io_subnetmask, &ip);
7127 /*proto_item_append_text(block_item, ", Subnet: %s", ip_to_str((guint8*)&ip));*/
7129 /* StandardGateway */
7130 offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_io_standard_gateway, &ip);
7131 /*proto_item_append_text(block_item, ", Router: %s", ip_to_str((guint8*)&ip));*/
7138 /* dissect the PDSyncData block */
7140 dissect_PDSyncData_block(tvbuff_t *tvb, int offset,
7141 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
7144 guint16 u16SubslotNr;
7146 guint32 u32ReservedIntervalBegin;
7147 guint32 u32ReservedIntervalEnd;
7148 guint32 u32PLLWindow;
7149 guint32 u32SyncSendFactor;
7150 guint16 u16SendClockFactor;
7151 guint16 u16SyncProperties;
7152 guint16 u16SyncFrameAddress;
7153 guint16 u16PTCPTimeoutFactor;
7154 guint16 u16PTCPTakeoverTimeoutFactor;
7155 guint16 u16PTCPMasterStartupTime;
7156 guint8 u8MasterPriority1;
7157 guint8 u8MasterPriority2;
7158 guint8 u8LengthSubdomainName;
7159 char *pSubdomainName;
7162 if (u8BlockVersionHigh != 1) {
7163 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
7164 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
7168 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
7170 switch (u8BlockVersionLow) {
7173 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7174 hf_pn_io_slot_nr, &u16SlotNr);
7176 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7177 hf_pn_io_subslot_nr, &u16SubslotNr);
7178 /* PTCPSubdomainID */
7179 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
7180 hf_pn_io_ptcp_subdomain_id, &uuid);
7182 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
7183 hf_pn_io_ir_data_id, &uuid);
7184 /* ReservedIntervalBegin */
7185 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7186 hf_pn_io_reserved_interval_begin, &u32ReservedIntervalBegin);
7187 /* ReservedIntervalEnd */
7188 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7189 hf_pn_io_reserved_interval_end, &u32ReservedIntervalEnd);
7190 /* PLLWindow enum */
7191 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7192 hf_pn_io_pllwindow, &u32PLLWindow);
7193 /* SyncSendFactor 32 enum */
7194 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7195 hf_pn_io_sync_send_factor, &u32SyncSendFactor);
7196 /* SendClockFactor 16 */
7197 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7198 hf_pn_io_send_clock_factor, &u16SendClockFactor);
7199 /* SyncProperties 16 bitfield */
7200 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7201 hf_pn_io_sync_properties, &u16SyncProperties);
7202 /* SyncFrameAddress 16 bitfield */
7203 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7204 hf_pn_io_sync_frame_address, &u16SyncFrameAddress);
7205 /* PTCPTimeoutFactor 16 enum */
7206 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7207 hf_pn_io_ptcp_timeout_factor, &u16PTCPTimeoutFactor);
7209 proto_item_append_text(item, ": Slot:0x%x/0x%x, Interval:%u-%u, PLLWin:%u, Send:%u, Clock:%u",
7210 u16SlotNr, u16SubslotNr, u32ReservedIntervalBegin, u32ReservedIntervalEnd,
7211 u32PLLWindow, u32SyncSendFactor, u16SendClockFactor);
7214 /* PTCPSubdomainID */
7215 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
7216 hf_pn_io_ptcp_subdomain_id, &uuid);
7217 /* ReservedIntervalBegin */
7218 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7219 hf_pn_io_reserved_interval_begin, &u32ReservedIntervalBegin);
7220 /* ReservedIntervalEnd */
7221 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7222 hf_pn_io_reserved_interval_end, &u32ReservedIntervalEnd);
7223 /* PLLWindow enum */
7224 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7225 hf_pn_io_pllwindow, &u32PLLWindow);
7226 /* SyncSendFactor 32 enum */
7227 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7228 hf_pn_io_sync_send_factor, &u32SyncSendFactor);
7229 /* SendClockFactor 16 */
7230 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7231 hf_pn_io_send_clock_factor, &u16SendClockFactor);
7232 /* PTCPTimeoutFactor 16 enum */
7233 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7234 hf_pn_io_ptcp_timeout_factor, &u16PTCPTimeoutFactor);
7235 /* PTCPTakeoverTimeoutFactor 16 */
7236 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7237 hf_pn_io_ptcp_takeover_timeout_factor, &u16PTCPTakeoverTimeoutFactor);
7238 /* PTCPMasterStartupTime 16 */
7239 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7240 hf_pn_io_ptcp_master_startup_time, &u16PTCPMasterStartupTime);
7241 /* SyncProperties 16 bitfield */
7242 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7243 hf_pn_io_sync_properties, &u16SyncProperties);
7244 /* PTCP_MasterPriority1 */
7245 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
7246 hf_pn_io_ptcp_master_priority_1, &u8MasterPriority1);
7247 /* PTCP_MasterPriority2 */
7248 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
7249 hf_pn_io_ptcp_master_priority_2, &u8MasterPriority2);
7250 /* PTCPLengthSubdomainName */
7251 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
7252 hf_pn_io_ptcp_length_subdomain_name, &u8LengthSubdomainName);
7253 /* PTCPSubdomainName */
7254 pSubdomainName = (char *)wmem_alloc(wmem_packet_scope(), u8LengthSubdomainName+1);
7255 tvb_memcpy(tvb, (guint8 *) pSubdomainName, offset, u8LengthSubdomainName);
7256 pSubdomainName[u8LengthSubdomainName] = '\0';
7257 proto_tree_add_string (tree, hf_pn_io_ptcp_subdomain_name, tvb, offset, u8LengthSubdomainName, pSubdomainName);
7258 offset += u8LengthSubdomainName;
7261 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
7263 proto_item_append_text(item, ": Interval:%u-%u, PLLWin:%u, Send:%u, Clock:%u",
7264 u32ReservedIntervalBegin, u32ReservedIntervalEnd,
7265 u32PLLWindow, u32SyncSendFactor, u16SendClockFactor);
7268 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
7269 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
7276 /* dissect the PDIRData block */
7278 dissect_PDIRData_block(tvbuff_t *tvb, int offset,
7279 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
7282 guint16 u16SubslotNr;
7283 guint16 u16Index = 0;
7284 guint32 u32RecDataLen;
7285 pnio_ar_t *ar = NULL;
7287 /* versions decoded are High: 1 and LOW 0..2 */
7288 if (u8BlockVersionHigh != 1 || (u8BlockVersionLow > 2 ) ) {
7289 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
7290 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
7294 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
7297 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7298 hf_pn_io_slot_nr, &u16SlotNr);
7300 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7301 hf_pn_io_subslot_nr, &u16SubslotNr);
7303 proto_item_append_text(item, ": Slot:0x%x/0x%x",
7304 u16SlotNr, u16SubslotNr);
7306 /* PDIRGlobalData */
7307 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
7308 if (u8BlockVersionLow == 0) {
7310 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
7311 } else if (u8BlockVersionLow == 1) {
7312 /* [PDIRFrameData] */
7313 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
7314 /* PDIRBeginEndData */
7315 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
7316 }else if (u8BlockVersionLow == 2) {
7317 /* [PDIRFrameData] */
7318 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
7319 /* PDIRBeginEndData */
7320 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
7326 /* dissect the PDIRGlobalData block */
7328 dissect_PDIRGlobalData_block(tvbuff_t *tvb, int offset,
7329 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
7332 guint32 u32MaxBridgeDelay;
7333 guint32 u32NumberOfPorts;
7334 guint32 u32MaxPortTxDelay;
7335 guint32 u32MaxPortRxDelay;
7336 guint32 u32MaxLineRxDelay;
7337 guint32 u32YellowTime;
7340 /* added blockversion 2 */
7341 if (u8BlockVersionHigh != 1 || (u8BlockVersionLow > 2)) {
7342 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
7343 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
7347 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
7350 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
7351 hf_pn_io_ir_data_id, &uuid);
7353 if (u8BlockVersionLow <= 2) {
7354 /* MaxBridgeDelay */
7355 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7356 hf_pn_io_max_bridge_delay, &u32MaxBridgeDelay);
7358 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7359 hf_pn_io_number_of_ports, &u32NumberOfPorts);
7360 u32Tmp = u32NumberOfPorts;
7363 /* MaxPortTxDelay */
7364 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7365 hf_pn_io_max_port_tx_delay, &u32MaxPortTxDelay);
7366 /* MaxPortRxDelay */
7367 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7368 hf_pn_io_max_port_rx_delay, &u32MaxPortRxDelay);
7369 if (u8BlockVersionLow >= 2) {
7370 /* MaxLineRxDelay */
7371 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7372 hf_pn_io_max_line_rx_delay, &u32MaxLineRxDelay);
7374 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7375 hf_pn_io_yellowtime, &u32YellowTime);
7378 proto_item_append_text(item, ": MaxBridgeDelay:%u, NumberOfPorts:%u",
7379 u32MaxBridgeDelay, u32NumberOfPorts);
7386 /* dissect the PDIRFrameData block */
7388 dissect_PDIRFrameData_block(tvbuff_t *tvb, int offset,
7389 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
7390 guint16 u16BodyLength)
7392 guint32 u32FrameSendOffset;
7393 guint32 u32FrameDataProperties;
7394 guint16 u16DataLength;
7395 guint16 u16ReductionRatio;
7398 guint16 u16Ethertype;
7400 guint8 u8FrameDetails;
7401 guint8 u8NumberOfTxPortGroups;
7402 guint8 u8TxPortGroupArray;
7403 guint16 u16TxPortGroupArraySize;
7404 guint16 u16EndOffset;
7406 proto_item *sub_item;
7407 proto_tree *sub_tree;
7409 /* added low version 1 */
7410 if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) {
7411 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
7412 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
7416 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
7418 u16EndOffset = offset + u16BodyLength -2;
7419 if (u8BlockVersionLow > 0) {
7420 /* for low version 1 FrameDataProperties is added */
7421 sub_item = proto_tree_add_item(tree, hf_pn_io_frame_data_properties, tvb, offset, 4, ENC_BIG_ENDIAN);
7422 sub_tree = proto_item_add_subtree(sub_item, ett_pn_FrameDataProperties);
7423 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7424 hf_pn_io_frame_data_properties_forwarding_Mode, &u32FrameDataProperties);
7425 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7426 hf_pn_io_frame_data_properties_FastForwardingMulticastMACAdd, &u32FrameDataProperties);
7427 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7428 hf_pn_io_frame_data_properties_FragmentMode, &u32FrameDataProperties);
7429 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7430 hf_pn_io_frame_data_properties_reserved_1, &u32FrameDataProperties);
7432 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7433 hf_pn_io_frame_data_properties_reserved_2, &u32FrameDataProperties);
7435 /* dissect all IR frame data */
7436 while (offset < u16EndOffset)
7438 proto_item *ir_frame_data_sub_item;
7439 proto_tree *ir_frame_data_tree;
7443 /* new subtree for each IR frame */
7444 ir_frame_data_sub_item = proto_tree_add_item(tree, hf_pn_io_ir_frame_data, tvb, offset, 17, ENC_NA);
7445 ir_frame_data_tree = proto_item_add_subtree(ir_frame_data_sub_item, ett_pn_io_ir_frame_data);
7447 /* FrameSendOffset */
7448 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, ir_frame_data_tree, drep,
7449 hf_pn_io_frame_send_offset, &u32FrameSendOffset);
7451 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ir_frame_data_tree, drep,
7452 hf_pn_io_data_length, &u16DataLength);
7453 /* ReductionRatio */
7454 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ir_frame_data_tree, drep,
7455 hf_pn_io_reduction_ratio, &u16ReductionRatio);
7457 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ir_frame_data_tree, drep,
7458 hf_pn_io_phase, &u16Phase);
7460 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ir_frame_data_tree, drep,
7461 hf_pn_io_frame_id, &u16FrameID);
7464 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ir_frame_data_tree, drep,
7465 hf_pn_io_ethertype, &u16Ethertype);
7467 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, ir_frame_data_tree, drep,
7468 hf_pn_io_rx_port, &u8RXPort);
7470 sub_item = proto_tree_add_item(ir_frame_data_tree, hf_pn_io_frame_details, tvb, offset, 1, ENC_BIG_ENDIAN);
7471 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_frame_defails);
7472 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
7473 hf_pn_io_frame_details_sync_frame, &u8FrameDetails);
7474 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
7475 hf_pn_io_frame_details_meaning_frame_send_offset, &u8FrameDetails);
7476 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
7477 hf_pn_io_frame_details_reserved, &u8FrameDetails);
7479 u8NumberOfTxPortGroups = tvb_get_guint8(tvb, offset);
7480 sub_item = proto_tree_add_uint(ir_frame_data_tree, hf_pn_io_nr_of_tx_port_groups,
7481 tvb, offset, 1, u8NumberOfTxPortGroups);
7483 if ((u8NumberOfTxPortGroups > 21) || ((u8NumberOfTxPortGroups & 0x1) !=1)) {
7484 expert_add_info(pinfo, sub_item, &ei_pn_io_nr_of_tx_port_groups);
7488 u16TxPortGroupArraySize = (u8NumberOfTxPortGroups + 7 / 8);
7489 sub_item = proto_tree_add_item(ir_frame_data_tree, hf_pn_io_TxPortGroupProperties,
7490 tvb, offset, u16TxPortGroupArraySize, ENC_BIG_ENDIAN);
7491 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_GroupProperties);
7492 while (u16TxPortGroupArraySize > 0)
7494 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_TxPortGroupProperties_bit0, &u8TxPortGroupArray);
7495 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_TxPortGroupProperties_bit1, &u8TxPortGroupArray);
7496 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_TxPortGroupProperties_bit2, &u8TxPortGroupArray);
7497 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_TxPortGroupProperties_bit3, &u8TxPortGroupArray);
7498 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_TxPortGroupProperties_bit4, &u8TxPortGroupArray);
7499 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_TxPortGroupProperties_bit5, &u8TxPortGroupArray);
7500 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_TxPortGroupProperties_bit6, &u8TxPortGroupArray);
7501 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_TxPortGroupProperties_bit7, &u8TxPortGroupArray);
7504 u16TxPortGroupArraySize --;
7507 /* align to next dataset */
7508 offset = dissect_pn_align4(tvb, offset, pinfo, ir_frame_data_tree);
7510 proto_item_append_text(ir_frame_data_tree, ": Offset:%u, Len:%u, Ratio:%u, Phase:%u, FrameID:0x%04x",
7511 u32FrameSendOffset, u16DataLength, u16ReductionRatio, u16Phase, u16FrameID);
7515 proto_item_append_text(item, ": Frames:%u", n);
7522 dissect_PDIRBeginEndData_block(tvbuff_t *tvb, int offset,
7523 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
7524 guint16 u16BodyLength)
7526 guint16 u16StartOfRedFrameID;
7527 guint16 u16EndOfRedFrameID;
7528 guint32 u32NumberOfPorts;
7529 guint32 u32NumberOfAssignments;
7530 guint32 u32NumberOfPhases;
7531 guint32 u32RedOrangePeriodBegin;
7532 guint32 u32OrangePeriodBegin;
7533 guint32 u32GreenPeriodBegin;
7534 guint16 u16TXPhaseAssignment;
7535 guint16 u16RXPhaseAssignment;
7536 guint32 u32SubStart;
7539 guint32 u32TxRedOrangePeriodBegin[0x11] = {0};
7540 guint32 u32TxOrangePeriodBegin [0x11] = {0};
7541 guint32 u32TxGreenPeriodBegin [0x11] = {0};
7542 guint32 u32RxRedOrangePeriodBegin[0x11] = {0};
7543 guint32 u32RxOrangePeriodBegin [0x11] = {0};
7544 guint32 u32RxGreenPeriodBegin [0x11] = {0};
7545 guint32 u32PortIndex;
7547 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
7548 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
7549 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
7553 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
7555 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7556 hf_pn_io_start_of_red_frame_id, &u16StartOfRedFrameID);
7557 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7558 hf_pn_io_end_of_red_frame_id, &u16EndOfRedFrameID);
7560 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7561 hf_pn_io_number_of_ports, &u32NumberOfPorts);
7562 u32Tmp2 = u32NumberOfPorts;
7564 proto_item *ir_begin_end_port_sub_item;
7565 proto_tree *ir_begin_end_port_tree;
7567 /* new subtree for each Port */
7568 ir_begin_end_port_sub_item = proto_tree_add_item(tree, hf_pn_io_ir_begin_end_port, tvb, offset, 0, ENC_NA);
7569 ir_begin_end_port_tree = proto_item_add_subtree(ir_begin_end_port_sub_item, ett_pn_io_ir_begin_end_port);
7570 u32SubStart = offset;
7572 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, ir_begin_end_port_tree, drep,
7573 hf_pn_io_number_of_assignments, &u32NumberOfAssignments);
7574 u32Tmp = u32NumberOfAssignments;
7579 /* TXBeginEndAssignment */
7580 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, ir_begin_end_port_tree, drep,
7581 hf_pn_io_red_orange_period_begin_tx, &u32RedOrangePeriodBegin);
7582 u32TxRedOrangePeriodBegin[u32PortIndex] = u32RedOrangePeriodBegin;
7584 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, ir_begin_end_port_tree, drep,
7585 hf_pn_io_orange_period_begin_tx, &u32OrangePeriodBegin);
7586 u32TxOrangePeriodBegin[u32PortIndex]= u32OrangePeriodBegin;
7588 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, ir_begin_end_port_tree, drep,
7589 hf_pn_io_green_period_begin_tx, &u32GreenPeriodBegin);
7590 u32TxGreenPeriodBegin[u32PortIndex] = u32GreenPeriodBegin;
7592 /* RXBeginEndAssignment */
7593 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, ir_begin_end_port_tree, drep,
7594 hf_pn_io_red_orange_period_begin_rx, &u32RedOrangePeriodBegin);
7595 u32RxRedOrangePeriodBegin[u32PortIndex] = u32RedOrangePeriodBegin;
7597 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, ir_begin_end_port_tree, drep,
7598 hf_pn_io_orange_period_begin_rx, &u32OrangePeriodBegin);
7599 u32RxOrangePeriodBegin[u32PortIndex]= u32OrangePeriodBegin;
7601 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, ir_begin_end_port_tree, drep,
7602 hf_pn_io_green_period_begin_rx, &u32GreenPeriodBegin);
7603 u32RxGreenPeriodBegin[u32PortIndex] = u32GreenPeriodBegin;
7609 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, ir_begin_end_port_tree, drep,
7610 hf_pn_io_number_of_phases, &u32NumberOfPhases);
7611 u32Tmp = u32NumberOfPhases;
7615 proto_item *ir_begin_tx_phase_sub_item;
7616 proto_tree *ir_begin_tx_phase_tree;
7618 /* new subtree for TXPhaseAssignment */
7619 ir_begin_tx_phase_sub_item = proto_tree_add_item(ir_begin_end_port_tree,
7620 hf_pn_ir_tx_phase_assignment, tvb, offset, 0, ENC_NA);
7621 ir_begin_tx_phase_tree = proto_item_add_subtree(ir_begin_tx_phase_sub_item, ett_pn_io_ir_tx_phase);
7623 dissect_dcerpc_uint16(tvb, offset, pinfo, ir_begin_tx_phase_tree, drep,
7624 hf_pn_io_tx_phase_assignment_begin_value, &u16TXPhaseAssignment);
7626 dissect_dcerpc_uint16(tvb, offset, pinfo, ir_begin_tx_phase_tree, drep,
7627 hf_pn_io_tx_phase_assignment_orange_begin, &u16TXPhaseAssignment);
7629 dissect_dcerpc_uint16(tvb, offset, pinfo, ir_begin_tx_phase_tree, drep,
7630 hf_pn_io_tx_phase_assignment_end_reserved, &u16TXPhaseAssignment);
7632 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ir_begin_tx_phase_tree, drep,
7633 hf_pn_io_tx_phase_assignment_reserved, &u16TXPhaseAssignment);
7635 proto_item_append_text(ir_begin_tx_phase_sub_item,
7636 ": 0x%x, RedOrangePeriodBegin: %d, OrangePeriodBegin: %d, GreenPeriodBegin: %d",
7637 u16TXPhaseAssignment,
7638 u32TxRedOrangePeriodBegin[u16TXPhaseAssignment & 0x0F],
7639 u32TxOrangePeriodBegin[(u16TXPhaseAssignment & 0x0F0) >> 4],
7640 u32TxGreenPeriodBegin[(u16TXPhaseAssignment & 0x0F00)>> 8]);
7642 /* new subtree for RXPhaseAssignment */
7643 ir_begin_tx_phase_sub_item = proto_tree_add_item(ir_begin_end_port_tree,
7644 hf_pn_ir_rx_phase_assignment, tvb, offset, 0, ENC_NA);
7645 ir_begin_tx_phase_tree = proto_item_add_subtree(ir_begin_tx_phase_sub_item, ett_pn_io_ir_rx_phase);
7647 dissect_dcerpc_uint16(tvb, offset, pinfo, ir_begin_tx_phase_tree, drep,
7648 hf_pn_io_tx_phase_assignment_begin_value, &u16RXPhaseAssignment);
7650 dissect_dcerpc_uint16(tvb, offset, pinfo, ir_begin_tx_phase_tree, drep,
7651 hf_pn_io_tx_phase_assignment_orange_begin, &u16RXPhaseAssignment);
7653 dissect_dcerpc_uint16(tvb, offset, pinfo, ir_begin_tx_phase_tree, drep,
7654 hf_pn_io_tx_phase_assignment_end_reserved, &u16RXPhaseAssignment);
7656 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ir_begin_tx_phase_tree, drep,
7657 hf_pn_io_tx_phase_assignment_reserved, &u16RXPhaseAssignment);
7659 proto_item_append_text(ir_begin_tx_phase_sub_item,
7660 ": 0x%x, RedOrangePeriodBegin: %d, OrangePeriodBegin: %d, GreenPeriodBegin: %d",
7661 u16RXPhaseAssignment,
7662 u32RxRedOrangePeriodBegin[u16RXPhaseAssignment & 0x0F],
7663 u32RxOrangePeriodBegin[(u16RXPhaseAssignment & 0x0F0) >> 4],
7664 u32RxGreenPeriodBegin[(u16RXPhaseAssignment & 0x0F00)>> 8]);
7667 proto_item_append_text(ir_begin_end_port_sub_item, ": Assignments:%u, Phases:%u",
7668 u32NumberOfAssignments, u32NumberOfPhases);
7670 proto_item_set_len(ir_begin_end_port_sub_item, offset - u32SubStart);
7673 proto_item_append_text(item, ": StartOfRedFrameID: 0x%x, EndOfRedFrameID: 0x%x, Ports: %u",
7674 u16StartOfRedFrameID, u16EndOfRedFrameID, u32NumberOfPorts);
7676 return offset+u16BodyLength;
7680 /* dissect the DiagnosisData block */
7682 dissect_DiagnosisData_block(tvbuff_t *tvb, int offset,
7683 packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
7684 guint16 body_length)
7688 guint16 u16SubslotNr;
7689 guint16 u16ChannelNumber;
7690 guint16 u16UserStructureIdentifier;
7691 proto_item *sub_item;
7694 if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) {
7695 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
7696 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
7700 if (u8BlockVersionLow == 1) {
7702 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
7703 hf_pn_io_api, &u32Api);
7708 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7709 hf_pn_io_slot_nr, &u16SlotNr);
7711 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7712 hf_pn_io_subslot_nr, &u16SubslotNr);
7713 /* ChannelNumber got new ranges: 0..0x7FFF the source is a channel as specified by the manufacturer */
7714 /* fetch u16ChannelNumber */
7715 u16ChannelNumber = ((drep[0] & DREP_LITTLE_ENDIAN)
7716 ? tvb_get_letohs(tvb, offset)
7717 : tvb_get_ntohs(tvb, offset));
7719 sub_item = proto_tree_add_item(tree,hf_pn_io_channel_number, tvb, offset, 2, DREP_ENC_INTEGER(drep));
7720 if (u16ChannelNumber < 0x8000){ /* 0..0x7FFF the source is a channel as specified by the manufacturer */
7721 proto_item_append_text(sub_item, " channel number of the diagnosis source");
7724 if (u16ChannelNumber == 0x8000) /* 0x8000 the whole submodule is the source, */
7725 proto_item_append_text(sub_item, " (whole) Submodule");
7727 proto_item_append_text(sub_item, " reserved");
7729 offset = offset +2; /* Advance behind ChannelNumber */
7730 /* ChannelProperties */
7731 offset = dissect_ChannelProperties(tvb, offset, pinfo, tree, item, drep);
7733 /* UserStructureIdentifier */
7734 u16UserStructureIdentifier = ((drep[0] & DREP_LITTLE_ENDIAN)
7735 ? tvb_get_letohs(tvb, offset)
7736 : tvb_get_ntohs(tvb, offset));
7737 if (u16UserStructureIdentifier > 0x7FFF){
7738 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7739 hf_pn_io_user_structure_identifier, &u16UserStructureIdentifier);
7742 { /* range 0x0 to 0x7fff is manufacturer specific */
7743 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7744 hf_pn_io_user_structure_identifier_manf, &u16UserStructureIdentifier);
7746 proto_item_append_text(item, ", USI:0x%x", u16UserStructureIdentifier);
7749 /* the rest of the block contains optional: [MaintenanceItem] and/or [AlarmItem] */
7750 while (body_length) {
7751 offset = dissect_AlarmUserStructure(tvb, offset, pinfo, tree, item, drep,
7752 &body_length, u16UserStructureIdentifier);
7759 dissect_ARProperties(tvbuff_t *tvb, int offset,
7760 packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_)
7762 proto_item *sub_item;
7763 proto_tree *sub_tree;
7764 guint32 u32ARProperties;
7767 sub_item = proto_tree_add_item(tree, hf_pn_io_ar_properties, tvb, offset, 4, ENC_BIG_ENDIAN);
7768 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_ar_properties);
7769 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7770 hf_pn_io_ar_properties_pull_module_alarm_allowed, &u32ARProperties);
7771 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7772 hf_pn_io_arproperties_StartupMode, &u32ARProperties);
7773 startupMode = (guint8)((u32ARProperties >> 30) & 0x01);
7774 /* Advanced startup mode */
7777 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7778 hf_pn_io_ar_properties_combined_object_container_with_advanced_startupmode, &u32ARProperties);
7780 /* Legacy startup mode */
7783 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7784 hf_pn_io_ar_properties_combined_object_container_with_legacy_startupmode, &u32ARProperties);
7786 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7787 hf_pn_io_ar_properties_reserved, &u32ARProperties);
7788 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7789 hf_pn_io_ar_properties_achnowledge_companion_ar, &u32ARProperties);
7790 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7791 hf_pn_io_ar_properties_companion_ar, &u32ARProperties);
7792 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7793 hf_pn_io_ar_properties_device_access, &u32ARProperties);
7794 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7795 hf_pn_io_ar_properties_reserved_1, &u32ARProperties);
7796 /* removed within 2.3
7797 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7798 hf_pn_io_ar_properties_data_rate, &u32ARProperties);
7800 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7801 hf_pn_io_ar_properties_parametrization_server, &u32ARProperties);
7802 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7803 hf_pn_io_ar_properties_supervisor_takeover_allowed, &u32ARProperties);
7804 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7805 hf_pn_io_ar_properties_state, &u32ARProperties);
7811 /* dissect the IOCRProperties */
7813 dissect_IOCRProperties(tvbuff_t *tvb, int offset,
7814 packet_info *pinfo, proto_tree *tree, guint8 *drep)
7816 proto_item *sub_item;
7817 proto_tree *sub_tree;
7818 guint32 u32IOCRProperties;
7820 sub_item = proto_tree_add_item(tree, hf_pn_io_iocr_properties, tvb, offset, 4, ENC_BIG_ENDIAN);
7821 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_iocr_properties);
7822 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7823 hf_pn_io_iocr_properties_full_subframe_structure, &u32IOCRProperties);
7824 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7825 hf_pn_io_iocr_properties_distributed_subframe_watchdog, &u32IOCRProperties);
7826 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7827 hf_pn_io_iocr_properties_fast_forwarding_mac_adr, &u32IOCRProperties);
7828 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7829 hf_pn_io_iocr_properties_reserved_3, &u32IOCRProperties);
7830 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7831 hf_pn_io_iocr_properties_reserved_2, &u32IOCRProperties);
7832 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7833 hf_pn_io_iocr_properties_media_redundancy, &u32IOCRProperties);
7834 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7835 hf_pn_io_iocr_properties_reserved_1, &u32IOCRProperties);
7836 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
7837 hf_pn_io_iocr_properties_rtclass, &u32IOCRProperties);
7843 /* dissect the ARData block */
7845 dissect_ARData_block(tvbuff_t *tvb, int offset,
7846 packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BlockLength)
7848 guint16 u16NumberOfARs;
7849 guint16 u16NumberofEntries;
7854 guint16 u16NameLength;
7855 guint16 u16NumberOfIOCRs;
7856 guint16 u16IOCRType;
7858 guint16 u16CycleCounter;
7859 guint8 u8DataStatus;
7860 guint8 u8TransferStatus;
7861 proto_item *ds_item;
7862 proto_tree *ds_tree;
7863 guint16 u16UDPRTPort;
7864 guint16 u16AlarmCRType;
7865 guint16 u16LocalAlarmReference;
7866 guint16 u16RemoteAlarmReference;
7867 guint16 u16NumberOfAPIs;
7869 proto_item *iocr_item;
7870 proto_tree *iocr_tree;
7871 proto_item *ar_item;
7872 proto_tree *ar_tree;
7873 guint32 u32IOCRStart;
7874 gint32 i32EndOffset;
7875 guint32 u32ARDataStart;
7877 /* added BlockversionLow == 1 */
7878 if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) {
7879 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
7880 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
7883 i32EndOffset = offset + u16BlockLength;
7884 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
7885 hf_pn_io_number_of_ars, &u16NumberOfARs);
7886 /* BlockversionLow: 0 */
7887 if (u8BlockVersionLow == 0) {
7888 while (u16NumberOfARs--) {
7889 ar_item = proto_tree_add_item(tree, hf_pn_io_ar_data, tvb, offset, 0, ENC_NA);
7890 ar_tree = proto_item_add_subtree(ar_item, ett_pn_io_ar_data);
7891 u32ARDataStart = offset;
7892 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, ar_tree, drep,
7893 hf_pn_io_ar_uuid, &aruuid);
7894 proto_item_append_text(ar_item, "ARUUID:%s", guid_to_str(wmem_packet_scope(), (const e_guid_t*) &aruuid));
7895 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
7896 hf_pn_io_ar_type, &u16ARType);
7897 offset = dissect_ARProperties(tvb, offset, pinfo, ar_tree, item, drep);
7898 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, ar_tree, drep,
7899 hf_pn_io_cminitiator_objectuuid, &uuid);
7900 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
7901 hf_pn_io_station_name_length, &u16NameLength);
7902 pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
7903 tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
7904 pStationName[u16NameLength] = '\0';
7905 proto_tree_add_string (ar_tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, pStationName);
7906 offset += u16NameLength;
7908 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
7909 hf_pn_io_number_of_iocrs, &u16NumberOfIOCRs);
7911 while (u16NumberOfIOCRs--) {
7912 iocr_item = proto_tree_add_item(ar_tree, hf_pn_io_iocr_tree, tvb, offset, 0, ENC_NA);
7913 iocr_tree = proto_item_add_subtree(iocr_item, ett_pn_io_iocr);
7914 u32IOCRStart = offset;
7916 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, iocr_tree, drep,
7917 hf_pn_io_iocr_type, &u16IOCRType);
7918 offset = dissect_IOCRProperties(tvb, offset, pinfo, iocr_tree, drep);
7919 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, iocr_tree, drep,
7920 hf_pn_io_frame_id, &u16FrameID);
7922 proto_item_append_text(iocr_item, ": FrameID:0x%x", u16FrameID);
7924 /* add cycle counter */
7925 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, iocr_tree, drep,
7926 hf_pn_io_cycle_counter, &u16CycleCounter);
7928 u8DataStatus = tvb_get_guint8(tvb, offset);
7929 u8TransferStatus = tvb_get_guint8(tvb, offset+1);
7931 /* add data status subtree */
7932 ds_item = proto_tree_add_uint_format(iocr_tree, hf_pn_io_data_status,
7933 tvb, offset, 1, u8DataStatus,
7934 "DataStatus: 0x%02x (Frame: %s and %s, Provider: %s and %s)",
7936 (u8DataStatus & 0x04) ? "Valid" : "Invalid",
7937 (u8DataStatus & 0x01) ? "Primary" : "Backup",
7938 (u8DataStatus & 0x20) ? "Ok" : "Problem",
7939 (u8DataStatus & 0x10) ? "Run" : "Stop");
7940 ds_tree = proto_item_add_subtree(ds_item, ett_pn_io_data_status);
7941 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_res67, tvb, offset, 1, u8DataStatus);
7942 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_ok, tvb, offset, 1, u8DataStatus);
7943 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_operate, tvb, offset, 1, u8DataStatus);
7944 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_res3, tvb, offset, 1, u8DataStatus);
7945 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_valid, tvb, offset, 1, u8DataStatus);
7946 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_res1, tvb, offset, 1, u8DataStatus);
7947 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_primary, tvb, offset, 1, u8DataStatus);
7951 /* add transfer status */
7952 if (u8TransferStatus) {
7953 proto_tree_add_uint_format(iocr_tree, hf_pn_io_transfer_status, tvb,
7954 offset, 1, u8TransferStatus,
7955 "TransferStatus: 0x%02x (ignore this frame)", u8TransferStatus);
7957 proto_tree_add_uint_format(iocr_tree, hf_pn_io_transfer_status, tvb,
7958 offset, 1, u8TransferStatus,
7959 "TransferStatus: 0x%02x (OK)", u8TransferStatus);
7964 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, iocr_tree, drep,
7965 hf_pn_io_cminitiator_udprtport, &u16UDPRTPort);
7966 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, iocr_tree, drep,
7967 hf_pn_io_cmresponder_udprtport, &u16UDPRTPort);
7969 proto_item_set_len(iocr_item, offset - u32IOCRStart);
7973 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
7974 hf_pn_io_alarmcr_type, &u16AlarmCRType);
7975 /* LocalAlarmReference */
7976 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
7977 hf_pn_io_localalarmref, &u16LocalAlarmReference);
7978 /* RemoteAlarmReference */
7979 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
7980 hf_pn_io_remotealarmref, &u16RemoteAlarmReference);
7981 /* ParameterServerObjectUUID */
7982 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, ar_tree, drep,
7983 hf_pn_io_parameter_server_objectuuid, &uuid);
7984 /* StationNameLength */
7985 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
7986 hf_pn_io_station_name_length, &u16NameLength);
7987 /* ParameterServerStationName */
7988 pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
7989 tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
7990 pStationName[u16NameLength] = '\0';
7991 proto_tree_add_string (ar_tree, hf_pn_io_parameter_server_station_name, tvb, offset, u16NameLength, pStationName);
7992 offset += u16NameLength;
7994 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
7995 hf_pn_io_number_of_apis, &u16NumberOfAPIs);
7997 if (u16NumberOfAPIs > 0) {
7998 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, ar_tree, drep,
7999 hf_pn_io_api, &u32Api);
8001 proto_item_set_len(ar_item, offset - u32ARDataStart);
8005 { /* BlockversionLow == 1 */
8006 while (u16NumberOfARs--) {
8007 ar_item = proto_tree_add_item(tree, hf_pn_io_ar_data, tvb, offset, 0, ENC_NA);
8008 ar_tree = proto_item_add_subtree(ar_item, ett_pn_io_ar_data);
8009 u32ARDataStart = offset;
8011 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_ar_uuid, &aruuid);
8012 proto_item_append_text(ar_item, "ARUUID:%s", guid_to_str(wmem_packet_scope(), (const e_guid_t*) &aruuid));
8013 /* CMInitiatorObjectUUID */
8014 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_cminitiator_objectuuid, &uuid);
8015 /* ParameterServerObjectUUID */
8016 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_parameter_server_objectuuid, &uuid);
8018 offset = dissect_ARProperties(tvb, offset, pinfo, ar_tree, item, drep);
8020 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_ar_type, &u16ARType);
8022 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_alarmcr_type, &u16AlarmCRType);
8023 /* LocalAlarmReference */
8024 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_localalarmref, &u16LocalAlarmReference);
8025 /* RemoteAlarmReference */
8026 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_remotealarmref, &u16RemoteAlarmReference);
8027 /* InitiatorUDPRTPort*/
8028 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_cminitiator_udprtport, &u16UDPRTPort);
8029 /* ResponderUDPRTPort*/
8030 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_cmresponder_udprtport, &u16UDPRTPort);
8031 /* CMInitiatorStationName*/
8032 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_station_name_length, &u16NameLength);
8033 pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
8034 tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
8035 pStationName[u16NameLength] = '\0';
8036 proto_tree_add_string (ar_tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, pStationName);
8037 offset += u16NameLength;
8038 /** align padding! **/
8039 offset = dissect_pn_align4(tvb, offset, pinfo, ar_tree);
8041 /* StationNameLength */
8042 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_station_name_length, &u16NameLength);
8043 if (u16NameLength != 0) {
8044 /* ParameterServerStationName */
8045 pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
8046 tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
8047 pStationName[u16NameLength] = '\0';
8048 proto_tree_add_string (ar_tree, hf_pn_io_parameter_server_station_name, tvb, offset, u16NameLength, pStationName);
8049 offset += u16NameLength;
8052 { /* display no name present */
8053 proto_tree_add_string (ar_tree, hf_pn_io_parameter_server_station_name, tvb, offset, u16NameLength, " <no ParameterServerStationName present>");
8055 /** align padding! **/
8056 offset = dissect_pn_align4(tvb, offset, pinfo, ar_tree);
8059 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_number_of_iocrs, &u16NumberOfIOCRs);
8060 /* align to next 32 bit */
8061 offset = dissect_pn_padding(tvb, offset, pinfo, ar_tree, 2);
8063 while (u16NumberOfIOCRs--) {
8064 iocr_item = proto_tree_add_item(ar_tree, hf_pn_io_iocr_tree, tvb, offset, 0, ENC_NA);
8065 iocr_tree = proto_item_add_subtree(iocr_item, ett_pn_io_iocr);
8066 u32IOCRStart = offset;
8069 offset = dissect_IOCRProperties(tvb, offset, pinfo, iocr_tree, drep);
8071 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, iocr_tree, drep, hf_pn_io_iocr_type, &u16IOCRType);
8073 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, iocr_tree, drep, hf_pn_io_frame_id, &u16FrameID);
8074 proto_item_append_text(iocr_item, ": FrameID:0x%x", u16FrameID);
8076 /* add cycle counter */
8077 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, iocr_tree, drep,
8078 hf_pn_io_cycle_counter, &u16CycleCounter);
8080 u8DataStatus = tvb_get_guint8(tvb, offset);
8081 u8TransferStatus = tvb_get_guint8(tvb, offset+1);
8083 /* add data status subtree */
8084 ds_item = proto_tree_add_uint_format(iocr_tree, hf_pn_io_data_status,
8085 tvb, offset, 1, u8DataStatus,
8086 "DataStatus: 0x%02x (Frame: %s and %s, Provider: %s and %s)",
8088 (u8DataStatus & 0x04) ? "Valid" : "Invalid",
8089 (u8DataStatus & 0x01) ? "Primary" : "Backup",
8090 (u8DataStatus & 0x20) ? "Ok" : "Problem",
8091 (u8DataStatus & 0x10) ? "Run" : "Stop");
8092 ds_tree = proto_item_add_subtree(ds_item, ett_pn_io_data_status);
8093 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_res67, tvb, offset, 1, u8DataStatus);
8094 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_ok, tvb, offset, 1, u8DataStatus);
8095 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_operate, tvb, offset, 1, u8DataStatus);
8096 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_res3, tvb, offset, 1, u8DataStatus);
8097 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_valid, tvb, offset, 1, u8DataStatus);
8098 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_res1, tvb, offset, 1, u8DataStatus);
8099 proto_tree_add_uint(ds_tree, hf_pn_io_data_status_primary, tvb, offset, 1, u8DataStatus);
8103 /* add transfer status */
8104 if (u8TransferStatus) {
8105 proto_tree_add_uint_format(iocr_tree, hf_pn_io_transfer_status, tvb,
8106 offset, 1, u8TransferStatus,
8107 "TransferStatus: 0x%02x (ignore this frame)", u8TransferStatus);
8109 proto_tree_add_uint_format(iocr_tree, hf_pn_io_transfer_status, tvb,
8110 offset, 1, u8TransferStatus,
8111 "TransferStatus: 0x%02x (OK)", u8TransferStatus);
8114 proto_item_set_len(iocr_item, offset - u32IOCRStart);
8117 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_number_of_apis, &u16NumberOfAPIs);
8118 /* align to next 32 bit */
8119 offset = dissect_pn_padding(tvb, offset, pinfo, ar_tree, 2);
8121 if (u16NumberOfAPIs > 0) {
8122 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_api, &u32Api);
8124 /* get the number of subblocks an dissect them */
8125 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_number_of_ARDATAInfo, &u16NumberofEntries);
8127 offset = dissect_pn_padding(tvb, offset, pinfo, ar_tree, 2);
8129 while ((offset < i32EndOffset) && (u16NumberofEntries > 0)) {
8130 offset = dissect_a_block(tvb, offset, pinfo, ar_tree, drep);
8131 u16NumberofEntries--;
8133 proto_item_set_len(ar_item, offset - u32ARDataStart);
8140 /* dissect the APIData block */
8142 dissect_APIData_block(tvbuff_t *tvb, int offset,
8143 packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
8145 guint16 u16NumberOfAPIs;
8149 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8150 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8151 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8156 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8157 hf_pn_io_number_of_apis, &u16NumberOfAPIs);
8159 while (u16NumberOfAPIs--) {
8161 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
8162 hf_pn_io_api, &u32Api);
8168 /* dissect the SLRData block */
8170 dissect_SRLData_block(tvbuff_t *tvb, int offset,
8171 packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
8173 guint16 RedundancyInfo;
8175 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8176 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8177 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8180 /* bit 0 ..1 EndPoint1 and EndPoint2*/
8181 dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_RedundancyInfo, &RedundancyInfo);
8182 /* bit 2 .. 15 reserved */
8183 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_RedundancyInfo_reserved, &RedundancyInfo);
8184 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
8188 /* dissect the LogData block */
8190 dissect_LogData_block(tvbuff_t *tvb, int offset,
8191 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
8193 guint64 u64ActualLocaltimeStamp;
8194 guint16 u16NumberOfLogEntries;
8195 guint64 u64LocaltimeStamp;
8197 guint32 u32EntryDetail;
8198 dcerpc_info di; /* fake dcerpc_info struct */
8199 dcerpc_call_value call_data;
8201 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8202 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8203 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8207 di.conformant_run = 0;
8208 /* we need di->call_data->flags.NDR64 == 0 */
8209 call_data.flags = 0;
8210 di.call_data = &call_data;
8211 di.dcerpc_procedure_name = "";
8213 /* ActualLocalTimeStamp */
8214 offset = dissect_dcerpc_uint64(tvb, offset, pinfo, tree, &di, drep,
8215 hf_pn_io_actual_local_time_stamp, &u64ActualLocaltimeStamp);
8216 /* NumberOfLogEntries */
8217 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8218 hf_pn_io_number_of_log_entries, &u16NumberOfLogEntries);
8220 while (u16NumberOfLogEntries--) {
8221 /* LocalTimeStamp */
8222 offset = dissect_dcerpc_uint64(tvb, offset, pinfo, tree, &di, drep,
8223 hf_pn_io_local_time_stamp, &u64LocaltimeStamp);
8225 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
8226 hf_pn_io_ar_uuid, &aruuid);
8228 offset = dissect_PNIO_status(tvb, offset, pinfo, tree, drep);
8230 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
8231 hf_pn_io_entry_detail, &u32EntryDetail);
8238 /* dissect the FS Hello block */
8240 dissect_FSHello_block(tvbuff_t *tvb, int offset,
8241 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
8243 guint32 u32FSHelloMode;
8244 guint32 u32FSHelloInterval;
8245 guint32 u32FSHelloRetry;
8246 guint32 u32FSHelloDelay;
8249 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8250 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8251 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8255 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
8258 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
8259 hf_pn_io_fs_hello_mode, &u32FSHelloMode);
8260 /* FSHelloInterval */
8261 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
8262 hf_pn_io_fs_hello_interval, &u32FSHelloInterval);
8264 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
8265 hf_pn_io_fs_hello_retry, &u32FSHelloRetry);
8267 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
8268 hf_pn_io_fs_hello_delay, &u32FSHelloDelay);
8270 proto_item_append_text(item, ": Mode:%s, Interval:%ums, Retry:%u, Delay:%ums",
8271 val_to_str(u32FSHelloMode, pn_io_fs_hello_mode_vals, "0x%x"),
8272 u32FSHelloInterval, u32FSHelloRetry, u32FSHelloDelay);
8278 /* dissect the FS Parameter block */
8280 dissect_FSParameter_block(tvbuff_t *tvb, int offset,
8281 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
8283 guint32 u32FSParameterMode;
8284 e_guid_t FSParameterUUID;
8287 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8288 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8289 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8293 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
8295 /* FSParameterMode */
8296 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
8297 hf_pn_io_fs_parameter_mode, &u32FSParameterMode);
8298 /* FSParameterUUID */
8299 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
8300 hf_pn_io_fs_parameter_uuid, &FSParameterUUID);
8302 proto_item_append_text(item, ": Mode:%s",
8303 val_to_str(u32FSParameterMode, pn_io_fs_parameter_mode_vals, "0x%x"));
8311 /* dissect the FSUDataAdjust block */
8313 dissect_PDInterfaceFSUDataAdjust_block(tvbuff_t *tvb, int offset,
8314 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
8315 guint16 u16BodyLength)
8320 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8321 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8322 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8327 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
8332 new_tvb = tvb_new_subset_length(tvb, offset, u16BodyLength);
8333 dissect_blocks(new_tvb, 0, pinfo, tree, drep);
8334 offset += u16BodyLength;
8340 /* dissect the ARFSUDataAdjust block */
8342 dissect_ARFSUDataAdjust_block(tvbuff_t *tvb, int offset,
8343 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
8344 guint16 u16BodyLength)
8349 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8350 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8351 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8356 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
8361 new_tvb = tvb_new_subset_length(tvb, offset, u16BodyLength);
8362 dissect_blocks(new_tvb, 0, pinfo, tree, drep);
8363 offset += u16BodyLength;
8369 decode_ARType_spezial(guint16 ARType, guint16 ARAccess)
8371 if (ARType == 0x0001)
8372 return ("IO Controller AR");
8373 else if (ARType == 0x0003)
8374 return("IO Controller AR");
8375 else if (ARType == 0x0010)
8376 return("IO Controller AR (RT_CLASS_3)");
8377 else if (ARType == 0x0020)
8378 return("IO Controller AR (sysred/CiR)");
8379 else if (ARType == 0x0006)
8381 if (ARAccess) /*TRUE */
8382 return("DeviceAccess AR");
8384 return("IO Supervisor AR");
8390 /* dissect the ARBlockReq */
8392 dissect_ARBlockReq_block(tvbuff_t *tvb, int offset,
8393 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
8397 guint32 u32ARProperties;
8398 gboolean have_aruuid = FALSE;
8401 guint16 u16SessionKey;
8403 guint16 u16TimeoutFactor;
8404 guint16 u16UDPRTPort;
8405 guint16 u16NameLength;
8408 proto_item *sub_item;
8409 proto_tree *sub_tree;
8410 guint16 u16ArNumber;
8411 guint16 u16ArResource;
8412 guint16 u16ArReserved;
8413 proto_item *sub_item_selector;
8414 proto_tree *sub_tree_selector;
8415 conversation_t *conversation;
8416 apduStatusSwitch *apdu_status_switch = NULL;
8418 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8419 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8420 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8424 u32ARProperties = ((drep[0] & DREP_LITTLE_ENDIAN)
8425 ? tvb_get_letohl (tvb, offset + 2 + 16 +2 + 6 +12)
8426 : tvb_get_ntohl (tvb, offset + 2 + 16 +2 + 6 +12));
8428 u16ARType = ((drep[0] & DREP_LITTLE_ENDIAN)
8429 ? tvb_get_letohs (tvb, offset)
8430 : tvb_get_ntohs (tvb, offset));
8433 proto_tree_add_string_format(tree, hf_pn_io_artype_req, tvb, offset, 2,
8434 "ARType", "ARType: (0x%04x) %s ",
8435 u16ARType, decode_ARType_spezial(u16ARType, u32ARProperties));
8437 offset = offset + 2;
8439 if (u16ARType == 0x0020)
8441 sub_item = proto_tree_add_item(tree, hf_pn_io_ar_uuid, tvb, offset, 16, ENC_NA);
8442 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_ar_info);
8444 proto_tree_add_item(sub_tree, hf_pn_io_ar_discriminator, tvb, offset, 6, ENC_NA);
8447 proto_tree_add_item(sub_tree, hf_pn_io_ar_configid, tvb, offset, 8, ENC_NA);
8450 sub_item_selector = proto_tree_add_item(sub_tree, hf_pn_io_ar_selector, tvb, offset, 2, ENC_BIG_ENDIAN);
8451 sub_tree_selector = proto_item_add_subtree(sub_item_selector, ett_pn_io_ar_info);
8452 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree_selector, drep, hf_pn_io_ar_arnumber, &u16ArNumber);
8453 dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree_selector, drep, hf_pn_io_ar_arresource, &u16ArResource);
8454 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree_selector, drep, hf_pn_io_ar_arreserved, &u16ArReserved);
8456 /* When ARType==IOCARSR, then find or create conversation for this frame */
8457 if (!pinfo->fd->flags.visited) {
8458 /* Get current conversation endpoints using MAC addresses */
8459 conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_UDP, 0, 0, 0);
8460 if (conversation == NULL) {
8461 /* If conversation is null, then create new conversation */
8462 /* Connect Request is sent by controller and not by device. */
8463 /* All conversations are based on Controller MAC as address */
8464 conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_UDP, 0, 0, 0);
8467 /* Try to get apdu status switch information from the conversation */
8468 apdu_status_switch = (apduStatusSwitch*)conversation_get_proto_data(conversation, proto_pn_io_apdu_status);
8470 /* If apdu status switch is null, then fill it*/
8471 /* If apdu status switch is not null, then update it*/
8472 if (apdu_status_switch == NULL) {
8473 /* apdu status switch information is valid for whole file*/
8474 apdu_status_switch = wmem_new0(wmem_file_scope(), apduStatusSwitch);
8475 copy_address_shallow(&apdu_status_switch->dl_src, conversation_key_addr1(conversation->key_ptr));
8476 copy_address_shallow(&apdu_status_switch->dl_dst, conversation_key_addr2(conversation->key_ptr));
8477 apdu_status_switch->isRedundancyActive = TRUE;
8478 conversation_add_proto_data(conversation, proto_pn_io_apdu_status, apdu_status_switch);
8481 copy_address_shallow(&apdu_status_switch->dl_src, conversation_key_addr1(conversation->key_ptr));
8482 copy_address_shallow(&apdu_status_switch->dl_dst, conversation_key_addr2(conversation->key_ptr));
8483 apdu_status_switch->isRedundancyActive = TRUE;
8489 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
8490 hf_pn_io_ar_uuid, &aruuid);
8493 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8494 hf_pn_io_sessionkey, &u16SessionKey);
8495 offset = dissect_pn_mac(tvb, offset, pinfo, tree,
8496 hf_pn_io_cminitiator_macadd, mac);
8497 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
8498 hf_pn_io_cminitiator_objectuuid, &uuid);
8501 offset = dissect_ARProperties(tvb, offset, pinfo, tree, item, drep);
8503 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8504 hf_pn_io_cminitiator_activitytimeoutfactor, &u16TimeoutFactor); /* XXX - special values */
8505 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8506 hf_pn_io_cminitiator_udprtport, &u16UDPRTPort);
8507 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8508 hf_pn_io_station_name_length, &u16NameLength);
8510 pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
8511 tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
8512 pStationName[u16NameLength] = '\0';
8513 proto_tree_add_string (tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, pStationName);
8514 offset += u16NameLength;
8516 proto_item_append_text(item, ": %s, Session:%u, MAC:%02x:%02x:%02x:%02x:%02x:%02x, Port:0x%x, Station:%s",
8517 decode_ARType_spezial(u16ARType, u32ARProperties),
8519 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
8524 par = pnio_ar_find_by_aruuid(pinfo, &aruuid);
8526 par = pnio_ar_new(&aruuid);
8527 memcpy( (void *) (&par->controllermac), mac, sizeof(par->controllermac));
8528 par->arType = u16ARType; /* store AR-type for filter generation */
8529 /*strncpy( (char *) (&par->controllername), pStationName, sizeof(par->controllername));*/
8531 /*expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN, "ARBlockReq: AR already existing!");*/
8542 /* dissect the ARBlockRes */
8544 dissect_ARBlockRes_block(tvbuff_t *tvb, int offset,
8545 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
8550 guint16 u16SessionKey;
8552 guint16 u16UDPRTPort;
8556 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8557 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8558 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8562 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8563 hf_pn_io_ar_type, &u16ARType);
8564 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
8565 hf_pn_io_ar_uuid, &uuid);
8566 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8567 hf_pn_io_sessionkey, &u16SessionKey);
8568 offset = dissect_pn_mac(tvb, offset, pinfo, tree,
8569 hf_pn_io_cmresponder_macadd, mac);
8570 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8571 hf_pn_io_cmresponder_udprtport, &u16UDPRTPort);
8573 proto_item_append_text(item, ": %s, Session:%u, MAC:%02x:%02x:%02x:%02x:%02x:%02x, Port:0x%x",
8574 val_to_str(u16ARType, pn_io_ar_type, "0x%x"),
8576 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
8579 /* The value NIL indicates the usage of the implicit AR*/
8580 par = pnio_ar_find_by_aruuid(pinfo, &uuid);
8582 memcpy( (void *) (&par->devicemac), mac, sizeof(par->controllermac));
8590 /* dissect the IOCRBlockReq */
8592 dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset,
8593 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
8596 guint16 u16IOCRType;
8597 guint16 u16IOCRReference;
8599 guint16 u16DataLength;
8601 guint16 u16SendClockFactor;
8602 guint16 u16ReductionRatio;
8604 guint16 u16Sequence;
8605 guint32 u32FrameSendOffset;
8606 guint16 u16WatchdogFactor;
8607 guint16 u16DataHoldFactor;
8608 guint16 u16IOCRTagHeader;
8610 guint16 u16NumberOfAPIs;
8612 guint16 u16NumberOfIODataObjects;
8614 guint16 u16SubslotNr;
8615 guint16 u16IODataObjectFrameOffset;
8616 guint16 u16NumberOfIOCS;
8617 guint16 u16IOCSFrameOffset;
8618 proto_item *api_item;
8619 proto_tree *api_tree;
8620 guint32 u32ApiStart;
8622 proto_item *sub_item;
8623 proto_tree *sub_tree;
8624 guint32 u32SubStart;
8626 conversation_t *conversation;
8627 stationInfo *station_info = NULL;
8628 iocsObject *iocs_object;
8629 iocsObject *cmp_iocs_object;
8630 ioDataObject *io_data_object;
8631 ioDataObject *cmp_io_data_object;
8632 wmem_list_frame_t *frame;
8633 wmem_list_t *iocs_list;
8635 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8636 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8637 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8641 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8642 hf_pn_io_iocr_type, &u16IOCRType);
8643 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8644 hf_pn_io_iocr_reference, &u16IOCRReference);
8645 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8646 hf_pn_io_lt, &u16LT);
8648 offset = dissect_IOCRProperties(tvb, offset, pinfo, tree, drep);
8650 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8651 hf_pn_io_data_length, &u16DataLength);
8652 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8653 hf_pn_io_frame_id, &u16FrameID);
8654 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8655 hf_pn_io_send_clock_factor, &u16SendClockFactor);
8656 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8657 hf_pn_io_reduction_ratio, &u16ReductionRatio);
8658 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8659 hf_pn_io_phase, &u16Phase);
8660 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8661 hf_pn_io_sequence, &u16Sequence);
8662 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
8663 hf_pn_io_frame_send_offset, &u32FrameSendOffset);
8664 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8665 hf_pn_io_watchdog_factor, &u16WatchdogFactor);
8666 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8667 hf_pn_io_data_hold_factor, &u16DataHoldFactor);
8668 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8669 hf_pn_io_iocr_tag_header, &u16IOCRTagHeader);
8670 offset = dissect_pn_mac(tvb, offset, pinfo, tree,
8671 hf_pn_io_iocr_multicast_mac_add, mac);
8673 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8674 hf_pn_io_number_of_apis, &u16NumberOfAPIs);
8676 proto_item_append_text(item, ": %s, Ref:0x%x, Len:%u, FrameID:0x%x, Clock:%u, Ratio:%u, Phase:%u APIs:%u",
8677 val_to_str(u16IOCRType, pn_io_iocr_type, "0x%x"),
8678 u16IOCRReference, u16DataLength, u16FrameID,
8679 u16SendClockFactor, u16ReductionRatio, u16Phase, u16NumberOfAPIs);
8681 while (u16NumberOfAPIs--) {
8682 api_item = proto_tree_add_item(tree, hf_pn_io_api_tree, tvb, offset, 0, ENC_NA);
8683 api_tree = proto_item_add_subtree(api_item, ett_pn_io_api);
8684 u32ApiStart = offset;
8687 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, api_tree, drep,
8688 hf_pn_io_api, &u32Api);
8689 /* NumberOfIODataObjects */
8690 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, api_tree, drep,
8691 hf_pn_io_number_of_io_data_objects, &u16NumberOfIODataObjects);
8693 /* Set global Variant for Number of IO Data Objects */
8694 /* Notice: Handle Input & Output seperate!!! */
8695 if (!pinfo->fd->flags.visited) {
8696 /* Get current conversation endpoints using MAC addresses */
8697 conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
8698 if (conversation == NULL) {
8699 /* Create new conversation, if no "Ident OK" frame as been dissected yet!
8700 * Need to switch dl_src & dl_dst, as Connect Request is sent by controller and not by device.
8701 * All conversations are based on Device MAC as addr1 */
8702 conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, ENDPOINT_NONE, 0, 0, 0);
8705 station_info = (stationInfo*)conversation_get_proto_data(conversation, proto_pn_dcp);
8706 if (station_info == NULL) {
8707 station_info = wmem_new0(wmem_file_scope(), stationInfo);
8708 init_pnio_rtc1_station(station_info);
8709 conversation_add_proto_data(conversation, proto_pn_dcp, station_info);
8712 station_info->ioDataObjectNr = u16NumberOfIODataObjects;
8716 u16Tmp = u16NumberOfIODataObjects;
8718 sub_item = proto_tree_add_item(api_tree, hf_pn_io_io_data_object, tvb, offset, 0, ENC_NA);
8719 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_io_data_object);
8720 u32SubStart = offset;
8723 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
8724 hf_pn_io_slot_nr, &u16SlotNr);
8726 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
8727 hf_pn_io_subslot_nr, &u16SubslotNr);
8728 /* IODataObjectFrameOffset */
8729 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
8730 hf_pn_io_io_data_object_frame_offset, &u16IODataObjectFrameOffset);
8732 proto_item_append_text(sub_item, ": Slot: 0x%x, Subslot: 0x%x FrameOffset: %u",
8733 u16SlotNr, u16SubslotNr, u16IODataObjectFrameOffset);
8735 proto_item_set_len(sub_item, offset - u32SubStart);
8737 if (!pinfo->fd->flags.visited && station_info != NULL) {
8738 io_data_object = wmem_new0(wmem_file_scope(), ioDataObject);
8739 io_data_object->slotNr = u16SlotNr;
8740 io_data_object->subSlotNr = u16SubslotNr;
8741 io_data_object->frameOffset = u16IODataObjectFrameOffset;
8742 /* initial - Will be added later with Write Request */
8743 io_data_object->f_dest_adr = 0;
8744 io_data_object->f_par_crc1 = 0;
8745 io_data_object->f_src_adr = 0;
8746 io_data_object->f_crc_seed = FALSE;
8747 io_data_object->f_crc_len = 0;
8748 /* Reset as a PNIO Connect Request of a known module appears */
8749 io_data_object->last_sb_cb = 0;
8750 io_data_object->lastToggleBit = 0;
8752 if (u16IOCRType == PN_INPUT_CR) {
8753 iocs_list = station_info->ioobject_data_in;
8756 iocs_list = station_info->ioobject_data_out;
8759 for (frame = wmem_list_head(iocs_list); frame != NULL; frame = wmem_list_frame_next(frame)) {
8760 cmp_io_data_object = (ioDataObject*)wmem_list_frame_data(frame);
8761 if (cmp_io_data_object->slotNr == u16SlotNr && cmp_io_data_object->subSlotNr == u16SubslotNr) {
8762 /* Found identical existing object */
8767 if (frame == NULL) {
8768 /* new io_object data incoming */
8769 wmem_list_append(iocs_list, io_data_object);
8775 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, api_tree, drep,
8776 hf_pn_io_number_of_iocs, &u16NumberOfIOCS);
8778 /* Set global Vairant for NumberOfIOCS */
8779 if (!pinfo->fd->flags.visited) {
8780 if (station_info != NULL) {
8781 station_info->iocsNr = u16NumberOfIOCS;
8785 u16Tmp = u16NumberOfIOCS;
8787 sub_item = proto_tree_add_item(api_tree, hf_pn_io_io_cs, tvb, offset, 0, ENC_NA);
8788 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_io_cs);
8789 u32SubStart = offset;
8792 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
8793 hf_pn_io_slot_nr, &u16SlotNr);
8795 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
8796 hf_pn_io_subslot_nr, &u16SubslotNr);
8797 /* IOCSFrameOffset */
8798 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
8799 hf_pn_io_iocs_frame_offset, &u16IOCSFrameOffset);
8801 proto_item_append_text(sub_item, ": Slot: 0x%x, Subslot: 0x%x FrameOffset: %u",
8802 u16SlotNr, u16SubslotNr, u16IOCSFrameOffset);
8804 proto_item_set_len(sub_item, offset - u32SubStart);
8806 if (!pinfo->fd->flags.visited) {
8807 if (station_info != NULL) {
8808 if (u16IOCRType == PN_INPUT_CR) {
8809 iocs_list = station_info->iocs_data_in;
8812 iocs_list = station_info->iocs_data_out;
8815 for (frame = wmem_list_head(iocs_list); frame != NULL; frame = wmem_list_frame_next(frame)) {
8816 cmp_iocs_object = (iocsObject*)wmem_list_frame_data(frame);
8817 if (cmp_iocs_object->slotNr == u16SlotNr && cmp_iocs_object->subSlotNr == u16SubslotNr) {
8818 /* Found identical existing object */
8823 if (frame == NULL) {
8824 /* new iocs_object data incoming */
8825 iocs_object = wmem_new(wmem_file_scope(), iocsObject);
8826 iocs_object->slotNr = u16SlotNr;
8827 iocs_object->subSlotNr = u16SubslotNr;
8828 iocs_object->frameOffset = u16IOCSFrameOffset;
8829 wmem_list_append(iocs_list, iocs_object);
8835 proto_item_append_text(api_item, ": 0x%x, NumberOfIODataObjects: %u NumberOfIOCS: %u",
8836 u32Api, u16NumberOfIODataObjects, u16NumberOfIOCS);
8838 proto_item_set_len(api_item, offset - u32ApiStart);
8842 switch (u16IOCRType) {
8843 case(1): /* Input CR */
8844 if (ar->inputframeid != 0 && ar->inputframeid != u16FrameID) {
8845 expert_add_info_format(pinfo, item, &ei_pn_io_frame_id, "IOCRBlockReq: input frameID changed from %u to %u!", ar->inputframeid, u16FrameID);
8847 ar->inputframeid = u16FrameID;
8849 case(2): /* Output CR */
8851 /* will usually contain 0xffff here because the correct framid will be given in the connect.Cnf */
8852 if (ar->outputframeid != 0 && ar->outputframeid != u16FrameID) {
8853 expert_add_info_format(pinfo, item, &ei_pn_io_frame_id, "IOCRBlockReq: output frameID changed from %u to %u!", ar->outputframeid, u16FrameID);
8855 ar->outputframeid = u16FrameID;
8859 expert_add_info_format(pinfo, item, &ei_pn_io_iocr_type, "IOCRBlockReq: IOCRType %u undecoded!", u16IOCRType);
8862 expert_add_info_format(pinfo, item, &ei_pn_io_ar_info_not_found, "IOCRBlockReq: no corresponding AR found!");
8869 /* dissect the AlarmCRBlockReq */
8871 dissect_AlarmCRBlockReq_block(tvbuff_t *tvb, int offset,
8872 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
8875 guint16 u16AlarmCRType;
8877 guint32 u32AlarmCRProperties;
8878 guint16 u16RTATimeoutFactor;
8879 guint16 u16RTARetries;
8880 guint16 u16LocalAlarmReference;
8881 guint16 u16MaxAlarmDataLength;
8882 guint16 u16AlarmCRTagHeaderHigh;
8883 guint16 u16AlarmCRTagHeaderLow;
8884 proto_item *sub_item;
8885 proto_tree *sub_tree;
8888 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8889 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8890 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8894 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8895 hf_pn_io_alarmcr_type, &u16AlarmCRType);
8896 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8897 hf_pn_io_lt, &u16LT);
8899 sub_item = proto_tree_add_item(tree, hf_pn_io_alarmcr_properties, tvb, offset, 4, ENC_BIG_ENDIAN);
8900 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_alarmcr_properties);
8901 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
8902 hf_pn_io_alarmcr_properties_reserved, &u32AlarmCRProperties);
8903 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
8904 hf_pn_io_alarmcr_properties_transport, &u32AlarmCRProperties);
8905 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
8906 hf_pn_io_alarmcr_properties_priority, &u32AlarmCRProperties);
8908 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8909 hf_pn_io_rta_timeoutfactor, &u16RTATimeoutFactor);
8910 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8911 hf_pn_io_rta_retries, &u16RTARetries);
8912 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8913 hf_pn_io_localalarmref, &u16LocalAlarmReference);
8914 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8915 hf_pn_io_maxalarmdatalength, &u16MaxAlarmDataLength);
8916 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8917 hf_pn_io_alarmcr_tagheaderhigh, &u16AlarmCRTagHeaderHigh);
8918 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8919 hf_pn_io_alarmcr_tagheaderlow, &u16AlarmCRTagHeaderLow);
8921 proto_item_append_text(item, ": %s, LT:0x%x, TFactor:%u, Retries:%u, Ref:0x%x, Len:%u Tag:0x%x/0x%x",
8922 val_to_str(u16AlarmCRType, pn_io_alarmcr_type, "0x%x"),
8923 u16LT, u16RTATimeoutFactor, u16RTARetries, u16LocalAlarmReference, u16MaxAlarmDataLength,
8924 u16AlarmCRTagHeaderHigh, u16AlarmCRTagHeaderLow);
8927 if (ar->controlleralarmref != 0xffff && ar->controlleralarmref != u16LocalAlarmReference) {
8928 expert_add_info_format(pinfo, item, &ei_pn_io_localalarmref, "AlarmCRBlockReq: local alarm ref changed from %u to %u!", ar->controlleralarmref, u16LocalAlarmReference);
8930 ar->controlleralarmref = u16LocalAlarmReference;
8932 expert_add_info_format(pinfo, item, &ei_pn_io_ar_info_not_found, "AlarmCRBlockReq: no corresponding AR found!");
8939 /* dissect the AlarmCRBlockRes */
8941 dissect_AlarmCRBlockRes_block(tvbuff_t *tvb, int offset,
8942 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
8945 guint16 u16AlarmCRType;
8946 guint16 u16LocalAlarmReference;
8947 guint16 u16MaxAlarmDataLength;
8950 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8951 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8952 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8956 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8957 hf_pn_io_alarmcr_type, &u16AlarmCRType);
8958 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8959 hf_pn_io_localalarmref, &u16LocalAlarmReference);
8960 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8961 hf_pn_io_maxalarmdatalength, &u16MaxAlarmDataLength);
8963 proto_item_append_text(item, ": %s, Ref:0x%04x, MaxDataLen:%u",
8964 val_to_str(u16AlarmCRType, pn_io_alarmcr_type, "0x%x"),
8965 u16LocalAlarmReference, u16MaxAlarmDataLength);
8968 if (ar->devicealarmref != 0xffff && ar->devicealarmref != u16LocalAlarmReference) {
8969 expert_add_info_format(pinfo, item, &ei_pn_io_localalarmref, "AlarmCRBlockRes: local alarm ref changed from %u to %u!", ar->devicealarmref, u16LocalAlarmReference);
8971 ar->devicealarmref = u16LocalAlarmReference;
8973 expert_add_info_format(pinfo, item, &ei_pn_io_ar_info_not_found, "AlarmCRBlockRes: no corresponding AR found!");
8979 /* dissect the ARServerBlock */
8981 dissect_ARServerBlock(tvbuff_t *tvb, int offset,
8982 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
8985 guint16 u16NameLength, u16padding;
8987 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
8988 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
8989 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
8993 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
8994 hf_pn_io_station_name_length, &u16NameLength);
8996 pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
8997 tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
8998 pStationName[u16NameLength] = '\0';
8999 proto_tree_add_string (tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, pStationName);
9000 offset += u16NameLength;
9001 /* Padding to next 4 byte allignment in this block */
9002 u16padding = (u16NameLength-2) & 0x3;
9004 offset = dissect_pn_padding(tvb, offset, pinfo, tree, u16padding);
9010 /* dissect the IOCRBlockRes */
9012 dissect_IOCRBlockRes_block(tvbuff_t *tvb, int offset,
9013 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
9016 guint16 u16IOCRType;
9017 guint16 u16IOCRReference;
9021 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
9022 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
9023 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
9027 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
9028 hf_pn_io_iocr_type, &u16IOCRType);
9029 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
9030 hf_pn_io_iocr_reference, &u16IOCRReference);
9031 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
9032 hf_pn_io_frame_id, &u16FrameID);
9034 proto_item_append_text(item, ": %s, Ref:0x%04x, FrameID:0x%04x",
9035 val_to_str(u16IOCRType, pn_io_iocr_type, "0x%x"),
9036 u16IOCRReference, u16FrameID);
9039 switch (u16IOCRType) {
9040 case(1): /* Input CR */
9041 if (ar->inputframeid != 0 && ar->inputframeid != u16FrameID) {
9042 expert_add_info_format(pinfo, item, &ei_pn_io_frame_id, "IOCRBlockRes: input frameID changed from %u to %u!", ar->inputframeid, u16FrameID);
9044 ar->inputframeid = u16FrameID;
9046 case(2): /* Output CR */
9047 if (ar->outputframeid != 0 && ar->outputframeid != u16FrameID) {
9048 expert_add_info_format(pinfo, item, &ei_pn_io_frame_id, "IOCRBlockRes: output frameID changed from %u to %u!", ar->outputframeid, u16FrameID);
9050 ar->outputframeid = u16FrameID;
9053 expert_add_info_format(pinfo, item, &ei_pn_io_iocr_type, "IOCRBlockRes: IOCRType %u undecoded!", u16IOCRType);
9056 expert_add_info_format(pinfo, item, &ei_pn_io_ar_info_not_found, "IOCRBlockRes: no corresponding AR found!");
9064 /* dissect the MCRBlockReq */
9066 dissect_MCRBlockReq_block(tvbuff_t *tvb, int offset,
9067 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
9069 guint16 u16IOCRReference;
9070 guint32 u32AddressResolutionProperties;
9071 guint16 u16MCITimeoutFactor;
9072 guint16 u16NameLength;
9076 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
9077 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
9078 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
9082 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
9083 hf_pn_io_iocr_reference, &u16IOCRReference);
9084 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
9085 hf_pn_io_address_resolution_properties, &u32AddressResolutionProperties);
9086 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
9087 hf_pn_io_mci_timeout_factor, &u16MCITimeoutFactor);
9089 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
9090 hf_pn_io_station_name_length, &u16NameLength);
9092 pStationName = (char *)wmem_alloc(wmem_packet_scope(), u16NameLength+1);
9093 tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
9094 pStationName[u16NameLength] = '\0';
9095 proto_tree_add_string (tree, hf_pn_io_provider_station_name, tvb, offset, u16NameLength, pStationName);
9096 offset += u16NameLength;
9098 proto_item_append_text(item, ", CRRef:%u, Properties:0x%x, TFactor:%u, Station:%s",
9099 u16IOCRReference, u32AddressResolutionProperties, u16MCITimeoutFactor, pStationName);
9106 /* dissect the SubFrameBlock */
9108 dissect_SubFrameBlock_block(tvbuff_t *tvb, int offset,
9109 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
9110 guint16 u16BodyLength)
9112 guint16 u16IOCRReference;
9114 guint32 u32SubFrameData;
9116 proto_item *sub_item;
9117 proto_tree *sub_tree;
9120 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
9121 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
9122 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
9125 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
9128 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
9129 hf_pn_io_iocr_reference, &u16IOCRReference);
9131 /* CMInitiatorMACAdd */
9132 offset = dissect_pn_mac(tvb, offset, pinfo, tree,
9133 hf_pn_io_cminitiator_macadd, mac);
9135 /* SubFrameData n*32 */
9136 u16BodyLength -= 10;
9137 u16Tmp = u16BodyLength;
9139 sub_item = proto_tree_add_item(tree, hf_pn_io_subframe_data, tvb, offset, 4, ENC_BIG_ENDIAN);
9140 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_subframe_data);
9141 /* 31-16 reserved_2 */
9142 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
9143 hf_pn_io_subframe_data_reserved2, &u32SubFrameData);
9144 /* 15- 8 DataLength */
9145 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
9146 hf_pn_io_subframe_data_length, &u32SubFrameData);
9148 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
9149 hf_pn_io_subframe_data_reserved1, &u32SubFrameData);
9151 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
9152 hf_pn_io_subframe_data_position, &u32SubFrameData);
9154 proto_item_append_text(sub_item, ", Length:%u, Pos:%u",
9155 (u32SubFrameData & 0x0000FF00) >> 8, u32SubFrameData & 0x0000007F);
9156 } while (u16Tmp -= 4);
9158 proto_item_append_text(item, ", CRRef:%u, %u*Data",
9159 u16IOCRReference, u16BodyLength/4);
9164 /* dissect the (PD)SubFrameBlock 0x022B */
9166 dissect_PDSubFrameBlock_block(tvbuff_t *tvb, int offset,
9167 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
9168 guint16 u16BodyLength)
9170 guint32 u32SFIOCRProperties;
9171 guint32 u32SubFrameData;
9173 proto_item *sub_item;
9174 proto_tree *sub_tree;
9175 guint16 u16RemainingLength;
9177 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
9178 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
9179 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
9183 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_frame_id, &u16FrameID);
9184 /* SFIOCRProperties */
9185 sub_item = proto_tree_add_item(tree, hf_pn_io_SFIOCRProperties, tvb, offset, PD_SUB_FRAME_BLOCK_FIOCR_PROPERTIES_LENGTH, ENC_BIG_ENDIAN);
9186 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_SFIOCRProperties);
9188 /* dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_SFIOCRProperties, &u32SFIOCRProperties); */
9189 /* Bit 31: SFIOCRProperties.SFCRC16 */
9190 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_SFIOCRProperties_SFCRC16, &u32SFIOCRProperties);
9192 /* Bit 30: SFIOCRProperties.DFPRedundantPathLayout */
9193 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_SFIOCRProperties_DFPRedundantPathLayout, &u32SFIOCRProperties);
9194 /* Bit 29: SFIOCRProperties.DFPRedundantPathLayout */
9195 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_SFIOCRProperties_DFPType, &u32SFIOCRProperties);
9196 /* Bit 28 - 29: SFIOCRProperties.reserved_2 */
9197 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_SFIOCRProperties_reserved_2, &u32SFIOCRProperties);
9198 /* Bit 24 - 27: SFIOCRProperties.reserved_1 */
9199 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_SFIOCRProperties_reserved_1, &u32SFIOCRProperties);
9200 /* Bit 16 - 23: SFIOCRProperties.DFPmode */
9201 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_SFIOCRProperties_DFPmode, &u32SFIOCRProperties);
9202 /* Bit 8 - 15: SFIOCRProperties.RestartFactorForDistributedWD */
9203 /* 0x00 Mandatory No restart delay necessary
9204 0x01 - 0x09 Optional Less than 1 s restart delay
9205 0x0A - 0x50 Mandatory 1 s to 8 s restart delay
9206 0x51 - 0xFF Optional More than 8 s restart delay */
9207 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_RestartFactorForDistributedWD, &u32SFIOCRProperties);
9208 /* bit 0..7 SFIOCRProperties.DistributedWatchDogFactor */
9209 offset = /* it is the last one, so advance! */
9210 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_DistributedWatchDogFactor, &u32SFIOCRProperties);
9213 u16RemainingLength = u16BodyLength - PD_SUB_FRAME_BLOCK_FIOCR_PROPERTIES_LENGTH - PD_SUB_FRAME_BLOCK_FRAME_ID_LENGTH;
9214 while (u16RemainingLength >= PD_SUB_FRAME_BLOCK_SUB_FRAME_DATA_LENGTH)
9218 sub_item = proto_tree_add_item(tree, hf_pn_io_subframe_data, tvb, offset, 4, ENC_BIG_ENDIAN);
9219 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_subframe_data);
9221 /* Bit 0 - 6: SubframeData.Position */
9222 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_subframe_data_position, &u32SubFrameData);
9223 /* Bit 7: SubframeData.reserved_1 */
9224 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_subframe_reserved1, &u32SubFrameData);
9225 /* Bit 8 - 15: SubframeData.dataLength */
9226 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_subframe_data_length, &u32SubFrameData);
9227 /* Bit 16 - 31: SubframeData.reserved_2 */
9229 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_subframe_reserved2, &u32SubFrameData);
9230 Position = (guint8) (u32SubFrameData & 0x7F); /* the lower 6 bits */
9231 DataLength =(guint8) ((u32SubFrameData >>8) & 0x0ff); /* bit 8 to 15 */
9232 proto_item_append_text(sub_item, ", Length:%u (0x%x), Pos:%u",
9233 DataLength,DataLength, Position);
9234 u16RemainingLength = u16RemainingLength - 4;
9240 /* dissect the IRInfoBlock */
9242 dissect_IRInfoBlock_block(tvbuff_t *tvb, int offset,
9243 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
9244 guint16 u16BodyLength _U_)
9246 guint16 u16NumberOfIOCR;
9247 guint16 u16SubframeOffset;
9248 guint32 u32SubframeData;
9249 guint16 u16IOCRReference;
9250 e_guid_t IRDataUUID;
9253 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
9254 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
9255 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
9258 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
9260 offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
9261 hf_pn_io_IRData_uuid, &IRDataUUID);
9263 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
9265 /* Numbers of IOCRs */
9266 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
9267 hf_pn_io_number_of_iocrs, &u16NumberOfIOCR);
9269 while (u16NumberOfIOCR--)
9270 { /* IOCRReference */
9271 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_iocr_reference, &u16IOCRReference);
9273 /* SubframeOffset 16 */
9274 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_iocr_SubframeOffset, &u16SubframeOffset);
9276 /* SubframeData 32 */
9277 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep, hf_pn_io_iocr_SubframeData, &u32SubframeData);
9282 /* dissect the SRInfoBlock */
9284 dissect_SRInfoBlock_block(tvbuff_t *tvb, int offset,
9285 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
9286 guint16 u16BodyLength _U_)
9288 guint16 u16RedundancyDataHoldFactor;
9289 guint32 u32sr_properties;
9290 guint8 u8SRPropertiesMode;
9291 proto_item *sub_item;
9292 proto_tree *sub_tree;
9294 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
9295 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
9296 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
9299 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_RedundancyDataHoldFactor, &u16RedundancyDataHoldFactor);
9301 u32sr_properties = tvb_get_guint32(tvb, offset, ENC_BIG_ENDIAN);
9302 sub_item = proto_tree_add_item(tree, hf_pn_io_sr_properties, tvb, offset, 4, ENC_BIG_ENDIAN);
9303 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_sr_properties);
9305 u8SRPropertiesMode = (guint8)((u32sr_properties >> 2) & 0x01);
9307 /* SRProperties.InputValidOnBackupAR with SRProperties.Mode == 1 */
9308 if (u8SRPropertiesMode)
9310 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
9311 hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_1, &u32sr_properties);
9313 /* SRProperties.InputValidOnBackupAR with SRProperties.Mode == 0 */
9316 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
9317 hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_0, &u32sr_properties);
9319 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_sr_properties_Reserved_1, &u32sr_properties);
9320 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_sr_properties_Mode, &u32sr_properties);
9322 dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_sr_properties_Reserved_2, &u32sr_properties);
9324 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_sr_properties_Reserved_3, &u32sr_properties);
9328 /* dissect the RSInfoBlock */
9330 dissect_RSInfoBlock_block(tvbuff_t *tvb, int offset,
9331 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
9332 guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength _U_)
9334 guint32 u32RSProperties;
9336 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
9337 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
9338 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
9342 /* Padding 2 + 2 + 1 + 1 = 6 */
9343 /* Therefore we need 2 byte padding to make the block u32 aligned */
9344 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
9346 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep, hf_pn_io_rs_properties, &u32RSProperties);
9347 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep, hf_pn_io_rs_properties_alarm_transport, &u32RSProperties);
9348 dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep, hf_pn_io_rs_properties_reserved1, &u32RSProperties);
9349 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep, hf_pn_io_rs_properties_reserved2, &u32RSProperties);
9354 /* dissect the PDIRSubframeData block 0x022a */
9356 dissect_PDIRSubframeData_block(tvbuff_t *tvb, int offset,
9357 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
9359 guint16 u16NumberOfSubframeBlocks;
9361 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
9362 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
9363 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
9366 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_NumberOfSubframeBlocks, &u16NumberOfSubframeBlocks);
9368 while (u16NumberOfSubframeBlocks --)
9369 { /* dissect the Subframe Block */
9370 offset = dissect_a_block(tvb, offset, pinfo, /*sub_*/tree, drep);
9377 dissect_ARVendorBlockReq_block(tvbuff_t *tvb, int offset,
9378 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
9379 guint16 u16BodyLength _U_)
9381 guint16 APStructureIdentifier;
9383 guint32 guDataBytes;
9385 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
9386 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
9387 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
9390 APStructureIdentifier = ((drep[0] & DREP_LITTLE_ENDIAN)
9391 ? tvb_get_letohs(tvb, offset)
9392 : tvb_get_ntohs(tvb, offset));
9394 gu32API = ((drep[0] & DREP_LITTLE_ENDIAN)
9395 ? tvb_get_letohl(tvb, offset + 2)
9396 : tvb_get_ntohl (tvb, offset + 2));
9402 if (APStructureIdentifier <0x8000)
9404 proto_tree_add_item(tree, hf_pn_io_arvendor_strucidentifier_if0_low, tvb, offset, 2, DREP_ENC_INTEGER(drep));
9408 if (APStructureIdentifier > 0x8000)
9410 proto_tree_add_item(tree, hf_pn_io_arvendor_strucidentifier_if0_high, tvb, offset, 2, DREP_ENC_INTEGER(drep));
9412 else /* APStructureIdentifier == 0x8000 */
9414 proto_tree_add_item(tree, hf_pn_io_arvendor_strucidentifier_if0_is8000, tvb, offset, 2, DREP_ENC_INTEGER(drep));
9420 proto_tree_add_item(tree, hf_pn_io_arvendor_strucidentifier_not0, tvb, offset, 2, DREP_ENC_INTEGER(drep));
9423 proto_tree_add_item(tree, hf_pn_io_api, tvb, offset + 2, 4, DREP_ENC_INTEGER(drep));
9426 if (u16BodyLength < 6 )
9427 return offset; /* there are no user bytes! */
9428 guDataBytes = u16BodyLength - 6;
9430 dissect_pn_user_data(tvb, offset, pinfo, tree, guDataBytes, "Data ");
9434 /* dissect the DataDescription */
9436 dissect_DataDescription(tvbuff_t *tvb, int offset,
9437 packet_info *pinfo, proto_tree *tree, guint8 *drep, ioDataObject *tmp_io_data_object)
9439 guint16 u16DataDescription;
9440 guint16 u16SubmoduleDataLength;
9441 guint8 u8LengthIOCS;
9442 guint8 u8LengthIOPS;
9443 proto_item *sub_item;
9444 proto_tree *sub_tree;
9445 guint32 u32SubStart;
9447 conversation_t *conversation;
9448 stationInfo *station_info = NULL;
9449 ioDataObject *io_data_object;
9450 wmem_list_frame_t *frame;
9451 wmem_list_t *ioobject_list;
9453 sub_item = proto_tree_add_item(tree, hf_pn_io_data_description_tree, tvb, offset, 0, ENC_NA);
9454 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_data_description);
9455 u32SubStart = offset;
9457 /* DataDescription */
9458 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
9459 hf_pn_io_data_description, &u16DataDescription);
9460 /* SubmoduleDataLength */
9461 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
9462 hf_pn_io_submodule_data_length, &u16SubmoduleDataLength);
9464 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
9465 hf_pn_io_length_iocs, &u8LengthIOCS);
9467 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
9468 hf_pn_io_length_iops, &u8LengthIOPS);
9470 proto_item_append_text(sub_item, ": %s, SubmoduleDataLength: %u, LengthIOCS: %u, u8LengthIOPS: %u",
9471 val_to_str(u16DataDescription, pn_io_data_description, "(0x%x)"),
9472 u16SubmoduleDataLength, u8LengthIOCS, u8LengthIOPS);
9473 proto_item_set_len(sub_item, offset - u32SubStart);
9475 /* Save new data for IO Data Objects */
9476 if (!pinfo->fd->flags.visited) {
9477 /* Get current conversation endpoints using MAC addresses */
9478 conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
9479 if (conversation == NULL) {
9480 conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
9483 station_info = (stationInfo*)conversation_get_proto_data(conversation, proto_pn_dcp);
9485 if (station_info != NULL) {
9486 if (u16DataDescription == PN_INPUT_DATADESCRITPION) {
9487 /* INPUT HANDLING */
9488 ioobject_list = station_info->ioobject_data_in;
9491 /* OUTPUT HANDLING */
9492 ioobject_list = station_info->ioobject_data_out;
9495 for (frame = wmem_list_head(ioobject_list); frame != NULL; frame = wmem_list_frame_next(frame)) {
9496 io_data_object = (ioDataObject*)wmem_list_frame_data(frame);
9497 if (io_data_object->slotNr == tmp_io_data_object->slotNr && io_data_object->subSlotNr == tmp_io_data_object->subSlotNr) {
9498 /* Write additional data from dissect_ExpectedSubmoduleBlockReq_block() to corresponding io_data_object */
9499 io_data_object->moduleIdentNr = tmp_io_data_object->moduleIdentNr;
9500 io_data_object->subModuleIdentNr = tmp_io_data_object->subModuleIdentNr;
9501 io_data_object->length = u16SubmoduleDataLength;
9503 io_data_object->moduleNameStr = wmem_strdup(wmem_file_scope(), tmp_io_data_object->moduleNameStr);
9504 io_data_object->profisafeSupported = tmp_io_data_object->profisafeSupported;
9505 io_data_object->discardIOXS = tmp_io_data_object->discardIOXS;
9506 io_data_object->amountInGSDML = tmp_io_data_object->amountInGSDML;
9507 io_data_object->fParameterIndexNr = tmp_io_data_object->fParameterIndexNr;
9519 /* dissect the ExpectedSubmoduleBlockReq */
9521 dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
9522 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
9524 guint16 u16NumberOfAPIs;
9527 guint32 u32ModuleIdentNumber;
9528 guint16 u16ModuleProperties;
9529 guint16 u16NumberOfSubmodules;
9530 guint16 u16SubslotNr;
9531 guint32 u32SubmoduleIdentNumber;
9532 guint16 u16SubmoduleProperties;
9533 proto_item *api_item;
9534 proto_tree *api_tree;
9535 guint32 u32ApiStart;
9536 proto_item *sub_item;
9537 proto_tree *sub_tree;
9538 proto_item *submodule_item;
9539 proto_tree *submodule_tree;
9540 guint32 u32SubStart;
9542 /* Variable for the search of gsd file */
9543 const char vendorIdStr[] = "VendorID=\"";
9544 const char deviceIdStr[] = "DeviceID=\"";
9545 const char moduleStr[] = "ModuleIdentNumber=\"";
9546 const char subModuleStr[] = "SubmoduleIdentNumber=\"";
9547 const char profisafeStr[] = "PROFIsafeSupported=\"true\"";
9548 const char fParameterStr[] = "<F_ParameterRecordDataItem";
9549 const char fParameterIndexStr[] = "Index=";
9550 const char moduleNameInfo[] = "<Name";
9551 const char moduleValueInfo[] = "Value=\"";
9553 guint16 searchVendorID = 0;
9554 guint16 searchDeviceID = 0;
9555 gboolean vendorMatch;
9556 gboolean deviceMatch;
9557 conversation_t *conversation;
9558 stationInfo *station_info = NULL;
9559 ioDataObject *io_data_object = NULL; /* Used to transfer data to fct. "dissect_DataDescription()" */
9561 /* Variable for the search of GSD-file */
9562 guint32 read_vendor_id;
9563 guint32 read_device_id;
9564 guint32 read_module_id;
9565 guint32 read_submodule_id;
9566 gboolean gsdmlFoundFlag;
9567 gchar tmp_moduletext[MAX_NAMELENGTH];
9568 gchar *convertStr; /* GSD-file search */
9569 gchar *pch; /* helppointer, to save temp. the found Networkpath of GSD-file */
9570 gchar *puffer; /* used for fgets() during GSD-file search */
9571 gchar *temp; /* used for fgets() during GSD-file search */
9572 gchar *diropen = NULL; /* saves the final networkpath to open for GSD-files */
9574 FILE *fp = NULL; /* filepointer */
9575 const gchar *filename; /* saves the found GSD-file name */
9577 /* Helppointer initial */
9578 convertStr = (gchar*)wmem_alloc(wmem_packet_scope(), MAX_NAMELENGTH);
9579 convertStr[0] = '\0';
9580 pch = (gchar*)wmem_alloc(wmem_packet_scope(), MAX_LINE_LENGTH);
9582 puffer = (gchar*)wmem_alloc(wmem_packet_scope(), MAX_LINE_LENGTH);
9584 temp = (gchar*)wmem_alloc(wmem_packet_scope(), MAX_LINE_LENGTH);
9588 io_data_object = wmem_new0(wmem_file_scope(), ioDataObject);
9589 io_data_object->profisafeSupported = FALSE;
9590 io_data_object->moduleNameStr = (gchar*)wmem_alloc(wmem_file_scope(), MAX_NAMELENGTH);
9591 g_strlcpy(io_data_object->moduleNameStr, "Unknown", MAX_NAMELENGTH);
9592 vendorMatch = FALSE;
9593 deviceMatch = FALSE;
9594 gsdmlFoundFlag = FALSE;
9597 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
9598 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
9599 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
9603 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
9604 hf_pn_io_number_of_apis, &u16NumberOfAPIs);
9606 proto_item_append_text(item, ": APIs:%u", u16NumberOfAPIs);
9609 /* Get current conversation endpoints using MAC addresses */
9610 conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
9611 if (conversation == NULL) {
9612 conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
9615 station_info = (stationInfo*)conversation_get_proto_data(conversation, proto_pn_dcp);
9616 if (station_info != NULL) {
9617 station_info->gsdFound = FALSE;
9618 station_info->gsdPathLength = FALSE;
9620 /* Set searchVendorID and searchDeviceID for GSDfile search */
9621 searchVendorID = station_info->u16Vendor_id;
9622 searchDeviceID = station_info->u16Device_id;
9624 /* Use the given GSD-file networkpath of the PNIO-Preference */
9625 if(pnio_ps_networkpath[0] != '\0') { /* check the length of the given networkpath (array overflow protection) */
9626 station_info->gsdPathLength = TRUE;
9628 if ((dir = g_dir_open(pnio_ps_networkpath, 0, NULL)) != NULL) {
9629 /* Find all GSD-files within directory */
9630 while ((filename = g_dir_read_name(dir)) != NULL) {
9632 /* ---- complete the path to open a GSD-file ---- */
9633 diropen = wmem_strdup_printf(wmem_packet_scope(), "%s" G_DIR_SEPARATOR_S "%s", pnio_ps_networkpath, filename);
9635 /* ---- Open the found GSD-file ---- */
9636 fp = ws_fopen(diropen, "r");
9639 /* ---- Get VendorID & DeviceID ---- */
9640 while(pn_fgets(puffer, MAX_LINE_LENGTH, fp) != NULL) {
9641 /* ----- VendorID ------ */
9642 if((strstr(puffer, vendorIdStr)) != NULL) {
9643 memset (convertStr, 0, sizeof(*convertStr));
9644 pch = strstr(puffer, vendorIdStr);
9645 if (pch!= NULL && sscanf(pch, "VendorID=\"%199[^\"]", convertStr) == 1) {
9646 read_vendor_id = (guint32) strtoul (convertStr, NULL, 0);
9648 if(read_vendor_id == searchVendorID) {
9649 vendorMatch = TRUE; /* found correct VendorID */
9654 /* ----- DeviceID ------ */
9655 if((strstr(puffer, deviceIdStr)) != NULL) {
9656 memset(convertStr, 0, sizeof(*convertStr));
9657 pch = strstr(puffer, deviceIdStr);
9658 if (pch != NULL && sscanf(pch, "DeviceID=\"%199[^\"]", convertStr) == 1) {
9659 read_device_id = (guint32)strtoul(convertStr, NULL, 0);
9661 if(read_device_id == searchDeviceID) {
9662 deviceMatch = TRUE; /* found correct DeviceID */
9671 if(vendorMatch && deviceMatch) {
9672 break; /* Found correct GSD-file! -> Break the searchloop */
9675 /* Couldn't find the correct GSD-file to the corresponding device */
9676 vendorMatch = FALSE;
9677 deviceMatch = FALSE;
9678 gsdmlFoundFlag = FALSE;
9679 diropen = ""; /* reset array for next search */
9687 /* ---- Found the correct GSD-file -> set Flag and save the completed path ---- */
9688 if(vendorMatch && deviceMatch) {
9689 gsdmlFoundFlag = TRUE;
9690 station_info->gsdFound = TRUE;
9691 station_info->gsdLocation = wmem_strdup(wmem_file_scope(), diropen);
9694 /* Copy searchpath to array for a detailed output message in cyclic data dissection */
9695 station_info->gsdLocation = wmem_strdup_printf(wmem_file_scope(), "%s" G_DIR_SEPARATOR_S "*.xml", pnio_ps_networkpath);
9699 /* will be used later on in cyclic RTC1 data dissection for detailed output message */
9700 station_info->gsdPathLength = FALSE;
9704 while (u16NumberOfAPIs--) {
9705 api_item = proto_tree_add_item(tree, hf_pn_io_api_tree, tvb, offset, 0, ENC_NA);
9706 api_tree = proto_item_add_subtree(api_item, ett_pn_io_api);
9707 u32ApiStart = offset;
9710 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, api_tree, drep,
9711 hf_pn_io_api, &u32Api);
9713 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, api_tree, drep,
9714 hf_pn_io_slot_nr, &u16SlotNr);
9715 /* ModuleIdentNumber */
9716 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, api_tree, drep,
9717 hf_pn_io_module_ident_number, &u32ModuleIdentNumber);
9718 /* ModuleProperties */
9719 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, api_tree, drep,
9720 hf_pn_io_module_properties, &u16ModuleProperties);
9721 /* NumberOfSubmodules */
9722 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, api_tree, drep,
9723 hf_pn_io_number_of_submodules, &u16NumberOfSubmodules);
9725 proto_item_append_text(api_item, ": %u, Slot:0x%x, IdentNumber:0x%x Properties:0x%x Submodules:%u",
9726 u32Api, u16SlotNr, u32ModuleIdentNumber, u16ModuleProperties, u16NumberOfSubmodules);
9728 proto_item_append_text(item, ", Submodules:%u", u16NumberOfSubmodules);
9730 while (u16NumberOfSubmodules--) {
9731 sub_item = proto_tree_add_item(api_tree, hf_pn_io_submodule_tree, tvb, offset, 0, ENC_NA);
9732 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_submodule);
9733 u32SubStart = offset;
9736 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
9737 hf_pn_io_subslot_nr, &u16SubslotNr);
9738 /* SubmoduleIdentNumber */
9739 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
9740 hf_pn_io_submodule_ident_number, &u32SubmoduleIdentNumber);
9741 /* SubmoduleProperties */
9742 submodule_item = proto_tree_add_item(sub_tree, hf_pn_io_submodule_properties, tvb, offset, 2, ENC_BIG_ENDIAN);
9743 submodule_tree = proto_item_add_subtree(submodule_item, ett_pn_io_submodule_properties);
9744 dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
9745 hf_pn_io_submodule_properties_reserved, &u16SubmoduleProperties);
9746 dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
9747 hf_pn_io_submodule_properties_discard_ioxs, &u16SubmoduleProperties);
9748 dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
9749 hf_pn_io_submodule_properties_reduce_output_submodule_data_length, &u16SubmoduleProperties);
9750 dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
9751 hf_pn_io_submodule_properties_reduce_input_submodule_data_length, &u16SubmoduleProperties);
9752 dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
9753 hf_pn_io_submodule_properties_shared_input, &u16SubmoduleProperties);
9754 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
9755 hf_pn_io_submodule_properties_type, &u16SubmoduleProperties);
9757 io_data_object->slotNr = u16SlotNr;
9758 io_data_object->subSlotNr = u16SubslotNr;
9759 io_data_object->moduleIdentNr = u32ModuleIdentNumber;
9760 io_data_object->subModuleIdentNr = u32SubmoduleIdentNumber;
9761 io_data_object->discardIOXS = u16SubmoduleProperties & 0x0020;
9763 /* Search the moduleID and subModuleID, find if PROFIsafe and also search for F-Par. Indexnumber
9764 * ---------------------------------------------------------------------------------------------
9765 * Speical case: Module has several ModuleIdentNr. in one GSD-file
9766 * Also with the given parameters of wireshark, some modules were completely equal. For this
9767 * special case a compromise for this problem has been made, to set the module name will
9768 * be more generally displayed.
9769 * Also this searchloop will find the F-Parameter Indexnumber, so that Wireshark is able to
9770 * dissect those F-Parameters correctly, as this index can change between the vendors.
9773 io_data_object->amountInGSDML = 0;
9774 io_data_object->fParameterIndexNr = 0;
9775 io_data_object->profisafeSupported = FALSE;
9777 if (diropen != NULL) {
9778 fp = ws_fopen(diropen, "r");
9783 if(fp != NULL && gsdmlFoundFlag) {
9784 fseek(fp, 0, SEEK_SET);
9786 /* Find Indexnumber for fParameter */
9787 while(pn_fgets(temp, MAX_LINE_LENGTH, fp) != NULL) {
9788 if((strstr(temp, fParameterStr)) != NULL) {
9789 memset (convertStr, 0, sizeof(*convertStr));
9791 pch = strstr(temp, fParameterIndexStr);
9792 if (pch != NULL && sscanf(pch, "Index=\"%199[^\"]", convertStr) == 1) {
9793 io_data_object->fParameterIndexNr = (guint32)strtoul(convertStr, NULL, 0);
9795 break; /* found Indexnumber -> break search loop */
9799 memset (temp, 0, sizeof(*temp));
9800 fseek(fp, 0, SEEK_SET); /* Set filepointer to the beginning */
9802 while(pn_fgets(temp, MAX_LINE_LENGTH, fp) != NULL) {
9803 if((strstr(temp, moduleStr)) != NULL) { /* find the String "ModuleIdentNumber=" */
9804 memset (convertStr, 0, sizeof(*convertStr));
9805 pch = strstr(temp, moduleStr); /* search for "ModuleIdentNumber=\"" within GSD-file */
9806 if (pch != NULL && sscanf(pch, "ModuleIdentNumber=\"%199[^\"]", convertStr) == 1) { /* Change format of Value string-->numeric string */
9807 read_module_id = (guint32)strtoul(convertStr, NULL, 0); /* Change numeric string --> unsigned long; read_module_id contains the Value of the ModuleIdentNumber */
9809 /* If the found ModuleID matches with the wanted ModuleID, search for the Submodule and break */
9810 if (read_module_id == io_data_object->moduleIdentNr) {
9811 ++io_data_object->amountInGSDML; /* Save the amount of same (!) Module- & SubmoduleIdentNr in one GSD-file */
9813 while(pn_fgets(temp, MAX_LINE_LENGTH, fp) != NULL) {
9814 if((strstr(temp, moduleNameInfo)) != NULL) { /* find the String "<Name" for the TextID */
9817 if (sscanf(temp, "%*s TextId=\"%199[^\"]", tmp_moduletext) != 1) /* saves the correct TextId for the next searchloop */
9820 filePosRecord = ftell(fp); /* save the current position of the filepointer (Offset) */
9821 /* ftell() may return -1 for error, don't move fp in this case */
9822 if (filePosRecord >= 0) {
9823 while (pn_fgets(temp, MAX_LINE_LENGTH, fp) != NULL && io_data_object->amountInGSDML == 1) {
9824 /* Find a String with the saved TextID and with a fitting value for it in the same line. This value is the name of the Module! */
9825 if(((strstr(temp, tmp_moduletext)) != NULL) && ((strstr(temp, moduleValueInfo)) != NULL)) {
9826 pch = strstr(temp, moduleValueInfo);
9827 if (pch != NULL && sscanf(pch, "Value=\"%199[^\"]", io_data_object->moduleNameStr) == 1)
9828 break; /* Found the name of the module */
9832 fseek(fp, filePosRecord, SEEK_SET); /* set filepointer to the correct TextID */
9836 /* Search for Submoduleidentnumber in GSD-file */
9837 if((strstr(temp, subModuleStr)) != NULL) {
9838 memset (convertStr, 0, sizeof(*convertStr));
9839 pch = strstr(temp, subModuleStr);
9840 if (pch != NULL && sscanf(pch, "SubmoduleIdentNumber=\"%199[^\"]", convertStr) == 1) {
9841 read_submodule_id = (guint32) strtoul (convertStr, NULL, 0); /* read_submodule_id contains the Value of the SubModuleIdentNumber */
9843 /* Find "PROFIsafeSupported" flag of the module in GSD-file */
9844 if(read_submodule_id == io_data_object->subModuleIdentNr) {
9845 if((strstr(temp, profisafeStr)) != NULL) {
9846 io_data_object->profisafeSupported = TRUE; /* flag is in the same line as SubmoduleIdentNr */
9849 else { /* flag is not in the same line as Submoduleidentnumber -> search for it */
9850 while(pn_fgets(temp, MAX_LINE_LENGTH, fp) != NULL) {
9851 if((strstr(temp, profisafeStr)) != NULL) {
9852 io_data_object->profisafeSupported = TRUE;
9853 break; /* Found the PROFIsafeSupported flag of the module */
9856 else if((strstr(temp, ">")) != NULL) {
9862 break; /* Found the PROFIsafe Module */
9881 switch (u16SubmoduleProperties & 0x03) {
9882 case(0x00): /* no input and no output data (one Input DataDescription Block follows) */
9883 offset = dissect_DataDescription(tvb, offset, pinfo, sub_tree, drep, io_data_object);
9885 case(0x01): /* input data (one Input DataDescription Block follows) */
9886 offset = dissect_DataDescription(tvb, offset, pinfo, sub_tree, drep, io_data_object);
9888 case(0x02): /* output data (one Output DataDescription Block follows) */
9889 offset = dissect_DataDescription(tvb, offset, pinfo, sub_tree, drep, io_data_object);
9891 case(0x03): /* input and output data (one Input and one Output DataDescription Block follows) */
9892 offset = dissect_DataDescription(tvb, offset, pinfo, sub_tree, drep, io_data_object);
9893 offset = dissect_DataDescription(tvb, offset, pinfo, sub_tree, drep, io_data_object);
9895 default: /* will not execute because of the line preceding the switch */
9899 proto_item_append_text(sub_item, ": Subslot:0x%x, Ident:0x%x Properties:0x%x",
9900 u16SubslotNr, u32SubmoduleIdentNumber, u16SubmoduleProperties);
9901 proto_item_set_len(sub_item, offset - u32SubStart);
9904 proto_item_set_len(api_item, offset - u32ApiStart);
9911 /* dissect the ModuleDiffBlock */
9913 dissect_ModuleDiffBlock_block(tvbuff_t *tvb, int offset,
9914 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
9916 guint16 u16NumberOfAPIs;
9918 guint16 u16NumberOfModules;
9920 guint32 u32ModuleIdentNumber;
9921 guint16 u16ModuleState;
9922 guint16 u16NumberOfSubmodules;
9923 guint16 u16SubslotNr;
9924 guint32 u32SubmoduleIdentNumber;
9925 guint16 u16SubmoduleState;
9926 proto_item *api_item;
9927 proto_tree *api_tree;
9928 guint32 u32ApiStart;
9929 proto_item *module_item;
9930 proto_tree *module_tree;
9931 guint32 u32ModuleStart;
9932 proto_item *sub_item;
9933 proto_tree *sub_tree;
9934 proto_item *submodule_item;
9935 proto_tree *submodule_tree;
9936 guint32 u32SubStart;
9938 conversation_t *conversation;
9939 stationInfo *station_info;
9940 wmem_list_frame_t *frame;
9941 moduleDiffInfo *module_diff_info;
9942 moduleDiffInfo *cmp_module_diff_info;
9944 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
9945 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
9946 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
9951 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
9952 hf_pn_io_number_of_apis, &u16NumberOfAPIs);
9954 proto_item_append_text(item, ": APIs:%u", u16NumberOfAPIs);
9956 while (u16NumberOfAPIs--) {
9957 api_item = proto_tree_add_item(tree, hf_pn_io_api_tree, tvb, offset, 0, ENC_NA);
9958 api_tree = proto_item_add_subtree(api_item, ett_pn_io_api);
9959 u32ApiStart = offset;
9962 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, api_tree, drep,
9963 hf_pn_io_api, &u32Api);
9964 /* NumberOfModules */
9965 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, api_tree, drep,
9966 hf_pn_io_number_of_modules, &u16NumberOfModules);
9968 proto_item_append_text(api_item, ": %u, Modules: %u",
9969 u32Api, u16NumberOfModules);
9971 proto_item_append_text(item, ", Modules:%u", u16NumberOfModules);
9973 while (u16NumberOfModules--) {
9974 module_item = proto_tree_add_item(api_tree, hf_pn_io_module_tree, tvb, offset, 0, ENC_NA);
9975 module_tree = proto_item_add_subtree(module_item, ett_pn_io_module);
9976 u32ModuleStart = offset;
9979 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, module_tree, drep,
9980 hf_pn_io_slot_nr, &u16SlotNr);
9981 /* ModuleIdentNumber */
9982 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, module_tree, drep,
9983 hf_pn_io_module_ident_number, &u32ModuleIdentNumber);
9985 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, module_tree, drep,
9986 hf_pn_io_module_state, &u16ModuleState);
9987 /* NumberOfSubmodules */
9988 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, module_tree, drep,
9989 hf_pn_io_number_of_submodules, &u16NumberOfSubmodules);
9991 proto_item_append_text(module_item, ": Slot 0x%x, Ident: 0x%x State: %s Submodules: %u",
9992 u16SlotNr, u32ModuleIdentNumber,
9993 val_to_str(u16ModuleState, pn_io_module_state, "(0x%x)"),
9994 u16NumberOfSubmodules);
9997 if (!pinfo->fd->flags.visited) {
9998 /* Get current conversation endpoints using MAC addresses */
9999 conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
10000 if (conversation == NULL) {
10001 conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
10004 station_info = (stationInfo*)conversation_get_proto_data(conversation, proto_pn_dcp);
10005 if (station_info != NULL) {
10006 for (frame = wmem_list_head(station_info->diff_module); frame != NULL; frame = wmem_list_frame_next(frame)) {
10007 cmp_module_diff_info = (moduleDiffInfo*)wmem_list_frame_data(frame);
10008 if (cmp_module_diff_info->slotNr == u16SlotNr) {
10009 /* Found identical existing object */
10014 if (frame == NULL) {
10015 /* new diffModuleInfo data incoming */
10016 module_diff_info = wmem_new(wmem_file_scope(), moduleDiffInfo);
10017 module_diff_info->slotNr = u16SlotNr;
10018 module_diff_info->modulID = u32ModuleIdentNumber;
10019 wmem_list_append(station_info->diff_module, module_diff_info);
10024 proto_item_append_text(item, ", Submodules:%u", u16NumberOfSubmodules);
10026 while (u16NumberOfSubmodules--) {
10027 sub_item = proto_tree_add_item(module_tree, hf_pn_io_submodule_tree, tvb, offset, 0, ENC_NA);
10028 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_submodule);
10029 u32SubStart = offset;
10031 /* Subslotnumber */
10032 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
10033 hf_pn_io_subslot_nr, &u16SubslotNr);
10034 /* SubmoduleIdentNumber */
10035 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
10036 hf_pn_io_submodule_ident_number, &u32SubmoduleIdentNumber);
10037 /* SubmoduleState */
10038 submodule_item = proto_tree_add_item(sub_tree, hf_pn_io_submodule_state, tvb, offset, 2, ENC_BIG_ENDIAN);
10039 submodule_tree = proto_item_add_subtree(submodule_item, ett_pn_io_submodule_state);
10040 dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
10041 hf_pn_io_submodule_state_format_indicator, &u16SubmoduleState);
10042 if (u16SubmoduleState & 0x8000) {
10043 dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
10044 hf_pn_io_submodule_state_ident_info, &u16SubmoduleState);
10045 dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
10046 hf_pn_io_submodule_state_ar_info, &u16SubmoduleState);
10047 dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
10048 hf_pn_io_submodule_state_diag_info, &u16SubmoduleState);
10049 dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
10050 hf_pn_io_submodule_state_maintenance_demanded, &u16SubmoduleState);
10051 dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
10052 hf_pn_io_submodule_state_maintenance_required, &u16SubmoduleState);
10053 dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
10054 hf_pn_io_submodule_state_qualified_info, &u16SubmoduleState);
10055 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
10056 hf_pn_io_submodule_state_add_info, &u16SubmoduleState);
10058 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, submodule_tree, drep,
10059 hf_pn_io_submodule_state_detail, &u16SubmoduleState);
10062 proto_item_append_text(sub_item, ": Subslot 0x%x, IdentNumber: 0x%x, State: 0x%x",
10063 u16SubslotNr, u32SubmoduleIdentNumber, u16SubmoduleState);
10065 proto_item_set_len(sub_item, offset - u32SubStart);
10066 } /* NumberOfSubmodules */
10068 proto_item_set_len(module_item, offset - u32ModuleStart);
10071 proto_item_set_len(api_item, offset - u32ApiStart);
10078 /* dissect the IsochronousModeData block */
10080 dissect_IsochronousModeData_block(tvbuff_t *tvb, int offset,
10081 packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
10084 guint16 u16SubslotNr;
10085 guint16 u16ControllerApplicationCycleFactor;
10086 guint16 u16TimeDataCycle;
10087 guint32 u32TimeIOInput;
10088 guint32 u32TimeIOOutput;
10089 guint32 u32TimeIOInputValid;
10090 guint32 u32TimeIOOutputValid;
10093 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
10094 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
10095 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
10099 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
10102 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
10103 hf_pn_io_slot_nr, &u16SlotNr);
10104 /* Subslotnumber */
10105 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
10106 hf_pn_io_subslot_nr, &u16SubslotNr);
10108 /* ControllerApplicationCycleFactor */
10109 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
10110 hf_pn_io_controller_appl_cycle_factor, &u16ControllerApplicationCycleFactor);
10111 /* TimeDataCycle */
10112 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
10113 hf_pn_io_time_data_cycle, &u16TimeDataCycle);
10114 /* TimeIOInput (ns) */
10115 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
10116 hf_pn_io_time_io_input, &u32TimeIOInput);
10117 /* TimeIOOutput (ns) */
10118 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
10119 hf_pn_io_time_io_output, &u32TimeIOOutput);
10120 /* TimeIOInputValid (ns) */
10121 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
10122 hf_pn_io_time_io_input_valid, &u32TimeIOInputValid);
10123 /* TimeIOOutputValid (ns) */
10124 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
10125 hf_pn_io_time_io_output_valid, &u32TimeIOOutputValid);
10132 /* dissect the MultipleBlockHeader block */
10134 dissect_MultipleBlockHeader_block(tvbuff_t *tvb, int offset,
10135 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
10136 guint16 u16BodyLength)
10140 guint16 u16SubslotNr;
10144 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
10145 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
10146 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
10150 offset = dissect_pn_align4(tvb, offset, pinfo, tree);
10152 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
10153 hf_pn_io_api, &u32Api);
10154 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
10155 hf_pn_io_slot_nr, &u16SlotNr);
10156 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
10157 hf_pn_io_subslot_nr, &u16SubslotNr);
10159 proto_item_append_text(item, ": Api:0x%x Slot:%u Subslot:0x%x",
10160 u32Api, u16SlotNr, u16SubslotNr);
10162 new_tvb = tvb_new_subset_length(tvb, offset, u16BodyLength-10);
10163 offset = dissect_blocks(new_tvb, 0, pinfo, tree, drep);
10165 /*offset += u16BodyLength;*/
10170 /* dissect Combined Object Container Content block */
10172 dissect_COContainerContent_block(tvbuff_t *tvb, int offset,
10173 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
10174 guint16 u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar)
10178 guint16 u16SubslotNr;
10180 if(u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
10181 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
10182 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
10186 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
10188 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
10189 hf_pn_io_api, &u32Api);
10191 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
10192 hf_pn_io_slot_nr, &u16SlotNr);
10194 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
10195 hf_pn_io_subslot_nr, &u16SubslotNr);
10197 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
10199 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
10200 hf_pn_io_index, &u16Index);
10202 proto_item_append_text(item, ": Api:0x%x Slot:%u Subslot:0x%x Index:0x%x",
10203 u32Api, u16SlotNr, u16SubslotNr, u16Index);
10205 if(u16Index != 0x80B0) {
10206 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, u32RecDataLen, ar);
10213 static const gchar *
10214 indexReservedForProfiles(guint16 u16Index)
10216 /* "reserved for profiles" */
10217 if (u16Index >= 0xb000 && u16Index <= 0xbfff) {
10218 return "Reserved for Profiles (subslot specific)";
10220 if (u16Index >= 0xd000 && u16Index <= 0xdfff) {
10221 return "Reserved for Profiles (slot specific)";
10223 if (u16Index >= 0xec00 && u16Index <= 0xefff) {
10224 return "Reserved for Profiles (AR specific)";
10226 if (u16Index >= 0xf400 && u16Index <= 0xf7ff) {
10227 return "Reserved for Profiles (API specific)";
10229 if (u16Index >= 0xfc00 /* up to 0xffff */) {
10230 return "Reserved for Profiles (device specific)";
10237 /* dissect the RecordDataReadQuery block */
10239 dissect_RecordDataReadQuery_block(tvbuff_t *tvb, int offset,
10240 packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
10241 guint16 u16Index, guint16 u16BodyLength)
10243 const gchar *userProfile;
10246 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
10247 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
10248 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
10252 /* user specified format? */
10253 if (u16Index < 0x8000) {
10254 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, u16BodyLength, "User Specified Data");
10258 /* "reserved for profiles"? */
10259 userProfile = indexReservedForProfiles(u16Index);
10260 if (userProfile != NULL) {
10261 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, u16BodyLength, userProfile);
10265 return dissect_pn_undecoded(tvb, offset, pinfo, tree, u16BodyLength);
10268 /* dissect the RS_GetEvent block */
10270 dissect_RS_GetEvent_block(tvbuff_t *tvb, int offset,
10271 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
10272 guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
10274 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
10275 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
10276 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
10279 offset = dissect_RS_EventInfo(tvb, offset, pinfo, tree, drep);
10283 /* dissect the RS_AdjustControl */
10285 dissect_RS_AdjustControl(tvbuff_t *tvb, int offset,
10286 packet_info *pinfo _U_, proto_tree *tree, guint8 *drep,
10287 guint16 *u16RSBodyLength, guint16 *u16RSBlockType)
10289 guint16 u16ChannelNumber;
10290 guint16 u16SoEMaxScanDelay;
10291 proto_item *sub_item;
10292 proto_tree *sub_tree;
10293 guint8 u8SoEAdjustSpecifierReserved;
10294 guint8 u8SoEAdjustSpecifierIndicent;
10296 switch (*u16RSBlockType) {
10297 case(0xc010): /* SoE_DigitalInputObserver */
10299 /* ChannelNumber */
10300 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
10301 hf_pn_io_channel_number, &u16ChannelNumber);
10303 /* SoE_MaxScanDelay */
10304 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
10305 hf_pn_io_soe_max_scan_delay, &u16SoEMaxScanDelay);
10307 /* SoE_AdjustSpecifier */
10308 sub_item = proto_tree_add_item(tree, hf_pn_io_soe_adjust_specifier, tvb, offset, 1, ENC_BIG_ENDIAN);
10309 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_soe_adjust_specifier);
10311 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
10312 hf_pn_io_soe_adjust_specifier_reserved, &u8SoEAdjustSpecifierReserved);
10314 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
10315 hf_pn_io_soe_adjust_specifier_incident, &u8SoEAdjustSpecifierIndicent);
10317 /* Padding 2 + 2 + 1 = 5 */
10318 /* Therefore we need 3 byte padding to make the block u32 aligned */
10319 offset = dissect_pn_padding(tvb, offset, pinfo, tree, 3);
10322 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, *u16RSBodyLength, "UserData");
10328 /* dissect the RS_AdjustBlock */
10330 dissect_RS_AdjustBlock(tvbuff_t *tvb, int offset,
10331 packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
10333 proto_item *sub_item;
10334 proto_tree *sub_tree;
10336 guint16 u16RSBodyLength;
10337 guint16 u16RSBlockType;
10339 sub_item = proto_tree_add_item(tree, hf_pn_io_rs_adjust_block, tvb, offset, 0, ENC_NA);
10340 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_adjust_block);
10342 /* RS_BlockHeader */
10343 offset = dissect_RS_BlockHeader(tvb, offset, pinfo, sub_tree, sub_item, drep,
10344 &u16RSBodyLength, &u16RSBlockType);
10346 /* RS_AdjustControl */
10347 offset = dissect_RS_AdjustControl(tvb, offset, pinfo, sub_tree, drep,
10348 &u16RSBodyLength, &u16RSBlockType);
10353 /* dissect the RS_AdjustInfo */
10355 dissect_RS_AdjustInfo(tvbuff_t *tvb, int offset,
10356 packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
10358 proto_item *sub_item;
10359 proto_tree *sub_tree;
10360 guint16 u16NumberofEntries;
10362 sub_item = proto_tree_add_item(tree, hf_pn_io_rs_adjust_info, tvb, offset, 0, ENC_NA);
10363 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_adjust_info);
10365 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
10366 hf_pn_io_number_of_rs_event_info, &u16NumberofEntries);
10368 while (u16NumberofEntries > 0) {
10369 u16NumberofEntries--;
10370 offset = dissect_RS_AdjustBlock(tvb, offset, pinfo, sub_tree, drep);
10375 /* dissect the RS_AdjustObserver block */
10377 dissect_RS_AdjustObserver_block(tvbuff_t *tvb, int offset,
10378 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
10379 guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
10381 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
10382 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
10383 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
10386 offset = dissect_RS_AdjustInfo(tvb, offset, pinfo, tree, drep);
10391 dissect_RS_AckInfo(tvbuff_t *tvb, int offset,
10392 packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
10394 guint16 u16RSSpecifierSequenceNumber;
10396 /* RS_Specifier.SequenceNumber */
10397 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
10398 hf_pn_io_rs_specifier_sequence, &u16RSSpecifierSequenceNumber);
10403 /* dissect the RS_AckEvent block */
10405 dissect_RS_AckEvent_block(tvbuff_t *tvb, int offset,
10406 packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
10407 guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
10409 if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
10410 expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
10411 "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
10414 offset = dissect_RS_AckInfo(tvb, offset, pinfo, tree, drep);
10418 /* dissect one PN-IO block (depending on the block type) */
10420 dissect_block(tvbuff_t *tvb, int offset,
10421 packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar)
10423 guint16 u16BlockType;
10424 guint16 u16BlockLength;
10425 guint8 u8BlockVersionHigh;
10426 guint8 u8BlockVersionLow;
10427 proto_item *sub_item;
10428 proto_tree *sub_tree;
10429 guint32 u32SubStart;
10430 guint16 u16BodyLength;
10431 proto_item *header_item;
10432 proto_tree *header_tree;
10433 gint remainingBytes;
10435 /* from here, we only have big endian (network byte ordering)!!! */
10436 drep[0] &= ~DREP_LITTLE_ENDIAN;
10438 sub_item = proto_tree_add_item(tree, hf_pn_io_block, tvb, offset, 0, ENC_NA);
10439 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_block);
10440 u32SubStart = offset;
10442 header_item = proto_tree_add_item(sub_tree, hf_pn_io_block_header, tvb, offset, 6, ENC_NA);
10443 header_tree = proto_item_add_subtree(header_item, ett_pn_io_block_header);
10445 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, header_tree, drep,
10446 hf_pn_io_block_type, &u16BlockType);
10447 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, header_tree, drep,
10448 hf_pn_io_block_length, &u16BlockLength);
10449 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, header_tree, drep,
10450 hf_pn_io_block_version_high, &u8BlockVersionHigh);
10451 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, header_tree, drep,
10452 hf_pn_io_block_version_low, &u8BlockVersionLow);
10454 proto_item_append_text(header_item, ": Type=%s, Length=%u(+4), Version=%u.%u",
10455 val_to_str(u16BlockType, pn_io_block_type, "Unknown (0x%04x)"),
10456 u16BlockLength, u8BlockVersionHigh, u8BlockVersionLow);
10458 proto_item_set_text(sub_item, "%s",
10459 val_to_str(u16BlockType, pn_io_block_type, "Unknown (0x%04x)"));
10461 col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
10462 val_to_str(u16BlockType, pn_io_block_type, "Unknown"));
10464 /* block length is without type and length fields, but with version field */
10465 /* as it's already dissected, remove it */
10466 u16BodyLength = u16BlockLength - 2;
10467 remainingBytes = tvb_reported_length_remaining(tvb, offset);
10468 if (remainingBytes < 0)
10469 remainingBytes = 0;
10470 if (remainingBytes +2 < u16BodyLength)
10472 proto_item_append_text(sub_item, " Block_Length: %d greater than remaining Bytes, trying with Blocklen = remaining (%d)", u16BodyLength, remainingBytes);
10473 u16BodyLength = remainingBytes;
10475 switch (u16BlockType) {
10478 dissect_AlarmNotification_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10482 dissect_IODWriteReqHeader_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10483 u16Index, u32RecDataLen, ar);
10486 dissect_IODReadReqHeader_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10487 u16Index, u32RecDataLen, ar);
10490 dissect_DiagnosisData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10493 case(0x0012): /* ExpectedIdentificationData */
10494 case(0x0013): /* RealIdentificationData */
10495 dissect_IdentificationData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10498 dissect_SubstituteValue_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10502 dissect_RecordInputDataObjectElement_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10505 dissect_RecordOutputDataObjectElement_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10507 /* 0x0017 reserved */
10509 dissect_ARData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10512 dissect_LogData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10515 dissect_APIData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10518 dissect_SRLData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10521 dissect_IandM0_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10524 dissect_IandM1_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10527 dissect_IandM2_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10530 dissect_IandM3_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10533 dissect_IandM4_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10536 dissect_IandM5_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh,u8BlockVersionLow);
10539 dissect_IandM0FilterData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10542 dissect_IandM0FilterData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10545 dissect_IandM0FilterData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10548 dissect_IandM5Data_block(tvb, offset, pinfo, sub_tree, sub_item, drep);
10551 dissect_AssetManagementData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10554 dissect_AM_FullInformation_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10557 dissect_AM_HardwareOnlyInformation_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10560 dissect_AM_FirmwareOnlyInformation_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10563 dissect_ARBlockReq_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10567 dissect_IOCRBlockReq_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10571 dissect_AlarmCRBlockReq_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10575 dissect_ExpectedSubmoduleBlockReq_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10578 dissect_MCRBlockReq_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10581 dissect_SubFrameBlock_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10585 dissect_ARVendorBlockReq_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10588 dissect_IRInfoBlock_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10591 dissect_SRInfoBlock_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10594 dissect_RSInfoBlock_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10603 dissect_ControlConnect_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, ar);
10607 dissect_ControlBlockPrmBegin(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength, ar);
10611 dissect_SubmoduleListBlock(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength, ar);
10614 case(0x0200): /* PDPortDataCheck */
10615 dissect_PDPortData_Check_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10619 dissect_PDevData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10621 case(0x0202): /*dissect_PDPortData_Adjust_block */
10622 dissect_PDPortData_Adjust_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10626 dissect_PDSyncData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10629 dissect_IsochronousModeData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10632 dissect_PDIRData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10635 dissect_PDIRGlobalData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10638 dissect_PDIRFrameData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10642 dissect_PDIRBeginEndData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10646 dissect_AdjustDomainBoundary_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10649 dissect_CheckPeers_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10652 dissect_CheckLineDelay_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10655 dissect_CheckMAUType_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10658 dissect_AdjustMAUType_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10661 dissect_PDPortDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10664 dissect_AdjustMulticastBoundary_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10667 dissect_PDInterfaceMrpDataAdjust_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10670 dissect_PDInterfaceMrpDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10673 dissect_PDInterfaceMrpDataCheck_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10677 dissect_PDPortMrpData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10680 dissect_MrpManagerParams_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10683 dissect_MrpClientParams_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10686 dissect_MrpRTModeManagerData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10689 dissect_MrpRingStateData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10692 dissect_MrpRTStateData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10695 dissect_AdjustPortState_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10698 dissect_CheckPortState_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10701 dissect_MrpRTModeClientData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10704 dissect_CheckSyncDifference_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10707 dissect_CheckMAUTypeDifference_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10710 dissect_PDPortFODataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10713 dissect_FiberOpticManufacturerSpecific_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10716 dissect_PDPortFODataAdjust_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10719 dissect_PDPortFODataCheck_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10722 dissect_AdjustPeerToPeerBoundary_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10725 dissect_AdjustDCPBoundary_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10728 dissect_AdjustPreambleLength_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10731 dissect_CheckMAUTypeExtension_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10734 dissect_FiberOpticDiagnosisInfo_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10737 dissect_AdjustMAUTypeExtension_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10740 dissect_PDIRSubframeData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10743 dissect_PDSubFrameBlock_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10747 dissect_PDPortFODataCheck_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10750 dissect_MrpInstanceDataAdjust_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10753 dissect_MrpInstanceDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10756 dissect_MrpInstanceDataCheck_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10760 dissect_PDInterfaceDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10763 dissect_PDInterfaceAdjust_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10766 dissect_PDPortStatistic_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10769 dissect_MultipleBlockHeader_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10772 dissect_COContainerContent_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, *u16Index, u32RecDataLen, ar);
10775 dissect_RecordDataReadQuery_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, *u16Index, u16BodyLength);
10778 dissect_FSHello_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10781 dissect_FSParameter_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10784 dissect_PDInterfaceFSUDataAdjust_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10788 dissect_ARFSUDataAdjust_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
10791 dissect_RS_AdjustObserver_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10794 dissect_RS_GetEvent_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10797 dissect_RS_AckEvent_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10800 dissect_Maintenance_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10804 dissect_Alarm_ack_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10807 dissect_IODWriteResHeader_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10808 u16Index, u32RecDataLen, ar);
10811 dissect_IODReadResHeader_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow,
10812 u16Index, u32RecDataLen, ar);
10815 dissect_ARBlockRes_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, ar);
10818 dissect_IOCRBlockRes_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, *ar);
10821 dissect_AlarmCRBlockRes_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, *ar);
10824 dissect_ModuleDiffBlock_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10827 dissect_ARServerBlock(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
10837 dissect_ControlConnect_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, ar);
10840 dissect_pn_undecoded(tvb, offset, pinfo, sub_tree, u16BodyLength);
10842 offset += u16BodyLength;
10844 proto_item_set_len(sub_item, offset - u32SubStart);
10850 /* dissect any PN-IO block */
10852 dissect_a_block(tvbuff_t *tvb, int offset,
10853 packet_info *pinfo, proto_tree *tree, guint8 *drep)
10855 guint16 u16Index = 0;
10856 guint32 u32RecDataLen;
10857 pnio_ar_t *ar = NULL;
10859 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
10862 pnio_ar_info(tvb, pinfo, tree, ar);
10868 /* dissect any number of PN-IO blocks */
10870 dissect_blocks(tvbuff_t *tvb, int offset,
10871 packet_info *pinfo, proto_tree *tree, guint8 *drep)
10873 guint16 u16Index = 0;
10874 guint32 u32RecDataLen;
10875 pnio_ar_t *ar = NULL;
10878 while (tvb_captured_length(tvb) > (guint) offset) {
10879 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
10884 pnio_ar_info(tvb, pinfo, tree, ar);
10891 /* dissect a PN-IO (DCE-RPC) request header */
10893 dissect_IPNIO_rqst_header(tvbuff_t *tvb, int offset,
10894 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
10896 guint32 u32ArgsMax;
10897 guint32 u32ArgsLen;
10898 guint32 u32MaxCount;
10900 guint32 u32ArraySize;
10902 proto_item *sub_item;
10903 proto_tree *sub_tree;
10904 guint32 u32SubStart;
10907 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PNIO-CM");
10910 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
10911 hf_pn_io_args_max, &u32ArgsMax);
10913 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
10914 hf_pn_io_args_len, &u32ArgsLen);
10916 sub_item = proto_tree_add_item(tree, hf_pn_io_array, tvb, offset, 0, ENC_NA);
10917 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io);
10918 u32SubStart = offset;
10920 /* RPC array header */
10921 offset = dissect_ndr_uint32(tvb, offset, pinfo, sub_tree, di, drep,
10922 hf_pn_io_array_max_count, &u32MaxCount);
10923 offset = dissect_ndr_uint32(tvb, offset, pinfo, sub_tree, di, drep,
10924 hf_pn_io_array_offset, &u32Offset);
10925 offset = dissect_ndr_uint32(tvb, offset, pinfo, sub_tree, di, drep,
10926 hf_pn_io_array_act_count, &u32ArraySize);
10928 proto_item_append_text(sub_item, ": Max: %u, Offset: %u, Size: %u",
10929 u32MaxCount, u32Offset, u32ArraySize);
10930 proto_item_set_len(sub_item, offset - u32SubStart);
10936 /* dissect a PN-IO (DCE-RPC) response header */
10938 dissect_IPNIO_resp_header(tvbuff_t *tvb, int offset,
10939 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
10941 guint32 u32ArgsLen;
10942 guint32 u32MaxCount;
10944 guint32 u32ArraySize;
10946 proto_item *sub_item;
10947 proto_tree *sub_tree;
10948 guint32 u32SubStart;
10951 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PNIO-CM");
10953 offset = dissect_PNIO_status(tvb, offset, pinfo, tree, drep);
10956 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
10957 hf_pn_io_args_len, &u32ArgsLen);
10959 sub_item = proto_tree_add_item(tree, hf_pn_io_array, tvb, offset, 0, ENC_NA);
10960 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io);
10961 u32SubStart = offset;
10963 /* RPC array header */
10964 offset = dissect_ndr_uint32(tvb, offset, pinfo, sub_tree, di, drep,
10965 hf_pn_io_array_max_count, &u32MaxCount);
10966 offset = dissect_ndr_uint32(tvb, offset, pinfo, sub_tree, di, drep,
10967 hf_pn_io_array_offset, &u32Offset);
10968 offset = dissect_ndr_uint32(tvb, offset, pinfo, sub_tree, di, drep,
10969 hf_pn_io_array_act_count, &u32ArraySize);
10971 proto_item_append_text(sub_item, ": Max: %u, Offset: %u, Size: %u",
10972 u32MaxCount, u32Offset, u32ArraySize);
10973 proto_item_set_len(sub_item, offset - u32SubStart);
10979 /* dissect a PN-IO request */
10981 dissect_IPNIO_rqst(tvbuff_t *tvb, int offset,
10982 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
10985 offset = dissect_IPNIO_rqst_header(tvb, offset, pinfo, tree, di, drep);
10987 offset = dissect_blocks(tvb, offset, pinfo, tree, drep);
10993 /* dissect a PN-IO response */
10995 dissect_IPNIO_resp(tvbuff_t *tvb, int offset,
10996 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
10999 offset = dissect_IPNIO_resp_header(tvb, offset, pinfo, tree, di, drep);
11001 offset = dissect_blocks(tvb, offset, pinfo, tree, drep);
11006 /* dissect a PROFIDrive parameter request */
11008 dissect_ProfiDriveParameterRequest(tvbuff_t *tvb, int offset,
11009 packet_info *pinfo, proto_tree *tree, guint8 *drep)
11011 guint8 request_reference;
11014 guint8 no_of_parameters;
11016 proto_item *profidrive_item;
11017 proto_tree *profidrive_tree;
11019 profidrive_item = proto_tree_add_item(tree, hf_pn_io_block, tvb, offset, 0, ENC_NA);
11020 profidrive_tree = proto_item_add_subtree(profidrive_item, ett_pn_io_profidrive_parameter_request);
11021 proto_item_set_text(profidrive_item, "PROFIDrive Parameter Request: ");
11023 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, profidrive_tree, drep,
11024 hf_pn_io_profidrive_request_reference, &request_reference);
11025 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, profidrive_tree, drep,
11026 hf_pn_io_profidrive_request_id, &request_id);
11027 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, profidrive_tree, drep,
11028 hf_pn_io_profidrive_do_id, &do_id);
11029 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, profidrive_tree, drep,
11030 hf_pn_io_profidrive_no_of_parameters, &no_of_parameters);
11032 proto_item_append_text(profidrive_item, "ReqRef:0x%02x, ReqId:%s, DO:%u, NoOfParameters:%u",
11033 request_reference, val_to_str(request_id, pn_io_profidrive_request_id_vals, "Unknown"),
11034 do_id, no_of_parameters);
11036 col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIDrive Write Request, ReqRef:0x%02x, %s DO:%u",
11038 request_id==0x01 ? "Read" :
11039 request_id==0x02 ? "Change" :
11043 /* Parameter address list */
11044 for(addr_idx=0; addr_idx<no_of_parameters; addr_idx++) {
11046 guint8 no_of_elems;
11049 proto_item *sub_item;
11050 proto_tree *sub_tree;
11052 sub_item = proto_tree_add_item(profidrive_tree, hf_pn_io_block, tvb, offset, 0, ENC_NA);
11053 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_profidrive_parameter_address);
11054 proto_item_set_text(sub_item, "Parameter Address %u: ", addr_idx+1);
11056 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
11057 hf_pn_io_profidrive_param_attribute, &attribute);
11058 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
11059 hf_pn_io_profidrive_param_no_of_elems, &no_of_elems);
11060 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
11061 hf_pn_io_profidrive_param_number, ¶meter);
11062 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
11063 hf_pn_io_profidrive_param_subindex, &idx);
11065 proto_item_append_text(sub_item, "Attr:%s, Elems:%u, Parameter:%u, Index:%u",
11066 val_to_str(attribute, pn_io_profidrive_attribute_vals, "Unknown"), no_of_elems,
11069 if (no_of_elems>1) {
11070 col_append_fstr(pinfo->cinfo, COL_INFO, ", P%d[%d..%d]", parameter, idx, idx+no_of_elems-1);
11073 col_append_fstr(pinfo->cinfo, COL_INFO, ", P%d[%d]", parameter, idx);
11077 /* in case of change request parameter value list */
11078 if (request_id == 0x02) {
11079 for(addr_idx=0; addr_idx<no_of_parameters; addr_idx++) {
11082 proto_item *sub_item;
11083 proto_tree *sub_tree;
11085 sub_item = proto_tree_add_item(profidrive_tree, hf_pn_io_block, tvb, offset, 0, ENC_NA);
11086 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_profidrive_parameter_value);
11087 proto_item_set_text(sub_item, "Parameter Value %u: ", addr_idx+1);
11089 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
11090 hf_pn_io_profidrive_param_format, &format);
11091 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
11092 hf_pn_io_profidrive_param_no_of_values, &no_of_vals);
11094 proto_item_append_text(sub_item, "Format:%s, NoOfVals:%u",
11095 val_to_str(format, pn_io_profidrive_format_vals, "Unknown"), no_of_vals);
11097 while (no_of_vals--)
11099 offset = dissect_profidrive_value(tvb, offset, pinfo, sub_tree, drep, format);
11108 dissect_ProfiDriveParameterResponse(tvbuff_t *tvb, int offset,
11109 packet_info *pinfo, proto_tree *tree, guint8 *drep)
11111 guint8 request_reference;
11112 guint8 response_id;
11114 guint8 no_of_parameters;
11115 proto_item *profidrive_item;
11116 proto_tree *profidrive_tree;
11118 profidrive_item = proto_tree_add_item(tree, hf_pn_io_block, tvb, offset, 0, ENC_NA);
11119 profidrive_tree = proto_item_add_subtree(profidrive_item, ett_pn_io_profidrive_parameter_response);
11120 proto_item_set_text(profidrive_item, "PROFIDrive Parameter Response: ");
11122 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, profidrive_tree, drep,
11123 hf_pn_io_profidrive_request_reference, &request_reference);
11124 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, profidrive_tree, drep,
11125 hf_pn_io_profidrive_response_id, &response_id);
11126 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, profidrive_tree, drep,
11127 hf_pn_io_profidrive_do_id, &do_id);
11128 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, profidrive_tree, drep,
11129 hf_pn_io_profidrive_no_of_parameters, &no_of_parameters);
11131 proto_item_append_text(profidrive_item, "ReqRef:0x%02x, RspId:%s, DO:%u, NoOfParameters:%u",
11132 request_reference, val_to_str(response_id, pn_io_profidrive_response_id_vals, "Unknown"),
11133 do_id, no_of_parameters);
11135 col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIDrive Read Response, ReqRef:0x%02x, RspId:%s",
11137 val_to_str(response_id, pn_io_profidrive_response_id_vals, "Unknown response"));
11142 dissect_RecordDataRead(tvbuff_t *tvb, int offset,
11143 packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16Index, guint32 u32RecDataLen)
11145 const gchar *userProfile;
11146 pnio_ar_t *ar = NULL;
11149 /* user specified format? */
11150 if (u16Index < 0x8000) {
11151 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, u32RecDataLen, "User Specified Data");
11155 /* profidrive parameter access response */
11156 if (u16Index == 0xb02e || u16Index == 0xb02f) {
11157 return dissect_ProfiDriveParameterResponse(tvb, offset, pinfo, tree, drep);
11160 /* "reserved for profiles"? */
11161 userProfile = indexReservedForProfiles(u16Index);
11162 if (userProfile != NULL) {
11163 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, u32RecDataLen, userProfile);
11167 /* see: pn_io_index */
11168 /* single block only */
11169 switch (u16Index) {
11170 case(0x8010): /* Maintenance required in channel coding for one subslot */
11171 case(0x8011): /* Maintenance demanded in channel coding for one subslot */
11172 case(0x8012): /* Maintenance required in all codings for one subslot */
11173 case(0x8013): /* Maintenance demanded in all codings for one subslot */
11174 case(0x801e): /* SubstituteValues for one subslot */
11175 case(0x8028): /* RecordInputDataObjectElement for one subslot */
11176 case(0x8029): /* RecordOutputDataObjectElement for one subslot */
11177 case(0x8050): /* PDInterfaceMrpDataReal for one subslot */
11178 case(0x8051): /* PDInterfaceMrpDataCheck for one subslot */
11179 case(0x8052): /* PDInterfaceMrpDataAdjust for one subslot */
11180 case(0x8053): /* PDPortMrpDataAdjust for one subslot */
11181 case(0x8054): /* PDPortMrpDataReal for one subslot */
11182 case(0x8060): /* PDPortFODataReal for one subslot */
11183 case(0x8061): /* PDPortFODataCheck for one subslot */
11184 case(0x8062): /* PDPortFODataAdjust for one subslot */
11185 case(0x8070): /* PDNCDataCheck for one subslot */
11186 case(0x8071): /* PDPortStatistic for one subslot */
11187 case(0x8080): /* PDInterfaceDataReal */
11188 case(0x8090): /* PDInterfaceFSUDataAdjust */
11189 case(0x80CF): /* RS_AdjustObserver */
11191 case(0xaff0): /* I&M0 */
11192 case(0xaff1): /* I&M1 */
11193 case(0xaff2): /* I&M2 */
11194 case(0xaff3): /* I&M3 */
11195 case(0xaff4): /* I&M4 */
11196 case(0xaff5): /* I&M5 */
11197 case(0xaff6): /* I&M6 */
11198 case(0xaff7): /* I&M7 */
11199 case(0xaff8): /* I&M8 */
11200 case(0xaff9): /* I&M9 */
11201 case(0xaffa): /* I&M10 */
11202 case(0xaffb): /* I&M11 */
11203 case(0xaffc): /* I&M12 */
11204 case(0xaffd): /* I&M13 */
11205 case(0xaffe): /* I&M14 */
11206 case(0xafff): /* I&M15 */
11208 case(0xc010): /* Maintenance required in channel coding for one slot */
11209 case(0xc011): /* Maintenance demanded in channel coding for one slot */
11210 case(0xc012): /* Maintenance required in all codings for one slot */
11211 case(0xc013): /* Maintenance demanded in all codings for one slot */
11213 case(0xe002): /* ModuleDiffBlock for one AR */
11214 case(0xe010): /* Maintenance required in channel coding for one AR */
11215 case(0xe011): /* Maintenance demanded in channel coding for one AR */
11216 case(0xe012): /* Maintenance required in all codings for one AR */
11217 case(0xe013): /* Maintenance demanded in all codings for one AR */
11219 case(0xf010): /* Maintenance required in channel coding for one API */
11220 case(0xf011): /* Maintenance demanded in channel coding for one API */
11221 case(0xf012): /* Maintenance required in all codings for one API */
11222 case(0xf013): /* Maintenance demanded in all codings for one API */
11223 case(0xf020): /* ARData for one API */
11225 case(0xf820): /* ARData */
11226 case(0xf821): /* APIData */
11227 case(0xf830): /* LogData */
11228 case(0xf831): /* PDevData */
11229 case(0xf880) : /* AssetManagementData */
11230 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
11233 case(0xf840): /* I&M0FilterData */
11235 int end_offset = offset + u32RecDataLen;
11236 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
11237 if (end_offset > offset)
11238 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
11239 if (end_offset > offset)
11240 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
11249 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
11253 /*** multiple blocks possible ***/
11254 case(0x8000): /* ExpectedIdentificationData for one subslot */
11255 case(0x8001): /* RealIdentificationData for one subslot */
11256 case(0x800a): /* Diagnosis in channel decoding for one subslot */
11257 case(0x800b): /* Diagnosis in all codings for one subslot */
11258 case(0x800c): /* Diagnosis, Maintenance, Qualified and Status for one subslot */
11260 case(0x802a): /* PDPortDataReal */
11261 case(0x802b): /* PDPortDataCheck */
11262 case(0x802d): /* Expected PDSyncData for one subslot with SyncID value 0 for PTCPoverRTA */
11263 case(0x802e): /* Expected PDSyncData for one subslot with SyncID value 0 for PTCPoverRTC */
11264 case(0x802f): /* PDPortDataAdjust */
11265 case(0x8030): /* IsochronousModeData for one subslot */
11266 case(0x8031): /* Expected PDSyncData for one subslot with SyncID value 1 */
11281 case(0x8040): /* Expected PDSyncData for one subslot with SyncID value 2 ... 30 */
11296 case(0x804f): /* Expected PDSyncData for one subslot with SyncID value 31 */
11297 case(0x8072): /* PDPortStatistic for one subslot */
11298 case(0xc000): /* ExpectedIdentificationData for one slot */
11299 case(0xc001): /* RealIdentificationData for one slot */
11300 case(0xc00a): /* Diagnosis in channel coding for one slot */
11301 case(0xc00b): /* Diagnosis in all codings for one slot */
11302 case(0xc00c): /* Diagnosis, Maintenance, Qualified and Status for one slot */
11304 case(0xe000): /* ExpectedIdentificationData for one AR */
11305 case(0xe001): /* RealIdentificationData for one AR */
11306 case(0xe00a): /* Diagnosis in channel decoding for one AR */
11307 case(0xe00b): /* Diagnosis in all codings for one AR */
11308 case(0xe00c): /* Diagnosis, Maintenance, Qualified and Status for one AR */
11309 case(0xe030): /* IsochronousModeData for one AR */
11310 case(0xE060): /* RS_GetEvent (using RecordDataRead service) */
11311 case(0xf000): /* RealIdentificationData for one API */
11312 case(0xf00a): /* Diagnosis in channel decoding for one API */
11313 case(0xf00b): /* Diagnosis in all codings for one API */
11314 case(0xf00c): /* Diagnosis, Maintenance, Qualified and Status for one API */
11315 case(0xf80c): /* Diagnosis, Maintenance, Qualified and Status for one device */
11316 case(0xf841): /* PDRealData */
11317 case(0xf842): /* PDExpectedData */
11318 offset = dissect_blocks(tvb, offset, pinfo, tree, drep);
11321 offset = dissect_pn_undecoded(tvb, offset, pinfo, tree, u32RecDataLen);
11328 /* dissect a PN-IO read response */
11330 dissect_IPNIO_Read_resp(tvbuff_t *tvb, int offset,
11331 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
11333 guint16 u16Index = 0;
11334 guint32 u32RecDataLen = 0;
11335 pnio_ar_t *ar = NULL;
11337 offset = dissect_IPNIO_resp_header(tvb, offset, pinfo, tree, di, drep);
11339 /* IODReadHeader */
11340 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
11342 /* RecordDataRead */
11343 if (u32RecDataLen != 0) {
11344 offset = dissect_RecordDataRead(tvb, offset, pinfo, tree, drep, u16Index, u32RecDataLen);
11348 pnio_ar_info(tvb, pinfo, tree, ar);
11354 /* F-Parameter record data object */
11356 dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset,
11357 packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16Index, wmem_list_frame_t *frame)
11359 proto_item *f_item;
11360 proto_tree *f_tree;
11361 proto_item *flags1_item;
11362 proto_tree *flags1_tree;
11363 proto_item *flags2_item;
11364 proto_tree *flags2_tree;
11369 guint32 ipar_crc = 0;
11371 guint8 prm_flag1_chck_seq;
11372 guint8 prm_flag1_chck_ipar;
11373 guint8 prm_flag1_sil;
11374 guint8 prm_flag1_crc_len;
11375 guint8 prm_flag1_crc_seed;
11376 guint8 prm_flag1_reserved;
11378 guint8 prm_flag2_reserved;
11379 guint8 prm_flag2_f_block_id;
11380 guint8 prm_flag2_f_par_version;
11382 conversation_t *conversation;
11383 stationInfo *station_info;
11384 ioDataObject *io_data_object;
11385 wmem_list_frame_t *frame_out;
11387 f_item = proto_tree_add_item(tree, hf_pn_io_block, tvb, offset, 0, ENC_NA);
11388 f_tree = proto_item_add_subtree(f_item, ett_pn_io_profisafe_f_parameter);
11389 proto_item_set_text(f_item, "F-Parameter: ");
11391 flags1_item = proto_tree_add_item(f_tree, hf_pn_io_ps_f_prm_flag1, tvb, offset, 1, ENC_BIG_ENDIAN);
11392 flags1_tree = proto_item_add_subtree(flags1_item, ett_pn_io_profisafe_f_parameter_prm_flag1);
11394 /* dissection of F_Prm_Flag1 */
11395 dissect_dcerpc_uint8(tvb, offset, pinfo, flags1_tree, drep,
11396 hf_pn_io_ps_f_prm_flag1_chck_seq, &prm_flag1_chck_seq);
11397 dissect_dcerpc_uint8(tvb, offset, pinfo, flags1_tree, drep,
11398 hf_pn_io_ps_f_prm_flag1_chck_ipar, &prm_flag1_chck_ipar);
11399 dissect_dcerpc_uint8(tvb, offset, pinfo, flags1_tree, drep,
11400 hf_pn_io_ps_f_prm_flag1_sil, &prm_flag1_sil);
11401 dissect_dcerpc_uint8(tvb, offset, pinfo, flags1_tree, drep,
11402 hf_pn_io_ps_f_prm_flag1_crc_len, &prm_flag1_crc_len);
11403 dissect_dcerpc_uint8(tvb, offset, pinfo, flags1_tree, drep,
11404 hf_pn_io_ps_f_prm_flag1_crc_seed, &prm_flag1_crc_seed);
11405 dissect_dcerpc_uint8(tvb, offset, pinfo, flags1_tree, drep,
11406 hf_pn_io_ps_f_prm_flag1_reserved, &prm_flag1_reserved);
11407 prm_flag1 = prm_flag1_chck_seq|prm_flag1_chck_ipar|prm_flag1_sil|prm_flag1_crc_len|prm_flag1_crc_seed|prm_flag1_reserved;
11410 flags2_item = proto_tree_add_item(f_tree, hf_pn_io_ps_f_prm_flag2, tvb, offset, 1, ENC_BIG_ENDIAN);
11411 flags2_tree = proto_item_add_subtree(flags2_item, ett_pn_io_profisafe_f_parameter_prm_flag2);
11413 /* dissection of F_Prm_Flag2 */
11414 dissect_dcerpc_uint8(tvb, offset, pinfo, flags2_tree, drep,
11415 hf_pn_io_ps_f_prm_flag2_reserved, &prm_flag2_reserved);
11416 dissect_dcerpc_uint8(tvb, offset, pinfo, flags2_tree, drep,
11417 hf_pn_io_ps_f_prm_flag2_f_block_id, &prm_flag2_f_block_id);
11418 dissect_dcerpc_uint8(tvb, offset, pinfo, flags2_tree, drep,
11419 hf_pn_io_ps_f_prm_flag2_f_par_version, &prm_flag2_f_par_version);
11420 prm_flag2 = prm_flag2_reserved|prm_flag2_f_block_id|prm_flag2_f_par_version;
11423 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, f_item, drep,
11424 hf_pn_io_ps_f_src_adr, &src_addr);
11425 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, f_item, drep,
11426 hf_pn_io_ps_f_dest_adr, &dst_addr);
11427 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, f_item, drep,
11428 hf_pn_io_ps_f_wd_time, &wd_time);
11430 /* Dissection for F_iPar_CRC: see F_Prm_Flag2 -> F_Block_ID */
11431 if( (prm_flag2_f_block_id & 0x08) && !(prm_flag2_f_block_id & 0x20) ) {
11432 offset = dissect_dcerpc_uint32(tvb, offset, pinfo, f_item, drep,
11433 hf_pn_io_ps_f_ipar_crc, &ipar_crc);
11436 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, f_item, drep,
11437 hf_pn_io_ps_f_par_crc, &par_crc);
11440 /* Differniate between ipar_crc and no_ipar_crc */
11441 if( (prm_flag2_f_block_id & 0x08) && !(prm_flag2_f_block_id & 0x20) ) { /* include ipar_crc display */
11442 col_append_fstr(pinfo->cinfo, COL_INFO,
11443 ", F-Parameter record, prm_flag1:0x%02x, prm_flag2:0x%02x, src:0x%04x,"
11444 " dst:0x%04x, wd_time:%d, ipar_crc:0x%04x, crc:0x%04x",
11445 prm_flag1, prm_flag2, src_addr, dst_addr, wd_time, ipar_crc, par_crc);
11447 proto_item_append_text(f_item, "prm_flag1:0x%02x, prm_flag2:0x%02x, src:0x%04x, dst:0x%04x, wd_time:%d, ipar_crc:0x%04x, par_crc:0x%04x",
11448 prm_flag1, prm_flag2, src_addr, dst_addr, wd_time, ipar_crc, par_crc);
11450 else { /* exclude ipar_crc display */
11451 col_append_fstr(pinfo->cinfo, COL_INFO,
11452 ", F-Parameter record, prm_flag1:0x%02x, prm_flag2:0x%02x, src:0x%04x,"
11453 " dst:0x%04x, wd_time:%d, crc:0x%04x",
11454 prm_flag1, prm_flag2, src_addr, dst_addr, wd_time, par_crc);
11456 proto_item_append_text(f_item, "prm_flag1:0x%02x, prm_flag2:0x%02x, src:0x%04x, dst:0x%04x, wd_time:%d, par_crc:0x%04x",
11457 prm_flag1, prm_flag2, src_addr, dst_addr, wd_time, par_crc);
11460 if (!pinfo->fd->flags.visited) {
11461 /* Get current conversation endpoints using MAC addresses */
11462 conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
11463 if (conversation == NULL) {
11464 conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
11467 station_info = (stationInfo*)conversation_get_proto_data(conversation, proto_pn_dcp);
11468 if (station_info != NULL) {
11469 if (frame != NULL) {
11470 io_data_object = (ioDataObject*)wmem_list_frame_data(frame);
11472 io_data_object->f_par_crc1 = par_crc;
11473 io_data_object->f_src_adr = src_addr;
11474 io_data_object->f_dest_adr = dst_addr;
11475 io_data_object->f_crc_seed = prm_flag1 & 0x40;
11476 if (!(prm_flag1 & 0x10)) {
11477 if (prm_flag1 & 0x20) {
11478 io_data_object->f_crc_len = 4;
11480 io_data_object->f_crc_len = 3;
11485 /* Find same module within output data to saved data */
11486 for (frame_out = wmem_list_head(station_info->ioobject_data_out); frame_out != NULL; frame_out = wmem_list_frame_next(frame_out)) {
11487 io_data_object = (ioDataObject*)wmem_list_frame_data(frame_out);
11488 if (u16Index == io_data_object->fParameterIndexNr && /* Check F-Parameter Indexnumber */
11489 io_data_object->profisafeSupported && /* Arrayelement has to be PS-Module */
11490 io_data_object->f_par_crc1 == 0) { /* Find following object with no f_par_crc1 */
11492 io_data_object->f_par_crc1 = par_crc;
11493 io_data_object->f_src_adr = src_addr;
11494 io_data_object->f_dest_adr = dst_addr;
11495 io_data_object->f_crc_seed = prm_flag1 & 0x40;
11496 if (!(prm_flag1 & 0x10)) {
11497 if (prm_flag1 & 0x20) {
11498 io_data_object->f_crc_len = 4;
11500 io_data_object->f_crc_len = 3;
11514 dissect_RecordDataWrite(tvbuff_t *tvb, int offset,
11515 packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16Index, guint32 u32RecDataLen)
11517 conversation_t *conversation;
11518 stationInfo *station_info;
11519 wmem_list_frame_t *frame;
11520 ioDataObject *io_data_object;
11522 const gchar *userProfile;
11523 pnio_ar_t *ar = NULL;
11526 /* Get current conversation endpoints using MAC addresses */
11527 conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
11528 if (conversation == NULL) {
11529 conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
11532 station_info = (stationInfo*)conversation_get_proto_data(conversation, proto_pn_dcp);
11533 if (station_info != NULL) {
11534 if (!pinfo->fd->flags.visited) {
11535 /* Search within the entire existing list for current input object data */
11536 for (frame = wmem_list_head(station_info->ioobject_data_in); frame != NULL; frame = wmem_list_frame_next(frame)) {
11537 io_data_object = (ioDataObject*)wmem_list_frame_data(frame);
11538 if (u16Index == io_data_object->fParameterIndexNr && /* Check F-Parameter Indexnumber */
11539 io_data_object->profisafeSupported && /* Arrayelement has to be PS-Module */
11540 io_data_object->f_par_crc1 == 0) { /* Find following object with no f_par_crc1 */
11542 return dissect_ProfiSafeParameterRequest(tvb, offset, pinfo, tree, drep, u16Index, frame);
11547 /* User clicked another time the frame to see the data -> PROFIsafe data has already been saved
11548 * Check whether the device contains an PROFIsafe supported submodule.
11551 for (frame = wmem_list_head(station_info->ioobject_data_in); frame != NULL; frame = wmem_list_frame_next(frame)) {
11552 io_data_object = (ioDataObject*)wmem_list_frame_data(frame);
11553 if (u16Index == io_data_object->fParameterIndexNr && /* Check F-Parameter Indexnumber */
11554 io_data_object->profisafeSupported) { /* Arrayelement has to be PS-Module */
11556 return dissect_ProfiSafeParameterRequest(tvb, offset, pinfo, tree, drep, u16Index, frame);
11560 for (frame = wmem_list_head(station_info->ioobject_data_out); frame != NULL; frame = wmem_list_frame_next(frame)) {
11561 io_data_object = (ioDataObject*)wmem_list_frame_data(frame);
11562 if (u16Index == io_data_object->fParameterIndexNr && /* Check F-Parameter Indexnumber */
11563 io_data_object->profisafeSupported) { /* Arrayelement has to be PS-Module */
11565 return dissect_ProfiSafeParameterRequest(tvb, offset, pinfo, tree, drep, u16Index, frame);
11571 /* user specified format? */
11572 if (u16Index < 0x8000) {
11573 return dissect_pn_user_data(tvb, offset, pinfo, tree, u32RecDataLen, "User Specified Data");
11576 /* profidrive parameter request */
11577 if (u16Index == 0xb02e || u16Index == 0xb02f) {
11578 return dissect_ProfiDriveParameterRequest(tvb, offset, pinfo, tree, drep);
11581 /* "reserved for profiles"? */
11582 userProfile = indexReservedForProfiles(u16Index);
11583 if (userProfile != NULL) {
11584 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, u32RecDataLen, userProfile);
11588 /* see: pn_io_index */
11589 switch (u16Index) {
11590 case(0x8020): /* PDIRSubframeData */
11591 case(0x801e): /* SubstituteValues for one subslot */
11592 case(0x802b): /* PDPortDataCheck for one subslot */
11593 case(0x802c): /* PDirData for one subslot */
11594 case(0x802d): /* Expected PDSyncData for one subslot with SyncID value 0 for PTCPoverRTA */
11595 case(0x802e): /* Expected PDSyncData for one subslot with SyncID value 0 for PTCPoverRTC */
11596 case(0x802f): /* PDPortDataAdjust for one subslot */
11597 case(0x8030): /* IsochronousModeData for one subslot */
11598 case(0x8051): /* PDInterfaceMrpDataCheck for one subslot */
11599 case(0x8052): /* PDInterfaceMrpDataAdjust for one subslot */
11600 case(0x8053): /* PDPortMrpDataAdjust for one subslot */
11601 case(0x8061): /* PDPortFODataCheck for one subslot */
11602 case(0x8062): /* PDPortFODataAdjust for one subslot */
11603 case(0x8070): /* PDNCDataCheck for one subslot */
11604 case(0x8071): /* PDInterfaceAdjust */
11605 case(0x8090): /* PDInterfaceFSUDataAdjust */
11606 case(0x80B0): /* CombinedObjectContainer*/
11607 case(0x80CF): /* RS_AdjustObserver */
11608 case(0xe030): /* IsochronousModeData for one AR */
11609 case(0xe050): /* FastStartUp data for one AR */
11610 case(0xe061): /* RS_AckEvent (using RecordDataWrite service) */
11611 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
11614 offset = dissect_pn_undecoded(tvb, offset, pinfo, tree, u32RecDataLen);
11620 #define PN_IO_MAX_RECURSION_DEPTH 100
11623 dissect_IODWriteReq(tvbuff_t *tvb, int offset,
11624 packet_info *pinfo, proto_tree *tree, guint8 *drep, pnio_ar_t **ar, guint recursion_count)
11626 guint16 u16Index = 0;
11627 guint32 u32RecDataLen = 0;
11629 if (++recursion_count >= PN_IO_MAX_RECURSION_DEPTH) {
11630 proto_tree_add_expert(tree, pinfo, &ei_pn_io_max_recursion_depth_reached,
11632 return tvb_captured_length(tvb);
11635 /* IODWriteHeader */
11636 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, ar);
11638 /* IODWriteMultipleReq? */
11639 if (u16Index == 0xe040) {
11640 while (tvb_captured_length_remaining(tvb, offset) > 0) {
11641 offset = dissect_IODWriteReq(tvb, offset, pinfo, tree, drep, ar, recursion_count++);
11644 tvbuff_t *new_tvb = tvb_new_subset_length(tvb, offset, u32RecDataLen);
11645 /* RecordDataWrite */
11646 offset += dissect_RecordDataWrite(new_tvb, 0, pinfo, tree, drep, u16Index, u32RecDataLen);
11649 switch (offset % 4) {
11659 default: /* will not execute because of the line preceding the switch */
11667 /* dissect a PN-IO write request */
11669 dissect_IPNIO_Write_rqst(tvbuff_t *tvb, int offset,
11670 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
11672 pnio_ar_t *ar = NULL;
11673 guint recursion_count = 0;
11675 offset = dissect_IPNIO_rqst_header(tvb, offset, pinfo, tree, di, drep);
11677 offset = dissect_IODWriteReq(tvb, offset, pinfo, tree, drep, &ar, recursion_count);
11680 pnio_ar_info(tvb, pinfo, tree, ar);
11689 dissect_IODWriteRes(tvbuff_t *tvb, int offset,
11690 packet_info *pinfo, proto_tree *tree, guint8 *drep)
11692 guint16 u16Index = 0;
11693 guint32 u32RecDataLen;
11694 pnio_ar_t *ar = NULL;
11697 /* IODWriteResHeader */
11698 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
11700 /* IODWriteMultipleRes? */
11701 if (u16Index == 0xe040) {
11702 while (tvb_captured_length_remaining(tvb, offset) > 0) {
11703 offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
11708 pnio_ar_info(tvb, pinfo, tree, ar);
11715 /* dissect a PN-IO write response */
11717 dissect_IPNIO_Write_resp(tvbuff_t *tvb, int offset,
11718 packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
11721 offset = dissect_IPNIO_resp_header(tvb, offset, pinfo, tree, di, drep);
11723 offset = dissect_IODWriteRes(tvb, offset, pinfo, tree, drep);
11729 /* dissect the IOxS (IOCS, IOPS) field */
11731 dissect_PNIO_IOxS(tvbuff_t *tvb, int offset,
11732 packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, int hfindex)
11737 proto_item *ioxs_item;
11738 proto_tree *ioxs_tree;
11740 u8IOxS = tvb_get_guint8(tvb, offset);
11742 /* add ioxs subtree */
11743 ioxs_item = proto_tree_add_uint(tree, hfindex, tvb, offset, 1, u8IOxS);
11744 proto_item_append_text(ioxs_item,
11746 (u8IOxS & 0x01) ? "another IOxS follows " : "",
11747 (u8IOxS & 0x80) ? "good" : "bad");
11748 ioxs_tree = proto_item_add_subtree(ioxs_item, ett_pn_io_ioxs);
11750 proto_tree_add_uint(ioxs_tree, hf_pn_io_ioxs_datastate, tvb, offset, 1, u8IOxS);
11751 proto_tree_add_uint(ioxs_tree, hf_pn_io_ioxs_instance, tvb, offset, 1, u8IOxS);
11752 proto_tree_add_uint(ioxs_tree, hf_pn_io_ioxs_res14, tvb, offset, 1, u8IOxS);
11753 proto_tree_add_uint(ioxs_tree, hf_pn_io_ioxs_extension, tvb, offset, 1, u8IOxS);
11760 /* dissect a PN-IO Cyclic Service Data Unit (on top of PN-RT protocol) */
11762 dissect_PNIO_C_SDU(tvbuff_t *tvb, int offset,
11763 packet_info *pinfo, proto_tree *tree, guint8 *drep _U_)
11765 proto_tree *data_tree = NULL;
11766 /* gint iTotalLen = 0; */
11767 /* gint iSubFrameLen = 0; */
11769 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PNIO");
11772 proto_item *data_item;
11773 data_item = proto_tree_add_protocol_format(tree, proto_pn_io, tvb, offset, tvb_captured_length(tvb),
11774 "PROFINET IO Cyclic Service Data Unit: %u bytes", tvb_captured_length(tvb));
11775 data_tree = proto_item_add_subtree(data_item, ett_pn_io_rtc);
11778 /*dissect_dcerpc_uint16(tvb, offset, pinfo, data_tree, drep, hf_pn_io_packedframe_SFCRC, &u16SFCRC);*/
11779 if (dissect_CSF_SDU_heur(tvb, pinfo, data_tree, NULL))
11780 return(tvb_captured_length(tvb));
11782 /* XXX - dissect the remaining data */
11783 /* this will be one or more DataItems followed by an optional GAP and RTCPadding */
11784 /* as we don't have the required context information to dissect the specific DataItems, */
11785 /* this will be tricky :-( */
11786 /* actual: there may be an IOxS but most case there isn't so better display a data-stream */
11787 /* offset = dissect_PNIO_IOxS(tvb, offset, pinfo, data_tree, drep, hf_pn_io_ioxs); */
11788 offset = dissect_pn_user_data(tvb, offset, pinfo, tree, tvb_captured_length_remaining(tvb, offset),
11789 "User Data (including GAP and RTCPadding)");
11795 /* dissect a PN-IO RTA PDU (on top of PN-RT protocol) */
11797 dissect_PNIO_RTA(tvbuff_t *tvb, int offset,
11798 packet_info *pinfo, proto_tree *tree, guint8 *drep)
11800 guint16 u16AlarmDstEndpoint;
11801 guint16 u16AlarmSrcEndpoint;
11803 guint8 u8PDUVersion;
11804 guint8 u8WindowSize;
11806 guint16 u16SendSeqNum;
11807 guint16 u16AckSeqNum;
11808 guint16 u16VarPartLen;
11809 int start_offset = offset;
11810 guint16 u16Index = 0;
11811 guint32 u32RecDataLen;
11812 pnio_ar_t *ar = NULL;
11815 proto_item *rta_item;
11816 proto_tree *rta_tree;
11818 proto_item *sub_item;
11819 proto_tree *sub_tree;
11822 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PNIO-AL");
11824 rta_item = proto_tree_add_protocol_format(tree, proto_pn_io, tvb, offset, tvb_captured_length(tvb),
11825 "PROFINET IO Alarm");
11826 rta_tree = proto_item_add_subtree(rta_item, ett_pn_io_rta);
11828 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, rta_tree, drep,
11829 hf_pn_io_alarm_dst_endpoint, &u16AlarmDstEndpoint);
11830 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, rta_tree, drep,
11831 hf_pn_io_alarm_src_endpoint, &u16AlarmSrcEndpoint);
11833 col_append_fstr(pinfo->cinfo, COL_INFO, ", Src: 0x%x, Dst: 0x%x",
11834 u16AlarmSrcEndpoint, u16AlarmDstEndpoint);
11837 sub_item = proto_tree_add_item(rta_tree, hf_pn_io_pdu_type, tvb, offset, 1, ENC_NA);
11838 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_pdu_type);
11839 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
11840 hf_pn_io_pdu_type_type, &u8PDUType);
11842 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
11843 hf_pn_io_pdu_type_version, &u8PDUVersion);
11844 u8PDUVersion >>= 4;
11845 proto_item_append_text(sub_item, ", Type: %s, Version: %u",
11846 val_to_str(u8PDUType, pn_io_pdu_type, "Unknown"),
11849 /* additional flags */
11850 sub_item = proto_tree_add_item(rta_tree, hf_pn_io_add_flags, tvb, offset, 1, ENC_NA);
11851 sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_add_flags);
11852 dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
11853 hf_pn_io_window_size, &u8WindowSize);
11854 u8WindowSize &= 0x0F;
11855 offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
11856 hf_pn_io_tack, &u8Tack);
11858 proto_item_append_text(sub_item, ", Window Size: %u, Tack: %u",
11859 u8WindowSize, u8Tack);
11861 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, rta_tree, drep,
11862 hf_pn_io_send_seq_num, &u16SendSeqNum);
11863 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, rta_tree, drep,
11864 hf_pn_io_ack_seq_num, &u16AckSeqNum);
11865 offset = dissect_dcerpc_uint16(tvb, offset, pinfo, rta_tree, drep,
11866 hf_pn_io_var_part_len, &u16VarPartLen);
11868 switch ( u8PDUType & 0x0F) {
11869 case(1): /* Data-RTA */
11870 col_append_str(pinfo->cinfo, COL_INFO, ", Data-RTA");
11871 offset = dissect_block(tvb, offset, pinfo, rta_tree, drep, &u16Index, &u32RecDataLen, &ar);
11873 case(2): /* NACK-RTA */
11874 col_append_str(pinfo->cinfo, COL_INFO, ", NACK-RTA");
11875 /* no additional data */
11877 case(3): /* ACK-RTA */
11878 col_append_str(pinfo->cinfo, COL_INFO, ", ACK-RTA");
11879 /* no additional data */
11881 case(4): /* ERR-RTA */
11882 col_append_str(pinfo->cinfo, COL_INFO, ", ERR-RTA");
11883 offset = dissect_PNIO_status(tvb, offset, pinfo, rta_tree, drep);
11886 offset = dissect_pn_undecoded(tvb, offset, pinfo, tree, tvb_captured_length(tvb));
11889 proto_item_set_len(rta_item, offset - start_offset);
11895 /* possibly dissect a PN-IO related PN-RT packet */
11897 dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
11900 guint8 drep_data = 0;
11901 guint8 *drep = &drep_data;
11902 guint8 u8CBAVersion;
11903 /* the sub tvb will NOT contain the frame_id here! */
11904 guint16 u16FrameID = GPOINTER_TO_UINT(data);
11905 heur_dtbl_entry_t *hdtbl_entry;
11908 * In case the packet is a protocol encoded in the basic PNIO transport stream,
11909 * give that protocol a chance to make a heuristic dissection, before we continue
11910 * to dissect it as a normal PNIO packet.
11912 if (dissector_try_heuristic(heur_pn_subdissector_list, tvb, pinfo, tree, &hdtbl_entry, NULL))
11915 u8CBAVersion = tvb_get_guint8 (tvb, 0);
11917 /* is this a (none DFP) PNIO class 3 data packet? */
11918 /* frame id must be in valid range (cyclic Real-Time, class=3) */
11919 if ((u16FrameID >= 0x0100 && u16FrameID <= 0x06FF) || /* RTC3 non redundant */
11920 (u16FrameID >= 0x700 && u16FrameID <= 0x0fff)) { /* RTC3 redundant */
11921 dissect_PNIO_C_SDU(tvb, 0, pinfo, tree, drep);
11925 /* The following range is reserved for following developments */
11926 /* frame id must be in valid range (Reserved) and
11927 * first byte (CBA version field) has to be != 0x11 */
11928 if (u16FrameID >= 0x1000 && u16FrameID <= 0x7fff && u8CBAVersion != 0x11) {
11929 dissect_PNIO_C_SDU(tvb, 0, pinfo, tree, drep);
11933 /* is this a PNIO class 1 data packet? */
11934 /* frame id must be in valid range (cyclic Real-Time, class=1) and
11935 * first byte (CBA version field) has to be != 0x11 */
11936 if (u16FrameID >= 0x8000 && u16FrameID < 0xbfff && u8CBAVersion != 0x11) {
11937 dissect_PNIO_C_SDU_RTC1(tvb, 0, pinfo, tree, drep);
11941 /* is this a PNIO class 1 (legacy) data packet? */
11942 /* frame id must be in valid range (cyclic Real-Time, class=1, legacy) and
11943 * first byte (CBA version field) has to be != 0x11 */
11944 if (u16FrameID >= 0xc000 && u16FrameID < 0xfbff && u8CBAVersion != 0x11) {
11945 dissect_PNIO_C_SDU_RTC1(tvb, 0, pinfo, tree, drep);
11949 /* is this a PNIO high priority alarm packet? */
11950 if (u16FrameID == 0xfc01) {
11951 col_set_str(pinfo->cinfo, COL_INFO, "Alarm High");
11953 dissect_PNIO_RTA(tvb, 0, pinfo, tree, drep);
11957 /* is this a PNIO low priority alarm packet? */
11958 if (u16FrameID == 0xfe01) {
11959 col_set_str(pinfo->cinfo, COL_INFO, "Alarm Low");
11961 dissect_PNIO_RTA(tvb, 0, pinfo, tree, drep);
11965 /* this PN-RT packet doesn't seem to be PNIO specific */
11972 pn_io_ar_conv_valid(packet_info *pinfo)
11974 void* profinet_type = p_get_proto_data(pinfo->pool, pinfo, proto_pn_io, 0);
11976 return ((profinet_type != NULL) && (GPOINTER_TO_UINT(profinet_type) == 10));
11980 pn_io_ar_conv_filter(packet_info *pinfo)
11982 pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0);
11983 void* profinet_type = p_get_proto_data(pinfo->pool, pinfo, proto_pn_io, 0);
11985 address controllermac_addr, devicemac_addr;
11987 if ((profinet_type == NULL) || (GPOINTER_TO_UINT(profinet_type) != 10) || (ar == NULL)) {
11991 set_address(&controllermac_addr, AT_ETHER, 6, ar->controllermac);
11992 set_address(&devicemac_addr, AT_ETHER, 6, ar->devicemac);
11994 buf = g_strdup_printf(
11995 "pn_io.ar_uuid == %s || " /* ARUUID */
11996 "(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s) || " /* Alarm CR (contr -> dev) */
11997 "(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s)", /* Alarm CR (dev -> contr) */
11998 guid_to_str(pinfo->pool, (const e_guid_t*) &ar->aruuid),
11999 ar->controlleralarmref, address_to_str(pinfo->pool, &controllermac_addr),
12000 ar->devicealarmref, address_to_str(pinfo->pool, &devicemac_addr));
12005 pn_io_ar_conv_data_filter(packet_info *pinfo)
12007 pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0);
12008 void* profinet_type = p_get_proto_data(pinfo->pool, pinfo, proto_pn_io, 0);
12009 char *buf, *controllermac_str, *devicemac_str, *guid_str;
12010 address controllermac_addr, devicemac_addr;
12012 if ((profinet_type == NULL) || (GPOINTER_TO_UINT(profinet_type) != 10) || (ar == NULL)) {
12016 set_address(&controllermac_addr, AT_ETHER, 6, ar->controllermac);
12017 set_address(&devicemac_addr, AT_ETHER, 6, ar->devicemac);
12019 controllermac_str = address_to_str(pinfo->pool, &controllermac_addr);
12020 devicemac_str = address_to_str(pinfo->pool, &devicemac_addr);
12021 guid_str = guid_to_str(pinfo->pool, (const e_guid_t*) &ar->aruuid);
12022 if (ar->arType == 0x0010) /* IOCARSingle using RT_CLASS_3 */
12024 buf = g_strdup_printf(
12025 "pn_io.ar_uuid == %s || " /* ARUUID */
12026 "(pn_rt.frame_id == 0x%x) || (pn_rt.frame_id == 0x%x) || "
12027 "(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s) || " /* Alarm CR (contr -> dev) */
12028 "(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s)", /* Alarm CR (dev -> contr) */
12030 ar->inputframeid, ar->outputframeid,
12031 ar->controlleralarmref, controllermac_str,
12032 ar->devicealarmref, devicemac_str);
12036 buf = g_strdup_printf(
12037 "pn_io.ar_uuid == %s || " /* ARUUID */
12038 "(pn_rt.frame_id == 0x%x && eth.src == %s && eth.dst == %s) || " /* Input CR && dev MAC -> contr MAC */
12039 "(pn_rt.frame_id == 0x%x && eth.src == %s && eth.dst == %s) || " /* Output CR && contr MAC -> dev MAC */
12040 "(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s) || " /* Alarm CR (contr -> dev) */
12041 "(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s)", /* Alarm CR (dev -> contr) */
12043 ar->inputframeid, devicemac_str, controllermac_str,
12044 ar->outputframeid, controllermac_str, devicemac_str,
12045 ar->controlleralarmref, controllermac_str,
12046 ar->devicealarmref, devicemac_str);
12053 /* the PNIO dcerpc interface table */
12054 static dcerpc_sub_dissector pn_io_dissectors[] = {
12055 { 0, "Connect", dissect_IPNIO_rqst, dissect_IPNIO_resp },
12056 { 1, "Release", dissect_IPNIO_rqst, dissect_IPNIO_resp },
12057 { 2, "Read", dissect_IPNIO_rqst, dissect_IPNIO_Read_resp },
12058 { 3, "Write", dissect_IPNIO_Write_rqst, dissect_IPNIO_Write_resp },
12059 { 4, "Control", dissect_IPNIO_rqst, dissect_IPNIO_resp },
12060 { 5, "Read Implicit", dissect_IPNIO_rqst, dissect_IPNIO_Read_resp },
12061 { 0, NULL, NULL, NULL }
12066 pnio_cleanup(void) {
12067 g_list_free(pnio_ars);
12073 proto_register_pn_io (void)
12075 static hf_register_info hf[] = {
12077 { "Operation", "pn_io.opnum",
12078 FT_UINT16, BASE_DEC, NULL, 0x0,
12081 { &hf_pn_io_reserved16,
12082 { "Reserved", "pn_io.reserved16",
12083 FT_UINT16, BASE_HEX, NULL, 0x0,
12087 { "Array", "pn_io.array",
12088 FT_NONE, BASE_NONE, NULL, 0x0,
12091 { &hf_pn_io_status,
12092 { "Status", "pn_io.status",
12093 FT_NONE, BASE_NONE, NULL, 0x0,
12096 { &hf_pn_io_args_max,
12097 { "ArgsMaximum", "pn_io.args_max",
12098 FT_UINT32, BASE_DEC, NULL, 0x0,
12101 { &hf_pn_io_args_len,
12102 { "ArgsLength", "pn_io.args_len",
12103 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
12106 { &hf_pn_io_array_max_count,
12107 { "MaximumCount", "pn_io.array_max_count",
12108 FT_UINT32, BASE_DEC, NULL, 0x0,
12111 { &hf_pn_io_array_offset,
12112 { "Offset", "pn_io.array_offset",
12113 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
12116 { &hf_pn_io_array_act_count,
12117 { "ActualCount", "pn_io.array_act_count",
12118 FT_UINT32, BASE_DEC, NULL, 0x0,
12122 { &hf_pn_io_ar_data,
12123 { "ARDATA for AR:", "pn_io.ar_data",
12124 FT_NONE, BASE_NONE, 0x0, 0x0,
12127 { &hf_pn_io_ar_type,
12128 { "ARType", "pn_io.ar_type",
12129 FT_UINT16, BASE_HEX, VALS(pn_io_ar_type), 0x0,
12132 { &hf_pn_io_cminitiator_macadd,
12133 { "CMInitiatorMacAdd", "pn_io.cminitiator_mac_add",
12134 FT_ETHER, BASE_NONE, 0x0, 0x0,
12137 { &hf_pn_io_cminitiator_objectuuid,
12138 { "CMInitiatorObjectUUID", "pn_io.cminitiator_uuid",
12139 FT_GUID, BASE_NONE, 0x0, 0x0,
12142 { &hf_pn_io_parameter_server_objectuuid,
12143 { "ParameterServerObjectUUID", "pn_io.parameter_server_objectuuid",
12144 FT_GUID, BASE_NONE, 0x0, 0x0,
12147 { &hf_pn_io_ar_properties,
12148 { "ARProperties", "pn_io.ar_properties",
12149 FT_UINT32, BASE_HEX, NULL, 0x0,
12152 { &hf_pn_io_ar_properties_state,
12153 { "State", "pn_io.ar_properties.state",
12154 FT_UINT32, BASE_HEX, VALS(pn_io_arproperties_state), 0x00000007,
12157 { &hf_pn_io_ar_properties_supervisor_takeover_allowed,
12158 { "SupervisorTakeoverAllowed", "pn_io.ar_properties.supervisor_takeover_allowed",
12159 FT_UINT32, BASE_HEX, VALS(pn_io_arproperties_supervisor_takeover_allowed), 0x00000008,
12162 { &hf_pn_io_ar_properties_parametrization_server,
12163 { "ParametrizationServer", "pn_io.ar_properties.parametrization_server",
12164 FT_UINT32, BASE_HEX, VALS(pn_io_arproperties_parametrization_server), 0x00000010,
12167 { &hf_pn_io_artype_req,
12168 { "ARType", "pn_io.artype_req",
12169 FT_STRING, BASE_NONE, NULL, 0x0,
12171 { &hf_pn_io_ar_properties_companion_ar,
12172 { "CompanionAR", "pn_io.ar_properties.companion_ar",
12173 FT_UINT32, BASE_HEX, VALS(pn_io_arproperties_companion_ar), 0x00000600,
12176 { &hf_pn_io_ar_properties_achnowledge_companion_ar,
12177 { "AcknowledgeCompanionAR", "pn_io.ar_properties.acknowledge_companion_ar",
12178 FT_UINT32, BASE_HEX, VALS(pn_io_arproperties_acknowldege_companion_ar), 0x00000800,
12181 { &hf_pn_io_ar_properties_reserved,
12182 { "Reserved", "pn_io.ar_properties.reserved",
12183 FT_UINT32, BASE_HEX, NULL, 0x1FFFF000,
12186 { &hf_pn_io_ar_properties_combined_object_container_with_legacy_startupmode,
12187 { "CombinedObjectContainer", "pn_io.ar_properties.combined_object_container",
12188 FT_UINT32, BASE_HEX, VALS(pn_io_arproperties_combined_object_container_with_legacy_startupmode), 0x20000000,
12191 { &hf_pn_io_ar_properties_combined_object_container_with_advanced_startupmode,
12192 { "CombinedObjectContainer", "pn_io.ar_properties.combined_object_container",
12193 FT_UINT32, BASE_HEX, VALS(pn_io_arproperties_combined_object_container_with_advanced_startupmode), 0x20000000,
12196 { &hf_pn_io_arproperties_StartupMode,
12197 { "StartupMode", "pn_io.ar_properties.StartupMode",
12198 FT_UINT32, BASE_HEX, VALS(pn_io_arpropertiesStartupMode), 0x40000000,
12201 { &hf_pn_io_ar_properties_pull_module_alarm_allowed,
12202 { "PullModuleAlarmAllowed", "pn_io.ar_properties.pull_module_alarm_allowed",
12203 FT_UINT32, BASE_HEX, VALS(pn_io_arproperties_pull_module_alarm_allowed), 0x80000000,
12206 { &hf_pn_RedundancyInfo,
12207 { "RedundancyInfo.EndPoint", "pn_io.srl_data.redundancyInfo",
12208 FT_UINT16, BASE_HEX, VALS(pn_io_RedundancyInfo), 0x0000003,
12211 { &hf_pn_RedundancyInfo_reserved,
12212 { "RedundancyInfo.reserved", "pn_io.srl_data.redundancyInfoReserved",
12213 FT_UINT16, BASE_HEX, NULL, 0xFFFFFFFC,
12216 { &hf_pn_io_number_of_ARDATAInfo,
12217 { "ARDataInfo.NumberOfEntries", "pn_io.number_of_ARDATAInfo",
12218 FT_UINT16, BASE_DEC, NULL, 0x0,
12222 { &hf_pn_io_cminitiator_activitytimeoutfactor,
12223 { "CMInitiatorActivityTimeoutFactor", "pn_io.cminitiator_activitytimeoutfactor",
12224 FT_UINT16, BASE_DEC, NULL, 0x0,
12226 }, /* XXX - special values */
12227 { &hf_pn_io_cminitiator_udprtport,
12228 { "CMInitiatorUDPRTPort", "pn_io.cminitiator_udprtport",
12229 FT_UINT16, BASE_HEX, NULL, 0x0,
12231 }, /* XXX - special values */
12232 { &hf_pn_io_station_name_length,
12233 { "StationNameLength", "pn_io.station_name_length",
12234 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
12237 { &hf_pn_io_cminitiator_station_name,
12238 { "CMInitiatorStationName", "pn_io.cminitiator_station_name",
12239 FT_STRING, BASE_NONE, NULL, 0x0,
12242 { &hf_pn_io_parameter_server_station_name,
12243 { "ParameterServerStationName", "pn_io.parameter_server_station_name",
12244 FT_STRING, BASE_NONE, NULL, 0x0,
12247 { &hf_pn_io_cmresponder_macadd,
12248 { "CMResponderMacAdd", "pn_io.cmresponder_macadd",
12249 FT_ETHER, BASE_NONE, 0x0, 0x0,
12252 { &hf_pn_io_cmresponder_udprtport,
12253 { "CMResponderUDPRTPort", "pn_io.cmresponder_udprtport",
12254 FT_UINT16, BASE_HEX, NULL, 0x0,
12256 }, /* XXX - special values */
12257 { &hf_pn_io_number_of_iocrs,
12258 { "NumberOfIOCRs", "pn_io.number_of_iocrs",
12259 FT_UINT16, BASE_DEC, NULL, 0x0,
12262 { &hf_pn_io_iocr_tree,
12263 { "IOCR", "pn_io.iocr_tree",
12264 FT_NONE, BASE_NONE, NULL, 0x0,
12267 { &hf_pn_io_iocr_type,
12268 { "IOCRType", "pn_io.iocr_type",
12269 FT_UINT16, BASE_HEX, VALS(pn_io_iocr_type), 0x0,
12272 { &hf_pn_io_iocr_reference,
12273 { "IOCRReference", "pn_io.iocr_reference",
12274 FT_UINT16, BASE_HEX, NULL, 0x0,
12277 { &hf_pn_io_iocr_SubframeOffset,
12278 { "-> SubframeOffset", "pn_io.subframe_offset",
12279 FT_UINT8, BASE_DEC_HEX, NULL, 0x0,
12282 { &hf_pn_io_iocr_SubframeData,
12283 { "SubframeData", "pn_io.subframe_data",
12284 FT_UINT32, BASE_HEX, NULL, 0x0,
12287 { &hf_pn_io_RedundancyDataHoldFactor,
12288 { "RedundancyDataHoldFactor", "pn_io.RedundancyDataHoldFactor",
12289 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_RedundancyDataHoldFactor), 0x0,
12292 { &hf_pn_io_sr_properties,
12293 { "SRProperties", "pn_io.sr_properties",
12294 FT_UINT32, BASE_HEX, NULL, 0x0,
12297 { &hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_0,
12298 { "InputValidOnBackupAR", "pn_io.sr_properties.InputValidOnBackupAR",
12299 FT_BOOLEAN, 32, TFS(&tfs_pn_io_sr_properties_BackupAR_with_SRProperties_Mode_0), 0x01,
12302 { &hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_1,
12303 { "InputValidOnBackupAR", "pn_io.sr_properties.InputValidOnBackupAR",
12304 FT_BOOLEAN, 32, TFS(&tfs_pn_io_sr_properties_BackupAR_with_SRProperties_Mode_1), 0x01,
12307 { &hf_pn_io_sr_properties_Reserved_1,
12308 { "Reserved_1", "pn_io.sr_properties.Reserved_1",
12309 FT_BOOLEAN, 32, TFS(&tfs_pn_io_sr_properties_Reserved1), 0x00000002,
12312 { &hf_pn_io_sr_properties_Mode,
12313 { "Mode", "pn_io.sr_properties.Mode",
12314 FT_BOOLEAN, 32, TFS(&tfs_pn_io_sr_properties_Mode), 0x00000004,
12317 { &hf_pn_io_sr_properties_Reserved_2,
12318 { "Reserved_2", "pn_io.sr_properties.Reserved_2",
12319 FT_UINT32, BASE_HEX, NULL, 0x0000FFF8,
12322 { &hf_pn_io_sr_properties_Reserved_3,
12323 { "Reserved_3", "pn_io.sr_properties.Reserved_3",
12324 FT_UINT32, BASE_HEX, NULL, 0xFFFF0000,
12327 { &hf_pn_io_arvendor_strucidentifier_if0_low,
12328 { "APStructureIdentifier: Vendor specific", "pn_io.structidentifier_api_0_low",
12329 FT_UINT16, BASE_HEX, NULL, 0x0,
12332 { &hf_pn_io_arvendor_strucidentifier_if0_high,
12333 { "APStructureIdentifier: Administrative number for common profiles", "pn_io.structidentifier_api_0_high",
12334 FT_UINT16, BASE_HEX, NULL, 0x0,
12337 { &hf_pn_io_arvendor_strucidentifier_if0_is8000,
12338 { "APStructureIdentifier: Extended identification rules", "pn_io.tructidentifier_api_0_is8000",
12339 FT_UINT16, BASE_HEX, NULL, 0x0,
12342 { &hf_pn_io_arvendor_strucidentifier_not0,
12343 { "APStructureIdentifier: Administrative number for application profiles", "pn_io.tructidentifier_api_not_0",
12344 FT_UINT16, BASE_HEX, NULL, 0x0,
12348 { "LT", "pn_io.lt",
12349 FT_UINT16, BASE_HEX, NULL, 0x0,
12352 { &hf_pn_io_iocr_properties,
12353 { "IOCRProperties", "pn_io.iocr_properties",
12354 FT_UINT32, BASE_HEX, NULL, 0x0,
12357 { &hf_pn_io_iocr_properties_rtclass,
12358 { "RTClass", "pn_io.iocr_properties.rtclass",
12359 FT_UINT32, BASE_HEX, VALS(pn_io_iocr_properties_rtclass), 0x0000000F,
12362 { &hf_pn_io_iocr_properties_reserved_1,
12363 { "Reserved1", "pn_io.iocr_properties.reserved1",
12364 FT_UINT32, BASE_HEX, NULL, 0x00000FF0,
12367 { &hf_pn_io_iocr_properties_media_redundancy,
12368 { "MediaRedundancy", "pn_io.iocr_properties.media_redundancy",
12369 FT_UINT32, BASE_HEX, VALS(pn_io_iocr_properties_media_redundancy), 0x00000800,
12372 { &hf_pn_io_iocr_properties_reserved_2,
12373 { "Reserved2", "pn_io.iocr_properties.reserved2",
12374 FT_UINT32, BASE_HEX, NULL, 0x00FFF000,
12377 { &hf_pn_io_iocr_properties_reserved_3,
12378 { "Reserved3", "pn_io.iocr_properties.reserved3",
12379 FT_UINT32, BASE_HEX, NULL, 0xF000000,
12382 { &hf_pn_io_iocr_properties_fast_forwarding_mac_adr,
12383 { "FastForwardingMACAdr", "pn_io.iocr_properties.fast_forwarding_mac_adr",
12384 FT_UINT32, BASE_HEX, NULL, 0x20000000,
12387 { &hf_pn_io_iocr_properties_distributed_subframe_watchdog,
12388 { "DistributedSubFrameWatchDog", "pn_io.iocr_properties.distributed_subframe_watchdog",
12389 FT_UINT32, BASE_HEX, NULL, 0x40000000,
12392 { &hf_pn_io_iocr_properties_full_subframe_structure,
12393 { "FullSubFrameStructure", "pn_io.iocr_properties.full_subframe_structure",
12394 FT_UINT32, BASE_HEX, NULL, 0x80000000,
12397 { &hf_pn_io_SFIOCRProperties,
12398 { "SFIOCRProperties", "pn_io.SFIOCRProperties",
12399 FT_UINT32, BASE_HEX, NULL, 0x0,
12402 { &hf_pn_io_DistributedWatchDogFactor,
12403 { "SFIOCRProperties.DistributedWatchDogFactor", "pn_io.SFIOCRProperties.DistributedWatchDogFactor",
12404 FT_UINT32, BASE_HEX, NULL, 0x0FF,
12407 { &hf_pn_io_RestartFactorForDistributedWD,
12408 { "SFIOCRProperties.RestartFactorForDistributedWD", "pn_io.SFIOCRProperties.RestartFactorForDistributedWD",
12409 FT_UINT32, BASE_HEX, NULL, 0xff00,
12412 { &hf_pn_io_SFIOCRProperties_DFPmode,
12413 { "SFIOCRProperties.DFPmode", "pn_io.SFIOCRProperties.DFPmode",
12414 FT_UINT32, BASE_HEX, NULL, 0xFF0000,
12417 { &hf_pn_io_SFIOCRProperties_reserved_1,
12418 { "SFIOCRProperties.reserved_1", "pn_io.SFIOCRProperties.reserved_1",
12419 FT_UINT32, BASE_HEX, NULL, 0x0F000000,
12422 { &hf_pn_io_SFIOCRProperties_reserved_2,
12423 { "SFIOCRProperties.reserved_2", "pn_io.SFIOCRProperties.reserved_2",
12424 FT_UINT32, BASE_HEX, NULL, 0x010000000,
12427 { &hf_pn_io_SFIOCRProperties_DFPType,
12428 { "SFIOCRProperties.DFPType", "pn_io.SFIOCRProperties.DFPType",
12429 FT_UINT32, BASE_HEX, VALS(pn_io_SFIOCRProperties_DFPType_vals), 0x020000000,
12432 { &hf_pn_io_SFIOCRProperties_DFPRedundantPathLayout,
12433 { "SFIOCRProperties.DFPRedundantPathLayout", "pn_io.SFIOCRProperties.DFPRedundantPathLayout",
12434 FT_UINT32, BASE_HEX, VALS(pn_io_DFPRedundantPathLayout_decode), 0x040000000,
12437 { &hf_pn_io_SFIOCRProperties_SFCRC16,
12438 { "SFIOCRProperties.SFCRC16", "pn_io.SFIOCRProperties.SFCRC16",
12439 FT_UINT32, BASE_HEX, VALS(pn_io_SFCRC16_Decode), 0x080000000,
12442 { &hf_pn_io_data_length,
12443 { "DataLength", "pn_io.data_length",
12444 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
12447 { &hf_pn_io_ir_frame_data,
12448 { "Frame data", "pn_io.ir_frame_data",
12449 FT_NONE, BASE_NONE, NULL, 0x0,
12452 { &hf_pn_io_frame_id,
12453 { "FrameID", "pn_io.frame_id",
12454 FT_UINT16, BASE_HEX, NULL, 0x0,
12457 { &hf_pn_io_send_clock_factor,
12458 { "SendClockFactor", "pn_io.send_clock_factor",
12459 FT_UINT16, BASE_DEC, NULL, 0x0,
12461 }, /* XXX - special values */
12462 { &hf_pn_io_reduction_ratio,
12463 { "ReductionRatio", "pn_io.reduction_ratio",
12464 FT_UINT16, BASE_DEC, NULL, 0x0,
12466 }, /* XXX - special values */
12468 { "Phase", "pn_io.phase",
12469 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
12472 { &hf_pn_io_sequence,
12473 { "Sequence", "pn_io.sequence",
12474 FT_UINT16, BASE_DEC, NULL, 0x0,
12477 { &hf_pn_io_frame_send_offset,
12478 { "FrameSendOffset", "pn_io.frame_send_offset",
12479 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
12482 { &hf_pn_io_frame_data_properties,
12483 { "FrameDataProperties", "pn_io.frame_data_properties",
12484 FT_UINT32, BASE_HEX, NULL, 0x0,
12487 { &hf_pn_io_frame_data_properties_forwarding_Mode,
12488 { "ForwardingMode", "pn_io.frame_data_properties_forwardingMode",
12489 FT_UINT32, BASE_HEX, VALS(hf_pn_io_frame_data_properties_forwardingMode), 0x01,
12492 { &hf_pn_io_frame_data_properties_FastForwardingMulticastMACAdd,
12493 { "FastForwardingMulticastMACAdd", "pn_io.frame_data_properties_MulticastMACAdd",
12494 FT_UINT32, BASE_HEX, VALS(hf_pn_io_frame_data_properties_FFMulticastMACAdd), 0x06,
12497 { &hf_pn_io_frame_data_properties_FragmentMode,
12498 { "FragmentationMode", "pn_io.frame_data_properties_FragMode",
12499 FT_UINT32, BASE_HEX, VALS(hf_pn_io_frame_data_properties_FragMode), 0x18,
12502 { &hf_pn_io_frame_data_properties_reserved_1,
12503 { "Reserved_1", "pn_io.frame_data.reserved_1",
12504 FT_UINT32, BASE_HEX, NULL, 0x0000FFE0,
12507 { &hf_pn_io_frame_data_properties_reserved_2,
12508 { "Reserved_2", "pn_io.frame_data.reserved_2",
12509 FT_UINT32, BASE_HEX, NULL, 0xFFFF0000,
12512 { &hf_pn_io_watchdog_factor,
12513 { "WatchdogFactor", "pn_io.watchdog_factor",
12514 FT_UINT16, BASE_DEC, NULL, 0x0,
12517 { &hf_pn_io_data_hold_factor,
12518 { "DataHoldFactor", "pn_io.data_hold_factor",
12519 FT_UINT16, BASE_DEC, NULL, 0x0,
12522 { &hf_pn_io_iocr_tag_header,
12523 { "IOCRTagHeader", "pn_io.iocr_tag_header",
12524 FT_UINT16, BASE_HEX, NULL, 0x0,
12527 { &hf_pn_io_iocr_multicast_mac_add,
12528 { "IOCRMulticastMACAdd", "pn_io.iocr_multicast_mac_add",
12529 FT_ETHER, BASE_NONE, NULL, 0x0,
12532 { &hf_pn_io_number_of_apis,
12533 { "NumberOfAPIs", "pn_io.number_of_apis",
12534 FT_UINT16, BASE_DEC, NULL, 0x0,
12537 { &hf_pn_io_number_of_io_data_objects,
12538 { "NumberOfIODataObjects", "pn_io.number_of_io_data_objects",
12539 FT_UINT16, BASE_DEC, NULL, 0x0,
12542 { &hf_pn_io_number_of_iocs,
12543 { "NumberOfIOCS", "pn_io.number_of_iocs",
12544 FT_UINT16, BASE_DEC, NULL, 0x0,
12547 { &hf_pn_io_iocs_frame_offset,
12548 { "IOCSFrameOffset", "pn_io.iocs_frame_offset",
12549 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
12552 { &hf_pn_io_alarmcr_type,
12553 { "AlarmCRType", "pn_io.alarmcr_type",
12554 FT_UINT16, BASE_HEX, VALS(pn_io_alarmcr_type), 0x0,
12557 { &hf_pn_io_alarmcr_properties,
12558 { "AlarmCRProperties", "pn_io.alarmcr_properties",
12559 FT_UINT32, BASE_HEX, NULL, 0x0,
12562 { &hf_pn_io_alarmcr_properties_priority,
12563 { "priority", "pn_io.alarmcr_properties.priority",
12564 FT_UINT32, BASE_HEX, VALS(pn_io_alarmcr_properties_priority), 0x00000001,
12567 { &hf_pn_io_alarmcr_properties_transport,
12568 { "Transport", "pn_io.alarmcr_properties.transport",
12569 FT_UINT32, BASE_HEX, VALS(pn_io_alarmcr_properties_transport), 0x00000002,
12572 { &hf_pn_io_alarmcr_properties_reserved,
12573 { "Reserved", "pn_io.alarmcr_properties.reserved",
12574 FT_UINT32, BASE_HEX, NULL, 0xFFFFFFFC,
12577 { &hf_pn_io_rta_timeoutfactor,
12578 { "RTATimeoutFactor", "pn_io.rta_timeoutfactor",
12579 FT_UINT16, BASE_DEC, NULL, 0x0,
12581 }, /* XXX - special values */
12582 { &hf_pn_io_rta_retries,
12583 { "RTARetries", "pn_io.rta_retries",
12584 FT_UINT16, BASE_DEC, NULL, 0x0,
12586 }, /* XXX - only values 3 - 15 allowed */
12587 { &hf_pn_io_localalarmref,
12588 { "LocalAlarmReference", "pn_io.localalarmref",
12589 FT_UINT16, BASE_HEX, NULL, 0x0,
12591 }, /* XXX - special values */
12592 { &hf_pn_io_remotealarmref,
12593 { "RemoteAlarmReference", "pn_io.remotealarmref",
12594 FT_UINT16, BASE_HEX, NULL, 0x0,
12596 }, /* XXX - special values */
12597 { &hf_pn_io_maxalarmdatalength,
12598 { "MaxAlarmDataLength", "pn_io.maxalarmdatalength",
12599 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
12601 }, /* XXX - only values 200 - 1432 allowed */
12602 { &hf_pn_io_alarmcr_tagheaderhigh,
12603 { "AlarmCRTagHeaderHigh", "pn_io.alarmcr_tagheaderhigh",
12604 FT_UINT16, BASE_HEX, NULL, 0x0,
12606 }, /* XXX - 16 bitfield! */
12607 { &hf_pn_io_alarmcr_tagheaderlow,
12608 { "AlarmCRTagHeaderLow", "pn_io.alarmcr_tagheaderlow",
12609 FT_UINT16, BASE_HEX, NULL, 0x0,
12611 }, /* XXX - 16 bitfield!*/
12612 { &hf_pn_io_api_tree,
12613 { "API", "pn_io.api_tree",
12614 FT_NONE, BASE_NONE, NULL, 0x0,
12617 { &hf_pn_io_module_tree,
12618 { "Module", "pn_io.module_tree",
12619 FT_NONE, BASE_NONE, NULL, 0x0,
12622 { &hf_pn_io_submodule_tree,
12623 { "Submodule", "pn_io.submodule_tree",
12624 FT_NONE, BASE_NONE, NULL, 0x0,
12627 { &hf_pn_io_io_data_object,
12628 { "IODataObject", "pn_io.io_data_object",
12629 FT_NONE, BASE_NONE, NULL, 0x0,
12632 { &hf_pn_io_io_data_object_frame_offset,
12633 { "IODataObjectFrameOffset", "pn_io.io_data_object.frame_offset",
12634 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
12638 { "IOCS", "pn_io.io_cs",
12639 FT_NONE, BASE_NONE, NULL, 0x0,
12642 { &hf_pn_io_substitutionmode,
12643 { "Substitutionmode", "pn_io.substitutionmode",
12644 FT_UINT16, BASE_HEX, VALS(pn_io_substitutionmode), 0x0,
12647 { &hf_pn_io_IRData_uuid,
12648 { "IRDataUUID", "pn_io.IRData_uuid",
12649 FT_GUID, BASE_NONE, NULL, 0x0,
12652 { &hf_pn_io_ar_uuid,
12653 { "ARUUID", "pn_io.ar_uuid",
12654 FT_GUID, BASE_NONE, NULL, 0x0,
12657 { &hf_pn_io_target_ar_uuid,
12658 { "TargetARUUID", "pn_io.target_ar_uuid",
12659 FT_GUID, BASE_NONE, NULL, 0x0,
12662 { &hf_pn_io_ar_discriminator,
12663 { "Discriminator", "pn_io.ar_discriminator",
12664 FT_BYTES, BASE_NONE, NULL, 0x0,
12667 { &hf_pn_io_ar_configid,
12668 { "ConfigID", "pn_io.ar_configid",
12669 FT_BYTES, BASE_NONE, NULL, 0x0,
12672 { &hf_pn_io_ar_arnumber,
12673 { "ARnumber", "pn_io.ar_arnumber",
12674 FT_UINT16, BASE_HEX, VALS(pn_io_ar_arnumber), 0x0007,
12677 { &hf_pn_io_ar_arresource,
12678 { "ARresource", "pn_io.ar_arnumber",
12679 FT_UINT16, BASE_HEX, VALS(pn_io_ar_arresource), 0x0018,
12682 { &hf_pn_io_ar_arreserved,
12683 { "ARreserved", "pn_io.ar_arreserved",
12684 FT_UINT16, BASE_HEX, NULL, 0xFFE0,
12687 { &hf_pn_io_ar_selector,
12688 { "Selector", "pn_io.ar_selector",
12689 FT_UINT16, BASE_HEX, NULL, 0x0,
12693 { "API", "pn_io.api",
12694 FT_UINT32, BASE_HEX, NULL, 0x0,
12697 { &hf_pn_io_slot_nr,
12698 { "SlotNumber", "pn_io.slot_nr",
12699 FT_UINT16, BASE_HEX, NULL, 0x0,
12702 { &hf_pn_io_subslot_nr,
12703 { "SubslotNumber", "pn_io.subslot_nr",
12704 FT_UINT16, BASE_HEX, NULL, 0x0,
12708 { "Index", "pn_io.index",
12709 FT_UINT16, BASE_HEX, VALS(pn_io_index), 0x0,
12712 { &hf_pn_io_seq_number,
12713 { "SeqNumber", "pn_io.seq_number",
12714 FT_UINT16, BASE_DEC, NULL, 0x0,
12717 { &hf_pn_io_record_data_length,
12718 { "RecordDataLength", "pn_io.record_data_length",
12719 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
12722 { &hf_pn_io_add_val1,
12723 { "AdditionalValue1", "pn_io.add_val1",
12724 FT_UINT16, BASE_DEC, NULL, 0x0,
12727 { &hf_pn_io_add_val2,
12728 { "AdditionalValue2", "pn_io.add_val2",
12729 FT_UINT16, BASE_DEC, NULL, 0x0,
12732 { &hf_pn_io_block_header,
12733 { "BlockHeader", "pn_io.block_header",
12734 FT_NONE, BASE_NONE, NULL, 0x0,
12737 { &hf_pn_io_block_type,
12738 { "BlockType", "pn_io.block_type",
12739 FT_UINT16, BASE_HEX, VALS(pn_io_block_type), 0x0,
12742 { &hf_pn_io_block_length,
12743 { "BlockLength", "pn_io.block_length",
12744 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
12747 { &hf_pn_io_block_version_high,
12748 { "BlockVersionHigh", "pn_io.block_version_high",
12749 FT_UINT8, BASE_DEC, NULL, 0x0,
12752 { &hf_pn_io_block_version_low,
12753 { "BlockVersionLow", "pn_io.block_version_low",
12754 FT_UINT8, BASE_DEC, NULL, 0x0,
12757 { &hf_pn_io_sessionkey,
12758 { "SessionKey", "pn_io.session_key",
12759 FT_UINT16, BASE_DEC, NULL, 0x0,
12762 { &hf_pn_io_control_command,
12763 { "ControlCommand", "pn_io.control_command",
12764 FT_UINT16, BASE_HEX, NULL, 0x0,
12767 { &hf_pn_io_control_command_reserved,
12768 { "ControlBlockProperties.reserved", "pn_io.control_properties_reserved",
12769 FT_UINT16, BASE_HEX, NULL, 0x0,
12772 { &hf_pn_io_control_command_prmend,
12773 { "PrmEnd", "pn_io.control_command.prmend",
12774 FT_UINT16, BASE_DEC, NULL, 0x0001,
12777 { &hf_pn_io_control_command_applready,
12778 { "ApplicationReady", "pn_io.control_command.applready",
12779 FT_UINT16, BASE_DEC, NULL, 0x0002,
12782 { &hf_pn_io_control_command_release,
12783 { "Release", "pn_io.control_command.release",
12784 FT_UINT16, BASE_DEC, NULL, 0x0004,
12787 { &hf_pn_io_control_command_done,
12788 { "Done", "pn_io.control_command.done",
12789 FT_UINT16, BASE_DEC, NULL, 0x0008,
12792 { &hf_pn_io_control_command_ready_for_companion,
12793 { "ReadyForCompanion", "pn_io.control_command.ready_for_companion",
12794 FT_UINT16, BASE_DEC, NULL, 0x0010,
12797 { &hf_pn_io_control_command_ready_for_rt_class3,
12798 { "ReadyForRT Class 3", "pn_io.control_command.ready_for_rt_class3",
12799 FT_UINT16, BASE_DEC, NULL, 0x0020,
12802 { &hf_pn_io_control_command_prmbegin,
12803 { "PrmBegin", "pn_io.control_command.prmbegin",
12804 FT_UINT16, BASE_DEC, VALS(pn_io_control_properties_prmbegin_vals), 0x0040,
12807 { &hf_pn_io_control_command_reserved_7_15,
12808 { "ControlBlockProperties.reserved", "pn_io.control_properties_reserved_7_15",
12809 FT_UINT16, BASE_HEX, NULL, 0x0FF80,
12812 { &hf_pn_io_control_block_properties,
12813 { "ControlBlockProperties", "pn_io.control_block_properties",
12814 FT_UINT16, BASE_HEX, VALS(pn_io_control_properties_vals), 0x0,
12817 { &hf_pn_io_control_block_properties_applready,
12818 { "ControlBlockProperties", "pn_io.control_block_properties.appl_ready",
12819 FT_UINT16, BASE_HEX, NULL, 0x0,
12822 { &hf_pn_io_control_block_properties_applready0,
12823 { "ApplicationReady", "pn_io.control_block_properties.appl_ready0",
12824 FT_UINT16, BASE_HEX, VALS(pn_io_control_properties_application_ready_vals), 0x0001,
12827 { &hf_pn_io_SubmoduleListEntries,
12828 { "NumberOfEntries", "pn_io.SubmoduleListEntries",
12829 FT_UINT16, BASE_DEC, NULL, 0x0,
12832 { &hf_pn_io_error_code,
12833 { "ErrorCode", "pn_io.error_code",
12834 FT_UINT8, BASE_HEX, VALS(pn_io_error_code), 0x0,
12837 { &hf_pn_io_error_decode,
12838 { "ErrorDecode", "pn_io.error_decode",
12839 FT_UINT8, BASE_HEX, VALS(pn_io_error_decode), 0x0,
12842 { &hf_pn_io_error_code1,
12843 { "ErrorCode1", "pn_io.error_code1",
12844 FT_UINT8, BASE_DEC, VALS(pn_io_error_code1), 0x0,
12847 { &hf_pn_io_error_code2,
12848 { "ErrorCode2", "pn_io.error_code2",
12849 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2), 0x0,
12852 { &hf_pn_io_error_code1_pniorw,
12853 { "ErrorCode1", "pn_io.error_code1",
12854 FT_UINT8, BASE_DEC, VALS(pn_io_error_code1_pniorw), 0x0,
12857 { &hf_pn_io_error_code2_pniorw,
12858 { "ErrorCode2 for PNIORW is user specified!", "pn_io.error_code2",
12859 FT_UINT8, BASE_DEC, NULL, 0x0,
12862 { &hf_pn_io_error_code1_pnio,
12863 { "ErrorCode1", "pn_io.error_code1",
12864 FT_UINT8, BASE_DEC, VALS(pn_io_error_code1_pnio), 0x0,
12867 { &hf_pn_io_error_code2_pnio_1,
12868 { "ErrorCode2", "pn_io.error_code2",
12869 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_1), 0x0,
12872 { &hf_pn_io_error_code2_pnio_2,
12873 { "ErrorCode2", "pn_io.error_code2",
12874 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_2), 0x0,
12877 { &hf_pn_io_error_code2_pnio_3,
12878 { "ErrorCode2", "pn_io.error_code2",
12879 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_3), 0x0,
12882 { &hf_pn_io_error_code2_pnio_4,
12883 { "ErrorCode2", "pn_io.error_code2",
12884 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_4), 0x0,
12887 { &hf_pn_io_error_code2_pnio_5,
12888 { "ErrorCode2", "pn_io.error_code2",
12889 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_5), 0x0,
12892 { &hf_pn_io_error_code2_pnio_6,
12893 { "ErrorCode2", "pn_io.error_code2",
12894 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_6), 0x0,
12897 { &hf_pn_io_error_code2_pnio_7,
12898 { "ErrorCode2", "pn_io.error_code2",
12899 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_7), 0x0,
12902 { &hf_pn_io_error_code2_pnio_8,
12903 { "ErrorCode2", "pn_io.error_code2",
12904 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_8), 0x0,
12907 { &hf_pn_io_error_code2_pnio_13,
12908 { "ErrorCode2", "pn_io.error_code2",
12909 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_13), 0x0,
12912 { &hf_pn_io_error_code2_pnio_20,
12913 { "ErrorCode2", "pn_io.error_code2",
12914 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_20), 0x0,
12917 { &hf_pn_io_error_code2_pnio_21,
12918 { "ErrorCode2", "pn_io.error_code2",
12919 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_21), 0x0,
12922 { &hf_pn_io_error_code2_pnio_22,
12923 { "ErrorCode2", "pn_io.error_code2",
12924 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_22), 0x0,
12927 { &hf_pn_io_error_code2_pnio_23,
12928 { "ErrorCode2", "pn_io.error_code2",
12929 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_23), 0x0,
12932 { &hf_pn_io_error_code2_pnio_40,
12933 { "ErrorCode2", "pn_io.error_code2",
12934 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_40), 0x0,
12937 { &hf_pn_io_error_code2_pnio_60,
12938 { "ErrorCode2", "pn_io.error_code2",
12939 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_60), 0x0,
12942 { &hf_pn_io_error_code2_pnio_61,
12943 { "ErrorCode2", "pn_io.error_code2",
12944 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_61), 0x0,
12947 { &hf_pn_io_error_code2_pnio_62,
12948 { "ErrorCode2", "pn_io.error_code2",
12949 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_62), 0x0,
12952 { &hf_pn_io_error_code2_pnio_63,
12953 { "ErrorCode2", "pn_io.error_code2",
12954 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_63), 0x0,
12957 { &hf_pn_io_error_code2_pnio_64,
12958 { "ErrorCode2", "pn_io.error_code2",
12959 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_64), 0x0,
12962 { &hf_pn_io_error_code2_pnio_65,
12963 { "ErrorCode2", "pn_io.error_code2",
12964 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_65), 0x0,
12967 { &hf_pn_io_error_code2_pnio_66,
12968 { "ErrorCode2", "pn_io.error_code2",
12969 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_66), 0x0,
12972 { &hf_pn_io_error_code2_pnio_70,
12973 { "ErrorCode2", "pn_io.error_code2",
12974 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_70), 0x0,
12977 { &hf_pn_io_error_code2_pnio_71,
12978 { "ErrorCode2", "pn_io.error_code2",
12979 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_71), 0x0,
12982 { &hf_pn_io_error_code2_pnio_72,
12983 { "ErrorCode2", "pn_io.error_code2",
12984 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_72), 0x0,
12987 { &hf_pn_io_error_code2_pnio_73,
12988 { "ErrorCode2", "pn_io.error_code2",
12989 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_73), 0x0,
12992 { &hf_pn_io_error_code2_pnio_74,
12993 { "ErrorCode2", "pn_io.error_code2",
12994 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_74), 0x0,
12997 { &hf_pn_io_error_code2_pnio_75,
12998 { "ErrorCode2", "pn_io.error_code2",
12999 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_75), 0x0,
13002 { &hf_pn_io_error_code2_pnio_76,
13003 { "ErrorCode2", "pn_io.error_code2",
13004 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_76), 0x0,
13007 { &hf_pn_io_error_code2_pnio_77,
13008 { "ErrorCode2", "pn_io.error_code2",
13009 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_77), 0x0,
13012 { &hf_pn_io_error_code2_pnio_253,
13013 { "ErrorCode2", "pn_io.error_code2",
13014 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_253), 0x0,
13017 { &hf_pn_io_error_code2_pnio_255,
13018 { "ErrorCode2", "pn_io.error_code2",
13019 FT_UINT8, BASE_DEC, VALS(pn_io_error_code2_pnio_255), 0x0,
13023 { "Block", "pn_io.block",
13024 FT_NONE, BASE_NONE, NULL, 0x0,
13027 { &hf_pn_io_alarm_type,
13028 { "AlarmType", "pn_io.alarm_type",
13029 FT_UINT16, BASE_HEX, VALS(pn_io_alarm_type), 0x0,
13032 { &hf_pn_io_alarm_specifier,
13033 { "AlarmSpecifier", "pn_io.alarm_specifier",
13034 FT_NONE, BASE_NONE, NULL, 0x0,
13037 { &hf_pn_io_alarm_specifier_sequence,
13038 { "SequenceNumber", "pn_io.alarm_specifier.sequence",
13039 FT_UINT16, BASE_HEX, NULL, 0x07FF,
13042 { &hf_pn_io_alarm_specifier_channel,
13043 { "ChannelDiagnosis", "pn_io.alarm_specifier.channel",
13044 FT_UINT16, BASE_HEX, NULL, 0x0800,
13047 { &hf_pn_io_alarm_specifier_manufacturer,
13048 { "ManufacturerSpecificDiagnosis", "pn_io.alarm_specifier.manufacturer",
13049 FT_UINT16, BASE_HEX, NULL, 0x1000,
13052 { &hf_pn_io_alarm_specifier_submodule,
13053 { "SubmoduleDiagnosisState", "pn_io.alarm_specifier.submodule",
13054 FT_UINT16, BASE_HEX, NULL, 0x2000,
13057 { &hf_pn_io_alarm_specifier_ardiagnosis,
13058 { "ARDiagnosisState", "pn_io.alarm_specifier.ardiagnosis",
13059 FT_UINT16, BASE_HEX, NULL, 0x8000,
13062 { &hf_pn_io_alarm_dst_endpoint,
13063 { "AlarmDstEndpoint", "pn_io.alarm_dst_endpoint",
13064 FT_UINT16, BASE_HEX, NULL, 0x0,
13067 { &hf_pn_io_alarm_src_endpoint,
13068 { "AlarmSrcEndpoint", "pn_io.alarm_src_endpoint",
13069 FT_UINT16, BASE_HEX, NULL, 0x0,
13072 { &hf_pn_io_pdu_type,
13073 { "PDUType", "pn_io.pdu_type",
13074 FT_NONE, BASE_NONE, NULL, 0x0,
13077 { &hf_pn_io_pdu_type_type,
13078 { "Type", "pn_io.pdu_type.type",
13079 FT_UINT8, BASE_HEX, VALS(pn_io_pdu_type), 0x0F,
13082 { &hf_pn_io_pdu_type_version,
13083 { "Version", "pn_io.pdu_type.version",
13084 FT_UINT8, BASE_HEX, NULL, 0xF0,
13087 { &hf_pn_io_add_flags,
13088 { "AddFlags", "pn_io.add_flags",
13089 FT_NONE, BASE_NONE, NULL, 0x0,
13092 { &hf_pn_io_window_size,
13093 { "WindowSize", "pn_io.window_size",
13094 FT_UINT8, BASE_DEC, NULL, 0x0F,
13098 { "TACK", "pn_io.tack",
13099 FT_UINT8, BASE_HEX, NULL, 0xF0,
13102 { &hf_pn_io_send_seq_num,
13103 { "SendSeqNum", "pn_io.send_seq_num",
13104 FT_UINT16, BASE_HEX, NULL, 0x0,
13107 { &hf_pn_io_ack_seq_num,
13108 { "AckSeqNum", "pn_io.ack_seq_num",
13109 FT_UINT16, BASE_HEX, NULL, 0x0,
13112 { &hf_pn_io_var_part_len,
13113 { "VarPartLen", "pn_io.var_part_len",
13114 FT_UINT16, BASE_HEX, NULL, 0x0,
13117 { &hf_pn_io_module_ident_number,
13118 { "ModuleIdentNumber", "pn_io.module_ident_number",
13119 FT_UINT32, BASE_HEX, NULL, 0x0,
13122 { &hf_pn_io_submodule_ident_number,
13123 { "SubmoduleIdentNumber", "pn_io.submodule_ident_number",
13124 FT_UINT32, BASE_HEX, NULL, 0x0,
13128 { &hf_pn_io_number_of_modules,
13129 { "NumberOfModules", "pn_io.number_of_modules",
13130 FT_UINT16, BASE_HEX, NULL, 0x0,
13133 { &hf_pn_io_module_properties,
13134 { "ModuleProperties", "pn_io.module_properties",
13135 FT_UINT16, BASE_HEX, NULL, 0x0,
13138 { &hf_pn_io_module_state,
13139 { "ModuleState", "pn_io.module_state",
13140 FT_UINT16, BASE_HEX, VALS(pn_io_module_state), 0x0,
13143 { &hf_pn_io_number_of_submodules,
13144 { "NumberOfSubmodules", "pn_io.number_of_submodules",
13145 FT_UINT16, BASE_DEC, NULL, 0x0,
13149 { &hf_pn_io_submodule_properties,
13150 { "SubmoduleProperties", "pn_io.submodule_properties",
13151 FT_UINT16, BASE_HEX, NULL, 0x0,
13154 { &hf_pn_io_submodule_properties_type,
13155 { "Type", "pn_io.submodule_properties.type",
13156 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_properties_type), 0x0003,
13159 { &hf_pn_io_submodule_properties_shared_input,
13160 { "SharedInput", "pn_io.submodule_properties.shared_input",
13161 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_properties_shared_input), 0x0004,
13164 { &hf_pn_io_submodule_properties_reduce_input_submodule_data_length,
13165 { "ReduceInputSubmoduleDataLength", "pn_io.submodule_properties.reduce_input_submodule_data_length",
13166 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_properties_reduce_input_submodule_data_length), 0x0008,
13169 { &hf_pn_io_submodule_properties_reduce_output_submodule_data_length,
13170 { "ReduceOutputSubmoduleDataLength", "pn_io.submodule_properties.reduce_output_submodule_data_length",
13171 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_properties_reduce_output_submodule_data_length), 0x0010,
13174 { &hf_pn_io_submodule_properties_discard_ioxs,
13175 { "DiscardIOXS", "pn_io.submodule_properties.discard_ioxs",
13176 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_properties_discard_ioxs), 0x0020,
13179 { &hf_pn_io_submodule_properties_reserved,
13180 { "Reserved", "pn_io.submodule_properties.reserved",
13181 FT_UINT16, BASE_HEX, NULL, 0xFFC0,
13184 { &hf_pn_io_submodule_state,
13185 { "SubmoduleState", "pn_io.submodule_state",
13186 FT_UINT16, BASE_HEX, NULL, 0x0,
13189 { &hf_pn_io_submodule_state_format_indicator,
13190 { "FormatIndicator", "pn_io.submodule_state.format_indicator",
13191 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_state_format_indicator), 0x8000,
13194 { &hf_pn_io_submodule_state_add_info,
13195 { "AddInfo", "pn_io.submodule_state.add_info",
13196 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_state_add_info), 0x0007,
13199 { &hf_pn_io_submodule_state_qualified_info,
13200 { "QualifiedInfo", "pn_io.submodule_state.qualified_info",
13201 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_state_qualified_info), 0x0008,
13204 { &hf_pn_io_submodule_state_maintenance_required,
13205 { "MaintenanceRequired", "pn_io.submodule_state.maintenance_required",
13206 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_state_maintenance_required), 0x0010,
13209 { &hf_pn_io_submodule_state_maintenance_demanded,
13210 { "MaintenanceDemanded", "pn_io.submodule_state.maintenance_demanded",
13211 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_state_maintenance_demanded), 0x0020,
13214 { &hf_pn_io_submodule_state_diag_info,
13215 { "DiagInfo", "pn_io.submodule_state.diag_info",
13216 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_state_diag_info), 0x0040,
13219 { &hf_pn_io_submodule_state_ar_info,
13220 { "ARInfo", "pn_io.submodule_state.ar_info",
13221 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_state_ar_info), 0x0780,
13224 { &hf_pn_io_submodule_state_ident_info,
13225 { "IdentInfo", "pn_io.submodule_state.ident_info",
13226 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_state_ident_info), 0x7800,
13229 { &hf_pn_io_submodule_state_detail,
13230 { "Detail", "pn_io.submodule_state.detail",
13231 FT_UINT16, BASE_HEX, VALS(pn_io_submodule_state_detail), 0x7FFF,
13234 { &hf_pn_io_data_description_tree,
13235 { "DataDescription", "pn_io.data_description_tree",
13236 FT_NONE, BASE_NONE, NULL, 0x0,
13239 { &hf_pn_io_data_description,
13240 { "DataDescription", "pn_io.data_description",
13241 FT_UINT16, BASE_HEX, VALS(pn_io_data_description), 0x0,
13244 { &hf_pn_io_submodule_data_length,
13245 { "SubmoduleDataLength", "pn_io.submodule_data_length",
13246 FT_UINT16, BASE_DEC, NULL, 0x0,
13249 { &hf_pn_io_length_iocs,
13250 { "LengthIOCS", "pn_io.length_iocs",
13251 FT_UINT16, BASE_DEC, NULL, 0x0,
13254 { &hf_pn_io_length_iops,
13255 { "LengthIOPS", "pn_io.length_iops",
13256 FT_UINT16, BASE_DEC, NULL, 0x0,
13261 { "IOCS", "pn_io.ioxs",
13262 FT_UINT8, BASE_HEX, NULL, 0x0,
13266 { "IOPS", "pn_io.iops",
13267 FT_UINT8, BASE_HEX, NULL, 0x0,
13270 { &hf_pn_io_ioxs_extension,
13271 { "Extension (1:another IOxS follows/0:no IOxS follows)", "pn_io.ioxs.extension",
13272 FT_UINT8, BASE_HEX, NULL, 0x01,
13275 { &hf_pn_io_ioxs_res14,
13276 { "Reserved (should be zero)", "pn_io.ioxs.res14",
13277 FT_UINT8, BASE_HEX, NULL, 0x1E,
13280 { &hf_pn_io_ioxs_instance,
13281 { "Instance (only valid, if DataState is bad)",
13282 "pn_io.ioxs.instance", FT_UINT8, BASE_HEX, VALS(pn_io_ioxs),
13283 0x60, NULL, HFILL }
13285 { &hf_pn_io_ioxs_datastate,
13286 { "DataState (1:good/0:bad)", "pn_io.ioxs.datastate",
13287 FT_UINT8, BASE_HEX, NULL, 0x80,
13290 { &hf_pn_io_address_resolution_properties,
13291 { "AddressResolutionProperties", "pn_io.address_resolution_properties",
13292 FT_UINT32, BASE_HEX, NULL, 0x0,
13295 { &hf_pn_io_mci_timeout_factor,
13296 { "MCITimeoutFactor", "pn_io.mci_timeout_factor",
13297 FT_UINT16, BASE_DEC, NULL, 0x0,
13300 { &hf_pn_io_provider_station_name,
13301 { "ProviderStationName", "pn_io.provider_station_name",
13302 FT_STRING, BASE_NONE, NULL, 0x0,
13305 { &hf_pn_io_user_structure_identifier,
13306 { "UserStructureIdentifier", "pn_io.user_structure_identifier",
13307 FT_UINT16, BASE_HEX, VALS(pn_io_user_structure_identifier), 0x0,
13310 { &hf_pn_io_user_structure_identifier_manf,
13311 { "UserStructureIdentifier manufacturer specific", "pn_io.user_structure_identifier_manf",
13312 FT_UINT16, BASE_HEX, NULL, 0x0,
13315 { &hf_pn_io_ar_properties_reserved_1,
13316 { "Reserved_1", "pn_io.ar_properties.reserved_1",
13317 FT_UINT32, BASE_HEX, NULL, 0x000000E0,
13319 { &hf_pn_io_ar_properties_device_access,
13320 { "DeviceAccess", "pn_io.ar_properties.device_access",
13321 FT_UINT32, BASE_HEX, VALS(pn_io_arproperties_DeviceAccess), 0x00000100,
13323 { &hf_pn_io_subframe_data,
13324 { "SubFrameData", "pn_io.subframe_data",
13325 FT_UINT32, BASE_HEX, NULL, 0x0,
13328 { &hf_pn_io_subframe_reserved2,
13329 { "Reserved1", "pn_io.subframe_data.reserved2",
13330 FT_UINT32, BASE_HEX, NULL, 0xFFFF0000,
13333 { &hf_pn_io_subframe_data_length,
13334 { "DataLength", "pn_io.subframe_data.data_length",
13335 FT_UINT32, BASE_HEX, NULL, 0x0000FF00,
13338 { &hf_pn_io_subframe_reserved1,
13339 { "Reserved1", "pn_io.subframe_data.reserved1",
13340 FT_UINT32, BASE_HEX, NULL, 0x00000080,
13343 { &hf_pn_io_subframe_data_position,
13344 { "DataPosition", "pn_io.subframe_data.position",
13345 FT_UINT32, BASE_HEX, NULL, 0x0000007F,
13348 { &hf_pn_io_subframe_data_reserved1,
13349 { "Reserved1", "pn_io.subframe_data.reserved_1",
13350 FT_UINT32, BASE_HEX, NULL, 0x00000080,
13353 { &hf_pn_io_subframe_data_reserved2,
13354 { "Reserved1", "pn_io.subframe_data.reserved_2",
13355 FT_UINT32, BASE_HEX, NULL, 0xFFFF0000,
13358 { &hf_pn_io_channel_number,
13359 { "ChannelNumber", "pn_io.channel_number",
13360 FT_UINT16, BASE_HEX, NULL, 0x0,
13364 { &hf_pn_io_channel_properties,
13365 { "ChannelProperties", "pn_io.channel_properties",
13366 FT_UINT16, BASE_HEX, NULL, 0x0,
13369 { &hf_pn_io_channel_properties_type,
13370 { "Type", "pn_io.channel_properties.type",
13371 FT_UINT16, BASE_HEX, VALS(pn_io_channel_properties_type), 0x00FF,
13374 { &hf_pn_io_channel_properties_accumulative,
13375 { "Accumulative", "pn_io.channel_properties.accumulative",
13376 FT_UINT16, BASE_HEX, VALS(pn_io_channel_properties_accumulative_vals), 0x0100,
13379 { &hf_pn_io_NumberOfSubframeBlocks,
13380 { "NumberOfSubframeBlocks", "pn_io.NumberOfSubframeBlocks",
13381 FT_UINT16, BASE_DEC, NULL, 0x0,
13384 { &hf_pn_io_channel_properties_maintenance,
13385 { "Maintenance (Severity)", "pn_io.channel_properties.maintenance",
13386 FT_UINT16, BASE_HEX, VALS(pn_io_channel_properties_maintenance), 0x0600,
13389 { &hf_pn_io_channel_properties_specifier,
13390 { "Specifier", "pn_io.channel_properties.specifier",
13391 FT_UINT16, BASE_HEX, VALS(pn_io_channel_properties_specifier), 0x1800,
13394 { &hf_pn_io_channel_properties_direction,
13395 { "Direction", "pn_io.channel_properties.direction",
13396 FT_UINT16, BASE_HEX, VALS(pn_io_channel_properties_direction), 0xE000,
13400 { &hf_pn_io_channel_error_type,
13401 { "ChannelErrorType", "pn_io.channel_error_type",
13402 FT_UINT16, BASE_HEX, VALS(pn_io_channel_error_type), 0x0,
13405 { &hf_pn_io_ext_channel_error_type0,
13406 { "ExtChannelErrorType", "pn_io.ext_channel_error_type0",
13407 FT_UINT16, BASE_HEX, VALS(pn_io_ext_channel_error_type0), 0x0,
13410 { &hf_pn_io_ext_channel_error_type0x8000,
13411 { "ExtChannelErrorType", "pn_io.ext_channel_error_type0800",
13412 FT_UINT16, BASE_HEX, VALS(pn_io_ext_channel_error_type0x8000), 0x0,
13415 { &hf_pn_io_ext_channel_error_type0x8001,
13416 { "ExtChannelErrorType", "pn_io.ext_channel_error_type8001",
13417 FT_UINT16, BASE_HEX, VALS(pn_io_ext_channel_error_type0x8001), 0x0,
13420 { &hf_pn_io_ext_channel_error_type0x8002,
13421 { "ExtChannelErrorType", "pn_io.ext_channel_error_type8002",
13422 FT_UINT16, BASE_HEX, VALS(pn_io_ext_channel_error_type0x8002), 0x0,
13425 { &hf_pn_io_ext_channel_error_type0x8003,
13426 { "ExtChannelErrorType", "pn_io.ext_channel_error_type8003",
13427 FT_UINT16, BASE_HEX, VALS(pn_io_ext_channel_error_type0x8003), 0x0,
13430 { &hf_pn_io_ext_channel_error_type0x8004,
13431 { "ExtChannelErrorType", "pn_io.ext_channel_error_type8004",
13432 FT_UINT16, BASE_HEX, VALS(pn_io_ext_channel_error_type0x8004), 0x0,
13435 { &hf_pn_io_ext_channel_error_type0x8005,
13436 { "ExtChannelErrorType", "pn_io.ext_channel_error_type8005",
13437 FT_UINT16, BASE_HEX, VALS(pn_io_ext_channel_error_type0x8005), 0x0,
13440 { &hf_pn_io_ext_channel_error_type0x8007,
13441 { "ExtChannelErrorType", "pn_io.ext_channel_error_type8007",
13442 FT_UINT16, BASE_HEX, VALS(pn_io_ext_channel_error_type0x8007), 0x0,
13445 { &hf_pn_io_ext_channel_error_type0x8008,
13446 { "ExtChannelErrorType", "pn_io.ext_channel_error_type8008",
13447 FT_UINT16, BASE_HEX, VALS(pn_io_ext_channel_error_type0x8008), 0x0,
13450 { &hf_pn_io_ext_channel_error_type0x800A,
13451 { "ExtChannelErrorType", "pn_io.ext_channel_error_type800A",
13452 FT_UINT16, BASE_HEX, VALS(pn_io_ext_channel_error_type0x800A), 0x0,
13455 { &hf_pn_io_ext_channel_error_type0x800B,
13456 { "ExtChannelErrorType", "pn_io.ext_channel_error_type800B",
13457 FT_UINT16, BASE_HEX, VALS(pn_io_ext_channel_error_type0x800B), 0x0,
13460 { &hf_pn_io_ext_channel_error_type0x800C,
13461 { "ExtChannelErrorType", "pn_io.ext_channel_error_type800C",
13462 FT_UINT16, BASE_HEX, VALS(pn_io_ext_channel_error_type0x800C), 0x0,
13465 { &hf_pn_io_ext_channel_error_type,
13466 { "ExtChannelErrorType", "pn_io.ext_channel_error_type",
13467 FT_UINT16, BASE_HEX, NULL, 0x0,
13470 { &hf_pn_io_ext_channel_add_value,
13471 { "ExtChannelAddValue", "pn_io.ext_channel_add_value",
13472 FT_UINT32, BASE_HEX, NULL, 0x0,
13475 { &hf_pn_io_ptcp_subdomain_id,
13476 { "PTCPSubdomainID", "pn_io.ptcp_subdomain_id",
13477 FT_GUID, BASE_NONE, NULL, 0x0,
13480 { &hf_pn_io_ir_data_id,
13481 { "IRDataID", "pn_io.ir_data_id",
13482 FT_GUID, BASE_NONE, NULL, 0x0,
13485 { &hf_pn_io_max_bridge_delay,
13486 { "MaxBridgeDelay", "pn_io.max_bridge_delay",
13487 FT_UINT32, BASE_DEC, NULL, 0x0,
13490 { &hf_pn_io_number_of_ports,
13491 { "NumberOfPorts", "pn_io.number_of_ports",
13492 FT_UINT32, BASE_DEC, NULL, 0x0,
13495 { &hf_pn_io_max_port_tx_delay,
13496 { "MaxPortTxDelay", "pn_io.max_port_tx_delay",
13497 FT_UINT32, BASE_DEC, NULL, 0x0,
13500 { &hf_pn_io_max_port_rx_delay,
13501 { "MaxPortRxDelay", "pn_io.max_port_rx_delay",
13502 FT_UINT32, BASE_DEC, NULL, 0x0,
13505 { &hf_pn_io_max_line_rx_delay,
13506 { "MaxLineRxDelay", "pn_io.max_line_rx_delay",
13507 FT_UINT32, BASE_DEC, NULL, 0x0,
13510 { &hf_pn_io_yellowtime,
13511 { "YellowTime", "pn_io.yellowtime",
13512 FT_UINT32, BASE_DEC, NULL, 0x0,
13515 { &hf_pn_io_reserved_interval_begin,
13516 { "ReservedIntervalBegin", "pn_io.reserved_interval_begin",
13517 FT_UINT32, BASE_DEC, NULL, 0x0,
13520 { &hf_pn_io_reserved_interval_end,
13521 { "ReservedIntervalEnd", "pn_io.reserved_interval_end",
13522 FT_UINT32, BASE_DEC, NULL, 0x0,
13525 { &hf_pn_io_pllwindow,
13526 { "PLLWindow", "pn_io.pllwindow",
13527 FT_UINT32, BASE_DEC, NULL, 0x0,
13530 { &hf_pn_io_sync_send_factor,
13531 { "SyncSendFactor", "pn_io.sync_send_factor",
13532 FT_UINT32, BASE_DEC, NULL, 0x0,
13535 { &hf_pn_io_sync_properties,
13536 { "SyncProperties", "pn_io.sync_properties",
13537 FT_UINT16, BASE_HEX, NULL, 0x0,
13540 { &hf_pn_io_sync_frame_address,
13541 { "SyncFrameAddress", "pn_io.sync_frame_address",
13542 FT_UINT16, BASE_HEX, NULL, 0x0,
13545 { &hf_pn_io_ptcp_timeout_factor,
13546 { "PTCPTimeoutFactor", "pn_io.ptcp_timeout_factor",
13547 FT_UINT16, BASE_DEC, NULL, 0x0,
13550 { &hf_pn_io_ptcp_takeover_timeout_factor,
13551 { "PTCPTakeoverTimeoutFactor", "pn_io.ptcp_takeover_timeout_factor",
13552 FT_UINT16, BASE_DEC, NULL, 0x0,
13555 { &hf_pn_io_ptcp_master_startup_time,
13556 { "PTCPMasterStartupTime", "pn_io.ptcp_master_startup_time",
13557 FT_UINT16, BASE_DEC, NULL, 0x0,
13560 { &hf_pn_io_ptcp_master_priority_1,
13561 { "PTCP_MasterPriority1", "pn_io.ptcp_master_priority_1",
13562 FT_UINT8, BASE_DEC, NULL, 0x0,
13565 { &hf_pn_io_ptcp_master_priority_2,
13566 { "PTCP_MasterPriority2", "pn_io.ptcp_master_priority_2",
13567 FT_UINT8, BASE_DEC, NULL, 0x0,
13570 { &hf_pn_io_ptcp_length_subdomain_name,
13571 { "PTCPLengthSubdomainName", "pn_io.ptcp_length_subdomain_name",
13572 FT_UINT8, BASE_DEC_HEX, NULL, 0x0,
13575 { &hf_pn_io_ptcp_subdomain_name,
13576 { "PTCPSubdomainName", "pn_io.ptcp_subdomain_name",
13577 FT_STRING, BASE_NONE, NULL, 0x0,
13580 { &hf_pn_io_MultipleInterfaceMode_NameOfDevice,
13581 { "MultipleInterfaceMode.NameOfDevice", "pn_io.MultipleInterfaceMode_NameOfDevice",
13582 FT_UINT32, BASE_HEX, VALS(pn_io_MultipleInterfaceMode_NameOfDevice), 0x01,
13585 { &hf_pn_io_MultipleInterfaceMode_reserved_1,
13586 { "MultipleInterfaceMode.Reserved_1", "pn_io.MultipleInterfaceMode_reserved_1",
13587 FT_UINT32, BASE_HEX, NULL, 0xFFFE,
13590 { &hf_pn_io_MultipleInterfaceMode_reserved_2,
13591 { "MultipleInterfaceMode.Reserved_2", "pn_io.MultipleInterfaceMode_reserved_2",
13592 FT_UINT32, BASE_HEX, NULL, 0xFFFF0000,
13595 { &hf_pn_io_pdportstatistic_counter_status,
13596 { "CounterStatus", "pn_io.CounterStatus",
13597 FT_UINT16, BASE_HEX, NULL, 0x0,
13600 { &hf_pn_io_pdportstatistic_counter_status_ifInOctets,
13601 { "CounterStatus.ifInOctets", "pn_io.CounterStatus.ifInOctets",
13602 FT_BOOLEAN, 16, TFS(&pn_io_pdportstatistic_counter_status_contents), 0x0001,
13605 { &hf_pn_io_pdportstatistic_counter_status_ifOutOctets,
13606 { "CounterStatus.ifOutOctets", "pn_io.CounterStatus.ifOutOctets",
13607 FT_BOOLEAN, 16, TFS(&pn_io_pdportstatistic_counter_status_contents), 0x0002,
13610 { &hf_pn_io_pdportstatistic_counter_status_ifInDiscards,
13611 { "CounterStatus.ifInDiscards", "pn_io.CounterStatus.ifInDiscards",
13612 FT_BOOLEAN, 16, TFS(&pn_io_pdportstatistic_counter_status_contents), 0x0004,
13615 { &hf_pn_io_pdportstatistic_counter_status_ifOutDiscards,
13616 { "CounterStatus.ifOutDiscards", "pn_io.CounterStatus.ifOutDiscards",
13617 FT_BOOLEAN, 16, TFS(&pn_io_pdportstatistic_counter_status_contents), 0x0008,
13620 { &hf_pn_io_pdportstatistic_counter_status_ifInErrors,
13621 { "CounterStatus.ifInErrors", "pn_io.CounterStatus.ifInErrors",
13622 FT_BOOLEAN, 16, TFS(&pn_io_pdportstatistic_counter_status_contents), 0x0010,
13625 { &hf_pn_io_pdportstatistic_counter_status_ifOutErrors,
13626 { "CounterStatus.ifOutErrors", "pn_io.CounterStatus.ifOutErrors",
13627 FT_BOOLEAN, 16, TFS(&pn_io_pdportstatistic_counter_status_contents), 0x0020,
13630 { &hf_pn_io_pdportstatistic_counter_status_reserved,
13631 { "CounterStatus.Reserved", "pn_io.CounterStatus.Reserved",
13632 FT_UINT16, BASE_HEX, VALS(pn_io_pdportstatistic_counter_status_reserved), 0xFFC0,
13635 { &hf_pn_io_pdportstatistic_ifInOctets,
13636 { "ifInOctets", "pn_io.ifInOctets",
13637 FT_UINT32, BASE_HEX, NULL, 0x0,
13640 { &hf_pn_io_pdportstatistic_ifOutOctets,
13641 { "ifOutOctets", "pn_io.ifOutOctets",
13642 FT_UINT32, BASE_HEX, NULL, 0x0,
13645 { &hf_pn_io_pdportstatistic_ifInDiscards,
13646 { "ifInDiscards", "pn_io.ifInDiscards",
13647 FT_UINT32, BASE_HEX, NULL, 0x0,
13650 { &hf_pn_io_pdportstatistic_ifOutDiscards,
13651 { "ifOutDiscards", "pn_io.ifOutDiscards",
13652 FT_UINT32, BASE_HEX, NULL, 0x0,
13655 { &hf_pn_io_pdportstatistic_ifInErrors,
13656 { "ifInErrors", "pn_io.ifInErrors",
13657 FT_UINT32, BASE_HEX, NULL, 0x0,
13660 { &hf_pn_io_pdportstatistic_ifOutErrors,
13661 { "ifOutErrors", "pn_io.ifOutErrors",
13662 FT_UINT32, BASE_HEX, NULL, 0x0,
13666 { &hf_pn_io_domain_boundary,
13667 { "DomainBoundary", "pn_io.domain_boundary",
13668 FT_UINT32, BASE_HEX, NULL, 0x0,
13671 { &hf_pn_io_domain_boundary_ingress,
13672 { "DomainBoundaryIngress", "pn_io.domain_boundary.ingress",
13673 FT_UINT32, BASE_HEX, NULL, 0x0,
13676 { &hf_pn_io_domain_boundary_egress,
13677 { "DomainBoundaryEgress", "pn_io.domain_boundary.egress",
13678 FT_UINT32, BASE_HEX, NULL, 0x0,
13681 { &hf_pn_io_multicast_boundary,
13682 { "MulticastBoundary", "pn_io.multicast_boundary",
13683 FT_UINT32, BASE_HEX, NULL, 0x0,
13686 { &hf_pn_io_adjust_properties,
13687 { "AdjustProperties", "pn_io.adjust_properties",
13688 FT_UINT16, BASE_HEX, NULL, 0x0,
13691 { &hf_pn_io_PreambleLength,
13692 { "Preamble Length", "pn_io.preamble_length",
13693 FT_UINT16, BASE_DEC_HEX, VALS(pn_io_preamble_length), 0x0,
13696 { &hf_pn_io_mau_type,
13697 { "MAUType", "pn_io.mau_type",
13698 FT_UINT16, BASE_HEX, VALS(pn_io_mau_type), 0x0,
13701 { &hf_pn_io_mau_type_mode,
13702 { "MAUTypeMode", "pn_io.mau_type_mode",
13703 FT_UINT16, BASE_HEX, VALS(pn_io_mau_type_mode), 0x0,
13706 { &hf_pn_io_dcp_boundary_value,
13707 { "DCPBoundary", "pn_io.dcp_boundary_value",
13708 FT_UINT32, BASE_HEX, NULL, 0x0,
13711 { &hf_pn_io_dcp_boundary_value_bit0,
13712 { "DCPBoundary", "pn_io.dcp_boundary_value_bit0",
13713 FT_UINT32, BASE_HEX, VALS(pn_io_dcp_boundary_value_bit0), 0x1,
13716 { &hf_pn_io_dcp_boundary_value_bit1,
13717 { "DCPBoundary", "pn_io.dcp_boundary_value_bit1",
13718 FT_UINT32, BASE_HEX, VALS(pn_io_dcp_boundary_value_bit1), 0x2,
13721 { &hf_pn_io_dcp_boundary_value_otherbits,
13722 { "DCPBoundary", "pn_io.dcp_boundary_value_otherbits",
13723 FT_UINT32, BASE_HEX, NULL, 0xFFFFFFFC,
13726 { &hf_pn_io_peer_to_peer_boundary_value,
13727 { "AdjustPeerToPeer-Boundary", "pn_io.peer_to_peer_boundary_value",
13728 FT_UINT32, BASE_HEX, NULL, 0x0,
13731 { &hf_pn_io_peer_to_peer_boundary_value_bit0,
13732 { "AdjustPeerToPeer-Boundary", "pn_io.peer_to_peer_boundary_value_bit0",
13733 FT_UINT32, BASE_HEX, VALS(pn_io_peer_to_peer_boundary_value_bit0), 0x1,
13736 { &hf_pn_io_peer_to_peer_boundary_value_bit1,
13737 { "AdjustPeerToPeer-Boundary", "pn_io.peer_to_peer_boundary_value_bit1",
13738 FT_UINT32, BASE_HEX, VALS(pn_io_peer_to_peer_boundary_value_bit1), 0x2,
13741 { &hf_pn_io_peer_to_peer_boundary_value_bit2,
13742 { "AdjustPeerToPeer-Boundary", "pn_io.peer_to_peer_boundary_value_bit2",
13743 FT_UINT32, BASE_HEX, VALS(pn_io_peer_to_peer_boundary_value_bit2), 0x4,
13746 { &hf_pn_io_peer_to_peer_boundary_value_otherbits,
13747 { "AdjustPeerToPeer-Boundary", "pn_io.peer_to_peer_boundary_value_otherbits",
13748 FT_UINT32, BASE_HEX, NULL, 0xFFFFFFF8,
13751 { &hf_pn_io_port_state,
13752 { "PortState", "pn_io.port_state",
13753 FT_UINT16, BASE_HEX, VALS(pn_io_port_state), 0x0,
13756 { &hf_pn_io_line_delay,
13757 { "LineDelay", "pn_io.line_delay",
13758 FT_UINT32, BASE_HEX, NULL, 0x0,
13759 "LineDelay in nanoseconds", HFILL }
13761 { &hf_pn_io_line_delay_value,
13762 { "LineDelayValue", "pn_io.line_delay_value",
13763 FT_UINT32, BASE_DEC | BASE_RANGE_STRING, RVALS(pn_io_line_delay_value), 0x7FFFFFFF,
13766 { &hf_pn_io_cable_delay_value,
13767 { "CableDelayValue", "pn_io.cable_delay_value",
13768 FT_UINT32, BASE_DEC | BASE_RANGE_STRING, RVALS(pn_io_cable_delay_value), 0x7FFFFFFF,
13771 { &hf_pn_io_line_delay_format_indicator,
13772 { "LineDelayFormatIndicator", "pn_io.line_delay_format_indicator",
13773 FT_UINT32, BASE_HEX, NULL, 0x80000000,
13774 "LineDelay FormatIndicator", HFILL }
13776 { &hf_pn_io_number_of_peers,
13777 { "NumberOfPeers", "pn_io.number_of_peers",
13778 FT_UINT8, BASE_DEC, NULL, 0x0,
13781 { &hf_pn_io_length_peer_port_id,
13782 { "LengthPeerPortID", "pn_io.length_peer_port_id",
13783 FT_UINT8, BASE_DEC_HEX, NULL, 0x0,
13786 { &hf_pn_io_peer_port_id,
13787 { "PeerPortID", "pn_io.peer_port_id",
13788 FT_STRING, BASE_NONE, NULL, 0x0,
13791 { &hf_pn_io_length_peer_chassis_id,
13792 { "LengthPeerChassisID", "pn_io.length_peer_chassis_id",
13793 FT_UINT8, BASE_DEC_HEX, NULL, 0x0,
13796 { &hf_pn_io_peer_chassis_id,
13797 { "PeerChassisID", "pn_io.peer_chassis_id",
13798 FT_STRING, BASE_NONE, NULL, 0x0,
13801 { &hf_pn_io_length_own_chassis_id,
13802 { "LengthOwnChassisID", "pn_io.length_own_chassis_id",
13803 FT_UINT8, BASE_DEC, NULL, 0x0,
13806 { &hf_pn_io_own_chassis_id,
13807 { "OwnChassisID", "pn_io.own_chassis_id",
13808 FT_STRING, BASE_NONE, NULL, 0x0,
13811 { &hf_pn_io_length_own_port_id,
13812 { "LengthOwnPortID", "pn_io.length_own_port_id",
13813 FT_UINT8, BASE_DEC_HEX, NULL, 0x0,
13816 { &hf_pn_io_own_port_id,
13817 { "OwnPortID", "pn_io.own_port_id",
13818 FT_STRING, BASE_NONE, NULL, 0x0,
13821 { &hf_pn_io_peer_macadd,
13822 { "PeerMACAddress", "pn_io.peer_macadd",
13823 FT_ETHER, BASE_NONE, NULL, 0x0,
13826 { &hf_pn_io_macadd,
13827 { "MACAddress", "pn_io.macadd",
13828 FT_ETHER, BASE_NONE, NULL, 0x0,
13831 { &hf_pn_io_media_type,
13832 { "MediaType", "pn_io.media_type",
13833 FT_UINT32, BASE_HEX, VALS(pn_io_media_type), 0x0,
13837 { &hf_pn_io_ethertype,
13838 { "Ethertype", "pn_io.ethertype",
13839 FT_UINT16, BASE_HEX, NULL, 0x0,
13842 { &hf_pn_io_rx_port,
13843 { "RXPort", "pn_io.rx_port",
13844 FT_UINT8, BASE_DEC, NULL, 0x0,
13847 { &hf_pn_io_frame_details,
13848 { "FrameDetails", "pn_io.frame_details",
13849 FT_UINT8, BASE_HEX, NULL, 0x0,
13852 { &hf_pn_io_frame_details_sync_frame,
13853 { "SyncFrame", "pn_io.frame_details.sync_frame",
13854 FT_UINT8, BASE_HEX, VALS(pn_io_frame_details_sync_master_vals), 0x03,
13857 { &hf_pn_io_frame_details_meaning_frame_send_offset,
13858 { "Meaning", "pn_io.frame_details.meaning_frame_send_offset",
13859 FT_UINT8, BASE_HEX, VALS(pn_io_frame_details_meaning_frame_send_offset_vals), 0x0C,
13862 { &hf_pn_io_frame_details_reserved,
13863 { "Reserved", "pn_io.frame_details.reserved",
13864 FT_UINT8, BASE_HEX, NULL, 0xF0,
13867 { &hf_pn_io_nr_of_tx_port_groups,
13868 { "NumberOfTxPortGroups", "pn_io.nr_of_tx_port_groups",
13869 FT_UINT8, BASE_DEC, NULL, 0x0,
13872 { &hf_pn_io_TxPortGroupProperties,
13873 { "TxPortGroupProperties", "pn_io.tx_port_properties",
13874 FT_UINT8, BASE_HEX, NULL, 0x0,
13877 { &hf_pn_io_TxPortGroupProperties_bit0,
13878 { "TxPortLocal", "pn_io.tx_port_properties_bit_0",
13879 FT_UINT8, BASE_HEX, VALS(pn_io_txgroup_state), 0x01,
13882 { &hf_pn_io_TxPortGroupProperties_bit1,
13883 { "TxPort_1", "pn_io.tx_port_properties_bit_1",
13884 FT_UINT8, BASE_HEX, VALS(pn_io_txgroup_state), 0x02,
13887 { &hf_pn_io_TxPortGroupProperties_bit2,
13888 { "TxPort_2", "pn_io.tx_port_properties_bit_2",
13889 FT_UINT8, BASE_HEX, VALS(pn_io_txgroup_state), 0x04,
13892 { &hf_pn_io_TxPortGroupProperties_bit3,
13893 { "TxPort_3", "pn_io.tx_port_properties_bit_3",
13894 FT_UINT8, BASE_HEX, VALS(pn_io_txgroup_state), 0x08,
13897 { &hf_pn_io_TxPortGroupProperties_bit4,
13898 { "TxPort_4", "pn_io.tx_port_properties_bit_4",
13899 FT_UINT8, BASE_HEX, VALS(pn_io_txgroup_state), 0x10,
13902 { &hf_pn_io_TxPortGroupProperties_bit5,
13903 { "TxPort_5", "pn_io.tx_port_properties_bit_5",
13904 FT_UINT8, BASE_HEX, VALS(pn_io_txgroup_state), 0x20,
13907 { &hf_pn_io_TxPortGroupProperties_bit6,
13908 { "TxPort_6", "pn_io.tx_port_properties_bit_6",
13909 FT_UINT8, BASE_HEX, VALS(pn_io_txgroup_state), 0x40,
13912 { &hf_pn_io_TxPortGroupProperties_bit7,
13913 { "TxPort_7", "pn_io.tx_port_properties_bit_7",
13914 FT_UINT8, BASE_HEX, VALS(pn_io_txgroup_state), 0x80,
13918 { &hf_pn_io_start_of_red_frame_id,
13919 { "StartOfRedFrameID", "pn_io.start_of_red_frame_id",
13920 FT_UINT16, BASE_HEX, NULL, 0x0,
13923 { &hf_pn_io_end_of_red_frame_id,
13924 { "EndOfRedFrameID", "pn_io.end_of_red_frame_id",
13925 FT_UINT16, BASE_HEX, NULL, 0x0,
13928 { &hf_pn_io_ir_begin_end_port,
13929 { "Port", "pn_io.ir_begin_end_port",
13930 FT_NONE, BASE_NONE, NULL, 0x0,
13933 { &hf_pn_io_number_of_assignments,
13934 { "NumberOfAssignments", "pn_io.number_of_assignments",
13935 FT_UINT32, BASE_DEC, NULL, 0x0,
13938 { &hf_pn_io_number_of_phases,
13939 { "NumberOfPhases", "pn_io.number_of_phases",
13940 FT_UINT32, BASE_DEC, NULL, 0x0,
13943 { &hf_pn_io_red_orange_period_begin_tx,
13944 { "RedOrangePeriodBegin [TX]", "pn_io.red_orange_period_begin_tx",
13945 FT_UINT32, BASE_DEC, NULL, 0x0,
13948 { &hf_pn_io_orange_period_begin_tx,
13949 { "OrangePeriodBegin [TX]", "pn_io.orange_period_begin_tx",
13950 FT_UINT32, BASE_DEC, NULL, 0x0,
13953 { &hf_pn_io_green_period_begin_tx,
13954 { "GreenPeriodBegin [TX]", "pn_io.green_period_begin_tx",
13955 FT_UINT32, BASE_DEC, NULL, 0x0,
13958 { &hf_pn_io_red_orange_period_begin_rx,
13959 { "RedOrangePeriodBegin [RX]", "pn_io.red_orange_period_begin_rx",
13960 FT_UINT32, BASE_DEC, NULL, 0x0,
13963 { &hf_pn_io_orange_period_begin_rx,
13964 { "OrangePeriodBegin [RX]", "pn_io.orange_period_begin_rx",
13965 FT_UINT32, BASE_DEC, NULL, 0x0,
13968 { &hf_pn_io_green_period_begin_rx,
13969 { "GreenPeriodBegin [RX]", "pn_io.green_period_begin_rx",
13970 FT_UINT32, BASE_DEC, NULL, 0x0,
13973 { &hf_pn_ir_tx_phase_assignment,
13974 { "TXPhaseAssignment", "pn_io.tx_phase_assignment_sub",
13975 FT_NONE, BASE_NONE, NULL, 0x0,
13978 { &hf_pn_io_tx_phase_assignment_begin_value,
13979 { "AssignedValueForReservedBegin", "pn_io.tx_phase_assignment_begin_value",
13980 FT_UINT16, BASE_DEC, NULL, 0x0F,
13983 { &hf_pn_io_tx_phase_assignment_orange_begin,
13984 { "AssignedValueForOrangeBegin", "pn_io.tx_phase_assignment_orange_begin",
13985 FT_UINT16, BASE_DEC, NULL, 0x0F0,
13988 { &hf_pn_io_tx_phase_assignment_end_reserved,
13989 { "AssignedValueForReservedEnd", "pn_io.tx_phase_assignment_end_reserved",
13990 FT_UINT16, BASE_DEC, NULL, 0x0F00,
13993 { &hf_pn_io_tx_phase_assignment_reserved,
13994 { "Reserved should be 0", "pn_io.tx_phase_assignment_reserved",
13995 FT_UINT16, BASE_DEC, NULL, 0x0F000,
13998 { &hf_pn_ir_rx_phase_assignment,
13999 { "RXPhaseAssignment", "pn_io.rx_phase_assignment_sub",
14000 FT_NONE, BASE_NONE, NULL, 0x0,
14004 { "Slot", "pn_io.slot",
14005 FT_NONE, BASE_NONE, NULL, 0x0,
14008 { &hf_pn_io_subslot,
14009 { "Subslot", "pn_io.subslot",
14010 FT_NONE, BASE_NONE, NULL, 0x0,
14013 { &hf_pn_io_number_of_slots,
14014 { "NumberOfSlots", "pn_io.number_of_slots",
14015 FT_UINT16, BASE_DEC, NULL, 0x0,
14018 { &hf_pn_io_number_of_subslots,
14019 { "NumberOfSubslots", "pn_io.number_of_subslots",
14020 FT_UINT16, BASE_DEC, NULL, 0x0,
14023 { &hf_pn_io_maintenance_required_power_budget,
14024 { "MaintenanceRequiredPowerBudget", "pn_io.maintenance_required_power_budget",
14025 FT_UINT32, BASE_HEX, NULL, 0x0,
14028 { &hf_pn_io_maintenance_demanded_power_budget,
14029 { "MaintenanceDemandedPowerBudget", "pn_io.maintenance_demanded_power_budget",
14030 FT_UINT32, BASE_HEX, NULL, 0x0,
14033 { &hf_pn_io_error_power_budget,
14034 { "ErrorPowerBudget", "pn_io.error_power_budget",
14035 FT_UINT32, BASE_HEX, NULL, 0x0,
14038 { &hf_pn_io_fiber_optic_type,
14039 { "FiberOpticType", "pn_io.fiber_optic_type",
14040 FT_UINT32, BASE_HEX, VALS(pn_io_fiber_optic_type), 0x0,
14043 { &hf_pn_io_fiber_optic_cable_type,
14044 { "FiberOpticCableType", "pn_io.fiber_optic_cable_type",
14045 FT_UINT32, BASE_HEX, VALS(pn_io_fiber_optic_cable_type), 0x0,
14048 { &hf_pn_io_controller_appl_cycle_factor,
14049 { "ControllerApplicationCycleFactor", "pn_io.controller_appl_cycle_factor",
14050 FT_UINT16, BASE_DEC, NULL, 0x0,
14053 { &hf_pn_io_time_data_cycle,
14054 { "TimeDataCycle", "pn_io.time_data_cycle",
14055 FT_UINT16, BASE_DEC, NULL, 0x0,
14058 { &hf_pn_io_time_io_input,
14059 { "TimeIOInput", "pn_io.time_io_input",
14060 FT_UINT32, BASE_DEC, NULL, 0x0,
14063 { &hf_pn_io_time_io_output,
14064 { "TimeIOOutput", "pn_io.time_io_output",
14065 FT_UINT32, BASE_DEC, NULL, 0x0,
14068 { &hf_pn_io_time_io_input_valid,
14069 { "TimeIOInputValid", "pn_io.time_io_input_valid",
14070 FT_UINT32, BASE_DEC, NULL, 0x0,
14073 { &hf_pn_io_time_io_output_valid,
14074 { "TimeIOOutputValid", "pn_io.time_io_output_valid",
14075 FT_UINT32, BASE_DEC, NULL, 0x0,
14078 { &hf_pn_io_maintenance_status,
14079 { "MaintenanceStatus", "pn_io.maintenance_status",
14080 FT_UINT32, BASE_HEX, NULL, 0x0,
14083 { &hf_pn_io_maintenance_status_required,
14084 { "Required", "pn_io.maintenance_status_required",
14085 FT_UINT32, BASE_HEX, NULL, 0x0001,
14088 { &hf_pn_io_maintenance_status_demanded,
14089 { "Demanded", "pn_io.maintenance_status_demanded",
14090 FT_UINT32, BASE_HEX, NULL, 0x0002,
14093 { &hf_pn_io_vendor_id_high,
14094 { "VendorIDHigh", "pn_io.vendor_id_high",
14095 FT_UINT8, BASE_HEX, NULL, 0x0,
14098 { &hf_pn_io_vendor_id_low,
14099 { "VendorIDLow", "pn_io.vendor_id_low",
14100 FT_UINT8, BASE_HEX, NULL, 0x0,
14103 { &hf_pn_io_vendor_block_type,
14104 { "VendorBlockType", "pn_io.vendor_block_type",
14105 FT_UINT16, BASE_HEX, NULL, 0x0,
14108 { &hf_pn_io_order_id,
14109 { "OrderID", "pn_io.order_id",
14110 FT_STRING, BASE_NONE, NULL, 0x0,
14113 { &hf_pn_io_im_serial_number,
14114 { "IMSerialNumber", "pn_io.im_serial_number",
14115 FT_STRING, BASE_NONE, NULL, 0x0,
14118 { &hf_pn_io_im_hardware_revision,
14119 { "IMHardwareRevision", "pn_io.im_hardware_revision",
14120 FT_UINT16, BASE_HEX, NULL, 0x0,
14123 /* XXX - better use a simple char here -> vals */
14124 { &hf_pn_io_im_revision_prefix,
14125 { "IMRevisionPrefix", "pn_io.im_revision_prefix",
14126 FT_CHAR, BASE_HEX, VALS(pn_io_im_revision_prefix_vals), 0x0,
14129 { &hf_pn_io_im_sw_revision_functional_enhancement,
14130 { "IMSWRevisionFunctionalEnhancement", "pn_io.im_sw_revision_functional_enhancement",
14131 FT_UINT8, BASE_HEX, NULL, 0x0,
14134 { &hf_pn_io_im_revision_bugfix,
14135 { "IM_SWRevisionBugFix", "pn_io.im_revision_bugfix",
14136 FT_UINT8, BASE_HEX, NULL, 0x0,
14139 { &hf_pn_io_im_sw_revision_internal_change,
14140 { "IMSWRevisionInternalChange", "pn_io.im_sw_revision_internal_change",
14141 FT_UINT8, BASE_HEX, NULL, 0x0,
14144 { &hf_pn_io_im_revision_counter,
14145 { "IMRevisionCounter", "pn_io.im_revision_counter",
14146 FT_UINT16, BASE_HEX, NULL, 0x0,
14149 { &hf_pn_io_im_profile_id,
14150 { "IMProfileID", "pn_io.im_profile_id",
14151 FT_UINT16, BASE_HEX, NULL, 0x0,
14154 { &hf_pn_io_im_profile_specific_type,
14155 { "IMProfileSpecificType", "pn_io.im_profile_specific_type",
14156 FT_UINT16, BASE_HEX, NULL, 0x0,
14159 { &hf_pn_io_im_version_major,
14160 { "IMVersionMajor", "pn_io.im_version_major",
14161 FT_UINT8, BASE_HEX, NULL, 0x0,
14164 { &hf_pn_io_im_version_minor,
14165 { "IMVersionMinor", "pn_io.im_version_minor",
14166 FT_UINT8, BASE_HEX, NULL, 0x0,
14169 { &hf_pn_io_im_supported,
14170 { "IM_Supported", "pn_io.im_supported",
14171 FT_UINT16, BASE_HEX, NULL, 0x0,
14174 { &hf_pn_io_im_numberofentries,
14175 { "NumberOfEntries", "pn_io.im_numberofentries",
14176 FT_UINT16, BASE_HEX, NULL, 0x0,
14179 { &hf_pn_io_im_annotation,
14180 { "IM Annotation", "pn_io.im_annotation",
14181 FT_STRING, BASE_NONE, NULL, 0x0,
14184 { &hf_pn_io_im_order_id,
14185 { "IM Order ID", "pn_io.im_order_id",
14186 FT_STRING, BASE_NONE, NULL, 0x0,
14189 { &hf_pn_io_number_of_ars,
14190 { "NumberOfARs", "pn_io.number_of_ars",
14191 FT_UINT16, BASE_DEC, NULL, 0x0,
14194 { &hf_pn_io_cycle_counter,
14195 { "CycleCounter", "pn_io.cycle_counter",
14196 FT_UINT16, BASE_DEC, NULL, 0x0,
14199 { &hf_pn_io_data_status,
14200 { "DataStatus", "pn_io.ds",
14201 FT_UINT8, BASE_HEX, 0, 0x0,
14204 { &hf_pn_io_data_status_res67,
14205 { "Reserved (should be zero)", "pn_io.ds_res67",
14206 FT_UINT8, BASE_HEX, 0, 0xc0,
14209 { &hf_pn_io_data_status_ok,
14210 { "StationProblemIndicator (1:Ok/0:Problem)", "pn_io.ds_ok",
14211 FT_UINT8, BASE_HEX, 0, 0x20,
14214 { &hf_pn_io_data_status_operate,
14215 { "ProviderState (1:Run/0:Stop)", "pn_io.ds_operate",
14216 FT_UINT8, BASE_HEX, 0, 0x10,
14219 { &hf_pn_io_data_status_res3,
14220 { "Reserved (should be zero)", "pn_io.ds_res3",
14221 FT_UINT8, BASE_HEX, 0, 0x08,
14224 { &hf_pn_io_data_status_valid,
14225 { "DataValid (1:Valid/0:Invalid)", "pn_io.ds_valid",
14226 FT_UINT8, BASE_HEX, 0, 0x04,
14229 { &hf_pn_io_data_status_res1,
14230 { "primary AR of a given AR-set is present (0:One/ 1:None)", "pn_io.ds_res1",
14231 FT_UINT8, BASE_HEX, 0, 0x02,
14234 { &hf_pn_io_data_status_primary,
14235 { "State (1:Primary/0:Backup)", "pn_io.ds_primary",
14236 FT_UINT8, BASE_HEX, 0, 0x01,
14239 { &hf_pn_io_transfer_status,
14240 { "TransferStatus", "pn_io.transfer_status",
14241 FT_UINT8, BASE_DEC, NULL, 0x0,
14244 { &hf_pn_io_actual_local_time_stamp,
14245 { "ActualLocalTimeStamp", "pn_io.actual_local_time_stamp",
14246 FT_UINT64, BASE_DEC, NULL, 0x0,
14249 { &hf_pn_io_local_time_stamp,
14250 { "LocalTimeStamp", "pn_io.local_time_stamp",
14251 FT_UINT64, BASE_DEC, NULL, 0x0,
14254 { &hf_pn_io_number_of_log_entries,
14255 { "NumberOfLogEntries", "pn_io.number_of_log_entries",
14256 FT_UINT16, BASE_DEC, NULL, 0x0,
14259 { &hf_pn_io_entry_detail,
14260 { "EntryDetail", "pn_io.entry_detail",
14261 FT_UINT32, BASE_DEC, NULL, 0x0,
14264 { &hf_pn_io_ip_address,
14265 { "IPAddress", "pn_io.ip_address",
14266 FT_IPv4, BASE_NONE, NULL, 0x0,
14269 { &hf_pn_io_subnetmask,
14270 { "Subnetmask", "pn_io.subnetmask",
14271 FT_IPv4, BASE_NONE, NULL, 0x0,
14274 { &hf_pn_io_standard_gateway,
14275 { "StandardGateway", "pn_io.standard_gateway",
14276 FT_IPv4, BASE_NONE, NULL, 0x0,
14280 { &hf_pn_io_mrp_domain_uuid,
14281 { "MRP_DomainUUID", "pn_io.mrp_domain_uuid",
14282 FT_GUID, BASE_NONE, NULL, 0x0,
14285 { &hf_pn_io_mrp_role,
14286 { "MRP_Role", "pn_io.mrp_role",
14287 FT_UINT16, BASE_HEX, VALS(pn_io_mrp_role_vals), 0x0,
14290 { &hf_pn_io_mrp_length_domain_name,
14291 { "MRP_LengthDomainName", "pn_io.mrp_length_domain_name",
14292 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
14295 { &hf_pn_io_mrp_domain_name,
14296 { "MRP_DomainName", "pn_io.mrp_domain_name",
14297 FT_STRING, BASE_NONE, NULL, 0x0,
14300 { &hf_pn_io_mrp_instances,
14301 { "NumberOfMrpInstances", "pn_io.mrp_Number_MrpInstances",
14302 FT_UINT8, BASE_DEC, NULL, 0x0,
14305 { &hf_pn_io_mrp_instance,
14306 { "Mrp_Instance", "pn_io.mrp_MrpInstance",
14307 FT_UINT8, BASE_DEC, VALS(pn_io_mrp_instance_no), 0x0,
14311 { &hf_pn_io_mrp_prio,
14312 { "MRP_Prio", "pn_io.mrp_prio",
14313 FT_UINT16, BASE_HEX, VALS(pn_io_mrp_prio_vals), 0x0,
14316 { &hf_pn_io_mrp_topchgt,
14317 { "MRP_TOPchgT", "pn_io.mrp_topchgt",
14318 FT_UINT16, BASE_DEC, NULL, 0x0,
14319 "time base 10ms", HFILL }
14321 { &hf_pn_io_mrp_topnrmax,
14322 { "MRP_TOPNRmax", "pn_io.mrp_topnrmax",
14323 FT_UINT16, BASE_DEC, NULL, 0x0,
14324 "number of iterations", HFILL }
14326 { &hf_pn_io_mrp_tstshortt,
14327 { "MRP_TSTshortT", "pn_io.mrp_tstshortt",
14328 FT_UINT16, BASE_DEC, NULL, 0x0,
14329 "time base 1 ms", HFILL }
14331 { &hf_pn_io_mrp_tstdefaultt,
14332 { "MRP_TSTdefaultT", "pn_io.mrp_tstdefaultt",
14333 FT_UINT16, BASE_DEC, NULL, 0x0,
14334 "time base 1ms", HFILL }
14336 { &hf_pn_io_mrp_tstnrmax,
14337 { "MRP_TSTNRmax", "pn_io.mrp_tstnrmax",
14338 FT_UINT16, BASE_DEC, NULL, 0x0,
14339 "number of outstanding test indications causes ring failure", HFILL }
14341 { &hf_pn_io_mrp_check,
14342 { "MRP_Check", "pn_io.mrp_check",
14343 FT_UINT32, BASE_HEX, NULL, 0x0,
14346 { &hf_pn_io_mrp_check_mrm,
14347 { "MRP_Check.MediaRedundancyManager", "pn_io.mrp_check.mrm",
14348 FT_UINT32, BASE_HEX, VALS(pn_io_mrp_mrm_on), 0x01,
14351 { &hf_pn_io_mrp_check_mrpdomain,
14352 { "MRP_Check.MRP_DomainUUID", "pn_io.mrp_check.domainUUID",
14353 FT_UINT32, BASE_HEX, VALS(pn_io_mrp_checkUUID), 0x02,
14356 { &hf_pn_io_mrp_check_reserved_1,
14357 { "MRP_Check.reserved_1", "pn_io.mrp_check_reserved_1",
14358 FT_UINT32, BASE_HEX, NULL, 0x0FFFFFC,
14361 { &hf_pn_io_mrp_check_reserved_2,
14362 { "MRP_Check.reserved_2", "pn_io.mrp_check_reserved_2",
14363 FT_UINT32, BASE_HEX, NULL, 0x0FF000000,
14366 { &hf_pn_io_mrp_rtmode,
14367 { "MRP_RTMode", "pn_io.mrp_rtmode",
14368 FT_UINT32, BASE_HEX, NULL, 0x0,
14371 { &hf_pn_io_mrp_rtmode_rtclass12,
14372 { "RTClass1_2", "pn_io.mrp_rtmode.class1_2",
14373 FT_UINT32, BASE_HEX, VALS(pn_io_mrp_rtmode_rtclass12_vals), 0x00000001,
14376 { &hf_pn_io_mrp_rtmode_rtclass3,
14377 { "RTClass1_3", "pn_io.mrp_rtmode.class3",
14378 FT_UINT32, BASE_HEX, VALS(pn_io_mrp_rtmode_rtclass3_vals), 0x00000002,
14381 { &hf_pn_io_mrp_rtmode_reserved1,
14382 { "Reserved_1", "pn_io.mrp_rtmode.reserved_1",
14383 FT_UINT32, BASE_HEX, NULL, 0x00fffffc,
14386 { &hf_pn_io_mrp_rtmode_reserved2,
14387 { "Reserved_2", "pn_io.mrp_rtmode.reserved_2",
14388 FT_UINT32, BASE_HEX, NULL, 0xff000000,
14391 { &hf_pn_io_mrp_lnkdownt,
14392 { "MRP_LNKdownT", "pn_io.mrp_lnkdownt",
14393 FT_UINT16, BASE_HEX, NULL, 0x0,
14394 "Link down Interval in ms", HFILL }
14396 { &hf_pn_io_mrp_lnkupt,
14397 { "MRP_LNKupT", "pn_io.mrp_lnkupt",
14398 FT_UINT16, BASE_HEX, NULL, 0x0,
14399 "Link up Interval in ms", HFILL }
14401 { &hf_pn_io_mrp_lnknrmax,
14402 { "MRP_LNKNRmax", "pn_io.mrp_lnknrmax",
14403 FT_UINT16, BASE_HEX, NULL, 0x0,
14406 { &hf_pn_io_mrp_version,
14407 { "MRP_Version", "pn_io.mrp_version",
14408 FT_UINT16, BASE_DEC, NULL, 0x0,
14411 { &hf_pn_io_substitute_active_flag,
14412 { "SubstituteActiveFlag", "pn_io.substitute_active_flag",
14413 FT_UINT16, BASE_HEX, NULL, 0x0,
14416 { &hf_pn_io_length_data,
14417 { "LengthData", "pn_io.length_data",
14418 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
14421 { &hf_pn_io_mrp_ring_state,
14422 { "MRP_RingState", "pn_io.mrp_ring_state",
14423 FT_UINT16, BASE_HEX, VALS(pn_io_mrp_ring_state_vals), 0x0,
14426 { &hf_pn_io_mrp_rt_state,
14427 { "MRP_RTState", "pn_io.mrp_rt_state",
14428 FT_UINT16, BASE_HEX, VALS(pn_io_mrp_rt_state_vals), 0x0,
14431 { &hf_pn_io_im_tag_function,
14432 { "IM_Tag_Function", "pn_io.im_tag_function",
14433 FT_STRING, BASE_NONE, NULL, 0x0,
14436 { &hf_pn_io_im_tag_location,
14437 { "IM_Tag_Location", "pn_io.im_tag_location",
14438 FT_STRING, BASE_NONE, NULL, 0x0,
14441 { &hf_pn_io_im_date,
14442 { "IM_Date", "pn_io.im_date",
14443 FT_STRING, BASE_NONE, NULL, 0x0,
14446 { &hf_pn_io_im_descriptor,
14447 { "IM_Descriptor", "pn_io.im_descriptor",
14448 FT_STRING, BASE_NONE, NULL, 0x0,
14451 { &hf_pn_io_fs_hello_mode,
14452 { "FSHelloMode", "pn_io.fs_hello_mode",
14453 FT_UINT32, BASE_HEX, VALS(pn_io_fs_hello_mode_vals), 0x0,
14456 { &hf_pn_io_fs_hello_interval,
14457 { "FSHelloInterval", "pn_io.fs_hello_interval",
14458 FT_UINT32, BASE_DEC, NULL, 0x0,
14459 "ms before conveying a second DCP_Hello.req", HFILL }
14461 { &hf_pn_io_fs_hello_retry,
14462 { "FSHelloRetry", "pn_io.fs_hello_retry",
14463 FT_UINT32, BASE_DEC, NULL, 0x0,
14466 { &hf_pn_io_fs_hello_delay,
14467 { "FSHelloDelay", "pn_io.fs_hello_delay",
14468 FT_UINT32, BASE_DEC, NULL, 0x0,
14471 { &hf_pn_io_fs_parameter_mode,
14472 { "FSParameterMode", "pn_io.fs_parameter_mode",
14473 FT_UINT32, BASE_HEX, VALS(pn_io_fs_parameter_mode_vals), 0x0,
14476 { &hf_pn_io_fs_parameter_uuid,
14477 { "FSParameterUUID", "pn_io.fs_parameter_uuid",
14478 FT_GUID, BASE_NONE, NULL, 0x0,
14481 { &hf_pn_io_check_sync_mode,
14482 { "CheckSyncMode", "pn_io.check_sync_mode",
14483 FT_UINT16, BASE_HEX, NULL, 0x0,
14486 { &hf_pn_io_check_sync_mode_reserved,
14487 { "Reserved", "pn_io.check_sync_mode.reserved",
14488 FT_UINT16, BASE_HEX, NULL, 0xFFFC,
14491 { &hf_pn_io_check_sync_mode_sync_master,
14492 { "SyncMaster", "pn_io.check_sync_mode.sync_master",
14493 FT_UINT16, BASE_HEX, NULL, 0x0002,
14496 { &hf_pn_io_check_sync_mode_cable_delay,
14497 { "CableDelay", "pn_io.check_sync_mode.cable_delay",
14498 FT_UINT16, BASE_HEX, NULL, 0x0001,
14501 /* PROFIsafe F-Parameter */
14502 { &hf_pn_io_ps_f_prm_flag1,
14503 { "F_Prm_Flag1", "pn_io.ps.f_prm_flag1",
14504 FT_UINT8, BASE_HEX, NULL, 0x0,
14507 { &hf_pn_io_ps_f_prm_flag1_chck_seq,
14508 { "F_Check_SeqNr", "pn_io.ps.f_prm_flag1.f_check_seqnr",
14509 FT_UINT8, BASE_HEX, VALS(pn_io_f_check_seqnr), 0x01,
14512 { &hf_pn_io_ps_f_prm_flag1_chck_ipar,
14513 { "F_Check_iPar", "pn_io.ps.f_prm_flag1.f_check_ipar",
14514 FT_UINT8, BASE_HEX, VALS(pn_io_f_check_ipar), 0x02,
14517 { &hf_pn_io_ps_f_prm_flag1_sil,
14518 { "F_SIL", "pn_io.ps.f_prm_flag1.f_sil",
14519 FT_UINT8, BASE_HEX, VALS(pn_io_f_sil), 0xc,
14522 { &hf_pn_io_ps_f_prm_flag1_crc_len,
14523 { "F_CRC_Length", "pn_io.ps.f_prm_flag1.f_crc_len",
14524 FT_UINT8, BASE_HEX, VALS(pn_io_f_crc_len), 0x30,
14527 { &hf_pn_io_ps_f_prm_flag1_crc_seed,
14528 { "F_CRC_Seed", "pn_io.ps.f_prm_flag1.f_crc_seed",
14529 FT_UINT8, BASE_HEX, VALS(pn_io_f_crc_seed), 0x40,
14532 { &hf_pn_io_ps_f_prm_flag1_reserved,
14533 { "Reserved", "pn_io.ps.f_prm_flag1.reserved",
14534 FT_UINT8, BASE_HEX, NULL, 0x80,
14537 { &hf_pn_io_ps_f_prm_flag2,
14538 { "F_Prm_Flag2", "pn_io.ps.f_prm_flag2",
14539 FT_UINT8, BASE_HEX, NULL, 0x0,
14542 { &hf_pn_io_ps_f_prm_flag2_reserved,
14543 { "Reserved", "pn_io.ps.f_prm_flag2.reserved",
14544 FT_UINT8, BASE_HEX, NULL, 0x07,
14547 { &hf_pn_io_ps_f_prm_flag2_f_block_id,
14548 { "F_Block_ID", "pn_io.ps.f_prm_flag2.f_block_id",
14549 FT_UINT8, BASE_HEX, VALS(pn_io_f_block_id), 0x38,
14552 { &hf_pn_io_ps_f_prm_flag2_f_par_version,
14553 { "F_Par_Version", "pn_io.ps.f_prm_flag2.f_par_version",
14554 FT_UINT8, BASE_HEX, VALS(pn_io_f_par_version), 0xC0,
14557 { &hf_pn_io_ps_f_wd_time,
14558 { "F_WD_Time", "pn_io.ps.f_wd_time",
14559 FT_UINT16, BASE_DEC, NULL, 0x0,
14562 { &hf_pn_io_ps_f_ipar_crc,
14563 { "F_iPar_CRC", "pn_io.ps.f_ipar_crc",
14564 FT_UINT32, BASE_DEC, NULL, 0x0,
14567 { &hf_pn_io_ps_f_par_crc,
14568 { "F_Par_CRC", "pn_io.ps.f_par_crc",
14569 FT_UINT16, BASE_DEC, NULL, 0x0,
14572 { &hf_pn_io_ps_f_dest_adr,
14573 { "F_Dest_Add", "pn_io.ps.f_dest_add",
14574 FT_UINT16, BASE_DEC, NULL, 0x0,
14577 { &hf_pn_io_ps_f_src_adr,
14578 { "F_Source_Add", "pn_io.ps.f_source_add",
14579 FT_UINT16, BASE_DEC, NULL, 0x0,
14582 /* profidrive parameter access */
14583 { &hf_pn_io_profidrive_request_reference,
14584 { "RequestReference", "pn_io.profidrive.parameter.request_reference",
14585 FT_UINT8, BASE_HEX, NULL, 0x0,
14588 { &hf_pn_io_profidrive_request_id,
14589 { "RequestID", "pn_io.profidrive.parameter.request_id",
14590 FT_UINT8, BASE_HEX, VALS(pn_io_profidrive_request_id_vals), 0x0,
14593 { &hf_pn_io_profidrive_do_id,
14594 { "DO", "pn_io.profidrive.parameter.do",
14595 FT_UINT8, BASE_DEC, NULL, 0x0,
14598 { &hf_pn_io_profidrive_no_of_parameters,
14599 { "NoOfParameters", "pn_io.profidrive.parameter.no_of_parameters",
14600 FT_UINT8, BASE_DEC, NULL, 0x0,
14603 { &hf_pn_io_profidrive_param_attribute,
14604 { "Attribute", "pn_io.profidrive.parameter.attribute",
14605 FT_UINT8, BASE_HEX, VALS(pn_io_profidrive_attribute_vals), 0x0,
14608 { &hf_pn_io_profidrive_param_no_of_elems,
14609 { "NoOfElements", "pn_io.profidrive.parameter.no_of_elems",
14610 FT_UINT8, BASE_DEC, NULL, 0x0,
14613 { &hf_pn_io_profidrive_param_number,
14614 { "Parameter", "pn_io.profidrive.parameter.number",
14615 FT_UINT16, BASE_DEC, NULL, 0x0,
14618 { &hf_pn_io_profidrive_param_subindex,
14619 { "Index", "pn_io.profidrive.parameter.index",
14620 FT_UINT16, BASE_DEC, NULL, 0x0,
14623 { &hf_pn_io_profidrive_response_id,
14624 { "ResponseID", "pn_io.profidrive.parameter.response_id",
14625 FT_UINT8, BASE_HEX, VALS(pn_io_profidrive_response_id_vals), 0x0,
14628 { &hf_pn_io_profidrive_param_format,
14629 { "Format", "pn_io.profidrive.parameter.format",
14630 FT_UINT8, BASE_HEX, VALS(pn_io_profidrive_format_vals), 0x0,
14633 { &hf_pn_io_profidrive_param_no_of_values,
14634 { "NoOfValues", "pn_io.profidrive.parameter.no_of_values",
14635 FT_UINT8, BASE_DEC, NULL, 0x0,
14638 { &hf_pn_io_profidrive_param_value_byte,
14639 { "Value", "pn_io.profidrive.parameter.value_b",
14640 FT_UINT8, BASE_HEX, NULL, 0x0,
14643 { &hf_pn_io_profidrive_param_value_word,
14644 { "Value", "pn_io.profidrive.parameter.value_w",
14645 FT_UINT16, BASE_HEX, NULL, 0x0,
14648 { &hf_pn_io_profidrive_param_value_dword,
14649 { "Value", "pn_io.profidrive.parameter.value_dw",
14650 FT_UINT32, BASE_HEX, NULL, 0x0,
14653 { &hf_pn_io_profidrive_param_value_float,
14654 { "Value", "pn_io.profidrive.parameter.value_float",
14655 FT_FLOAT, BASE_NONE, NULL, 0x0,
14658 { &hf_pn_io_profidrive_param_value_string,
14659 { "Value", "pn_io.profidrive.parameter.value_str",
14660 FT_STRING, BASE_NONE, NULL, 0x0,
14663 { &hf_pn_io_rs_alarm_info_reserved_8_15,
14664 { "RSAlarmInfo.Reserved2", "pn_io.rs_alarm_info_reserved_8_15",
14665 FT_UINT16, BASE_HEX, NULL, 0x0FF00,
14668 { &hf_pn_io_rs_alarm_info_reserved_0_7,
14669 { "RSAlarmInfo.Reserved1", "pn_io.rs_alarm_info_reserved_0_7",
14670 FT_UINT16, BASE_HEX, NULL, 0x000FF,
14673 { &hf_pn_io_rs_alarm_info,
14674 { "RS Alarm Info", "pn_io.rs_alarm_info",
14675 FT_UINT16, BASE_HEX, NULL, 0x0,
14678 { &hf_pn_io_rs_event_info,
14679 { "RS Event Info", "pn_io.rs_event_info",
14680 FT_NONE, BASE_NONE, NULL, 0x0,
14683 { &hf_pn_io_rs_event_block,
14684 { "RS Event Block", "pn_io.rs_event_block",
14685 FT_NONE, BASE_NONE, NULL, 0x0,
14688 { &hf_pn_io_rs_adjust_block,
14689 { "RS Adjust Block", "pn_io.rs_adjust_block",
14690 FT_NONE, BASE_NONE, NULL, 0x0,
14693 { &hf_pn_io_rs_event_data_extension,
14694 { "RS Event Data Extension", "pn_io.rs_event_data_extension",
14695 FT_NONE, BASE_NONE, NULL, 0x0,
14698 { &hf_pn_io_number_of_rs_event_info,
14699 { "RSEventInfo.NumberOfEntries", "pn_io.number_of_rs_event_info",
14700 FT_UINT16, BASE_DEC, NULL, 0x0,
14703 { &hf_pn_io_rs_block_type,
14704 { "RS Block Type", "pn_io.rs_block_type",
14705 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_rs_block_type), 0x0,
14708 { &hf_pn_io_rs_block_length,
14709 { "RS Block Length", "pn_io.rs_block_length",
14710 FT_UINT16, BASE_HEX, NULL, 0x0,
14713 { &hf_pn_io_rs_specifier,
14714 { "RS_Specifier", "pn_io.rs_specifier",
14715 FT_UINT16, BASE_HEX, NULL, 0x0,
14718 { &hf_pn_io_rs_specifier_sequence,
14719 { "RS_Specifier.SequenceNumber", "pn_io.rs_specifier.sequence",
14720 FT_UINT16, BASE_HEX, NULL, 0x07FF,
14723 { &hf_pn_io_rs_specifier_reserved,
14724 { "RS_Specifier.Reserved", "pn_io.rs_specifier_reserved",
14725 FT_UINT16, BASE_HEX, NULL, 0x3800,
14728 { &hf_pn_io_rs_specifier_specifier,
14729 { "RS_Specifier.Specifier", "pn_io.rs_specifier.specifier",
14730 FT_UINT16, BASE_HEX, VALS(pn_io_rs_specifier_specifier), 0xC000,
14733 { &hf_pn_io_rs_time_stamp,
14734 { "RS_TimeStamp", "pn_io.rs_time_stamp",
14735 FT_BYTES, BASE_NONE, NULL, 0x0,
14738 { &hf_pn_io_rs_time_stamp_status,
14739 { "RS_TimeStamp.Status", "pn_io.rs_time_stamp.status",
14740 FT_UINT16, BASE_HEX, VALS(pn_io_rs_time_stamp_status), 0x0003,
14743 { &hf_pn_io_rs_time_stamp_value,
14744 { "RS_TimeStamp.Value", "pn_io.rs_time_stamp.value",
14745 FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
14748 { &hf_pn_io_rs_minus_error,
14749 { "RS_MinusError", "pn_io.rs_minus_error",
14750 FT_UINT16, BASE_HEX, NULL, 0x0,
14753 { &hf_pn_io_rs_plus_error,
14754 { "RS_PlusError", "pn_io.rs_plus_error",
14755 FT_UINT16, BASE_HEX, NULL, 0x0,
14758 { &hf_pn_io_rs_extension_block_type,
14759 { "RS_ExtensionBlockType", "pn_io.rs_extension_block_type",
14760 FT_UINT8, BASE_HEX, NULL, 0x0,
14763 { &hf_pn_io_rs_extension_block_length,
14764 { "RS_ExtensionBlockLength", "pn_io.rs_extension_block_length",
14765 FT_UINT8, BASE_HEX, NULL, 0x0,
14768 { &hf_pn_io_rs_reason_code,
14769 { "RS_ReasonCode", "pn_io.rs_reason_code",
14770 FT_UINT32, BASE_HEX, NULL, 0x0,
14773 { &hf_pn_io_rs_reason_code_reason,
14774 { "RS_ReasonCode.Reason", "pn_io.rs_reason_code.reason",
14775 FT_UINT32, BASE_HEX, VALS(pn_io_rs_reason_code_reason), 0x0000FFFF,
14778 { &hf_pn_io_rs_reason_code_detail,
14779 { "RS_ReasonCode.Detail", "pn_io.rs_reason_code.detail",
14780 FT_UINT32, BASE_HEX, VALS(pn_io_rs_reason_code_detail), 0xFFFF0000,
14783 { &hf_pn_io_rs_domain_identification,
14784 { "RS_DomainIdentification", "pn_io.rs_domain_identification",
14785 FT_BYTES, BASE_NONE, NULL, 0x0,
14788 { &hf_pn_io_rs_master_identification,
14789 { "RS_MasterIdentification", "pn_io.rs_master_identification",
14790 FT_BYTES, BASE_NONE, NULL, 0x0,
14793 { &hf_pn_io_soe_digital_input_current_value,
14794 { "SoE_DigitalInputCurrentValue", "pn_io.soe_digital_input_current_value",
14795 FT_UINT16, BASE_HEX, NULL, 0x0,
14798 { &hf_pn_io_soe_digital_input_current_value_value,
14799 { "SoE_DigitalInputCurrentValue.Value", "pn_io.soe_digital_input_current_value.value",
14800 FT_UINT16, BASE_HEX, VALS(pn_io_soe_digital_input_current_value_value), 0x0001,
14803 { &hf_pn_io_soe_digital_input_current_value_reserved,
14804 { "SoE_DigitalInputCurrentValue.Reserved", "pn_io.soe_digital_input_current_value.reserved",
14805 FT_UINT16, BASE_HEX, NULL, 0xFFFE,
14808 { &hf_pn_io_am_device_identification,
14809 { "AM_DeviceIdentification", "pn_io.am_device_identification",
14810 FT_UINT64, BASE_HEX, NULL, 0x0,
14813 { &hf_pn_io_am_device_identification_device_sub_id,
14814 { "AM_DeviceIdentification.DeviceSubID", "pn_io.am_device_identification.device_sub_id",
14815 FT_UINT64, BASE_HEX, NULL, 0x000000000000FFFF,
14818 { &hf_pn_io_am_device_identification_device_id,
14819 { "AM_DeviceIdentification.DeviceID", "pn_io.am_device_identification.device_id",
14820 FT_UINT64, BASE_HEX, NULL, 0x00000000FFFF0000,
14823 { &hf_pn_io_am_device_identification_vendor_id,
14824 { "AM_DeviceIdentification.VendorID", "pn_io.am_device_identification.vendor_id",
14825 FT_UINT64, BASE_HEX, NULL, 0x0000FFFF00000000,
14828 { &hf_pn_io_am_device_identification_organization,
14829 { "AM_DeviceIdentification.Organization", "pn_io.am_device_identification.organization",
14830 FT_UINT64, BASE_HEX, NULL, 0xFFFF000000000000,
14833 { &hf_pn_io_rs_adjust_info,
14834 { "RS Adjust Info", "pn_io.rs_adjust_info",
14835 FT_NONE, BASE_NONE, NULL, 0x0,
14838 { &hf_pn_io_soe_max_scan_delay,
14839 { "SoE_MaxScanDelay", "pn_io.soe_max_scan_delay",
14840 FT_UINT16, BASE_HEX, NULL, 0x0,
14843 { &hf_pn_io_soe_adjust_specifier,
14844 { "SoE_AdjustSpecifier", "pn_io.soe_adjust_specifier",
14845 FT_UINT8, BASE_HEX, NULL, 0x0,
14848 { &hf_pn_io_soe_adjust_specifier_reserved,
14849 { "SoE_AdjustSpecifier.Reserved", "pn_io.soe_adjust_specifier.reserved",
14850 FT_UINT8, BASE_HEX, NULL, 0x3F,
14853 { &hf_pn_io_soe_adjust_specifier_incident,
14854 { "SoE_AdjustSpecifier.Incident", "pn_io.soe_adjust_specifier.incident",
14855 FT_UINT8, BASE_HEX, VALS(pn_io_soe_adjust_specifier_incident), 0xC0,
14858 { &hf_pn_io_rs_properties,
14859 { "RSProperties", "pn_io.rs_properties",
14860 FT_UINT32, BASE_HEX, NULL, 0x0,
14863 { &hf_pn_io_rs_properties_alarm_transport,
14864 { "RSProperties", "pn_io.rs_properties",
14865 FT_UINT32, BASE_HEX, VALS(pn_io_rs_properties_alarm_transport), 0x00000001,
14868 { &hf_pn_io_rs_properties_reserved1,
14869 { "RSProperties.Reserved1", "pn_io.rs_properties.reserved1",
14870 FT_UINT32, BASE_HEX, NULL, 0x00FFFFFE,
14873 { &hf_pn_io_rs_properties_reserved2,
14874 { "RSProperties.Reserved2", "pn_io.rs_properties.reserved2",
14875 FT_UINT32, BASE_HEX, NULL, 0xFF000000,
14878 { &hf_pn_io_asset_management_info,
14879 { "Asset Management Info", "pn_io.asset_management_info",
14880 FT_NONE, BASE_NONE, NULL, 0x0,
14883 { &hf_pn_io_number_of_asset_management_info,
14884 { "AssetManagementInfo.NumberOfEntries", "pn_io.number_of_asset_management_info",
14885 FT_UINT16, BASE_DEC, NULL, 0x0,
14888 { &hf_pn_io_im_uniqueidentifier,
14889 { "IM_UniqueIdentifier", "pn_io.IM_UniqueIdentifier",
14890 FT_GUID, BASE_NONE, NULL, 0x0,
14893 { &hf_pn_io_am_location_structure,
14894 { "AM_Location.Structure", "pn_io.am_location.structure",
14895 FT_UINT8, BASE_HEX, VALS(pn_io_am_location_structure_vals), 0x0,
14898 { &hf_pn_io_am_location,
14899 { "AM_Location", "pn_io.am_location",
14900 FT_BYTES, BASE_NONE, NULL, 0,
14903 { &hf_pn_io_am_location_level_0,
14904 { "AM_Location Level 0", "pn_io.am_location.level_0",
14905 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_am_location_level_vals), 0x0,
14908 { &hf_pn_io_am_location_level_1,
14909 { "AM_Location Level 1", "pn_io.am_location.level_1",
14910 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_am_location_level_vals), 0x0,
14913 { &hf_pn_io_am_location_level_2,
14914 { "AM_Location Level 2", "pn_io.am_location.level_2",
14915 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_am_location_level_vals), 0x0,
14918 { &hf_pn_io_am_location_level_3,
14919 { "AM_Location Level 3", "pn_io.am_location.level_3",
14920 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_am_location_level_vals), 0x0,
14923 { &hf_pn_io_am_location_level_4,
14924 { "AM_Location Level 4", "pn_io.am_location.level_4",
14925 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_am_location_level_vals), 0x0,
14928 { &hf_pn_io_am_location_level_5,
14929 { "AM_Location Level 5", "pn_io.am_location.level_5",
14930 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_am_location_level_vals), 0x0,
14933 { &hf_pn_io_am_location_level_6,
14934 { "AM_Location Level 6", "pn_io.am_location.level_6",
14935 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_am_location_level_vals), 0x0,
14938 { &hf_pn_io_am_location_level_7,
14939 { "AM_Location Level 7", "pn_io.am_location.level_7",
14940 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_am_location_level_vals), 0x0,
14943 { &hf_pn_io_am_location_level_8,
14944 { "AM_Location Level 8", "pn_io.am_location.level_8",
14945 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_am_location_level_vals), 0x0,
14948 { &hf_pn_io_am_location_level_9,
14949 { "AM_Location Level 9", "pn_io.am_location.level_9",
14950 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_am_location_level_vals), 0x0,
14953 { &hf_pn_io_am_location_level_10,
14954 { "AM_Location Level 10", "pn_io.am_location.level_10",
14955 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_am_location_level_vals), 0x0,
14958 { &hf_pn_io_am_location_level_11,
14959 { "AM_Location Level 11", "pn_io.am_location.level_11",
14960 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_am_location_level_vals), 0x0,
14963 { &hf_pn_io_am_location_reserved1,
14964 { "Reserved 1", "pn_io.am_location.reserved1",
14965 FT_UINT8, BASE_HEX, VALS(pn_io_am_location_reserved_vals), 0x0,
14968 { &hf_pn_io_am_location_reserved2,
14969 { "Reserved 2", "pn_io.am_location.reserved2",
14970 FT_UINT16, BASE_HEX, VALS(pn_io_am_location_reserved_vals), 0x0,
14973 { &hf_pn_io_am_location_reserved3,
14974 { "Reserved 3", "pn_io.am_location.reserved3",
14975 FT_UINT16, BASE_HEX, VALS(pn_io_am_location_reserved_vals), 0x0,
14978 { &hf_pn_io_am_location_reserved4,
14979 { "Reserved 3", "pn_io.am_location.reserved4",
14980 FT_UINT16, BASE_HEX, VALS(pn_io_am_location_reserved_vals), 0x0,
14983 { &hf_pn_io_am_software_revision,
14984 { "AM Software Revision", "pn_io.am_software_revision",
14985 FT_STRING, BASE_NONE, NULL, 0x0,
14988 { &hf_pn_io_am_hardware_revision,
14989 { "AM Hardware Revision", "pn_io.am_hardware_revision",
14990 FT_STRING, BASE_NONE, NULL, 0x0,
14993 { &hf_pn_io_am_type_identification,
14994 { "AM Type Identification", "pn_io.am_type_identification",
14995 FT_UINT16, BASE_HEX, NULL, 0x0,
14998 { &hf_pn_io_mau_type_extension,
14999 { "MAU Type Extension", "pn_io.mau_type_extension",
15000 FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_mau_type_extension), 0x0,
15005 static gint *ett[] = {
15008 &ett_pn_io_block_header,
15012 &ett_pn_io_pdu_type,
15013 &ett_pn_io_add_flags,
15014 &ett_pn_io_control_command,
15017 &ett_pn_io_data_description,
15019 &ett_pn_io_submodule,
15020 &ett_pn_io_io_data_object,
15022 &ett_pn_io_ar_properties,
15023 &ett_pn_io_iocr_properties,
15024 &ett_pn_io_submodule_properties,
15025 &ett_pn_io_alarmcr_properties,
15026 &ett_pn_io_submodule_state,
15027 &ett_pn_io_channel_properties,
15029 &ett_pn_io_subslot,
15030 &ett_pn_io_maintenance_status,
15031 &ett_pn_io_data_status,
15033 &ett_pn_io_mrp_rtmode,
15034 &ett_pn_io_control_block_properties,
15035 &ett_pn_io_check_sync_mode,
15036 &ett_pn_io_ir_frame_data,
15037 &ett_pn_FrameDataProperties,
15038 &ett_pn_io_ar_info,
15039 &ett_pn_io_ar_data,
15040 &ett_pn_io_ir_begin_end_port,
15041 &ett_pn_io_ir_tx_phase,
15042 &ett_pn_io_ir_rx_phase,
15043 &ett_pn_io_subframe_data,
15044 &ett_pn_io_SFIOCRProperties,
15045 &ett_pn_io_frame_defails,
15046 &ett_pn_io_profisafe_f_parameter,
15047 &ett_pn_io_profisafe_f_parameter_prm_flag1,
15048 &ett_pn_io_profisafe_f_parameter_prm_flag2,
15049 &ett_pn_io_profidrive_parameter_request,
15050 &ett_pn_io_profidrive_parameter_response,
15051 &ett_pn_io_profidrive_parameter_address,
15052 &ett_pn_io_profidrive_parameter_value,
15053 &ett_pn_io_GroupProperties,
15054 &ett_pn_io_rs_alarm_info,
15055 &ett_pn_io_rs_event_info,
15056 &ett_pn_io_rs_event_block,
15057 &ett_pn_io_rs_adjust_block,
15058 &ett_pn_io_rs_event_data_extension,
15059 &ett_pn_io_rs_specifier,
15060 &ett_pn_io_rs_time_stamp,
15061 &ett_pn_io_am_device_identification,
15062 &ett_pn_io_rs_reason_code,
15063 &ett_pn_io_soe_digital_input_current_value,
15064 &ett_pn_io_rs_adjust_info,
15065 &ett_pn_io_soe_adjust_specifier,
15066 &ett_pn_io_asset_management_info,
15067 &ett_pn_io_asset_management_block,
15068 &ett_pn_io_am_location,
15069 &ett_pn_io_sr_properties,
15070 &ett_pn_io_line_delay,
15071 &ett_pn_io_counter_status,
15072 &ett_pn_io_dcp_boundary,
15073 &ett_pn_io_peer_to_peer_boundary,
15074 &ett_pn_io_mau_type_extension
15077 static ei_register_info ei[] = {
15078 { &ei_pn_io_block_version, { "pn_io.block_version.not_implemented", PI_UNDECODED, PI_WARN, "Block version not implemented yet!", EXPFILL }},
15079 { &ei_pn_io_error_code1, { "pn_io.error_code1.expert", PI_UNDECODED, PI_WARN, "Unknown ErrorCode1", EXPFILL }},
15080 { &ei_pn_io_error_code2, { "pn_io.error_code2.expert", PI_UNDECODED, PI_WARN, "Unknown ErrorDecode", EXPFILL }},
15081 { &ei_pn_io_ar_info_not_found, { "pn_io.ar_info_not_found", PI_UNDECODED, PI_NOTE, "IODWriteReq: AR information not found!", EXPFILL }},
15082 { &ei_pn_io_block_length, { "pn_io.block_length.invalid", PI_UNDECODED, PI_WARN, "Block length invalid!", EXPFILL }},
15083 { &ei_pn_io_unsupported, { "pn_io.profidrive.parameter.format.invalid", PI_UNDECODED, PI_WARN, "Unknown Fomatvalue", EXPFILL }},
15084 { &ei_pn_io_mrp_instances, { "pn_io.mrp_Number_MrpInstances.invalid", PI_UNDECODED, PI_WARN, "Number of MrpInstances invalid", EXPFILL }},
15085 { &ei_pn_io_frame_id, { "pn_io.frame_id.changed", PI_UNDECODED, PI_WARN, "FrameID changed", EXPFILL }},
15086 { &ei_pn_io_iocr_type, { "pn_io.iocr_type.unknown", PI_UNDECODED, PI_WARN, "IOCRType undecoded!", EXPFILL }},
15087 { &ei_pn_io_localalarmref, { "pn_io.localalarmref.changed", PI_UNDECODED, PI_WARN, "AlarmCRBlockReq: local alarm ref changed", EXPFILL }},
15088 { &ei_pn_io_nr_of_tx_port_groups, { "pn_io.nr_of_tx_port_groups.not_allowed", PI_PROTOCOL, PI_WARN, "Not allowed value of NumberOfTxPortGroups", EXPFILL }},
15089 { &ei_pn_io_max_recursion_depth_reached, { "pn_io.max_recursion_depth_reached", PI_PROTOCOL, PI_WARN, "Maximum allowed recursion depth reached - stopping dissection", EXPFILL }}
15092 module_t *pnio_module;
15093 expert_module_t* expert_pn_io;
15095 proto_pn_io = proto_register_protocol ("PROFINET IO", "PNIO", "pn_io");
15097 /* Register by name */
15098 register_dissector("pnio", dissect_PNIO_heur, proto_pn_io);
15100 /* Created to remove Decode As confusion */
15101 proto_pn_io_device = proto_register_protocol_in_name_only("PROFINET IO (Device)", "PNIO (Device Interface)", "pn_io_device", proto_pn_io, FT_PROTOCOL);
15102 proto_pn_io_controller = proto_register_protocol_in_name_only("PROFINET IO (Controller)", "PNIO (Controller Interface)", "pn_io_controller", proto_pn_io, FT_PROTOCOL);
15103 proto_pn_io_supervisor = proto_register_protocol_in_name_only("PROFINET IO (Supervisor)", "PNIO (Supervisor Interface)", "pn_io_supervisor", proto_pn_io, FT_PROTOCOL);
15104 proto_pn_io_parameterserver = proto_register_protocol_in_name_only("PROFINET IO (Parameter Server)", "PNIO (Parameter Server Interface)", "pn_io_parameterserver", proto_pn_io, FT_PROTOCOL);
15105 proto_pn_io_implicitar = proto_register_protocol_in_name_only("PROFINET IO (Implicit Ar)", "PNIO (Implicit Ar)", "pn_io_implicitar", proto_pn_io, FT_PROTOCOL);
15106 proto_pn_io_apdu_status = proto_register_protocol_in_name_only("PROFINET IO (Apdu Status)", "PNIO (Apdu Status)", "pn_io_apdu_status", proto_pn_io, FT_PROTOCOL);
15108 proto_register_field_array (proto_pn_io, hf, array_length (hf));
15109 proto_register_subtree_array (ett, array_length (ett));
15110 expert_pn_io = expert_register_protocol(proto_pn_io);
15111 expert_register_field_array(expert_pn_io, ei, array_length(ei));
15113 /* Register preferences */
15114 pnio_module = prefs_register_protocol(proto_pn_io, NULL);
15115 prefs_register_bool_preference(pnio_module, "pnio_ps_selection",
15116 "Enable detailed PROFIsafe dissection",
15117 "Whether the PNIO dissector is allowed to use detailed PROFIsafe dissection of cyclic data frames",
15118 &pnio_ps_selection);
15119 prefs_register_directory_preference(pnio_module, "pnio_ps_networkpath",
15120 "Configuration GSD-File Networkpath", /* Title */
15121 "Select your Networkpath to your GSD-Files.", /* Descreption */
15122 &pnio_ps_networkpath); /* Variable to save the GSD-File networkpath */
15124 /* subdissector code */
15125 register_dissector("pn_io", dissect_PNIO_heur, proto_pn_io);
15126 heur_pn_subdissector_list = register_heur_dissector_list("pn_io", proto_pn_io);
15128 /* Initialise RTC1 dissection */
15129 init_pn_io_rtc1(proto_pn_io);
15131 /* Cleanup functions of PNIO protocol */
15132 register_cleanup_routine(pnio_cleanup);
15134 register_conversation_filter("pn_io", "PN-IO AR", pn_io_ar_conv_valid, pn_io_ar_conv_filter);
15135 register_conversation_filter("pn_io", "PN-IO AR (with data)", pn_io_ar_conv_valid, pn_io_ar_conv_data_filter);
15140 proto_reg_handoff_pn_io (void)
15142 /* Register the protocols as dcerpc */
15143 dcerpc_init_uuid (proto_pn_io_device, ett_pn_io, &uuid_pn_io_device, ver_pn_io_device, pn_io_dissectors, hf_pn_io_opnum);
15144 dcerpc_init_uuid (proto_pn_io_controller, ett_pn_io, &uuid_pn_io_controller, ver_pn_io_controller, pn_io_dissectors, hf_pn_io_opnum);
15145 dcerpc_init_uuid (proto_pn_io_supervisor, ett_pn_io, &uuid_pn_io_supervisor, ver_pn_io_supervisor, pn_io_dissectors, hf_pn_io_opnum);
15146 dcerpc_init_uuid (proto_pn_io_parameterserver, ett_pn_io, &uuid_pn_io_parameterserver, ver_pn_io_parameterserver, pn_io_dissectors, hf_pn_io_opnum);
15147 dcerpc_init_uuid (proto_pn_io_implicitar, ett_pn_io, &uuid_pn_io_implicitar, ver_pn_io_implicitar, pn_io_dissectors, hf_pn_io_opnum);
15149 heur_dissector_add("pn_rt", dissect_PNIO_heur, "PROFINET IO", "pn_io_pn_rt", proto_pn_io, HEURISTIC_ENABLE);
15156 * c-basic-offset: 4
15158 * indent-tabs-mode: nil
15161 * ex: set shiftwidth=4 tabstop=8 expandtab:
15162 * :indentSize=4:tabSize=8:noTabs=true: