summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_a_common.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-gsm_a_common.c
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-gsm_a_common.c')
-rw-r--r--epan/dissectors/packet-gsm_a_common.c938
1 files changed, 470 insertions, 468 deletions
diff --git a/epan/dissectors/packet-gsm_a_common.c b/epan/dissectors/packet-gsm_a_common.c
index 1cf85fc1..1fe58f61 100644
--- a/epan/dissectors/packet-gsm_a_common.c
+++ b/epan/dissectors/packet-gsm_a_common.c
@@ -18,11 +18,14 @@
#include <math.h>
#include <epan/packet.h>
-#include <epan/to_str.h>
#include <epan/expert.h>
#include <epan/tap.h>
#include <epan/stat_tap_ui.h>
+#include <epan/tfs.h>
+#include <epan/unit_strings.h>
+
#include <wsutil/str_util.h>
+#include <wsutil/array.h>
#include "packet-gsm_a_common.h"
#include "packet-bssap.h"
#include "packet-gmr1_common.h"
@@ -544,236 +547,236 @@ const value_string gsm_a_rr_rxqual_vals[] = {
};
/* Initialize the protocol and registered fields */
-static int proto_a_common = -1;
-static int proto_3gpp = -1;
-
-int gsm_a_tap = -1;
-
-int hf_gsm_a_common_elem_id = -1;
-static int hf_gsm_a_common_elem_id_f0 = -1;
-static int hf_gsm_a_l_ext = -1;
-int hf_gsm_a_tmsi = -1;
-static int hf_gsm_a_imei = -1;
-static int hf_gsm_a_imeisv = -1;
-
-static int hf_gsm_a_MSC_rev = -1;
-static int hf_gsm_a_ES_IND = -1;
-static int hf_gsm_a_A5_1_algorithm_sup = -1;
-static int hf_gsm_a_RF_power_capability = -1;
-static int hf_gsm_a_ps_sup_cap = -1;
-static int hf_gsm_a_SS_screening_indicator = -1;
-static int hf_gsm_a_SM_capability = -1;
-static int hf_gsm_a_VBS_notification_rec = -1;
-static int hf_gsm_a_VGCS_notification_rec = -1;
-static int hf_gsm_a_FC_frequency_cap = -1;
-static int hf_gsm_a_CM3 = -1;
-static int hf_gsm_a_LCS_VA_cap = -1;
-static int hf_gsm_a_UCS2_treatment = -1;
-static int hf_gsm_a_SoLSA = -1;
-static int hf_gsm_a_CMSP = -1;
-static int hf_gsm_a_A5_7_algorithm_sup = -1;
-static int hf_gsm_a_A5_6_algorithm_sup = -1;
-static int hf_gsm_a_A5_5_algorithm_sup = -1;
-static int hf_gsm_a_A5_4_algorithm_sup = -1;
-static int hf_gsm_a_A5_3_algorithm_sup = -1;
-static int hf_gsm_a_A5_2_algorithm_sup = -1;
-
-static int hf_gsm_a_odd_even_ind = -1;
-static int hf_gsm_a_id_dig_1 = -1;
-static int hf_gsm_a_unused = -1;
-static int hf_gsm_a_mobile_identity_type = -1;
-static int hf_gsm_a_tmgi_mcc_mnc_ind = -1;
-static int hf_gsm_a_mbs_ses_id_ind = -1;
-static int hf_gsm_a_mbs_service_id = -1;
-static int hf_gsm_a_mbs_session_id = -1;
-static int hf_gsm_a_length = -1;
-static int hf_gsm_a_element_value = -1;
-int hf_gsm_a_extension = -1;
-int hf_gsm_a_L3_protocol_discriminator = -1;
-int hf_gsm_a_call_prio = -1;
-int hf_gsm_a_skip_ind = -1;
-int hf_gsm_a_spare_bits = -1;
-int hf_gsm_a_lac = -1;
-
-static int hf_gsm_a_spare_nibble = -1;
-static int hf_gsm_a_type_of_ciph_alg = -1;
-static int hf_gsm_a_att = -1;
-static int hf_gsm_a_nmo_1 = -1;
-static int hf_gsm_a_nmo = -1;
-static int hf_gsm_a_old_xid = -1;
-static int hf_gsm_a_iov_ui = -1;
-static int hf_gsm_a_ext_periodic_timers = -1;
-static int hf_gsm_a_b7spare = -1;
-int hf_gsm_a_b8spare = -1;
-static int hf_gsm_a_multi_bnd_sup_fields = -1;
-static int hf_gsm_a_pgsm_supported = -1;
-static int hf_gsm_a_egsm_supported = -1;
-static int hf_gsm_a_gsm1800_supported = -1;
-static int hf_gsm_a_ass_radio_cap1 = -1;
-static int hf_gsm_a_ass_radio_cap2 = -1;
-static int hf_gsm_a_rsupport = -1;
-static int hf_gsm_a_r_capabilities = -1;
-static int hf_gsm_a_multislot_capabilities = -1;
-static int hf_gsm_a_multislot_class = -1;
-static int hf_gsm_a_ucs2_treatment = -1;
-static int hf_gsm_a_extended_measurement_cap = -1;
-static int hf_gsm_a_ms_measurement_capability = -1;
-static int hf_gsm_a_sms_value =-1;
-static int hf_gsm_a_sm_value =-1;
-static int hf_gsm_a_key_seq = -1;
-static int hf_gsm_a_ms_pos_method_cap_present = -1;
-static int hf_gsm_a_ms_pos_method = -1;
-static int hf_gsm_a_ms_assisted_e_otd = -1;
-static int hf_gsm_a_ms_based_e_otd = -1;
-static int hf_gsm_a_ms_assisted_gps = -1;
-static int hf_gsm_a_ms_based_gps = -1;
-static int hf_gsm_a_ms_conventional_gps = -1;
-static int hf_gsm_a_ecsd_multi_slot_capability = -1;
-static int hf_gsm_a_ecsd_multi_slot_class = -1;
-static int hf_gsm_a_8_psk_struct_present = -1;
-static int hf_gsm_a_8_psk_struct = -1;
-static int hf_gsm_a_modulation_capability = -1;
-static int hf_gsm_a_8_psk_rf_power_capability_1_present = -1;
-static int hf_gsm_a_8_psk_rf_power_capability_1 = -1;
-static int hf_gsm_a_8_psk_rf_power_capability_2_present = -1;
-static int hf_gsm_a_8_psk_rf_power_capability_2 = -1;
-static int hf_gsm_a_gsm_400_band_info_present = -1;
-static int hf_gsm_a_gsm_400_bands_supported = -1;
-static int hf_gsm_a_gsm_400_assoc_radio_cap = -1;
-static int hf_gsm_a_gsm_850_assoc_radio_cap_present = -1;
-static int hf_gsm_a_gsm_850_assoc_radio_cap = -1;
-static int hf_gsm_a_gsm_1900_assoc_radio_cap_present = -1;
-static int hf_gsm_a_gsm_1900_assoc_radio_cap = -1;
-static int hf_gsm_a_cm3_A5_bits = -1;
-static int hf_gsm_a_umts_fdd_rat_cap = -1;
-static int hf_gsm_a_umts_384_mcps_tdd_rat_cap = -1;
-static int hf_gsm_a_cdma_2000_rat_cap = -1;
-static int hf_gsm_a_dtm_e_gprs_multi_slot_info_present = -1;
-static int hf_gsm_a_dtm_gprs_multi_slot_class = -1;
-static int hf_gsm_a_single_slot_dtm = -1;
-static int hf_gsm_a_dtm_egprs_multi_slot_class_present = -1;
-static int hf_gsm_a_dtm_egprs_multi_slot_class = -1;
-static int hf_gsm_a_single_band_support = -1;
-static int hf_gsm_a_gsm_band = -1;
-static int hf_gsm_a_gsm_750_assoc_radio_cap_present = -1;
-static int hf_gsm_a_gsm_750_assoc_radio_cap = -1;
-static int hf_gsm_a_umts_128_mcps_tdd_rat_cap = -1;
-static int hf_gsm_a_geran_feature_package_1 = -1;
-static int hf_gsm_a_ext_dtm_e_gprs_multi_slot_info_present = -1;
-static int hf_gsm_a_ext_dtm_gprs_multi_slot_class = -1;
-static int hf_gsm_a_ext_dtm_egprs_multi_slot_class = -1;
-static int hf_gsm_a_high_multislot_cap_present = -1;
-static int hf_gsm_a_high_multislot_cap = -1;
-static int hf_gsm_a_geran_iu_mode_support = -1;
-static int hf_gsm_a_geran_iu_mode_cap = -1;
-static int hf_gsm_a_geran_iu_mode_cap_length = -1;
-static int hf_gsm_a_flo_iu_cap = -1;
-static int hf_gsm_a_geran_feature_package_2 = -1;
-static int hf_gsm_a_gmsk_multislot_power_prof = -1;
-static int hf_gsm_a_8_psk_multislot_power_prof = -1;
-static int hf_gsm_a_t_gsm_400_band_info_present = -1;
-static int hf_gsm_a_t_gsm_400_bands_supported = -1;
-static int hf_gsm_a_t_gsm_400_assoc_radio_cap = -1;
-static int hf_gsm_a_t_gsm_900_assoc_radio_cap_present = -1;
-static int hf_gsm_a_t_gsm_900_assoc_radio_cap = -1;
-static int hf_gsm_a_downlink_adv_receiver_perf = -1;
-static int hf_gsm_a_dtm_enhancements_cap = -1;
-static int hf_gsm_a_dtm_e_gprs_high_multi_slot_info_present = -1;
-static int hf_gsm_a_dtm_gprs_high_multi_slot_class = -1;
-static int hf_gsm_a_offset_required = -1;
-static int hf_gsm_a_dtm_egprs_high_multi_slot_class_present = -1;
-static int hf_gsm_a_dtm_egprs_high_multi_slot_class = -1;
-static int hf_gsm_a_repeated_acch_cap = -1;
-static int hf_gsm_a_gsm_710_assoc_radio_cap_present = -1;
-static int hf_gsm_a_gsm_710_assoc_radio_cap = -1;
-static int hf_gsm_a_t_gsm_810_assoc_radio_cap_present = -1;
-static int hf_gsm_a_t_gsm_810_assoc_radio_cap = -1;
-static int hf_gsm_a_ciphering_mode_setting_cap = -1;
-static int hf_gsm_a_additional_positioning_caps = -1;
-static int hf_gsm_a_e_utra_fdd_support = -1;
-static int hf_gsm_a_e_utra_tdd_support = -1;
-static int hf_gsm_a_e_utra_meas_and_report_support = -1;
-static int hf_gsm_a_prio_based_resel_support = -1;
-static int hf_gsm_a_utra_csg_cells_reporting = -1;
-static int hf_gsm_a_vamos_level = -1;
-static int hf_gsm_a_tighter_cap = -1;
-static int hf_gsm_a_selective_ciph_down_sacch = -1;
-static int hf_gsm_a_cs_to_ps_srvcc_geran_to_utra = -1;
-static int hf_gsm_a_cs_to_ps_srvcc_geran_to_eutra = -1;
-static int hf_gsm_a_geran_network_sharing_support = -1;
-static int hf_gsm_a_eutra_wb_rsrq_support = -1;
-static int hf_gsm_a_er_band_support = -1;
-static int hf_gsm_a_utra_mfbi_support = -1;
-static int hf_gsm_a_eutra_mfbi_support = -1;
-static int hf_gsm_a_ext_tsc_set_cap_support = -1;
-static int hf_gsm_a_ext_earfcn_value_range = -1;
-
-static int hf_gsm_a_geo_loc_type_of_shape = -1;
-static int hf_gsm_a_geo_loc_sign_of_lat = -1;
-static int hf_gsm_a_geo_loc_deg_of_lat =-1;
-static int hf_gsm_a_geo_loc_deg_of_long =-1;
-static int hf_gsm_a_geo_loc_osm_uri =-1;
-static int hf_gsm_a_geo_loc_uncertainty_code = -1;
-static int hf_gsm_a_geo_loc_uncertainty_semi_major = -1;
-static int hf_gsm_a_geo_loc_uncertainty_semi_minor = -1;
-static int hf_gsm_a_geo_loc_orientation_of_major_axis = -1;
-static int hf_gsm_a_geo_loc_uncertainty_altitude = -1;
-static int hf_gsm_a_geo_loc_confidence = -1;
-static int hf_gsm_a_geo_loc_uncertainty_range = -1;
-static int hf_gsm_a_geo_loc_horizontal_confidence = -1;
-static int hf_gsm_a_geo_loc_horizontal_uncertainty_range = -1;
-static int hf_gsm_a_geo_loc_vertical_confidence = -1;
-static int hf_gsm_a_geo_loc_vertical_uncertainty_range = -1;
-static int hf_gsm_a_geo_loc_high_acc_uncertainty_alt = -1;
-static int hf_gsm_a_geo_loc_no_of_points = -1;
-static int hf_gsm_a_geo_loc_high_acc_deg_of_lat = -1;
-static int hf_gsm_a_geo_loc_high_acc_deg_of_long = -1;
-static int hf_gsm_a_geo_loc_high_acc_uncertainty_semi_major = -1;
-static int hf_gsm_a_geo_loc_high_acc_uncertainty_semi_minor = -1;
-static int hf_gsm_a_geo_loc_high_acc_alt = -1;
-static int hf_gsm_a_velocity_type = -1;
-static int hf_gsm_a_bearing = -1;
-static int hf_gsm_a_horizontal_speed = -1;
-static int hf_gsm_a_uncertainty_speed = -1;
-static int hf_gsm_a_h_uncertainty_speed = -1;
-static int hf_gsm_a_v_uncertainty_speed = -1;
-static int hf_gsm_a_vertical_speed = -1;
-static int hf_gsm_a_d = -1;
-static int hf_gsm_a_geo_loc_D = -1;
-static int hf_gsm_a_geo_loc_altitude = -1;
-static int hf_gsm_a_geo_loc_inner_radius = -1;
-static int hf_gsm_a_geo_loc_uncertainty_radius = -1;
-static int hf_gsm_a_geo_loc_offset_angle = -1;
-static int hf_gsm_a_geo_loc_included_angle = -1;
+static int proto_a_common;
+static int proto_3gpp;
+
+int gsm_a_tap;
+
+int hf_gsm_a_common_elem_id;
+static int hf_gsm_a_common_elem_id_f0;
+static int hf_gsm_a_l_ext;
+int hf_gsm_a_tmsi;
+static int hf_gsm_a_imei;
+static int hf_gsm_a_imeisv;
+
+static int hf_gsm_a_MSC_rev;
+static int hf_gsm_a_ES_IND;
+static int hf_gsm_a_A5_1_algorithm_sup;
+static int hf_gsm_a_RF_power_capability;
+static int hf_gsm_a_ps_sup_cap;
+static int hf_gsm_a_SS_screening_indicator;
+static int hf_gsm_a_SM_capability;
+static int hf_gsm_a_VBS_notification_rec;
+static int hf_gsm_a_VGCS_notification_rec;
+static int hf_gsm_a_FC_frequency_cap;
+static int hf_gsm_a_CM3;
+static int hf_gsm_a_LCS_VA_cap;
+static int hf_gsm_a_UCS2_treatment;
+static int hf_gsm_a_SoLSA;
+static int hf_gsm_a_CMSP;
+static int hf_gsm_a_A5_7_algorithm_sup;
+static int hf_gsm_a_A5_6_algorithm_sup;
+static int hf_gsm_a_A5_5_algorithm_sup;
+static int hf_gsm_a_A5_4_algorithm_sup;
+static int hf_gsm_a_A5_3_algorithm_sup;
+static int hf_gsm_a_A5_2_algorithm_sup;
+
+static int hf_gsm_a_odd_even_ind;
+static int hf_gsm_a_id_dig_1;
+static int hf_gsm_a_unused;
+static int hf_gsm_a_mobile_identity_type;
+static int hf_gsm_a_tmgi_mcc_mnc_ind;
+static int hf_gsm_a_mbs_ses_id_ind;
+static int hf_gsm_a_mbs_service_id;
+static int hf_gsm_a_mbs_session_id;
+static int hf_gsm_a_length;
+static int hf_gsm_a_element_value;
+int hf_gsm_a_extension;
+int hf_gsm_a_L3_protocol_discriminator;
+int hf_gsm_a_call_prio;
+int hf_gsm_a_skip_ind;
+int hf_gsm_a_spare_bits;
+int hf_gsm_a_lac;
+
+static int hf_gsm_a_spare_nibble;
+static int hf_gsm_a_type_of_ciph_alg;
+static int hf_gsm_a_att;
+static int hf_gsm_a_nmo_1;
+static int hf_gsm_a_nmo;
+static int hf_gsm_a_old_xid;
+static int hf_gsm_a_iov_ui;
+static int hf_gsm_a_ext_periodic_timers;
+static int hf_gsm_a_b7spare;
+int hf_gsm_a_b8spare;
+static int hf_gsm_a_multi_bnd_sup_fields;
+static int hf_gsm_a_pgsm_supported;
+static int hf_gsm_a_egsm_supported;
+static int hf_gsm_a_gsm1800_supported;
+static int hf_gsm_a_ass_radio_cap1;
+static int hf_gsm_a_ass_radio_cap2;
+static int hf_gsm_a_rsupport;
+static int hf_gsm_a_r_capabilities;
+static int hf_gsm_a_multislot_capabilities;
+static int hf_gsm_a_multislot_class;
+static int hf_gsm_a_ucs2_treatment;
+static int hf_gsm_a_extended_measurement_cap;
+static int hf_gsm_a_ms_measurement_capability;
+static int hf_gsm_a_sms_value;
+static int hf_gsm_a_sm_value;
+static int hf_gsm_a_key_seq;
+static int hf_gsm_a_ms_pos_method_cap_present;
+static int hf_gsm_a_ms_pos_method;
+static int hf_gsm_a_ms_assisted_e_otd;
+static int hf_gsm_a_ms_based_e_otd;
+static int hf_gsm_a_ms_assisted_gps;
+static int hf_gsm_a_ms_based_gps;
+static int hf_gsm_a_ms_conventional_gps;
+static int hf_gsm_a_ecsd_multi_slot_capability;
+static int hf_gsm_a_ecsd_multi_slot_class;
+static int hf_gsm_a_8_psk_struct_present;
+static int hf_gsm_a_8_psk_struct;
+static int hf_gsm_a_modulation_capability;
+static int hf_gsm_a_8_psk_rf_power_capability_1_present;
+static int hf_gsm_a_8_psk_rf_power_capability_1;
+static int hf_gsm_a_8_psk_rf_power_capability_2_present;
+static int hf_gsm_a_8_psk_rf_power_capability_2;
+static int hf_gsm_a_gsm_400_band_info_present;
+static int hf_gsm_a_gsm_400_bands_supported;
+static int hf_gsm_a_gsm_400_assoc_radio_cap;
+static int hf_gsm_a_gsm_850_assoc_radio_cap_present;
+static int hf_gsm_a_gsm_850_assoc_radio_cap;
+static int hf_gsm_a_gsm_1900_assoc_radio_cap_present;
+static int hf_gsm_a_gsm_1900_assoc_radio_cap;
+static int hf_gsm_a_cm3_A5_bits;
+static int hf_gsm_a_umts_fdd_rat_cap;
+static int hf_gsm_a_umts_384_mcps_tdd_rat_cap;
+static int hf_gsm_a_cdma_2000_rat_cap;
+static int hf_gsm_a_dtm_e_gprs_multi_slot_info_present;
+static int hf_gsm_a_dtm_gprs_multi_slot_class;
+static int hf_gsm_a_single_slot_dtm;
+static int hf_gsm_a_dtm_egprs_multi_slot_class_present;
+static int hf_gsm_a_dtm_egprs_multi_slot_class;
+static int hf_gsm_a_single_band_support;
+static int hf_gsm_a_gsm_band;
+static int hf_gsm_a_gsm_750_assoc_radio_cap_present;
+static int hf_gsm_a_gsm_750_assoc_radio_cap;
+static int hf_gsm_a_umts_128_mcps_tdd_rat_cap;
+static int hf_gsm_a_geran_feature_package_1;
+static int hf_gsm_a_ext_dtm_e_gprs_multi_slot_info_present;
+static int hf_gsm_a_ext_dtm_gprs_multi_slot_class;
+static int hf_gsm_a_ext_dtm_egprs_multi_slot_class;
+static int hf_gsm_a_high_multislot_cap_present;
+static int hf_gsm_a_high_multislot_cap;
+static int hf_gsm_a_geran_iu_mode_support;
+static int hf_gsm_a_geran_iu_mode_cap;
+static int hf_gsm_a_geran_iu_mode_cap_length;
+static int hf_gsm_a_flo_iu_cap;
+static int hf_gsm_a_geran_feature_package_2;
+static int hf_gsm_a_gmsk_multislot_power_prof;
+static int hf_gsm_a_8_psk_multislot_power_prof;
+static int hf_gsm_a_t_gsm_400_band_info_present;
+static int hf_gsm_a_t_gsm_400_bands_supported;
+static int hf_gsm_a_t_gsm_400_assoc_radio_cap;
+static int hf_gsm_a_t_gsm_900_assoc_radio_cap_present;
+static int hf_gsm_a_t_gsm_900_assoc_radio_cap;
+static int hf_gsm_a_downlink_adv_receiver_perf;
+static int hf_gsm_a_dtm_enhancements_cap;
+static int hf_gsm_a_dtm_e_gprs_high_multi_slot_info_present;
+static int hf_gsm_a_dtm_gprs_high_multi_slot_class;
+static int hf_gsm_a_offset_required;
+static int hf_gsm_a_dtm_egprs_high_multi_slot_class_present;
+static int hf_gsm_a_dtm_egprs_high_multi_slot_class;
+static int hf_gsm_a_repeated_acch_cap;
+static int hf_gsm_a_gsm_710_assoc_radio_cap_present;
+static int hf_gsm_a_gsm_710_assoc_radio_cap;
+static int hf_gsm_a_t_gsm_810_assoc_radio_cap_present;
+static int hf_gsm_a_t_gsm_810_assoc_radio_cap;
+static int hf_gsm_a_ciphering_mode_setting_cap;
+static int hf_gsm_a_additional_positioning_caps;
+static int hf_gsm_a_e_utra_fdd_support;
+static int hf_gsm_a_e_utra_tdd_support;
+static int hf_gsm_a_e_utra_meas_and_report_support;
+static int hf_gsm_a_prio_based_resel_support;
+static int hf_gsm_a_utra_csg_cells_reporting;
+static int hf_gsm_a_vamos_level;
+static int hf_gsm_a_tighter_cap;
+static int hf_gsm_a_selective_ciph_down_sacch;
+static int hf_gsm_a_cs_to_ps_srvcc_geran_to_utra;
+static int hf_gsm_a_cs_to_ps_srvcc_geran_to_eutra;
+static int hf_gsm_a_geran_network_sharing_support;
+static int hf_gsm_a_eutra_wb_rsrq_support;
+static int hf_gsm_a_er_band_support;
+static int hf_gsm_a_utra_mfbi_support;
+static int hf_gsm_a_eutra_mfbi_support;
+static int hf_gsm_a_ext_tsc_set_cap_support;
+static int hf_gsm_a_ext_earfcn_value_range;
+
+static int hf_gsm_a_geo_loc_type_of_shape;
+static int hf_gsm_a_geo_loc_sign_of_lat;
+static int hf_gsm_a_geo_loc_deg_of_lat;
+static int hf_gsm_a_geo_loc_deg_of_long;
+static int hf_gsm_a_geo_loc_osm_uri;
+static int hf_gsm_a_geo_loc_uncertainty_code;
+static int hf_gsm_a_geo_loc_uncertainty_semi_major;
+static int hf_gsm_a_geo_loc_uncertainty_semi_minor;
+static int hf_gsm_a_geo_loc_orientation_of_major_axis;
+static int hf_gsm_a_geo_loc_uncertainty_altitude;
+static int hf_gsm_a_geo_loc_confidence;
+static int hf_gsm_a_geo_loc_uncertainty_range;
+static int hf_gsm_a_geo_loc_horizontal_confidence;
+static int hf_gsm_a_geo_loc_horizontal_uncertainty_range;
+static int hf_gsm_a_geo_loc_vertical_confidence;
+static int hf_gsm_a_geo_loc_vertical_uncertainty_range;
+static int hf_gsm_a_geo_loc_high_acc_uncertainty_alt;
+static int hf_gsm_a_geo_loc_no_of_points;
+static int hf_gsm_a_geo_loc_high_acc_deg_of_lat;
+static int hf_gsm_a_geo_loc_high_acc_deg_of_long;
+static int hf_gsm_a_geo_loc_high_acc_uncertainty_semi_major;
+static int hf_gsm_a_geo_loc_high_acc_uncertainty_semi_minor;
+static int hf_gsm_a_geo_loc_high_acc_alt;
+static int hf_gsm_a_velocity_type;
+static int hf_gsm_a_bearing;
+static int hf_gsm_a_horizontal_speed;
+static int hf_gsm_a_uncertainty_speed;
+static int hf_gsm_a_h_uncertainty_speed;
+static int hf_gsm_a_v_uncertainty_speed;
+static int hf_gsm_a_vertical_speed;
+static int hf_gsm_a_d;
+static int hf_gsm_a_geo_loc_D;
+static int hf_gsm_a_geo_loc_altitude;
+static int hf_gsm_a_geo_loc_inner_radius;
+static int hf_gsm_a_geo_loc_uncertainty_radius;
+static int hf_gsm_a_geo_loc_offset_angle;
+static int hf_gsm_a_geo_loc_included_angle;
/* Generated from convert_proto_tree_add_text.pl */
-static int hf_gsm_a_filler = -1;
-static int hf_gsm_a_identity_digit1 = -1;
-static int hf_gsm_a_group_call_reference = -1;
-static int hf_gsm_a_service_flag = -1;
-static int hf_gsm_a_af_acknowledgement = -1;
-static int hf_gsm_a_call_priority = -1;
-static int hf_gsm_a_ciphering_info = -1;
-static int hf_gsm_a_sapi = -1;
+static int hf_gsm_a_filler;
+static int hf_gsm_a_identity_digit1;
+static int hf_gsm_a_group_call_reference;
+static int hf_gsm_a_service_flag;
+static int hf_gsm_a_af_acknowledgement;
+static int hf_gsm_a_call_priority;
+static int hf_gsm_a_ciphering_info;
+static int hf_gsm_a_sapi;
/* Inter protocol hf */
-int hf_3gpp_tmsi = -1;
+int hf_3gpp_tmsi;
-static int ett_gsm_a_plmn = -1;
-static int ett_gsm_a_poly_pnt = -1;
+static int ett_gsm_a_plmn;
+static int ett_gsm_a_poly_pnt;
-static expert_field ei_gsm_a_extraneous_data = EI_INIT;
-static expert_field ei_gsm_a_unknown_element = EI_INIT;
-static expert_field ei_gsm_a_unknown_pdu_type = EI_INIT;
-static expert_field ei_gsm_a_no_element_dissector = EI_INIT;
-static expert_field ei_gsm_a_format_not_supported = EI_INIT;
-static expert_field ei_gsm_a_mobile_identity_type = EI_INIT;
-static expert_field ei_gsm_a_ie_length_too_short = EI_INIT;
+static expert_field ei_gsm_a_extraneous_data;
+static expert_field ei_gsm_a_unknown_element;
+static expert_field ei_gsm_a_unknown_pdu_type;
+static expert_field ei_gsm_a_no_element_dissector;
+static expert_field ei_gsm_a_format_not_supported;
+static expert_field ei_gsm_a_mobile_identity_type;
+static expert_field ei_gsm_a_ie_length_too_short;
-sccp_assoc_info_t* sccp_assoc = NULL;
+sccp_assoc_info_t* sccp_assoc;
-#define NUM_GSM_COMMON_ELEM (sizeof(gsm_common_elem_strings)/sizeof(value_string))
-gint ett_gsm_common_elem[NUM_GSM_COMMON_ELEM];
+#define NUM_GSM_COMMON_ELEM array_length(gsm_common_elem_strings)
+int ett_gsm_common_elem[NUM_GSM_COMMON_ELEM];
#define ELLIPSOID_POINT 0
@@ -838,22 +841,22 @@ static const value_string uncertainty_range[] = {
{ 0, NULL }
};
-typedef guint16 (**elem_func_hander)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
+typedef uint16_t (**elem_func_hander)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len);
int
dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) {
proto_item *lat_item, *long_item, *major_item, *minor_item, *alt_item, *uncer_item, *loc_uri_item;
/*proto_tree *subtree; */
- guint32 type_of_shape;
+ uint32_t type_of_shape;
int offset = 0;
int length;
- guint8 value;
- guint32 uvalue32;
- gint32 svalue32;
- gchar *deg_lat_str;
- gchar *deg_lon_str;
- gchar *osm_uri;
+ uint8_t value;
+ uint32_t uvalue32;
+ int32_t svalue32;
+ char *deg_lat_str;
+ char *deg_lon_str;
+ char *osm_uri;
int loc_offset;
/*subtree = proto_item_add_subtree(item, ett_gsm_a_geo_desc);*/
@@ -909,7 +912,7 @@ dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
if (length < 8)
return offset;
/* Uncertainty code */
- value = tvb_get_guint8(tvb,offset)&0x7f;
+ value = tvb_get_uint8(tvb,offset)&0x7f;
uncer_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_code, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text(uncer_item, " (%.1f m)", 10 * (pow(1.1, (double)value) - 1));
}else if (type_of_shape == ELLIPSOID_POINT_WITH_UNCERT_ELLIPSE) {
@@ -917,14 +920,14 @@ dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
/* Uncertainty semi-major octet 10
* To convert to metres 10*(((1.1)^X)-1)
*/
- value = tvb_get_guint8(tvb,offset) & 0x7f;
+ value = tvb_get_uint8(tvb,offset) & 0x7f;
major_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_semi_major, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text(major_item, " (%.1f m)", 10 * (pow(1.1, (double)value) - 1));
offset++;
/* Uncertainty semi-minor Octet 11
* To convert to metres 10*(((1.1)^X)-1)
*/
- value = tvb_get_guint8(tvb,offset)&0x7f;
+ value = tvb_get_uint8(tvb,offset)&0x7f;
minor_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_semi_minor, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text(minor_item, " (%.1f m)", 10 * (pow(1.1, (double)value) - 1));
offset++;
@@ -953,14 +956,14 @@ dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
/* Uncertainty semi-major octet 10
* To convert to metres 10*(((1.1)^X)-1)
*/
- value = tvb_get_guint8(tvb,offset)&0x7f;
+ value = tvb_get_uint8(tvb,offset)&0x7f;
major_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_semi_major, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text(major_item, " (%.1f m)", 10 * (pow(1.1, (double)value) - 1));
offset++;
/* Uncertainty semi-minor Octet 11
* To convert to metres 10*(((1.1)^X)-1)
*/
- value = tvb_get_guint8(tvb,offset)&0x7f;
+ value = tvb_get_uint8(tvb,offset)&0x7f;
minor_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_semi_minor, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text(minor_item, " (%.1f m)", 10 * (pow(1.1, (double)value) - 1));
offset++;
@@ -968,13 +971,13 @@ dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
* allowed value from 0-179 to convert
* to actual degrees multiply by 2.
*/
- value = tvb_get_guint8(tvb,offset)&0x7f;
+ value = tvb_get_uint8(tvb,offset)&0x7f;
proto_tree_add_uint(tree, hf_gsm_a_geo_loc_orientation_of_major_axis, tvb, offset, 1, value*2);
offset++;
/* Uncertainty Altitude 13
* to convert to metres 45*(((1.025)^X)-1)
*/
- value = tvb_get_guint8(tvb,offset)&0x7f;
+ value = tvb_get_uint8(tvb,offset)&0x7f;
alt_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_uncertainty_altitude, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text(alt_item, " (%.1f m)", 45 * (pow(1.025, (double)value) - 1));
offset++;
@@ -1007,13 +1010,13 @@ dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
case POLYGON: /* Polygon */
{
/* Number of points */
- guint32 no_of_points;
- guint point_no = 0;
+ uint32_t no_of_points;
+ unsigned point_no = 0;
proto_tree* sub_tree;
proto_item *ti;
proto_tree_add_item_ret_uint(tree, hf_gsm_a_geo_loc_no_of_points, tvb, 0, 1, ENC_BIG_ENDIAN, &no_of_points);
- /* offset increased with 1 after reading of shape abowe*/
+ /* offset increased with 1 after reading of shape above */
while (no_of_points > 0) {
point_no++;
sub_tree = proto_tree_add_subtree_format(tree, tvb, offset, 6,
@@ -1131,8 +1134,8 @@ dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
}
offset++;
- /* High accuracy uncertenty altitude */
- value = tvb_get_guint8(tvb, offset) & 0x7f;
+ /* High accuracy uncertainty altitude */
+ value = tvb_get_uint8(tvb, offset) & 0x7f;
alt_item = proto_tree_add_item(tree, hf_gsm_a_geo_loc_high_acc_uncertainty_alt, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text(alt_item, " (%.1f m)", 45 * (pow(1.025, (double)value) - 1));
offset++;
@@ -1181,12 +1184,12 @@ static const true_false_string gsm_a_dir_of_ver_speed_vals = {
"Upward"
};
-guint16
-dissect_description_of_velocity(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+uint16_t
+dissect_description_of_velocity(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
{
proto_item *velocity_item;
- guint32 curr_offset;
- guint32 velocity_type, uncertainty_speed = 0;
+ uint32_t curr_offset;
+ uint32_t velocity_type, uncertainty_speed = 0;
curr_offset = offset;
@@ -1427,18 +1430,18 @@ static int get_hf_elem_id(int pdu_type)
/*
* Type Length Value (TLV) element dissector
*/
-guint16 elem_tlv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len _U_, const gchar *name_add)
+uint16_t elem_tlv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint8_t iei, int pdu_type, int idx, uint32_t offset, unsigned len _U_, const char *name_add)
{
- guint8 oct;
- guint16 parm_len;
- guint8 lengt_length = 1;
- guint16 consumed;
- guint32 curr_offset;
+ uint8_t oct;
+ uint16_t parm_len;
+ uint8_t lengt_length = 1;
+ uint16_t consumed;
+ uint32_t curr_offset;
proto_tree *subtree;
proto_item *item;
value_string_ext elem_names_ext;
- gint *elem_ett;
- const gchar *elem_name;
+ int *elem_ett;
+ const char *elem_name;
elem_func_hander elem_funcs;
curr_offset = offset;
@@ -1446,10 +1449,10 @@ guint16 elem_tlv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei
SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type);
- oct = tvb_get_guint8(tvb, curr_offset);
+ oct = tvb_get_uint8(tvb, curr_offset);
if (oct == iei) {
- parm_len = tvb_get_guint8(tvb, curr_offset + 1);
+ parm_len = tvb_get_uint8(tvb, curr_offset + 1);
elem_name = try_val_to_str_ext(idx, &elem_names_ext);
@@ -1477,13 +1480,13 @@ guint16 elem_tlv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei
{
proto_tree_add_item(subtree, hf_gsm_a_element_value, tvb, curr_offset + 1 + lengt_length, parm_len, ENC_NA);
/* See ASSERT above */
- consumed = (guint8)parm_len;
+ consumed = (uint8_t)parm_len;
}
else
{
- gchar *a_add_string;
+ char *a_add_string;
- a_add_string = (gchar *)wmem_alloc(pinfo->pool, 1024);
+ a_add_string = (char *)wmem_alloc(pinfo->pool, 1024);
a_add_string[0] = '\0';
consumed =
(*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 2,
@@ -1510,18 +1513,18 @@ guint16 elem_tlv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei
* octet 2 0/1 ext length
* octet 2a length
*/
-guint16 elem_telv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len _U_, const gchar *name_add)
+uint16_t elem_telv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint8_t iei, int pdu_type, int idx, uint32_t offset, unsigned len _U_, const char *name_add)
{
- guint8 oct;
- guint16 parm_len;
- guint8 lengt_length = 1;
- guint16 consumed;
- guint32 curr_offset;
+ uint8_t oct;
+ uint16_t parm_len;
+ uint8_t lengt_length = 1;
+ uint16_t consumed;
+ uint32_t curr_offset;
proto_tree *subtree;
proto_item *item;
value_string_ext elem_names_ext;
- gint *elem_ett;
- const gchar *elem_name;
+ int *elem_ett;
+ const char *elem_name;
elem_func_hander elem_funcs;
curr_offset = offset;
@@ -1529,10 +1532,10 @@ guint16 elem_telv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 ie
SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type);
- oct = tvb_get_guint8(tvb, curr_offset);
+ oct = tvb_get_uint8(tvb, curr_offset);
if (oct == iei) {
- parm_len = tvb_get_guint8(tvb, curr_offset + 1);
+ parm_len = tvb_get_uint8(tvb, curr_offset + 1);
if ((parm_len&0x80) == 0) {
/* length in 2 octets */
parm_len = tvb_get_ntohs(tvb, curr_offset + 1);
@@ -1573,9 +1576,9 @@ guint16 elem_telv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 ie
}
else
{
- gchar *a_add_string;
+ char *a_add_string;
- a_add_string = (gchar*)wmem_alloc(pinfo->pool, 1024);
+ a_add_string = (char*)wmem_alloc(pinfo->pool, 1024);
a_add_string[0] = '\0';
consumed =
(*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 1 + lengt_length,
@@ -1600,17 +1603,17 @@ guint16 elem_telv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 ie
* information elements of format LV-E or TLV-E with value part consisting of zero,
* one or more octets and a maximum of 65535 octets (type 6). This category is used in EPS only.
*/
-guint16 elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len _U_, const gchar *name_add)
+uint16_t elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint8_t iei, int pdu_type, int idx, uint32_t offset, unsigned len _U_, const char *name_add)
{
- guint8 oct;
- guint16 parm_len;
- guint16 consumed;
- guint32 curr_offset;
+ uint8_t oct;
+ uint16_t parm_len;
+ uint16_t consumed;
+ uint32_t curr_offset;
proto_tree *subtree;
proto_item *item;
value_string_ext elem_names_ext;
- gint *elem_ett;
- const gchar *elem_name;
+ int *elem_ett;
+ const char *elem_name;
elem_func_hander elem_funcs;
curr_offset = offset;
@@ -1618,7 +1621,7 @@ guint16 elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 i
SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type);
- oct = tvb_get_guint8(tvb, curr_offset);
+ oct = tvb_get_uint8(tvb, curr_offset);
if (oct == iei) {
parm_len = tvb_get_ntohs(tvb, curr_offset + 1);
@@ -1653,9 +1656,9 @@ guint16 elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 i
}
else
{
- gchar *a_add_string;
+ char *a_add_string;
- a_add_string = (gchar*)wmem_alloc(pinfo->pool, 1024);
+ a_add_string = (char*)wmem_alloc(pinfo->pool, 1024);
a_add_string[0] = '\0';
consumed =
(*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 1 + 2,
@@ -1680,16 +1683,16 @@ guint16 elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 i
* Length cannot be used in these functions, big problem if a element dissector
* is not defined for these.
*/
-guint16 elem_tv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
+uint16_t elem_tv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint8_t iei, int pdu_type, int idx, uint32_t offset, const char *name_add)
{
- guint8 oct;
- guint16 consumed;
- guint32 curr_offset;
+ uint8_t oct;
+ uint16_t consumed;
+ uint32_t curr_offset;
proto_tree *subtree;
proto_item *item;
value_string_ext elem_names_ext;
- gint *elem_ett;
- const gchar *elem_name;
+ int *elem_ett;
+ const char *elem_name;
elem_func_hander elem_funcs;
curr_offset = offset;
@@ -1697,7 +1700,7 @@ guint16 elem_tv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei,
SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type);
- oct = tvb_get_guint8(tvb, curr_offset);
+ oct = tvb_get_uint8(tvb, curr_offset);
if (oct == iei)
{
@@ -1727,9 +1730,9 @@ guint16 elem_tv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei,
}
else
{
- gchar *a_add_string;
+ char *a_add_string;
- a_add_string = (gchar*)wmem_alloc(pinfo->pool, 1024);
+ a_add_string = (char*)wmem_alloc(pinfo->pool, 1024);
a_add_string[0] = '\0';
consumed = (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 1, -1, a_add_string, 1024);
@@ -1754,16 +1757,16 @@ guint16 elem_tv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei,
* Length cannot be used in these functions, big problem if a element dissector
* is not defined for these.
*/
-guint16 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
+uint16_t elem_tv_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint8_t iei, int pdu_type, int idx, uint32_t offset, const char *name_add)
{
- guint8 oct;
- guint16 consumed;
- guint32 curr_offset;
+ uint8_t oct;
+ uint16_t consumed;
+ uint32_t curr_offset;
proto_tree *subtree;
proto_item *item;
value_string_ext elem_names_ext;
- gint *elem_ett;
- const gchar *elem_name;
+ int *elem_ett;
+ const char *elem_name;
elem_func_hander elem_funcs;
curr_offset = offset;
@@ -1771,7 +1774,7 @@ guint16 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint
SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type);
- oct = tvb_get_guint8(tvb, curr_offset);
+ oct = tvb_get_uint8(tvb, curr_offset);
if ((oct & 0xf0) == (iei & 0xf0))
{
@@ -1800,9 +1803,9 @@ guint16 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint
}
else
{
- gchar *a_add_string;
+ char *a_add_string;
- a_add_string = (gchar*)wmem_alloc(pinfo->pool, 1024);
+ a_add_string = (char*)wmem_alloc(pinfo->pool, 1024);
a_add_string[0] = '\0';
consumed = (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset, RIGHT_NIBBLE, a_add_string, 1024);
@@ -1821,13 +1824,13 @@ guint16 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint
/*
* Type (T) element dissector
*/
-guint16 elem_t(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
+uint16_t elem_t(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint8_t iei, int pdu_type, int idx, uint32_t offset, const char *name_add)
{
- guint8 oct;
- guint32 curr_offset;
- guint16 consumed;
+ uint8_t oct;
+ uint32_t curr_offset;
+ uint16_t consumed;
value_string_ext elem_names_ext;
- gint *elem_ett;
+ int *elem_ett;
elem_func_hander elem_funcs;
curr_offset = offset;
@@ -1838,7 +1841,7 @@ guint16 elem_t(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei,
(void)elem_ett;
(void)elem_funcs;
- oct = tvb_get_guint8(tvb, curr_offset);
+ oct = tvb_get_uint8(tvb, curr_offset);
if (oct == iei)
{
@@ -1858,17 +1861,17 @@ guint16 elem_t(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei,
/*
* Length Value (LV) element dissector
*/
-guint16
-elem_lv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint len _U_, const gchar *name_add)
+uint16_t
+elem_lv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int pdu_type, int idx, uint32_t offset, unsigned len _U_, const char *name_add)
{
- guint8 parm_len;
- guint16 consumed;
- guint32 curr_offset;
+ uint8_t parm_len;
+ uint16_t consumed;
+ uint32_t curr_offset;
proto_tree *subtree;
proto_item *item;
value_string_ext elem_names_ext;
- gint *elem_ett;
- const gchar *elem_name;
+ int *elem_ett;
+ const char *elem_name;
elem_func_hander elem_funcs;
curr_offset = offset;
@@ -1876,7 +1879,7 @@ elem_lv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int
SET_ELEM_VARS(pdu_type, elem_names_ext, elem_ett, elem_funcs, &ei_gsm_a_unknown_pdu_type);
- parm_len = tvb_get_guint8(tvb, curr_offset);
+ parm_len = tvb_get_uint8(tvb, curr_offset);
elem_name = try_val_to_str_ext(idx, &elem_names_ext);
@@ -1904,9 +1907,9 @@ elem_lv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int
}
else
{
- gchar *a_add_string;
+ char *a_add_string;
- a_add_string = (gchar*)wmem_alloc(pinfo->pool, 1024);
+ a_add_string = (char*)wmem_alloc(pinfo->pool, 1024);
a_add_string[0] = '\0';
consumed =
(*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 1,
@@ -1925,16 +1928,16 @@ elem_lv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int
/*
* Length Value Extended(LV-E) element dissector
*/
-guint16 elem_lv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint len _U_, const gchar *name_add)
+uint16_t elem_lv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int pdu_type, int idx, uint32_t offset, unsigned len _U_, const char *name_add)
{
- guint16 parm_len;
- guint16 consumed;
- guint32 curr_offset;
+ uint16_t parm_len;
+ uint16_t consumed;
+ uint32_t curr_offset;
proto_tree *subtree;
proto_item *item;
value_string_ext elem_names_ext;
- gint *elem_ett;
- const gchar *elem_name;
+ int *elem_ett;
+ const char *elem_name;
elem_func_hander elem_funcs;
curr_offset = offset;
@@ -1970,9 +1973,9 @@ guint16 elem_lv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_
}
else
{
- gchar *a_add_string;
+ char *a_add_string;
- a_add_string = (gchar*)wmem_alloc(pinfo->pool, 1024);
+ a_add_string = (char*)wmem_alloc(pinfo->pool, 1024);
a_add_string[0] = '\0';
consumed =
(*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset + 2,
@@ -1993,15 +1996,15 @@ guint16 elem_lv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_
* Length cannot be used in these functions, big problem if a element dissector
* is not defined for these.
*/
-guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
+uint16_t elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int pdu_type, int idx, uint32_t offset, const char *name_add)
{
- guint16 consumed;
- guint32 curr_offset;
+ uint16_t consumed;
+ uint32_t curr_offset;
proto_tree *subtree;
proto_item *item;
value_string_ext elem_names_ext;
- gint *elem_ett;
- const gchar *elem_name;
+ int *elem_ett;
+ const char *elem_name;
elem_func_hander elem_funcs;
curr_offset = offset;
@@ -2020,7 +2023,7 @@ guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_typ
}
else
{
- gchar *a_add_string;
+ char *a_add_string;
subtree =
proto_tree_add_subtree_format(tree,
@@ -2028,7 +2031,7 @@ guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_typ
elem_ett[idx], &item, "%s%s", elem_name,
(name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
- a_add_string= (gchar*)wmem_alloc(pinfo->pool, 1024);
+ a_add_string= (char*)wmem_alloc(pinfo->pool, 1024);
a_add_string[0] = '\0';
consumed = (*elem_funcs[idx])(tvb, subtree, pinfo, curr_offset, -1, a_add_string, 1024);
if (a_add_string[0] != '\0')
@@ -2048,17 +2051,17 @@ guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_typ
* This is expected to be used right nibble first, as the tables of 24.008.
*/
-guint16 elem_v_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint32 nibble)
+uint16_t elem_v_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int pdu_type, int idx, uint32_t offset, uint32_t nibble)
{
- guint16 consumed = 1;
- guint32 curr_offset;
+ uint16_t consumed = 1;
+ uint32_t curr_offset;
proto_tree *subtree;
proto_item *item;
value_string_ext elem_names_ext;
- gint *elem_ett;
+ int *elem_ett;
elem_fcn *elem_funcs;
- gchar *a_add_string;
- const gchar *elem_name;
+ char *a_add_string;
+ const char *elem_name;
curr_offset = offset;
@@ -2075,7 +2078,7 @@ guint16 elem_v_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint p
subtree = proto_tree_add_subtree(tree, tvb, curr_offset, 0, elem_ett[idx], &item, elem_name);
- a_add_string= (gchar*)wmem_alloc(pinfo->pool, 1024);
+ a_add_string= (char*)wmem_alloc(pinfo->pool, 1024);
a_add_string[0] = '\0';
if (elem_funcs[idx] == NULL)
@@ -2110,10 +2113,10 @@ static dgt_set_t Dgt1_9_bcd = {
/* 3GPP TS 24.008
* [3] 10.5.1.1 Cell Identity
*/
-guint16
-de_cell_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len)
+uint16_t
+de_cell_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len)
{
- guint32 curr_offset;
+ uint32_t curr_offset;
curr_offset = offset;
@@ -2153,10 +2156,10 @@ static const value_string gsm_a_key_seq_vals[] = {
{ 0, NULL }
};
-static guint16
-de_ciph_key_seq_num( tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+static uint16_t
+de_ciph_key_seq_num( tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset, bit_offset;
+ uint32_t curr_offset, bit_offset;
curr_offset = offset;
@@ -2177,14 +2180,14 @@ de_ciph_key_seq_num( tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gu
* [3] 10.5.1.3
*/
-guint16
-de_lai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+uint16_t
+de_lai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
{
- guint16 value;
- guint32 curr_offset;
+ uint16_t value;
+ uint32_t curr_offset;
proto_tree *subtree;
proto_item *item;
- gchar *mcc_mnc_str;
+ char *mcc_mnc_str;
curr_offset = offset;
@@ -2192,7 +2195,7 @@ de_lai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
tvb, curr_offset, 5, ett_gsm_common_elem[DE_LAI], &item,
val_to_str_ext_const(DE_LAI, &gsm_common_elem_strings_ext, ""));
- mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, subtree, curr_offset, E212_LAI, TRUE);
+ mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, subtree, curr_offset, E212_LAI, true);
curr_offset += 3;
@@ -2214,19 +2217,19 @@ de_lai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
* 3GPP TS 24.008 version 7.8.0 Release 7
*/
-guint16
-de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len)
+uint16_t
+de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len)
{
- guint8 oct;
- guint32 curr_offset;
- guint32 value;
- gboolean odd;
- const gchar *digit_str;
+ uint8_t oct;
+ uint32_t curr_offset;
+ uint32_t value;
+ bool odd;
+ const char *digit_str;
proto_item* ti;
curr_offset = offset;
- oct = tvb_get_guint8(tvb, curr_offset);
+ oct = tvb_get_uint8(tvb, curr_offset);
switch (oct & 0x07)
{
@@ -2262,7 +2265,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
if((oct & 0x07) == 3){
/* imeisv */
- digit_str = tvb_bcd_dig_to_str(pinfo->pool, tvb ,curr_offset , len - (curr_offset - offset), NULL, TRUE);
+ digit_str = tvb_bcd_dig_to_str(pinfo->pool, tvb ,curr_offset , len - (curr_offset - offset), NULL, true);
proto_tree_add_string_format(tree,
hf_gsm_a_imeisv,
tvb, curr_offset, len - (curr_offset - offset),
@@ -2270,7 +2273,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
"BCD Digits: %s",
digit_str);
}else{
- digit_str = dissect_e212_imsi(tvb, pinfo, tree, curr_offset, len - (curr_offset - offset), TRUE);
+ digit_str = dissect_e212_imsi(tvb, pinfo, tree, curr_offset, len - (curr_offset - offset), true);
}
if (sccp_assoc && ! sccp_assoc->calling_party) {
@@ -2302,7 +2305,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
if (curr_offset - offset >= len) /* Sanity check */
return (curr_offset - offset);
- digit_str = tvb_bcd_dig_to_str(pinfo->pool, tvb, curr_offset, len - (curr_offset - offset), NULL, TRUE);
+ digit_str = tvb_bcd_dig_to_str(pinfo->pool, tvb, curr_offset, len - (curr_offset - offset), NULL, true);
proto_tree_add_string_format(tree,
hf_gsm_a_imei,
@@ -2350,7 +2353,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
/* MCC/MNC*/
/* MCC, Mobile country code (octet 6a, octet 6b bits 1 to 4)*/
/* MNC, Mobile network code (octet 6b bits 5 to 8, octet 6c) */
- curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, TRUE);
+ curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, true);
}
if ((oct&0x20) == 0x20) {
/* MBMS Session Identity (octet 7)
@@ -2382,10 +2385,10 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
/*
* [3] 10.5.1.5
*/
-guint16
-de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+uint16_t
+de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
+ uint32_t curr_offset;
proto_tree *subtree;
curr_offset = offset;
@@ -2416,10 +2419,10 @@ de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offs
* [3] 10.5.1.6 Mobile Station Classmark 2
* 3GPP TS 24.008 version 7.8.0 Release 7
*/
-guint16
-de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+uint16_t
+de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
+ uint32_t curr_offset;
curr_offset = offset;
proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
@@ -2493,27 +2496,27 @@ de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset,
return len; \
}
-guint16
-de_ms_cm_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+uint16_t
+de_ms_cm_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
- guint32 bit_offset; /* Offset in bits */
- guint8 length;
+ uint32_t curr_offset;
+ uint32_t bit_offset; /* Offset in bits */
+ uint8_t length;
proto_tree *subtree;
proto_item *item;
- gint32 bits_left;
- guint32 target_bit_offset, old_bit_offset;
- guint64 multi_bnd_sup_fields, rsupport, multislotCapability;
- guint64 msMeasurementCapability, msPosMethodCapPresent;
- guint64 ecsdMultiSlotCapability, eightPskStructPresent, eightPskStructRfPowerCapPresent;
- guint64 gsm400BandInfoPresent, gsm850AssocRadioCapabilityPresent;
- guint64 gsm1900AssocRadioCapabilityPresent, dtmEGprsMultiSlotInfoPresent;
- guint64 dtmEgprsMultiSlotClassPresent, singleBandSupport;
- guint64 gsm750AssocRadioCapabilityPresent, extDtmEGprsMultiSlotInfoPresent;
- guint64 highMultislotCapPresent, geranIuModeSupport;
- guint64 tGsm400BandInfoPresent, tGsm900AssocRadioCapabilityPresent, dtmEGprsHighMultiSlotInfoPresent;
- guint64 dtmEgprsHighMultiSlotClassPresent, gsm710AssocRadioCapabilityPresent;
- guint64 tGsm810AssocRadioCapabilityPresent;
+ int32_t bits_left;
+ uint32_t target_bit_offset, old_bit_offset;
+ uint64_t multi_bnd_sup_fields, rsupport, multislotCapability;
+ uint64_t msMeasurementCapability, msPosMethodCapPresent;
+ uint64_t ecsdMultiSlotCapability, eightPskStructPresent, eightPskStructRfPowerCapPresent;
+ uint64_t gsm400BandInfoPresent, gsm850AssocRadioCapabilityPresent;
+ uint64_t gsm1900AssocRadioCapabilityPresent, dtmEGprsMultiSlotInfoPresent;
+ uint64_t dtmEgprsMultiSlotClassPresent, singleBandSupport;
+ uint64_t gsm750AssocRadioCapabilityPresent, extDtmEGprsMultiSlotInfoPresent;
+ uint64_t highMultislotCapPresent, geranIuModeSupport;
+ uint64_t tGsm400BandInfoPresent, tGsm900AssocRadioCapabilityPresent, dtmEGprsHighMultiSlotInfoPresent;
+ uint64_t dtmEgprsHighMultiSlotClassPresent, gsm710AssocRadioCapabilityPresent;
+ uint64_t tGsm810AssocRadioCapabilityPresent;
curr_offset = offset;
@@ -2702,9 +2705,9 @@ de_ms_cm_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset,
if (eightPskStructPresent == 1)
{
- /* At lest Modulation Capability and cap1,cap2 presens indicators is present */
- guint8 psk_struct_len = 3;
- guint32 tmp_bit_offset = bit_offset;
+ /* At lesst Modulation Capability and cap1,cap2 present indicators are present */
+ uint8_t psk_struct_len = 3;
+ uint32_t tmp_bit_offset = bit_offset;
/* Check if Power Capability 1 is present */
tmp_bit_offset++;
@@ -2745,7 +2748,7 @@ de_ms_cm_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset,
proto_tree_add_bits_item(subtree, hf_gsm_a_8_psk_rf_power_capability_2, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
bit_offset = bit_offset + 2;
}
- length = (guint8)((bit_offset - old_bit_offset)>>3);
+ length = (uint8_t)((bit_offset - old_bit_offset)>>3);
if ((bit_offset - old_bit_offset) & 0x07)
length++;
proto_item_set_len(item, length);
@@ -3274,10 +3277,10 @@ de_ms_cm_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset,
/*
* [3] 10.5.1.8
*/
-guint16 de_spare_nibble(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+uint16_t de_spare_nibble(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
- gint bit_offset;
+ uint32_t curr_offset;
+ int bit_offset;
curr_offset = offset;
if (RIGHT_NIBBLE == len)
@@ -3308,10 +3311,10 @@ static const value_string gsm_a_call_priority_vals[] = {
{ 0, NULL }
};
-guint16
-de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+uint16_t
+de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset = offset;
+ uint32_t curr_offset = offset;
proto_tree_add_item(tree, hf_gsm_a_group_call_reference, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_service_flag, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
@@ -3340,10 +3343,10 @@ static const value_string gsm_a_sapi_vals[] = {
{ 0, NULL }
};
-static guint16
-de_pd_sapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+static uint16_t
+de_pd_sapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
+ uint32_t curr_offset;
proto_tree *subtree;
curr_offset = offset;
@@ -3381,10 +3384,10 @@ static const value_string gsm_a_call_prio_vals[] = {
{ 0, NULL }
};
-static guint16
-de_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+static uint16_t
+de_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
+ uint32_t curr_offset;
curr_offset = offset;
@@ -3400,10 +3403,10 @@ de_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset,
/*
* [3] 10.5.1.12.1 CN Common GSM-MAP NAS system information
*/
-guint16
-de_cn_common_gsm_map_nas_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+uint16_t
+de_cn_common_gsm_map_nas_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
+ uint32_t curr_offset;
curr_offset = offset;
@@ -3423,10 +3426,10 @@ static const true_false_string gsm_a_att_value = {
"MSs shall not apply IMSI attach and detach procedure"
};
-guint16
-de_cs_domain_spec_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+uint16_t
+de_cs_domain_spec_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
+ uint32_t curr_offset;
curr_offset = offset;
@@ -3454,10 +3457,10 @@ static const true_false_string gsm_a_nmo_value = {
"Network Mode of Operation I"
};
-guint16
-de_ps_domain_spec_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+uint16_t
+de_ps_domain_spec_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
+ uint32_t curr_offset;
curr_offset = offset;
@@ -3476,12 +3479,12 @@ de_ps_domain_spec_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
/*
* [3] 10.5.1.13 PLMN list
*/
-guint16
-de_plmn_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len)
+uint16_t
+de_plmn_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len)
{
- gchar *mcc_mnc_str;
- guint32 curr_offset;
- guint8 num_plmn;
+ char *mcc_mnc_str;
+ uint32_t curr_offset;
+ uint8_t num_plmn;
proto_tree* subtree;
curr_offset = offset;
@@ -3490,7 +3493,7 @@ de_plmn_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset
while ((len - (curr_offset - offset)) >= 3)
{
subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 3, ett_gsm_a_plmn, NULL, "PLMN[%u]", num_plmn + 1);
- mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, subtree, curr_offset, E212_NONE, TRUE);
+ mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, subtree, curr_offset, E212_NONE, true);
proto_item_append_text(subtree, ": %s", mcc_mnc_str);
curr_offset += 3;
@@ -3517,10 +3520,10 @@ static const value_string gsm_a_pld_xid_vals[] = {
{ 0, NULL }
};
-static guint16
-de_nas_cont_for_ps_ho(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+static uint16_t
+de_nas_cont_for_ps_ho(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
+ uint32_t curr_offset;
curr_offset = offset;
@@ -3551,10 +3554,10 @@ static const true_false_string gsm_a_ext_periodic_timers_value = {
"MS does not support the extended periodic timer in this domain"
};
-static guint16
-de_ms_net_feat_sup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+static uint16_t
+de_ms_net_feat_sup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
{
- guint32 curr_offset, bit_offset;
+ uint32_t curr_offset, bit_offset;
curr_offset = offset;
bit_offset = (curr_offset<<3)+4;
@@ -3568,7 +3571,7 @@ de_ms_net_feat_sup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin
}
-guint16 (*common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len) = {
+uint16_t (*common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len) = {
/* Common Information Elements 10.5.1 */
de_cell_id, /* Cell Identity */
de_ciph_key_seq_num, /* Ciphering Key Sequence Number */
@@ -3604,14 +3607,14 @@ static stat_tap_table_item gsm_a_stat_fields[] = {
{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "IEI", "%d"},
{TABLE_ITEM_STRING, TAP_ALIGN_LEFT, "Message Name", "%-25s"},
{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Count", "%d"}
- };
+};
static void gsm_a_stat_init(stat_tap_table_ui* new_stat, const char *table_title, const value_string *msg_strings)
{
- int num_fields = sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item);
+ int num_fields = array_length(gsm_a_stat_fields);
stat_tap_table* table;
- guint i;
- stat_tap_table_item_type items[sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item)];
+ unsigned i;
+ stat_tap_table_item_type items[array_length(gsm_a_stat_fields)];
items[IEI_COLUMN].type = TABLE_ITEM_UINT;
items[MSG_NAME_COLUMN].type = TABLE_ITEM_STRING;
@@ -3707,7 +3710,7 @@ static void gsm_a_sacch_rr_stat_init(stat_tap_table_ui* new_stat)
}
static tap_packet_status
-gsm_a_stat_packet(void *tapdata, const void *gatr_ptr, guint8 pdu_type, int protocol_disc)
+gsm_a_stat_packet(void *tapdata, const void *gatr_ptr, uint8_t pdu_type, int protocol_disc)
{
stat_data_t* stat_data = (stat_data_t*)tapdata;
const gsm_a_tap_rec_t *gatr = (const gsm_a_tap_rec_t *) gatr_ptr;
@@ -3789,7 +3792,7 @@ gsm_a_sacch_rr_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t
static void
gsm_a_stat_reset(stat_tap_table* table)
{
- guint element;
+ unsigned element;
stat_tap_table_item_type* item_data;
for (element = 0; element < table->num_elements; element++)
@@ -3801,7 +3804,7 @@ gsm_a_stat_reset(stat_tap_table* table)
}
static void
-gsm_a_stat_free_table_item(stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
+gsm_a_stat_free_table_item(stat_tap_table* table _U_, unsigned row _U_, unsigned column, stat_tap_table_item_type* field_data)
{
if (column != MSG_NAME_COLUMN) return;
g_free((char*)field_data->value.string_value);
@@ -3811,8 +3814,8 @@ gsm_a_stat_free_table_item(stat_tap_table* table _U_, guint row _U_, guint colum
void
proto_register_gsm_a_common(void)
{
- guint i;
- guint last_offset;
+ unsigned i;
+ unsigned last_offset;
/* Setup list of header fields */
static hf_register_info hf[] =
@@ -4704,12 +4707,12 @@ proto_register_gsm_a_common(void)
},
{ &hf_gsm_a_horizontal_speed,
{ "Horizontal Speed", "gsm_a.gad.horizontal_velocity",
- FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_kmh, 0x0,
+ FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_kmh), 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_vertical_speed,
{ "Vertical Speed", "gsm_a.gad.vertical_speed",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &units_kmh, 0x0,
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_kmh), 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_uncertainty_speed,
@@ -4790,7 +4793,7 @@ proto_register_gsm_a_common(void)
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 2
- static gint *ett[NUM_INDIVIDUAL_ELEMS +
+ static int *ett[NUM_INDIVIDUAL_ELEMS +
NUM_GSM_COMMON_ELEM];
static ei_register_info ei[] = {
@@ -4806,11 +4809,11 @@ proto_register_gsm_a_common(void)
expert_module_t* expert_a_common;
static tap_param gsm_a_stat_params[] = {
- { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
+ { PARAM_FILTER, "filter", "Filter", NULL, true }
};
static stat_tap_table_ui gsm_a_bssmap_stat_table = {
- REGISTER_STAT_GROUP_TELEPHONY_GSM,
+ REGISTER_TELEPHONY_GROUP_GSM,
"A-Interface BSSMAP",
"gsm_a",
"gsm_a,bssmap",
@@ -4819,14 +4822,14 @@ proto_register_gsm_a_common(void)
gsm_a_stat_reset,
gsm_a_stat_free_table_item,
NULL,
- sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields,
- sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params,
+ array_length(gsm_a_stat_fields), gsm_a_stat_fields,
+ array_length(gsm_a_stat_params), gsm_a_stat_params,
NULL,
0
};
static stat_tap_table_ui gsm_a_dtap_mm_stat_table = {
- REGISTER_STAT_GROUP_TELEPHONY_GSM,
+ REGISTER_TELEPHONY_GROUP_GSM,
"A-Interface DTAP Mobility Management",
"gsm_a",
"gsm_a,dtap_mm",
@@ -4835,14 +4838,14 @@ proto_register_gsm_a_common(void)
gsm_a_stat_reset,
gsm_a_stat_free_table_item,
NULL,
- sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields,
- sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params,
+ array_length(gsm_a_stat_fields), gsm_a_stat_fields,
+ array_length(gsm_a_stat_params), gsm_a_stat_params,
NULL,
0
};
static stat_tap_table_ui gsm_a_dtap_rr_stat_table = {
- REGISTER_STAT_GROUP_TELEPHONY_GSM,
+ REGISTER_TELEPHONY_GROUP_GSM,
"A-Interface DTAP Radio Resource Management",
"gsm_a",
"gsm_a,dtap_rr",
@@ -4851,14 +4854,14 @@ proto_register_gsm_a_common(void)
gsm_a_stat_reset,
gsm_a_stat_free_table_item,
NULL,
- sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields,
- sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params,
+ array_length(gsm_a_stat_fields), gsm_a_stat_fields,
+ array_length(gsm_a_stat_params), gsm_a_stat_params,
NULL,
0
};
static stat_tap_table_ui gsm_a_dtap_cc_stat_table = {
- REGISTER_STAT_GROUP_TELEPHONY_GSM,
+ REGISTER_TELEPHONY_GROUP_GSM,
"A-Interface DTAP Call Control",
"gsm_a",
"gsm_a,dtap_cc",
@@ -4867,14 +4870,14 @@ proto_register_gsm_a_common(void)
gsm_a_stat_reset,
gsm_a_stat_free_table_item,
NULL,
- sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields,
- sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params,
+ array_length(gsm_a_stat_fields), gsm_a_stat_fields,
+ array_length(gsm_a_stat_params), gsm_a_stat_params,
NULL,
0
};
static stat_tap_table_ui gsm_a_dtap_gmm_stat_table = {
- REGISTER_STAT_GROUP_TELEPHONY_GSM,
+ REGISTER_TELEPHONY_GROUP_GSM,
"A-Interface DTAP GPRS Mobility Management",
"gsm_a",
"gsm_a,dtap_gmm",
@@ -4883,14 +4886,14 @@ proto_register_gsm_a_common(void)
gsm_a_stat_reset,
gsm_a_stat_free_table_item,
NULL,
- sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields,
- sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params,
+ array_length(gsm_a_stat_fields), gsm_a_stat_fields,
+ array_length(gsm_a_stat_params), gsm_a_stat_params,
NULL,
0
};
static stat_tap_table_ui gsm_a_dtap_sm_stat_table = {
- REGISTER_STAT_GROUP_TELEPHONY_GSM,
+ REGISTER_TELEPHONY_GROUP_GSM,
"A-Interface DTAP GPRS Session Management",
"gsm_a",
"gsm_a,dtap_sm",
@@ -4899,14 +4902,14 @@ proto_register_gsm_a_common(void)
gsm_a_stat_reset,
gsm_a_stat_free_table_item,
NULL,
- sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields,
- sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params,
+ array_length(gsm_a_stat_fields), gsm_a_stat_fields,
+ array_length(gsm_a_stat_params), gsm_a_stat_params,
NULL,
0
};
static stat_tap_table_ui gsm_a_dtap_sms_stat_table = {
- REGISTER_STAT_GROUP_TELEPHONY_GSM,
+ REGISTER_TELEPHONY_GROUP_GSM,
"A-Interface DTAP Short Message Service",
"gsm_a",
"gsm_a,dtap_sms",
@@ -4915,14 +4918,14 @@ proto_register_gsm_a_common(void)
gsm_a_stat_reset,
gsm_a_stat_free_table_item,
NULL,
- sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields,
- sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params,
+ array_length(gsm_a_stat_fields), gsm_a_stat_fields,
+ array_length(gsm_a_stat_params), gsm_a_stat_params,
NULL,
0
};
static stat_tap_table_ui gsm_a_dtap_tp_stat_table = {
- REGISTER_STAT_GROUP_TELEPHONY_GSM,
+ REGISTER_TELEPHONY_GROUP_GSM,
"A-Interface DTAP Special Conformance Testing Functions",
"gsm_a",
"gsm_a,dtap_tp",
@@ -4931,14 +4934,14 @@ proto_register_gsm_a_common(void)
gsm_a_stat_reset,
gsm_a_stat_free_table_item,
NULL,
- sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields,
- sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params,
+ array_length(gsm_a_stat_fields), gsm_a_stat_fields,
+ array_length(gsm_a_stat_params), gsm_a_stat_params,
NULL,
0
};
static stat_tap_table_ui gsm_a_dtap_ss_stat_table = {
- REGISTER_STAT_GROUP_TELEPHONY_GSM,
+ REGISTER_TELEPHONY_GROUP_GSM,
"A-Interface DTAP Supplementary Services",
"gsm_a",
"gsm_a,dtap_ss",
@@ -4947,14 +4950,14 @@ proto_register_gsm_a_common(void)
gsm_a_stat_reset,
gsm_a_stat_free_table_item,
NULL,
- sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields,
- sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params,
+ array_length(gsm_a_stat_fields), gsm_a_stat_fields,
+ array_length(gsm_a_stat_params), gsm_a_stat_params,
NULL,
0
};
static stat_tap_table_ui gsm_a_sacch_rr_stat_table = {
- REGISTER_STAT_GROUP_TELEPHONY_GSM,
+ REGISTER_TELEPHONY_GROUP_GSM,
"A-Interface SACCH",
"gsm_a",
"gsm_a,dtap_sacch",
@@ -4963,8 +4966,8 @@ proto_register_gsm_a_common(void)
gsm_a_stat_reset,
gsm_a_stat_free_table_item,
NULL,
- sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields,
- sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params,
+ array_length(gsm_a_stat_fields), gsm_a_stat_fields,
+ array_length(gsm_a_stat_params), gsm_a_stat_params,
NULL,
0
};
@@ -4975,7 +4978,6 @@ proto_register_gsm_a_common(void)
ett[1] = &ett_gsm_a_poly_pnt;
for (i=0; i < NUM_GSM_COMMON_ELEM; i++, last_offset++)
{
- ett_gsm_common_elem[i] = -1;
ett[last_offset] = &ett_gsm_common_elem[i];
}