diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:26 +0000 |
commit | c4e8a3222648fcf22ca207f1815ebbf7cd144eeb (patch) | |
tree | 93d5c6aa93d9987680dd1adad5685e2ad698f223 /plugins/epan/profinet/packet-dcerpc-pn-io.c | |
parent | Adding upstream version 4.2.6. (diff) | |
download | wireshark-upstream.tar.xz wireshark-upstream.zip |
Adding upstream version 4.4.0.upstream/4.4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/epan/profinet/packet-dcerpc-pn-io.c')
-rw-r--r-- | plugins/epan/profinet/packet-dcerpc-pn-io.c | 4748 |
1 files changed, 2874 insertions, 1874 deletions
diff --git a/plugins/epan/profinet/packet-dcerpc-pn-io.c b/plugins/epan/profinet/packet-dcerpc-pn-io.c index a5afda86..82dcd3fa 100644 --- a/plugins/epan/profinet/packet-dcerpc-pn-io.c +++ b/plugins/epan/profinet/packet-dcerpc-pn-io.c @@ -104,880 +104,936 @@ void proto_reg_handoff_pn_io(void); -static int proto_pn_io = -1; -static int proto_pn_io_device = -1; -static int proto_pn_io_controller = -1; -static int proto_pn_io_supervisor = -1; -static int proto_pn_io_parameterserver = -1; -static int proto_pn_io_implicitar = -1; -int proto_pn_io_apdu_status = -1; -int proto_pn_io_time_aware_status = -1; - -static int hf_pn_io_opnum = -1; -static int hf_pn_io_reserved16 = -1; - -static int hf_pn_io_array = -1; -static int hf_pn_io_args_max = -1; -static int hf_pn_io_args_len = -1; -static int hf_pn_io_array_max_count = -1; -static int hf_pn_io_array_offset = -1; -static int hf_pn_io_array_act_count = -1; - -static int hf_pn_io_ar_type = -1; -static int hf_pn_io_artype_req = -1; -static int hf_pn_io_cminitiator_macadd = -1; -static int hf_pn_io_cminitiator_objectuuid = -1; -static int hf_pn_io_parameter_server_objectuuid = -1; -static int hf_pn_io_ar_data = -1; -static int hf_pn_io_ar_properties = -1; -static int hf_pn_io_ar_properties_state = -1; -static int hf_pn_io_ar_properties_supervisor_takeover_allowed = -1; -static int hf_pn_io_ar_properties_parameterization_server = -1; +static int proto_pn_io; +static int proto_pn_io_device; +static int proto_pn_io_controller; +static int proto_pn_io_supervisor; +static int proto_pn_io_parameterserver; +static int proto_pn_io_implicitar; +int proto_pn_io_apdu_status; +int proto_pn_io_time_aware_status; + +static int hf_pn_io_opnum; +static int hf_pn_io_reserved16; + +static int hf_pn_io_array; +static int hf_pn_io_args_max; +static int hf_pn_io_args_len; +static int hf_pn_io_array_max_count; +static int hf_pn_io_array_offset; +static int hf_pn_io_array_act_count; + +static int hf_pn_io_ar_type; +static int hf_pn_io_artype_req; +static int hf_pn_io_cminitiator_macadd; +static int hf_pn_io_cminitiator_objectuuid; +static int hf_pn_io_parameter_server_objectuuid; +static int hf_pn_io_ar_data; +static int hf_pn_io_ar_properties; +static int hf_pn_io_ar_properties_state; +static int hf_pn_io_ar_properties_supervisor_takeover_allowed; +static int hf_pn_io_ar_properties_parameterization_server; /* removed within 2.3 -static int hf_pn_io_ar_properties_data_rate = -1; +static int hf_pn_io_ar_properties_data_rate; */ -static int hf_pn_io_ar_properties_reserved_1 = -1; -static int hf_pn_io_ar_properties_device_access = -1; -static int hf_pn_io_ar_properties_companion_ar = -1; -static int hf_pn_io_ar_properties_achnowledge_companion_ar = -1; -static int hf_pn_io_ar_properties_reserved = -1; -static int hf_pn_io_ar_properties_time_aware_system = -1; -static int hf_pn_io_ar_properties_combined_object_container_with_legacy_startupmode = -1; -static int hf_pn_io_ar_properties_combined_object_container_with_advanced_startupmode = -1; -static int hf_pn_io_ar_properties_pull_module_alarm_allowed = -1; - -static int hf_pn_RedundancyInfo = -1; -static int hf_pn_RedundancyInfo_reserved = -1; -static int hf_pn_io_number_of_ARDATAInfo = -1; - -static int hf_pn_io_cminitiator_activitytimeoutfactor = -1; -static int hf_pn_io_cminitiator_udprtport = -1; -static int hf_pn_io_station_name_length = -1; -static int hf_pn_io_cminitiator_station_name = -1; -/* static int hf_pn_io_responder_station_name = -1; */ -static int hf_pn_io_arproperties_StartupMode = -1; - -static int hf_pn_io_parameter_server_station_name = -1; - -static int hf_pn_io_cmresponder_macadd = -1; -static int hf_pn_io_cmresponder_udprtport = -1; - -static int hf_pn_io_number_of_iocrs = -1; -static int hf_pn_io_iocr_tree = -1; -static int hf_pn_io_iocr_type = -1; -static int hf_pn_io_iocr_reference = -1; -static int hf_pn_io_iocr_SubframeOffset = -1; -static int hf_pn_io_iocr_SubframeData =-1; -/* static int hf_pn_io_iocr_txports_port = -1; */ -/* static int hf_pn_io_iocr_txports_redundantport = -1; */ -static int hf_pn_io_sr_properties_Reserved_1 = -1; -static int hf_pn_io_sr_properties_Mode = -1; -static int hf_pn_io_sr_properties_Reserved_2 = -1; -static int hf_pn_io_sr_properties_Reserved_3 = -1; -static int hf_pn_io_RedundancyDataHoldFactor = -1; -static int hf_pn_io_sr_properties = -1; -static int hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_0 = -1; -static int hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_1 = -1; - -static int hf_pn_io_arvendor_strucidentifier_if0_low = -1; -static int hf_pn_io_arvendor_strucidentifier_if0_high = -1; -static int hf_pn_io_arvendor_strucidentifier_if0_is8000= -1; -static int hf_pn_io_arvendor_strucidentifier_not0 = -1; - -static int hf_pn_io_lt = -1; -static int hf_pn_io_iocr_properties = -1; -static int hf_pn_io_iocr_properties_rtclass = -1; -static int hf_pn_io_iocr_properties_reserved_1 = -1; -static int hf_pn_io_iocr_properties_media_redundancy = -1; -static int hf_pn_io_iocr_properties_reserved_2 = -1; -static int hf_pn_io_iocr_properties_reserved_3 = -1; -static int hf_pn_io_iocr_properties_fast_forwarding_mac_adr = -1; -static int hf_pn_io_iocr_properties_distributed_subframe_watchdog = -1; -static int hf_pn_io_iocr_properties_full_subframe_structure = -1; - - -static int hf_pn_io_data_length = -1; -static int hf_pn_io_ir_frame_data = -1; -static int hf_pn_io_frame_id = -1; -static int hf_pn_io_send_clock_factor = -1; -static int hf_pn_io_reduction_ratio = -1; -static int hf_pn_io_phase = -1; -static int hf_pn_io_sequence = -1; -static int hf_pn_io_frame_send_offset = -1; -static int hf_pn_io_frame_data_properties = -1; -static int hf_pn_io_frame_data_properties_forwarding_Mode = -1; -static int hf_pn_io_frame_data_properties_FastForwardingMulticastMACAdd = -1; -static int hf_pn_io_frame_data_properties_FragmentMode = -1; -static int hf_pn_io_frame_data_properties_reserved_1 = -1; -static int hf_pn_io_frame_data_properties_reserved_2 = -1; -static int hf_pn_io_watchdog_factor = -1; -static int hf_pn_io_data_hold_factor = -1; -static int hf_pn_io_iocr_tag_header = -1; -static int hf_pn_io_iocr_multicast_mac_add = -1; -static int hf_pn_io_number_of_apis = -1; -static int hf_pn_io_number_of_io_data_objects = -1; -static int hf_pn_io_io_data_object_frame_offset = -1; -static int hf_pn_io_number_of_iocs = -1; -static int hf_pn_io_iocs_frame_offset = -1; - -static int hf_pn_io_SFIOCRProperties = -1; -static int hf_pn_io_DistributedWatchDogFactor = -1; -static int hf_pn_io_RestartFactorForDistributedWD = -1; -static int hf_pn_io_SFIOCRProperties_DFPmode = -1; -static int hf_pn_io_SFIOCRProperties_reserved_1 = -1; -static int hf_pn_io_SFIOCRProperties_reserved_2 = -1; -static int hf_pn_io_SFIOCRProperties_DFPType =-1; -static int hf_pn_io_SFIOCRProperties_DFPRedundantPathLayout = -1; -static int hf_pn_io_SFIOCRProperties_SFCRC16 = -1; - -static int hf_pn_io_subframe_data = -1; -static int hf_pn_io_subframe_data_reserved1 = -1; -static int hf_pn_io_subframe_data_reserved2 = -1; - -static int hf_pn_io_subframe_data_position = -1; -static int hf_pn_io_subframe_reserved1 = -1; -static int hf_pn_io_subframe_data_length = -1; -static int hf_pn_io_subframe_reserved2 = -1; - -static int hf_pn_io_alarmcr_type = -1; -static int hf_pn_io_alarmcr_properties = -1; -static int hf_pn_io_alarmcr_properties_priority = -1; -static int hf_pn_io_alarmcr_properties_transport = -1; -static int hf_pn_io_alarmcr_properties_reserved = -1; - -static int hf_pn_io_rta_timeoutfactor = -1; -static int hf_pn_io_rta_retries = -1; -static int hf_pn_io_localalarmref = -1; -static int hf_pn_io_remotealarmref = -1; -static int hf_pn_io_maxalarmdatalength = -1; -static int hf_pn_io_alarmcr_tagheaderhigh = -1; -static int hf_pn_io_alarmcr_tagheaderlow = -1; - -static int hf_pn_io_IRData_uuid = -1; -static int hf_pn_io_ar_uuid = -1; -static int hf_pn_io_target_ar_uuid = -1; -static int hf_pn_io_ar_discriminator = -1; -static int hf_pn_io_ar_configid = -1; -static int hf_pn_io_ar_arnumber = -1; -static int hf_pn_io_ar_arresource = -1; -static int hf_pn_io_ar_arreserved = -1; -static int hf_pn_io_ar_selector = -1; -static int hf_pn_io_api_tree = -1; -static int hf_pn_io_module_tree = -1; -static int hf_pn_io_submodule_tree = -1; -static int hf_pn_io_io_data_object = -1; +static int hf_pn_io_ar_properties_reserved_1; +static int hf_pn_io_ar_properties_device_access; +static int hf_pn_io_ar_properties_companion_ar; +static int hf_pn_io_ar_properties_achnowledge_companion_ar; +static int hf_pn_io_ar_properties_reserved; +static int hf_pn_io_ar_properties_time_aware_system; +static int hf_pn_io_ar_properties_combined_object_container_with_legacy_startupmode; +static int hf_pn_io_ar_properties_combined_object_container_with_advanced_startupmode; +static int hf_pn_io_ar_properties_pull_module_alarm_allowed; + +static int hf_pn_RedundancyInfo; +static int hf_pn_RedundancyInfo_reserved; +static int hf_pn_io_number_of_ARDATAInfo; + +static int hf_pn_io_cminitiator_activitytimeoutfactor; +static int hf_pn_io_cminitiator_udprtport; +static int hf_pn_io_station_name_length; +static int hf_pn_io_cminitiator_station_name; +/* static int hf_pn_io_responder_station_name; */ +static int hf_pn_io_arproperties_StartupMode; + +static int hf_pn_io_parameter_server_station_name; + +static int hf_pn_io_cmresponder_macadd; +static int hf_pn_io_cmresponder_udprtport; + +static int hf_pn_io_number_of_iocrs; +static int hf_pn_io_iocr_tree; +static int hf_pn_io_iocr_type; +static int hf_pn_io_iocr_reference; +static int hf_pn_io_iocr_SubframeOffset; +static int hf_pn_io_iocr_SubframeData; +/* static int hf_pn_io_iocr_txports_port; */ +/* static int hf_pn_io_iocr_txports_redundantport; */ +static int hf_pn_io_sr_properties_Reserved_1; +static int hf_pn_io_sr_properties_Mode; +static int hf_pn_io_sr_properties_Reserved_2; +static int hf_pn_io_sr_properties_Reserved_3; +static int hf_pn_io_RedundancyDataHoldFactor; +static int hf_pn_io_sr_properties; +static int hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_0; +static int hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_1; + +static int hf_pn_io_arvendor_strucidentifier_if0_low; +static int hf_pn_io_arvendor_strucidentifier_if0_high; +static int hf_pn_io_arvendor_strucidentifier_if0_is8000; +static int hf_pn_io_arvendor_strucidentifier_not0; + +static int hf_pn_io_lt; +static int hf_pn_io_iocr_properties; +static int hf_pn_io_iocr_properties_rtclass; +static int hf_pn_io_iocr_properties_reserved_1; +static int hf_pn_io_iocr_properties_media_redundancy; +static int hf_pn_io_iocr_properties_reserved_2; +static int hf_pn_io_iocr_properties_reserved_3; +static int hf_pn_io_iocr_properties_fast_forwarding_mac_adr; +static int hf_pn_io_iocr_properties_distributed_subframe_watchdog; +static int hf_pn_io_iocr_properties_full_subframe_structure; + + +static int hf_pn_io_data_length; +static int hf_pn_io_ir_frame_data; +static int hf_pn_io_frame_id; +static int hf_pn_io_send_clock_factor; +static int hf_pn_io_reduction_ratio; +static int hf_pn_io_phase; +static int hf_pn_io_sequence; +static int hf_pn_io_frame_send_offset; +static int hf_pn_io_frame_data_properties; +static int hf_pn_io_frame_data_properties_forwarding_Mode; +static int hf_pn_io_frame_data_properties_FastForwardingMulticastMACAdd; +static int hf_pn_io_frame_data_properties_FragmentMode; +static int hf_pn_io_frame_data_properties_reserved_1; +static int hf_pn_io_frame_data_properties_reserved_2; +static int hf_pn_io_watchdog_factor; +static int hf_pn_io_data_hold_factor; +static int hf_pn_io_iocr_tag_header; +static int hf_pn_io_iocr_multicast_mac_add; +static int hf_pn_io_number_of_apis; +static int hf_pn_io_number_of_io_data_objects; +static int hf_pn_io_io_data_object_frame_offset; +static int hf_pn_io_number_of_iocs; +static int hf_pn_io_iocs_frame_offset; + +static int hf_pn_io_SFIOCRProperties; +static int hf_pn_io_DistributedWatchDogFactor; +static int hf_pn_io_RestartFactorForDistributedWD; +static int hf_pn_io_SFIOCRProperties_DFPmode; +static int hf_pn_io_SFIOCRProperties_reserved_1; +static int hf_pn_io_SFIOCRProperties_reserved_2; +static int hf_pn_io_SFIOCRProperties_DFPType; +static int hf_pn_io_SFIOCRProperties_DFPRedundantPathLayout; +static int hf_pn_io_SFIOCRProperties_SFCRC16; + +static int hf_pn_io_subframe_data; +static int hf_pn_io_subframe_data_reserved1; +static int hf_pn_io_subframe_data_reserved2; + +static int hf_pn_io_subframe_data_position; +static int hf_pn_io_subframe_reserved1; +static int hf_pn_io_subframe_data_length; +static int hf_pn_io_subframe_reserved2; + +static int hf_pn_io_alarmcr_type; +static int hf_pn_io_alarmcr_properties; +static int hf_pn_io_alarmcr_properties_priority; +static int hf_pn_io_alarmcr_properties_transport; +static int hf_pn_io_alarmcr_properties_reserved; + +static int hf_pn_io_rta_timeoutfactor; +static int hf_pn_io_rta_retries; +static int hf_pn_io_localalarmref; +static int hf_pn_io_remotealarmref; +static int hf_pn_io_maxalarmdatalength; +static int hf_pn_io_alarmcr_tagheaderhigh; +static int hf_pn_io_alarmcr_tagheaderlow; + +static int hf_pn_io_IRData_uuid; +static int hf_pn_io_ar_uuid; +static int hf_pn_io_target_ar_uuid; +static int hf_pn_io_ar_discriminator; +static int hf_pn_io_ar_configid; +static int hf_pn_io_ar_arnumber; +static int hf_pn_io_ar_arresource; +static int hf_pn_io_ar_arreserved; +static int hf_pn_io_ar_selector; +static int hf_pn_io_api_tree; +static int hf_pn_io_module_tree; +static int hf_pn_io_submodule_tree; +static int hf_pn_io_io_data_object; /* General module information */ -static int hf_pn_io_io_cs = -1; - -static int hf_pn_io_substitutionmode = -1; - -static int hf_pn_io_api = -1; -static int hf_pn_io_slot_nr = -1; -static int hf_pn_io_subslot_nr = -1; -static int hf_pn_io_index = -1; -static int hf_pn_io_seq_number = -1; -static int hf_pn_io_record_data_length = -1; -static int hf_pn_io_add_val1 = -1; -static int hf_pn_io_add_val2 = -1; - -static int hf_pn_io_block = -1; -static int hf_pn_io_block_header = -1; -static int hf_pn_io_block_type = -1; -static int hf_pn_io_block_length = -1; -static int hf_pn_io_block_version_high = -1; -static int hf_pn_io_block_version_low = -1; - -static int hf_pn_io_sessionkey = -1; -static int hf_pn_io_control_alarm_sequence_number = -1; -static int hf_pn_io_control_command = -1; -static int hf_pn_io_control_command_prmend = -1; -static int hf_pn_io_control_command_applready = -1; -static int hf_pn_io_control_command_release = -1; -static int hf_pn_io_control_command_done = -1; -static int hf_pn_io_control_command_ready_for_companion = -1; -static int hf_pn_io_control_command_ready_for_rt_class3 = -1; -static int hf_pn_io_control_command_prmbegin = -1; -static int hf_pn_io_control_command_reserved_7_15 = -1; -static int hf_pn_io_control_block_properties = -1; -static int hf_pn_io_control_block_properties_applready = -1; -static int hf_pn_io_control_block_properties_applready_bit0 = -1; -static int hf_pn_io_control_block_properties_applready_bit1 = -1; -static int hf_pn_io_control_block_properties_applready_otherbits = -1; - -/* static int hf_pn_io_AlarmSequenceNumber = -1; */ -static int hf_pn_io_control_command_reserved = -1; -static int hf_pn_io_SubmoduleListEntries = -1; - -static int hf_pn_io_alarm_type = -1; -static int hf_pn_io_alarm_specifier = -1; -static int hf_pn_io_alarm_specifier_sequence = -1; -static int hf_pn_io_alarm_specifier_channel = -1; -static int hf_pn_io_alarm_specifier_manufacturer = -1; -static int hf_pn_io_alarm_specifier_submodule = -1; -static int hf_pn_io_alarm_specifier_ardiagnosis = -1; - -static int hf_pn_io_alarm_dst_endpoint = -1; -static int hf_pn_io_alarm_src_endpoint = -1; -static int hf_pn_io_pdu_type = -1; -static int hf_pn_io_pdu_type_type = -1; -static int hf_pn_io_pdu_type_version = -1; -static int hf_pn_io_add_flags = -1; -static int hf_pn_io_window_size = -1; -static int hf_pn_io_tack = -1; -static int hf_pn_io_send_seq_num = -1; -static int hf_pn_io_ack_seq_num = -1; -static int hf_pn_io_var_part_len = -1; - -static int hf_pn_io_number_of_modules = -1; -static int hf_pn_io_module_ident_number = -1; -static int hf_pn_io_module_properties = -1; -static int hf_pn_io_module_state = -1; -static int hf_pn_io_number_of_submodules = -1; -static int hf_pn_io_submodule_ident_number = -1; -static int hf_pn_io_submodule_properties = -1; -static int hf_pn_io_submodule_properties_type = -1; -static int hf_pn_io_submodule_properties_shared_input = -1; -static int hf_pn_io_submodule_properties_reduce_input_submodule_data_length = -1; -static int hf_pn_io_submodule_properties_reduce_output_submodule_data_length = -1; -static int hf_pn_io_submodule_properties_discard_ioxs = -1; -static int hf_pn_io_submodule_properties_reserved = -1; - -static int hf_pn_io_submodule_state = -1; -static int hf_pn_io_submodule_state_format_indicator = -1; -static int hf_pn_io_submodule_state_add_info = -1; -static int hf_pn_io_submodule_state_advice = -1; -static int hf_pn_io_submodule_state_maintenance_required = -1; -static int hf_pn_io_submodule_state_maintenance_demanded = -1; -static int hf_pn_io_submodule_state_fault = -1; -static int hf_pn_io_submodule_state_ar_info = -1; -static int hf_pn_io_submodule_state_ident_info = -1; -static int hf_pn_io_submodule_state_detail = -1; - -static int hf_pn_io_data_description_tree = -1; -static int hf_pn_io_data_description = -1; -static int hf_pn_io_submodule_data_length = -1; -static int hf_pn_io_length_iocs = -1; -static int hf_pn_io_length_iops = -1; - -static int hf_pn_io_iocs = -1; -static int hf_pn_io_iops = -1; -static int hf_pn_io_ioxs_extension = -1; -static int hf_pn_io_ioxs_res14 = -1; -static int hf_pn_io_ioxs_instance = -1; -static int hf_pn_io_ioxs_datastate = -1; - -static int hf_pn_io_address_resolution_properties = -1; -static int hf_pn_io_mci_timeout_factor = -1; -static int hf_pn_io_provider_station_name = -1; - -static int hf_pn_io_user_structure_identifier = -1; -static int hf_pn_io_user_structure_identifier_manf = -1; - -static int hf_pn_io_channel_number = -1; -static int hf_pn_io_channel_properties = -1; -static int hf_pn_io_channel_properties_type = -1; -static int hf_pn_io_channel_properties_accumulative = -1; -static int hf_pn_io_channel_properties_maintenance = -1; - - -static int hf_pn_io_NumberOfSubframeBlocks = -1; -static int hf_pn_io_channel_properties_specifier = -1; -static int hf_pn_io_channel_properties_direction = -1; - -static int hf_pn_io_channel_error_type = -1; -static int hf_pn_io_ext_channel_error_type0 = -1; -static int hf_pn_io_ext_channel_error_type0x8000 = -1; -static int hf_pn_io_ext_channel_error_type0x8001 = -1; -static int hf_pn_io_ext_channel_error_type0x8002 = -1; -static int hf_pn_io_ext_channel_error_type0x8003 = -1; -static int hf_pn_io_ext_channel_error_type0x8004 = -1; -static int hf_pn_io_ext_channel_error_type0x8005 = -1; -static int hf_pn_io_ext_channel_error_type0x8007 = -1; -static int hf_pn_io_ext_channel_error_type0x8008 = -1; -static int hf_pn_io_ext_channel_error_type0x800A = -1; -static int hf_pn_io_ext_channel_error_type0x800B = -1; -static int hf_pn_io_ext_channel_error_type0x800C = -1; -static int hf_pn_io_ext_channel_error_type0x8010 = -1; - -static int hf_pn_io_ext_channel_error_type = -1; - -static int hf_pn_io_ext_channel_add_value = -1; -static int hf_pn_io_qualified_channel_qualifier = -1; - -static int hf_pn_io_ptcp_subdomain_id = -1; -static int hf_pn_io_ir_data_id = -1; -static int hf_pn_io_max_bridge_delay = -1; -static int hf_pn_io_number_of_ports = -1; -static int hf_pn_io_max_port_tx_delay = -1; -static int hf_pn_io_max_port_rx_delay = -1; - -static int hf_pn_io_max_line_rx_delay = -1; -static int hf_pn_io_yellowtime = -1; -static int hf_pn_io_reserved_interval_begin = -1; -static int hf_pn_io_reserved_interval_end = -1; -static int hf_pn_io_pllwindow = -1; -static int hf_pn_io_sync_send_factor = -1; -static int hf_pn_io_sync_properties = -1; -static int hf_pn_io_sync_frame_address = -1; -static int hf_pn_io_ptcp_timeout_factor = -1; -static int hf_pn_io_ptcp_takeover_timeout_factor = -1; -static int hf_pn_io_ptcp_master_startup_time = -1; -static int hf_pn_io_ptcp_master_priority_1 = -1; -static int hf_pn_io_ptcp_master_priority_2 = -1; -static int hf_pn_io_ptcp_length_subdomain_name = -1; -static int hf_pn_io_ptcp_subdomain_name = -1; - -static int hf_pn_io_MultipleInterfaceMode_NameOfDevice = -1; -static int hf_pn_io_MultipleInterfaceMode_reserved_1 = -1; -static int hf_pn_io_MultipleInterfaceMode_reserved_2 = -1; +static int hf_pn_io_io_cs; + +static int hf_pn_io_substitutionmode; + +static int hf_pn_io_api; +static int hf_pn_io_slot_nr; +static int hf_pn_io_subslot_nr; +static int hf_pn_io_index; +static int hf_pn_io_seq_number; +static int hf_pn_io_record_data_length; +static int hf_pn_io_add_val1; +static int hf_pn_io_add_val2; + +static int hf_pn_io_block; +static int hf_pn_io_block_header; +static int hf_pn_io_block_type; +static int hf_pn_io_block_length; +static int hf_pn_io_block_version_high; +static int hf_pn_io_block_version_low; + +static int hf_pn_io_sessionkey; +static int hf_pn_io_control_alarm_sequence_number; +static int hf_pn_io_control_command; +static int hf_pn_io_control_command_prmend; +static int hf_pn_io_control_command_applready; +static int hf_pn_io_control_command_release; +static int hf_pn_io_control_command_done; +static int hf_pn_io_control_command_ready_for_companion; +static int hf_pn_io_control_command_ready_for_rt_class3; +static int hf_pn_io_control_command_prmbegin; +static int hf_pn_io_control_command_reserved_7_15; +static int hf_pn_io_control_block_properties; +static int hf_pn_io_control_block_properties_applready; +static int hf_pn_io_control_block_properties_applready_bit0; +static int hf_pn_io_control_block_properties_applready_bit1; +static int hf_pn_io_control_block_properties_applready_otherbits; + +/* static int hf_pn_io_AlarmSequenceNumber; */ +static int hf_pn_io_control_command_reserved; +static int hf_pn_io_SubmoduleListEntries; + +static int hf_pn_io_alarm_type; +static int hf_pn_io_alarm_specifier; +static int hf_pn_io_alarm_specifier_sequence; +static int hf_pn_io_alarm_specifier_channel; +static int hf_pn_io_alarm_specifier_manufacturer; +static int hf_pn_io_alarm_specifier_submodule; +static int hf_pn_io_alarm_specifier_ardiagnosis; + +static int hf_pn_io_alarm_dst_endpoint; +static int hf_pn_io_alarm_src_endpoint; +static int hf_pn_io_pdu_type; +static int hf_pn_io_pdu_type_type; +static int hf_pn_io_pdu_type_version; +static int hf_pn_io_add_flags; +static int hf_pn_io_window_size; +static int hf_pn_io_tack; +static int hf_pn_io_send_seq_num; +static int hf_pn_io_ack_seq_num; +static int hf_pn_io_var_part_len; + +static int hf_pn_io_number_of_modules; +static int hf_pn_io_module_ident_number; +static int hf_pn_io_module_properties; +static int hf_pn_io_module_state; +static int hf_pn_io_number_of_submodules; +static int hf_pn_io_submodule_ident_number; +static int hf_pn_io_submodule_properties; +static int hf_pn_io_submodule_properties_type; +static int hf_pn_io_submodule_properties_shared_input; +static int hf_pn_io_submodule_properties_reduce_input_submodule_data_length; +static int hf_pn_io_submodule_properties_reduce_output_submodule_data_length; +static int hf_pn_io_submodule_properties_discard_ioxs; +static int hf_pn_io_submodule_properties_reserved; + +static int hf_pn_io_submodule_state; +static int hf_pn_io_submodule_state_format_indicator; +static int hf_pn_io_submodule_state_add_info; +static int hf_pn_io_submodule_state_advice; +static int hf_pn_io_submodule_state_maintenance_required; +static int hf_pn_io_submodule_state_maintenance_demanded; +static int hf_pn_io_submodule_state_fault; +static int hf_pn_io_submodule_state_ar_info; +static int hf_pn_io_submodule_state_ident_info; +static int hf_pn_io_submodule_state_detail; + +static int hf_pn_io_data_description_tree; +static int hf_pn_io_data_description; +static int hf_pn_io_submodule_data_length; +static int hf_pn_io_length_iocs; +static int hf_pn_io_length_iops; + +static int hf_pn_io_iocs; +static int hf_pn_io_iops; +static int hf_pn_io_ioxs_extension; +static int hf_pn_io_ioxs_res14; +static int hf_pn_io_ioxs_instance; +static int hf_pn_io_ioxs_datastate; + +static int hf_pn_io_address_resolution_properties; +static int hf_pn_io_mci_timeout_factor; +static int hf_pn_io_provider_station_name; + +static int hf_pn_io_user_structure_identifier; +static int hf_pn_io_user_structure_identifier_manf; + +static int hf_pn_io_channel_number; +static int hf_pn_io_channel_properties; +static int hf_pn_io_channel_properties_type; +static int hf_pn_io_channel_properties_accumulative; +static int hf_pn_io_channel_properties_maintenance; + + +static int hf_pn_io_NumberOfSubframeBlocks; +static int hf_pn_io_channel_properties_specifier; +static int hf_pn_io_channel_properties_direction; + +static int hf_pn_io_channel_error_type; +static int hf_pn_io_ext_channel_error_type0; +static int hf_pn_io_ext_channel_error_type0x8000; +static int hf_pn_io_ext_channel_error_type0x8001; +static int hf_pn_io_ext_channel_error_type0x8002; +static int hf_pn_io_ext_channel_error_type0x8003; +static int hf_pn_io_ext_channel_error_type0x8004; +static int hf_pn_io_ext_channel_error_type0x8005; +static int hf_pn_io_ext_channel_error_type0x8007; +static int hf_pn_io_ext_channel_error_type0x8008; +static int hf_pn_io_ext_channel_error_type0x800A; +static int hf_pn_io_ext_channel_error_type0x800B; +static int hf_pn_io_ext_channel_error_type0x800C; +static int hf_pn_io_ext_channel_error_type0x8010; + +static int hf_pn_io_ext_channel_error_type; + +static int hf_pn_io_ext_channel_add_value; +static int hf_pn_io_qualified_channel_qualifier; + +static int hf_pn_io_ptcp_subdomain_id; +static int hf_pn_io_ir_data_id; +static int hf_pn_io_max_bridge_delay; +static int hf_pn_io_number_of_ports; +static int hf_pn_io_max_port_tx_delay; +static int hf_pn_io_max_port_rx_delay; + +static int hf_pn_io_max_line_rx_delay; +static int hf_pn_io_yellowtime; +static int hf_pn_io_reserved_interval_begin; +static int hf_pn_io_reserved_interval_end; +static int hf_pn_io_pllwindow; +static int hf_pn_io_sync_send_factor; +static int hf_pn_io_sync_properties; +static int hf_pn_io_sync_frame_address; +static int hf_pn_io_ptcp_timeout_factor; +static int hf_pn_io_ptcp_takeover_timeout_factor; +static int hf_pn_io_ptcp_master_startup_time; +static int hf_pn_io_ptcp_master_priority_1; +static int hf_pn_io_ptcp_master_priority_2; +static int hf_pn_io_ptcp_length_subdomain_name; +static int hf_pn_io_ptcp_subdomain_name; + +static int hf_pn_io_MultipleInterfaceMode_NameOfDevice; +static int hf_pn_io_MultipleInterfaceMode_reserved_1; +static int hf_pn_io_MultipleInterfaceMode_reserved_2; /* added Portstatistics */ -static int hf_pn_io_pdportstatistic_counter_status = -1; -static int hf_pn_io_pdportstatistic_counter_status_ifInOctets = -1; -static int hf_pn_io_pdportstatistic_counter_status_ifOutOctets = -1; -static int hf_pn_io_pdportstatistic_counter_status_ifInDiscards = -1; -static int hf_pn_io_pdportstatistic_counter_status_ifOutDiscards = -1; -static int hf_pn_io_pdportstatistic_counter_status_ifInErrors = -1; -static int hf_pn_io_pdportstatistic_counter_status_ifOutErrors = -1; -static int hf_pn_io_pdportstatistic_counter_status_reserved = -1; -static int hf_pn_io_pdportstatistic_ifInOctets = -1; -static int hf_pn_io_pdportstatistic_ifOutOctets = -1; -static int hf_pn_io_pdportstatistic_ifInDiscards = -1; -static int hf_pn_io_pdportstatistic_ifOutDiscards = -1; -static int hf_pn_io_pdportstatistic_ifInErrors = -1; -static int hf_pn_io_pdportstatistic_ifOutErrors = -1; +static int hf_pn_io_pdportstatistic_counter_status; +static int hf_pn_io_pdportstatistic_counter_status_ifInOctets; +static int hf_pn_io_pdportstatistic_counter_status_ifOutOctets; +static int hf_pn_io_pdportstatistic_counter_status_ifInDiscards; +static int hf_pn_io_pdportstatistic_counter_status_ifOutDiscards; +static int hf_pn_io_pdportstatistic_counter_status_ifInErrors; +static int hf_pn_io_pdportstatistic_counter_status_ifOutErrors; +static int hf_pn_io_pdportstatistic_counter_status_reserved; +static int hf_pn_io_pdportstatistic_ifInOctets; +static int hf_pn_io_pdportstatistic_ifOutOctets; +static int hf_pn_io_pdportstatistic_ifInDiscards; +static int hf_pn_io_pdportstatistic_ifOutDiscards; +static int hf_pn_io_pdportstatistic_ifInErrors; +static int hf_pn_io_pdportstatistic_ifOutErrors; /* end of port statistics */ -static int hf_pn_io_domain_boundary = -1; -static int hf_pn_io_domain_boundary_ingress = -1; -static int hf_pn_io_domain_boundary_egress = -1; -static int hf_pn_io_multicast_boundary = -1; -static int hf_pn_io_adjust_properties = -1; -static int hf_pn_io_PreambleLength = -1; -static int hf_pn_io_mau_type = -1; -static int hf_pn_io_mau_type_mode = -1; -static int hf_pn_io_port_state = -1; -static int hf_pn_io_link_state_port = -1; -static int hf_pn_io_link_state_link = -1; -static int hf_pn_io_line_delay = -1; -static int hf_pn_io_line_delay_value = -1; -static int hf_pn_io_cable_delay_value = -1; -static int hf_pn_io_line_delay_format_indicator = -1; -static int hf_pn_io_number_of_peers = -1; -static int hf_pn_io_length_peer_port_id = -1; -static int hf_pn_io_peer_port_id = -1; -static int hf_pn_io_length_peer_chassis_id = -1; -static int hf_pn_io_peer_chassis_id = -1; -static int hf_pn_io_neighbor = -1; -static int hf_pn_io_length_peer_port_name = -1; -static int hf_pn_io_peer_port_name = -1; -static int hf_pn_io_length_peer_station_name = -1; -static int hf_pn_io_peer_station_name = -1; -static int hf_pn_io_length_own_port_id = -1; -static int hf_pn_io_own_port_id = -1; -static int hf_pn_io_peer_macadd = -1; -static int hf_pn_io_media_type = -1; -static int hf_pn_io_macadd = -1; -static int hf_pn_io_length_own_chassis_id = -1; -static int hf_pn_io_own_chassis_id = -1; -static int hf_pn_io_rtclass3_port_status = -1; - -static int hf_pn_io_ethertype = -1; -static int hf_pn_io_rx_port = -1; -static int hf_pn_io_frame_details = -1; -static int hf_pn_io_frame_details_sync_frame = -1; -static int hf_pn_io_frame_details_meaning_frame_send_offset = -1; -static int hf_pn_io_frame_details_reserved = -1; -static int hf_pn_io_nr_of_tx_port_groups = -1; -static int hf_pn_io_TxPortGroupProperties = -1; -static int hf_pn_io_TxPortGroupProperties_bit0 = -1; -static int hf_pn_io_TxPortGroupProperties_bit1 = -1; -static int hf_pn_io_TxPortGroupProperties_bit2 = -1; -static int hf_pn_io_TxPortGroupProperties_bit3 = -1; -static int hf_pn_io_TxPortGroupProperties_bit4 = -1; -static int hf_pn_io_TxPortGroupProperties_bit5 = -1; -static int hf_pn_io_TxPortGroupProperties_bit6 = -1; -static int hf_pn_io_TxPortGroupProperties_bit7 = -1; - -static int hf_pn_io_start_of_red_frame_id = -1; -static int hf_pn_io_end_of_red_frame_id = -1; -static int hf_pn_io_ir_begin_end_port = -1; -static int hf_pn_io_number_of_assignments = -1; -static int hf_pn_io_number_of_phases = -1; -static int hf_pn_io_red_orange_period_begin_tx = -1; -static int hf_pn_io_orange_period_begin_tx = -1; -static int hf_pn_io_green_period_begin_tx = -1; -static int hf_pn_io_red_orange_period_begin_rx = -1; -static int hf_pn_io_orange_period_begin_rx = -1; -static int hf_pn_io_green_period_begin_rx = -1; -/* static int hf_pn_io_tx_phase_assignment = -1; */ -static int hf_pn_ir_tx_phase_assignment = -1; -static int hf_pn_ir_rx_phase_assignment = -1; -static int hf_pn_io_tx_phase_assignment_begin_value = -1; -static int hf_pn_io_tx_phase_assignment_orange_begin = -1; -static int hf_pn_io_tx_phase_assignment_end_reserved = -1; -static int hf_pn_io_tx_phase_assignment_reserved = -1; -/* static int hf_pn_io_rx_phase_assignment = -1; */ - -static int hf_pn_io_slot = -1; -static int hf_pn_io_subslot = -1; -static int hf_pn_io_number_of_slots = -1; -static int hf_pn_io_number_of_subslots = -1; - -/* static int hf_pn_io_maintenance_required_drop_budget = -1; */ -/* static int hf_pn_io_maintenance_demanded_drop_budget = -1; */ -/* static int hf_pn_io_error_drop_budget = -1; */ - -static int hf_pn_io_tsn_number_of_queues = -1; -static int hf_pn_io_tsn_max_supported_record_size = -1; -static int hf_pn_io_tsn_transfer_time_tx = -1; -static int hf_pn_io_tsn_transfer_time_rx = -1; -static int hf_pn_io_tsn_port_capabilities_time_aware = -1; -static int hf_pn_io_tsn_port_capabilities_preemption = -1; -static int hf_pn_io_tsn_port_capabilities_queue_masking = -1; -static int hf_pn_io_tsn_port_capabilities_reserved = -1; -static int hf_pn_io_tsn_forwarding_group = -1; -static int hf_pn_io_tsn_forwarding_group_ingress = -1; -static int hf_pn_io_tsn_forwarding_group_egress = -1; -static int hf_pn_io_tsn_stream_class = -1; -static int hf_pn_io_tsn_dependent_forwarding_delay = -1; -static int hf_pn_io_tsn_independent_forwarding_delay = -1; -static int hf_pn_io_tsn_forwarding_delay_block_number_of_entries = -1; -static int hf_pn_io_tsn_expected_neighbor_block_number_of_entries = -1; -static int hf_pn_io_tsn_port_id_block_number_of_entries = -1; - -static int hf_pn_io_tsn_nme_parameter_uuid = -1; -static int hf_pn_io_tsn_domain_vid_config = -1; -static int hf_pn_io_tsn_domain_vid_config_stream_high_vid = -1; -static int hf_pn_io_tsn_domain_vid_config_stream_high_red_vid = -1; -static int hf_pn_io_tsn_domain_vid_config_stream_low_vid = -1; -static int hf_pn_io_tsn_domain_vid_config_stream_low_red_vid = -1; -static int hf_pn_io_tsn_domain_vid_config_non_stream_vid = -1; -static int hf_pn_io_tsn_domain_vid_config_non_stream_vid_B = -1; -static int hf_pn_io_tsn_domain_vid_config_non_stream_vid_C = -1; -static int hf_pn_io_tsn_domain_vid_config_non_stream_vid_D = -1; -static int hf_pn_io_tsn_domain_vid_config_reserved = -1; -static int hf_pn_io_number_of_tsn_time_data_block_entries = -1; -static int hf_pn_io_number_of_tsn_domain_queue_rate_limiter_entries = -1; -static int hf_pn_io_number_of_tsn_domain_port_ingress_rate_limiter_entries = -1; -static int hf_pn_io_number_of_tsn_domain_port_config_entries = -1; - -static int hf_pn_io_tsn_domain_port_config = -1; -static int hf_pn_io_tsn_domain_port_config_preemption_enabled = -1; -static int hf_pn_io_tsn_domain_port_config_boundary_port_config = -1; -static int hf_pn_io_tsn_domain_port_config_reserved = -1; - -static int hf_pn_io_tsn_domain_port_ingress_rate_limiter = -1; -static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_cir = -1; -static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_cbs = -1; -static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_envelope = -1; -static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_rank = -1; - -static int hf_pn_io_tsn_domain_queue_rate_limiter = -1; -static int hf_pn_io_tsn_domain_queue_rate_limiter_cir = -1; -static int hf_pn_io_tsn_domain_queue_rate_limiter_cbs = -1; -static int hf_pn_io_tsn_domain_queue_rate_limiter_envelope = -1; -static int hf_pn_io_tsn_domain_queue_rate_limiter_rank = -1; -static int hf_pn_io_tsn_domain_queue_rate_limiter_queue_id = -1; -static int hf_pn_io_tsn_domain_queue_rate_limiter_reserved = -1; - -static int hf_pn_io_number_of_tsn_domain_queue_config_entries = -1; -static int hf_pn_io_tsn_domain_queue_config = -1; -static int hf_pn_io_tsn_domain_queue_config_queue_id = -1; -static int hf_pn_io_tsn_domain_queue_config_tci_pcp = -1; -static int hf_pn_io_tsn_domain_queue_config_shaper = -1; -static int hf_pn_io_tsn_domain_queue_config_preemption_mode = -1; -static int hf_pn_io_tsn_domain_queue_config_unmask_time_offset = -1; -static int hf_pn_io_tsn_domain_queue_config_mask_time_offset = -1; - -static int hf_pn_io_network_deadline = -1; -static int hf_pn_io_time_domain_number = -1; -static int hf_pn_io_time_pll_window = -1; -static int hf_pn_io_message_interval_factor = -1; -static int hf_pn_io_message_timeout_factor = -1; -static int hf_pn_io_time_sync_properties = -1; -static int hf_pn_io_time_sync_properties_role = -1; -static int hf_pn_io_time_sync_properties_reserved = -1; -static int hf_pn_io_time_domain_uuid = -1; -static int hf_pn_io_time_domain_name_length = -1; -static int hf_pn_io_time_domain_name = -1; -static int hf_pn_io_tsn_nme_name_uuid = -1; -static int hf_pn_io_tsn_nme_name_length = -1; -static int hf_pn_io_tsn_nme_name = -1; -static int hf_pn_io_tsn_domain_uuid = -1; -static int hf_pn_io_tsn_domain_name_length = -1; -static int hf_pn_io_tsn_domain_name = -1; - -static int hf_pn_io_tsn_fdb_command = -1; -static int hf_pn_io_tsn_dst_add = -1; - -static int hf_pn_io_number_of_tsn_domain_sync_tree_entries = -1; -static int hf_pn_io_tsn_domain_sync_port_role = -1; -static int hf_pn_io_tsn_domain_port_id = -1; - -static int hf_pn_io_maintenance_required_power_budget = -1; -static int hf_pn_io_maintenance_demanded_power_budget = -1; -static int hf_pn_io_error_power_budget = -1; - -static int hf_pn_io_fiber_optic_type = -1; -static int hf_pn_io_fiber_optic_cable_type = -1; - -static int hf_pn_io_controller_appl_cycle_factor = -1; -static int hf_pn_io_time_data_cycle = -1; -static int hf_pn_io_time_io_input = -1; -static int hf_pn_io_time_io_output = -1; -static int hf_pn_io_time_io_input_valid = -1; -static int hf_pn_io_time_io_output_valid = -1; - -static int hf_pn_io_maintenance_status = -1; -static int hf_pn_io_maintenance_status_required = -1; -static int hf_pn_io_maintenance_status_demanded = -1; - -static int hf_pn_io_vendor_id_high = -1; -static int hf_pn_io_vendor_id_low = -1; -static int hf_pn_io_vendor_block_type = -1; -static int hf_pn_io_order_id = -1; -static int hf_pn_io_im_serial_number = -1; -static int hf_pn_io_im_hardware_revision = -1; -static int hf_pn_io_im_revision_prefix = -1; -static int hf_pn_io_im_sw_revision_functional_enhancement = -1; -static int hf_pn_io_im_revision_bugfix = -1; -static int hf_pn_io_im_sw_revision_internal_change = -1; -static int hf_pn_io_im_revision_counter = -1; -static int hf_pn_io_im_profile_id = -1; -static int hf_pn_io_im_profile_specific_type = -1; -static int hf_pn_io_im_version_major = -1; -static int hf_pn_io_im_version_minor = -1; -static int hf_pn_io_im_supported = -1; -static int hf_pn_io_im_numberofentries = -1; -static int hf_pn_io_im_annotation = -1; -static int hf_pn_io_im_order_id = -1; - -static int hf_pn_io_number_of_ars = -1; - -static int hf_pn_io_cycle_counter = -1; -static int hf_pn_io_data_status = -1; -static int hf_pn_io_data_status_res67 = -1; -static int hf_pn_io_data_status_ok = -1; -static int hf_pn_io_data_status_operate = -1; -static int hf_pn_io_data_status_res3 = -1; -static int hf_pn_io_data_status_valid = -1; -static int hf_pn_io_data_status_res1 = -1; -static int hf_pn_io_data_status_primary = -1; -static int hf_pn_io_transfer_status = -1; - -static int hf_pn_io_actual_local_time_stamp = -1; -static int hf_pn_io_number_of_log_entries = -1; -static int hf_pn_io_local_time_stamp = -1; -static int hf_pn_io_entry_detail = -1; - -static int hf_pn_io_ip_address = -1; -static int hf_pn_io_subnetmask = -1; -static int hf_pn_io_standard_gateway = -1; - -static int hf_pn_io_mrp_domain_uuid = -1; -static int hf_pn_io_mrp_role = -1; -static int hf_pn_io_mrp_length_domain_name = -1; -static int hf_pn_io_mrp_domain_name = -1; -static int hf_pn_io_mrp_instances = -1; -static int hf_pn_io_mrp_instance = -1; - -static int hf_pn_io_mrp_prio = -1; -static int hf_pn_io_mrp_topchgt = -1; -static int hf_pn_io_mrp_topnrmax = -1; -static int hf_pn_io_mrp_tstshortt = -1; -static int hf_pn_io_mrp_tstdefaultt = -1; -static int hf_pn_io_mrp_tstnrmax = -1; -static int hf_pn_io_mrp_check = -1; -static int hf_pn_io_mrp_check_mrm = -1; -static int hf_pn_io_mrp_check_mrpdomain = -1; -static int hf_pn_io_mrp_check_reserved_1 = -1; -static int hf_pn_io_mrp_check_reserved_2 = -1; - -static int hf_pn_io_mrp_rtmode = -1; -static int hf_pn_io_mrp_rtmode_rtclass12 = -1; -static int hf_pn_io_mrp_rtmode_rtclass3 = -1; -static int hf_pn_io_mrp_rtmode_reserved1 = -1; -static int hf_pn_io_mrp_rtmode_reserved2 = -1; - -static int hf_pn_io_mrp_lnkdownt = -1; -static int hf_pn_io_mrp_lnkupt = -1; -static int hf_pn_io_mrp_lnknrmax = -1; -static int hf_pn_io_mrp_version = -1; - -static int hf_pn_io_substitute_active_flag = -1; -static int hf_pn_io_length_data = -1; - -static int hf_pn_io_mrp_ring_state = -1; -static int hf_pn_io_mrp_rt_state = -1; - -static int hf_pn_io_im_tag_function = -1; -static int hf_pn_io_im_tag_location = -1; -static int hf_pn_io_im_date = -1; -static int hf_pn_io_im_descriptor = -1; - -static int hf_pn_io_fs_hello_mode = -1; -static int hf_pn_io_fs_hello_interval = -1; -static int hf_pn_io_fs_hello_retry = -1; -static int hf_pn_io_fs_hello_delay = -1; - -static int hf_pn_io_fs_parameter_mode = -1; -static int hf_pn_io_fs_parameter_uuid = -1; - - -static int hf_pn_io_check_sync_mode = -1; -static int hf_pn_io_check_sync_mode_reserved = -1; -static int hf_pn_io_check_sync_mode_sync_master = -1; -static int hf_pn_io_check_sync_mode_cable_delay = -1; +static int hf_pn_io_domain_boundary; +static int hf_pn_io_domain_boundary_ingress; +static int hf_pn_io_domain_boundary_egress; +static int hf_pn_io_multicast_boundary; +static int hf_pn_io_adjust_properties; +static int hf_pn_io_PreambleLength; +static int hf_pn_io_mau_type; +static int hf_pn_io_mau_type_mode; +static int hf_pn_io_port_state; +static int hf_pn_io_link_state_port; +static int hf_pn_io_link_state_link; +static int hf_pn_io_line_delay; +static int hf_pn_io_line_delay_value; +static int hf_pn_io_cable_delay_value; +static int hf_pn_io_line_delay_format_indicator; +static int hf_pn_io_number_of_peers; +static int hf_pn_io_length_peer_port_id; +static int hf_pn_io_peer_port_id; +static int hf_pn_io_length_peer_chassis_id; +static int hf_pn_io_peer_chassis_id; +static int hf_pn_io_neighbor; +static int hf_pn_io_length_peer_port_name; +static int hf_pn_io_peer_port_name; +static int hf_pn_io_length_peer_station_name; +static int hf_pn_io_peer_station_name; +static int hf_pn_io_length_own_port_id; +static int hf_pn_io_own_port_id; +static int hf_pn_io_peer_macadd; +static int hf_pn_io_media_type; +static int hf_pn_io_macadd; +static int hf_pn_io_length_own_chassis_id; +static int hf_pn_io_own_chassis_id; +static int hf_pn_io_rtclass3_port_status; + +static int hf_pn_io_ethertype; +static int hf_pn_io_rx_port; +static int hf_pn_io_frame_details; +static int hf_pn_io_frame_details_sync_frame; +static int hf_pn_io_frame_details_meaning_frame_send_offset; +static int hf_pn_io_frame_details_reserved; +static int hf_pn_io_nr_of_tx_port_groups; +static int hf_pn_io_TxPortGroupProperties; +static int hf_pn_io_TxPortGroupProperties_bit0; +static int hf_pn_io_TxPortGroupProperties_bit1; +static int hf_pn_io_TxPortGroupProperties_bit2; +static int hf_pn_io_TxPortGroupProperties_bit3; +static int hf_pn_io_TxPortGroupProperties_bit4; +static int hf_pn_io_TxPortGroupProperties_bit5; +static int hf_pn_io_TxPortGroupProperties_bit6; +static int hf_pn_io_TxPortGroupProperties_bit7; + +static int hf_pn_io_start_of_red_frame_id; +static int hf_pn_io_end_of_red_frame_id; +static int hf_pn_io_ir_begin_end_port; +static int hf_pn_io_number_of_assignments; +static int hf_pn_io_number_of_phases; +static int hf_pn_io_red_orange_period_begin_tx; +static int hf_pn_io_orange_period_begin_tx; +static int hf_pn_io_green_period_begin_tx; +static int hf_pn_io_red_orange_period_begin_rx; +static int hf_pn_io_orange_period_begin_rx; +static int hf_pn_io_green_period_begin_rx; +/* static int hf_pn_io_tx_phase_assignment; */ +static int hf_pn_ir_tx_phase_assignment; +static int hf_pn_ir_rx_phase_assignment; +static int hf_pn_io_tx_phase_assignment_begin_value; +static int hf_pn_io_tx_phase_assignment_orange_begin; +static int hf_pn_io_tx_phase_assignment_end_reserved; +static int hf_pn_io_tx_phase_assignment_reserved; +/* static int hf_pn_io_rx_phase_assignment; */ + +static int hf_pn_io_slot; +static int hf_pn_io_subslot; +static int hf_pn_io_number_of_slots; +static int hf_pn_io_number_of_subslots; + +/* static int hf_pn_io_maintenance_required_drop_budget; */ +/* static int hf_pn_io_maintenance_demanded_drop_budget; */ +/* static int hf_pn_io_error_drop_budget; */ + +static int hf_pn_io_tsn_number_of_queues; +static int hf_pn_io_tsn_max_supported_record_size; +static int hf_pn_io_tsn_transfer_time_tx; +static int hf_pn_io_tsn_transfer_time_rx; +static int hf_pn_io_tsn_port_capabilities_time_aware; +static int hf_pn_io_tsn_port_capabilities_preemption; +static int hf_pn_io_tsn_port_capabilities_queue_masking; +static int hf_pn_io_tsn_port_capabilities_reserved; +static int hf_pn_io_tsn_forwarding_group; +static int hf_pn_io_tsn_forwarding_group_ingress; +static int hf_pn_io_tsn_forwarding_group_egress; +static int hf_pn_io_tsn_stream_class; +static int hf_pn_io_tsn_dependent_forwarding_delay; +static int hf_pn_io_tsn_independent_forwarding_delay; +static int hf_pn_io_tsn_forwarding_delay_block_number_of_entries; +static int hf_pn_io_tsn_expected_neighbor_block_number_of_entries; +static int hf_pn_io_tsn_port_id_block_number_of_entries; + +static int hf_pn_io_tsn_nme_parameter_uuid; +static int hf_pn_io_tsn_domain_vid_config; +static int hf_pn_io_tsn_domain_vid_config_stream_high_vid; +static int hf_pn_io_tsn_domain_vid_config_stream_high_red_vid; +static int hf_pn_io_tsn_domain_vid_config_stream_low_vid; +static int hf_pn_io_tsn_domain_vid_config_stream_low_red_vid; +static int hf_pn_io_tsn_domain_vid_config_non_stream_vid; +static int hf_pn_io_tsn_domain_vid_config_non_stream_vid_B; +static int hf_pn_io_tsn_domain_vid_config_non_stream_vid_C; +static int hf_pn_io_tsn_domain_vid_config_non_stream_vid_D; +static int hf_pn_io_tsn_domain_vid_config_reserved; +static int hf_pn_io_number_of_tsn_time_data_block_entries; +static int hf_pn_io_number_of_tsn_domain_queue_rate_limiter_entries; +static int hf_pn_io_number_of_tsn_domain_port_ingress_rate_limiter_entries; +static int hf_pn_io_number_of_tsn_domain_port_config_entries; + +static int hf_pn_io_tsn_domain_port_config; +static int hf_pn_io_tsn_domain_port_config_preemption_enabled; +static int hf_pn_io_tsn_domain_port_config_boundary_port_config; +static int hf_pn_io_tsn_domain_port_config_reserved; + +static int hf_pn_io_tsn_domain_port_ingress_rate_limiter; +static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_cir; +static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_cbs; +static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_envelope; +static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_rank; + +static int hf_pn_io_tsn_domain_queue_rate_limiter; +static int hf_pn_io_tsn_domain_queue_rate_limiter_cir; +static int hf_pn_io_tsn_domain_queue_rate_limiter_cbs; +static int hf_pn_io_tsn_domain_queue_rate_limiter_envelope; +static int hf_pn_io_tsn_domain_queue_rate_limiter_rank; +static int hf_pn_io_tsn_domain_queue_rate_limiter_queue_id; +static int hf_pn_io_tsn_domain_queue_rate_limiter_reserved; + +static int hf_pn_io_number_of_tsn_domain_queue_config_entries; +static int hf_pn_io_tsn_domain_queue_config; +static int hf_pn_io_tsn_domain_queue_config_queue_id; +static int hf_pn_io_tsn_domain_queue_config_tci_pcp; +static int hf_pn_io_tsn_domain_queue_config_shaper; +static int hf_pn_io_tsn_domain_queue_config_preemption_mode; +static int hf_pn_io_tsn_domain_queue_config_unmask_time_offset; +static int hf_pn_io_tsn_domain_queue_config_mask_time_offset; + +static int hf_pn_io_network_deadline; +static int hf_pn_io_time_domain_number; +static int hf_pn_io_time_pll_window; +static int hf_pn_io_message_interval_factor; +static int hf_pn_io_message_timeout_factor; +static int hf_pn_io_time_sync_properties; +static int hf_pn_io_time_sync_properties_role; +static int hf_pn_io_time_sync_properties_reserved; +static int hf_pn_io_time_domain_uuid; +static int hf_pn_io_time_domain_name_length; +static int hf_pn_io_time_domain_name; +static int hf_pn_io_tsn_nme_name_uuid; +static int hf_pn_io_tsn_nme_name_length; +static int hf_pn_io_tsn_nme_name; +static int hf_pn_io_tsn_domain_uuid; +static int hf_pn_io_tsn_domain_name_length; +static int hf_pn_io_tsn_domain_name; + +static int hf_pn_io_tsn_fdb_command; +static int hf_pn_io_tsn_dst_add; + +static int hf_pn_io_number_of_tsn_domain_sync_tree_entries; +static int hf_pn_io_tsn_domain_sync_port_role; +static int hf_pn_io_tsn_domain_port_id; + +static int hf_pn_io_maintenance_required_power_budget; +static int hf_pn_io_maintenance_demanded_power_budget; +static int hf_pn_io_error_power_budget; + +static int hf_pn_io_fiber_optic_type; +static int hf_pn_io_fiber_optic_cable_type; + +static int hf_pn_io_controller_appl_cycle_factor; +static int hf_pn_io_time_data_cycle; +static int hf_pn_io_time_io_input; +static int hf_pn_io_time_io_output; +static int hf_pn_io_time_io_input_valid; +static int hf_pn_io_time_io_output_valid; + +static int hf_pn_io_maintenance_status; +static int hf_pn_io_maintenance_status_required; +static int hf_pn_io_maintenance_status_demanded; + +static int hf_pn_io_vendor_id_high; +static int hf_pn_io_vendor_id_low; +static int hf_pn_io_vendor_block_type; +static int hf_pn_io_order_id; +static int hf_pn_io_im_serial_number; +static int hf_pn_io_im_hardware_revision; +static int hf_pn_io_im_revision_prefix; +static int hf_pn_io_im_sw_revision_functional_enhancement; +static int hf_pn_io_im_revision_bugfix; +static int hf_pn_io_im_sw_revision_internal_change; +static int hf_pn_io_im_revision_counter; +static int hf_pn_io_im_profile_id; +static int hf_pn_io_im_profile_specific_type; +static int hf_pn_io_im_version_major; +static int hf_pn_io_im_version_minor; +static int hf_pn_io_im_supported; +static int hf_pn_io_im_numberofentries; +static int hf_pn_io_im_annotation; +static int hf_pn_io_im_order_id; + +static int hf_pn_io_number_of_ars; + +static int hf_pn_io_cycle_counter; +static int hf_pn_io_data_status; +static int hf_pn_io_data_status_res67; +static int hf_pn_io_data_status_ok; +static int hf_pn_io_data_status_operate; +static int hf_pn_io_data_status_res3; +static int hf_pn_io_data_status_valid; +static int hf_pn_io_data_status_res1; +static int hf_pn_io_data_status_primary; +static int hf_pn_io_transfer_status; + +static int hf_pn_io_actual_local_time_stamp; +static int hf_pn_io_number_of_log_entries; +static int hf_pn_io_local_time_stamp; +static int hf_pn_io_entry_detail; + +static int hf_pn_io_ip_address; +static int hf_pn_io_subnetmask; +static int hf_pn_io_standard_gateway; + +static int hf_pn_io_mrp_domain_uuid; +static int hf_pn_io_mrp_role; +static int hf_pn_io_mrp_length_domain_name; +static int hf_pn_io_mrp_domain_name; +static int hf_pn_io_mrp_instances; +static int hf_pn_io_mrp_instance; + +static int hf_pn_io_mrp_prio; +static int hf_pn_io_mrp_topchgt; +static int hf_pn_io_mrp_topnrmax; +static int hf_pn_io_mrp_tstshortt; +static int hf_pn_io_mrp_tstdefaultt; +static int hf_pn_io_mrp_tstnrmax; +static int hf_pn_io_mrp_check; +static int hf_pn_io_mrp_check_mrm; +static int hf_pn_io_mrp_check_mrpdomain; +static int hf_pn_io_mrp_check_reserved_1; +static int hf_pn_io_mrp_check_reserved_2; + +static int hf_pn_io_mrp_rtmode; +static int hf_pn_io_mrp_rtmode_rtclass12; +static int hf_pn_io_mrp_rtmode_rtclass3; +static int hf_pn_io_mrp_rtmode_reserved1; +static int hf_pn_io_mrp_rtmode_reserved2; + +static int hf_pn_io_mrp_lnkdownt; +static int hf_pn_io_mrp_lnkupt; +static int hf_pn_io_mrp_lnknrmax; +static int hf_pn_io_mrp_version; + +static int hf_pn_io_substitute_active_flag; +static int hf_pn_io_length_data; + +static int hf_pn_io_mrp_ring_state; +static int hf_pn_io_mrp_rt_state; + +static int hf_pn_io_im_tag_function; +static int hf_pn_io_im_tag_location; +static int hf_pn_io_im_date; +static int hf_pn_io_im_descriptor; + +static int hf_pn_io_fs_hello_mode; +static int hf_pn_io_fs_hello_interval; +static int hf_pn_io_fs_hello_retry; +static int hf_pn_io_fs_hello_delay; + +static int hf_pn_io_fs_parameter_mode; +static int hf_pn_io_fs_parameter_uuid; + + +static int hf_pn_io_check_sync_mode; +static int hf_pn_io_check_sync_mode_reserved; +static int hf_pn_io_check_sync_mode_sync_master; +static int hf_pn_io_check_sync_mode_cable_delay; /* PROFIsafe fParameters */ -static int hf_pn_io_ps_f_prm_flag1 = -1; -static int hf_pn_io_ps_f_prm_flag1_chck_seq = -1; -static int hf_pn_io_ps_f_prm_flag1_chck_ipar = -1; -static int hf_pn_io_ps_f_prm_flag1_sil = -1; -static int hf_pn_io_ps_f_prm_flag1_crc_len = -1; -static int hf_pn_io_ps_f_prm_flag1_crc_seed = -1; -static int hf_pn_io_ps_f_prm_flag1_reserved = -1; -static int hf_pn_io_ps_f_prm_flag2 = -1; -static int hf_pn_io_ps_f_wd_time = -1; -static int hf_pn_io_ps_f_ipar_crc = -1; -static int hf_pn_io_ps_f_par_crc = -1; -static int hf_pn_io_ps_f_src_adr = -1; -static int hf_pn_io_ps_f_dest_adr = -1; -static int hf_pn_io_ps_f_prm_flag2_reserved = -1; -static int hf_pn_io_ps_f_prm_flag2_f_block_id = -1; -static int hf_pn_io_ps_f_prm_flag2_f_par_version = -1; - -static int hf_pn_io_profidrive_request_reference = -1; -static int hf_pn_io_profidrive_request_id = -1; -static int hf_pn_io_profidrive_do_id = -1; -static int hf_pn_io_profidrive_no_of_parameters = -1; -static int hf_pn_io_profidrive_response_id = -1; -static int hf_pn_io_profidrive_param_attribute = -1; -static int hf_pn_io_profidrive_param_no_of_elems = -1; -static int hf_pn_io_profidrive_param_number = -1; -static int hf_pn_io_profidrive_param_subindex = -1; -static int hf_pn_io_profidrive_param_format = -1; -static int hf_pn_io_profidrive_param_no_of_values = -1; -static int hf_pn_io_profidrive_param_value_byte = -1; -static int hf_pn_io_profidrive_param_value_word = -1; -static int hf_pn_io_profidrive_param_value_dword = -1; -static int hf_pn_io_profidrive_param_value_float = -1; -static int hf_pn_io_profidrive_param_value_string = -1; -static int hf_pn_io_profidrive_param_value_error = -1; -static int hf_pn_io_profidrive_param_value_error_sub = -1; +static int hf_pn_io_ps_f_prm_flag1; +static int hf_pn_io_ps_f_prm_flag1_chck_seq; +static int hf_pn_io_ps_f_prm_flag1_chck_ipar; +static int hf_pn_io_ps_f_prm_flag1_sil; +static int hf_pn_io_ps_f_prm_flag1_crc_len; +static int hf_pn_io_ps_f_prm_flag1_crc_seed; +static int hf_pn_io_ps_f_prm_flag1_reserved; +static int hf_pn_io_ps_f_prm_flag2; +static int hf_pn_io_ps_f_wd_time; +static int hf_pn_io_ps_f_ipar_crc; +static int hf_pn_io_ps_f_par_crc; +static int hf_pn_io_ps_f_src_adr; +static int hf_pn_io_ps_f_dest_adr; +static int hf_pn_io_ps_f_prm_flag2_reserved; +static int hf_pn_io_ps_f_prm_flag2_f_block_id; +static int hf_pn_io_ps_f_prm_flag2_f_par_version; + +static int hf_pn_io_profidrive_request_reference; +static int hf_pn_io_profidrive_request_id; +static int hf_pn_io_profidrive_do_id; +static int hf_pn_io_profidrive_no_of_parameters; +static int hf_pn_io_profidrive_response_id; +static int hf_pn_io_profidrive_param_attribute; +static int hf_pn_io_profidrive_param_no_of_elems; +static int hf_pn_io_profidrive_param_number; +static int hf_pn_io_profidrive_param_subindex; +static int hf_pn_io_profidrive_param_format; +static int hf_pn_io_profidrive_param_no_of_values; +static int hf_pn_io_profidrive_param_value_byte; +static int hf_pn_io_profidrive_param_value_word; +static int hf_pn_io_profidrive_param_value_dword; +static int hf_pn_io_profidrive_param_value_float; +static int hf_pn_io_profidrive_param_value_string; +static int hf_pn_io_profidrive_param_value_error; +static int hf_pn_io_profidrive_param_value_error_sub; /* Sequence of Events - Reporting System Alarm/Event Information */ -static int hf_pn_io_rs_alarm_info_reserved_0_7 = -1; -static int hf_pn_io_rs_alarm_info_reserved_8_15 = -1; -static int hf_pn_io_rs_alarm_info = -1; -static int hf_pn_io_rs_event_info = -1; -static int hf_pn_io_rs_event_block = -1; -static int hf_pn_io_rs_adjust_block = -1; -static int hf_pn_io_rs_event_data_extension = -1; -static int hf_pn_io_number_of_rs_event_info = -1; -static int hf_pn_io_rs_block_type = -1; -static int hf_pn_io_rs_block_length = -1; -static int hf_pn_io_rs_specifier = -1; -static int hf_pn_io_rs_specifier_sequence = -1; -static int hf_pn_io_rs_specifier_reserved = -1; -static int hf_pn_io_rs_specifier_specifier = -1; -static int hf_pn_io_rs_time_stamp = -1; -static int hf_pn_io_rs_time_stamp_status = -1; -static int hf_pn_io_rs_time_stamp_value = -1; -static int hf_pn_io_rs_minus_error = -1; -static int hf_pn_io_rs_plus_error = -1; -static int hf_pn_io_rs_extension_block_type = -1; -static int hf_pn_io_rs_extension_block_length = -1; -static int hf_pn_io_rs_reason_code = -1; -static int hf_pn_io_rs_reason_code_reason = -1; -static int hf_pn_io_rs_reason_code_detail = -1; -static int hf_pn_io_rs_domain_identification = -1; -static int hf_pn_io_rs_master_identification = -1; -static int hf_pn_io_soe_digital_input_current_value = -1; -static int hf_pn_io_soe_digital_input_current_value_value = -1; -static int hf_pn_io_soe_digital_input_current_value_reserved = -1; -static int hf_pn_io_am_device_identification = -1; -static int hf_pn_io_am_device_identification_device_sub_id = -1; -static int hf_pn_io_am_device_identification_device_id = -1; -static int hf_pn_io_am_device_identification_vendor_id = -1; -static int hf_pn_io_am_device_identification_organization = -1; -static int hf_pn_io_rs_adjust_info = -1; -static int hf_pn_io_soe_max_scan_delay = -1; -static int hf_pn_io_soe_adjust_specifier = -1; -static int hf_pn_io_soe_adjust_specifier_reserved = -1; -static int hf_pn_io_soe_adjust_specifier_incident = -1; -static int hf_pn_io_rs_properties = -1; -static int hf_pn_io_rs_properties_alarm_transport = -1; -static int hf_pn_io_rs_properties_reserved1 = -1; -static int hf_pn_io_rs_properties_reserved2 = -1; - -static int hf_pn_io_asset_management_info = -1; -static int hf_pn_io_number_of_asset_management_info = -1; -static int hf_pn_io_im_uniqueidentifier = -1; -static int hf_pn_io_am_location_structure = -1; -static int hf_pn_io_am_location_level_0 = -1; -static int hf_pn_io_am_location_level_1 = -1; -static int hf_pn_io_am_location_level_2 = -1; -static int hf_pn_io_am_location_level_3 = -1; -static int hf_pn_io_am_location_level_4 = -1; -static int hf_pn_io_am_location_level_5 = -1; -static int hf_pn_io_am_location_level_6 = -1; -static int hf_pn_io_am_location_level_7 = -1; -static int hf_pn_io_am_location_level_8 = -1; -static int hf_pn_io_am_location_level_9 = -1; -static int hf_pn_io_am_location_level_10 = -1; -static int hf_pn_io_am_location_level_11 = -1; -static int hf_pn_io_am_location = -1; -static int hf_pn_io_am_location_reserved1 = -1; -static int hf_pn_io_am_location_reserved2 = -1; -static int hf_pn_io_am_location_reserved3 = -1; -static int hf_pn_io_am_location_reserved4 = -1; -static int hf_pn_io_am_location_beginslotnum = -1; -static int hf_pn_io_am_location_beginsubslotnum = -1; -static int hf_pn_io_am_location_endslotnum = -1; -static int hf_pn_io_am_location_endsubslotnum = -1; -static int hf_pn_io_am_software_revision = -1; -static int hf_pn_io_am_hardware_revision = -1; -static int hf_pn_io_am_type_identification = -1; -static int hf_pn_io_am_reserved = -1; - -static int hf_pn_io_dcp_boundary_value = -1; -static int hf_pn_io_dcp_boundary_value_bit0 = -1; -static int hf_pn_io_dcp_boundary_value_bit1 = -1; -static int hf_pn_io_dcp_boundary_value_otherbits = -1; - -static int hf_pn_io_peer_to_peer_boundary_value = -1; -static int hf_pn_io_peer_to_peer_boundary_value_bit0 = -1; -static int hf_pn_io_peer_to_peer_boundary_value_bit1 = -1; -static int hf_pn_io_peer_to_peer_boundary_value_bit2 = -1; -static int hf_pn_io_peer_to_peer_boundary_value_otherbits = -1; - -static int hf_pn_io_mau_type_extension = -1; - -static int hf_pn_io_pe_operational_mode = -1; - -static int hf_pn_io_snmp_community_name_length = -1; -static int hf_pn_io_snmp_community_name = -1; -static int hf_pn_io_snmp_read_community_name = -1; -static int hf_pn_io_snmp_write_community_name = -1; - -static int hf_pn_io_snmp_control = -1; - -/* static int hf_pn_io_packedframe_SFCRC = -1; */ -static gint ett_pn_io = -1; -static gint ett_pn_io_block = -1; -static gint ett_pn_io_block_header = -1; -static gint ett_pn_io_rtc = -1; -static gint ett_pn_io_rta = -1; -static gint ett_pn_io_pdu_type = -1; -static gint ett_pn_io_add_flags = -1; -static gint ett_pn_io_control_command = -1; -static gint ett_pn_io_ioxs = -1; -static gint ett_pn_io_api = -1; -static gint ett_pn_io_data_description = -1; -static gint ett_pn_io_module = -1; -static gint ett_pn_io_submodule = -1; -static gint ett_pn_io_io_data_object = -1; -static gint ett_pn_io_io_cs = -1; -static gint ett_pn_io_ar_properties = -1; -static gint ett_pn_io_iocr_properties = -1; -static gint ett_pn_io_submodule_properties = -1; -static gint ett_pn_io_alarmcr_properties = -1; -static gint ett_pn_io_submodule_state = -1; -static gint ett_pn_io_channel_properties = -1; -static gint ett_pn_io_slot = -1; -static gint ett_pn_io_subslot = -1; -static gint ett_pn_io_maintenance_status = -1; -static gint ett_pn_io_data_status = -1; -static gint ett_pn_io_iocr = -1; -static gint ett_pn_io_mrp_rtmode = -1; -static gint ett_pn_io_control_block_properties = -1; -static gint ett_pn_io_check_sync_mode = -1; -static gint ett_pn_io_ir_frame_data = -1; -static gint ett_pn_FrameDataProperties = -1; -static gint ett_pn_io_ar_info = -1; -static gint ett_pn_io_ar_data = -1; -static gint ett_pn_io_ir_begin_end_port = -1; -static gint ett_pn_io_ir_tx_phase = -1; -static gint ett_pn_io_ir_rx_phase = -1; -static gint ett_pn_io_subframe_data =-1; -static gint ett_pn_io_SFIOCRProperties = -1; -static gint ett_pn_io_frame_defails = -1; -static gint ett_pn_io_profisafe_f_parameter = -1; -static gint ett_pn_io_profisafe_f_parameter_prm_flag1 = -1; -static gint ett_pn_io_profisafe_f_parameter_prm_flag2 = -1; -static gint ett_pn_io_profidrive_parameter_request = -1; -static gint ett_pn_io_profidrive_parameter_response = -1; -static gint ett_pn_io_profidrive_parameter_address = -1; -static gint ett_pn_io_profidrive_parameter_value = -1; -static gint ett_pn_io_rs_alarm_info = -1; -static gint ett_pn_io_rs_event_info = -1; -static gint ett_pn_io_rs_event_block = -1; -static gint ett_pn_io_rs_adjust_block = -1; -static gint ett_pn_io_rs_event_data_extension = -1; -static gint ett_pn_io_rs_specifier = -1; -static gint ett_pn_io_rs_time_stamp = -1; -static gint ett_pn_io_am_device_identification = -1; -static gint ett_pn_io_rs_reason_code = -1; -static gint ett_pn_io_soe_digital_input_current_value = -1; -static gint ett_pn_io_rs_adjust_info = -1; -static gint ett_pn_io_soe_adjust_specifier = -1; -static gint ett_pn_io_sr_properties = -1; -static gint ett_pn_io_line_delay = -1; -static gint ett_pn_io_counter_status = -1; -static gint ett_pn_io_neighbor = -1; - -static gint ett_pn_io_GroupProperties = -1; - -static gint ett_pn_io_asset_management_info = -1; -static gint ett_pn_io_asset_management_block = -1; -static gint ett_pn_io_am_location = -1; - -static gint ett_pn_io_dcp_boundary = -1; -static gint ett_pn_io_peer_to_peer_boundary = -1; - -static gint ett_pn_io_mau_type_extension = -1; - -static gint ett_pn_io_pe_operational_mode = -1; - -static gint ett_pn_io_tsn_domain_port_config = -1; -static gint ett_pn_io_tsn_domain_port_ingress_rate_limiter = -1; -static gint ett_pn_io_tsn_domain_queue_rate_limiter = -1; -static gint ett_pn_io_tsn_domain_vid_config = -1; -static gint ett_pn_io_tsn_domain_queue_config = -1; -static gint ett_pn_io_time_sync_properties = -1; -static gint ett_pn_io_tsn_domain_port_id = -1; - -static gint ett_pn_io_snmp_command_name = -1; +static int hf_pn_io_rs_alarm_info_reserved_0_7; +static int hf_pn_io_rs_alarm_info_reserved_8_15; +static int hf_pn_io_rs_alarm_info; +static int hf_pn_io_rs_event_info; +static int hf_pn_io_rs_event_block; +static int hf_pn_io_rs_adjust_block; +static int hf_pn_io_rs_event_data_extension; +static int hf_pn_io_number_of_rs_event_info; +static int hf_pn_io_rs_block_type; +static int hf_pn_io_rs_block_length; +static int hf_pn_io_rs_specifier; +static int hf_pn_io_rs_specifier_sequence; +static int hf_pn_io_rs_specifier_reserved; +static int hf_pn_io_rs_specifier_specifier; +static int hf_pn_io_rs_time_stamp; +static int hf_pn_io_rs_time_stamp_status; +static int hf_pn_io_rs_time_stamp_value; +static int hf_pn_io_rs_minus_error; +static int hf_pn_io_rs_plus_error; +static int hf_pn_io_rs_extension_block_type; +static int hf_pn_io_rs_extension_block_length; +static int hf_pn_io_rs_reason_code; +static int hf_pn_io_rs_reason_code_reason; +static int hf_pn_io_rs_reason_code_detail; +static int hf_pn_io_rs_domain_identification; +static int hf_pn_io_rs_master_identification; +static int hf_pn_io_soe_digital_input_current_value; +static int hf_pn_io_soe_digital_input_current_value_value; +static int hf_pn_io_soe_digital_input_current_value_reserved; +static int hf_pn_io_am_device_identification; +static int hf_pn_io_am_device_identification_device_sub_id; +static int hf_pn_io_am_device_identification_device_id; +static int hf_pn_io_am_device_identification_vendor_id; +static int hf_pn_io_am_device_identification_organization; +static int hf_pn_io_rs_adjust_info; +static int hf_pn_io_soe_max_scan_delay; +static int hf_pn_io_soe_adjust_specifier; +static int hf_pn_io_soe_adjust_specifier_reserved; +static int hf_pn_io_soe_adjust_specifier_incident; +static int hf_pn_io_rs_properties; +static int hf_pn_io_rs_properties_alarm_transport; +static int hf_pn_io_rs_properties_reserved1; +static int hf_pn_io_rs_properties_reserved2; + +static int hf_pn_io_asset_management_info; +static int hf_pn_io_number_of_asset_management_info; +static int hf_pn_io_im_uniqueidentifier; +static int hf_pn_io_am_location_structure; +static int hf_pn_io_am_location_level_0; +static int hf_pn_io_am_location_level_1; +static int hf_pn_io_am_location_level_2; +static int hf_pn_io_am_location_level_3; +static int hf_pn_io_am_location_level_4; +static int hf_pn_io_am_location_level_5; +static int hf_pn_io_am_location_level_6; +static int hf_pn_io_am_location_level_7; +static int hf_pn_io_am_location_level_8; +static int hf_pn_io_am_location_level_9; +static int hf_pn_io_am_location_level_10; +static int hf_pn_io_am_location_level_11; +static int hf_pn_io_am_location; +static int hf_pn_io_am_location_reserved1; +static int hf_pn_io_am_location_reserved2; +static int hf_pn_io_am_location_reserved3; +static int hf_pn_io_am_location_reserved4; +static int hf_pn_io_am_location_beginslotnum; +static int hf_pn_io_am_location_beginsubslotnum; +static int hf_pn_io_am_location_endslotnum; +static int hf_pn_io_am_location_endsubslotnum; +static int hf_pn_io_am_software_revision; +static int hf_pn_io_am_hardware_revision; +static int hf_pn_io_am_type_identification; +static int hf_pn_io_am_reserved; + +static int hf_pn_io_dcp_boundary_value; +static int hf_pn_io_dcp_boundary_value_bit0; +static int hf_pn_io_dcp_boundary_value_bit1; +static int hf_pn_io_dcp_boundary_value_otherbits; + +static int hf_pn_io_peer_to_peer_boundary_value; +static int hf_pn_io_peer_to_peer_boundary_value_bit0; +static int hf_pn_io_peer_to_peer_boundary_value_bit1; +static int hf_pn_io_peer_to_peer_boundary_value_bit2; +static int hf_pn_io_peer_to_peer_boundary_value_otherbits; + +static int hf_pn_io_mau_type_extension; + +static int hf_pn_io_pe_service_request_id; +static int hf_pn_io_pe_service_request_reference; +static int hf_pn_io_pe_service_modifier; +static int hf_pn_io_pe_service_status; +static int hf_pn_io_pe_service_structure_id; +static int hf_pn_io_pe_service_errorcode; +static int hf_pn_io_pe_service_datarequest; +static int hf_pn_io_pe_service_dataresponse; +static int hf_pn_io_pe_data_count; +static int hf_pn_io_pe_pause_time; +static int hf_pn_io_pe_time_min_pause; +static int hf_pn_io_pe_time_to_pause; +static int hf_pn_io_pe_time_min_length_of_stay; +static int hf_pn_io_pe_time_max_length_of_stay; +static int hf_pn_io_pe_regular_time_to_operate; +static int hf_pn_io_pe_current_time_to_operate; +static int hf_pn_io_pe_current_time_to_destination; +static int hf_pn_io_pe_mode_power_consumption; +static int hf_pn_io_pe_energy_to_destination; +static int hf_pn_io_pe_energy_to_operate; +static int hf_pn_io_pe_energy_to_pause; +static int hf_pn_io_pe_version_major; +static int hf_pn_io_pe_version_minor; +static int hf_pn_io_pe_entity_class; +static int hf_pn_io_pe_entity_subclass; +static int hf_pn_io_pe_entity_dyn_t_and_e; +static int hf_pn_io_pe_entity_pe_ase; +static int hf_pn_io_pe_maximum_command_respond_time; +static int hf_pn_io_pe_mode_id; +static int hf_pn_io_pe_mode_attributes_value; +static int hf_pn_io_pe_mode_attributes_value_bit0; +static int hf_pn_io_pe_mode_attributes_value_otherbits; +static int hf_pn_io_pe_wol_wake_up_method; +static int hf_pn_io_pe_wol_wake_up_data_length; +static int hf_pn_io_pe_mode_id_source; +static int hf_pn_io_pe_mode_id_destination; +static int hf_pn_io_pe_measurement; +static int hf_pn_io_pe_measurement_id; +static int hf_pn_io_pe_measurement_object_number; +static int hf_pn_io_pe_measurement_accuracy_domain; +static int hf_pn_io_pe_measurement_accuracy_class; +static int hf_pn_io_pe_measurement_range; +static int hf_pn_io_pe_measurement_structure_length; +static int hf_pn_io_pe_measurement_structure_id; +static int hf_pn_io_pe_measurement_status; +static int hf_pn_io_pe_measurement_value; +static int hf_pn_io_pe_measurement_value_uint32; +static int hf_pn_io_pe_measurement_value_float32; +static int hf_pn_io_pe_measurement_value_float64; +static int hf_pn_io_pe_operational_mode; + +static int hf_pn_io_snmp_community_name_length; +static int hf_pn_io_snmp_community_name; +static int hf_pn_io_snmp_read_community_name; +static int hf_pn_io_snmp_write_community_name; + +static int hf_pn_io_snmp_control; + +/* static int hf_pn_io_packedframe_SFCRC; */ +static int ett_pn_io; +static int ett_pn_io_block; +static int ett_pn_io_block_header; +static int ett_pn_io_rtc; +static int ett_pn_io_rta; +static int ett_pn_io_pdu_type; +static int ett_pn_io_add_flags; +static int ett_pn_io_control_command; +static int ett_pn_io_ioxs; +static int ett_pn_io_api; +static int ett_pn_io_data_description; +static int ett_pn_io_module; +static int ett_pn_io_submodule; +static int ett_pn_io_io_data_object; +static int ett_pn_io_io_cs; +static int ett_pn_io_ar_properties; +static int ett_pn_io_iocr_properties; +static int ett_pn_io_submodule_properties; +static int ett_pn_io_alarmcr_properties; +static int ett_pn_io_submodule_state; +static int ett_pn_io_channel_properties; +static int ett_pn_io_slot; +static int ett_pn_io_subslot; +static int ett_pn_io_maintenance_status; +static int ett_pn_io_data_status; +static int ett_pn_io_iocr; +static int ett_pn_io_mrp_rtmode; +static int ett_pn_io_control_block_properties; +static int ett_pn_io_check_sync_mode; +static int ett_pn_io_ir_frame_data; +static int ett_pn_FrameDataProperties; +static int ett_pn_io_ar_info; +static int ett_pn_io_ar_data; +static int ett_pn_io_ir_begin_end_port; +static int ett_pn_io_ir_tx_phase; +static int ett_pn_io_ir_rx_phase; +static int ett_pn_io_subframe_data; +static int ett_pn_io_SFIOCRProperties; +static int ett_pn_io_frame_defails; +static int ett_pn_io_profisafe_f_parameter; +static int ett_pn_io_profisafe_f_parameter_prm_flag1; +static int ett_pn_io_profisafe_f_parameter_prm_flag2; +static int ett_pn_io_profidrive_parameter_request; +static int ett_pn_io_profidrive_parameter_response; +static int ett_pn_io_profidrive_parameter_address; +static int ett_pn_io_profidrive_parameter_value; +static int ett_pn_io_rs_alarm_info; +static int ett_pn_io_rs_event_info; +static int ett_pn_io_rs_event_block; +static int ett_pn_io_rs_adjust_block; +static int ett_pn_io_rs_event_data_extension; +static int ett_pn_io_rs_specifier; +static int ett_pn_io_rs_time_stamp; +static int ett_pn_io_am_device_identification; +static int ett_pn_io_rs_reason_code; +static int ett_pn_io_soe_digital_input_current_value; +static int ett_pn_io_rs_adjust_info; +static int ett_pn_io_soe_adjust_specifier; +static int ett_pn_io_sr_properties; +static int ett_pn_io_line_delay; +static int ett_pn_io_counter_status; +static int ett_pn_io_neighbor; + +static int ett_pn_io_GroupProperties; + +static int ett_pn_io_asset_management_info; +static int ett_pn_io_asset_management_block; +static int ett_pn_io_am_location; + +static int ett_pn_io_dcp_boundary; +static int ett_pn_io_peer_to_peer_boundary; + +static int ett_pn_io_mau_type_extension; + +static int ett_pn_io_pe_service_request; +static int ett_pn_io_pe_service_response; +static int ett_pn_io_pe_service_datarequest; +static int ett_pn_io_pe_service_dataresponse; +static int ett_pn_io_pe_mode_attributes; +static int ett_pn_io_pe_measurement_id; +static int ett_pn_io_pe_measurement_value; +static int ett_pn_io_pe_operational_mode; + +static int ett_pn_io_tsn_domain_port_config; +static int ett_pn_io_tsn_domain_port_ingress_rate_limiter; +static int ett_pn_io_tsn_domain_queue_rate_limiter; +static int ett_pn_io_tsn_domain_vid_config; +static int ett_pn_io_tsn_domain_queue_config; +static int ett_pn_io_time_sync_properties; +static int ett_pn_io_tsn_domain_port_id; + +static int ett_pn_io_snmp_command_name; #define PD_SUB_FRAME_BLOCK_FIOCR_PROPERTIES_LENGTH 4 #define PD_SUB_FRAME_BLOCK_FRAME_ID_LENGTH 2 #define PD_SUB_FRAME_BLOCK_SUB_FRAME_DATA_LENGTH 4 -static expert_field ei_pn_io_block_version = EI_INIT; -static expert_field ei_pn_io_block_length = EI_INIT; -static expert_field ei_pn_io_unsupported = EI_INIT; -static expert_field ei_pn_io_localalarmref = EI_INIT; -static expert_field ei_pn_io_mrp_instances = EI_INIT; -static expert_field ei_pn_io_ar_info_not_found = EI_INIT; -static expert_field ei_pn_io_iocr_type = EI_INIT; -static expert_field ei_pn_io_frame_id = EI_INIT; -static expert_field ei_pn_io_nr_of_tx_port_groups = EI_INIT; -static expert_field ei_pn_io_max_recursion_depth_reached = EI_INIT; +static expert_field ei_pn_io_block_version; +static expert_field ei_pn_io_block_length; +static expert_field ei_pn_io_unsupported; +static expert_field ei_pn_io_localalarmref; +static expert_field ei_pn_io_mrp_instances; +static expert_field ei_pn_io_ar_info_not_found; +static expert_field ei_pn_io_iocr_type; +static expert_field ei_pn_io_frame_id; +static expert_field ei_pn_io_nr_of_tx_port_groups; +static expert_field ei_pn_io_max_recursion_depth_reached; static e_guid_t uuid_pn_io_device = { 0xDEA00001, 0x6C97, 0x11D1, { 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D } }; -static guint16 ver_pn_io_device = 1; +static uint16_t ver_pn_io_device = 1; static e_guid_t uuid_pn_io_controller = { 0xDEA00002, 0x6C97, 0x11D1, { 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D } }; -static guint16 ver_pn_io_controller = 1; +static uint16_t ver_pn_io_controller = 1; static e_guid_t uuid_pn_io_supervisor = { 0xDEA00003, 0x6C97, 0x11D1, { 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D } }; -static guint16 ver_pn_io_supervisor = 1; +static uint16_t ver_pn_io_supervisor = 1; static e_guid_t uuid_pn_io_parameterserver = { 0xDEA00004, 0x6C97, 0x11D1, { 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D } }; -static guint16 ver_pn_io_parameterserver = 1; +static uint16_t ver_pn_io_parameterserver = 1; /* According to specification: * Value(UUID): 00000000-0000-0000-0000-000000000000 @@ -985,14 +1041,14 @@ static guint16 ver_pn_io_parameterserver = 1; * Use: The value NIL indicates the usage of the implicit AR. */ static e_guid_t uuid_pn_io_implicitar = { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }; -static guint16 ver_pn_io_implicitar = 1; +static uint16_t ver_pn_io_implicitar = 1; /* PNIO Preference Variables */ -gboolean pnio_ps_selection = TRUE; +bool pnio_ps_selection = true; static const char *pnio_ps_networkpath = ""; -wmem_list_t *aruuid_frame_setup_list = NULL; -static wmem_map_t *pnio_time_aware_frame_map = NULL; +wmem_list_t *aruuid_frame_setup_list; +static wmem_map_t *pnio_time_aware_frame_map; /* Allow heuristic dissection */ @@ -1180,6 +1236,8 @@ static const value_string pn_io_block_type[] = { { 0x0701, "AutoConfiguration Communication"}, { 0x0702, "AutoConfiguration Configuration"}, { 0x0703, "AutoConfiguration Isochronous"}, + { 0x0800, "PROFIenergy ServiceRequest" }, + { 0x0801, "PROFIenergy ServiceResponse" }, { 0x0810, "PE_EntityFilterData"}, { 0x0811, "PE_EntityStatusData"}, { 0x0900, "RS_AdjustObserver" }, @@ -1409,7 +1467,7 @@ static const value_string pn_io_arproperties_combined_object_container_with_lega { 0, NULL } }; -/* bit 29 for advanced statup mode*/ +/* bit 29 for advanced startup mode*/ static const value_string pn_io_arproperties_combined_object_container_with_advanced_startupmode[] = { { 0x00000000, "CombinedObjectContainer not used" }, { 0x00000001, "Usage of CombinedObjectContainer required" }, @@ -1653,7 +1711,7 @@ static const value_string pn_io_index[] = { /*0x8081 - 0x808F reserved */ { 0x8090, "PDInterfaceFSUDataAdjust" }, /*0x8091 - 0x809F reserved */ - { 0x80A0, "Profiles covering energy saving - Record_0" }, + { 0x80A0, "PROFIenergy ServiceRecord" }, /*0x80A1 - 0x80AE reserved */ { 0x80AF, "PE_EntityStatusData for one subslot" }, { 0x80B0, "CombinedObjectContainer" }, @@ -2706,6 +2764,120 @@ static const range_string pn_io_mau_type_extension[] = { { 0, 0, NULL } }; +static const value_string pn_io_pe_entity_classes[] = { + { 0x01, "PE Standby" }, + { 0x02, "PE Measurement" }, + { 0x03, "PE Standby and PE Measurement" }, + { 0, NULL } +}; + +static const value_string pn_io_pe_entity_subclasses[] = { + { 0x00, "No subclass" }, + { 0x01, "PESAP does not support PE_energy_saving_disabled" }, + { 0x02, "PESAP does support PE_energy_saving_disabled" }, + { 0, NULL } +}; + +static const value_string pn_io_pe_dyn_t_and_e_values[] = { + { 0x00, "none" }, + { 0x01, "static values" }, + { 0x02, "dynamic values" }, + { 0, NULL } +}; + +static const value_string pn_io_pe_use_pe_ase[] = { + { 0x01, "PE Entity uses PE ASE" }, + { 0x02, "PE Entity does not use PE ASE" }, + { 0, NULL } +}; + +static const range_string pn_io_pe_services[] = { + { 0x00, 0x00, "reserved" }, + { 0x01, 0x01, "Start_Pause" }, + { 0x02, 0x02, "End_Pause" }, + { 0x03, 0x03, "Query_Modes"}, + { 0x04, 0x04, "PEM_Status" }, + { 0x05, 0x05, "PE_Identify" }, + { 0x06, 0x06, "Query_Version" }, + { 0x07, 0x07, "Query_Attributes" }, + { 0x08, 0x0F, "reserved" }, + { 0x10, 0x10, "Query_Measurement" }, + { 0x11 ,0x11, "Reset_Energy_Meter" }, + { 0x12, 0x12, "Set_Meter" }, + { 0x13, 0x1F, "reserved" }, + { 0x20, 0x20, "Info_Sleep_Mode_WOL" }, + { 0x21, 0x21, "Go_Sleep_Mode_WOL" }, + { 0x22, 0xCF, "reserved" }, + { 0xD0, 0xFF, "manufacturer_specific" }, + { 0, 0, NULL } +}; + +static const value_string pn_io_pe_services_modifier[] = { + { 0x0000, "unknown" }, + { 0x0100, "Start_Pause" }, + { 0x0101, "Start_Pause_with_time_response" }, + { 0x0200, "End_Pause" }, + { 0x0301, "List_Energy_Saving_Modes" }, + { 0x0302, "Get_Mode" }, + { 0x0400, "PEM_Status" }, + { 0x0401, "PEM_Status_Ext1" }, + { 0x0500, "PE_Identify" }, + { 0x0600, "Query_Version" }, + { 0x0700, "Query_Attributes" }, + { 0x1001, "Get_Measurement_List" }, + { 0x1002, "Get_Measurement_Values" }, + { 0x1003, "Get_Measurement_List_with_Object_Number" }, + { 0x1004, "Get_Measurement_Values_with_Object_Number" }, + { 0x1100, "Reset_Energy_Meter_All" }, + { 0x1101, "Reset_Energy_Meter_MeasurementID" }, + { 0x1102, "Reset_Energy_Meter_ObjectNumber" }, + { 0x1103, "Reset_Energy_Meter_MeasurementID_ObjectNumber" }, + { 0x11FE, "Reset_Energy_Meter" }, + { 0x1200, "Set_Energy_Meter" }, + { 0x2000, "Info_Sleep_Mode_WOL" }, + { 0x2100, "Go_Sleep_Mode_WOL" }, + { 0x2101, "Go_Sleep_Mode_WOL_with_pause_time" }, + { 0, NULL } +}; + +static const value_string pn_io_pe_services_modifier_with_details[] = { + { 0x1100, "Reset_Energy_Meter all, ignore Measurement ID and ignore Object Number" }, + { 0x1101, "Reset_Energy_Meter all meters with this Measurement ID" }, + { 0x1102, "Reset_Energy_Meter all meters with this Object Number" }, + { 0x1103, "Reset_Energy_Meter specific meter with this Measurement ID and this Object Number" }, + { 0, NULL } +}; + +static const range_string pn_io_pe_service_status[] = { + { 0x00, 0x00, "reserved" }, + { 0x01, 0x01, "ready" }, + { 0x02, 0x02, "ready_with_error" }, + { 0x03, 0x03, "data_incomplete" }, + { 0x04, 0xCF, "reserved" }, + { 0xD0, 0xFF, "manufacturer specific" }, + { 0, 0, NULL } +}; + +static const range_string pn_io_pe_service_errorcode[] = { + { 0x01, 0x01, "Invalid Service_Request_ID" }, + { 0x02, 0x02, "Bad Request_Reference" }, + { 0x03, 0x03, "Invalid Modifier" }, + { 0x04, 0x04, "Invalid Data_Structure_Identifier_RQ" }, + { 0x05, 0x05, "Invalid Data_Structure_Identifier_RS" }, + { 0x06, 0x06, "No PE energy-saving mode supported" }, + { 0x07, 0x07, "Response too long" }, + { 0x08, 0x08, "Invalid Block Header" }, + { 0x09, 0x4F, "reserved" }, + { 0x50, 0x50, "No suitable energy-saving mode available" }, + { 0x51, 0x51, "Time is not supported" }, + { 0x52, 0x52, "Impermissible PE_Mode_ID" }, + { 0x53, 0x53, "No switch to energy saving mode because of state operate" }, + { 0x54, 0x54, "Service or function temporarily not available" }, + { 0x55, 0x55, "Set or reset function for requested measurement not available" }, + { 0x56, 0xFF, "reserved", }, + { 0, 0, NULL } +}; + static const range_string pn_io_pe_operational_mode[] = { { 0x00, 0x00, "PE_PowerOff" }, { 0x01, 0x1F, "PE_EnergySavingMode" }, @@ -2717,6 +2889,25 @@ static const range_string pn_io_pe_operational_mode[] = { { 0, 0, NULL } }; +static const value_string pn_io_pe_mode_attributes_bit0[] = { + { 0x00, "only static time and energy values available" }, + { 0x01, "dynamic time and energy values available" }, + { 0, NULL } +}; + +static const value_string pn_io_pe_wol_wake_up_method[] = { + { 0x01, "Wake-up based on magic packet" }, + { 0x02, "Wake-up based on vendor specific data (PE Version < V1.3)" }, + { 0, NULL } +}; + +static const value_string pn_io_pe_measurement_status[] = { + { 0x01, "valid" }, + { 0x02, "not available" }, + { 0x03, "temporarily not available" }, + { 0, NULL } +}; + static const value_string pn_io_port_state[] = { { 0x0000, "reserved" }, { 0x0001, "up" }, @@ -2956,7 +3147,7 @@ static const value_string pn_io_f_crc_seed[] = { { 0, NULL } }; -/* F_Block_ID dissection due to ver2.6 specifikation of PI */ +/* F_Block_ID dissection due to ver2.6 specification of PI */ static const value_string pn_io_f_block_id[] = { { 0x00, "No F_WD_Time_2, no F_iPar_CRC" }, { 0x01, "No F_WD_Time_2, F_iPar_CRC" }, @@ -3734,12 +3925,12 @@ static const value_string pn_io_snmp_control[] = { }; static int -dissect_profidrive_value(tvbuff_t *tvb, gint offset, packet_info *pinfo, - proto_tree *tree, guint8 *drep, guint8 format_val) +dissect_profidrive_value(tvbuff_t *tvb, int offset, packet_info *pinfo, + proto_tree *tree, uint8_t *drep, uint8_t format_val) { - guint32 value32; - guint16 value16; - guint8 value8; + uint32_t value32; + uint16_t value16; + uint8_t value8; switch(format_val) { @@ -3770,8 +3961,8 @@ dissect_profidrive_value(tvbuff_t *tvb, gint offset, packet_info *pinfo, break; case 9: { - gint sLen; - sLen = (gint)tvb_strnlen( tvb, offset, -1); + int sLen; + sLen = (int)tvb_strnlen( tvb, offset, -1); proto_tree_add_item(tree, hf_pn_io_profidrive_param_value_string, tvb, offset, sLen, ENC_ASCII); offset = (offset + sLen); break; @@ -3789,18 +3980,18 @@ static GList *pnio_ars; typedef struct pnio_ar_s { /* generic */ e_guid_t aruuid; - guint16 inputframeid; - guint16 outputframeid; + uint16_t inputframeid; + uint16_t outputframeid; /* controller only */ /*const char controllername[33];*/ - guint8 controllermac[6]; - guint16 controlleralarmref; + uint8_t controllermac[6]; + uint16_t controlleralarmref; /* device only */ - guint8 devicemac[6]; - guint16 devicealarmref; - guint16 arType; + uint8_t devicemac[6]; + uint16_t devicealarmref; + uint16_t arType; } pnio_ar_t; @@ -3852,13 +4043,13 @@ pnio_ar_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pnio_ar_t *ar) static int dissect_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar); + packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t *u16Index, uint32_t *u32RecDataLen, pnio_ar_t **ar); static int dissect_a_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep); + packet_info *pinfo, proto_tree *tree, uint8_t *drep); static int dissect_PNIO_IOxS(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex); + packet_info *pinfo, proto_tree *tree, uint8_t *drep, int hfindex); @@ -3905,13 +4096,13 @@ pnio_ar_new(e_guid_t *aruuid) /* dissect the alarm specifier */ static int dissect_Alarm_specifier(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) + packet_info *pinfo, proto_tree *tree, uint8_t *drep) { - guint16 u16AlarmSpecifierSequence; - guint16 u16AlarmSpecifierChannel; - guint16 u16AlarmSpecifierManufacturer; - guint16 u16AlarmSpecifierSubmodule; - guint16 u16AlarmSpecifierAR; + uint16_t u16AlarmSpecifierSequence; + uint16_t u16AlarmSpecifierChannel; + uint16_t u16AlarmSpecifierManufacturer; + uint16_t u16AlarmSpecifierSubmodule; + uint16_t u16AlarmSpecifierAR; proto_item *sub_item; proto_tree *sub_tree; @@ -3947,12 +4138,12 @@ dissect_Alarm_specifier(tvbuff_t *tvb, int offset, /* dissect the alarm header */ static int dissect_Alarm_header(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep) { - guint16 u16AlarmType; - guint32 u32Api; - guint16 u16SlotNr; - guint16 u16SubslotNr; + uint16_t u16AlarmType; + uint32_t u32Api; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_alarm_type, &u16AlarmType); @@ -3977,11 +4168,11 @@ dissect_Alarm_header(tvbuff_t *tvb, int offset, static int dissect_ChannelProperties(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep) { proto_item *sub_item; proto_tree *sub_tree; - guint16 u16ChannelProperties; + uint16_t u16ChannelProperties; sub_item = proto_tree_add_item(tree, hf_pn_io_channel_properties, tvb, offset, 2, ENC_BIG_ENDIAN); @@ -4003,12 +4194,12 @@ dissect_ChannelProperties(tvbuff_t *tvb, int offset, /* dissect the RS_BlockHeader */ static int dissect_RS_BlockHeader(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep, - guint16 *u16RSBodyLength, guint16 *u16RSBlockType) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item, uint8_t *drep, + uint16_t *u16RSBodyLength, uint16_t *u16RSBlockType) { - guint16 u16RSBlockLength; - guint8 u8BlockVersionHigh; - guint8 u8BlockVersionLow; + uint16_t u16RSBlockLength; + uint8_t u8BlockVersionHigh; + uint8_t u8BlockVersionLow; /* u16RSBlockType is needed for further dissection */ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, @@ -4041,13 +4232,13 @@ dissect_RS_BlockHeader(tvbuff_t *tvb, int offset, static int dissect_RS_AddressInfo(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, guint8 *drep, guint16 *u16RSBodyLength) + packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep, uint16_t *u16RSBodyLength) { e_guid_t IM_UniqueIdentifier; - guint32 u32Api; - guint16 u16SlotNr; - guint16 u16SubslotNr; - guint16 u16ChannelNumber; + uint32_t u32Api; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; + uint16_t u16ChannelNumber; /* IM_UniqueIdentifier */ offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep, @@ -4080,19 +4271,19 @@ dissect_RS_AddressInfo(tvbuff_t *tvb, int offset, /* dissect the RS_EventDataCommon */ static int dissect_RS_EventDataCommon(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, guint8 *drep, guint16 *u16RSBodyLength) + packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep, uint16_t *u16RSBodyLength) { - guint16 u16RSSpecifierSequenceNumber; - guint16 u16RSSpecifierReserved; - guint16 u16RSSpecifierSpecifier; - guint16 u16RSMinorError; - guint16 u16RSPlusError; + uint16_t u16RSSpecifierSequenceNumber; + uint16_t u16RSSpecifierReserved; + uint16_t u16RSSpecifierSpecifier; + uint16_t u16RSMinorError; + uint16_t u16RSPlusError; proto_item *sub_item; proto_tree *sub_tree; proto_item *sub_item_time_stamp; proto_tree *sub_tree_time_stamp; nstime_t timestamp; - guint16 u16RSTimeStampStatus; + uint16_t u16RSTimeStampStatus; /* RS_AddressInfo */ offset = dissect_RS_AddressInfo(tvb, offset, pinfo, tree, drep, u16RSBodyLength); @@ -4151,14 +4342,14 @@ dissect_RS_EventDataCommon(tvbuff_t *tvb, int offset, /* dissect the RS_IdentificationInfo */ static int dissect_RS_IdentificationInfo(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) + packet_info *pinfo, proto_tree *tree, uint8_t *drep) { dcerpc_info di; /* fake dcerpc_info struct */ dcerpc_call_value dcv; /* fake dcerpc_call_value struct */ - guint64 u64AMDeviceIdentificationDeviceSubID; - guint64 u64AMDeviceIdentificationDeviceID; - guint64 u64AMDeviceIdentificationVendorID; - guint64 u64AM_DeviceIdentificationOrganization; + uint64_t u64AMDeviceIdentificationDeviceSubID; + uint64_t u64AMDeviceIdentificationDeviceID; + uint64_t u64AMDeviceIdentificationVendorID; + uint64_t u64AM_DeviceIdentificationOrganization; proto_item *sub_item; proto_tree *sub_tree; @@ -4192,20 +4383,20 @@ dissect_RS_IdentificationInfo(tvbuff_t *tvb, int offset, /* dissect the RS_EventDataExtension_Data */ static int dissect_RS_EventDataExtension_Data(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep, - guint8 *u8RSExtensionBlockLength, guint16 *u16RSBlockType) + packet_info *pinfo, proto_tree *tree, uint8_t *drep, + uint8_t *u8RSExtensionBlockLength, uint16_t *u16RSBlockType) { - guint32 u32RSReasonCodeReason; - guint32 u32RSReasonCodeDetail; - guint8 u8LengthRSDomainIdentification = 16; - guint8 u8LengthRSMasterIdentification = 8; - guint16 u16SoE_DigitalInputCurrentValueValue; - guint16 u16SoE_DigitalInputCurrentValueReserved; + uint32_t u32RSReasonCodeReason; + uint32_t u32RSReasonCodeDetail; + uint8_t u8LengthRSDomainIdentification = 16; + uint8_t u8LengthRSMasterIdentification = 8; + uint16_t u16SoE_DigitalInputCurrentValueValue; + uint16_t u16SoE_DigitalInputCurrentValueReserved; proto_item *sub_item; proto_tree *sub_tree; nstime_t timestamp; - guint16 u16RSTimeStampStatus; + uint16_t u16RSTimeStampStatus; proto_item *sub_item_time_stamp; proto_tree *sub_tree_time_stamp; @@ -4294,10 +4485,10 @@ dissect_RS_EventDataExtension_Data(tvbuff_t *tvb, int offset, /* dissect the RS_EventDataExtension */ static int dissect_RS_EventDataExtension(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, - proto_tree *tree, guint8 *drep, guint16 *u16RSBlockLength, guint16 *u16RSBlockType) + proto_tree *tree, uint8_t *drep, uint16_t *u16RSBlockLength, uint16_t *u16RSBlockType) { - guint8 u8RSExtensionBlockType; - guint8 u8RSExtensionBlockLength; + uint8_t u8RSExtensionBlockType; + uint8_t u8RSExtensionBlockLength; /* RS_ExtensionBlockType */ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, @@ -4322,8 +4513,8 @@ dissect_RS_EventDataExtension(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, /* dissect the RS_EventData */ static int dissect_RS_EventData(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, guint8 *drep, - guint16 *u16RSBodyLength, guint16 *u16RSBlockType) + packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep, + uint16_t *u16RSBodyLength, uint16_t *u16RSBlockType) { proto_item *sub_item; proto_tree *sub_tree; @@ -4345,13 +4536,13 @@ dissect_RS_EventData(tvbuff_t *tvb, int offset, /* dissect the RS_EventBlock */ static int dissect_RS_EventBlock(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, guint8 *drep) + packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep) { proto_item *sub_item; proto_tree *sub_tree; - guint16 u16RSBodyLength; - guint16 u16RSBlockType; + uint16_t u16RSBodyLength; + uint16_t u16RSBlockType; sub_item = proto_tree_add_item(tree, hf_pn_io_rs_event_block, tvb, offset, 0, ENC_NA); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_event_block); @@ -4369,11 +4560,11 @@ dissect_RS_EventBlock(tvbuff_t *tvb, int offset, /* dissect the RS_AlarmInfo */ static int dissect_RS_AlarmInfo(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, guint8 *drep) + packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep) { proto_item *sub_item; proto_tree *sub_tree; - guint16 u16RSAlarmInfo; + uint16_t u16RSAlarmInfo; sub_item = proto_tree_add_item(tree, hf_pn_io_rs_alarm_info, tvb, offset, 2, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_alarm_info); @@ -4390,11 +4581,11 @@ dissect_RS_AlarmInfo(tvbuff_t *tvb, int offset, /* dissect the RS_EventInfo */ static int dissect_RS_EventInfo(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, guint8 *drep) + packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep) { proto_item *sub_item; proto_tree *sub_tree; - guint16 u16NumberofEntries; + uint16_t u16NumberofEntries; sub_item = proto_tree_add_item(tree, hf_pn_io_rs_event_info, tvb, offset, 0, ENC_NA); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_event_info); @@ -4411,13 +4602,13 @@ dissect_RS_EventInfo(tvbuff_t *tvb, int offset, static int dissect_Diagnosis(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, - proto_tree *tree, proto_item *item, guint8 *drep, guint16 u16UserStructureIdentifier) + proto_tree *tree, proto_item *item, uint8_t *drep, uint16_t u16UserStructureIdentifier) { - guint16 u16ChannelNumber; - guint16 u16ChannelErrorType; - guint16 u16ExtChannelErrorType; - guint32 u32ExtChannelAddValue; - guint32 u32QualifiedChannelQualifier; + uint16_t u16ChannelNumber; + uint16_t u16ChannelErrorType; + uint16_t u16ExtChannelErrorType; + uint32_t u32ExtChannelAddValue; + uint32_t u32QualifiedChannelQualifier; offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_channel_number, &u16ChannelNumber); @@ -4521,11 +4712,11 @@ dissect_Diagnosis(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_AlarmUserStructure(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, - guint16 *body_length, guint16 u16UserStructureIdentifier) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, + uint16_t *body_length, uint16_t u16UserStructureIdentifier) { - guint16 u16Index = 0; - guint32 u32RecDataLen; + uint16_t u16Index = 0; + uint32_t u32RecDataLen; pnio_ar_t *ar = NULL; switch (u16UserStructureIdentifier) { @@ -4583,12 +4774,12 @@ dissect_AlarmUserStructure(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_AlarmNotification_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 body_length) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t body_length) { - guint32 u32ModuleIdentNumber; - guint32 u32SubmoduleIdentNumber; - guint16 u16UserStructureIdentifier; + uint32_t u32ModuleIdentNumber; + uint32_t u32SubmoduleIdentNumber; + uint16_t u16UserStructureIdentifier; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -4631,21 +4822,21 @@ dissect_AlarmNotification_block(tvbuff_t *tvb, int offset, static int dissect_IandM0_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint8 u8VendorIDHigh; - guint8 u8VendorIDLow; - guint16 u16IMHardwareRevision; - guint8 u8SWRevisionPrefix; - guint8 u8IMSWRevisionFunctionalEnhancement; - guint8 u8IMSWRevisionBugFix; - guint8 u8IMSWRevisionInternalChange; - guint16 u16IMRevisionCounter; - guint16 u16IMProfileID; - guint16 u16IMProfileSpecificType; - guint8 u8IMVersionMajor; - guint8 u8IMVersionMinor; - guint16 u16IMSupported; + uint8_t u8VendorIDHigh; + uint8_t u8VendorIDLow; + uint16_t u16IMHardwareRevision; + uint8_t u8SWRevisionPrefix; + uint8_t u8IMSWRevisionFunctionalEnhancement; + uint8_t u8IMSWRevisionBugFix; + uint8_t u8IMSWRevisionInternalChange; + uint16_t u16IMRevisionCounter; + uint16_t u16IMProfileID; + uint16_t u16IMProfileSpecificType; + uint8_t u8IMVersionMajor; + uint8_t u8IMVersionMinor; + uint16_t u16IMSupported; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -4708,7 +4899,7 @@ dissect_IandM0_block(tvbuff_t *tvb, int offset, static int dissect_IandM1_block(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { char *pTagFunction; char *pTagLocation; @@ -4735,7 +4926,7 @@ dissect_IandM1_block(tvbuff_t *tvb, int offset, static int dissect_IandM2_block(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { char *pDate; @@ -4757,7 +4948,7 @@ dissect_IandM2_block(tvbuff_t *tvb, int offset, static int dissect_IandM3_block(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { char *pDescriptor; @@ -4779,7 +4970,7 @@ dissect_IandM3_block(tvbuff_t *tvb, int offset, static int dissect_IandM4_block(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -4796,9 +4987,9 @@ dissect_IandM4_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_IandM5_block(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberofEntries; + uint16_t u16NumberofEntries; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -4817,21 +5008,21 @@ dissect_IandM5_block(tvbuff_t *tvb, int offset, static int dissect_IandM0FilterData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberOfAPIs; - guint32 u32Api; - guint16 u16NumberOfModules; - guint16 u16SlotNr; - guint32 u32ModuleIdentNumber; - guint16 u16NumberOfSubmodules; - guint16 u16SubslotNr; - guint32 u32SubmoduleIdentNumber; + uint16_t u16NumberOfAPIs; + uint32_t u32Api; + uint16_t u16NumberOfModules; + uint16_t u16SlotNr; + uint32_t u32ModuleIdentNumber; + uint16_t u16NumberOfSubmodules; + uint16_t u16SubslotNr; + uint32_t u32SubmoduleIdentNumber; proto_item *subslot_item; proto_tree *subslot_tree; proto_item *module_item; proto_tree *module_tree; - guint32 u32ModuleStart; + uint32_t u32ModuleStart; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -4896,15 +5087,15 @@ dissect_IandM0FilterData_block(tvbuff_t *tvb, int offset, static int dissect_IandM5Data_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep) { - guint8 u8VendorIDHigh; - guint8 u8VendorIDLow; - guint16 u16IMHardwareRevision; - guint8 u8SWRevisionPrefix; - guint8 u8IMSWRevisionFunctionalEnhancement; - guint8 u8IMSWRevisionBugFix; - guint8 u8IMSWRevisionInternalChange; + uint8_t u8VendorIDHigh; + uint8_t u8VendorIDLow; + uint16_t u16IMHardwareRevision; + uint8_t u8SWRevisionPrefix; + uint8_t u8IMSWRevisionFunctionalEnhancement; + uint8_t u8IMSWRevisionBugFix; + uint8_t u8IMSWRevisionInternalChange; /* c8[64] IM Annotation */ proto_tree_add_item(tree, hf_pn_io_im_annotation, tvb, offset, 64, ENC_ASCII); @@ -4947,25 +5138,25 @@ dissect_IandM5Data_block(tvbuff_t *tvb, int offset, static int dissect_AM_Location(tvbuff_t *tvb, int offset, -packet_info *pinfo, proto_tree *tree, guint8 *drep) +packet_info *pinfo, proto_tree *tree, uint8_t *drep) { proto_item *sub_item; proto_tree *sub_tree; - guint8 am_location_structtype; + uint8_t am_location_structtype; int bit_offset; - guint8 am_location_reserved1; - guint16 am_location_begin_slot_number; - guint16 am_location_begin_subslot_number; - guint16 am_location_end_slot_number; - guint16 am_location_end_subslot_number; - guint16 am_location_reserved2; - guint16 am_location_reserved3; - guint16 am_location_reserved4; + uint8_t am_location_reserved1; + uint16_t am_location_begin_slot_number; + uint16_t am_location_begin_subslot_number; + uint16_t am_location_end_slot_number; + uint16_t am_location_end_subslot_number; + uint16_t am_location_reserved2; + uint16_t am_location_reserved3; + uint16_t am_location_reserved4; sub_item = proto_tree_add_item(tree, hf_pn_io_am_location, tvb, offset, 16, ENC_NA); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_am_location); - am_location_structtype = tvb_get_guint8(tvb, offset+15); + am_location_structtype = tvb_get_uint8(tvb, offset+15); bit_offset = offset << 3; switch (am_location_structtype) @@ -5074,12 +5265,12 @@ packet_info *pinfo, proto_tree *tree, guint8 *drep) static int dissect_IM_software_revision(tvbuff_t *tvb, int offset, -packet_info *pinfo, proto_tree *tree, guint8 *drep) +packet_info *pinfo, proto_tree *tree, uint8_t *drep) { - guint8 u8SWRevisionPrefix; - guint8 u8IMSWRevisionFunctionalEnhancement; - guint8 u8IMSWRevisionBugFix; - guint8 u8IMSWRevisionInternalChange; + uint8_t u8SWRevisionPrefix; + uint8_t u8IMSWRevisionFunctionalEnhancement; + uint8_t u8IMSWRevisionBugFix; + uint8_t u8IMSWRevisionInternalChange; /* SWRevisionPrefix */ offset = dissect_dcerpc_char(tvb, offset, pinfo, tree, drep, @@ -5102,14 +5293,14 @@ packet_info *pinfo, proto_tree *tree, guint8 *drep) static int dissect_AM_device_identification(tvbuff_t *tvb, int offset, -packet_info *pinfo, proto_tree *tree, guint8 *drep) +packet_info *pinfo, proto_tree *tree, uint8_t *drep) { dcerpc_info di; /* fake dcerpc_info struct */ dcerpc_call_value dcv; /* fake dcerpc_call_value struct */ - guint64 u64AMDeviceIdentificationDeviceSubID; - guint64 u64AMDeviceIdentificationDeviceID; - guint64 u64AMDeviceIdentificationVendorID; - guint64 u64AM_DeviceIdentificationOrganization; + uint64_t u64AMDeviceIdentificationDeviceSubID; + uint64_t u64AMDeviceIdentificationDeviceID; + uint64_t u64AMDeviceIdentificationVendorID; + uint64_t u64AM_DeviceIdentificationOrganization; proto_item *sub_item; proto_tree *sub_tree; @@ -5132,12 +5323,12 @@ packet_info *pinfo, proto_tree *tree, guint8 *drep) static int dissect_AM_FullInformation_block(tvbuff_t *tvb, int offset, -packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, -guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) +packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, +uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { e_guid_t IM_UniqueIdentifier; - guint16 u16AM_TypeIdentification; - guint16 u16IMHardwareRevision; + uint16_t u16AM_TypeIdentification; + uint16_t u16IMHardwareRevision; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -5194,12 +5385,12 @@ guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) static int dissect_AM_HardwareOnlyInformation_block(tvbuff_t *tvb, int offset, -packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, -guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) +packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, +uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { e_guid_t IM_UniqueIdentifier; - guint16 u16AM_TypeIdentification; - guint16 u16IMHardwareRevision; + uint16_t u16AM_TypeIdentification; + uint16_t u16IMHardwareRevision; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -5249,12 +5440,12 @@ guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) static int dissect_AM_FirmwareOnlyInformation_block(tvbuff_t *tvb, int offset, -packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, -guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) +packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, +uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { e_guid_t IM_UniqueIdentifier; - guint16 u16AM_TypeIdentification; - guint16 u16AM_Reserved; + uint16_t u16AM_TypeIdentification; + uint16_t u16AM_Reserved; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -5308,11 +5499,11 @@ guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) static int // NOLINTNEXTLINE(misc-no-recursion) dissect_AssetManagementInfo(tvbuff_t *tvb, int offset, -packet_info *pinfo _U_, proto_tree *tree, guint8 *drep) +packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep) { proto_item *sub_item; proto_tree *sub_tree; - guint16 u16NumberofEntries; + uint16_t u16NumberofEntries; sub_item = proto_tree_add_item(tree, hf_pn_io_asset_management_info, tvb, offset, 0, ENC_NA); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_asset_management_info); @@ -5331,8 +5522,8 @@ packet_info *pinfo _U_, proto_tree *tree, guint8 *drep) static int // NOLINTNEXTLINE(misc-no-recursion) dissect_AssetManagementData_block(tvbuff_t *tvb, int offset, -packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, -guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) +packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, +uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -5348,19 +5539,19 @@ guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) /* dissect the IdentificationData block */ static int dissect_IdentificationData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberOfAPIs = 1; - guint32 u32Api; - guint16 u16NumberOfSlots; - guint16 u16SlotNr; - guint32 u32ModuleIdentNumber; - guint16 u16NumberOfSubslots; - guint32 u32SubmoduleIdentNumber; - guint16 u16SubslotNr; + uint16_t u16NumberOfAPIs = 1; + uint32_t u32Api; + uint16_t u16NumberOfSlots; + uint16_t u16SlotNr; + uint32_t u32ModuleIdentNumber; + uint16_t u16NumberOfSubslots; + uint32_t u32SubmoduleIdentNumber; + uint16_t u16SubslotNr; proto_item *slot_item; proto_tree *slot_tree; - guint32 u32SlotStart; + uint32_t u32SlotStart; proto_item *subslot_item; proto_tree *subslot_tree; @@ -5436,10 +5627,10 @@ dissect_IdentificationData_block(tvbuff_t *tvb, int offset, /* dissect the substitute value block */ static int dissect_SubstituteValue_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { - guint16 u16SubstitutionMode; + uint16_t u16SubstitutionMode; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -5466,11 +5657,11 @@ dissect_SubstituteValue_block(tvbuff_t *tvb, int offset, /* dissect the RecordInputDataObjectElement block */ static int dissect_RecordInputDataObjectElement_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint8 u8LengthIOCS; - guint8 u8LengthIOPS; - guint16 u16LengthData; + uint8_t u8LengthIOCS; + uint8_t u8LengthIOPS; + uint16_t u16LengthData; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -5503,14 +5694,14 @@ dissect_RecordInputDataObjectElement_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_RecordOutputDataObjectElement_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16SubstituteActiveFlag; - guint8 u8LengthIOCS; - guint8 u8LengthIOPS; - guint16 u16LengthData; - guint16 u16Index = 0; - guint32 u32RecDataLen; + uint16_t u16SubstituteActiveFlag; + uint8_t u8LengthIOCS; + uint8_t u8LengthIOPS; + uint16_t u16LengthData; + uint16_t u16Index = 0; + uint32_t u32RecDataLen; pnio_ar_t *ar = NULL; @@ -5550,7 +5741,7 @@ dissect_RecordOutputDataObjectElement_block(tvbuff_t *tvb, int offset, /* dissect the alarm acknowledge block */ static int dissect_Alarm_ack_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -5573,11 +5764,11 @@ dissect_Alarm_ack_block(tvbuff_t *tvb, int offset, /* dissect the maintenance block */ static int dissect_Maintenance_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { proto_item *sub_item; proto_tree *sub_tree; - guint32 u32MaintenanceStatus; + uint32_t u32MaintenanceStatus; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -5612,11 +5803,11 @@ dissect_Maintenance_block(tvbuff_t *tvb, int offset, /* dissect the pe_alarm block */ static int dissect_PE_Alarm_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { proto_item *sub_item; proto_tree *sub_tree; - guint8 u8PEOperationalMode; + uint8_t u8PEOperationalMode; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -5638,12 +5829,12 @@ dissect_PE_Alarm_block(tvbuff_t* tvb, int offset, /* dissect the read/write header */ static int dissect_ReadWrite_header(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint16 *u16Index, e_guid_t *aruuid) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint16_t *u16Index, e_guid_t *aruuid) { - guint32 u32Api; - guint16 u16SlotNr; - guint16 u16SubslotNr; - guint16 u16SeqNr; + uint32_t u32Api; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; + uint16_t u16SeqNr; offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_seq_number, &u16SeqNr); @@ -5676,8 +5867,8 @@ dissect_ReadWrite_header(tvbuff_t *tvb, int offset, /* dissect the write request block */ static int dissect_IODWriteReqHeader_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t ** ar) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t *u16Index, uint32_t *u32RecDataLen, pnio_ar_t ** ar) { e_guid_t aruuid; e_guid_t null_uuid; @@ -5717,8 +5908,8 @@ dissect_IODWriteReqHeader_block(tvbuff_t *tvb, int offset, /* dissect the read request block */ static int dissect_IODReadReqHeader_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t *u16Index, uint32_t *u32RecDataLen, pnio_ar_t **ar) { e_guid_t aruuid; e_guid_t null_uuid; @@ -5759,13 +5950,13 @@ dissect_IODReadReqHeader_block(tvbuff_t *tvb, int offset, /* dissect the write response block */ static int dissect_IODWriteResHeader_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t *u16Index, uint32_t *u32RecDataLen, pnio_ar_t **ar) { e_guid_t aruuid; - guint16 u16AddVal1; - guint16 u16AddVal2; - guint32 u32Status; + uint16_t u16AddVal1; + uint16_t u16AddVal2; + uint32_t u32Status; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -5810,12 +6001,12 @@ dissect_IODWriteResHeader_block(tvbuff_t *tvb, int offset, /* dissect the read response block */ static int dissect_IODReadResHeader_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t *u16Index, uint32_t *u32RecDataLen, pnio_ar_t **ar) { e_guid_t aruuid; - guint16 u16AddVal1; - guint16 u16AddVal2; + uint16_t u16AddVal1; + uint16_t u16AddVal2; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -5854,15 +6045,15 @@ dissect_IODReadResHeader_block(tvbuff_t *tvb, int offset, /* dissect the control/connect and control/connect block */ static int dissect_ControlPlugOrConnect_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - pnio_ar_t **ar, guint16 blocktype) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + pnio_ar_t **ar, uint16_t blocktype) { e_guid_t ar_uuid; - guint16 u16SessionKey; + uint16_t u16SessionKey; proto_item *sub_item; proto_tree *sub_tree; - guint16 u16Command; - guint16 u16Properties; + uint16_t u16Command; + uint16_t u16Properties; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -5970,12 +6161,12 @@ dissect_ControlPlugOrConnect_block(tvbuff_t *tvb, int offset, /* dissect the ControlBlockPrmBegin block */ static int dissect_ControlBlockPrmBegin(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint32 u32RecDataLen, + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint32_t u32RecDataLen, pnio_ar_t **ar) { e_guid_t ar_uuid; - guint16 u16SessionKey; - guint16 u16Command; + uint16_t u16SessionKey; + uint16_t u16Command; proto_item *sub_item; proto_tree *sub_tree; @@ -6037,13 +6228,13 @@ dissect_ControlBlockPrmBegin(tvbuff_t *tvb, int offset, /* dissect the SubmoduleListBlock block */ static int dissect_SubmoduleListBlock(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint32 u32RecDataLen _U_, + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint32_t u32RecDataLen _U_, pnio_ar_t **ar _U_) { - guint16 u16Entries; - guint32 u32API; - guint16 u16SlotNumber; - guint16 u16SubSlotNumber; + uint16_t u16Entries; + uint32_t u32API; + uint16_t u16SlotNumber; + uint16_t u16SubSlotNumber; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -6070,7 +6261,7 @@ dissect_SubmoduleListBlock(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_PDevData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -6089,10 +6280,10 @@ dissect_PDevData_block(tvbuff_t *tvb, int offset, /* dissect the AdjustPreambleLength block */ static int dissect_AdjustPreambleLength_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16AdjustProperties; - guint16 u16PreambleLength; + uint16_t u16AdjustProperties; + uint16_t u16PreambleLength; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -6117,9 +6308,9 @@ dissect_AdjustPreambleLength_block(tvbuff_t *tvb, int offset, /* dissect the dissect_CheckMAUTypeExtension_block block */ static int dissect_CheckMAUTypeExtension_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16MauTypeExtension; + uint16_t u16MauTypeExtension; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -6137,11 +6328,11 @@ dissect_CheckMAUTypeExtension_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_PDPortData_Adjust_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { - guint16 u16SlotNr; - guint16 u16SubslotNr; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; tvbuff_t *new_tvb; @@ -6178,11 +6369,11 @@ dissect_PDPortData_Adjust_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_PDPortData_Check_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { - guint16 u16SlotNr; - guint16 u16SubslotNr; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; tvbuff_t *new_tvb; @@ -6216,13 +6407,13 @@ dissect_PDPortData_Check_block(tvbuff_t *tvb, int offset, /* dissect the Line Delay */ static int -dissect_Line_Delay(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, - guint32 *u32LineDelayValue) +dissect_Line_Delay(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, uint8_t *drep, + uint32_t *u32LineDelayValue) { proto_item *sub_item; proto_tree *sub_tree; - guint32 u32FormatIndicator; - guint8 isFormatIndicatorEnabled; + uint32_t u32FormatIndicator; + uint8_t isFormatIndicatorEnabled; sub_item = proto_tree_add_item(tree, hf_pn_io_line_delay, tvb, offset, 4, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_line_delay); @@ -6230,7 +6421,7 @@ dissect_Line_Delay(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_line_delay_format_indicator, &u32FormatIndicator); - isFormatIndicatorEnabled = (guint8)((u32FormatIndicator >> 31) & 0x01); + isFormatIndicatorEnabled = (uint8_t)((u32FormatIndicator >> 31) & 0x01); if (isFormatIndicatorEnabled) { offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, @@ -6248,28 +6439,28 @@ dissect_Line_Delay(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr /* dissect the PDPortDataReal blocks */ static int dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16SlotNr; - guint16 u16SubslotNr; - guint8 u8LengthOwnPortID; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; + uint8_t u8LengthOwnPortID; char *pOwnPortID; proto_item *sub_item; proto_tree *sub_tree; - guint8 u8NumberOfPeers; - guint8 u8I; - guint8 u8LengthPeerPortID; - guint8 u8LengthPeerChassisID; - guint8 mac[6]; + uint8_t u8NumberOfPeers; + uint8_t u8I; + uint8_t u8LengthPeerPortID; + uint8_t u8LengthPeerChassisID; + uint8_t mac[6]; char *pPeerChassisId; char *pPeerPortId; - guint16 u16MAUType; - guint32 u32DomainBoundary; - guint32 u32MulticastBoundary; - guint8 u8LinkStatePort; - guint8 u8LinkStateLink; - guint32 u32MediaType; - guint32 u32LineDelayValue; + uint16_t u16MAUType; + uint32_t u32DomainBoundary; + uint32_t u32MulticastBoundary; + uint8_t u8LinkStatePort; + uint8_t u8LinkStateLink; + uint32_t u32MediaType; + uint32_t u32LineDelayValue; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -6376,12 +6567,12 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_PDPortDataRealExtended_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, - proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) + proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength) { - guint16 u16SlotNr; - guint16 u16SubslotNr; - guint16 u16Index = 0; - guint32 u32RecDataLen; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; + uint16_t u16Index = 0; + uint32_t u32RecDataLen; pnio_ar_t *ar = NULL; int endoffset = offset + u16BodyLength; @@ -6413,12 +6604,12 @@ dissect_PDPortDataRealExtended_block(tvbuff_t *tvb, int offset, packet_info *pin static int // NOLINTNEXTLINE(misc-no-recursion) dissect_PDInterfaceMrpDataAdjust_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength) { e_guid_t uuid; - guint16 u16Role; - guint8 u8LengthDomainName; - guint8 u8NumberOfMrpInstances; + uint16_t u16Role; + uint8_t u8LengthDomainName; + uint8_t u8NumberOfMrpInstances; int endoffset = offset + u16BodyLength; @@ -6498,13 +6689,13 @@ dissect_PDInterfaceMrpDataAdjust_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_PDInterfaceMrpDataReal_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength) { e_guid_t uuid; - guint16 u16Role; - guint16 u16Version; - guint8 u8LengthDomainName; - guint8 u8NumberOfMrpInstances; + uint16_t u16Role; + uint16_t u16Version; + uint8_t u8LengthDomainName; + uint8_t u8NumberOfMrpInstances; int endoffset = offset + u16BodyLength; /* added blockversion 1 */ @@ -6576,11 +6767,11 @@ dissect_PDInterfaceMrpDataReal_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_PDInterfaceMrpDataCheck_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { e_guid_t uuid; - guint32 u32Check; - guint8 u8NumberOfMrpInstances; + uint32_t u32Check; + uint8_t u8NumberOfMrpInstances; /* BlockVersionLow == 1 added */ if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) { @@ -6633,10 +6824,10 @@ dissect_PDInterfaceMrpDataCheck_block(tvbuff_t *tvb, int offset, static int dissect_PDPortMrpData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { e_guid_t uuid; - guint8 u8MrpInstance; + uint8_t u8MrpInstance; /* added BlockVersionLow == 1 */ if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) { @@ -6664,14 +6855,14 @@ dissect_PDPortMrpData_block(tvbuff_t *tvb, int offset, static int dissect_MrpManagerParams_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16Prio; - guint16 u16TOPchgT; - guint16 u16TOPNRmax; - guint16 u16TSTshortT; - guint16 u16TSTdefaultT; - guint16 u16TSTNRmax; + uint16_t u16Prio; + uint16_t u16TOPchgT; + uint16_t u16TOPNRmax; + uint16_t u16TSTshortT; + uint16_t u16TSTdefaultT; + uint16_t u16TSTNRmax; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -6707,11 +6898,11 @@ dissect_MrpManagerParams_block(tvbuff_t *tvb, int offset, static int dissect_MrpRTMode(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep) { proto_item *sub_item; proto_tree *sub_tree; - guint32 u32RTMode; + uint32_t u32RTMode; /* MRP_RTMode */ @@ -6733,10 +6924,10 @@ dissect_MrpRTMode(tvbuff_t *tvb, int offset, static int dissect_MrpRTModeManagerData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16TSTNRmax; - guint16 u16TSTdefaultT; + uint16_t u16TSTNRmax; + uint16_t u16TSTdefaultT; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -6763,9 +6954,9 @@ dissect_MrpRTModeManagerData_block(tvbuff_t *tvb, int offset, static int dissect_MrpRingStateData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16RingState; + uint16_t u16RingState; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -6784,9 +6975,9 @@ dissect_MrpRingStateData_block(tvbuff_t *tvb, int offset, static int dissect_MrpRTStateData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16RTState; + uint16_t u16RTState; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -6805,11 +6996,11 @@ dissect_MrpRTStateData_block(tvbuff_t *tvb, int offset, static int dissect_MrpClientParams_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16MRP_LNKdownT; - guint16 u16MRP_LNKupT; - guint16 u16MRP_LNKNRmax; + uint16_t u16MRP_LNKdownT; + uint16_t u16MRP_LNKupT; + uint16_t u16MRP_LNKNRmax; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -6834,7 +7025,7 @@ dissect_MrpClientParams_block(tvbuff_t *tvb, int offset, static int dissect_MrpRTModeClientData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { offset = dissect_pn_align4(tvb, offset, pinfo, tree); @@ -6853,11 +7044,11 @@ dissect_MrpRTModeClientData_block(tvbuff_t *tvb, int offset, static int dissect_CheckSyncDifference_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { proto_item *sub_item; proto_tree *sub_tree; - guint16 u16CheckSyncMode; + uint16_t u16CheckSyncMode; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -6889,9 +7080,9 @@ dissect_CheckSyncDifference_block(tvbuff_t *tvb, int offset, static int dissect_CheckMAUTypeDifference_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16MAUTypeMode; + uint16_t u16MAUTypeMode; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -6912,12 +7103,12 @@ dissect_CheckMAUTypeDifference_block(tvbuff_t *tvb, int offset, /* dissect the AdjustDomainBoundary blocks */ static int dissect_AdjustDomainBoundary_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint32 u32DomainBoundary; - guint32 u32DomainBoundaryIngress; - guint32 u32DomainBoundaryEgress; - guint16 u16AdjustProperties; + uint32_t u32DomainBoundary; + uint32_t u32DomainBoundaryIngress; + uint32_t u32DomainBoundaryEgress; + uint16_t u16AdjustProperties; if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) { @@ -6974,10 +7165,10 @@ dissect_AdjustDomainBoundary_block(tvbuff_t *tvb, int offset, /* dissect the AdjustMulticastBoundary blocks */ static int dissect_AdjustMulticastBoundary_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint32 u32MulticastBoundary; - guint16 u16AdjustProperties; + uint32_t u32MulticastBoundary; + uint16_t u16AdjustProperties; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7005,10 +7196,10 @@ dissect_AdjustMulticastBoundary_block(tvbuff_t *tvb, int offset, /* dissect the AdjustMAUType block */ static int dissect_AdjustMAUType_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16MAUType; - guint16 u16AdjustProperties; + uint16_t u16MAUType; + uint16_t u16AdjustProperties; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7037,9 +7228,9 @@ dissect_AdjustMAUType_block(tvbuff_t *tvb, int offset, /* dissect the CheckMAUType block */ static int dissect_CheckMAUType_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16MAUType; + uint16_t u16MAUType; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7062,9 +7253,9 @@ dissect_CheckMAUType_block(tvbuff_t *tvb, int offset, /* dissect the CheckLineDelay block */ static int dissect_CheckLineDelay_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint32 u32LineDelay; + uint32_t u32LineDelay; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7087,12 +7278,12 @@ dissect_CheckLineDelay_block(tvbuff_t *tvb, int offset, /* dissect the CheckPeers block */ static int dissect_CheckPeers_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint8 u8NumberOfPeers; - guint8 u8I; - guint8 u8LengthPeerPortID; - guint8 u8LengthPeerChassisID; + uint8_t u8NumberOfPeers; + uint8_t u8I; + uint8_t u8LengthPeerPortID; + uint8_t u8LengthPeerChassisID; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7131,10 +7322,10 @@ dissect_CheckPeers_block(tvbuff_t *tvb, int offset, /* dissect the AdjustPortState block */ static int dissect_AdjustPortState_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16PortState; - guint16 u16AdjustProperties; + uint16_t u16PortState; + uint16_t u16AdjustProperties; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7163,9 +7354,9 @@ dissect_AdjustPortState_block(tvbuff_t *tvb, int offset, /* dissect the CheckPortState block */ static int dissect_CheckPortState_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16PortState; + uint16_t u16PortState; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7188,13 +7379,13 @@ dissect_CheckPortState_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_PDPortFODataReal_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { - guint32 u32FiberOpticType; - guint32 u32FiberOpticCableType; - guint16 u16Index = 0; - guint32 u32RecDataLen; + uint32_t u32FiberOpticType; + uint32_t u32FiberOpticCableType; + uint16_t u16Index = 0; + uint32_t u32RecDataLen; pnio_ar_t *ar = NULL; @@ -7227,12 +7418,12 @@ dissect_PDPortFODataReal_block(tvbuff_t *tvb, int offset, /* dissect the FiberOpticManufacturerSpecific block */ static int dissect_FiberOpticManufacturerSpecific_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { - guint8 u8VendorIDHigh; - guint8 u8VendorIDLow; - guint16 u16VendorBlockType; + uint8_t u8VendorIDHigh; + uint8_t u8VendorIDLow; + uint16_t u16VendorBlockType; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7261,9 +7452,9 @@ dissect_FiberOpticManufacturerSpecific_block(tvbuff_t *tvb, int offset, /* dissect the FiberOpticDiagnosisInfo block */ static int dissect_FiberOpticDiagnosisInfo_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint32 u32FiberOpticPowerBudget; + uint32_t u32FiberOpticPowerBudget; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7284,10 +7475,10 @@ dissect_FiberOpticDiagnosisInfo_block(tvbuff_t *tvb, int offset, /* dissect the AdjustMAUTypeExtension block */ static int dissect_AdjustMAUTypeExtension_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16MauTypeExtension; - guint16 u16AdjustProperties; + uint16_t u16MauTypeExtension; + uint16_t u16AdjustProperties; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -7311,10 +7502,10 @@ dissect_AdjustMAUTypeExtension_block(tvbuff_t *tvb, int offset, /* dissect the PDPortFODataAdjust block */ static int dissect_PDPortFODataAdjust_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint32 u32FiberOpticType; - guint32 u32FiberOpticCableType; + uint32_t u32FiberOpticType; + uint32_t u32FiberOpticCableType; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7345,9 +7536,9 @@ dissect_PDPortFODataAdjust_block(tvbuff_t *tvb, int offset, /* dissect the PDPortFODataCheck block */ static int dissect_PDPortFODataCheck_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint32 u32FiberOpticPowerBudget; + uint32_t u32FiberOpticPowerBudget; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7382,12 +7573,12 @@ dissect_PDPortFODataCheck_block(tvbuff_t *tvb, int offset, /* dissect the AdjustPeerToPeerBoundary block */ static int dissect_AdjustPeerToPeerBoundary_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { proto_item *sub_item; proto_tree *sub_tree; - guint32 u32PeerToPeerBoundary; - guint16 u16AdjustProperties; + uint32_t u32PeerToPeerBoundary; + uint16_t u16AdjustProperties; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -7424,12 +7615,12 @@ dissect_AdjustPeerToPeerBoundary_block(tvbuff_t *tvb, int offset, /* dissect the AdjustDCPBoundary block */ static int dissect_AdjustDCPBoundary_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { proto_item *sub_item; proto_tree *sub_tree; - guint32 u32DcpBoundary; - guint16 u16AdjustProperties; + uint32_t u32DcpBoundary; + uint16_t u16AdjustProperties; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -7462,12 +7653,12 @@ dissect_AdjustDCPBoundary_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_MrpInstanceDataAdjust_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength) { - guint8 u8MrpInstance; + uint8_t u8MrpInstance; e_guid_t uuid; - guint16 u16Role; - guint8 u8LengthDomainName; + uint16_t u16Role; + uint8_t u8LengthDomainName; int endoffset = offset + u16BodyLength; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7508,13 +7699,13 @@ dissect_MrpInstanceDataAdjust_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_MrpInstanceDataReal_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength) { - guint8 u8MrpInstance; + uint8_t u8MrpInstance; e_guid_t uuid; - guint16 u16Role; - guint16 u16Version; - guint8 u8LengthDomainName; + uint16_t u16Role; + uint16_t u16Version; + uint8_t u8LengthDomainName; int endoffset = offset + u16BodyLength; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7555,10 +7746,10 @@ dissect_MrpInstanceDataReal_block(tvbuff_t *tvb, int offset, static int dissect_MrpInstanceDataCheck_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength _U_) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength _U_) { - guint8 u8MrpInstance; - guint32 u32Check; + uint8_t u8MrpInstance; + uint32_t u32Check; e_guid_t uuid; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -7594,9 +7785,9 @@ dissect_MrpInstanceDataCheck_block(tvbuff_t *tvb, int offset, /* PDInterfaceAdjust */ static int dissect_PDInterfaceAdjust_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint32 u32SMultipleInterfaceMode; + uint32_t u32SMultipleInterfaceMode; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -7619,17 +7810,17 @@ dissect_PDInterfaceAdjust_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_TSNNetworkControlDataReal_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { proto_item* sub_item; proto_tree* sub_tree; e_guid_t nme_parameter_uuid; - guint32 u32NetworkDeadline; - guint16 u16SendClockFactor; - guint16 u16NumberofEntries; - guint16 u16TSNNMENameLength; - guint16 u16TSNDomainNameLength; + uint32_t u32NetworkDeadline; + uint16_t u16SendClockFactor; + uint16_t u16NumberofEntries; + uint16_t u16TSNNMENameLength; + uint16_t u16TSNDomainNameLength; e_guid_t tsn_nme_name_uuid; e_guid_t tsn_domain_uuid; @@ -7732,16 +7923,16 @@ dissect_TSNNetworkControlDataReal_block(tvbuff_t* tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_TSNNetworkControlDataAdjust_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { proto_item* sub_item; proto_tree* sub_tree; e_guid_t nme_parameter_uuid; - guint32 u32NetworkDeadline; - guint16 u16SendClockFactor; - guint16 u16NumberofEntries; - guint16 u16TSNNMENameLength; + uint32_t u32NetworkDeadline; + uint16_t u16SendClockFactor; + uint16_t u16NumberofEntries; + uint16_t u16TSNNMENameLength; e_guid_t tsn_nme_name_uuid; int bit_offset; @@ -7829,14 +8020,14 @@ dissect_TSNNetworkControlDataAdjust_block(tvbuff_t* tvb, int offset, /* TSNStreamPathData */ static int dissect_TSNStreamPathDataReal_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, gboolean real) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, bool real) { - guint8 u8FDBCommand; - guint16 u16NumberofEntries; - guint8 dstAdd[6]; - guint16 u16StreamClass; - guint16 u16SlotNumber; - guint16 u16SubSlotNumber; + uint8_t u8FDBCommand; + uint16_t u16NumberofEntries; + uint8_t dstAdd[6]; + uint16_t u16StreamClass; + uint16_t u16SlotNumber; + uint16_t u16SubSlotNumber; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -7888,13 +8079,13 @@ dissect_TSNStreamPathDataReal_block(tvbuff_t* tvb, int offset, /* TSNSyncTreeData */ static int dissect_TSNSyncTreeData_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberofEntries; - guint16 u16SlotNr; - guint16 u16SubslotNr; - guint16 u16TimeDomainNumber; - guint8 u8SyncPortRole; + uint16_t u16NumberofEntries; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; + uint16_t u16TimeDomainNumber; + uint8_t u8SyncPortRole; proto_item* sub_item; proto_tree* sub_tree; @@ -7932,14 +8123,14 @@ dissect_TSNSyncTreeData_block(tvbuff_t* tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_TSNDomainPortConfig_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberofEntries; - guint16 u16SlotNr; - guint16 u16SubslotNr; + uint16_t u16NumberofEntries; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; proto_item* sub_item_port_config; proto_tree* sub_tree_port_config; - guint8 u8TSNDomainPortConfig; + uint8_t u8TSNDomainPortConfig; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -7989,12 +8180,12 @@ dissect_TSNDomainPortConfig_block(tvbuff_t* tvb, int offset, /* TSNDomainQueueConfigBlock */ static int dissect_TSNDomainQueueConfig_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberofEntries; + uint16_t u16NumberofEntries; proto_item* sub_item; proto_tree* sub_tree; - guint64 u64TSNDomainQueueConfig; + uint64_t u64TSNDomainQueueConfig; dcerpc_info di; /* fake dcerpc_info struct */ dcerpc_call_value dcv; /* fake dcerpc_call_value struct */ di.call_data = &dcv; @@ -8034,14 +8225,14 @@ dissect_TSNDomainQueueConfig_block(tvbuff_t* tvb, int offset, /* TSNTimeDataBlock */ static int dissect_TSNTimeData_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16TimeDomainNumber; - guint32 u32TimePLLWindow; - guint32 u32MessageIntervalFactor; - guint16 u16MessageTimeoutFactor; - guint16 u16TimeSyncProperties; - guint8 u8TimeDomainNameLength; + uint16_t u16TimeDomainNumber; + uint32_t u32TimePLLWindow; + uint32_t u32MessageIntervalFactor; + uint16_t u16MessageTimeoutFactor; + uint16_t u16TimeSyncProperties; + uint8_t u8TimeDomainNameLength; e_guid_t time_domain_uuid; proto_item* sub_item; proto_tree* sub_tree; @@ -8093,11 +8284,11 @@ dissect_TSNTimeData_block(tvbuff_t* tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_TSNUploadNetworkAttributes_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint32 u32TransferTimeTX; - guint32 u32TransferTimeRX; - guint32 u32MaxSupportedRecordSize; + uint32_t u32TransferTimeTX; + uint32_t u32TransferTimeRX; + uint32_t u32MaxSupportedRecordSize; if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -8130,16 +8321,16 @@ dissect_TSNUploadNetworkAttributes_block(tvbuff_t* tvb, int offset, /* TSNExpectedNeighborBlock */ static int dissect_TSNExpectedNeighbor_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint8 u8NumberOfPeers; - guint8 u8I; - guint8 u8LengthPeerPortName; - guint8 u8LengthPeerStationName; - guint16 u16NumberOfEntries; - guint16 u16SlotNr; - guint16 u16SubslotNr; - guint32 u32LineDelayValue; + uint8_t u8NumberOfPeers; + uint8_t u8I; + uint8_t u8LengthPeerPortName; + uint8_t u8LengthPeerStationName; + uint16_t u16NumberOfEntries; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; + uint32_t u32LineDelayValue; if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -8199,7 +8390,7 @@ dissect_TSNExpectedNeighbor_block(tvbuff_t* tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_TSNExpectedNetworkAttributes_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -8225,12 +8416,12 @@ dissect_TSNExpectedNetworkAttributes_block(tvbuff_t* tvb, int offset, /* TSNDomainPortIngressRateLimiterBlock */ static int dissect_TSNDomainPortIngressRateLimiter_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberofEntries; + uint16_t u16NumberofEntries; proto_item* sub_item_port_ingress; proto_tree* sub_tree_port_ingress; - guint64 u64TSNDomainPortIngressRateLimiter; + uint64_t u64TSNDomainPortIngressRateLimiter; dcerpc_info di; /* fake dcerpc_info struct */ dcerpc_call_value dcv; /* fake dcerpc_call_value struct */ di.call_data = &dcv; @@ -8266,12 +8457,12 @@ dissect_TSNDomainPortIngressRateLimiter_block(tvbuff_t* tvb, int offset, /* TSNDomainQueueRateLimiterBlock */ static int dissect_TSNDomainQueueRateLimiter_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberofEntries; + uint16_t u16NumberofEntries; proto_item* sub_item; proto_tree* sub_tree; - guint64 u64TSNDomainQueueRateLimiter; + uint64_t u64TSNDomainQueueRateLimiter; dcerpc_info di; /* fake dcerpc_info struct */ dcerpc_call_value dcv; /* fake dcerpc_call_value struct */ di.call_data = &dcv; @@ -8311,16 +8502,16 @@ dissect_TSNDomainQueueRateLimiter_block(tvbuff_t* tvb, int offset, /* TSNPortIDBlock */ static int dissect_TSNPortID_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint8 u8NumberOfQueues; - guint8 u8ForwardingGroup; - guint8 u8TSNPortCapabilities; - guint16 u16NumberOfEntries; - guint16 u16SlotNr; - guint16 u16SubslotNr; - guint16 u16MAUType; - guint16 u16MAUTypeExtension; + uint8_t u8NumberOfQueues; + uint8_t u8ForwardingGroup; + uint8_t u8TSNPortCapabilities; + uint16_t u16NumberOfEntries; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; + uint16_t u16MAUType; + uint16_t u16MAUTypeExtension; if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -8384,14 +8575,14 @@ dissect_TSNPortID_block(tvbuff_t* tvb, int offset, /* TSNForwardingDelayBlock */ static int dissect_TSNForwardingDelay_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint8 u8ForwardingGroupIngress; - guint8 u8ForwardingGroupEgress; - guint16 u16NumberOfEntries; - guint16 u16StreamClass; - guint32 u32DependentForwardingDelay; - guint32 u32IndependentForwardingDelay; + uint8_t u8ForwardingGroupIngress; + uint8_t u8ForwardingGroupEgress; + uint16_t u16NumberOfEntries; + uint16_t u16StreamClass; + uint32_t u32DependentForwardingDelay; + uint32_t u32IndependentForwardingDelay; if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -8431,10 +8622,10 @@ dissect_TSNForwardingDelay_block(tvbuff_t* tvb, int offset, /* PDPortStatistic for one subslot */ static int dissect_PDPortStatistic_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint32 u32StatValue; - guint16 u16CounterStatus; + uint32_t u32StatValue; + uint16_t u16CounterStatus; proto_item *sub_item; proto_tree *sub_tree; if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) { @@ -8497,18 +8688,18 @@ dissect_PDPortStatistic_block(tvbuff_t *tvb, int offset, /* OwnPort */ static int dissect_OwnPort_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint8 u8LengthOwnPortID; + uint8_t u8LengthOwnPortID; char *pOwnPortID; - guint16 u16MAUType; - guint16 u16MAUTypeExtension; - guint32 u32MulticastBoundary; - guint8 u8LinkStatePort; - guint8 u8LinkStateLink; - guint32 u32MediaType; - guint32 u32LineDelayValue; - guint16 u16PortStatus; + uint16_t u16MAUType; + uint16_t u16MAUTypeExtension; + uint32_t u32MulticastBoundary; + uint8_t u8LinkStatePort; + uint8_t u8LinkStateLink; + uint32_t u32MediaType; + uint32_t u32LineDelayValue; + uint16_t u16PortStatus; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -8572,20 +8763,20 @@ dissect_OwnPort_block(tvbuff_t *tvb, int offset, /* Neighbors */ static int dissect_Neighbors_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { proto_item *sub_item; proto_tree *sub_tree; - guint8 u8NumberOfPeers; - guint8 u8I; - guint8 mac[6]; + uint8_t u8NumberOfPeers; + uint8_t u8I; + uint8_t mac[6]; char *pPeerStationName; char *pPeerPortName; - guint8 u8LengthPeerPortName; - guint8 u8LengthPeerStationName; - guint16 u16MAUType; - guint16 u16MAUTypeExtension; - guint32 u32LineDelayValue; + uint8_t u8LengthPeerPortName; + uint8_t u8LengthPeerStationName; + uint16_t u16MAUType; + uint16_t u16MAUTypeExtension; + uint32_t u32LineDelayValue; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -8649,11 +8840,11 @@ dissect_Neighbors_block(tvbuff_t *tvb, int offset, /* dissect the PDInterfaceDataReal block */ static int dissect_PDInterfaceDataReal_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint8 u8LengthOwnChassisID; - guint8 mac[6]; - guint32 ip; + uint8_t u8LengthOwnChassisID; + uint8_t mac[6]; + uint32_t ip; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -8680,15 +8871,15 @@ dissect_PDInterfaceDataReal_block(tvbuff_t *tvb, int offset, /* IPAddress */ offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_io_ip_address, &ip); - /*proto_item_append_text(block_item, ", IP: %s", ip_to_str((guint8*)&ip));*/ + /*proto_item_append_text(block_item, ", IP: %s", ip_to_str((uint8_t*)&ip));*/ /* Subnetmask */ offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_io_subnetmask, &ip); - /*proto_item_append_text(block_item, ", Subnet: %s", ip_to_str((guint8*)&ip));*/ + /*proto_item_append_text(block_item, ", Subnet: %s", ip_to_str((uint8_t*)&ip));*/ /* StandardGateway */ offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_io_standard_gateway, &ip); - /*proto_item_append_text(block_item, ", Router: %s", ip_to_str((guint8*)&ip));*/ + /*proto_item_append_text(block_item, ", Router: %s", ip_to_str((uint8_t*)&ip));*/ return offset; @@ -8698,24 +8889,24 @@ dissect_PDInterfaceDataReal_block(tvbuff_t *tvb, int offset, /* dissect the PDSyncData block */ static int dissect_PDSyncData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16SlotNr; - guint16 u16SubslotNr; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; e_guid_t uuid; - guint32 u32ReservedIntervalBegin; - guint32 u32ReservedIntervalEnd; - guint32 u32PLLWindow; - guint32 u32SyncSendFactor; - guint16 u16SendClockFactor; - guint16 u16SyncProperties; - guint16 u16SyncFrameAddress; - guint16 u16PTCPTimeoutFactor; - guint16 u16PTCPTakeoverTimeoutFactor; - guint16 u16PTCPMasterStartupTime; - guint8 u8MasterPriority1; - guint8 u8MasterPriority2; - guint8 u8LengthSubdomainName; + uint32_t u32ReservedIntervalBegin; + uint32_t u32ReservedIntervalEnd; + uint32_t u32PLLWindow; + uint32_t u32SyncSendFactor; + uint16_t u16SendClockFactor; + uint16_t u16SyncProperties; + uint16_t u16SyncFrameAddress; + uint16_t u16PTCPTimeoutFactor; + uint16_t u16PTCPTakeoverTimeoutFactor; + uint16_t u16PTCPMasterStartupTime; + uint8_t u8MasterPriority1; + uint8_t u8MasterPriority2; + uint8_t u8LengthSubdomainName; if (u8BlockVersionHigh != 1) { @@ -8834,12 +9025,12 @@ dissect_PDSyncData_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_PDIRData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16SlotNr; - guint16 u16SubslotNr; - guint16 u16Index = 0; - guint32 u32RecDataLen; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; + uint16_t u16Index = 0; + uint32_t u32RecDataLen; pnio_ar_t *ar = NULL; /* versions decoded are High: 1 and LOW 0..2 */ @@ -8884,16 +9075,16 @@ dissect_PDIRData_block(tvbuff_t *tvb, int offset, /* dissect the PDIRGlobalData block */ static int dissect_PDIRGlobalData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { e_guid_t uuid; - guint32 u32MaxBridgeDelay; - guint32 u32NumberOfPorts; - guint32 u32MaxPortTxDelay; - guint32 u32MaxPortRxDelay; - guint32 u32MaxLineRxDelay; - guint32 u32YellowTime; - guint32 u32Tmp; + uint32_t u32MaxBridgeDelay; + uint32_t u32NumberOfPorts; + uint32_t u32MaxPortTxDelay; + uint32_t u32MaxPortRxDelay; + uint32_t u32MaxLineRxDelay; + uint32_t u32YellowTime; + uint32_t u32Tmp; /* added blockversion 2 */ if (u8BlockVersionHigh != 1 || (u8BlockVersionLow > 2)) { @@ -8944,23 +9135,23 @@ dissect_PDIRGlobalData_block(tvbuff_t *tvb, int offset, /* dissect the PDIRFrameData block */ static int dissect_PDIRFrameData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { - guint32 u32FrameSendOffset; - guint32 u32FrameDataProperties; - guint16 u16DataLength; - guint16 u16ReductionRatio; - guint16 u16Phase; - guint16 u16FrameID; - guint16 u16Ethertype; - guint8 u8RXPort; - guint8 u8FrameDetails; - guint8 u8NumberOfTxPortGroups; - guint8 u8TxPortGroupArray; - guint16 u16TxPortGroupArraySize; - guint16 u16EndOffset; - guint16 n = 0; + uint32_t u32FrameSendOffset; + uint32_t u32FrameDataProperties; + uint16_t u16DataLength; + uint16_t u16ReductionRatio; + uint16_t u16Phase; + uint16_t u16FrameID; + uint16_t u16Ethertype; + uint8_t u8RXPort; + uint8_t u8FrameDetails; + uint8_t u8NumberOfTxPortGroups; + uint8_t u8TxPortGroupArray; + uint16_t u16TxPortGroupArraySize; + uint16_t u16EndOffset; + uint16_t n = 0; proto_item *sub_item; proto_tree *sub_tree; @@ -9034,7 +9225,7 @@ dissect_PDIRFrameData_block(tvbuff_t *tvb, int offset, offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_frame_details_reserved, &u8FrameDetails); /* TxPortGroup */ - u8NumberOfTxPortGroups = tvb_get_guint8(tvb, offset); + u8NumberOfTxPortGroups = tvb_get_uint8(tvb, offset); sub_item = proto_tree_add_uint(ir_frame_data_tree, hf_pn_io_nr_of_tx_port_groups, tvb, offset, 1, u8NumberOfTxPortGroups); offset++; @@ -9078,29 +9269,29 @@ dissect_PDIRFrameData_block(tvbuff_t *tvb, int offset, static int dissect_PDIRBeginEndData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { - guint16 u16StartOfRedFrameID; - guint16 u16EndOfRedFrameID; - guint32 u32NumberOfPorts; - guint32 u32NumberOfAssignments; - guint32 u32NumberOfPhases; - guint32 u32RedOrangePeriodBegin; - guint32 u32OrangePeriodBegin; - guint32 u32GreenPeriodBegin; - guint16 u16TXPhaseAssignment; - guint16 u16RXPhaseAssignment; - guint32 u32SubStart; - guint32 u32Tmp; - guint32 u32Tmp2; - guint32 u32TxRedOrangePeriodBegin[0x11] = {0}; - guint32 u32TxOrangePeriodBegin [0x11] = {0}; - guint32 u32TxGreenPeriodBegin [0x11] = {0}; - guint32 u32RxRedOrangePeriodBegin[0x11] = {0}; - guint32 u32RxOrangePeriodBegin [0x11] = {0}; - guint32 u32RxGreenPeriodBegin [0x11] = {0}; - guint32 u32PortIndex; + uint16_t u16StartOfRedFrameID; + uint16_t u16EndOfRedFrameID; + uint32_t u32NumberOfPorts; + uint32_t u32NumberOfAssignments; + uint32_t u32NumberOfPhases; + uint32_t u32RedOrangePeriodBegin; + uint32_t u32OrangePeriodBegin; + uint32_t u32GreenPeriodBegin; + uint16_t u16TXPhaseAssignment; + uint16_t u16RXPhaseAssignment; + uint32_t u32SubStart; + uint32_t u32Tmp; + uint32_t u32Tmp2; + uint32_t u32TxRedOrangePeriodBegin[0x11] = {0}; + uint32_t u32TxOrangePeriodBegin [0x11] = {0}; + uint32_t u32TxGreenPeriodBegin [0x11] = {0}; + uint32_t u32RxRedOrangePeriodBegin[0x11] = {0}; + uint32_t u32RxOrangePeriodBegin [0x11] = {0}; + uint32_t u32RxGreenPeriodBegin [0x11] = {0}; + uint32_t u32PortIndex; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -9239,14 +9430,14 @@ dissect_PDIRBeginEndData_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_DiagnosisData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 body_length) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t body_length) { - guint32 u32Api; - guint16 u16SlotNr; - guint16 u16SubslotNr; - guint16 u16ChannelNumber; - guint16 u16UserStructureIdentifier; + uint32_t u32Api; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; + uint16_t u16ChannelNumber; + uint16_t u16UserStructureIdentifier; proto_item *sub_item; @@ -9318,13 +9509,13 @@ dissect_DiagnosisData_block(tvbuff_t *tvb, int offset, static int dissect_ARProperties(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_) { proto_item *sub_item; proto_tree *sub_tree; - guint32 u32ARProperties; - guint8 startupMode; - guint8 isTimeAware; + uint32_t u32ARProperties; + uint8_t startupMode; + uint8_t isTimeAware; sub_item = proto_tree_add_item(tree, hf_pn_io_ar_properties, tvb, offset, 4, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_ar_properties); @@ -9332,7 +9523,7 @@ dissect_ARProperties(tvbuff_t *tvb, int offset, hf_pn_io_ar_properties_pull_module_alarm_allowed, &u32ARProperties); dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_arproperties_StartupMode, &u32ARProperties); - startupMode = (guint8)((u32ARProperties >> 30) & 0x01); + startupMode = (uint8_t)((u32ARProperties >> 30) & 0x01); /* Advanced startup mode */ if (startupMode) { @@ -9348,7 +9539,7 @@ dissect_ARProperties(tvbuff_t *tvb, int offset, dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_ar_properties_time_aware_system, &u32ARProperties); - isTimeAware = (guint8)((u32ARProperties >> 28) & 0x01); + isTimeAware = (uint8_t)((u32ARProperties >> 28) & 0x01); wmem_map_insert(pnio_time_aware_frame_map, GUINT_TO_POINTER(pinfo->num), GUINT_TO_POINTER(isTimeAware)); @@ -9379,11 +9570,11 @@ dissect_ARProperties(tvbuff_t *tvb, int offset, /* dissect the IOCRProperties */ static int dissect_IOCRProperties(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) + packet_info *pinfo, proto_tree *tree, uint8_t *drep) { proto_item *sub_item; proto_tree *sub_tree; - guint32 u32IOCRProperties; + uint32_t u32IOCRProperties; sub_item = proto_tree_add_item(tree, hf_pn_io_iocr_properties, tvb, offset, 4, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_iocr_properties); @@ -9412,35 +9603,35 @@ dissect_IOCRProperties(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_ARData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BlockLength) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BlockLength) { - guint16 u16NumberOfARs; - guint16 u16NumberofEntries; + uint16_t u16NumberOfARs; + uint16_t u16NumberofEntries; e_guid_t aruuid; e_guid_t uuid; - guint16 u16ARType; - guint16 u16NameLength; - guint16 u16NumberOfIOCRs; - guint16 u16IOCRType; - guint16 u16FrameID; - guint16 u16CycleCounter; - guint8 u8DataStatus; - guint8 u8TransferStatus; + uint16_t u16ARType; + uint16_t u16NameLength; + uint16_t u16NumberOfIOCRs; + uint16_t u16IOCRType; + uint16_t u16FrameID; + uint16_t u16CycleCounter; + uint8_t u8DataStatus; + uint8_t u8TransferStatus; proto_item *ds_item; proto_tree *ds_tree; - guint16 u16UDPRTPort; - guint16 u16AlarmCRType; - guint16 u16LocalAlarmReference; - guint16 u16RemoteAlarmReference; - guint16 u16NumberOfAPIs; - guint32 u32Api; + uint16_t u16UDPRTPort; + uint16_t u16AlarmCRType; + uint16_t u16LocalAlarmReference; + uint16_t u16RemoteAlarmReference; + uint16_t u16NumberOfAPIs; + uint32_t u32Api; proto_item *iocr_item; proto_tree *iocr_tree; proto_item *ar_item; proto_tree *ar_tree; - guint32 u32IOCRStart; - gint32 i32EndOffset; - guint32 u32ARDataStart; + uint32_t u32IOCRStart; + int32_t i32EndOffset; + uint32_t u32ARDataStart; /* added BlockversionLow == 1 */ if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) { @@ -9496,8 +9687,8 @@ dissect_ARData_block(tvbuff_t *tvb, int offset, offset = dissect_dcerpc_uint16(tvb, offset, pinfo, iocr_tree, drep, hf_pn_io_cycle_counter, &u16CycleCounter); - u8DataStatus = tvb_get_guint8(tvb, offset); - u8TransferStatus = tvb_get_guint8(tvb, offset+1); + u8DataStatus = tvb_get_uint8(tvb, offset); + u8TransferStatus = tvb_get_uint8(tvb, offset+1); /* add data status subtree */ ds_item = proto_tree_add_uint_format(iocr_tree, hf_pn_io_data_status, @@ -9644,8 +9835,8 @@ dissect_ARData_block(tvbuff_t *tvb, int offset, offset = dissect_dcerpc_uint16(tvb, offset, pinfo, iocr_tree, drep, hf_pn_io_cycle_counter, &u16CycleCounter); - u8DataStatus = tvb_get_guint8(tvb, offset); - u8TransferStatus = tvb_get_guint8(tvb, offset+1); + u8DataStatus = tvb_get_uint8(tvb, offset); + u8TransferStatus = tvb_get_uint8(tvb, offset+1); /* add data status subtree */ ds_item = proto_tree_add_uint_format(iocr_tree, hf_pn_io_data_status, @@ -9708,10 +9899,10 @@ dissect_ARData_block(tvbuff_t *tvb, int offset, /* dissect the APIData block */ static int dissect_APIData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberOfAPIs; - guint32 u32Api; + uint16_t u16NumberOfAPIs; + uint32_t u32Api; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -9736,9 +9927,9 @@ dissect_APIData_block(tvbuff_t *tvb, int offset, /* dissect the SLRData block */ static int dissect_SRLData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 RedundancyInfo; + uint16_t RedundancyInfo; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -9756,13 +9947,13 @@ dissect_SRLData_block(tvbuff_t *tvb, int offset, /* dissect the LogData block */ static int dissect_LogData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint64 u64ActualLocaltimeStamp; - guint16 u16NumberOfLogEntries; - guint64 u64LocaltimeStamp; + uint64_t u64ActualLocaltimeStamp; + uint16_t u16NumberOfLogEntries; + uint64_t u64LocaltimeStamp; e_guid_t aruuid; - guint32 u32EntryDetail; + uint32_t u32EntryDetail; dcerpc_info di; /* fake dcerpc_info struct */ dcerpc_call_value call_data; @@ -9811,12 +10002,12 @@ dissect_LogData_block(tvbuff_t *tvb, int offset, /* dissect the FS Hello block */ static int dissect_FSHello_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint32 u32FSHelloMode; - guint32 u32FSHelloInterval; - guint32 u32FSHelloRetry; - guint32 u32FSHelloDelay; + uint32_t u32FSHelloMode; + uint32_t u32FSHelloInterval; + uint32_t u32FSHelloRetry; + uint32_t u32FSHelloDelay; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -9851,9 +10042,9 @@ dissect_FSHello_block(tvbuff_t *tvb, int offset, /* dissect the FS Parameter block */ static int dissect_FSParameter_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint32 u32FSParameterMode; + uint32_t u32FSParameterMode; e_guid_t FSParameterUUID; @@ -9885,8 +10076,8 @@ dissect_FSParameter_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_PDInterfaceFSUDataAdjust_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { tvbuff_t *new_tvb; @@ -9915,8 +10106,8 @@ dissect_PDInterfaceFSUDataAdjust_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_ARFSUDataAdjust_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { tvbuff_t *new_tvb; @@ -9940,28 +10131,573 @@ dissect_ARFSUDataAdjust_block(tvbuff_t *tvb, int offset, return offset; } +/* dissect the PROFIenergy Service Request block */ +static int +dissect_PE_ServiceRequest_block(tvbuff_t* tvb, int offset, + packet_info* pinfo, proto_tree* tree, proto_item* item, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength) +{ + uint8_t service_request_id; + uint8_t request_ref; + uint8_t modifier; + uint8_t structure_id; + uint16_t service_modifier; + bool col_add = false; + + if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { + expert_add_info_format(pinfo, item, &ei_pn_io_block_version, + "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow); + return offset; + } + + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_request_id, &service_request_id); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_request_reference, &request_ref); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_modifier, &modifier); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_structure_id, &structure_id); + u16BodyLength -= 4; + + /* for proper decoding the PE service request use a combination of service ID and service modifier */ + service_modifier = (service_request_id << 8) | modifier; + + proto_item_append_text(item, ": %s", val_to_str_const(service_modifier, pn_io_pe_services_modifier, "Unknown")); + + if (u16BodyLength > 0) { + proto_item *pedata_item; + proto_tree *pedata_tree; + uint32_t u32PauseTime; + uint8_t u8ModeID; + uint8_t u8Count; + uint16_t u16MeasurementID; + uint16_t u16ObjectNumber; + uint32_t value32; + uint64_t value64; + + pedata_item = proto_tree_add_item(tree, hf_pn_io_pe_service_datarequest, tvb, offset, u16BodyLength, ENC_NA); + pedata_tree = proto_item_add_subtree(pedata_item, ett_pn_io_pe_service_datarequest); + + switch (service_modifier) { + case 0x0100: /* Start_Pause */ + case 0x0101: + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_pause_time, &u32PauseTime); + col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceRequest, Ref:0x%02x, Start Pause %u msec", + request_ref, u32PauseTime); + col_add = true; + break; + case 0x0302: /* Get_Mode */ + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_mode_id, &u8ModeID); + offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1); + col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceRequest, Ref:0x%02x, Get_Mode:0x%02x", + request_ref, u8ModeID); + col_add = true; + break; + case 0x1002: /* Get_Measurement_Values */ + case 0x1004: /* Get_Measurement_Values_with_Object_Number */ + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, hf_pn_io_pe_data_count, &u8Count); + /* align padding */ + offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1); + while (u8Count--) { + if (service_modifier == 0x1004) { + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_measurement_object_number, &u16ObjectNumber); + } + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_measurement_id, &u16MeasurementID); + } + break; + case 0x1100: /* Reset_Energy_Meter all */ + case 0x1101: /* Reset_Energy_Meter all meters with this ID */ + case 0x1102: /* Reset_Energy_Meter all meters with this Object Number */ + case 0x1103: /* Reset_Energy_Meter meter with this ID and this Object Number */ + /* rewrite item text with detailed information */ + proto_item_set_text(pedata_item, "%s", val_to_str_const(service_modifier, pn_io_pe_services_modifier_with_details, "Unknown")); + + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, pedata_tree, drep, hf_pn_io_pe_measurement_object_number, &u16ObjectNumber); + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, pedata_tree, drep, hf_pn_io_pe_measurement_id, &u16MeasurementID); + break; + case 0x1200: /* Set_Meter */ + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, hf_pn_io_pe_data_count, &u8Count); + /* align padding */ + offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1); + while (u8Count--) { + proto_item *measurement_item; + proto_tree *measurement_tree; + int byte_length = 4; + + /* depending on measurement ID we may encounter differing byte lengths for value */ + u16MeasurementID = tvb_get_uint16(tvb, offset+2, ENC_BIG_ENDIAN); + if ((u16MeasurementID >= 210) && (u16MeasurementID <= 219)) { + byte_length = 8; + } + + measurement_item = proto_tree_add_item(pedata_tree, hf_pn_io_pe_measurement, tvb, offset, 4+byte_length, ENC_NA); + measurement_tree = proto_item_add_subtree(measurement_item, ett_pn_io_pe_measurement_id); + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_object_number, &u16ObjectNumber); + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_id, &u16MeasurementID); + if (byte_length == 8) { + dcerpc_info di; /* fake dcerpc_info struct */ + dcerpc_call_value dcv; /* fake dcerpc_call_value struct */ + di.call_data = &dcv; + offset = dissect_dcerpc_uint64(tvb, offset, pinfo, measurement_tree, &di, drep, + hf_pn_io_pe_measurement_value_float64, &value64); + } else if ((u16MeasurementID >= 220) && (u16MeasurementID <= 229)) { + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_value_uint32, &value32); + } else { + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_value_float32, &value32); + } + } + break; + case 0x2101: /* Go_Sleep_Mode_WOL_with_pause_time */ + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_pause_time, &u32PauseTime); + col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceRequest, Ref:0x%02x, Go_Sleep_Mode_WOL %u msec", + request_ref, u32PauseTime); + col_add = true; + break; + default: + offset = dissect_pn_user_data(tvb, offset, pinfo, pedata_tree, u16BodyLength, "RequestData"); + break; + } + } + + if (!col_add) { + col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceRequest, Ref:0x%02x, %s", + request_ref, val_to_str_const(service_modifier, pn_io_pe_services_modifier, "Unknown")); + } + + return offset; +} + +/* dissect the PE_ServiceResponse block */ +static int +dissect_PE_ServiceResponse_block(tvbuff_t* tvb, int offset, + packet_info* pinfo, proto_tree* tree, proto_item* item, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength) +{ + uint8_t service_response_id; + uint8_t request_ref; + uint8_t status; + uint8_t structure_id; + uint16_t service_modifier; + bool col_add = false; + + if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { + expert_add_info_format(pinfo, item, &ei_pn_io_block_version, + "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow); + return offset; + } + + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_request_id, &service_response_id); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_request_reference, &request_ref); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_status, &status); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_structure_id, &structure_id); + u16BodyLength -= 4; + + /* Init service_modifier even when not used, to avoid gcc may by used initialized error/warning */ + service_modifier = (service_response_id << 8); + + if (structure_id == 0xFF) { + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_errorcode, &status); + /* align padding */ + offset = dissect_pn_padding(tvb, offset, pinfo, tree, 1); + + proto_item_append_text(item, ": %s", rval_to_str_const(service_response_id, pn_io_pe_services, "Unknown")); + col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceResponse, Ref:0x%02x, %s (ERROR)", + request_ref, rval_to_str_const(service_response_id, pn_io_pe_services, "Unknown")); + col_add = true; + } else { + /* + * In the response we do not have modifier as in the request. + * To properly decode the service name we have to use response structure ID based on service ID. + * There is no easy 1 to 1 mapping. + */ + if (service_response_id == 0x01) { + service_modifier = (service_response_id << 8) | (structure_id-1); + } else if (service_response_id == 0x03) { + service_modifier = (service_response_id << 8) | (structure_id); + } else if (service_response_id == 0x04) { + service_modifier = (service_response_id << 8) | (structure_id-1); + } else if (service_response_id == 0x10) { + if (structure_id == 0x02) { + service_modifier = (service_response_id << 8) | 0x01; + } else if (structure_id == 0x04) { + service_modifier = (service_response_id << 8) | 0x03; + } else if (structure_id == 0x01) { + service_modifier = (service_response_id << 8) | 0x02; + } else if (structure_id == 0x03) { + service_modifier = (service_response_id << 8) | 0x04; + } else { + service_modifier = (service_response_id << 8); + } + } else if (service_response_id == 0x11) { + /* no match to reset_meter_* possible, use generic text */ + service_modifier = (service_response_id << 8) | 0xFE; + } else { + service_modifier = (service_response_id << 8); + } + proto_item_append_text(item, ": %s", val_to_str_const(service_modifier, pn_io_pe_services_modifier, "Unknown")); + } + + if ((u16BodyLength > 0) && (structure_id != 0xFF)) { + proto_item *pedata_item; + proto_tree *pedata_tree; + uint8_t u8Count; + uint8_t u8ServiceID; + uint8_t u8ModeID; + uint8_t u8ModeSource; + uint8_t u8ModeDestination; + uint8_t u8ModeAttributes; + uint32_t u32CTTD; + uint32_t u32CTTO; + uint32_t u32MaxCRT; + uint32_t u32RTTO; + uint32_t u32TMinP; + uint32_t u32TMinLS; + uint32_t u32TMaxLS; + uint32_t u32TTP; + uint32_t u32ModePower; + uint32_t u32EnergyConsumption; + uint8_t u8VersionMajor; + uint8_t u8VersionMinor; + uint8_t u8EntityClass; + uint8_t u8EntitySubClass; + uint8_t u8EntityDynTEValues; + uint8_t u8EntityPEASE; + uint8_t u8WOLMethod; + uint16_t u16WOLDataLength; + uint16_t u16MeasurementID; + uint16_t u16ObjectNumber; + uint8_t u8Accuracy; + uint16_t u16StructureLength; + uint8_t u8StructureID; + uint8_t value8; + uint16_t value16; + uint32_t value32; + uint64_t value64; + + pedata_item = proto_tree_add_item(tree, hf_pn_io_pe_service_dataresponse, tvb, offset, u16BodyLength, ENC_NA); + pedata_tree = proto_item_add_subtree(pedata_item, ett_pn_io_pe_service_dataresponse); + + switch (service_response_id) { + case 0x01: /* Start_Pause */ + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_mode_id, &u8ModeID); + /* align padding */ + offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1); + if (structure_id == 0x02) { + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_current_time_to_destination, &u32CTTD); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_regular_time_to_operate, &u32RTTO); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_time_min_length_of_stay, &u32TMinLS); + } + break; + case 0x02: /* End_Pause */ + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_current_time_to_operate, &u32CTTO); + break; + case 0x03: /* Query_Modes */ + if (structure_id == 0x01) { + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_data_count, &u8Count); + while (u8Count--) { + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_mode_id, &u8ModeID); + } + } else if (structure_id == 0x02) { + proto_item *attributes_item; + proto_tree *attributes_tree; + + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, hf_pn_io_pe_mode_id, &u8ModeID); + attributes_item = proto_tree_add_item(pedata_tree, hf_pn_io_pe_mode_attributes_value, tvb, offset, 1, ENC_NA); + attributes_tree = proto_item_add_subtree(attributes_item, ett_pn_io_pe_mode_attributes); + /* Attributes.Bit0 */ + dissect_dcerpc_uint8(tvb, offset, pinfo, attributes_tree, drep, + hf_pn_io_pe_mode_attributes_value_bit0, &u8ModeAttributes); + /* Attributes.OtherBits */ + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, attributes_tree, drep, + hf_pn_io_pe_mode_attributes_value_otherbits, &u8ModeAttributes); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_time_min_pause, &u32TMinP); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_time_to_pause, &u32TTP); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_regular_time_to_operate, &u32RTTO); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_time_min_length_of_stay, &u32TMinLS); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_time_max_length_of_stay, &u32TMaxLS); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_mode_power_consumption, &u32ModePower); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_energy_to_pause, &u32EnergyConsumption); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_energy_to_operate, &u32EnergyConsumption); + col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceResponse, Ref:0x%02x, Get_Mode:0x%02x", + request_ref, u8ModeID); + col_add = true; + } else { + /* ... */ + offset = dissect_pn_user_data(tvb, offset, pinfo, pedata_tree, u16BodyLength, "PE ResponseData not decoded [invalid StructID]"); + } + break; + case 0x04: /* PEM_Status */ + if (structure_id == 0x01) { + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_mode_id_source, &u8ModeSource); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_mode_id_destination, &u8ModeDestination); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_current_time_to_operate, &u32CTTO); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_current_time_to_destination, &u32CTTD); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_mode_power_consumption, &u32ModePower); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_energy_to_destination, &u32EnergyConsumption); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_energy_to_operate, &u32EnergyConsumption); + } else if (structure_id == 0x02) { + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_mode_id_source, &u8ModeSource); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_mode_id_destination, &u8ModeDestination); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_regular_time_to_operate, &u32RTTO); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_current_time_to_operate, &u32CTTO); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_current_time_to_destination, &u32CTTD); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_mode_power_consumption, &u32ModePower); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_energy_to_destination, &u32EnergyConsumption); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_energy_to_operate, &u32EnergyConsumption); + col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceResponse, Ref:0x%02x, PEM_Status_Ext1", request_ref); + col_add = true; + } else { + /* ... */ + offset = dissect_pn_user_data(tvb, offset, pinfo, pedata_tree, u16BodyLength, "PE ResponseData not decoded [invalid StructID]"); + } + break; + case 0x05: /* PE_Identify */ + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_data_count, &u8Count); + while (u8Count--) { + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_service_request_id, &u8ServiceID); + } + break; + case 0x06: /* Query_Version */ + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_version_major, &u8VersionMajor); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_version_minor, &u8VersionMinor); + proto_item_append_text(item, " V%u.%u", u8VersionMajor, u8VersionMinor); + col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceResponse, Ref: 0x%02x, PE Version V%u.%u", + request_ref, u8VersionMajor, u8VersionMinor); + col_add = true; + break; + case 0x07: /* Query_Attributes */ + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_version_major, &u8VersionMajor); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_version_minor, &u8VersionMinor); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_entity_class, &u8EntityClass); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_entity_subclass, &u8EntitySubClass); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_entity_dyn_t_and_e, &u8EntityDynTEValues); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_entity_pe_ase, &u8EntityPEASE); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_maximum_command_respond_time, &u32MaxCRT); + col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceResponse, Ref: 0x%02x, Query_Attributes PE Version V%u.%u Class 0x%02x", + request_ref, u8VersionMajor, u8VersionMinor, u8EntityClass); + col_add = true; + break; + case 0x10: /* Query_Measurement */ + /* + * structures: + * 0x01: Measurement Values + * 0x02: Measurement List + * 0x03: Measurement Values with Object Number + * 0x04: Measurement List with Object Number + */ + if ((structure_id == 0x02) || (structure_id == 0x04)) { + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_data_count, &u8Count); + /* align padding */ + offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1); + while (u8Count--) { + proto_item *measurement_item; + proto_tree *measurement_tree; + + if (structure_id == 0x04) { + measurement_item = proto_tree_add_item(pedata_tree, hf_pn_io_pe_measurement, tvb, offset, 10, ENC_NA); + measurement_tree = proto_item_add_subtree(measurement_item, ett_pn_io_pe_measurement_id); + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_object_number, &u16ObjectNumber); + } else { + measurement_item = proto_tree_add_item(pedata_tree, hf_pn_io_pe_measurement, tvb, offset, 8, ENC_NA); + measurement_tree = proto_item_add_subtree(measurement_item, ett_pn_io_pe_measurement_id); + } + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_id, &u16MeasurementID); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_accuracy_domain, &u8Accuracy); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_accuracy_class, &u8Accuracy); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_range, &value32); + } + } else if ((structure_id == 0x01) || (structure_id == 0x03)) { + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_data_count, &u8Count); + /* align padding */ + offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1); + while (u8Count--) { + proto_item *measurement_item; + proto_tree *measurement_tree; + + /* peek for structure length */ + u16StructureLength = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN); + measurement_item = proto_tree_add_item(pedata_tree, hf_pn_io_pe_measurement, tvb, offset, + u16StructureLength, ENC_NA); + measurement_tree = proto_item_add_subtree(measurement_item, ett_pn_io_pe_measurement_id); + + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_structure_length, &value16); + u16StructureLength -= 2; + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_structure_id, &u8StructureID); + u16StructureLength -= 1; + if (u8StructureID == 2) { + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_status, &value8); + u16StructureLength -= 1; + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_object_number, &u16ObjectNumber); + u16StructureLength -= 2; + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_id, &u16MeasurementID); + u16StructureLength -= 2; + } else { + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_id, &u16MeasurementID); + u16StructureLength -= 2; + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_status, &value8); + u16StructureLength -= 1; + } + + if ((u16MeasurementID >= 210) && (u16MeasurementID <= 219)) { + dcerpc_info di; /* fake dcerpc_info struct */ + dcerpc_call_value dcv; /* fake dcerpc_call_value struct */ + di.call_data = &dcv; + offset = dissect_dcerpc_uint64(tvb, offset, pinfo, measurement_tree, &di, drep, + hf_pn_io_pe_measurement_value_float64, &value64); + u16StructureLength -= 8; + } else if ((u16MeasurementID >= 220) && (u16MeasurementID <= 229)) { + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_value_uint32, &value32); + u16StructureLength -= 4; + } else { + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_value_float32, &value32); + u16StructureLength -= 4; + } + + if (u16StructureLength > 0) { + /* remainder is optional timestamp */ + offset = dissect_pn_user_data(tvb, offset, pinfo, pedata_tree, u16StructureLength, "Timestamp"); + } + } + } + break; + case 0x12: /* Set_Meter */ + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_data_count, &u8Count); + /* align padding */ + offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1); + while (u8Count--) { + proto_item *measurement_item; + proto_tree *measurement_tree; + + measurement_item = proto_tree_add_item(pedata_tree, hf_pn_io_pe_measurement, tvb, offset, 4, ENC_NA); + measurement_tree = proto_item_add_subtree(measurement_item, ett_pn_io_pe_measurement_id); + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_object_number, &u16ObjectNumber); + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep, + hf_pn_io_pe_measurement_id, &u16MeasurementID); + } + break; + case 0x20: /* Info_Sleep_Mode_WOL */ + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_regular_time_to_operate, &u32RTTO); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_time_min_pause, &u32TMinP); + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_wol_wake_up_method, &u8WOLMethod); + offset = dissect_dcerpc_uint16(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_wol_wake_up_data_length, &u16WOLDataLength); + offset = dissect_pn_user_data(tvb, offset, pinfo, pedata_tree, u16WOLDataLength, "Wake_Up_Data"); + break; + case 0x21: /* Go_Sleep_Mode_WOL */ + offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_mode_id, &u8ModeID); + /* align padding */ + offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_current_time_to_destination, &u32CTTD); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_regular_time_to_operate, &u32RTTO); + offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep, + hf_pn_io_pe_time_min_length_of_stay, &u32TMinLS); + break; + default: + /* ... */ + offset = dissect_pn_user_data(tvb, offset, pinfo, pedata_tree, u16BodyLength, "ResponseData"); + break; + } + } + + if (!col_add) { + col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceResponse, Ref:0x%02x, %s", + request_ref, val_to_str_const(service_modifier, pn_io_pe_services_modifier, "Unknown")); + } + + return offset; +} + /* dissect the PE_EntityFilterData block */ static int dissect_PE_EntityFilterData_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberOfAPIs; - guint32 u32Api; - guint16 u16NumberOfModules; - guint16 u16SlotNr; - guint32 u32ModuleIdentNumber; - guint16 u16NumberOfSubmodules; - guint16 u16SubslotNr; - guint32 u32SubmoduleIdentNumber; + uint16_t u16NumberOfAPIs; + uint32_t u32Api; + uint16_t u16NumberOfModules; + uint16_t u16SlotNr; + uint32_t u32ModuleIdentNumber; + uint16_t u16NumberOfSubmodules; + uint16_t u16SubslotNr; + uint32_t u32SubmoduleIdentNumber; proto_item* api_item; proto_tree* api_tree; - guint32 u32ApiStart; + uint32_t u32ApiStart; proto_item* module_item; proto_tree* module_tree; - guint32 u32ModuleStart; + uint32_t u32ModuleStart; proto_item* sub_item; proto_tree* sub_tree; - guint32 u32SubStart; + uint32_t u32SubStart; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -10047,24 +10783,24 @@ dissect_PE_EntityFilterData_block(tvbuff_t* tvb, int offset, /* dissect the PE_EntityStatusData block */ static int dissect_PE_EntityStatusData_block(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberOfAPIs; - guint32 u32Api; - guint16 u16NumberOfModules; - guint16 u16SlotNr; - guint16 u16NumberOfSubmodules; - guint16 u16SubslotNr; + uint16_t u16NumberOfAPIs; + uint32_t u32Api; + uint16_t u16NumberOfModules; + uint16_t u16SlotNr; + uint16_t u16NumberOfSubmodules; + uint16_t u16SubslotNr; proto_item* api_item; proto_tree* api_tree; - guint32 u32ApiStart; + uint32_t u32ApiStart; proto_item* module_item; proto_tree* module_tree; - guint32 u32ModuleStart; + uint32_t u32ModuleStart; proto_item* sub_item; proto_tree* sub_tree; - guint32 u32SubStart; - guint8 u8PEOperationalMode; + uint32_t u32SubStart; + uint8_t u8PEOperationalMode; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -10148,7 +10884,7 @@ dissect_PE_EntityStatusData_block(tvbuff_t* tvb, int offset, } static const char * -decode_ARType_spezial(guint16 ARType, guint16 ARAccess) +decode_ARType_spezial(uint16_t ARType, uint16_t ARAccess) { if (ARType == 0x0001) return ("IO Controller AR"); @@ -10160,7 +10896,7 @@ decode_ARType_spezial(guint16 ARType, guint16 ARAccess) return("IO Controller AR (sysred/CiR)"); else if (ARType == 0x0006) { - if (ARAccess) /*TRUE */ + if (ARAccess) /*true */ return("DeviceAccess AR"); else return("IO Supervisor AR"); @@ -10172,26 +10908,26 @@ decode_ARType_spezial(guint16 ARType, guint16 ARAccess) /* dissect the ARBlockReq */ static int dissect_ARBlockReq_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, pnio_ar_t ** ar) { - guint16 u16ARType; - guint32 u32ARProperties; - gboolean have_aruuid = FALSE; + uint16_t u16ARType; + uint32_t u32ARProperties; + bool have_aruuid = false; e_guid_t aruuid; e_guid_t uuid; - guint16 u16SessionKey; - guint8 mac[6]; - guint16 u16TimeoutFactor; - guint16 u16UDPRTPort; - guint16 u16NameLength; + uint16_t u16SessionKey; + uint8_t mac[6]; + uint16_t u16TimeoutFactor; + uint16_t u16UDPRTPort; + uint16_t u16NameLength; char *pStationName; pnio_ar_t *par; proto_item *sub_item; proto_tree *sub_tree; - guint16 u16ArNumber; - guint16 u16ArResource; - guint16 u16ArReserved; + uint16_t u16ArNumber; + uint16_t u16ArResource; + uint16_t u16ArReserved; proto_item *sub_item_selector; proto_tree *sub_tree_selector; conversation_t *conversation; @@ -10258,13 +10994,13 @@ dissect_ARBlockReq_block(tvbuff_t *tvb, int offset, apdu_status_switch = wmem_new0(wmem_file_scope(), apduStatusSwitch); copy_address_shallow(&apdu_status_switch->dl_src, conversation_key_addr1(conversation->key_ptr)); copy_address_shallow(&apdu_status_switch->dl_dst, conversation_key_addr2(conversation->key_ptr)); - apdu_status_switch->isRedundancyActive = TRUE; + apdu_status_switch->isRedundancyActive = true; conversation_add_proto_data(conversation, proto_pn_io_apdu_status, apdu_status_switch); } else { copy_address_shallow(&apdu_status_switch->dl_src, conversation_key_addr1(conversation->key_ptr)); copy_address_shallow(&apdu_status_switch->dl_dst, conversation_key_addr2(conversation->key_ptr)); - apdu_status_switch->isRedundancyActive = TRUE; + apdu_status_switch->isRedundancyActive = true; } } } @@ -10272,7 +11008,7 @@ dissect_ARBlockReq_block(tvbuff_t *tvb, int offset, { offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep, hf_pn_io_ar_uuid, &aruuid); - have_aruuid = TRUE; + have_aruuid = true; } if (!PINFO_FD_VISITED(pinfo)) { @@ -10328,14 +11064,14 @@ dissect_ARBlockReq_block(tvbuff_t *tvb, int offset, /* dissect the ARBlockRes */ static int dissect_ARBlockRes_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, pnio_ar_t **ar) { - guint16 u16ARType; + uint16_t u16ARType; e_guid_t uuid; - guint16 u16SessionKey; - guint8 mac[6]; - guint16 u16UDPRTPort; + uint16_t u16SessionKey; + uint8_t mac[6]; + uint16_t u16UDPRTPort; pnio_ar_t *par; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -10381,40 +11117,40 @@ dissect_ARBlockRes_block(tvbuff_t *tvb, int offset, /* dissect the IOCRBlockReq */ static int dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, pnio_ar_t *ar) { - guint16 u16IOCRType; - guint16 u16IOCRReference; - guint16 u16LT; - guint16 u16DataLength; - guint16 u16FrameID; - guint16 u16SendClockFactor; - guint16 u16ReductionRatio; - guint16 u16Phase; - guint16 u16Sequence; - guint32 u32FrameSendOffset; - guint16 u16WatchdogFactor; - guint16 u16DataHoldFactor; - guint16 u16IOCRTagHeader; - guint8 mac[6]; - guint16 u16NumberOfAPIs; - guint32 u32Api; - guint16 u16NumberOfIODataObjectsInAPI; - guint16 u16NumberOfIODataObjectsInCR = 0U; - guint16 u16SlotNr; - guint16 u16SubslotNr; - guint16 u16IODataObjectFrameOffset; - guint16 u16NumberOfIOCSInAPI; - guint16 u16NumberOfIOCSInCR = 0U; - guint16 u16IOCSFrameOffset; + uint16_t u16IOCRType; + uint16_t u16IOCRReference; + uint16_t u16LT; + uint16_t u16DataLength; + uint16_t u16FrameID; + uint16_t u16SendClockFactor; + uint16_t u16ReductionRatio; + uint16_t u16Phase; + uint16_t u16Sequence; + uint32_t u32FrameSendOffset; + uint16_t u16WatchdogFactor; + uint16_t u16DataHoldFactor; + uint16_t u16IOCRTagHeader; + uint8_t mac[6]; + uint16_t u16NumberOfAPIs; + uint32_t u32Api; + uint16_t u16NumberOfIODataObjectsInAPI; + uint16_t u16NumberOfIODataObjectsInCR = 0U; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; + uint16_t u16IODataObjectFrameOffset; + uint16_t u16NumberOfIOCSInAPI; + uint16_t u16NumberOfIOCSInCR = 0U; + uint16_t u16IOCSFrameOffset; proto_item *api_item; proto_tree *api_tree; - guint32 u32ApiStart; - guint16 u16Tmp; + uint32_t u32ApiStart; + uint16_t u16Tmp; proto_item *sub_item; proto_tree *sub_tree; - guint32 u32SubStart; + uint32_t u32SubStart; conversation_t *conversation; conversation_t *conversation_time_aware; @@ -10427,7 +11163,7 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset, wmem_list_t *iocs_list; ARUUIDFrame *current_aruuid_frame = NULL; - guint32 current_aruuid = 0; + uint32_t current_aruuid = 0; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -10507,7 +11243,7 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset, hf_pn_io_number_of_io_data_objects, &u16NumberOfIODataObjectsInAPI); /* Set global Variant for Number of IO Data Objects */ - /* Notice: Handle Input & Output seperate!!! */ + /* Notice: Handle Input & Output separate!!! */ if (!PINFO_FD_VISITED(pinfo)) { /* Get current conversation endpoints using MAC addresses */ conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); @@ -10568,7 +11304,7 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset, io_data_object->f_dest_adr = 0; io_data_object->f_par_crc1 = 0; io_data_object->f_src_adr = 0; - io_data_object->f_crc_seed = FALSE; + io_data_object->f_crc_seed = false; io_data_object->f_crc_len = 0; /* Reset as a PNIO Connect Request of a known module appears */ io_data_object->last_sb_cb = 0; @@ -10600,7 +11336,7 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset, offset = dissect_dcerpc_uint16(tvb, offset, pinfo, api_tree, drep, hf_pn_io_number_of_iocs, &u16NumberOfIOCSInAPI); - /* Set global Vairant for NumberOfIOCS */ + /* Set global Variant for NumberOfIOCS */ if (!PINFO_FD_VISITED(pinfo)) { u16NumberOfIOCSInCR += u16NumberOfIOCSInAPI; } @@ -10705,18 +11441,18 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset, /* dissect the AlarmCRBlockReq */ static int dissect_AlarmCRBlockReq_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, pnio_ar_t *ar) { - guint16 u16AlarmCRType; - guint16 u16LT; - guint32 u32AlarmCRProperties; - guint16 u16RTATimeoutFactor; - guint16 u16RTARetries; - guint16 u16LocalAlarmReference; - guint16 u16MaxAlarmDataLength; - guint16 u16AlarmCRTagHeaderHigh; - guint16 u16AlarmCRTagHeaderLow; + uint16_t u16AlarmCRType; + uint16_t u16LT; + uint32_t u32AlarmCRProperties; + uint16_t u16RTATimeoutFactor; + uint16_t u16RTARetries; + uint16_t u16LocalAlarmReference; + uint16_t u16MaxAlarmDataLength; + uint16_t u16AlarmCRTagHeaderHigh; + uint16_t u16AlarmCRTagHeaderLow; proto_item *sub_item; proto_tree *sub_tree; @@ -10775,12 +11511,12 @@ dissect_AlarmCRBlockReq_block(tvbuff_t *tvb, int offset, /* dissect the AlarmCRBlockRes */ static int dissect_AlarmCRBlockRes_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, pnio_ar_t *ar) { - guint16 u16AlarmCRType; - guint16 u16LocalAlarmReference; - guint16 u16MaxAlarmDataLength; + uint16_t u16AlarmCRType; + uint16_t u16LocalAlarmReference; + uint16_t u16MaxAlarmDataLength; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -10815,9 +11551,9 @@ dissect_AlarmCRBlockRes_block(tvbuff_t *tvb, int offset, /* dissect the ARServerBlock */ static int dissect_ARServerBlock(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength) { - guint16 u16NameLength, u16padding; + uint16_t u16NameLength, u16padding; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -10842,12 +11578,12 @@ dissect_ARServerBlock(tvbuff_t *tvb, int offset, /* dissect the IOCRBlockRes */ static int dissect_IOCRBlockRes_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, pnio_ar_t *ar) { - guint16 u16IOCRType; - guint16 u16IOCRReference; - guint16 u16FrameID; + uint16_t u16IOCRType; + uint16_t u16IOCRReference; + uint16_t u16FrameID; ARUUIDFrame *current_aruuid_frame = NULL; @@ -10909,12 +11645,12 @@ dissect_IOCRBlockRes_block(tvbuff_t *tvb, int offset, /* dissect the MCRBlockReq */ static int dissect_MCRBlockReq_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16IOCRReference; - guint32 u32AddressResolutionProperties; - guint16 u16MCITimeoutFactor; - guint16 u16NameLength; + uint16_t u16IOCRReference; + uint32_t u32AddressResolutionProperties; + uint16_t u16MCITimeoutFactor; + uint16_t u16NameLength; char *pStationName; @@ -10948,13 +11684,13 @@ dissect_MCRBlockReq_block(tvbuff_t *tvb, int offset, /* dissect the SubFrameBlock */ static int dissect_SubFrameBlock_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { - guint16 u16IOCRReference; - guint8 mac[6]; - guint32 u32SubFrameData; - guint16 u16Tmp; + uint16_t u16IOCRReference; + uint8_t mac[6]; + uint32_t u32SubFrameData; + uint16_t u16Tmp; proto_item *sub_item; proto_tree *sub_tree; @@ -11006,15 +11742,15 @@ dissect_SubFrameBlock_block(tvbuff_t *tvb, int offset, /* dissect the (PD)SubFrameBlock 0x022B */ static int dissect_PDSubFrameBlock_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { - guint32 u32SFIOCRProperties; - guint32 u32SubFrameData; - guint16 u16FrameID; + uint32_t u32SFIOCRProperties; + uint32_t u32SubFrameData; + uint16_t u16FrameID; proto_item *sub_item; proto_tree *sub_tree; - guint16 u16RemainingLength; + uint16_t u16RemainingLength; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -11055,7 +11791,7 @@ dissect_PDSubFrameBlock_block(tvbuff_t *tvb, int offset, u16RemainingLength = u16BodyLength - PD_SUB_FRAME_BLOCK_FIOCR_PROPERTIES_LENGTH - PD_SUB_FRAME_BLOCK_FRAME_ID_LENGTH; while (u16RemainingLength >= PD_SUB_FRAME_BLOCK_SUB_FRAME_DATA_LENGTH) { - guint8 Position, + uint8_t Position, DataLength; sub_item = proto_tree_add_item(tree, hf_pn_io_subframe_data, tvb, offset, 4, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_subframe_data); @@ -11069,8 +11805,8 @@ dissect_PDSubFrameBlock_block(tvbuff_t *tvb, int offset, /* Bit 16 - 31: SubframeData.reserved_2 */ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_subframe_reserved2, &u32SubFrameData); - Position = (guint8) (u32SubFrameData & 0x7F); /* the lower 6 bits */ - DataLength =(guint8) ((u32SubFrameData >>8) & 0x0ff); /* bit 8 to 15 */ + Position = (uint8_t) (u32SubFrameData & 0x7F); /* the lower 6 bits */ + DataLength =(uint8_t) ((u32SubFrameData >>8) & 0x0ff); /* bit 8 to 15 */ proto_item_append_text(sub_item, ", Length:%u (0x%x), Pos:%u", DataLength,DataLength, Position); u16RemainingLength = u16RemainingLength - 4; @@ -11082,13 +11818,13 @@ dissect_PDSubFrameBlock_block(tvbuff_t *tvb, int offset, /* dissect the IRInfoBlock */ static int dissect_IRInfoBlock_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength _U_) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength _U_) { - guint16 u16NumberOfIOCR; - guint16 u16SubframeOffset; - guint32 u32SubframeData; - guint16 u16IOCRReference; + uint16_t u16NumberOfIOCR; + uint16_t u16SubframeOffset; + uint32_t u32SubframeData; + uint16_t u16IOCRReference; e_guid_t IRDataUUID; @@ -11124,12 +11860,12 @@ dissect_IRInfoBlock_block(tvbuff_t *tvb, int offset, /* dissect the SRInfoBlock */ static int dissect_SRInfoBlock_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength _U_) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength _U_) { - guint16 u16RedundancyDataHoldFactor; - guint32 u32sr_properties; - guint8 u8SRPropertiesMode; + uint16_t u16RedundancyDataHoldFactor; + uint32_t u32sr_properties; + uint8_t u8SRPropertiesMode; proto_item *sub_item; proto_tree *sub_tree; @@ -11140,11 +11876,11 @@ dissect_SRInfoBlock_block(tvbuff_t *tvb, int offset, } offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_RedundancyDataHoldFactor, &u16RedundancyDataHoldFactor); - u32sr_properties = tvb_get_guint32(tvb, offset, ENC_BIG_ENDIAN); + u32sr_properties = tvb_get_uint32(tvb, offset, ENC_BIG_ENDIAN); sub_item = proto_tree_add_item(tree, hf_pn_io_sr_properties, tvb, offset, 4, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_sr_properties); - u8SRPropertiesMode = (guint8)((u32sr_properties >> 2) & 0x01); + u8SRPropertiesMode = (uint8_t)((u32sr_properties >> 2) & 0x01); /* SRProperties.InputValidOnBackupAR with SRProperties.Mode == 1 */ if (u8SRPropertiesMode) @@ -11170,10 +11906,10 @@ dissect_SRInfoBlock_block(tvbuff_t *tvb, int offset, /* dissect the RSInfoBlock */ static int dissect_RSInfoBlock_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, - guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength _U_) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, + uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength _U_) { - guint32 u32RSProperties; + uint32_t u32RSProperties; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -11197,9 +11933,9 @@ dissect_RSInfoBlock_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_PDIRSubframeData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberOfSubframeBlocks; + uint16_t u16NumberOfSubframeBlocks; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -11218,12 +11954,12 @@ dissect_PDIRSubframeData_block(tvbuff_t *tvb, int offset, static int dissect_ARVendorBlockReq_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength _U_) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength _U_) { - guint16 APStructureIdentifier; - guint32 gu32API; - guint32 guDataBytes; + uint16_t APStructureIdentifier; + uint32_t gu32API; + uint32_t guDataBytes; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -11277,15 +12013,15 @@ dissect_ARVendorBlockReq_block(tvbuff_t *tvb, int offset, /* dissect the DataDescription */ static int dissect_DataDescription(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep, ioDataObject *tmp_io_data_object) + packet_info *pinfo, proto_tree *tree, uint8_t *drep, ioDataObject *tmp_io_data_object) { - guint16 u16DataDescription; - guint16 u16SubmoduleDataLength; - guint8 u8LengthIOCS; - guint8 u8LengthIOPS; + uint16_t u16DataDescription; + uint16_t u16SubmoduleDataLength; + uint8_t u8LengthIOCS; + uint8_t u8LengthIOPS; proto_item *sub_item; proto_tree *sub_tree; - guint32 u32SubStart; + uint32_t u32SubStart; conversation_t *conversation; stationInfo *station_info = NULL; @@ -11294,7 +12030,7 @@ dissect_DataDescription(tvbuff_t *tvb, int offset, wmem_list_t *ioobject_list; ARUUIDFrame *current_aruuid_frame = NULL; - guint32 current_aruuid = 0; + uint32_t current_aruuid = 0; sub_item = proto_tree_add_item(tree, hf_pn_io_data_description_tree, tvb, offset, 0, ENC_NA); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_data_description); @@ -11384,10 +12120,10 @@ resolve_pa_profile_submodule_name(ioDataObject *io_data_object) const uint8_t parent_class = (u32SubmoduleIdentNumber >> 8u) & 0xFFu; const uint8_t class = (u32SubmoduleIdentNumber) & 0xFFu; - const gchar* parent_class_name = NULL; - const gchar* class_name = NULL; + const char* parent_class_name = NULL; + const char* class_name = NULL; - const gchar* block_object_name = try_val_to_str(block_object, pn_io_pa_profile_block_object_vals); + const char* block_object_name = try_val_to_str(block_object, pn_io_pa_profile_block_object_vals); if (block_object_name != NULL) { @@ -11479,25 +12215,25 @@ resolve_pa_profile_submodule_name(ioDataObject *io_data_object) /* dissect the ExpectedSubmoduleBlockReq */ static int dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberOfAPIs; - guint32 u32Api; - guint16 u16SlotNr; - guint32 u32ModuleIdentNumber; - guint16 u16ModuleProperties; - guint16 u16NumberOfSubmodules; - guint16 u16SubslotNr; - guint32 u32SubmoduleIdentNumber; - guint16 u16SubmoduleProperties; + uint16_t u16NumberOfAPIs; + uint32_t u32Api; + uint16_t u16SlotNr; + uint32_t u32ModuleIdentNumber; + uint16_t u16ModuleProperties; + uint16_t u16NumberOfSubmodules; + uint16_t u16SubslotNr; + uint32_t u32SubmoduleIdentNumber; + uint16_t u16SubmoduleProperties; proto_item *api_item; proto_tree *api_tree; - guint32 u32ApiStart; + uint32_t u32ApiStart; proto_item *sub_item; proto_tree *sub_tree; proto_item *submodule_item; proto_tree *submodule_tree; - guint32 u32SubStart; + uint32_t u32SubStart; /* Variable for the search of gsd file */ const char vendorIdStr[] = "VendorID=\""; @@ -11510,51 +12246,51 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, const char moduleNameInfo[] = "<Name"; const char moduleValueInfo[] = "Value=\""; - guint16 searchVendorID = 0; - guint16 searchDeviceID = 0; - gboolean vendorMatch; - gboolean deviceMatch; + uint16_t searchVendorID = 0; + uint16_t searchDeviceID = 0; + bool vendorMatch; + bool deviceMatch; conversation_t *conversation; stationInfo *station_info = NULL; ioDataObject *io_data_object = NULL; /* Used to transfer data to fct. "dissect_DataDescription()" */ /* Variable for the search of GSD-file */ - guint32 read_vendor_id; - guint32 read_device_id; - guint32 read_module_id; - guint32 read_submodule_id; - gboolean gsdmlFoundFlag; - gchar tmp_moduletext[MAX_NAMELENGTH]; - gchar *convertStr; /* GSD-file search */ - gchar *pch; /* helppointer, to save temp. the found Networkpath of GSD-file */ - gchar *puffer; /* used for fgets() during GSD-file search */ - gchar *temp; /* used for fgets() during GSD-file search */ - gchar *diropen = NULL; /* saves the final networkpath to open for GSD-files */ + uint32_t read_vendor_id; + uint32_t read_device_id; + uint32_t read_module_id; + uint32_t read_submodule_id; + bool gsdmlFoundFlag; + char tmp_moduletext[MAX_NAMELENGTH]; + char *convertStr; /* GSD-file search */ + char *pch; /* helppointer, to save temp. the found Networkpath of GSD-file */ + char *puffer; /* used for fgets() during GSD-file search */ + char *temp; /* used for fgets() during GSD-file search */ + char *diropen = NULL; /* saves the final networkpath to open for GSD-files */ GDir *dir; FILE *fp = NULL; /* filepointer */ - const gchar *filename; /* saves the found GSD-file name */ + const char *filename; /* saves the found GSD-file name */ ARUUIDFrame *current_aruuid_frame = NULL; - guint32 current_aruuid = 0; + uint32_t current_aruuid = 0; /* Helppointer initial */ - convertStr = (gchar*)wmem_alloc(pinfo->pool, MAX_NAMELENGTH); + convertStr = (char*)wmem_alloc(pinfo->pool, MAX_NAMELENGTH); convertStr[0] = '\0'; - pch = (gchar*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH); + pch = (char*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH); pch[0] = '\0'; - puffer = (gchar*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH); + puffer = (char*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH); puffer[0] = '\0'; - temp = (gchar*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH); + temp = (char*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH); temp[0] = '\0'; /* Initial */ io_data_object = wmem_new0(wmem_file_scope(), ioDataObject); - io_data_object->profisafeSupported = FALSE; - io_data_object->moduleNameStr = (gchar*)wmem_alloc(wmem_file_scope(), MAX_NAMELENGTH); + io_data_object->profisafeSupported = false; + io_data_object->moduleNameStr = (char*)wmem_alloc(wmem_file_scope(), MAX_NAMELENGTH); (void) g_strlcpy(io_data_object->moduleNameStr, "Unknown", MAX_NAMELENGTH); - vendorMatch = FALSE; - deviceMatch = FALSE; - gsdmlFoundFlag = FALSE; + vendorMatch = false; + deviceMatch = false; + gsdmlFoundFlag = false; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -11589,8 +12325,8 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, if (station_info != NULL) { pn_find_dcp_station_info(station_info, conversation); - station_info->gsdFound = FALSE; - station_info->gsdPathLength = FALSE; + station_info->gsdFound = false; + station_info->gsdPathLength = false; /* Set searchVendorID and searchDeviceID for GSDfile search */ searchVendorID = station_info->u16Vendor_id; @@ -11598,7 +12334,7 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, /* Use the given GSD-file networkpath of the PNIO-Preference */ if(pnio_ps_networkpath[0] != '\0') { /* check the length of the given networkpath (array overflow protection) */ - station_info->gsdPathLength = TRUE; + station_info->gsdPathLength = true; if ((dir = g_dir_open(pnio_ps_networkpath, 0, NULL)) != NULL) { /* Find all GSD-files within directory */ @@ -11618,10 +12354,10 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, memset (convertStr, 0, sizeof(*convertStr)); pch = strstr(puffer, vendorIdStr); if (pch!= NULL && sscanf(pch, "VendorID=\"%199[^\"]", convertStr) == 1) { - read_vendor_id = (guint32) strtoul (convertStr, NULL, 0); + read_vendor_id = (uint32_t) strtoul (convertStr, NULL, 0); if(read_vendor_id == searchVendorID) { - vendorMatch = TRUE; /* found correct VendorID */ + vendorMatch = true; /* found correct VendorID */ } } } @@ -11631,10 +12367,10 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, memset(convertStr, 0, sizeof(*convertStr)); pch = strstr(puffer, deviceIdStr); if (pch != NULL && sscanf(pch, "DeviceID=\"%199[^\"]", convertStr) == 1) { - read_device_id = (guint32)strtoul(convertStr, NULL, 0); + read_device_id = (uint32_t)strtoul(convertStr, NULL, 0); if(read_device_id == searchDeviceID) { - deviceMatch = TRUE; /* found correct DeviceID */ + deviceMatch = true; /* found correct DeviceID */ } } } @@ -11648,9 +12384,9 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, } else { /* Couldn't find the correct GSD-file to the corresponding device */ - vendorMatch = FALSE; - deviceMatch = FALSE; - gsdmlFoundFlag = FALSE; + vendorMatch = false; + deviceMatch = false; + gsdmlFoundFlag = false; diropen = ""; /* reset array for next search */ } } @@ -11661,8 +12397,8 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, /* ---- Found the correct GSD-file -> set Flag and save the completed path ---- */ if(vendorMatch && deviceMatch) { - gsdmlFoundFlag = TRUE; - station_info->gsdFound = TRUE; + gsdmlFoundFlag = true; + station_info->gsdFound = true; station_info->gsdLocation = wmem_strdup(wmem_file_scope(), diropen); } else { @@ -11672,7 +12408,7 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, } else { /* will be used later on in cyclic RTC1 data dissection for detailed output message */ - station_info->gsdPathLength = FALSE; + station_info->gsdPathLength = false; } } @@ -11764,7 +12500,7 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, io_data_object->amountInGSDML = 0; io_data_object->fParameterIndexNr = 0; - io_data_object->profisafeSupported = FALSE; + io_data_object->profisafeSupported = false; if (diropen != NULL) { fp = ws_fopen(diropen, "r"); @@ -11782,7 +12518,7 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, pch = strstr(temp, fParameterIndexStr); if (pch != NULL && sscanf(pch, "Index=\"%199[^\"]", convertStr) == 1) { - io_data_object->fParameterIndexNr = (guint32)strtoul(convertStr, NULL, 0); + io_data_object->fParameterIndexNr = (uint32_t)strtoul(convertStr, NULL, 0); } break; /* found Indexnumber -> break search loop */ } @@ -11796,7 +12532,7 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, memset (convertStr, 0, sizeof(*convertStr)); pch = strstr(temp, moduleStr); /* search for "ModuleIdentNumber=\"" within GSD-file */ if (pch != NULL && sscanf(pch, "ModuleIdentNumber=\"%199[^\"]", convertStr) == 1) { /* Change format of Value string-->numeric string */ - read_module_id = (guint32)strtoul(convertStr, NULL, 0); /* Change numeric string --> unsigned long; read_module_id contains the Value of the ModuleIdentNumber */ + read_module_id = (uint32_t)strtoul(convertStr, NULL, 0); /* Change numeric string --> unsigned long; read_module_id contains the Value of the ModuleIdentNumber */ /* If the found ModuleID matches with the wanted ModuleID, search for the Submodule and break */ if (read_module_id == io_data_object->moduleIdentNr) { @@ -11830,18 +12566,18 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, memset (convertStr, 0, sizeof(*convertStr)); pch = strstr(temp, subModuleStr); if (pch != NULL && sscanf(pch, "SubmoduleIdentNumber=\"%199[^\"]", convertStr) == 1) { - read_submodule_id = (guint32) strtoul (convertStr, NULL, 0); /* read_submodule_id contains the Value of the SubModuleIdentNumber */ + read_submodule_id = (uint32_t) strtoul (convertStr, NULL, 0); /* read_submodule_id contains the Value of the SubModuleIdentNumber */ /* Find "PROFIsafeSupported" flag of the module in GSD-file */ if(read_submodule_id == io_data_object->subModuleIdentNr) { if((strstr(temp, profisafeStr)) != NULL) { - io_data_object->profisafeSupported = TRUE; /* flag is in the same line as SubmoduleIdentNr */ + io_data_object->profisafeSupported = true; /* flag is in the same line as SubmoduleIdentNr */ break; } else { /* flag is not in the same line as Submoduleidentnumber -> search for it */ while(pn_fgets(temp, MAX_LINE_LENGTH, fp, pinfo->pool) != NULL) { if((strstr(temp, profisafeStr)) != NULL) { - io_data_object->profisafeSupported = TRUE; + io_data_object->profisafeSupported = true; break; /* Found the PROFIsafeSupported flag of the module */ } @@ -11903,29 +12639,29 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, /* dissect the ModuleDiffBlock */ static int dissect_ModuleDiffBlock_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16NumberOfAPIs; - guint32 u32Api; - guint16 u16NumberOfModules; - guint16 u16SlotNr; - guint32 u32ModuleIdentNumber; - guint16 u16ModuleState; - guint16 u16NumberOfSubmodules; - guint16 u16SubslotNr; - guint32 u32SubmoduleIdentNumber; - guint16 u16SubmoduleState; + uint16_t u16NumberOfAPIs; + uint32_t u32Api; + uint16_t u16NumberOfModules; + uint16_t u16SlotNr; + uint32_t u32ModuleIdentNumber; + uint16_t u16ModuleState; + uint16_t u16NumberOfSubmodules; + uint16_t u16SubslotNr; + uint32_t u32SubmoduleIdentNumber; + uint16_t u16SubmoduleState; proto_item *api_item; proto_tree *api_tree; - guint32 u32ApiStart; + uint32_t u32ApiStart; proto_item *module_item; proto_tree *module_tree; - guint32 u32ModuleStart; + uint32_t u32ModuleStart; proto_item *sub_item; proto_tree *sub_tree; proto_item *submodule_item; proto_tree *submodule_tree; - guint32 u32SubStart; + uint32_t u32SubStart; conversation_t *conversation; stationInfo *station_info; @@ -11934,7 +12670,7 @@ dissect_ModuleDiffBlock_block(tvbuff_t *tvb, int offset, moduleDiffInfo *cmp_module_diff_info; ARUUIDFrame *current_aruuid_frame = NULL; - guint32 current_aruuid = 0; + uint32_t current_aruuid = 0; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -12082,16 +12818,16 @@ dissect_ModuleDiffBlock_block(tvbuff_t *tvb, int offset, /* dissect the IsochronousModeData block */ static int dissect_IsochronousModeData_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { - guint16 u16SlotNr; - guint16 u16SubslotNr; - guint16 u16ControllerApplicationCycleFactor; - guint16 u16TimeDataCycle; - guint32 u32TimeIOInput; - guint32 u32TimeIOOutput; - guint32 u32TimeIOInputValid; - guint32 u32TimeIOOutputValid; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; + uint16_t u16ControllerApplicationCycleFactor; + uint16_t u16TimeDataCycle; + uint32_t u32TimeIOInput; + uint32_t u32TimeIOOutput; + uint32_t u32TimeIOInputValid; + uint32_t u32TimeIOOutputValid; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -12134,14 +12870,14 @@ dissect_IsochronousModeData_block(tvbuff_t *tvb, int offset, static int dissect_CommunityName_block(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, const guint8 *drep _U_, int hfindex) + packet_info *pinfo, proto_tree *tree, const uint8_t *drep _U_, int hfindex) { - guint8 u8CommunityNameLength; + uint8_t u8CommunityNameLength; proto_item* sub_item; proto_item* sub_tree; /* CommunityNameLength */ - u8CommunityNameLength = tvb_get_guint8(tvb, offset); + u8CommunityNameLength = tvb_get_uint8(tvb, offset); sub_item = proto_tree_add_item(tree, hfindex, tvb, offset, u8CommunityNameLength + 1, ENC_NA); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_snmp_command_name); @@ -12152,7 +12888,7 @@ dissect_CommunityName_block(tvbuff_t *tvb, int offset, proto_tree_add_item(sub_tree, hf_pn_io_snmp_community_name, tvb, offset, u8CommunityNameLength, ENC_ASCII | ENC_NA); proto_item_append_text(sub_item, ": %s", - tvb_get_string_enc(wmem_packet_scope(), tvb, offset, u8CommunityNameLength, ENC_ASCII|ENC_NA)); + tvb_get_string_enc(pinfo->pool, tvb, offset, u8CommunityNameLength, ENC_ASCII|ENC_NA)); offset += u8CommunityNameLength; return offset; @@ -12161,11 +12897,11 @@ dissect_CommunityName_block(tvbuff_t *tvb, int offset, /* dissect the CIMSNMPAdjust block */ static int dissect_CIMSNMPAdjust_block(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { - guint16 u16StartsAtOffset = offset; - guint16 u16padding; + uint16_t u16StartsAtOffset = offset; + uint16_t u16padding; if (u8BlockVersionHigh!=1 || u8BlockVersionLow!=0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -12191,12 +12927,12 @@ dissect_CIMSNMPAdjust_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_MultipleBlockHeader_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16BodyLength) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16BodyLength) { - guint32 u32Api; - guint16 u16SlotNr; - guint16 u16SubslotNr; + uint32_t u32Api; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; tvbuff_t *new_tvb; @@ -12230,12 +12966,12 @@ dissect_MultipleBlockHeader_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_COContainerContent_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16Index, uint32_t *u32RecDataLen, pnio_ar_t **ar) { - guint32 u32Api; - guint16 u16SlotNr; - guint16 u16SubslotNr; + uint32_t u32Api; + uint16_t u16SlotNr; + uint16_t u16SubslotNr; if(u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -12270,8 +13006,8 @@ dissect_COContainerContent_block(tvbuff_t *tvb, int offset, } -static const gchar * -indexReservedForProfiles(guint16 u16Index) +static const char * +indexReservedForProfiles(uint16_t u16Index) { /* "reserved for profiles" */ if (u16Index >= 0xb000 && u16Index <= 0xbfff) { @@ -12297,10 +13033,10 @@ indexReservedForProfiles(guint16 u16Index) /* dissect the RecordDataReadQuery block */ static int dissect_RecordDataReadQuery_block(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, - guint16 u16Index, guint16 u16BodyLength) + packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, + uint16_t u16Index, uint16_t u16BodyLength) { - const gchar *userProfile; + const char *userProfile; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { @@ -12328,8 +13064,8 @@ dissect_RecordDataReadQuery_block(tvbuff_t *tvb, int offset, /* dissect the RS_GetEvent block */ static int dissect_RS_GetEvent_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, - guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, + uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -12343,15 +13079,15 @@ dissect_RS_GetEvent_block(tvbuff_t *tvb, int offset, /* dissect the RS_AdjustControl */ static int dissect_RS_AdjustControl(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, guint8 *drep, - guint16 *u16RSBodyLength, guint16 *u16RSBlockType) + packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep, + uint16_t *u16RSBodyLength, uint16_t *u16RSBlockType) { - guint16 u16ChannelNumber; - guint16 u16SoEMaxScanDelay; + uint16_t u16ChannelNumber; + uint16_t u16SoEMaxScanDelay; proto_item *sub_item; proto_tree *sub_tree; - guint8 u8SoEAdjustSpecifierReserved; - guint8 u8SoEAdjustSpecifierIndicent; + uint8_t u8SoEAdjustSpecifierReserved; + uint8_t u8SoEAdjustSpecifierIndicent; switch (*u16RSBlockType) { case(0xc010): /* SoE_DigitalInputObserver */ @@ -12388,13 +13124,13 @@ dissect_RS_AdjustControl(tvbuff_t *tvb, int offset, /* dissect the RS_AdjustBlock */ static int dissect_RS_AdjustBlock(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, guint8 *drep) + packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep) { proto_item *sub_item; proto_tree *sub_tree; - guint16 u16RSBodyLength; - guint16 u16RSBlockType; + uint16_t u16RSBodyLength; + uint16_t u16RSBlockType; sub_item = proto_tree_add_item(tree, hf_pn_io_rs_adjust_block, tvb, offset, 0, ENC_NA); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_adjust_block); @@ -12413,11 +13149,11 @@ dissect_RS_AdjustBlock(tvbuff_t *tvb, int offset, /* dissect the RS_AdjustInfo */ static int dissect_RS_AdjustInfo(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, guint8 *drep) + packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep) { proto_item *sub_item; proto_tree *sub_tree; - guint16 u16NumberofEntries; + uint16_t u16NumberofEntries; sub_item = proto_tree_add_item(tree, hf_pn_io_rs_adjust_info, tvb, offset, 0, ENC_NA); sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_adjust_info); @@ -12435,8 +13171,8 @@ dissect_RS_AdjustInfo(tvbuff_t *tvb, int offset, /* dissect the RS_AdjustObserver block */ static int dissect_RS_AdjustObserver_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, - guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, + uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -12449,9 +13185,9 @@ dissect_RS_AdjustObserver_block(tvbuff_t *tvb, int offset, static int dissect_RS_AckInfo(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, guint8 *drep) + packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep) { - guint16 u16RSSpecifierSequenceNumber; + uint16_t u16RSSpecifierSequenceNumber; /* RS_Specifier.SequenceNumber */ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, @@ -12463,8 +13199,8 @@ dissect_RS_AckInfo(tvbuff_t *tvb, int offset, /* dissect the RS_AckEvent block */ static int dissect_RS_AckEvent_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, - guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, + uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow) { if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -12479,19 +13215,19 @@ dissect_RS_AckEvent_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar) + packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t *u16Index, uint32_t *u32RecDataLen, pnio_ar_t **ar) { - guint16 u16BlockType; - guint16 u16BlockLength; - guint8 u8BlockVersionHigh; - guint8 u8BlockVersionLow; + uint16_t u16BlockType; + uint16_t u16BlockLength; + uint8_t u8BlockVersionHigh; + uint8_t u8BlockVersionLow; proto_item *sub_item; proto_tree *sub_tree; - guint32 u32SubStart; - guint16 u16BodyLength; + uint32_t u32SubStart; + uint16_t u16BodyLength; proto_item *header_item; proto_tree *header_tree; - gint remainingBytes; + int remainingBytes; /* from here, we only have big endian (network byte ordering)!!! */ drep[0] &= ~DREP_LITTLE_ENDIAN; @@ -12854,7 +13590,7 @@ dissect_block(tvbuff_t *tvb, int offset, dissect_TSNTimeData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow); break; case(0x0275): - dissect_TSNStreamPathDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, FALSE); + dissect_TSNStreamPathDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, false); break; case(0x0276): dissect_TSNSyncTreeData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow); @@ -12869,7 +13605,7 @@ dissect_block(tvbuff_t *tvb, int offset, dissect_TSNExpectedNetworkAttributes_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow); break; case(0x027A): - dissect_TSNStreamPathDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, TRUE); + dissect_TSNStreamPathDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, true); break; case(0x027B): dissect_TSNDomainPortIngressRateLimiter_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow); @@ -12908,6 +13644,12 @@ dissect_block(tvbuff_t *tvb, int offset, case(0x0609): dissect_ARFSUDataAdjust_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength); break; + case(0x0800): + dissect_PE_ServiceRequest_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength); + break; + case(0x0801): + dissect_PE_ServiceResponse_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength); + break; case(0x0810): dissect_PE_EntityFilterData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow); break; @@ -12982,10 +13724,10 @@ dissect_block(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_a_block(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) + packet_info *pinfo, proto_tree *tree, uint8_t *drep) { - guint16 u16Index = 0; - guint32 u32RecDataLen; + uint16_t u16Index = 0; + uint32_t u32RecDataLen; pnio_ar_t *ar = NULL; offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar); @@ -13001,14 +13743,14 @@ dissect_a_block(tvbuff_t *tvb, int offset, int // NOLINTNEXTLINE(misc-no-recursion) dissect_blocks(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) + packet_info *pinfo, proto_tree *tree, uint8_t *drep) { - guint16 u16Index = 0; - guint32 u32RecDataLen; + uint16_t u16Index = 0; + uint32_t u32RecDataLen; pnio_ar_t *ar = NULL; - while (tvb_captured_length(tvb) > (guint) offset) { + while (tvb_captured_length(tvb) > (unsigned) offset) { offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar); u16Index++; } @@ -13024,17 +13766,17 @@ dissect_blocks(tvbuff_t *tvb, int offset, /* dissect a PN-IO (DCE-RPC) request header */ static int dissect_IPNIO_rqst_header(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) + packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep) { - guint32 u32ArgsMax; - guint32 u32ArgsLen; - guint32 u32MaxCount; - guint32 u32Offset; - guint32 u32ArraySize; + uint32_t u32ArgsMax; + uint32_t u32ArgsLen; + uint32_t u32MaxCount; + uint32_t u32Offset; + uint32_t u32ArraySize; proto_item *sub_item; proto_tree *sub_tree; - guint32 u32SubStart; + uint32_t u32SubStart; col_set_str(pinfo->cinfo, COL_PROTOCOL, "PNIO-CM"); @@ -13069,16 +13811,16 @@ dissect_IPNIO_rqst_header(tvbuff_t *tvb, int offset, /* dissect a PN-IO (DCE-RPC) response header */ static int dissect_IPNIO_resp_header(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) + packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep) { - guint32 u32ArgsLen; - guint32 u32MaxCount; - guint32 u32Offset; - guint32 u32ArraySize; + uint32_t u32ArgsLen; + uint32_t u32MaxCount; + uint32_t u32Offset; + uint32_t u32ArraySize; proto_item *sub_item; proto_tree *sub_tree; - guint32 u32SubStart; + uint32_t u32SubStart; col_set_str(pinfo->cinfo, COL_PROTOCOL, "PNIO-CM"); @@ -13112,7 +13854,7 @@ dissect_IPNIO_resp_header(tvbuff_t *tvb, int offset, /* dissect a PN-IO request */ static int dissect_IPNIO_rqst(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) + packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep) { offset = dissect_IPNIO_rqst_header(tvb, offset, pinfo, tree, di, drep); @@ -13126,7 +13868,7 @@ dissect_IPNIO_rqst(tvbuff_t *tvb, int offset, /* dissect a PN-IO response */ static int dissect_IPNIO_resp(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) + packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep) { offset = dissect_IPNIO_resp_header(tvb, offset, pinfo, tree, di, drep); @@ -13139,13 +13881,13 @@ dissect_IPNIO_resp(tvbuff_t *tvb, int offset, /* dissect a PROFIDrive parameter request */ static int dissect_ProfiDriveParameterRequest(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) + packet_info *pinfo, proto_tree *tree, uint8_t *drep) { - guint8 request_reference; - guint8 request_id; - guint8 do_id; - guint8 no_of_parameters; - guint8 addr_idx; + uint8_t request_reference; + uint8_t request_id; + uint8_t do_id; + uint8_t no_of_parameters; + uint8_t addr_idx; proto_item *profidrive_item; proto_tree *profidrive_tree; @@ -13175,10 +13917,10 @@ dissect_ProfiDriveParameterRequest(tvbuff_t *tvb, int offset, /* Parameter address list */ for(addr_idx=0; addr_idx<no_of_parameters; addr_idx++) { - guint8 attribute; - guint8 no_of_elems; - guint16 parameter; - guint16 idx; + uint8_t attribute; + uint8_t no_of_elems; + uint16_t parameter; + uint16_t idx; proto_item *sub_item; proto_tree *sub_tree; @@ -13210,8 +13952,8 @@ dissect_ProfiDriveParameterRequest(tvbuff_t *tvb, int offset, /* in case of change request parameter value list */ if (request_id == 0x02) { for(addr_idx=0; addr_idx<no_of_parameters; addr_idx++) { - guint8 format; - guint8 no_of_vals; + uint8_t format; + uint8_t no_of_vals; proto_item *sub_item; proto_tree *sub_tree; @@ -13239,13 +13981,13 @@ dissect_ProfiDriveParameterRequest(tvbuff_t *tvb, int offset, static int dissect_ProfiDriveParameterResponse(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) + packet_info *pinfo, proto_tree *tree, uint8_t *drep) { - guint8 request_reference; - guint8 response_id; - guint8 do_id; - guint8 no_of_parameters; - guint8 addr_idx; + uint8_t request_reference; + uint8_t response_id; + uint8_t do_id; + uint8_t no_of_parameters; + uint8_t addr_idx; proto_item *profidrive_item; proto_tree *profidrive_tree; @@ -13269,8 +14011,8 @@ dissect_ProfiDriveParameterResponse(tvbuff_t *tvb, int offset, /* in case of parameter response value list */ if (response_id == 0x01) { for(addr_idx=0; addr_idx<no_of_parameters; addr_idx++) { - guint8 format; - guint8 no_of_vals; + uint8_t format; + uint8_t no_of_vals; proto_item *sub_item; proto_tree *sub_tree; @@ -13299,9 +14041,9 @@ dissect_ProfiDriveParameterResponse(tvbuff_t *tvb, int offset, if(response_id == 0x81){ for(addr_idx=0; addr_idx<no_of_parameters; addr_idx++) { - guint8 format; - guint8 no_of_vals; - guint16 value16; + uint8_t format; + uint8_t no_of_vals; + uint16_t value16; proto_item *sub_item; proto_tree *sub_tree; @@ -13355,9 +14097,9 @@ dissect_ProfiDriveParameterResponse(tvbuff_t *tvb, int offset, if(response_id == 0x82){ for(addr_idx=0; addr_idx<no_of_parameters; addr_idx++) { - guint8 format; - guint8 no_of_vals; - guint16 value16; + uint8_t format; + uint8_t no_of_vals; + uint16_t value16; proto_item *sub_item; proto_tree *sub_tree; @@ -13412,9 +14154,9 @@ dissect_ProfiDriveParameterResponse(tvbuff_t *tvb, int offset, static int dissect_RecordDataRead(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16Index, guint32 u32RecDataLen) + packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t u16Index, uint32_t u32RecDataLen) { - const gchar *userProfile; + const char *userProfile; pnio_ar_t *ar = NULL; /* profidrive parameter access response */ @@ -13466,6 +14208,7 @@ dissect_RecordDataRead(tvbuff_t *tvb, int offset, case(0x8071): /* PDPortStatistic for one subslot */ case(0x8080): /* PDInterfaceDataReal */ case(0x8090): /* PDInterfaceFSUDataAdjust */ + case(0x80A0): /* PROFIenergy ServiceRecord */ case(0x80AF): /* PE_EntityStatusData for one subslot */ case(0x80CF): /* RS_AdjustObserver */ @@ -13619,10 +14362,10 @@ dissect_RecordDataRead(tvbuff_t *tvb, int offset, /* dissect a PN-IO read response */ static int dissect_IPNIO_Read_resp(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) + packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep) { - guint16 u16Index = 0; - guint32 u32RecDataLen = 0; + uint16_t u16Index = 0; + uint32_t u32RecDataLen = 0; pnio_ar_t *ar = NULL; offset = dissect_IPNIO_resp_header(tvb, offset, pinfo, tree, di, drep); @@ -13649,7 +14392,7 @@ dissect_IPNIO_Read_resp(tvbuff_t *tvb, int offset, /* F-Parameter record data object */ static int dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16Index, wmem_list_frame_t *frame) + packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t u16Index, wmem_list_frame_t *frame) { proto_item *f_item; proto_tree *f_tree; @@ -13657,22 +14400,22 @@ dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset, proto_tree *flags1_tree; proto_item *flags2_item; proto_tree *flags2_tree; - guint16 src_addr; - guint16 dst_addr; - guint16 wd_time; - guint16 par_crc; - guint32 ipar_crc = 0; - guint8 prm_flag1; - guint8 prm_flag1_chck_seq; - guint8 prm_flag1_chck_ipar; - guint8 prm_flag1_sil; - guint8 prm_flag1_crc_len; - guint8 prm_flag1_crc_seed; - guint8 prm_flag1_reserved; - guint8 prm_flag2; - guint8 prm_flag2_reserved; - guint8 prm_flag2_f_block_id; - guint8 prm_flag2_f_par_version; + uint16_t src_addr; + uint16_t dst_addr; + uint16_t wd_time; + uint16_t par_crc; + uint32_t ipar_crc = 0; + uint8_t prm_flag1; + uint8_t prm_flag1_chck_seq; + uint8_t prm_flag1_chck_ipar; + uint8_t prm_flag1_sil; + uint8_t prm_flag1_crc_len; + uint8_t prm_flag1_crc_seed; + uint8_t prm_flag1_reserved; + uint8_t prm_flag2; + uint8_t prm_flag2_reserved; + uint8_t prm_flag2_f_block_id; + uint8_t prm_flag2_f_par_version; conversation_t *conversation; stationInfo *station_info; @@ -13680,7 +14423,7 @@ dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset, wmem_list_frame_t *frame_out; ARUUIDFrame *current_aruuid_frame = NULL; - guint32 current_aruuid = 0; + uint32_t current_aruuid = 0; f_item = proto_tree_add_item(tree, hf_pn_io_block, tvb, offset, 0, ENC_NA); f_tree = proto_item_add_subtree(f_item, ett_pn_io_profisafe_f_parameter); @@ -13735,7 +14478,7 @@ dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset, hf_pn_io_ps_f_par_crc, &par_crc); - /* Differniate between ipar_crc and no_ipar_crc */ + /* Differentiate between ipar_crc and no_ipar_crc */ if( (prm_flag2_f_block_id & 0x08) && !(prm_flag2_f_block_id & 0x20) ) { /* include ipar_crc display */ col_append_fstr(pinfo->cinfo, COL_INFO, ", F-Parameter record, prm_flag1:0x%02x, prm_flag2:0x%02x, src:0x%04x," @@ -13822,18 +14565,18 @@ dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset, static int dissect_RecordDataWrite(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16Index, guint32 u32RecDataLen) + packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t u16Index, uint32_t u32RecDataLen) { conversation_t *conversation; stationInfo *station_info; wmem_list_frame_t *frame; ioDataObject *io_data_object; - const gchar *userProfile; + const char *userProfile; pnio_ar_t *ar = NULL; ARUUIDFrame *current_aruuid_frame = NULL; - guint32 current_aruuid = 0; + uint32_t current_aruuid = 0; /* PROFISafe */ /* Get current conversation endpoints using MAC addresses */ @@ -13933,6 +14676,7 @@ dissect_RecordDataWrite(tvbuff_t *tvb, int offset, case(0x8070): /* PDNCDataCheck for one subslot */ case(0x8071): /* PDInterfaceAdjust */ case(0x8090): /* PDInterfaceFSUDataAdjust */ + case(0x80A0): /* PROFIenergy ServiceRecord */ case(0x80B0): /* CombinedObjectContainer*/ case(0x80CF): /* RS_AdjustObserver */ case(0x8200): /* CIMSNMPAdjust */ @@ -13955,10 +14699,10 @@ dissect_RecordDataWrite(tvbuff_t *tvb, int offset, static int // NOLINTNEXTLINE(misc-no-recursion) dissect_IODWriteReq(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep, pnio_ar_t **ar, guint recursion_count) + packet_info *pinfo, proto_tree *tree, uint8_t *drep, pnio_ar_t **ar, unsigned recursion_count) { - guint16 u16Index = 0; - guint32 u32RecDataLen = 0; + uint16_t u16Index = 0; + uint32_t u32RecDataLen = 0; if (++recursion_count >= PN_IO_MAX_RECURSION_DEPTH) { proto_tree_add_expert(tree, pinfo, &ei_pn_io_max_recursion_depth_reached, @@ -14005,10 +14749,10 @@ dissect_IODWriteReq(tvbuff_t *tvb, int offset, /* dissect a PN-IO write request */ static int dissect_IPNIO_Write_rqst(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) + packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep) { pnio_ar_t *ar = NULL; - guint recursion_count = 0; + unsigned recursion_count = 0; offset = dissect_IPNIO_rqst_header(tvb, offset, pinfo, tree, di, drep); @@ -14025,10 +14769,10 @@ dissect_IPNIO_Write_rqst(tvbuff_t *tvb, int offset, static int dissect_IODWriteRes(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) + packet_info *pinfo, proto_tree *tree, uint8_t *drep) { - guint16 u16Index = 0; - guint32 u32RecDataLen; + uint16_t u16Index = 0; + uint32_t u32RecDataLen; pnio_ar_t *ar = NULL; @@ -14053,7 +14797,7 @@ dissect_IODWriteRes(tvbuff_t *tvb, int offset, /* dissect a PN-IO write response */ static int dissect_IPNIO_Write_resp(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) + packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep) { offset = dissect_IPNIO_resp_header(tvb, offset, pinfo, tree, di, drep); @@ -14067,12 +14811,12 @@ dissect_IPNIO_Write_resp(tvbuff_t *tvb, int offset, /* dissect any number of PN-RSI blocks */ int dissect_rsi_blocks(tvbuff_t* tvb, int offset, - packet_info* pinfo, proto_tree* tree, guint8* drep, guint32 u32FOpnumOffsetOpnum, int type) + packet_info* pinfo, proto_tree* tree, uint8_t* drep, uint32_t u32FOpnumOffsetOpnum, int type) { pnio_ar_t* ar = NULL; - guint recursion_count = 0; - guint16 u16Index = 0; - guint32 u32RecDataLen = 0; + unsigned recursion_count = 0; + uint16_t u16Index = 0; + uint32_t u32RecDataLen = 0; switch (u32FOpnumOffsetOpnum) { @@ -14129,15 +14873,15 @@ dissect_rsi_blocks(tvbuff_t* tvb, int offset, /* dissect the IOxS (IOCS, IOPS) field */ static int dissect_PNIO_IOxS(tvbuff_t *tvb, int offset, - packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, int hfindex) + packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep _U_, int hfindex) { if (tree) { - guint8 u8IOxS; + uint8_t u8IOxS; proto_item *ioxs_item; proto_tree *ioxs_tree; - u8IOxS = tvb_get_guint8(tvb, offset); + u8IOxS = tvb_get_uint8(tvb, offset); /* add ioxs subtree */ ioxs_item = proto_tree_add_uint(tree, hfindex, tvb, offset, 1, u8IOxS); @@ -14160,11 +14904,11 @@ dissect_PNIO_IOxS(tvbuff_t *tvb, int offset, /* dissect a PN-IO Cyclic Service Data Unit (on top of PN-RT protocol) */ static int dissect_PNIO_C_SDU(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep _U_) + packet_info *pinfo, proto_tree *tree, uint8_t *drep _U_) { proto_tree *data_tree = NULL; - /* gint iTotalLen = 0; */ - /* gint iSubFrameLen = 0; */ + /* int iTotalLen = 0; */ + /* int iSubFrameLen = 0; */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "PNIO"); @@ -14195,20 +14939,20 @@ dissect_PNIO_C_SDU(tvbuff_t *tvb, int offset, /* dissect a PN-IO RTA PDU (on top of PN-RT protocol) */ static int dissect_PNIO_RTA(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, guint8 *drep) + packet_info *pinfo, proto_tree *tree, uint8_t *drep) { - guint16 u16AlarmDstEndpoint; - guint16 u16AlarmSrcEndpoint; - guint8 u8PDUType; - guint8 u8PDUVersion; - guint8 u8WindowSize; - guint8 u8Tack; - guint16 u16SendSeqNum; - guint16 u16AckSeqNum; - guint16 u16VarPartLen; + uint16_t u16AlarmDstEndpoint; + uint16_t u16AlarmSrcEndpoint; + uint8_t u8PDUType; + uint8_t u8PDUVersion; + uint8_t u8WindowSize; + uint8_t u8Tack; + uint16_t u16SendSeqNum; + uint16_t u16AckSeqNum; + uint16_t u16VarPartLen; int start_offset = offset; - guint16 u16Index = 0; - guint32 u32RecDataLen; + uint16_t u16Index = 0; + uint32_t u32RecDataLen; pnio_ar_t *ar = NULL; @@ -14293,17 +15037,17 @@ dissect_PNIO_RTA(tvbuff_t *tvb, int offset, /* possibly dissect a PN-IO related PN-RT packet */ -static gboolean +static bool dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { - guint8 drep_data = 0; - guint8 *drep = &drep_data; + uint8_t drep_data = 0; + uint8_t *drep = &drep_data; /* the sub tvb will NOT contain the frame_id here! */ - guint16 u16FrameID = GPOINTER_TO_UINT(data); + uint16_t u16FrameID = GPOINTER_TO_UINT(data); heur_dtbl_entry_t *hdtbl_entry; conversation_t* conversation; - guint8 isTimeAware = FALSE; + uint8_t isTimeAware = false; /* * In case the packet is a protocol encoded in the basic PNIO transport stream, @@ -14311,7 +15055,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * to dissect it as a normal PNIO packet. */ if (dissector_try_heuristic(heur_pn_subdissector_list, tvb, pinfo, tree, &hdtbl_entry, NULL)) - return TRUE; + return true; /* TimeAwareness Information needed for dissecting RTC3 - RTSteam frames */ conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); @@ -14326,7 +15070,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, (u16FrameID >= 0x0700 && u16FrameID <= 0x0fff)) && /* RTC3 redundant */ !isTimeAware) { dissect_CSF_SDU_heur(tvb, pinfo, tree, data); - return TRUE; + return true; } /* is this a PNIO class stream data packet? */ @@ -14335,7 +15079,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, (u16FrameID >= 0x3800 && u16FrameID <= 0x3FFF)) && isTimeAware) { dissect_CSF_SDU_heur(tvb, pinfo, tree, data); - return TRUE; + return true; } /* The following range is reserved for following developments */ @@ -14343,7 +15087,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * first byte (CBA version field) has to be != 0x11 */ if (u16FrameID >= 0x4000 && u16FrameID <= 0x7fff) { dissect_PNIO_C_SDU(tvb, 0, pinfo, tree, drep); - return TRUE; + return true; } /* is this a PNIO class 1 data packet? */ @@ -14351,7 +15095,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * first byte (CBA version field) has to be != 0x11 */ if (u16FrameID >= 0x8000 && u16FrameID < 0xbfff) { dissect_PNIO_C_SDU_RTC1(tvb, 0, pinfo, tree, drep, u16FrameID); - return TRUE; + return true; } /* is this a PNIO class 1 (legacy) data packet? */ @@ -14359,7 +15103,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * first byte (CBA version field) has to be != 0x11 */ if (u16FrameID >= 0xc000 && u16FrameID < 0xfbff) { dissect_PNIO_C_SDU_RTC1(tvb, 0, pinfo, tree, drep, u16FrameID); - return TRUE; + return true; } /* is this a PNIO high priority alarm packet? */ @@ -14367,7 +15111,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, col_set_str(pinfo->cinfo, COL_INFO, "Alarm High"); dissect_PNIO_RTA(tvb, 0, pinfo, tree, drep); - return TRUE; + return true; } /* is this a PNIO low priority alarm packet? */ @@ -14375,22 +15119,26 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, col_set_str(pinfo->cinfo, COL_INFO, "Alarm Low"); dissect_PNIO_RTA(tvb, 0, pinfo, tree, drep); - return TRUE; + return true; } /* is this a Remote Service Interface (RSI) packet*/ if (u16FrameID == 0xfe02) { dissect_PNIO_RSI(tvb, 0, pinfo, tree, drep); - return TRUE; + return true; } /* this PN-RT packet doesn't seem to be PNIO specific */ - return FALSE; + return false; } +static int +dissect_PNIO(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) +{ + return dissect_PNIO_heur(tvb, pinfo, tree, data) ? tvb_captured_length(tvb) : 0; +} - -static gboolean +static bool pn_io_ar_conv_valid(packet_info *pinfo, void *user_data _U_) { void* profinet_type = p_get_proto_data(pinfo->pool, pinfo, proto_pn_io, 0); @@ -14398,7 +15146,7 @@ pn_io_ar_conv_valid(packet_info *pinfo, void *user_data _U_) return ((profinet_type != NULL) && (GPOINTER_TO_UINT(profinet_type) == 10)); } -static gchar * +static char * pn_io_ar_conv_filter(packet_info *pinfo, void *user_data _U_) { pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0); @@ -14423,7 +15171,7 @@ pn_io_ar_conv_filter(packet_info *pinfo, void *user_data _U_) return buf; } -static gchar * +static char * pn_io_ar_conv_data_filter(packet_info *pinfo, void *user_data _U_) { pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0); @@ -14473,7 +15221,7 @@ pn_io_ar_conv_data_filter(packet_info *pinfo, void *user_data _U_) /* the PNIO dcerpc interface table */ -static dcerpc_sub_dissector pn_io_dissectors[] = { +static const dcerpc_sub_dissector pn_io_dissectors[] = { { 0, "Connect", dissect_IPNIO_rqst, dissect_IPNIO_resp }, { 1, "Release", dissect_IPNIO_rqst, dissect_IPNIO_resp }, { 2, "Read", dissect_IPNIO_rqst, dissect_IPNIO_Read_resp }, @@ -17685,22 +18433,22 @@ proto_register_pn_io (void) NULL, HFILL } }, { &hf_pn_io_am_location_beginslotnum, - { "AM_Location.BeginSlotNumber", "pn_io.slot_nr", + { "AM_Location.BeginSlotNumber", "pn_io.am_location.beginslotnumber", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_pn_io_am_location_beginsubslotnum, - { "AM_Location.BeginSubSlotNumber", "pn_io.subslot_nr", + { "AM_Location.BeginSubSlotNumber", "pn_io.am_location.beginsubslotnumber", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_pn_io_am_location_endslotnum, - { "AM_Location.EndSlotNumber", "pn_io.slot_nr", + { "AM_Location.EndSlotNumber", "pn_io.am_location.endslotnumber", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_pn_io_am_location_endsubslotnum, - { "AM_Location.EndSubSlotNumber", "pn_io.subslot_nr", + { "AM_Location.EndSubSlotNumber", "pn_io.am_location.endsubslotnumber", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, @@ -17729,6 +18477,251 @@ proto_register_pn_io (void) FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_mau_type_extension), 0x0, NULL, HFILL } }, + { &hf_pn_io_pe_service_request_id, + { "PE ServiceID", "pn_io.profienergy.service.id", + FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_services), 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_service_request_reference, + { "PE RequestRef", "pn_io.profienergy.service.request_reference", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_service_modifier, + { "PE ServiceModifier", "pn_io.profienergy.service.modifier", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_service_status, + { "PE ServiceStatus", "pn_io.profienergy.service.status", + FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_service_status), 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_service_structure_id, + { "PE StructID", "pn_io.profienergy.service.structure_id", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_service_errorcode, + { "PE ServiceError", "pn_io.profienergy.service.errorcode", + FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_service_errorcode), 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_service_datarequest, + { "PE DataRequest", "pn_io.profienergy.datarerequest", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_service_dataresponse, + { "PE DataResponse", "pn_io.profienergy.dataresponse", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_data_count, + { "Count", "pn_io.profienergy.data.count", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_pause_time, + { "Pause_time in msec", "pn_io.profienergy.time.pause", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_time_min_pause, + { "Time_min_Pause in msec", "pn_io.profienergy.time.min_pause", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_time_to_pause, + { "Time_to_Pause in msec", "pn_io.profienergy.time.to_pause", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_time_min_length_of_stay, + { "Time_min_length_of_stay in msec", "pn_io.profienergy.time.min_length_of_stay", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_time_max_length_of_stay, + { "Time_max_length_of_stay in msec", "pn_io.profienergy.time.max_length_of_stay", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_regular_time_to_operate, + { "Regular_time_to_operate in msec", "pn_io.profienergy.time.regular_to_operate", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_current_time_to_operate, + { "Current_time_to_operate in msec", "pn_io.profienergy.time.current_to_operate", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_current_time_to_destination, + { "Current_time_to_destination in msec", "pn_io.profienergy.time.current_to_destination", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_mode_power_consumption, + { "Mode PowerConsumption in kW", "pn_io.profienergy.mode.power_consumption", + FT_FLOAT, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_energy_to_destination, + { "Energy Consumption_to_destination in kWh", "pn_io.profienergy.energy.to_destination", + FT_FLOAT, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_energy_to_operate, + { "Energy Consumption_to_operate in kWh", "pn_io.profienergy.energy.to_operate", + FT_FLOAT, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_energy_to_pause, + { "Energy Consumption_to_pause in kWh", "pn_io.profienergy.energy.to_pause", + FT_FLOAT, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_version_major, + { "PE VersionMajor", "pn_io.profienergy.version.major", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_version_minor, + { "PE VersionMinor", "pn_io.profienergy.version.minor", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_entity_class, + { "PE Entity Class", "pn_io.profienergy.entity.class", + FT_UINT8, BASE_HEX, VALS(pn_io_pe_entity_classes), 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_entity_subclass, + { "PE Entity Subclass", "pn_io.profienergy.entity.subclass", + FT_UINT8, BASE_HEX, VALS(pn_io_pe_entity_subclasses), 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_entity_dyn_t_and_e, + { "PE Dyn_T_and_E_values", "pn_io.profienergy.entity.dyn_t_and_e", + FT_UINT8, BASE_HEX, VALS(pn_io_pe_dyn_t_and_e_values), 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_entity_pe_ase, + { "PE ASE", "pn_io.profienergy.entity.use_pease", + FT_UINT8, BASE_HEX, VALS(pn_io_pe_use_pe_ase), 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_maximum_command_respond_time, + { "PE Max_command_respond_time in msec", "pn_io.profienergy.time.max_respond_time", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_mode_id, + { "ModeID", "pn_io.profienergy.mode.id", + FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_operational_mode), 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_mode_attributes_value, + { "ModeAttributes", "pn_io.profienergy.mode.attributes", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_mode_attributes_value_bit0, + { "ModeAttributes", "pn_io.profienergy.mode.attributes_bit0", + FT_UINT8, BASE_HEX, VALS(pn_io_pe_mode_attributes_bit0), 0x1, + NULL, HFILL } + }, + { &hf_pn_io_pe_mode_attributes_value_otherbits, + { "ModeAttributes", "pn_io.profienergy.mode.attributes_otherbits", + FT_UINT8, BASE_HEX, NULL, 0xFE, + NULL, HFILL } + }, + { &hf_pn_io_pe_wol_wake_up_method, + { "Wake_Up_Method", "pn_io.profienergy.wol.wake_up_method", + FT_UINT8, BASE_HEX, VALS(pn_io_pe_wol_wake_up_method), 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_wol_wake_up_data_length, + { "Wake_Up_Data_Length", "pn_io.profienergy.wol.wake_up_data_length", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_mode_id_source, + { "ModeID Source", "pn_io.profienergy.mode.id_source", + FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_operational_mode), 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_mode_id_destination, + { "ModeID Destination", "pn_io.profienergy.mode.id_destination", + FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_operational_mode), 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement, + { "Measurement", "pn_io.profienergy.measurement", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement_id, + { "ID", "pn_io.profienergy.measurement.id", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement_object_number, + { "Object_Number", "pn_io.profienergy.measurement.object_number", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement_accuracy_domain, + { "Accuracy_Domain", "pn_io.profienergy.measurement.accuracy_domain", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement_accuracy_class, + { "Accuracy_Class", "pn_io.profienergy.measurement.accuracy_class", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement_range, + { "Range", "pn_io.profienergy.measurement.range", + FT_FLOAT, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement_structure_length, + { "Structure Length", "pn_io.profienergy.measurement.structure_length", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement_structure_id, + { "Structure ID", "pn_io.profienergy.measurement.structure_id", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement_status, + { "Status", "pn_io.profienergy.measurement.status", + FT_UINT8, BASE_DEC, VALS(pn_io_pe_measurement_status), 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement_value, + { "Measurement Value", "pn_io.profienergy.measurement.value", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement_value_uint32, + { "Value", "pn_io.profienergy.measurement.value_uint32", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement_value_float32, + { "Value", "pn_io.profienergy.measurement.value_float32", + FT_FLOAT, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pn_io_pe_measurement_value_float64, + { "Value", "pn_io.profienergy.measurement.value_float64", + FT_DOUBLE, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, { &hf_pn_io_pe_operational_mode, { "PE_OperationalMode", "pn_io.pe_operationalmode", FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_operational_mode), 0x0, @@ -17761,7 +18754,7 @@ proto_register_pn_io (void) }, }; - static gint *ett[] = { + static int *ett[] = { &ett_pn_io, &ett_pn_io_block, &ett_pn_io_block_header, @@ -17830,6 +18823,13 @@ proto_register_pn_io (void) &ett_pn_io_dcp_boundary, &ett_pn_io_peer_to_peer_boundary, &ett_pn_io_mau_type_extension, + &ett_pn_io_pe_service_request, + &ett_pn_io_pe_service_response, + &ett_pn_io_pe_service_datarequest, + &ett_pn_io_pe_service_dataresponse, + &ett_pn_io_pe_mode_attributes, + &ett_pn_io_pe_measurement_id, + &ett_pn_io_pe_measurement_value, &ett_pn_io_pe_operational_mode, &ett_pn_io_neighbor, &ett_pn_io_tsn_domain_vid_config, @@ -17861,7 +18861,7 @@ proto_register_pn_io (void) proto_pn_io = proto_register_protocol ("PROFINET IO", "PNIO", "pn_io"); /* Register by name */ - register_dissector("pnio", dissect_PNIO_heur, proto_pn_io); + register_dissector("pnio", dissect_PNIO, proto_pn_io); /* Created to remove Decode As confusion */ proto_pn_io_device = proto_register_protocol_in_name_only("PROFINET IO (Device)", "PNIO (Device Interface)", "pn_io_device", proto_pn_io, FT_PROTOCOL); @@ -17885,12 +18885,12 @@ proto_register_pn_io (void) &pnio_ps_selection); prefs_register_directory_preference(pnio_module, "pnio_ps_networkpath", "Folder containing GSD files", /* Title */ - "Place GSD files in this folder.", /* Descreption */ + "Place GSD files in this folder.", /* Description */ &pnio_ps_networkpath); /* Variable in which to save the GSD file folder path */ /* subdissector code */ - register_dissector("pn_io", dissect_PNIO_heur, proto_pn_io); - heur_pn_subdissector_list = register_heur_dissector_list("pn_io", proto_pn_io); + register_dissector("pn_io", dissect_PNIO, proto_pn_io); + heur_pn_subdissector_list = register_heur_dissector_list_with_description("pn_io", "PROFINET IO payload", proto_pn_io); /* Initialise RTC1 dissection */ init_pn_io_rtc1(proto_pn_io); |