diff options
Diffstat (limited to 'epan/dissectors/packet-acn.c')
-rw-r--r-- | epan/dissectors/packet-acn.c | 1785 |
1 files changed, 892 insertions, 893 deletions
diff --git a/epan/dissectors/packet-acn.c b/epan/dissectors/packet-acn.c index e259c080..ed6be198 100644 --- a/epan/dissectors/packet-acn.c +++ b/epan/dissectors/packet-acn.c @@ -14,7 +14,7 @@ /* Todo: - Add reading of DDL files so we can futher explode DMP packets + Add reading of DDL files so we can further explode DMP packets For some of the Set/Get properties where we have a range of data it would be better to show the block of data rather and address-data pair on each line... @@ -428,21 +428,21 @@ static dissector_handle_t acn_handle; typedef struct { - guint32 start; - guint32 vector; - guint32 header; - guint32 data; - guint32 data_length; + uint32_t start; + uint32_t vector; + uint32_t header; + uint32_t data; + uint32_t data_length; } acn_pdu_offsets; typedef struct { - guint8 flags; - guint32 address; /* or first address */ - guint32 increment; - guint32 count; - guint32 size; - guint32 data_length; + uint8_t flags; + uint32_t address; /* or first address */ + uint32_t increment; + uint32_t count; + uint32_t size; + uint32_t data_length; } acn_dmp_adt_type; /* @@ -454,323 +454,323 @@ typedef struct #define ACTUAL_ADDRESS 0 /* forward reference */ -static guint32 acn_add_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, const char *label); +static uint32_t acn_add_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, const char *label); static int dissect_acn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data); -static int dissect_rdmnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 data_offset, gboolean is_udp); +static int dissect_rdmnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint32_t data_offset, bool is_udp); /* Global variables */ -static int proto_acn = -1; -static gint ett_acn = -1; -static gint ett_acn_channel_owner_info_block = -1; -static gint ett_acn_channel_member_info_block = -1; -static gint ett_acn_channel_parameter = -1; -static gint ett_acn_address = -1; -static gint ett_acn_address_type = -1; -static gint ett_acn_blob = -1; -static gint ett_acn_pdu_flags = -1; -static gint ett_acn_dmp_pdu = -1; -static gint ett_acn_sdt_pdu = -1; -static gint ett_acn_sdt_client_pdu = -1; -static gint ett_acn_sdt_base_pdu = -1; -static gint ett_acn_root_pdu = -1; - -static gint ett_acn_dmx_address = -1; -static gint ett_acn_dmx_2_options = -1; -static gint ett_acn_dmx_data_pdu = -1; -static gint ett_acn_dmx_pdu = -1; - -static gint ett_rdmnet_pdu_flags = -1; -static gint ett_rdmnet_llrp_base_pdu = -1; -static gint ett_rdmnet_llrp_probe_request_pdu = -1; -static gint ett_rdmnet_llrp_probe_request_filter_flags = -1; -static gint ett_rdmnet_llrp_probe_reply_pdu = -1; -static gint ett_rdmnet_llrp_rdm_command_pdu = -1; - -static gint ett_rdmnet_broker_base_pdu = -1; -static gint ett_rdmnet_broker_client_entry_pdu = -1; -static gint ett_rdmnet_broker_client_entry_manufacturer_protocol_ids = -1; -static gint ett_rdmnet_broker_connect_connection_flags = -1; -static gint ett_rdmnet_broker_client_entry_update_connection_flags = -1; - -static gint ett_rdmnet_rpt_base_pdu = -1; -static gint ett_rdmnet_rpt_request_pdu = -1; -static gint ett_rdmnet_rpt_status_pdu = -1; -static gint ett_rdmnet_rpt_notification_pdu = -1; - -static gint ett_rdmnet_ept_base_pdu = -1; -static gint ett_rdmnet_ept_data_pdu = -1; -static gint ett_rdmnet_ept_data_vector_pdu = -1; -static gint ett_rdmnet_ept_status_pdu = -1; - -static expert_field ei_acn_dmx_discovery_outofseq = EI_INIT; +static int proto_acn; +static int ett_acn; +static int ett_acn_channel_owner_info_block; +static int ett_acn_channel_member_info_block; +static int ett_acn_channel_parameter; +static int ett_acn_address; +static int ett_acn_address_type; +static int ett_acn_blob; +static int ett_acn_pdu_flags; +static int ett_acn_dmp_pdu; +static int ett_acn_sdt_pdu; +static int ett_acn_sdt_client_pdu; +static int ett_acn_sdt_base_pdu; +static int ett_acn_root_pdu; + +static int ett_acn_dmx_address; +static int ett_acn_dmx_2_options; +static int ett_acn_dmx_data_pdu; +static int ett_acn_dmx_pdu; + +static int ett_rdmnet_pdu_flags; +static int ett_rdmnet_llrp_base_pdu; +static int ett_rdmnet_llrp_probe_request_pdu; +static int ett_rdmnet_llrp_probe_request_filter_flags; +static int ett_rdmnet_llrp_probe_reply_pdu; +static int ett_rdmnet_llrp_rdm_command_pdu; + +static int ett_rdmnet_broker_base_pdu; +static int ett_rdmnet_broker_client_entry_pdu; +static int ett_rdmnet_broker_client_entry_manufacturer_protocol_ids; +static int ett_rdmnet_broker_connect_connection_flags; +static int ett_rdmnet_broker_client_entry_update_connection_flags; + +static int ett_rdmnet_rpt_base_pdu; +static int ett_rdmnet_rpt_request_pdu; +static int ett_rdmnet_rpt_status_pdu; +static int ett_rdmnet_rpt_notification_pdu; + +static int ett_rdmnet_ept_base_pdu; +static int ett_rdmnet_ept_data_pdu; +static int ett_rdmnet_ept_data_vector_pdu; +static int ett_rdmnet_ept_status_pdu; + +static expert_field ei_acn_dmx_discovery_outofseq; /* Register fields */ /* In alphabetical order */ -static int hf_acn_association = -1; -static int hf_acn_blob = -1; -/* static int hf_acn_blob_dimmer_load_properties2_type = -1; */ -static int hf_acn_blob_field_length = -1; -static int hf_acn_blob_field_type = -1; -static int hf_acn_blob_field_value_number = -1; -static int hf_acn_blob_field_value_number64 = -1; -static int hf_acn_blob_field_value_ipv4 = -1; -static int hf_acn_blob_field_value_ipv6 = -1; -static int hf_acn_blob_field_value_float = -1; -static int hf_acn_blob_field_value_double = -1; -static int hf_acn_blob_field_value_guid = -1; -static int hf_acn_blob_field_value_string = -1; -/* static int hf_acn_blob_metadata_types_type = -1; */ -static int hf_acn_blob_range_number = -1; -/* static int hf_acn_blob_range_start = -1; */ -static int hf_acn_blob_range_type = -1; -static int hf_acn_blob_tree_field_type = -1; -static int hf_acn_blob_type = -1; -static int hf_acn_blob_version = -1; -static int hf_acn_blob_time_zone = -1; -static int hf_acn_blob_dst_type = -1; -static int hf_acn_blob_dst_start_day = -1; -static int hf_acn_blob_dst_stop_day = -1; -static int hf_acn_blob_dst_start_locality = -1; -static int hf_acn_blob_dst_stop_locality = -1; -static int hf_acn_channel_number = -1; -static int hf_acn_cid = -1; -/* static int hf_acn_client_protocol_id = -1; */ -static int hf_acn_data = -1; -static int hf_acn_data8 = -1; -static int hf_acn_data16 = -1; -static int hf_acn_data24 = -1; -static int hf_acn_data32 = -1; -/* static int hf_acn_dmp_adt = -1; */ /* address and data type*/ -static int hf_acn_dmp_adt_a = -1; -static int hf_acn_dmp_adt_v = -1; -static int hf_acn_dmp_adt_r = -1; -static int hf_acn_dmp_adt_d = -1; -static int hf_acn_dmp_adt_x = -1; -static int hf_acn_dmp_reason_code = -1; -static int hf_acn_dmp_vector = -1; -static int hf_acn_dmp_actual_address = -1; -static int hf_acn_dmp_virtual_address = -1; -static int hf_acn_dmp_actual_address_first = -1; -static int hf_acn_dmp_virtual_address_first = -1; -static int hf_acn_expiry = -1; -static int hf_acn_first_member_to_ack = -1; -static int hf_acn_first_missed_sequence = -1; -static int hf_acn_ip_address_type = -1; -static int hf_acn_ipv4 = -1; -static int hf_acn_ipv6 = -1; -static int hf_acn_last_member_to_ack = -1; -static int hf_acn_last_missed_sequence = -1; -static int hf_acn_mak_threshold = -1; -static int hf_acn_member_id = -1; -static int hf_acn_nak_holdoff = -1; -static int hf_acn_nak_max_wait = -1; -static int hf_acn_nak_modulus = -1; -static int hf_acn_nak_outbound_flag = -1; -static int hf_acn_oldest_available_wrapper = -1; -static int hf_acn_packet_identifier = -1; -static int hf_acn_pdu = -1; -static int hf_acn_pdu_flag_d = -1; -static int hf_acn_pdu_flag_h = -1; -static int hf_acn_pdu_flag_l = -1; -static int hf_acn_pdu_flag_v = -1; -static int hf_acn_pdu_flags = -1; -static int hf_acn_pdu_length = -1; -static int hf_acn_port = -1; -static int hf_acn_postamble_size = -1; -static int hf_acn_preamble_size = -1; -static int hf_acn_protocol_id = -1; -static int hf_acn_reason_code = -1; -static int hf_acn_reciprocal_channel = -1; -static int hf_acn_refuse_code = -1; -static int hf_acn_reliable_sequence_number = -1; -static int hf_acn_adhoc_expiry = -1; -/* static int hf_acn_sdt_pdu = -1; */ -static int hf_acn_sdt_vector = -1; - -static int hf_acn_dmx_vector = -1; -static int hf_acn_dmx_extension_vector = -1; -/* static int hf_acn_session_count = -1; */ -static int hf_acn_total_sequence_number = -1; -static int hf_acn_dmx_source_name = -1; -static int hf_acn_dmx_priority = -1; -static int hf_acn_dmx_2_sync_universe = -1; -static int hf_acn_dmx_3_reserved = -1; -static int hf_acn_dmx_sequence_number = -1; -static int hf_acn_dmx_2_options = -1; -static int hf_acn_dmx_2_option_p = -1; -static int hf_acn_dmx_2_option_s = -1; -static int hf_acn_dmx_2_option_f = -1; -static int hf_acn_dmx_universe = -1; - -static int hf_acn_dmx_start_code = -1; -static int hf_acn_dmx_2_first_property_address = -1; -static int hf_acn_dmx_increment = -1; -static int hf_acn_dmx_count = -1; -static int hf_acn_dmx_2_start_code = -1; -static int hf_acn_dmx_data = -1; - -static int hf_acn_postamble_key_fingerprint = -1; -static int hf_acn_postamble_seq_type = -1; -static int hf_acn_postamble_seq_hi = -1; -static int hf_acn_postamble_seq_low = -1; -static int hf_acn_postamble_message_digest = -1; - -static int hf_acn_dmx_discovery_framing_reserved = -1; -static int hf_acn_dmx_discovery_page = -1; -static int hf_acn_dmx_discovery_last_page = -1; -static int hf_acn_dmx_discovery_vector = -1; -static int hf_acn_dmx_discovery_universe_list = -1; - -static int hf_acn_dmx_sync_universe = -1; -static int hf_acn_dmx_sync_reserved = -1; - -/* static int hf_acn_dmx_dmp_vector = -1; */ +static int hf_acn_association; +static int hf_acn_blob; +/* static int hf_acn_blob_dimmer_load_properties2_type; */ +static int hf_acn_blob_field_length; +static int hf_acn_blob_field_type; +static int hf_acn_blob_field_value_number; +static int hf_acn_blob_field_value_number64; +static int hf_acn_blob_field_value_ipv4; +static int hf_acn_blob_field_value_ipv6; +static int hf_acn_blob_field_value_float; +static int hf_acn_blob_field_value_double; +static int hf_acn_blob_field_value_guid; +static int hf_acn_blob_field_value_string; +/* static int hf_acn_blob_metadata_types_type; */ +static int hf_acn_blob_range_number; +/* static int hf_acn_blob_range_start; */ +static int hf_acn_blob_range_type; +static int hf_acn_blob_tree_field_type; +static int hf_acn_blob_type; +static int hf_acn_blob_version; +static int hf_acn_blob_time_zone; +static int hf_acn_blob_dst_type; +static int hf_acn_blob_dst_start_day; +static int hf_acn_blob_dst_stop_day; +static int hf_acn_blob_dst_start_locality; +static int hf_acn_blob_dst_stop_locality; +static int hf_acn_channel_number; +static int hf_acn_cid; +/* static int hf_acn_client_protocol_id; */ +static int hf_acn_data; +static int hf_acn_data8; +static int hf_acn_data16; +static int hf_acn_data24; +static int hf_acn_data32; +/* static int hf_acn_dmp_adt; */ /* address and data type*/ +static int hf_acn_dmp_adt_a; +static int hf_acn_dmp_adt_v; +static int hf_acn_dmp_adt_r; +static int hf_acn_dmp_adt_d; +static int hf_acn_dmp_adt_x; +static int hf_acn_dmp_reason_code; +static int hf_acn_dmp_vector; +static int hf_acn_dmp_actual_address; +static int hf_acn_dmp_virtual_address; +static int hf_acn_dmp_actual_address_first; +static int hf_acn_dmp_virtual_address_first; +static int hf_acn_expiry; +static int hf_acn_first_member_to_ack; +static int hf_acn_first_missed_sequence; +static int hf_acn_ip_address_type; +static int hf_acn_ipv4; +static int hf_acn_ipv6; +static int hf_acn_last_member_to_ack; +static int hf_acn_last_missed_sequence; +static int hf_acn_mak_threshold; +static int hf_acn_member_id; +static int hf_acn_nak_holdoff; +static int hf_acn_nak_max_wait; +static int hf_acn_nak_modulus; +static int hf_acn_nak_outbound_flag; +static int hf_acn_oldest_available_wrapper; +static int hf_acn_packet_identifier; +static int hf_acn_pdu; +static int hf_acn_pdu_flag_d; +static int hf_acn_pdu_flag_h; +static int hf_acn_pdu_flag_l; +static int hf_acn_pdu_flag_v; +static int hf_acn_pdu_flags; +static int hf_acn_pdu_length; +static int hf_acn_port; +static int hf_acn_postamble_size; +static int hf_acn_preamble_size; +static int hf_acn_protocol_id; +static int hf_acn_reason_code; +static int hf_acn_reciprocal_channel; +static int hf_acn_refuse_code; +static int hf_acn_reliable_sequence_number; +static int hf_acn_adhoc_expiry; +/* static int hf_acn_sdt_pdu; */ +static int hf_acn_sdt_vector; + +static int hf_acn_dmx_vector; +static int hf_acn_dmx_extension_vector; +/* static int hf_acn_session_count; */ +static int hf_acn_total_sequence_number; +static int hf_acn_dmx_source_name; +static int hf_acn_dmx_priority; +static int hf_acn_dmx_2_sync_universe; +static int hf_acn_dmx_3_reserved; +static int hf_acn_dmx_sequence_number; +static int hf_acn_dmx_2_options; +static int hf_acn_dmx_2_option_p; +static int hf_acn_dmx_2_option_s; +static int hf_acn_dmx_2_option_f; +static int hf_acn_dmx_universe; + +static int hf_acn_dmx_start_code; +static int hf_acn_dmx_2_first_property_address; +static int hf_acn_dmx_increment; +static int hf_acn_dmx_count; +static int hf_acn_dmx_2_start_code; +static int hf_acn_dmx_data; + +static int hf_acn_postamble_key_fingerprint; +static int hf_acn_postamble_seq_type; +static int hf_acn_postamble_seq_hi; +static int hf_acn_postamble_seq_low; +static int hf_acn_postamble_message_digest; + +static int hf_acn_dmx_discovery_framing_reserved; +static int hf_acn_dmx_discovery_page; +static int hf_acn_dmx_discovery_last_page; +static int hf_acn_dmx_discovery_vector; +static int hf_acn_dmx_discovery_universe_list; + +static int hf_acn_dmx_sync_universe; +static int hf_acn_dmx_sync_reserved; + +/* static int hf_acn_dmx_dmp_vector; */ /* Try heuristic ACN decode */ -static gboolean global_acn_dmx_enable = FALSE; -static gint global_acn_dmx_display_view = 0; -static gint global_acn_dmx_display_line_format = 0; -static gboolean global_acn_dmx_display_zeros = FALSE; -static gboolean global_acn_dmx_display_leading_zeros = FALSE; +static bool global_acn_dmx_enable; +static int global_acn_dmx_display_view; +static int global_acn_dmx_display_line_format; +static bool global_acn_dmx_display_zeros; +static bool global_acn_dmx_display_leading_zeros; -static int proto_magic = -1; -static gint ett_magic = -1; +static int proto_magic; +static int ett_magic; /* Register fields */ -static int hf_magic_protocol_id = -1; -static int hf_magic_pdu_subtype = -1; -static int hf_magic_major_version = -1; -static int hf_magic_minor_version = -1; +static int hf_magic_protocol_id; +static int hf_magic_pdu_subtype; +static int hf_magic_major_version; +static int hf_magic_minor_version; -static int hf_magic_v1command_vals = -1; +static int hf_magic_v1command_vals; -static int hf_magic_command_vals = -1; -static int hf_magic_command_beacon_duration = -1; -static int hf_magic_command_tftp = -1; -static int hf_magic_command_reset_lease = -1; -static int hf_magic_command_cid = -1; -static int hf_magic_command_ip_configuration = -1; -static int hf_magic_command_ip_address = -1; -static int hf_magic_command_subnet_mask = -1; -static int hf_magic_command_gateway = -1; +static int hf_magic_command_vals; +static int hf_magic_command_beacon_duration; +static int hf_magic_command_tftp; +static int hf_magic_command_reset_lease; +static int hf_magic_command_cid; +static int hf_magic_command_ip_configuration; +static int hf_magic_command_ip_address; +static int hf_magic_command_subnet_mask; +static int hf_magic_command_gateway; -static int hf_magic_reply_ip_address = -1; -static int hf_magic_reply_subnet_mask = -1; -static int hf_magic_reply_gateway = -1; -static int hf_magic_reply_tftp = -1; +static int hf_magic_reply_ip_address; +static int hf_magic_reply_subnet_mask; +static int hf_magic_reply_gateway; +static int hf_magic_reply_tftp; -static int hf_magic_reply_version = -1; -static int hf_magic_reply_device_type_name = -1; -static int hf_magic_reply_default_name = -1; -static int hf_magic_reply_user_name = -1; -static int hf_magic_reply_cid = -1; -static int hf_magic_reply_dcid = -1; +static int hf_magic_reply_version; +static int hf_magic_reply_device_type_name; +static int hf_magic_reply_default_name; +static int hf_magic_reply_user_name; +static int hf_magic_reply_cid; +static int hf_magic_reply_dcid; -static expert_field ei_magic_reply_invalid_type = EI_INIT; +static expert_field ei_magic_reply_invalid_type; -static int proto_rdmnet = -1; -static gint ett_rdmnet = -1; +static int proto_rdmnet; +static int ett_rdmnet; /* Register fields */ -static int hf_rdmnet_cid = -1; -static int hf_rdmnet_packet_identifier = -1; -static int hf_rdmnet_pdu = -1; -static int hf_rdmnet_pdu_flag_d = -1; -static int hf_rdmnet_pdu_flag_h = -1; -static int hf_rdmnet_pdu_flag_l = -1; -static int hf_rdmnet_pdu_flag_v = -1; -static int hf_rdmnet_pdu_flags = -1; -static int hf_rdmnet_pdu_length = -1; -static int hf_rdmnet_postamble_size = -1; -static int hf_rdmnet_preamble_size = -1; -static int hf_rdmnet_protocol_id = -1; -static int hf_rdmnet_tcp_length = -1; - -static int hf_rdmnet_llrp_vector = -1; -static int hf_rdmnet_llrp_destination_cid = -1; -static int hf_rdmnet_llrp_transaction_number = -1; -static int hf_rdmnet_llrp_probe_request_vector = -1; -static int hf_rdmnet_llrp_probe_request_pdu_length = -1; -static int hf_rdmnet_llrp_probe_request_lower_uid = -1; -static int hf_rdmnet_llrp_probe_request_upper_uid = -1; -static int hf_rdmnet_llrp_probe_request_filter = -1; -static int hf_rdmnet_llrp_probe_request_filter_client_tcp_inactive = -1; -static int hf_rdmnet_llrp_probe_request_filter_brokers_only = -1; -static int hf_rdmnet_llrp_probe_request_known_uid = -1; - -static int hf_rdmnet_llrp_probe_reply_vector = -1; -static int hf_rdmnet_llrp_probe_reply_uid = -1; -static int hf_rdmnet_llrp_probe_reply_hardware_address = -1; -static int hf_rdmnet_llrp_probe_reply_component_type = -1; -static int hf_rdmnet_llrp_rdm_command_start_code = -1; - -static int hf_rdmnet_rpt_vector = -1; -static int hf_rdmnet_rpt_source_uid = -1; -static int hf_rdmnet_rpt_source_endpoint_id = -1; -static int hf_rdmnet_rpt_destination_uid = -1; -static int hf_rdmnet_rpt_destination_endpoint_id = -1; -static int hf_rdmnet_rpt_sequence_number = -1; -static int hf_rdmnet_rpt_reserved = -1; -static int hf_rdmnet_rpt_request_vector = -1; -static int hf_rdmnet_rpt_request_rdm_command = -1; -static int hf_rdmnet_rpt_status_vector = -1; -static int hf_rdmnet_rpt_status_unknown_rpt_uid_string = -1; -static int hf_rdmnet_rpt_status_rdm_timeout_string = -1; -static int hf_rdmnet_rpt_status_rdm_invalid_response_string = -1; -static int hf_rdmnet_rpt_status_unknown_rdm_uid_string = -1; -static int hf_rdmnet_rpt_status_unknown_endpoint_string = -1; -static int hf_rdmnet_rpt_status_broadcast_complete_string = -1; -static int hf_rdmnet_rpt_status_unknown_vector_string = -1; -static int hf_rdmnet_rpt_notification_vector = -1; -static int hf_rdmnet_rpt_notification_rdm_command = -1; - -static int hf_rdmnet_broker_vector = -1; -static int hf_rdmnet_broker_client_protocol_vector = -1; -static int hf_rdmnet_broker_client_protocol_cid = -1; -static int hf_rdmnet_broker_client_rpt_client_uid = -1; -static int hf_rdmnet_broker_client_rpt_client_type = -1; -static int hf_rdmnet_broker_client_rpt_binding_cid = -1; -static int hf_rdmnet_broker_client_ept_protocol_vector = -1; -static int hf_rdmnet_broker_client_ept_protocol_manufacturer_id = -1; -static int hf_rdmnet_broker_client_ept_protocol_protocol_id = -1; -static int hf_rdmnet_broker_client_ept_protocol_string = -1; -static int hf_rdmnet_broker_connect_client_scope = -1; -static int hf_rdmnet_broker_connect_e133_version = -1; -static int hf_rdmnet_broker_connect_search_domain = -1; -static int hf_rdmnet_broker_connect_connection_flags = -1; -static int hf_rdmnet_broker_connect_connection_flags_incremental_updates = -1; -static int hf_rdmnet_broker_connect_reply_connection_code = -1; -static int hf_rdmnet_broker_connect_reply_e133_version = -1; -static int hf_rdmnet_broker_connect_reply_broker_uid = -1; -static int hf_rdmnet_broker_connect_reply_client_uid = -1; -static int hf_rdmnet_broker_client_entry_update_connection_flags = -1; -static int hf_rdmnet_broker_client_entry_update_connection_flags_incremental_updates = -1; -static int hf_rdmnet_broker_redirect_ipv4_address = -1; -static int hf_rdmnet_broker_redirect_ipv4_tcp_port = -1; -static int hf_rdmnet_broker_redirect_ipv6_address = -1; -static int hf_rdmnet_broker_redirect_ipv6_tcp_port = -1; -static int hf_rdmnet_broker_disconnect_reason = -1; -static int hf_rdmnet_broker_dynamic_uid_request = -1; -static int hf_rdmnet_broker_rid = -1; -static int hf_rdmnet_broker_assigned_dynamic_uid = -1; -static int hf_rdmnet_broker_assigned_rid = -1; -static int hf_rdmnet_broker_assigned_status_code = -1; -static int hf_rdmnet_broker_fetch_dynamic_uid = -1; - -static int hf_rdmnet_ept_vector = -1; -static int hf_rdmnet_ept_destination_cid = -1; -static int hf_rdmnet_ept_data_pdu_length = -1; -static int hf_rdmnet_ept_data_vector = -1; -static int hf_rdmnet_ept_data_vector_manufacturer_id = -1; -static int hf_rdmnet_ept_data_vector_protocol_id = -1; -static int hf_rdmnet_ept_data_opaque_data = -1; -static int hf_rdmnet_ept_status_pdu_length = -1; -static int hf_rdmnet_ept_status_vector = -1; -static int hf_rdmnet_ept_status_unknown_cid = -1; -static int hf_rdmnet_ept_status_status_string = -1; -static int hf_rdmnet_ept_status_unknown_vector = -1; -static int hf_rdmnet_ept_status_vector_string = -1; +static int hf_rdmnet_cid; +static int hf_rdmnet_packet_identifier; +static int hf_rdmnet_pdu; +static int hf_rdmnet_pdu_flag_d; +static int hf_rdmnet_pdu_flag_h; +static int hf_rdmnet_pdu_flag_l; +static int hf_rdmnet_pdu_flag_v; +static int hf_rdmnet_pdu_flags; +static int hf_rdmnet_pdu_length; +static int hf_rdmnet_postamble_size; +static int hf_rdmnet_preamble_size; +static int hf_rdmnet_protocol_id; +static int hf_rdmnet_tcp_length; + +static int hf_rdmnet_llrp_vector; +static int hf_rdmnet_llrp_destination_cid; +static int hf_rdmnet_llrp_transaction_number; +static int hf_rdmnet_llrp_probe_request_vector; +static int hf_rdmnet_llrp_probe_request_pdu_length; +static int hf_rdmnet_llrp_probe_request_lower_uid; +static int hf_rdmnet_llrp_probe_request_upper_uid; +static int hf_rdmnet_llrp_probe_request_filter; +static int hf_rdmnet_llrp_probe_request_filter_client_tcp_inactive; +static int hf_rdmnet_llrp_probe_request_filter_brokers_only; +static int hf_rdmnet_llrp_probe_request_known_uid; + +static int hf_rdmnet_llrp_probe_reply_vector; +static int hf_rdmnet_llrp_probe_reply_uid; +static int hf_rdmnet_llrp_probe_reply_hardware_address; +static int hf_rdmnet_llrp_probe_reply_component_type; +static int hf_rdmnet_llrp_rdm_command_start_code; + +static int hf_rdmnet_rpt_vector; +static int hf_rdmnet_rpt_source_uid; +static int hf_rdmnet_rpt_source_endpoint_id; +static int hf_rdmnet_rpt_destination_uid; +static int hf_rdmnet_rpt_destination_endpoint_id; +static int hf_rdmnet_rpt_sequence_number; +static int hf_rdmnet_rpt_reserved; +static int hf_rdmnet_rpt_request_vector; +static int hf_rdmnet_rpt_request_rdm_command; +static int hf_rdmnet_rpt_status_vector; +static int hf_rdmnet_rpt_status_unknown_rpt_uid_string; +static int hf_rdmnet_rpt_status_rdm_timeout_string; +static int hf_rdmnet_rpt_status_rdm_invalid_response_string; +static int hf_rdmnet_rpt_status_unknown_rdm_uid_string; +static int hf_rdmnet_rpt_status_unknown_endpoint_string; +static int hf_rdmnet_rpt_status_broadcast_complete_string; +static int hf_rdmnet_rpt_status_unknown_vector_string; +static int hf_rdmnet_rpt_notification_vector; +static int hf_rdmnet_rpt_notification_rdm_command; + +static int hf_rdmnet_broker_vector; +static int hf_rdmnet_broker_client_protocol_vector; +static int hf_rdmnet_broker_client_protocol_cid; +static int hf_rdmnet_broker_client_rpt_client_uid; +static int hf_rdmnet_broker_client_rpt_client_type; +static int hf_rdmnet_broker_client_rpt_binding_cid; +static int hf_rdmnet_broker_client_ept_protocol_vector; +static int hf_rdmnet_broker_client_ept_protocol_manufacturer_id; +static int hf_rdmnet_broker_client_ept_protocol_protocol_id; +static int hf_rdmnet_broker_client_ept_protocol_string; +static int hf_rdmnet_broker_connect_client_scope; +static int hf_rdmnet_broker_connect_e133_version; +static int hf_rdmnet_broker_connect_search_domain; +static int hf_rdmnet_broker_connect_connection_flags; +static int hf_rdmnet_broker_connect_connection_flags_incremental_updates; +static int hf_rdmnet_broker_connect_reply_connection_code; +static int hf_rdmnet_broker_connect_reply_e133_version; +static int hf_rdmnet_broker_connect_reply_broker_uid; +static int hf_rdmnet_broker_connect_reply_client_uid; +static int hf_rdmnet_broker_client_entry_update_connection_flags; +static int hf_rdmnet_broker_client_entry_update_connection_flags_incremental_updates; +static int hf_rdmnet_broker_redirect_ipv4_address; +static int hf_rdmnet_broker_redirect_ipv4_tcp_port; +static int hf_rdmnet_broker_redirect_ipv6_address; +static int hf_rdmnet_broker_redirect_ipv6_tcp_port; +static int hf_rdmnet_broker_disconnect_reason; +static int hf_rdmnet_broker_dynamic_uid_request; +static int hf_rdmnet_broker_rid; +static int hf_rdmnet_broker_assigned_dynamic_uid; +static int hf_rdmnet_broker_assigned_rid; +static int hf_rdmnet_broker_assigned_status_code; +static int hf_rdmnet_broker_fetch_dynamic_uid; + +static int hf_rdmnet_ept_vector; +static int hf_rdmnet_ept_destination_cid; +static int hf_rdmnet_ept_data_pdu_length; +static int hf_rdmnet_ept_data_vector; +static int hf_rdmnet_ept_data_vector_manufacturer_id; +static int hf_rdmnet_ept_data_vector_protocol_id; +static int hf_rdmnet_ept_data_opaque_data; +static int hf_rdmnet_ept_status_pdu_length; +static int hf_rdmnet_ept_status_vector; +static int hf_rdmnet_ept_status_unknown_cid; +static int hf_rdmnet_ept_status_status_string; +static int hf_rdmnet_ept_status_unknown_vector; +static int hf_rdmnet_ept_status_vector_string; static const value_string acn_protocol_id_vals[] = { { ACN_PROTOCOL_ID_SDT, "SDT Protocol" }, @@ -3003,15 +3003,15 @@ static dissector_handle_t rdm_handle; /******************************************************************************/ /* Test to see if it is a Magic Bullet Packet */ -static gboolean +static bool is_magic(tvbuff_t *tvb) { - static const guint8 magic_protocol_id = 15; + static const uint8_t magic_protocol_id = 15; - if (tvb_get_guint8(tvb, 0) == magic_protocol_id) - return TRUE; + if (tvb_get_uint8(tvb, 0) == magic_protocol_id) + return true; - return FALSE; + return false; } /******************************************************************************/ @@ -3019,15 +3019,15 @@ is_magic(tvbuff_t *tvb) static int dissect_magic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - guint8 pdu_subtype; - gint offset = 0; + uint8_t pdu_subtype; + int offset = 0; const char *pdu_subtype_string; proto_tree *ti, *subtype_item; proto_tree *magic_tree; - guint32 command; - gint32 str_len; - guint32 major, minor, patch, aud, crit, build; - gchar *buffer; + uint32_t command; + int32_t str_len; + uint32_t major, minor, patch, aud, crit, build; + char *buffer; /* Set the protocol column */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MAGIC"); @@ -3041,7 +3041,7 @@ dissect_magic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset++; /* PDU Type */ - pdu_subtype = tvb_get_guint8(tvb, offset); + pdu_subtype = tvb_get_uint8(tvb, offset); pdu_subtype_string = val_to_str(pdu_subtype, magic_pdu_subtypes, "Unknown (0x%02x)"); /* Adjust info column */ @@ -3132,11 +3132,11 @@ dissect_magic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 4; /* encoded and display version */ - major = tvb_get_guint8(tvb, offset++); - minor = tvb_get_guint8(tvb, offset++); - patch = tvb_get_guint8(tvb, offset++); - aud = tvb_get_guint8(tvb, offset++); - crit = tvb_get_guint8(tvb, offset++); + major = tvb_get_uint8(tvb, offset++); + minor = tvb_get_uint8(tvb, offset++); + patch = tvb_get_uint8(tvb, offset++); + aud = tvb_get_uint8(tvb, offset++); + crit = tvb_get_uint8(tvb, offset++); build = tvb_get_ntohs(tvb, offset); offset += 2; @@ -3176,11 +3176,11 @@ dissect_magic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 16; /* encoded and display version */ - major = tvb_get_guint8(tvb, offset++); - minor = tvb_get_guint8(tvb, offset++); - patch = tvb_get_guint8(tvb, offset++); - aud = tvb_get_guint8(tvb, offset++); - crit = tvb_get_guint8(tvb, offset++); + major = tvb_get_uint8(tvb, offset++); + minor = tvb_get_uint8(tvb, offset++); + patch = tvb_get_uint8(tvb, offset++); + aud = tvb_get_uint8(tvb, offset++); + crit = tvb_get_uint8(tvb, offset++); build = tvb_get_ntohs(tvb, offset); offset += 2; @@ -3211,22 +3211,22 @@ dissect_magic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /******************************************************************************/ /* Test to see if it is an ACN or an RDMnet Packet over UDP */ -static gboolean -is_acn_or_rdmnet_over_udp(tvbuff_t *tvb, guint32 *protocol_id) +static bool +is_acn_or_rdmnet_over_udp(tvbuff_t *tvb, uint32_t *protocol_id) { static const char acn_packet_id[] = "ASC-E1.17\0\0\0"; /* must be 12 bytes */ - guint32 offset; - guint8 pdu_flags; + uint32_t offset; + uint8_t pdu_flags; if (tvb_captured_length(tvb) < (4+sizeof(acn_packet_id) + 6)) - return FALSE; + return false; /* Check the bytes in octets 4 - 16 */ - if (tvb_memeql(tvb, 4, (const guint8*)acn_packet_id, sizeof(acn_packet_id)-1) != 0) - return FALSE; + if (tvb_memeql(tvb, 4, (const uint8_t*)acn_packet_id, sizeof(acn_packet_id)-1) != 0) + return false; offset = 16; - pdu_flags = tvb_get_guint8(tvb, offset) & 0xf0; + pdu_flags = tvb_get_uint8(tvb, offset) & 0xf0; if (pdu_flags & ACN_PDU_FLAG_L) { /* length bit is set: there are three length bytes */ offset += 3; @@ -3237,30 +3237,30 @@ is_acn_or_rdmnet_over_udp(tvbuff_t *tvb, guint32 *protocol_id) } *protocol_id = tvb_get_ntohl(tvb, offset); - return TRUE; + return true; } /******************************************************************************/ /* Test to see if it is an RDMnet Packet over TCP */ -static gboolean +static bool is_rdmnet_over_tcp(tvbuff_t *tvb) { static const char acn_packet_id[] = "ASC-E1.17\0\0\0"; /* must be 12 bytes */ - guint32 offset; - guint32 protocol_id; - guint8 pdu_flags; + uint32_t offset; + uint32_t protocol_id; + uint8_t pdu_flags; if (tvb_captured_length(tvb) < (4+sizeof(acn_packet_id))) { - return FALSE; + return false; } /* Check the bytes in octets 0 - 12 */ - if (tvb_memeql(tvb, 0, (const guint8*)acn_packet_id, sizeof(acn_packet_id)-1) != 0) { - return FALSE; + if (tvb_memeql(tvb, 0, (const uint8_t*)acn_packet_id, sizeof(acn_packet_id)-1) != 0) { + return false; } offset = 16; - pdu_flags = tvb_get_guint8(tvb, offset) & 0xf0; + pdu_flags = tvb_get_uint8(tvb, offset) & 0xf0; if (pdu_flags & ACN_PDU_FLAG_L) { /* length bit is set: there are three length bytes */ offset += 3; @@ -3273,18 +3273,18 @@ is_rdmnet_over_tcp(tvbuff_t *tvb) if ((protocol_id == ACN_PROTOCOL_ID_BROKER) || (protocol_id == ACN_PROTOCOL_ID_RPT) || (protocol_id == ACN_PROTOCOL_ID_EPT)) { - return TRUE; + return true; } - return FALSE; + return false; } /******************************************************************************/ /* Test to see if it is an ACN Packet */ -static gboolean +static bool is_acn(tvbuff_t *tvb) { - guint32 protocol_id; + uint32_t protocol_id; if (is_acn_or_rdmnet_over_udp(tvb, &protocol_id)) { if ((protocol_id == ACN_PROTOCOL_ID_DMX) || @@ -3292,31 +3292,31 @@ is_acn(tvbuff_t *tvb) (protocol_id == ACN_PROTOCOL_ID_DMX_3) || (protocol_id == ACN_PROTOCOL_ID_SDT) || (protocol_id == ACN_PROTOCOL_ID_EXTENDED)) - return TRUE; + return true; } - return FALSE; + return false; } /******************************************************************************/ /* Test to see if it is an ACN Packet */ -static gboolean +static bool is_rdmnet_over_udp(tvbuff_t *tvb) { - guint32 protocol_id; + uint32_t protocol_id; if (is_acn_or_rdmnet_over_udp(tvb, &protocol_id) && (protocol_id == ACN_PROTOCOL_ID_LLRP)) { - return TRUE; + return true; } - return FALSE; + return false; } /******************************************************************************/ /* Heuristic dissector */ -static gboolean -dissect_acn_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +static bool +dissect_acn_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { /* This is a heuristic dissector, which means we get all the UDP * traffic not sent to a known dissector and not claimed by @@ -3325,30 +3325,30 @@ dissect_acn_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data if (is_acn(tvb)) { dissect_acn(tvb, pinfo, tree, data); - return TRUE; + return true; } if (is_magic(tvb)) { dissect_magic(tvb, pinfo, tree); - return TRUE; + return true; } /* abort if it is NOT an ACN or Magic Bullet packet */ - return FALSE; + return false; } /******************************************************************************/ /* Heuristic dissector */ -static gboolean +static bool dissect_rdmnet_over_udp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { if (!is_rdmnet_over_udp(tvb)) { - return FALSE; + return false; } dissect_rdmnet(tvb, pinfo, tree, 0, 1); - return TRUE; + return true; } #define RDMNET_TCP_FRAME_HEADER_LENGTH 16 @@ -3365,16 +3365,16 @@ dissect_one_rdmnet_over_tcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tre } -static guint +static unsigned get_rdmnet_tcp_message_length(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) { - return (guint)tvb_get_ntohl(tvb, offset + 12) + 16; + return (unsigned)tvb_get_ntohl(tvb, offset + 12) + 16; } static int dissect_rdmnet_over_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { - tcp_dissect_pdus(tvb, pinfo, tree, TRUE, RDMNET_TCP_FRAME_HEADER_LENGTH, + tcp_dissect_pdus(tvb, pinfo, tree, true, RDMNET_TCP_FRAME_HEADER_LENGTH, get_rdmnet_tcp_message_length, dissect_one_rdmnet_over_tcp_message, data); return tvb_captured_length(tvb); } @@ -3382,27 +3382,27 @@ dissect_rdmnet_over_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi /******************************************************************************/ /* Heuristic dissector */ -static gboolean +static bool dissect_rdmnet_over_tcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { if (!is_rdmnet_over_tcp(tvb)) { - return FALSE; + return false; } dissect_rdmnet_over_tcp(tvb, pinfo, tree, data); - return TRUE; + return true; } /******************************************************************************/ /* Adds tree branch for channel owner info block */ -static guint32 +static uint32_t acn_add_channel_owner_info_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) { proto_item *pi; proto_tree *this_tree; - guint32 session_count; - guint32 x; + uint32_t session_count; + uint32_t x; this_tree = proto_tree_add_subtree(tree, tvb, offset, 8, ett_acn_channel_owner_info_block, NULL, "Channel Owner Info Block"); @@ -3425,13 +3425,13 @@ acn_add_channel_owner_info_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree * /******************************************************************************/ /* Adds tree branch for channel member info block */ -static guint32 +static uint32_t acn_add_channel_member_info_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) { proto_item *pi; proto_tree *this_tree; - guint32 session_count; - guint32 x; + uint32_t session_count; + uint32_t x; this_tree = proto_tree_add_subtree(tree, tvb, offset, 8, ett_acn_channel_member_info_block, NULL, "Channel Member Info Block"); @@ -3459,7 +3459,7 @@ acn_add_channel_member_info_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree /******************************************************************************/ /* Add labeled expiry */ -static guint32 +static uint32_t acn_add_expiry(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, int hf) { proto_tree_add_item(tree, hf, tvb, offset, 1, ENC_NA); @@ -3470,7 +3470,7 @@ acn_add_expiry(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offs /******************************************************************************/ /* Adds tree branch for channel parameters */ -static guint32 +static uint32_t acn_add_channel_parameter(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset) { proto_tree *param_tree; @@ -3493,16 +3493,16 @@ acn_add_channel_parameter(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre /******************************************************************************/ /* Add an address tree */ -static guint32 +static uint32_t acn_add_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, const char *label) { proto_item *pi; proto_tree *addr_tree = NULL; - guint8 ip_address_type; - guint32 port; + uint8_t ip_address_type; + uint32_t port; /* Get type */ - ip_address_type = tvb_get_guint8(tvb, offset); + ip_address_type = tvb_get_uint8(tvb, offset); switch (ip_address_type) { case ACN_ADDR_NULL: @@ -3557,15 +3557,15 @@ acn_add_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int off /******************************************************************************/ /* Adds tree branch for address type */ -static guint32 +static uint32_t acn_add_dmp_address_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, acn_dmp_adt_type *adt) { proto_tree *this_tree; - guint8 D; - const gchar *name; + uint8_t D; + const char *name; /* header contains address and data type */ - adt->flags = tvb_get_guint8(tvb, offset); + adt->flags = tvb_get_uint8(tvb, offset); D = ACN_DMP_ADT_EXTRACT_D(adt->flags); name = val_to_str(D, acn_dmp_adt_d_vals, "not valid (%d)"); @@ -3584,12 +3584,12 @@ acn_add_dmp_address_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree /******************************************************************************/ /* Add an dmp address */ -static guint32 +static uint32_t acn_add_dmp_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, acn_dmp_adt_type *adt) { - gint32 start_offset; - gint32 bytes_used; - guint8 D, A; + int32_t start_offset; + int32_t bytes_used; + uint8_t D, A; start_offset = offset; @@ -3602,7 +3602,7 @@ acn_add_dmp_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int adt->count = 1; switch (A) { /* address */ case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */ - adt->address = tvb_get_guint8(tvb, offset); + adt->address = tvb_get_uint8(tvb, offset); offset += 1; bytes_used = 1; break; @@ -3630,11 +3630,11 @@ acn_add_dmp_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int case ACN_DMP_ADT_D_RS: /* Range address, Single data item */ switch (A) { case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */ - adt->address = tvb_get_guint8(tvb, offset); + adt->address = tvb_get_uint8(tvb, offset); offset += 1; - adt->increment = tvb_get_guint8(tvb, offset); + adt->increment = tvb_get_uint8(tvb, offset); offset += 1; - adt->count = tvb_get_guint8(tvb, offset); + adt->count = tvb_get_uint8(tvb, offset); offset += 1; bytes_used = 3; break; @@ -3674,11 +3674,11 @@ acn_add_dmp_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int case ACN_DMP_ADT_D_RE: /* Range address, Array of equal size data items */ switch (A) { case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */ - adt->address = tvb_get_guint8(tvb, offset); + adt->address = tvb_get_uint8(tvb, offset); offset += 1; - adt->increment = tvb_get_guint8(tvb, offset); + adt->increment = tvb_get_uint8(tvb, offset); offset += 1; - adt->count = tvb_get_guint8(tvb, offset); + adt->count = tvb_get_uint8(tvb, offset); offset += 1; bytes_used = 3; break; @@ -3718,11 +3718,11 @@ acn_add_dmp_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int case ACN_DMP_ADT_D_RM: /* Range address, Series of mixed size data items */ switch (A) { case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */ - adt->address = tvb_get_guint8(tvb, offset); + adt->address = tvb_get_uint8(tvb, offset); offset += 1; - adt->increment = tvb_get_guint8(tvb, offset); + adt->increment = tvb_get_uint8(tvb, offset); offset += 1; - adt->count = tvb_get_guint8(tvb, offset); + adt->count = tvb_get_uint8(tvb, offset); offset += 1; bytes_used = 3; break; @@ -3766,18 +3766,18 @@ acn_add_dmp_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int /*******************************************************************************/ /* Display DMP Data */ -static guint32 +static uint32_t acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, acn_dmp_adt_type *adt) { - guint8 D, A; - guint32 data_size; - guint32 data_value; - guint32 data_address; - guint32 x,y; - gchar *buffer; + uint8_t D, A; + uint32_t data_size; + uint32_t data_value; + uint32_t data_address; + uint32_t x,y; + char *buffer; wmem_strbuf_t *default_buffer; proto_item *ti; - guint32 ok_to_process = FALSE; + uint32_t ok_to_process = false; /* We would like to rip through Property Address-Data pairs */ /* but since we don't now how many there are nor how big the data size is, */ @@ -3800,7 +3800,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of case ACN_DMP_ADT_D_NS: case ACN_DMP_ADT_D_RS: if (adt->data_length <= adt->count + 4) { - ok_to_process = TRUE; + ok_to_process = true; } break; case ACN_DMP_ADT_D_RE: @@ -3808,7 +3808,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of break; } if (adt->data_length <= adt->count + 4) { - ok_to_process = TRUE; + ok_to_process = true; } break; } @@ -3846,7 +3846,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of switch (data_size) { case 1: - data_value = tvb_get_guint8(tvb, offset); + data_value = tvb_get_uint8(tvb, offset); proto_tree_add_uint_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %2.2X", buffer, data_value); break; case 2: @@ -3865,7 +3865,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of default_buffer = wmem_strbuf_new(pinfo->pool, ""); /* build string of values */ for (y=0; y<20 && y<data_size; y++) { - data_value = tvb_get_guint8(tvb, offset+y); + data_value = tvb_get_uint8(tvb, offset+y); wmem_strbuf_append_printf(default_buffer, " %2.2X", data_value); } /* add the item */ @@ -3900,7 +3900,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of switch (data_size) { case 1: - data_value = tvb_get_guint8(tvb, offset); + data_value = tvb_get_uint8(tvb, offset); proto_tree_add_uint_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %2.2X", buffer, data_value); break; case 2: @@ -3919,7 +3919,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of /* build string of values */ default_buffer = wmem_strbuf_new(pinfo->pool, ""); for (y=0; y<20 && y<data_size; y++) { - data_value = tvb_get_guint8(tvb, offset+y); + data_value = tvb_get_uint8(tvb, offset+y); wmem_strbuf_append_printf(default_buffer, " %2.2X", data_value); } /* add the item */ @@ -3955,7 +3955,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of switch (data_size) { case 1: - data_value = tvb_get_guint8(tvb, offset); + data_value = tvb_get_uint8(tvb, offset); proto_tree_add_uint_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %2.2X", buffer, data_value); break; case 2: @@ -3974,7 +3974,7 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of /* build string of values */ default_buffer = wmem_strbuf_new(pinfo->pool, ""); for (y=0; y<20 && y<data_size; y++) { - data_value = tvb_get_guint8(tvb, offset+y); + data_value = tvb_get_uint8(tvb, offset+y); wmem_strbuf_append_printf(default_buffer, " %2.2X", data_value); } /* add the item */ @@ -4002,16 +4002,16 @@ acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int of /*******************************************************************************/ /* Display DMP Reason codes */ -static guint32 +static uint32_t acn_add_dmp_reason_codes(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, acn_dmp_adt_type *adt) { - guint8 D, A; - guint32 data_value; - guint32 data_address; - guint32 x; + uint8_t D, A; + uint32_t data_value; + uint32_t data_address; + uint32_t x; - gchar *buffer; - const gchar *name; + char *buffer; + const char *name; D = ACN_DMP_ADT_EXTRACT_D(adt->flags); A = ACN_DMP_ADT_EXTRACT_A(adt->flags); @@ -4033,7 +4033,7 @@ acn_add_dmp_reason_codes(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree } /* Get reason */ - data_value = tvb_get_guint8(tvb, offset); + data_value = tvb_get_uint8(tvb, offset); name = val_to_str(data_value, acn_dmp_reason_code_vals, "reason not valid (%d)"); proto_tree_add_uint_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %s", buffer, name); offset += 1; @@ -4057,7 +4057,7 @@ acn_add_dmp_reason_codes(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree } /* Get reason */ - data_value = tvb_get_guint8(tvb, offset); + data_value = tvb_get_uint8(tvb, offset); name = val_to_str(data_value, acn_dmp_reason_code_vals, "reason not valid (%d)"); proto_tree_add_uint_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %s", buffer, name); @@ -4084,7 +4084,7 @@ acn_add_dmp_reason_codes(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree return offset; } /* Get reason */ - data_value = tvb_get_guint8(tvb, offset); + data_value = tvb_get_uint8(tvb, offset); name = val_to_str(data_value, acn_dmp_reason_code_vals, "reason not valid (%d)"); proto_tree_add_uint_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %s", buffer, name); data_address += adt->increment; @@ -4098,7 +4098,7 @@ acn_add_dmp_reason_codes(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree /******************************************************************************/ /* Get Field Type Parameters */ static void -get_field_type_parameters(tvbuff_t *tvb, int blob_offset, guint8 field_type, guint8 *field_length, guint8 *blob_offset1, guint8 *blob_offset2, guint8 *blob_offset3) +get_field_type_parameters(tvbuff_t *tvb, int blob_offset, uint8_t field_type, uint8_t *field_length, uint8_t *blob_offset1, uint8_t *blob_offset2, uint8_t *blob_offset3) { /* Switch Over Field Type to Determine Data */ switch (field_type) { @@ -4152,7 +4152,7 @@ get_field_type_parameters(tvbuff_t *tvb, int blob_offset, guint8 field_type, gui break; case ACN_BLOB_FIELD_TYPE11: /* Set field length and blob_offsets to use */ - *field_length = tvb_get_guint8(tvb, blob_offset + 2); + *field_length = tvb_get_uint8(tvb, blob_offset + 2); *blob_offset1 = 2; *blob_offset2 = 1; *blob_offset3 = (*field_length) - 2; @@ -4175,11 +4175,11 @@ get_field_type_parameters(tvbuff_t *tvb, int blob_offset, guint8 field_type, gui /******************************************************************************/ /* Get Field Name */ -static const gchar * -get_field_name(guint8 blob_type, guint16 field_number) +static const char * +get_field_name(uint8_t blob_type, uint16_t field_number) { - guint16 temp_field_number; - const gchar *field_name; + uint16_t temp_field_number; + const char *field_name; /*Find the field sub tree name depending on the blob type.*/ switch (blob_type) { @@ -4306,11 +4306,11 @@ get_field_name(guint8 blob_type, guint16 field_number) /******************************************************************************/ /* Display Blob Field Value */ static void -display_blob_field_value(tvbuff_t *tvb, proto_tree *field_tree, guint16 field_number, guint8 blob_type, guint8 field_type, guint8 field_length, int blob_offset, guint8 blob_offset3, int display_variblob_as_CID) +display_blob_field_value(tvbuff_t *tvb, proto_tree *field_tree, uint16_t field_number, uint8_t blob_type, uint8_t field_type, uint8_t field_length, int blob_offset, uint8_t blob_offset3, int display_variblob_as_CID) { - gint8 field_value8; - gint32 field_value32; - const gchar *field_string; + int8_t field_value8; + int32_t field_value32; + const char *field_string; proto_item *ti; /* Add field value to field sub tree */ @@ -4326,7 +4326,7 @@ display_blob_field_value(tvbuff_t *tvb, proto_tree *field_tree, guint16 field_nu } else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 2)) { /* time zone index */ - field_value32 = (gint32)(tvb_get_ntohl(tvb, blob_offset)); + field_value32 = (int32_t)(tvb_get_ntohl(tvb, blob_offset)); if (field_value32 == -1) { field_string = "Field Value: Custom"; } @@ -4337,55 +4337,55 @@ display_blob_field_value(tvbuff_t *tvb, proto_tree *field_tree, guint16 field_nu } else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 10)) { /* DST type */ - field_value8 = tvb_get_guint8(tvb, blob_offset); + field_value8 = tvb_get_uint8(tvb, blob_offset); field_string = val_to_str(field_value8, acn_blob_time3_dst_vals, "not valid (%d)"); proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_type, tvb, blob_offset, 1, field_value8, "%s", field_string); } else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 11)) { /* DST on month */ - field_value8 = tvb_get_guint8(tvb, blob_offset); + field_value8 = tvb_get_uint8(tvb, blob_offset); field_string = val_to_str(field_value8, acn_blob_time3_month_vals, "not valid (%d)"); proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_type, tvb, blob_offset, 1, field_value8, "%s", field_string); } else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 12)) { /* DST on week */ - field_value8 = tvb_get_guint8(tvb, blob_offset); + field_value8 = tvb_get_uint8(tvb, blob_offset); field_string = val_to_str(field_value8, acn_blob_time3_week_vals, "not valid (%d)"); proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_type, tvb, blob_offset, 1, field_value8, "%s", field_string); } else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 13)) { /* DST start day */ - field_value8 = tvb_get_guint8(tvb, blob_offset); + field_value8 = tvb_get_uint8(tvb, blob_offset); field_string = val_to_str(field_value8, acn_blob_time3_day_vals, "not valid (%d)"); proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_start_day, tvb, blob_offset, 1, field_value8, "%s", field_string); } else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 16)) { /* DST start locality */ - field_value8 = tvb_get_guint8(tvb, blob_offset); + field_value8 = tvb_get_uint8(tvb, blob_offset); field_string = val_to_str(field_value8, acn_blob_time3_locality_vals, "not valid (%d)"); proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_start_locality, tvb, blob_offset, 1, field_value8, "%s", field_string); } else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 17)) { /* DST off month */ - field_value8 = tvb_get_guint8(tvb, blob_offset); + field_value8 = tvb_get_uint8(tvb, blob_offset); field_string = val_to_str(field_value8, acn_blob_time3_month_vals, "not valid (%d)"); proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_type, tvb, blob_offset, 1, field_value8, "%s", field_string); } else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 18)) { /* DST off week */ - field_value8 = tvb_get_guint8(tvb, blob_offset); + field_value8 = tvb_get_uint8(tvb, blob_offset); field_string = val_to_str(field_value8, acn_blob_time3_week_vals, "not valid (%d)"); proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_type, tvb, blob_offset, 1, field_value8, "%s", field_string); } else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 19)) { /* DST stop day */ - field_value8 = tvb_get_guint8(tvb, blob_offset); + field_value8 = tvb_get_uint8(tvb, blob_offset); field_string = val_to_str(field_value8, acn_blob_time3_day_vals, "not valid (%d)"); proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_stop_day, tvb, blob_offset, 1, field_value8, "%s", field_string); } else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 22)) { /* DST stop locality */ - field_value8 = tvb_get_guint8(tvb, blob_offset); + field_value8 = tvb_get_uint8(tvb, blob_offset); field_string = val_to_str(field_value8, acn_blob_time3_locality_vals, "not valid (%d)"); proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_stop_locality, tvb, blob_offset, 1, field_value8, "%s", field_string); } @@ -4444,20 +4444,20 @@ display_blob_field_value(tvbuff_t *tvb, proto_tree *field_tree, guint16 field_nu /******************************************************************************/ /* Display Blob Field */ static void -display_blob_field(tvbuff_t *tvb, proto_tree *blob_tree, guint8 blob_type, int *blob_offset, guint16 *field_number, int display_variblob_as_CID) +display_blob_field(tvbuff_t *tvb, proto_tree *blob_tree, uint8_t blob_type, int *blob_offset, uint16_t *field_number, int display_variblob_as_CID) { - guint8 field_type; - guint8 field_length; - guint8 blob_offset1; - guint8 blob_offset2; - guint8 blob_offset3; - guint16 temp_field_number; + uint8_t field_type; + uint8_t field_length; + uint8_t blob_offset1; + uint8_t blob_offset2; + uint8_t blob_offset3; + uint16_t temp_field_number; proto_item *fi; proto_tree *field_tree = NULL; proto_item *ti; - const gchar *field_name; + const char *field_name; if ((blob_type == ACN_BLOB_ENERGY_MANAGEMENT) && (*field_number > 3)) { /* an exception to blob field rules: no "type" subfield, no "length" subfield */ @@ -4503,7 +4503,7 @@ display_blob_field(tvbuff_t *tvb, proto_tree *blob_tree, guint8 blob_type, int * } else { /* Get field type*/ - field_type = tvb_get_guint8(tvb, *blob_offset); + field_type = tvb_get_uint8(tvb, *blob_offset); get_field_type_parameters(tvb, *blob_offset, field_type, &field_length, &blob_offset1, &blob_offset2, &blob_offset3); field_name = get_field_name(blob_type, *field_number); @@ -4531,12 +4531,12 @@ display_blob_field(tvbuff_t *tvb, proto_tree *blob_tree, guint8 blob_type, int * /******************************************************************************/ /* Dissect Blob Metadata */ -static guint32 +static uint32_t dissect_acn_blob_metadata(tvbuff_t *tvb, proto_tree *blob_tree, int blob_offset, int end_offset) { - guint8 blob_type = ACN_BLOB_METADATA; - guint16 field_number = 1; - gboolean display_variblob_as_CID; + uint8_t blob_type = ACN_BLOB_METADATA; + uint16_t field_number = 1; + bool display_variblob_as_CID; /* Loop though dissecting fields until the end is reached */ while (blob_offset < end_offset) { @@ -4556,27 +4556,27 @@ dissect_acn_blob_metadata(tvbuff_t *tvb, proto_tree *blob_tree, int blob_offset, /******************************************************************************/ /* Dissect Blob Preset Properties */ -static guint32 +static uint32_t dissect_acn_blob_preset_properties(tvbuff_t *tvb, proto_tree *blob_tree, int blob_offset, int end_offset) { - guint8 blob_type = ACN_BLOB_PRESET_PROPERTIES; - guint8 field_type; - guint8 field_length; - guint8 blob_offset1; - guint8 blob_offset2; - guint8 blob_offset3; - guint8 sub_blob_index; - guint16 field_number = 1; - guint8 max_sub_blobs = 192; + uint8_t blob_type = ACN_BLOB_PRESET_PROPERTIES; + uint8_t field_type; + uint8_t field_length; + uint8_t blob_offset1; + uint8_t blob_offset2; + uint8_t blob_offset3; + uint8_t sub_blob_index; + uint16_t field_number = 1; + uint8_t max_sub_blobs = 192; proto_item *fi; proto_tree *sub_blob_tree = NULL; - const gchar *field_name; + const char *field_name; /* Loop though dissecting fields until the end is reached */ while (blob_offset < end_offset) { if (field_number == 17) { /* Create subtree for "Levels" */ - field_type = tvb_get_guint8(tvb, blob_offset); + field_type = tvb_get_uint8(tvb, blob_offset); get_field_type_parameters(tvb, blob_offset, field_type, &field_length, &blob_offset1, &blob_offset2, &blob_offset3); field_name = get_field_name(blob_type, field_number); @@ -4607,12 +4607,12 @@ dissect_acn_blob_preset_properties(tvbuff_t *tvb, proto_tree *blob_tree, int blo /******************************************************************************/ /* Dissect Blob Dimming Rack Properties v2 */ -static guint32 +static uint32_t dissect_acn_blob_dimming_rack_properties_v2(tvbuff_t *tvb, proto_tree *blob_tree, int blob_offset, int end_offset) { - guint8 blob_type = ACN_BLOB_DIMMER_RACK_PROPERTIES2; - guint16 field_number = 1; - gboolean display_variblob_as_CID; + uint8_t blob_type = ACN_BLOB_DIMMER_RACK_PROPERTIES2; + uint16_t field_number = 1; + bool display_variblob_as_CID; /* Loop though dissecting fields until the end is reached */ while (blob_offset < end_offset) { @@ -4634,24 +4634,24 @@ dissect_acn_blob_dimming_rack_properties_v2(tvbuff_t *tvb, proto_tree *blob_tree /******************************************************************************/ /* Dissect Blob Dimming Rack Status Properties v2 */ -static guint32 +static uint32_t dissect_acn_blob_dimming_rack_status_properties_v2(tvbuff_t *tvb, proto_tree *blob_tree, int blob_offset, int end_offset) { - guint8 blob_type; - guint8 field_type; - guint8 field_length; - guint8 blob_offset1; - guint8 blob_offset2; - guint8 blob_offset3; - guint8 sub_blob_index; - guint16 field_number; + uint8_t blob_type; + uint8_t field_type; + uint8_t field_length; + uint8_t blob_offset1; + uint8_t blob_offset2; + uint8_t blob_offset3; + uint8_t sub_blob_index; + uint16_t field_number; int number_of_sub_blobs; proto_item *fi; proto_tree *sub_blob_tree = NULL; - const gchar *field_name; + const char *field_name; /*First Assignments*/ blob_type = ACN_BLOB_DIMMER_RACK_STATUS_PROPERTIES2; @@ -4662,7 +4662,7 @@ dissect_acn_blob_dimming_rack_status_properties_v2(tvbuff_t *tvb, proto_tree *bl while (blob_offset < end_offset) { if (field_number == 22) { /* Create subtree for "Active Preset Group IDs" */ - field_type = tvb_get_guint8(tvb, blob_offset); + field_type = tvb_get_uint8(tvb, blob_offset); get_field_type_parameters(tvb, blob_offset, field_type, &field_length, &blob_offset1, &blob_offset2, &blob_offset3); field_name = get_field_name(blob_type, field_number); @@ -4696,18 +4696,18 @@ dissect_acn_blob_dimming_rack_status_properties_v2(tvbuff_t *tvb, proto_tree *bl /******************************************************************************/ /* Get Blob Type From Fields Both "Dimmer Properties v2" and "Preset Properties" ended up with blob type 20 */ -static guint8 +static uint8_t get_blob_type_from_fields(tvbuff_t *tvb, int blob_offset, int end_offset) { - guint8 field_type; - guint8 field_length; - guint8 blob_offset1; - guint8 blob_offset2; - guint8 blob_offset3; - guint16 field_number = 1; + uint8_t field_type; + uint8_t field_length; + uint8_t blob_offset1; + uint8_t blob_offset2; + uint8_t blob_offset3; + uint16_t field_number = 1; while (blob_offset < end_offset) { - field_type = tvb_get_guint8(tvb, blob_offset); + field_type = tvb_get_uint8(tvb, blob_offset); if (field_number == 12) { if (field_type == ACN_BLOB_FIELD_TYPE11) { /* string: dimmer name field */ @@ -4726,16 +4726,16 @@ get_blob_type_from_fields(tvbuff_t *tvb, int blob_offset, int end_offset) /******************************************************************************/ /* Dissect Blob */ -static guint32 +static uint32_t dissect_acn_blob(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pdu_tree, int blob_offset, int end_offset) { /* Declarations for blobs*/ - guint8 blob_type; - guint16 field_number = 1; + uint8_t blob_type; + uint16_t field_number = 1; proto_item *bi; proto_tree *blob_tree = NULL; - const gchar *blob_name; - /* const gchar *range_type; */ + const char *blob_name; + /* const char *range_type; */ /* Add blob to tree */ bi = proto_tree_add_item(pdu_tree, hf_acn_blob, tvb, blob_offset, end_offset, ENC_NA); @@ -4757,7 +4757,7 @@ dissect_acn_blob(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pdu_tree, in blob_offset += 1; /* Add Blob Meta-Type */ - blob_type = tvb_get_guint8(tvb, blob_offset); + blob_type = tvb_get_uint8(tvb, blob_offset); if (blob_type == ACN_BLOB_DIMMER_PROPERTIES2) { /* Dimmer Properties v2 and Preset Properties have the same 'type' value (20) */ blob_type = get_blob_type_from_fields(tvb, blob_offset + 1, end_offset); @@ -4792,23 +4792,23 @@ dissect_acn_blob(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pdu_tree, in /******************************************************************************/ /* Dissect PDU L bit flag */ static void -dissect_pdu_bit_flag_l(tvbuff_t *tvb, int *offset, guint8 *pdu_flags, guint32 *pdu_length, guint32 *pdu_flvh_length) +dissect_pdu_bit_flag_l(tvbuff_t *tvb, int *offset, uint8_t *pdu_flags, uint32_t *pdu_length, uint32_t *pdu_flvh_length) { - guint8 octet; - guint32 length1; - guint32 length2; - guint32 length3; + uint8_t octet; + uint32_t length1; + uint32_t length2; + uint32_t length3; /* get PDU flags and length flag */ - octet = tvb_get_guint8(tvb, (*offset)++); + octet = tvb_get_uint8(tvb, (*offset)++); *pdu_flags = octet & 0xf0; length1 = octet & 0x0f; /* bottom 4 bits only */ - length2 = tvb_get_guint8(tvb, (*offset)++); + length2 = tvb_get_uint8(tvb, (*offset)++); /* if length flag is set, then we have a 20 bit length else we have a 12 bit */ /* flvh = flags, length, vector, header */ if (*pdu_flags & ACN_PDU_FLAG_L) { - length3 = tvb_get_guint8(tvb, *offset); + length3 = tvb_get_uint8(tvb, *offset); *offset += 1; *pdu_length = length3 | (length2 << 8) | (length1 << 16); *pdu_flvh_length = 3; @@ -4821,7 +4821,7 @@ dissect_pdu_bit_flag_l(tvbuff_t *tvb, int *offset, guint8 *pdu_flags, guint32 *p /******************************************************************************/ /* Dissect PDU V bit flag */ static void -dissect_pdu_bit_flag_v(int *offset, guint8 pdu_flags, guint32 *vector_offset, acn_pdu_offsets *last_pdu_offsets, guint32 *pdu_flvh_length, guint8 increment) +dissect_pdu_bit_flag_v(int *offset, uint8_t pdu_flags, uint32_t *vector_offset, acn_pdu_offsets *last_pdu_offsets, uint32_t *pdu_flvh_length, uint8_t increment) { /* Set vector offset */ if (pdu_flags & ACN_PDU_FLAG_V) { @@ -4839,7 +4839,7 @@ dissect_pdu_bit_flag_v(int *offset, guint8 pdu_flags, guint32 *vector_offset, ac /******************************************************************************/ /* Dissect PDU H bit flag */ static void -dissect_pdu_bit_flag_h(int *offset, guint8 pdu_flags, guint32 *header_offset, acn_pdu_offsets *last_pdu_offsets, guint32 *pdu_flvh_length, guint8 increment) +dissect_pdu_bit_flag_h(int *offset, uint8_t pdu_flags, uint32_t *header_offset, acn_pdu_offsets *last_pdu_offsets, uint32_t *pdu_flvh_length, uint8_t increment) { /* Set header offset */ if (pdu_flags & ACN_PDU_FLAG_H) { @@ -4857,7 +4857,7 @@ dissect_pdu_bit_flag_h(int *offset, guint8 pdu_flags, guint32 *header_offset, ac /******************************************************************************/ /* Dissect PDU D bit flag */ static void -dissect_pdu_bit_flag_d(int offset, guint8 pdu_flags, guint32 pdu_length, guint32 *data_offset, guint32 *data_length, acn_pdu_offsets *last_pdu_offsets, guint32 pdu_flvh_length, gboolean set_last_value_length) +dissect_pdu_bit_flag_d(int offset, uint8_t pdu_flags, uint32_t pdu_length, uint32_t *data_offset, uint32_t *data_length, acn_pdu_offsets *last_pdu_offsets, uint32_t pdu_flvh_length, bool set_last_value_length) { /* Adjust data */ if (pdu_flags & ACN_PDU_FLAG_D) { @@ -4878,7 +4878,7 @@ dissect_pdu_bit_flag_d(int offset, guint8 pdu_flags, guint32 pdu_length, guint32 /******************************************************************************/ /* Add flag and flag tree */ static void -begin_dissect_acn_pdu(proto_tree **pdu_tree, tvbuff_t *tvb, proto_item **ti, proto_tree *tree, guint32 *pdu_start, int *offset, guint8 *pdu_flags, guint32 *pdu_length, guint32 *pdu_flvh_length, gint ett_base_pdu, gboolean is_acn) +begin_dissect_acn_pdu(proto_tree **pdu_tree, tvbuff_t *tvb, proto_item **ti, proto_tree *tree, uint32_t *pdu_start, int *offset, uint8_t *pdu_flags, uint32_t *pdu_length, uint32_t *pdu_flvh_length, int ett_base_pdu, bool is_acn) { proto_item *pi; proto_tree *flag_tree; @@ -4918,34 +4918,34 @@ begin_dissect_acn_pdu(proto_tree **pdu_tree, tvbuff_t *tvb, proto_item **ti, pro /******************************************************************************/ /* Dissect wrapped SDT PDU */ -static guint32 +static uint32_t dissect_acn_dmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { /* common to all pdu */ - gboolean blob_exists = 0; - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint8 D; - guint32 vector_offset; - guint32 header_offset; - guint32 data_offset; - guint32 old_offset; - guint32 end_offset; - guint32 data_length; - guint32 address_count; - guint32 blob_offset; - guint32 blob_end_offset = 0; + bool blob_exists = 0; + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint8_t D; + uint32_t vector_offset; + uint32_t header_offset; + uint32_t data_offset; + uint32_t old_offset; + uint32_t end_offset; + uint32_t data_length; + uint32_t address_count; + uint32_t blob_offset; + uint32_t blob_end_offset = 0; proto_item *ti; proto_tree *pdu_tree = NULL; /* this pdu */ - const gchar *name; + const char *name; acn_dmp_adt_type adt = {0,0,0,0,0,0}; acn_dmp_adt_type adt2 = {0,0,0,0,0,0}; - guint32 vector; + uint32_t vector; begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_acn_dmp_pdu, 1); @@ -4956,7 +4956,7 @@ dissect_acn_dmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off /* offset should now be pointing to header (if one exists) */ /* Add Vector item */ - vector = tvb_get_guint8(tvb, vector_offset); + vector = tvb_get_uint8(tvb, vector_offset); proto_tree_add_uint(pdu_tree, hf_acn_dmp_vector, tvb, vector_offset, 1, vector); /* Add Vector item to tree*/ @@ -5073,7 +5073,6 @@ dissect_acn_dmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off default: /* OUCH */ return pdu_start + pdu_length; - break; } /* virtual */ @@ -5190,24 +5189,24 @@ dissect_acn_dmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off /******************************************************************************/ /* Dissect wrapped SDT PDU */ -static guint32 +static uint32_t dissect_acn_sdt_wrapped_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { /* common to all pdu */ - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 vector_offset; - guint32 data_offset; - guint32 data_length; + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t vector_offset; + uint32_t data_offset; + uint32_t data_length; proto_item *ti; proto_tree *pdu_tree = NULL; /* this pdu */ - const gchar *name; - guint32 vector; + const char *name; + uint32_t vector; begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_acn_sdt_pdu, 1); @@ -5218,7 +5217,7 @@ dissect_acn_sdt_wrapped_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* offset should now be pointing to header (if one exists) */ /* Add Vector item */ - vector = tvb_get_guint8(tvb, vector_offset); + vector = tvb_get_uint8(tvb, vector_offset); proto_tree_add_uint(pdu_tree, hf_acn_sdt_vector, tvb, vector_offset, 1, vector); /* Add Vector item to tree*/ @@ -5281,30 +5280,30 @@ dissect_acn_sdt_wrapped_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /******************************************************************************/ /* Dissect SDT Client PDU */ -static guint32 +static uint32_t dissect_acn_sdt_client_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { /* common to all pdu */ - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ acn_pdu_offsets pdu_offsets = {0,0,0,0,0}; - guint32 vector_offset; - guint32 header_offset; - guint32 data_offset; - guint32 data_length; - guint32 old_offset; - guint32 end_offset; + uint32_t vector_offset; + uint32_t header_offset; + uint32_t data_offset; + uint32_t data_length; + uint32_t old_offset; + uint32_t end_offset; proto_item *ti; proto_tree *pdu_tree = NULL; /* this pdu */ - const gchar *name; - guint32 member_id; - guint32 protocol_id; - guint16 association; + const char *name; + uint32_t member_id; + uint32_t protocol_id; + uint16_t association; begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_acn_sdt_client_pdu, 1); @@ -5371,13 +5370,13 @@ dissect_acn_sdt_client_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* returns end of string */ /* faster than printf() */ static char * -ltos(guint8 level, gchar *string, guint8 base, gchar leading_char, guint8 min_chars, gboolean show_zero) +ltos(uint8_t level, char *string, uint8_t base, char leading_char, uint8_t min_chars, bool show_zero) { - guint8 i; + uint8_t i; /* verify base */ if (base < 2 || base > 16) { *string = '\0'; - return(string); + return string; } /* deal with zeros */ if ((level == 0) && (!show_zero)) { @@ -5386,7 +5385,7 @@ ltos(guint8 level, gchar *string, guint8 base, gchar leading_char, guint8 min_ch } string[i++] = ' '; string[i] = '\0'; - return(string + i); + return string+i; } i = 0; @@ -5408,51 +5407,51 @@ ltos(guint8 level, gchar *string, guint8 base, gchar leading_char, guint8 min_ch /* add a space at the end (ok it's at the start but it will be at the end)*/ string[i++] = ' '; string[i] = '\0'; - return(string + i); + return string+i; } /******************************************************************************/ /* Dissect DMX data PDU */ #define BUFFER_SIZE 128 -static guint32 -dissect_acn_dmx_data_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) +static uint32_t +dissect_acn_dmx_data_pdu(uint32_t protocol_id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { /* common to all pdu */ - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 vector_offset; - guint32 data_offset; - guint32 end_offset; - guint32 data_length; - guint32 header_offset; - guint32 total_cnt; - guint32 item_cnt; + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t vector_offset; + uint32_t data_offset; + uint32_t end_offset; + uint32_t data_length; + uint32_t header_offset; + uint32_t total_cnt; + uint32_t item_cnt; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ acn_dmp_adt_type adt = {0,0,0,0,0,0}; - const gchar *name; - guint32 vector; - gchar *buffer; + const char *name; + uint32_t vector; + char *buffer; char *buf_ptr; - guint x; - guint8 level; - guint8 min_char; - guint8 base; - gchar leading_char; - guint perline; - guint halfline; - guint16 dmx_count; - guint16 dmx_start_code; - guint16 info_start_code; - guint8 dmx_2_start_code; - - buffer = (gchar*)wmem_alloc(pinfo->pool, BUFFER_SIZE); + unsigned x; + uint8_t level; + uint8_t min_char; + uint8_t base; + char leading_char; + unsigned perline; + unsigned halfline; + uint16_t dmx_count; + uint16_t dmx_start_code; + uint16_t info_start_code; + uint8_t dmx_2_start_code; + + buffer = (char*)wmem_alloc(pinfo->pool, BUFFER_SIZE); buffer[0] = '\0'; begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_acn_dmx_data_pdu, 1); @@ -5464,7 +5463,7 @@ dissect_acn_dmx_data_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, /* offset should now be pointing to header (if one exists) */ /* Add Vector item */ - vector = tvb_get_guint8(tvb, vector_offset); + vector = tvb_get_uint8(tvb, vector_offset); proto_tree_add_uint(pdu_tree, hf_acn_dmp_vector, tvb, vector_offset, 1, vector); /* Add Vector item to tree*/ @@ -5497,7 +5496,7 @@ dissect_acn_dmx_data_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, data_offset += 2; if (protocol_id == ACN_PROTOCOL_ID_DMX_2 || protocol_id == ACN_PROTOCOL_ID_DMX_3) { - dmx_2_start_code = (guint8)tvb_get_ntohs(tvb, data_offset - 1); + dmx_2_start_code = (uint8_t)tvb_get_ntohs(tvb, data_offset - 1); proto_tree_add_item(pdu_tree, hf_acn_dmx_2_start_code, tvb, data_offset, 1, ENC_BIG_ENDIAN); data_offset += 1; dmx_count -= 1; @@ -5516,7 +5515,7 @@ dissect_acn_dmx_data_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, } /* values base on display mode */ - switch ((guint)global_acn_dmx_display_view) { + switch ((unsigned)global_acn_dmx_display_view) { case ACN_PREF_DMX_DISPLAY_HEX: min_char = 2; base = 16; @@ -5542,19 +5541,19 @@ dissect_acn_dmx_data_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, } col_append_fstr(pinfo->cinfo,COL_INFO, ", Sc %02x, [%02x %02x %02x %02x %02x %02x...]", info_start_code, - tvb_get_guint8(tvb, data_offset), - tvb_get_guint8(tvb, data_offset+1), - tvb_get_guint8(tvb, data_offset+2), - tvb_get_guint8(tvb, data_offset+3), - tvb_get_guint8(tvb, data_offset+4), - tvb_get_guint8(tvb, data_offset+5)); + tvb_get_uint8(tvb, data_offset), + tvb_get_uint8(tvb, data_offset+1), + tvb_get_uint8(tvb, data_offset+2), + tvb_get_uint8(tvb, data_offset+3), + tvb_get_uint8(tvb, data_offset+4), + tvb_get_uint8(tvb, data_offset+5)); /* add a header line */ *buf_ptr++ = ' '; *buf_ptr++ = ' '; *buf_ptr++ = ' '; for (x=0; x<perline; x++) { - buf_ptr = ltos((guint8)(x+1), buf_ptr, 10, ' ', min_char, FALSE); + buf_ptr = ltos((uint8_t)(x+1), buf_ptr, 10, ' ', min_char, false); if ((x+1)==halfline) { *buf_ptr++ = '|'; *buf_ptr++ = ' '; @@ -5570,7 +5569,7 @@ dissect_acn_dmx_data_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, total_cnt = 0; item_cnt = 0; for (x=data_offset; x<end_offset; x++) { - level = tvb_get_guint8(tvb, x); + level = tvb_get_uint8(tvb, x); if (global_acn_dmx_display_view == ACN_PREF_DMX_DISPLAY_PER) { if ((level > 0) && (level < 3)) { level = 1; @@ -5616,7 +5615,7 @@ dissect_acn_dmx_data_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, /******************************************************************************/ /* Dissect Common Base PDU */ static void -dissect_acn_common_base_pdu(tvbuff_t *tvb, proto_tree *tree, int *offset, acn_pdu_offsets *last_pdu_offsets, guint8 *pdu_flags, guint32 *pdu_start, guint32 *pdu_length, guint32 *pdu_flvh_length, guint32 *vector_offset, proto_item **ti, proto_tree **pdu_tree, gint ett_base_pdu, guint8 v_flag_increment, gboolean is_acn) +dissect_acn_common_base_pdu(tvbuff_t *tvb, proto_tree *tree, int *offset, acn_pdu_offsets *last_pdu_offsets, uint8_t *pdu_flags, uint32_t *pdu_start, uint32_t *pdu_length, uint32_t *pdu_flvh_length, uint32_t *vector_offset, proto_item **ti, proto_tree **pdu_tree, int ett_base_pdu, uint8_t v_flag_increment, bool is_acn) { begin_dissect_acn_pdu(pdu_tree, tvb, ti, tree, pdu_start, offset, pdu_flags, pdu_length, pdu_flvh_length, ett_base_pdu, is_acn); @@ -5636,42 +5635,42 @@ dissect_acn_common_base_pdu(tvbuff_t *tvb, proto_tree *tree, int *offset, acn_pd #define DMX_UNIV_LIST_MAX_DIGITS 5 #define DMX_UNIV_LIST_MAX_ITEMS_PER_LINE 16 #define DMX_UNIV_LIST_BUF_SIZE (DMX_UNIV_LIST_MAX_DIGITS + 1) * DMX_UNIV_LIST_MAX_ITEMS_PER_LINE + 1 -static guint32 -dissect_acn_dmx_discovery_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) +static uint32_t +dissect_acn_dmx_discovery_pdu(uint32_t protocol_id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { /* common to all pdu */ - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 vector_offset; - guint32 data_offset; - guint32 end_offset; - guint32 data_length; - guint32 item_cnt; + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t vector_offset; + uint32_t data_offset; + uint32_t end_offset; + uint32_t data_length; + uint32_t item_cnt; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ - const gchar *name; - guint32 vector; - gchar *buffer; + const char *name; + uint32_t vector; + char *buffer; char *buf_ptr; - guint x; - guint16 universe; - guint16 last_universe; - - guint32 page; - guint32 lastpage; - guint32 current_universe_idx; - guint32 bytes_printed; + unsigned x; + uint16_t universe; + uint16_t last_universe; + + uint32_t page; + uint32_t lastpage; + uint32_t current_universe_idx; + uint32_t bytes_printed; bool warned_unorder_once; (void)protocol_id; warned_unorder_once = false; - buffer = (gchar*)wmem_alloc(pinfo->pool, DMX_UNIV_LIST_BUF_SIZE); + buffer = (char*)wmem_alloc(pinfo->pool, DMX_UNIV_LIST_BUF_SIZE); buffer[0] = '\0'; data_length = 0; @@ -5689,11 +5688,11 @@ dissect_acn_dmx_discovery_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *p name = val_to_str(vector, acn_dmx_discovery_vector_vals, "not valid (%d)"); proto_item_append_text(ti, ": %s", name); - page = tvb_get_guint8(tvb, data_offset); + page = tvb_get_uint8(tvb, data_offset); proto_tree_add_item(ti, hf_acn_dmx_discovery_page, tvb, data_offset, 1, ENC_BIG_ENDIAN); data_offset += 1; - lastpage = tvb_get_guint8(tvb, data_offset); + lastpage = tvb_get_uint8(tvb, data_offset); proto_tree_add_item(ti, hf_acn_dmx_discovery_last_page, tvb, data_offset, 1, ENC_BIG_ENDIAN); data_offset += 1; @@ -5704,24 +5703,24 @@ dissect_acn_dmx_discovery_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *p /* add a snippet to info (this may be slow) */ col_append_fstr(pinfo->cinfo,COL_INFO, ",[Universe Page %u/%u: ", page+1, lastpage+1); current_universe_idx = 0; - while(data_offset + (sizeof(guint16)*current_universe_idx) != end_offset && current_universe_idx < 6) + while(data_offset + (sizeof(uint16_t)*current_universe_idx) != end_offset && current_universe_idx < 6) { - col_append_fstr(pinfo->cinfo,COL_INFO, "%u ", tvb_get_guint16(tvb, data_offset + (sizeof(guint16)*current_universe_idx), ENC_BIG_ENDIAN)); + col_append_fstr(pinfo->cinfo,COL_INFO, "%u ", tvb_get_uint16(tvb, data_offset + (sizeof(uint16_t)*current_universe_idx), ENC_BIG_ENDIAN)); ++current_universe_idx; } - if(data_offset + (sizeof(guint16)*current_universe_idx) != end_offset) - col_append_fstr(pinfo->cinfo,COL_INFO,"..."); + if(data_offset + (sizeof(uint16_t)*current_universe_idx) != end_offset) + col_append_str(pinfo->cinfo,COL_INFO, "..."); else if(current_universe_idx == 0) - col_append_fstr(pinfo->cinfo,COL_INFO,"none"); + col_append_str(pinfo->cinfo,COL_INFO, "none"); - col_append_fstr(pinfo->cinfo,COL_INFO, "]"); + col_append_str(pinfo->cinfo,COL_INFO, "]"); proto_tree_add_string(pdu_tree, hf_acn_dmx_discovery_universe_list, tvb, data_offset, end_offset-data_offset, ""); item_cnt = 0; last_universe = 0; for (x=data_offset; x<end_offset; x+=2) { - universe = tvb_get_guint16(tvb, x, ENC_BIG_ENDIAN); + universe = tvb_get_uint16(tvb, x, ENC_BIG_ENDIAN); if(!warned_unorder_once && last_universe > universe) { @@ -5752,26 +5751,26 @@ dissect_acn_dmx_discovery_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *p /******************************************************************************/ /* Dissect DMX Base PDU */ -static guint32 -dissect_acn_dmx_extension_base_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) +static uint32_t +dissect_acn_dmx_extension_base_pdu(uint32_t protocol_id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { (void)protocol_id; (void)pinfo; /* common to all pdu */ - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 vector_offset; - guint32 data_offset; - guint32 data_length; + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t vector_offset; + uint32_t data_offset; + uint32_t data_length; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ const char *name; - guint32 vector; + uint32_t vector; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_acn_dmx_pdu, 4, 1); @@ -5819,19 +5818,19 @@ dissect_acn_dmx_extension_base_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_in /******************************************************************************/ /* Dissect DMX Base PDU */ -static guint32 -dissect_acn_dmx_base_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) +static uint32_t +dissect_acn_dmx_base_pdu(uint32_t protocol_id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { /* common to all pdu */ - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ acn_pdu_offsets pdu_offsets = {0,0,0,0,0}; - guint8 option_flags; - guint32 vector_offset; - guint32 data_offset; - guint32 data_length; + uint8_t option_flags; + uint32_t vector_offset; + uint32_t data_offset; + uint32_t data_length; proto_item *ti, *pi; proto_tree *pdu_tree; @@ -5839,11 +5838,11 @@ dissect_acn_dmx_base_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, /* this pdu */ const char *name; - guint32 vector; + uint32_t vector; - guint32 universe; - guint32 priority; - guint32 sequence; + uint32_t universe; + uint32_t priority; + uint32_t sequence; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_acn_dmx_pdu, 4, 1); @@ -5871,7 +5870,7 @@ dissect_acn_dmx_base_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, data_offset += 32; } - priority = tvb_get_guint8(tvb, data_offset); + priority = tvb_get_uint8(tvb, data_offset); proto_tree_add_item(pdu_tree, hf_acn_dmx_priority, tvb, data_offset, 1, ENC_BIG_ENDIAN); data_offset += 1; @@ -5885,12 +5884,12 @@ dissect_acn_dmx_base_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, data_offset += 2; } - sequence = tvb_get_guint8(tvb, data_offset); + sequence = tvb_get_uint8(tvb, data_offset); proto_tree_add_item(pdu_tree, hf_acn_dmx_sequence_number, tvb, data_offset, 1, ENC_BIG_ENDIAN); data_offset += 1; if (protocol_id == ACN_PROTOCOL_ID_DMX_2 || protocol_id == ACN_PROTOCOL_ID_DMX_3) { - option_flags = tvb_get_guint8(tvb, data_offset); + option_flags = tvb_get_uint8(tvb, data_offset); pi = proto_tree_add_uint(pdu_tree, hf_acn_dmx_2_options, tvb, data_offset, 1, option_flags); flag_tree = proto_item_add_subtree(pi, ett_acn_dmx_2_options); proto_tree_add_item(flag_tree, hf_acn_dmx_2_option_p, tvb, data_offset, 1, ENC_BIG_ENDIAN); @@ -5916,33 +5915,33 @@ dissect_acn_dmx_base_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, /******************************************************************************/ /* Dissect SDT Base PDU */ -static guint32 +static uint32_t dissect_acn_sdt_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { /* common to all pdu */ - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ acn_pdu_offsets pdu_offsets = {0,0,0,0,0}; - guint32 vector_offset; - guint32 data_offset; - guint32 end_offset; - guint32 old_offset; - guint32 data_length; + uint32_t vector_offset; + uint32_t data_offset; + uint32_t end_offset; + uint32_t old_offset; + uint32_t data_length; proto_item *ti, *pi; proto_tree *pdu_tree; /* this pdu */ - const gchar *name; - guint32 vector; - guint32 member_id; + const char *name; + uint32_t vector; + uint32_t member_id; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_acn_sdt_base_pdu, 1, 1); /* Add Vector item */ - vector = tvb_get_guint8(tvb, vector_offset); + vector = tvb_get_uint8(tvb, vector_offset); proto_tree_add_uint(pdu_tree, hf_acn_sdt_vector, tvb, vector_offset, 1, vector); /* Add Vector item to tree*/ @@ -6092,18 +6091,18 @@ dissect_acn_sdt_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in /******************************************************************************/ /* Dissect LLRP Probe Request PDU */ -static guint32 +static uint32_t dissect_llrp_probe_request_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { /* common to all pdu */ - guint8 pdu_flags; - guint8 vector; - guint8 filter_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 data_offset; - guint32 end_offset; + uint8_t pdu_flags; + uint8_t vector; + uint8_t filter_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t data_offset; + uint32_t end_offset; proto_item *ti, *pi; proto_tree *flag_tree; @@ -6118,7 +6117,7 @@ dissect_llrp_probe_request_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_ /* offset should now be pointing to header (if one exists) */ /* add vector item */ - vector = tvb_get_guint8(tvb, data_offset); + vector = tvb_get_uint8(tvb, data_offset); proto_tree_add_uint(pdu_tree, hf_rdmnet_llrp_probe_request_vector, tvb, data_offset, 1, vector); dissect_pdu_bit_flag_h(&offset, pdu_flags, &data_offset, last_pdu_offsets, &pdu_flvh_length, 6); @@ -6134,7 +6133,7 @@ dissect_llrp_probe_request_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_ data_offset += 6; /* filter */ - filter_flags = tvb_get_guint8(tvb, data_offset); + filter_flags = tvb_get_uint8(tvb, data_offset); filter_flags = filter_flags & 0x03; pi = proto_tree_add_uint(pdu_tree, hf_rdmnet_llrp_probe_request_filter, tvb, data_offset, 1, filter_flags); flag_tree = proto_item_add_subtree(pi, ett_rdmnet_llrp_probe_request_filter_flags); @@ -6155,16 +6154,16 @@ dissect_llrp_probe_request_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_ /******************************************************************************/ /* Dissect LLRP Probe Reply PDU */ -static guint32 +static uint32_t dissect_llrp_probe_reply_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { /* common to all pdu */ - guint8 pdu_flags; - guint8 vector; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 data_offset; + uint8_t pdu_flags; + uint8_t vector; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t data_offset; proto_item *ti; proto_tree *pdu_tree; @@ -6178,7 +6177,7 @@ dissect_llrp_probe_reply_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pd /* offset should now be pointing to header (if one exists) */ /* add vector item */ - vector = tvb_get_guint8(tvb, data_offset); + vector = tvb_get_uint8(tvb, data_offset); proto_tree_add_uint(pdu_tree, hf_rdmnet_llrp_probe_reply_vector, tvb, data_offset, 1, vector); dissect_pdu_bit_flag_h(&offset, pdu_flags, &data_offset, last_pdu_offsets, &pdu_flvh_length, 6); @@ -6202,18 +6201,18 @@ dissect_llrp_probe_reply_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pd /******************************************************************************/ /* Dissect RDM Command */ -static guint32 -dissect_rdm_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree, guint32 data_offset, guint32 length) +static uint32_t +dissect_rdm_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree, uint32_t data_offset, uint32_t length) { - gboolean save_info; - gboolean save_protocol; - guint32 data_end; + bool save_info; + bool save_protocol; + uint32_t data_end; tvbuff_t *next_tvb; save_info = col_get_writable(pinfo->cinfo, COL_INFO); save_protocol = col_get_writable(pinfo->cinfo, COL_PROTOCOL); - col_set_writable(pinfo->cinfo, COL_INFO, FALSE); - col_set_writable(pinfo->cinfo, COL_PROTOCOL, FALSE); + col_set_writable(pinfo->cinfo, COL_INFO, false); + col_set_writable(pinfo->cinfo, COL_PROTOCOL, false); data_end = data_offset + length; next_tvb = tvb_new_subset_length(tvb, data_offset, length); @@ -6228,23 +6227,23 @@ dissect_rdm_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree, gui /******************************************************************************/ /* Dissect LLRP RDM Command PDU */ -static guint32 +static uint32_t dissect_llrp_rdm_command_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { /* common to all pdu */ - guint8 pdu_flags; - guint8 vector; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_end; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 data_offset; + uint8_t pdu_flags; + uint8_t vector; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_end; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t data_offset; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ - const gchar *name; + const char *name; begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_rdmnet_llrp_rdm_command_pdu, 0); @@ -6255,7 +6254,7 @@ dissect_llrp_rdm_command_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* offset should now be pointing to header (if one exists) */ /* add vector item */ - vector = tvb_get_guint8(tvb, data_offset); + vector = tvb_get_uint8(tvb, data_offset); proto_tree_add_uint(pdu_tree, hf_rdmnet_llrp_rdm_command_start_code, tvb, data_offset, 1, vector); /* Add Vector item to tree */ @@ -6275,25 +6274,25 @@ dissect_llrp_rdm_command_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /******************************************************************************/ /* Dissect LLRP Base PDU */ -static guint32 +static uint32_t dissect_acn_llrp_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ acn_pdu_offsets pdu_offsets = {0,0,0,0,0}; - guint32 vector_offset; - guint32 data_offset; - guint32 data_length; + uint32_t vector_offset; + uint32_t data_offset; + uint32_t data_length; e_guid_t guid; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ - const gchar *name; - guint32 vector; + const char *name; + uint32_t vector; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_llrp_base_pdu, 1, 0); @@ -6339,17 +6338,17 @@ dissect_acn_llrp_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i /******************************************************************************/ /* Dissect Broker Client Entry PDU */ -static guint32 -dissect_broker_client_entry_pdu(tvbuff_t *tvb, proto_tree *tree, guint32 offset, acn_pdu_offsets *last_pdu_offsets) +static uint32_t +dissect_broker_client_entry_pdu(tvbuff_t *tvb, proto_tree *tree, uint32_t offset, acn_pdu_offsets *last_pdu_offsets) { - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_end; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 vector_offset; - guint32 data_offset; - guint32 data_length; + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_end; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t vector_offset; + uint32_t data_offset; + uint32_t data_length; proto_item *ti; proto_item *ti2; @@ -6357,8 +6356,8 @@ dissect_broker_client_entry_pdu(tvbuff_t *tvb, proto_tree *tree, guint32 offset, proto_tree *pdu_tree2; /* this pdu */ - const gchar *name; - guint32 vector; + const char *name; + uint32_t vector; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_broker_client_entry_pdu, 1, 0); pdu_end = pdu_start + pdu_length; @@ -6417,10 +6416,10 @@ dissect_broker_client_entry_pdu(tvbuff_t *tvb, proto_tree *tree, guint32 offset, /******************************************************************************/ /* Dissect Broker Connect */ -static guint32 -dissect_broker_connect(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets, guint32 pdu_end) +static uint32_t +dissect_broker_connect(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets, uint32_t pdu_end) { - guint8 connection_flags; + uint8_t connection_flags; proto_item *pi; proto_tree *flag_tree; @@ -6437,7 +6436,7 @@ dissect_broker_connect(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offs offset += 231; /* connection flags */ - connection_flags = tvb_get_guint8(tvb, offset); + connection_flags = tvb_get_uint8(tvb, offset); connection_flags = connection_flags & 0x01; pi = proto_tree_add_uint(tree, hf_rdmnet_broker_connect_connection_flags, tvb, offset, 1, connection_flags); flag_tree = proto_item_add_subtree(pi, ett_rdmnet_broker_connect_connection_flags); @@ -6453,7 +6452,7 @@ dissect_broker_connect(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offs /******************************************************************************/ /* Dissect Broker Connect Reply */ -static guint32 +static uint32_t dissect_broker_connect_reply(tvbuff_t *tvb, proto_tree *tree, int offset) { /* connection code */ @@ -6477,16 +6476,16 @@ dissect_broker_connect_reply(tvbuff_t *tvb, proto_tree *tree, int offset) /******************************************************************************/ /* Dissect Broker Client Entry Update */ -static guint32 -dissect_broker_client_entry_update(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets, guint32 pdu_end) +static uint32_t +dissect_broker_client_entry_update(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets, uint32_t pdu_end) { - guint8 connection_flags; + uint8_t connection_flags; proto_item *pi; proto_tree *flag_tree; /* connection flags */ - connection_flags = tvb_get_guint8(tvb, offset); + connection_flags = tvb_get_uint8(tvb, offset); connection_flags = connection_flags & 0x01; pi = proto_tree_add_uint(tree, hf_rdmnet_broker_client_entry_update_connection_flags, tvb, offset, 1, connection_flags); flag_tree = proto_item_add_subtree(pi, ett_rdmnet_broker_client_entry_update_connection_flags); @@ -6502,7 +6501,7 @@ dissect_broker_client_entry_update(tvbuff_t *tvb, proto_tree *tree, int offset, /******************************************************************************/ /* Dissect Broker Redirect V4 */ -static guint32 +static uint32_t dissect_broker_redirect_v4(tvbuff_t *tvb, proto_tree *tree, int offset) { /* ipv4 address */ @@ -6518,7 +6517,7 @@ dissect_broker_redirect_v4(tvbuff_t *tvb, proto_tree *tree, int offset) /******************************************************************************/ /* Dissect Broker Redirect V6 */ -static guint32 +static uint32_t dissect_broker_redirect_v6(tvbuff_t *tvb, proto_tree *tree, int offset) { /* ipv6 address */ @@ -6534,7 +6533,7 @@ dissect_broker_redirect_v6(tvbuff_t *tvb, proto_tree *tree, int offset) /******************************************************************************/ /* Dissect Broker Disconnect */ -static guint32 +static uint32_t dissect_broker_disconnect(tvbuff_t *tvb, proto_tree *tree, int offset) { /* disconnect reason */ @@ -6546,8 +6545,8 @@ dissect_broker_disconnect(tvbuff_t *tvb, proto_tree *tree, int offset) /******************************************************************************/ /* Dissect Broker Request Dynamic UIDs */ -static guint32 -dissect_broker_request_dynamic_uids(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 pdu_end) +static uint32_t +dissect_broker_request_dynamic_uids(tvbuff_t *tvb, proto_tree *tree, uint32_t offset, uint32_t pdu_end) { /* packed list of dynamic uid request (6 bytes) and rid (16 bytes) */ while (offset + 22 < pdu_end) { @@ -6566,8 +6565,8 @@ dissect_broker_request_dynamic_uids(tvbuff_t *tvb, proto_tree *tree, guint32 off /******************************************************************************/ /* Dissect Broker Assigned Dynamic UIDs */ -static guint32 -dissect_broker_assigned_dynamic_uids(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 pdu_end) +static uint32_t +dissect_broker_assigned_dynamic_uids(tvbuff_t *tvb, proto_tree *tree, uint32_t offset, uint32_t pdu_end) { /* packed list of dynamic uid request (6 bytes), rid (16 bytes), and status_code (2 bytes) */ while (offset + 24 < pdu_end) { @@ -6590,8 +6589,8 @@ dissect_broker_assigned_dynamic_uids(tvbuff_t *tvb, proto_tree *tree, guint32 of /******************************************************************************/ /* Dissect Broker Fetch Dynamic UIDs */ -static guint32 -dissect_broker_fetch_dynamic_uids(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 pdu_end) +static uint32_t +dissect_broker_fetch_dynamic_uids(tvbuff_t *tvb, proto_tree *tree, uint32_t offset, uint32_t pdu_end) { /* packed list of dynamic uid request (6 bytes) */ while (offset + 6 < pdu_end) { @@ -6606,27 +6605,27 @@ dissect_broker_fetch_dynamic_uids(tvbuff_t *tvb, proto_tree *tree, guint32 offse /******************************************************************************/ /* Dissect Broker Base PDU */ -static guint32 +static uint32_t dissect_acn_broker_base_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_end; - guint32 pdu_flvh_length; /* flags, length, vector, header */ + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_end; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ acn_pdu_offsets pdu_offsets = {0,0,0,0,0}; - guint32 vector_offset; - guint32 data_offset; - guint32 old_offset; - guint32 end_offset; - guint32 data_length; + uint32_t vector_offset; + uint32_t data_offset; + uint32_t old_offset; + uint32_t end_offset; + uint32_t data_length; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ - const gchar *name; - guint16 vector; + const char *name; + uint16_t vector; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_broker_base_pdu, 1, 0); pdu_end = pdu_start + pdu_length; @@ -6696,29 +6695,29 @@ dissect_acn_broker_base_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu /******************************************************************************/ /* Dissect RPT Request RDM Command */ -static guint32 +static uint32_t dissect_rpt_request_rdm_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_end; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 vector_offset; - guint32 data_offset; - guint32 data_length; + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_end; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t vector_offset; + uint32_t data_offset; + uint32_t data_length; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ - const gchar *name; - guint8 vector; + const char *name; + uint8_t vector; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_rpt_request_pdu, 1, 0); /* Add Vector item */ - vector = tvb_get_guint8(tvb, vector_offset); + vector = tvb_get_uint8(tvb, vector_offset); proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_request_rdm_command, tvb, vector_offset, 1, ENC_BIG_ENDIAN); /* Add Vector item to tree */ @@ -6739,24 +6738,24 @@ dissect_rpt_request_rdm_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t /******************************************************************************/ /* Dissect RPT Request */ -static guint32 +static uint32_t dissect_rpt_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ acn_pdu_offsets pdu_offsets = {0,0,0,0,0}; - guint32 vector_offset; - guint32 data_offset; - guint32 data_length; + uint32_t vector_offset; + uint32_t data_offset; + uint32_t data_length; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ - const gchar *name; - guint32 vector; + const char *name; + uint32_t vector; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_rpt_request_pdu, 1, 0); @@ -6782,24 +6781,24 @@ dissect_rpt_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off /******************************************************************************/ /* Dissect RPT Status */ -static guint32 +static uint32_t dissect_rpt_status(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_end; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 vector_offset; - guint32 data_offset; - guint32 data_length; + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_end; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t vector_offset; + uint32_t data_offset; + uint32_t data_length; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ - const gchar *name; - guint16 vector; + const char *name; + uint16_t vector; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_rpt_status_pdu, 1, 0); @@ -6866,29 +6865,29 @@ dissect_rpt_status(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets /******************************************************************************/ /* Dissect RPT Notification RDM Command */ -static guint32 +static uint32_t dissect_rpt_notification_rdm_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_end; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 vector_offset; - guint32 data_offset; - guint32 data_length; + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_end; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t vector_offset; + uint32_t data_offset; + uint32_t data_length; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ - const gchar *name; - guint8 vector; + const char *name; + uint8_t vector; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_rpt_request_pdu, 1, 0); /* Add Vector item */ - vector = tvb_get_guint8(tvb, vector_offset); + vector = tvb_get_uint8(tvb, vector_offset); proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_notification_rdm_command, tvb, vector_offset, 1, ENC_BIG_ENDIAN); /* Add Vector item to tree */ @@ -6909,26 +6908,26 @@ dissect_rpt_notification_rdm_command(tvbuff_t *tvb, packet_info *pinfo, proto_tr /******************************************************************************/ /* Dissect RPT Notification */ -static guint32 +static uint32_t dissect_rpt_notification(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_end; - guint32 pdu_flvh_length; /* flags, length, vector, header */ + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_end; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ acn_pdu_offsets pdu_offsets = {0,0,0,0,0}; - guint32 vector_offset; - guint32 data_offset; - guint32 data_length; - guint32 old_offset; + uint32_t vector_offset; + uint32_t data_offset; + uint32_t data_length; + uint32_t old_offset; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ - const gchar *name; - guint32 vector; + const char *name; + uint32_t vector; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_rpt_notification_pdu, 1, 0); @@ -6959,24 +6958,24 @@ dissect_rpt_notification(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in /******************************************************************************/ /* Dissect RPT Base PDU */ -static guint32 +static uint32_t dissect_acn_rpt_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ acn_pdu_offsets pdu_offsets = {0,0,0,0,0}; - guint32 vector_offset; - guint32 data_offset; - guint32 data_length; + uint32_t vector_offset; + uint32_t data_offset; + uint32_t data_length; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ - const gchar *name; - guint32 vector; + const char *name; + uint32_t vector; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_rpt_base_pdu, 1, 0); @@ -7036,16 +7035,16 @@ dissect_acn_rpt_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in /******************************************************************************/ /* Dissect EPT Data */ -static guint32 +static uint32_t dissect_ept_data(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_end; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 vector_offset; - guint32 data_offset; + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_end; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t vector_offset; + uint32_t data_offset; proto_item *ti; proto_item *ti2; @@ -7077,17 +7076,17 @@ dissect_ept_data(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *l /******************************************************************************/ /* Dissect EPT Status */ -static guint32 +static uint32_t dissect_ept_status(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { - guint8 pdu_flags; - guint16 vector; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_end; - guint32 pdu_flvh_length; /* flags, length, vector, header */ - guint32 vector_offset; - guint32 data_offset; + uint8_t pdu_flags; + uint16_t vector; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_end; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ + uint32_t vector_offset; + uint32_t data_offset; proto_item *ti; proto_tree *pdu_tree; @@ -7132,24 +7131,24 @@ dissect_ept_status(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets /******************************************************************************/ /* Dissect EPT Base PDU */ -static guint32 +static uint32_t dissect_acn_ept_base_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets) { - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ acn_pdu_offsets pdu_offsets = {0,0,0,0,0}; - guint32 vector_offset; - guint32 data_offset; - guint32 data_length; + uint32_t vector_offset; + uint32_t data_offset; + uint32_t data_length; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ - const gchar *name; - guint32 vector; + const char *name; + uint32_t vector; dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_ept_base_pdu, 1, 0); @@ -7185,10 +7184,10 @@ dissect_acn_ept_base_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_of /******************************************************************************/ /* Dissect Root PDU */ -static guint32 -dissect_acn_root_pdu_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree, proto_item *ti, const char *title, int *offset, guint8 pdu_flags, guint32 pdu_length, guint32 *data_offset, guint32 *data_length, acn_pdu_offsets *last_pdu_offsets, gboolean add_cid_to_info, guint32 *pdu_flvh_length, gboolean is_acn) +static uint32_t +dissect_acn_root_pdu_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree, proto_item *ti, const char *title, int *offset, uint8_t pdu_flags, uint32_t pdu_length, uint32_t *data_offset, uint32_t *data_length, acn_pdu_offsets *last_pdu_offsets, bool add_cid_to_info, uint32_t *pdu_flvh_length, bool is_acn) { - guint32 header_offset; + uint32_t header_offset; e_guid_t guid; /* Adjust header */ @@ -7220,26 +7219,26 @@ dissect_acn_root_pdu_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_t /******************************************************************************/ /* Dissect Root PDU */ -static guint32 -dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets, gboolean is_acn) +static uint32_t +dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets, bool is_acn) { /* common to all pdu */ - guint8 pdu_flags; - guint32 pdu_start; - guint32 pdu_length; - guint32 pdu_flvh_length; /* flags, length, vector, header */ + uint8_t pdu_flags; + uint32_t pdu_start; + uint32_t pdu_length; + uint32_t pdu_flvh_length; /* flags, length, vector, header */ acn_pdu_offsets pdu_offsets = {0,0,0,0,0}; - guint32 vector_offset; - guint32 data_offset; - guint32 end_offset; - guint32 old_offset; - guint32 data_length; + uint32_t vector_offset; + uint32_t data_offset; + uint32_t end_offset; + uint32_t old_offset; + uint32_t data_length; proto_item *ti; proto_tree *pdu_tree; /* this pdu */ - guint32 protocol_id; + uint32_t protocol_id; begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_acn_root_pdu, is_acn); @@ -7349,11 +7348,11 @@ dissect_acn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { proto_item *ti; proto_tree *acn_tree; - guint32 data_offset = 0; - guint32 old_offset; - guint32 end_offset; + uint32_t data_offset = 0; + uint32_t old_offset; + uint32_t end_offset; acn_pdu_offsets pdu_offsets = {0,0,0,0,0}; - guint16 postamble_size; + uint16_t postamble_size; /* if (!is_acn(tvb)) { */ /* return 0; */ @@ -7369,7 +7368,7 @@ dissect_acn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) /* add preamble, postamble and ACN Packet ID */ proto_tree_add_item(acn_tree, hf_acn_preamble_size, tvb, data_offset, 2, ENC_BIG_ENDIAN); data_offset += 2; - postamble_size = tvb_get_guint16(tvb, data_offset, ENC_BIG_ENDIAN); + postamble_size = tvb_get_uint16(tvb, data_offset, ENC_BIG_ENDIAN); proto_tree_add_item(acn_tree, hf_acn_postamble_size, tvb, data_offset, 2, ENC_BIG_ENDIAN); data_offset += 2; proto_tree_add_item(acn_tree, hf_acn_packet_identifier, tvb, data_offset, 12, ENC_UTF_8 | ENC_NA); @@ -7401,14 +7400,14 @@ dissect_acn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) /******************************************************************************/ /* Dissect RDMnet */ static int -dissect_rdmnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 data_offset, gboolean is_udp) +dissect_rdmnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint32_t data_offset, bool is_udp) { proto_item *ti; proto_tree *rdmnet_tree; - /* guint32 data_offset = 0; */ - guint32 old_offset; - guint32 end_offset; - guint32 pdu_length; + /* uint32_t data_offset = 0; */ + uint32_t old_offset; + uint32_t end_offset; + uint32_t pdu_length; acn_pdu_offsets pdu_offsets = {0,0,0,0,0}; /* Set the protocol column */ @@ -7906,7 +7905,7 @@ proto_register_acn(void) { &hf_acn_reciprocal_channel, { "Reciprocal Channel Number", "acn.reciprocal_channel", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, - "Reciprocal Channel", HFILL } + NULL, HFILL } }, /* Refuse Code */ { &hf_acn_refuse_code, @@ -8878,7 +8877,7 @@ proto_register_acn(void) }; /* Setup protocol subtree array */ - static gint *ett[] = { + static int *ett[] = { &ett_acn, &ett_acn_channel_owner_info_block, &ett_acn_channel_member_info_block, @@ -8899,12 +8898,12 @@ proto_register_acn(void) }; /* Setup protocol subtree array */ - static gint *magic_ett[] = { + static int *magic_ett[] = { &ett_magic }; /* Setup protocol subtree array */ - static gint *rdmnet_ett[] = { + static int *rdmnet_ett[] = { &ett_rdmnet, &ett_rdmnet_pdu_flags, &ett_rdmnet_llrp_base_pdu, @@ -8957,7 +8956,7 @@ proto_register_acn(void) "Display format", &global_acn_dmx_display_view, dmx_display_view, - TRUE); + true); prefs_register_bool_preference(acn_module, "dmx_display_zeros", "DMX, display zeros", @@ -8974,7 +8973,7 @@ proto_register_acn(void) "Display line format", &global_acn_dmx_display_line_format, dmx_display_line_format, - TRUE); + true); proto_register_field_array(proto_magic, magic_hf, array_length(magic_hf)); proto_register_subtree_array(magic_ett, array_length(magic_ett)); |