diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
commit | a86c5f7cae7ec9a3398300555a0b644689d946a1 (patch) | |
tree | 39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-gsm_abis_oml.c | |
parent | Releasing progress-linux version 4.2.6-1~progress7.99u1. (diff) | |
download | wireshark-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_abis_oml.c')
-rw-r--r-- | epan/dissectors/packet-gsm_abis_oml.c | 373 |
1 files changed, 187 insertions, 186 deletions
diff --git a/epan/dissectors/packet-gsm_abis_oml.c b/epan/dissectors/packet-gsm_abis_oml.c index 0b667872..834c96ee 100644 --- a/epan/dissectors/packet-gsm_abis_oml.c +++ b/epan/dissectors/packet-gsm_abis_oml.c @@ -17,6 +17,7 @@ #include <epan/expert.h> #include <epan/lapd_sapi.h> #include <epan/prefs.h> +#include <epan/unit_strings.h> #include "packet-gsm_a_common.h" @@ -537,13 +538,13 @@ enum abis_nm_nack_cause { /* Section 9.4.1 */ struct abis_nm_channel { - guint8 attrib; - guint8 bts_port; - guint8 timeslot; - guint8 subslot; + uint8_t attrib; + uint8_t bts_port; + uint8_t timeslot; + uint8_t subslot; }; -/* Siemens BS-11 specific objects in the SienemsHW (0xA5) object class */ +/* Siemens BS-11 specific objects in the SiemensHW (0xA5) object class */ enum abis_bs11_objtype { BS11_OBJ_ALCO = 0x01, BS11_OBJ_BBSIG = 0x02, /* obj_class: 0,1 */ @@ -599,7 +600,7 @@ enum tlv_type { struct tlv_def { enum tlv_type type; - guint8 fixed_len; + uint8_t fixed_len; }; struct tlv_definition { @@ -638,121 +639,121 @@ enum abis_nm_ipacc_testres_ie { }; /* initialize the protocol and registered fields */ -static int proto_abis_oml = -1; +static int proto_abis_oml; /* OML header */ -static int hf_oml_msg_disc = -1; -static int hf_oml_placement = -1; -static int hf_oml_sequence = -1; -static int hf_oml_length = -1; -static int hf_oml_manuf_id_len = -1; -static int hf_oml_manuf_id_val = -1; +static int hf_oml_msg_disc; +static int hf_oml_placement; +static int hf_oml_sequence; +static int hf_oml_length; +static int hf_oml_manuf_id_len; +static int hf_oml_manuf_id_val; /* FOM header */ -static int hf_oml_fom_msgtype = -1; -static int hf_oml_fom_objclass = -1; -static int hf_oml_fom_inst_bts = -1; -static int hf_oml_fom_inst_trx = -1; -static int hf_oml_fom_inst_ts = -1; -static int hf_oml_fom_attr_tag = -1; -static int hf_oml_fom_attr_len = -1; -static int hf_oml_fom_attr_val = -1; +static int hf_oml_fom_msgtype; +static int hf_oml_fom_objclass; +static int hf_oml_fom_inst_bts; +static int hf_oml_fom_inst_trx; +static int hf_oml_fom_inst_ts; +static int hf_oml_fom_attr_tag; +static int hf_oml_fom_attr_len; +static int hf_oml_fom_attr_val; /* FOM attributes */ -static int hf_attr_adm_state = -1; -static int hf_attr_arfcn = -1; -static int hf_attr_oper_state = -1; -static int hf_attr_avail_state = -1; -static int hf_attr_event_type = -1; -static int hf_attr_severity = -1; -static int hf_attr_nack_causes = -1; -static int hf_attr_bcch_arfcn = -1; -static int hf_attr_bsic = -1; -static int hf_attr_test_no = -1; -static int hf_attr_tsc = -1; -static int hf_attr_tei = -1; -static int hf_attr_ach_btsp = -1; -static int hf_attr_ach_tslot = -1; -static int hf_attr_ach_sslot = -1; -static int hf_attr_gsm_time = -1; -static int hf_attr_chan_comb = -1; -static int hf_attr_hsn = -1; -static int hf_attr_maio = -1; -static int hf_attr_list_req_attr = -1; -static int hf_attr_ari_not_reported_cnt = -1; -static int hf_attr_ari_not_reported_attr = -1; -static int hf_attr_rf_max_pwr_red = -1; -static int hf_attr_interf_bound0 = -1; -static int hf_attr_interf_bound1 = -1; -static int hf_attr_interf_bound2 = -1; -static int hf_attr_interf_bound3 = -1; -static int hf_attr_interf_bound4 = -1; -static int hf_attr_interf_bound5 = -1; +static int hf_attr_adm_state; +static int hf_attr_arfcn; +static int hf_attr_oper_state; +static int hf_attr_avail_state; +static int hf_attr_event_type; +static int hf_attr_severity; +static int hf_attr_nack_causes; +static int hf_attr_bcch_arfcn; +static int hf_attr_bsic; +static int hf_attr_test_no; +static int hf_attr_tsc; +static int hf_attr_tei; +static int hf_attr_ach_btsp; +static int hf_attr_ach_tslot; +static int hf_attr_ach_sslot; +static int hf_attr_gsm_time; +static int hf_attr_chan_comb; +static int hf_attr_hsn; +static int hf_attr_maio; +static int hf_attr_list_req_attr; +static int hf_attr_ari_not_reported_cnt; +static int hf_attr_ari_not_reported_attr; +static int hf_attr_rf_max_pwr_red; +static int hf_attr_interf_bound0; +static int hf_attr_interf_bound1; +static int hf_attr_interf_bound2; +static int hf_attr_interf_bound3; +static int hf_attr_interf_bound4; +static int hf_attr_interf_bound5; /* Ipaccess */ -static int hf_oml_ipa_tres_attr_tag = -1; -static int hf_oml_ipa_tres_attr_len = -1; -static int hf_attr_ipa_test_res = -1; -static int hf_attr_ipa_tr_rxlev = -1; -static int hf_attr_ipa_tr_b_rxlev = -1; -static int hf_attr_ipa_tr_arfcn = -1; -static int hf_attr_ipa_tr_f_qual = -1; -static int hf_attr_ipa_tr_f_err = -1; -static int hf_attr_ipa_tr_rxqual = -1; -static int hf_attr_ipa_tr_frame_offs = -1; -static int hf_attr_ipa_tr_framenr_offs = -1; -static int hf_attr_ipa_tr_bsic = -1; -static int hf_attr_ipa_tr_cell_id = -1; -static int hf_attr_ipa_tr_si2 = -1; -static int hf_attr_ipa_tr_si2bis = -1; -static int hf_attr_ipa_tr_si2ter = -1; -static int hf_attr_ipa_tr_chan_desc = -1; -static int hf_attr_ipa_rsl_ip = -1; -static int hf_attr_ipa_rsl_port = -1; -static int hf_attr_ipa_prim_oml_ip = -1; -static int hf_attr_ipa_prim_oml_port = -1; -static int hf_attr_ipa_location_name = -1; -static int hf_attr_ipa_unit_id = -1; -static int hf_attr_ipa_unit_name = -1; -static int hf_attr_ipa_nv_flags = -1; -static int hf_attr_ipa_nv_mask = -1; -static int hf_attr_ipa_nsl_sport = -1; -static int hf_attr_ipa_nsl_daddr = -1; -static int hf_attr_ipa_nsl_dport = -1; -static int hf_attr_ipa_nsei = -1; -static int hf_attr_ipa_nsvci = -1; -static int hf_attr_ipa_bvci = -1; -static int hf_attr_ipa_rac = -1; -static int hf_attr_ipa_ns_cfg_unblock_timer = -1; -static int hf_attr_ipa_ns_cfg_unblock_retries = -1; -static int hf_attr_ipa_ns_cfg_reset_timer = -1; -static int hf_attr_ipa_ns_cfg_reset_retries = -1; -static int hf_attr_ipa_ns_cfg_test_timer = -1; -static int hf_attr_ipa_ns_cfg_alive_timer = -1; -static int hf_attr_ipa_ns_cfg_alive_retries = -1; -static int hf_attr_ipa_gprs_paging_rep_time = -1; -static int hf_attr_ipa_gprs_paging_rep_count = -1; -static int hf_attr_ipa_rlc_cfg_t3142 = -1; -static int hf_attr_ipa_rlc_cfg_t3169 = -1; -static int hf_attr_ipa_rlc_cfg_t3191 = -1; -static int hf_attr_ipa_rlc_cfg_t3193 = -1; -static int hf_attr_ipa_rlc_cfg_t3195 = -1; -static int hf_attr_ipa_rlc_cfg_t3101 = -1; -static int hf_attr_ipa_rlc_cfg_t3103 = -1; -static int hf_attr_ipa_rlc_cfg_t3105 = -1; -static int hf_attr_ipa_rlc_cfg_countdown = -1; -static int hf_attr_ipa_rlc_cfg2_t_dl_tbf_ext = -1; -static int hf_attr_ipa_rlc_cfg2_t_ul_tbf_ext = -1; -static int hf_attr_ipa_rlc_cfg2_init_cs = -1; -static int hf_attr_ipa_rlc_cfg2_init_mcs = -1; -static int hf_attr_ipa_cs[4] = { -1, -1, -1, -1 }; -static int hf_attr_ipa_mcs[9] = { -1, -1, -1, -1, -1, -1, -1, -1, -1 }; +static int hf_oml_ipa_tres_attr_tag; +static int hf_oml_ipa_tres_attr_len; +static int hf_attr_ipa_test_res; +static int hf_attr_ipa_tr_rxlev; +static int hf_attr_ipa_tr_b_rxlev; +static int hf_attr_ipa_tr_arfcn; +static int hf_attr_ipa_tr_f_qual; +static int hf_attr_ipa_tr_f_err; +static int hf_attr_ipa_tr_rxqual; +static int hf_attr_ipa_tr_frame_offs; +static int hf_attr_ipa_tr_framenr_offs; +static int hf_attr_ipa_tr_bsic; +static int hf_attr_ipa_tr_cell_id; +static int hf_attr_ipa_tr_si2; +static int hf_attr_ipa_tr_si2bis; +static int hf_attr_ipa_tr_si2ter; +static int hf_attr_ipa_tr_chan_desc; +static int hf_attr_ipa_rsl_ip; +static int hf_attr_ipa_rsl_port; +static int hf_attr_ipa_prim_oml_ip; +static int hf_attr_ipa_prim_oml_port; +static int hf_attr_ipa_location_name; +static int hf_attr_ipa_unit_id; +static int hf_attr_ipa_unit_name; +static int hf_attr_ipa_nv_flags; +static int hf_attr_ipa_nv_mask; +static int hf_attr_ipa_nsl_sport; +static int hf_attr_ipa_nsl_daddr; +static int hf_attr_ipa_nsl_dport; +static int hf_attr_ipa_nsei; +static int hf_attr_ipa_nsvci; +static int hf_attr_ipa_bvci; +static int hf_attr_ipa_rac; +static int hf_attr_ipa_ns_cfg_unblock_timer; +static int hf_attr_ipa_ns_cfg_unblock_retries; +static int hf_attr_ipa_ns_cfg_reset_timer; +static int hf_attr_ipa_ns_cfg_reset_retries; +static int hf_attr_ipa_ns_cfg_test_timer; +static int hf_attr_ipa_ns_cfg_alive_timer; +static int hf_attr_ipa_ns_cfg_alive_retries; +static int hf_attr_ipa_gprs_paging_rep_time; +static int hf_attr_ipa_gprs_paging_rep_count; +static int hf_attr_ipa_rlc_cfg_t3142; +static int hf_attr_ipa_rlc_cfg_t3169; +static int hf_attr_ipa_rlc_cfg_t3191; +static int hf_attr_ipa_rlc_cfg_t3193; +static int hf_attr_ipa_rlc_cfg_t3195; +static int hf_attr_ipa_rlc_cfg_t3101; +static int hf_attr_ipa_rlc_cfg_t3103; +static int hf_attr_ipa_rlc_cfg_t3105; +static int hf_attr_ipa_rlc_cfg_countdown; +static int hf_attr_ipa_rlc_cfg2_t_dl_tbf_ext; +static int hf_attr_ipa_rlc_cfg2_t_ul_tbf_ext; +static int hf_attr_ipa_rlc_cfg2_init_cs; +static int hf_attr_ipa_rlc_cfg2_init_mcs; +static int hf_attr_ipa_cs[4]; +static int hf_attr_ipa_mcs[9]; /* initialize the subtree pointers */ -static int ett_oml = -1; -static int ett_oml_fom = -1; -static int ett_oml_fom_att = -1; +static int ett_oml; +static int ett_oml_fom; +static int ett_oml_fom_att; -static expert_field ei_unknown_type = EI_INIT; -static expert_field ei_unknown_manuf = EI_INIT; -static expert_field ei_length_mismatch = EI_INIT; +static expert_field ei_unknown_type; +static expert_field ei_unknown_manuf; +static expert_field ei_length_mismatch; enum { OML_DIALECT_ETSI, @@ -761,8 +762,8 @@ enum { OML_DIALECT_ERICSSON }; -/* which A-bis OML dialect to use (prefrence) */ -static gint global_oml_dialect = OML_DIALECT_ETSI; +/* which A-bis OML dialect to use (preference) */ +static int global_oml_dialect = OML_DIALECT_ETSI; static proto_tree *top_tree; @@ -1184,10 +1185,10 @@ static const enum_val_t oml_dialect_enumvals[] = { { NULL, NULL, 0 } }; -static void format_custom_msgtype(gchar *out, guint32 in) +static void format_custom_msgtype(char *out, uint32_t in) { - const gchar *tmp = NULL; - gchar *tmp_str; + const char *tmp = NULL; + char *tmp_str; switch (global_oml_dialect) { case OML_DIALECT_SIEMENS: @@ -1211,10 +1212,10 @@ static void format_custom_msgtype(gchar *out, guint32 in) } } -static void format_custom_attr(gchar *out, guint32 in) +static void format_custom_attr(char *out, uint32_t in) { - const gchar *tmp = NULL; - gchar *tmp_str; + const char *tmp = NULL; + char *tmp_str; switch (global_oml_dialect) { case OML_DIALECT_SIEMENS: @@ -1239,7 +1240,7 @@ static void format_custom_attr(gchar *out, guint32 in) } /* Interference level boundaries are coded as a binary presentation of -x dBm */ -static void format_interf_bound(gchar *buf, const guint32 in) +static void format_interf_bound(char *buf, const uint32_t in) { snprintf(buf, ITEM_LABEL_LENGTH, "-%u%s", in, unit_name_string_get_value(in, &units_dbm)); @@ -1407,7 +1408,7 @@ static struct tlv_definition nm_att_tlvdev_bs11; static struct tlv_definition nm_att_tlvdef_ipa; static const struct tlv_def * -find_tlv_tag(guint8 tag) +find_tlv_tag(uint8_t tag) { const struct tlv_def *specific; @@ -1432,11 +1433,11 @@ find_tlv_tag(guint8 tag) /* Parse the ip.access specific BCCH Information IE embedded into the Test * Report IE */ -static gint +static int ipacc_tr_ie_bcch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *att_tree, int offset) { - guint16 binfo_type; + uint16_t binfo_type; binfo_type = tvb_get_ntohs(tvb, offset); offset += 2; @@ -1509,11 +1510,11 @@ ipacc_tr_ie_bcch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *att_tree, /* Parse the ip.access specific Channel Usage IE embedded into the Test * Report IE */ -static gint +static int ipacc_tr_ie_chan_usage(tvbuff_t *tvb, proto_tree *att_tree, int offset) { while (tvb_reported_length_remaining(tvb, offset) > 0) { - guint16 result; + uint16_t result; result = tvb_get_ntohs(tvb, offset); proto_tree_add_uint(att_tree, hf_attr_ipa_tr_arfcn, @@ -1526,21 +1527,21 @@ ipacc_tr_ie_chan_usage(tvbuff_t *tvb, proto_tree *att_tree, int offset) } /* Parse the ip.access specific format of the standard test report IE */ -static gint +static int dissect_ipacc_test_rep(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb) { - gint offset = 0; + int offset = 0; proto_tree_add_item(tree, hf_attr_ipa_test_res, tvb, offset++, 1, ENC_BIG_ENDIAN); while (tvb_reported_length_remaining(tvb, offset) > 0) { - guint8 ie; - guint16 len; + uint8_t ie; + uint16_t len; proto_item *ti; proto_tree *att_tree; - ie = tvb_get_guint8(tvb, offset); + ie = tvb_get_uint8(tvb, offset); len = tvb_get_ntohs(tvb, offset+1); ti = proto_tree_add_item(tree, hf_oml_ipa_tres_attr_tag, tvb, offset++, 1, ENC_BIG_ENDIAN); @@ -1566,7 +1567,7 @@ dissect_ipacc_test_rep(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb) } /* Dissect OML FOM Attributes after OML + FOM header */ -static gint +static int // NOLINTNEXTLINE(misc-no-recursion) dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, packet_info *pinfo, proto_tree *tree) @@ -1574,9 +1575,9 @@ dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, int offset = base_offs; while (offset - base_offs < length) { - guint i; - guint16 val16; - guint8 tag, val8; + unsigned i; + uint16_t val16; + uint8_t tag, val8; unsigned int len, len_len, hlen; const struct tlv_def *tdef; proto_item *ti; @@ -1584,7 +1585,7 @@ dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, tvbuff_t *sub_tvb; int ie_offset; - tag = tvb_get_guint8(tvb, offset); + tag = tvb_get_uint8(tvb, offset); ti = proto_tree_add_item(tree, hf_oml_fom_attr_tag, tvb, offset, 1, ENC_BIG_ENDIAN); att_tree = proto_item_add_subtree(ti, ett_oml_fom_att); @@ -1610,18 +1611,18 @@ dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, case TLV_TYPE_TLV: hlen = 2; len_len = 1; - len = tvb_get_guint8(tvb, offset+1); + len = tvb_get_uint8(tvb, offset+1); break; case TLV_TYPE_TL16V: hlen = 3; len_len = 2; - len = tvb_get_guint8(tvb, offset+1) << 8 | - tvb_get_guint8(tvb, offset+2); + len = tvb_get_uint8(tvb, offset+1) << 8 | + tvb_get_uint8(tvb, offset+2); break; case TLV_TYPE_TLV16: hlen = 2; len_len = 1; - len = tvb_get_guint8(tvb, offset+1) * 2; + len = tvb_get_uint8(tvb, offset+1) * 2; break; case TLV_TYPE_UNKNOWN: /* fall through */ default: @@ -1653,7 +1654,7 @@ dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, case NM_ATT_ADM_STATE: proto_tree_add_item(att_tree, hf_attr_adm_state, tvb, offset, len, ENC_BIG_ENDIAN); - val8 = tvb_get_guint8(tvb, offset); + val8 = tvb_get_uint8(tvb, offset); col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(val8, oml_adm_state_vals, "%02x")); @@ -1666,14 +1667,14 @@ dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, } break; case NM_ATT_RF_MAXPOWR_R: - val8 = tvb_get_guint8(tvb, offset); /* 2 dB steps */ + val8 = tvb_get_uint8(tvb, offset); /* 2 dB steps */ proto_tree_add_uint(att_tree, hf_attr_rf_max_pwr_red, tvb, offset, 1, val8 * 2); break; case NM_ATT_AVAIL_STATUS: /* Availability status can have length 0 */ if (len) { - val8 = tvb_get_guint8(tvb, offset); + val8 = tvb_get_uint8(tvb, offset); proto_tree_add_item(att_tree, hf_attr_avail_state, tvb, offset, len, ENC_BIG_ENDIAN); @@ -1706,7 +1707,7 @@ dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, case NM_ATT_OPER_STATE: proto_tree_add_item(att_tree, hf_attr_oper_state, tvb, offset, len, ENC_BIG_ENDIAN); - val8 = tvb_get_guint8(tvb, offset); + val8 = tvb_get_uint8(tvb, offset); col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(val8, oml_oper_state_vals, "%02x")); @@ -1733,7 +1734,7 @@ dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, case NM_ATT_TEST_NO: proto_tree_add_item(att_tree, hf_attr_test_no, tvb, offset, len, ENC_LITTLE_ENDIAN); - val8 = tvb_get_guint8(tvb, offset); + val8 = tvb_get_uint8(tvb, offset); col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(val8, oml_test_no_vals, "%02x")); @@ -1755,13 +1756,13 @@ dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, break; case NM_ATT_GET_ARI: { - guint not_counted, loffset; + unsigned not_counted, loffset; if (!len) break; loffset = offset; - not_counted = tvb_get_guint8(tvb, offset); + not_counted = tvb_get_uint8(tvb, offset); proto_tree_add_item(att_tree, hf_attr_ari_not_reported_cnt, tvb, loffset, 1, ENC_LITTLE_ENDIAN); @@ -1825,11 +1826,11 @@ dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, break; case NM_ATT_IPACC_NV_FLAGS: { - guint flags, mask; - flags = tvb_get_guint8(tvb, offset); - mask = tvb_get_guint8(tvb, offset+1); - flags |= tvb_get_guint8(tvb, offset+2) << 8; - mask |= tvb_get_guint8(tvb, offset+3) << 8; + unsigned flags, mask; + flags = tvb_get_uint8(tvb, offset); + mask = tvb_get_uint8(tvb, offset+1); + flags |= tvb_get_uint8(tvb, offset+2) << 8; + mask |= tvb_get_uint8(tvb, offset+3) << 8; proto_tree_add_uint(att_tree, hf_attr_ipa_nv_flags, tvb, offset, 3, flags); proto_tree_add_uint(att_tree, hf_attr_ipa_nv_mask, @@ -1880,7 +1881,7 @@ dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, tvb, ie_offset++, 1, ENC_NA); break; case NM_ATT_IPACC_GPRS_PAGING_CFG: - val8 = tvb_get_guint8(tvb, ie_offset); /* units: 50 ms */ + val8 = tvb_get_uint8(tvb, ie_offset); /* units: 50 ms */ proto_tree_add_uint(att_tree, hf_attr_ipa_gprs_paging_rep_time, tvb, ie_offset++, 1, val8 * 50); proto_tree_add_item(att_tree, hf_attr_ipa_gprs_paging_rep_count, @@ -1893,7 +1894,7 @@ dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, tvb, ie_offset++, 1, ENC_NA); proto_tree_add_item(att_tree, hf_attr_ipa_rlc_cfg_t3191, tvb, ie_offset++, 1, ENC_NA); - val8 = tvb_get_guint8(tvb, ie_offset); /* units: 10 ms */ + val8 = tvb_get_uint8(tvb, ie_offset); /* units: 10 ms */ proto_tree_add_uint(att_tree, hf_attr_ipa_rlc_cfg_t3193, tvb, ie_offset++, 1, val8 * 10); proto_tree_add_item(att_tree, hf_attr_ipa_rlc_cfg_t3195, @@ -1908,11 +1909,11 @@ dissect_oml_attrs(tvbuff_t *tvb, int base_offs, int length, tvb, ie_offset++, 1, ENC_NA); break; case NM_ATT_IPACC_RLC_CFG_2: - val16 = tvb_get_guint16(tvb, ie_offset, ENC_BIG_ENDIAN); /* units: 10 ms */ + val16 = tvb_get_uint16(tvb, ie_offset, ENC_BIG_ENDIAN); /* units: 10 ms */ proto_tree_add_uint(att_tree, hf_attr_ipa_rlc_cfg2_t_dl_tbf_ext, tvb, ie_offset, 2, val16 * 10); ie_offset += 2; - val16 = tvb_get_guint16(tvb, ie_offset, ENC_BIG_ENDIAN); /* units: 10 ms */ + val16 = tvb_get_uint16(tvb, ie_offset, ENC_BIG_ENDIAN); /* units: 10 ms */ proto_tree_add_uint(att_tree, hf_attr_ipa_rlc_cfg2_t_ul_tbf_ext, tvb, ie_offset, 2, val16 * 10); ie_offset += 2; @@ -1941,16 +1942,16 @@ static int dissect_oml_fom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, proto_item *top_ti) { - guint8 msg_type, obj_class, bts_nr, trx_nr, ts_nr; + uint8_t msg_type, obj_class, bts_nr, trx_nr, ts_nr; proto_item *ti; proto_tree *fom_tree; - gchar formatted[ITEM_LABEL_LENGTH]; + char formatted[ITEM_LABEL_LENGTH]; - msg_type = tvb_get_guint8(tvb, offset); - obj_class = tvb_get_guint8(tvb, offset+1); - bts_nr = tvb_get_guint8(tvb, offset+2); - trx_nr = tvb_get_guint8(tvb, offset+3); - ts_nr = tvb_get_guint8(tvb, offset+4); + msg_type = tvb_get_uint8(tvb, offset); + obj_class = tvb_get_uint8(tvb, offset+1); + bts_nr = tvb_get_uint8(tvb, offset+2); + trx_nr = tvb_get_uint8(tvb, offset+3); + ts_nr = tvb_get_uint8(tvb, offset+4); format_custom_msgtype(formatted, msg_type); proto_item_append_text(top_ti, ", %s(%02x,%02x,%02x) %s ", val_to_str(obj_class, oml_fom_objclass_vals, "%02x"), @@ -1972,13 +1973,13 @@ dissect_oml_fom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, return offset; } -static const guint8 ipaccess_magic[] = "com.ipaccess"; +static const uint8_t ipaccess_magic[] = "com.ipaccess"; static int dissect_oml_manuf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, proto_item *top_ti) { - guint32 len; + uint32_t len; proto_tree_add_item_ret_uint(tree, hf_oml_manuf_id_len, tvb, offset, 1, ENC_NA, &len); @@ -2001,11 +2002,11 @@ dissect_abis_oml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data { proto_item *ti; proto_tree *oml_tree; - guint32 remain_len; + uint32_t remain_len; int offset = 0; - guint8 msg_disc = tvb_get_guint8(tvb, offset); - guint8 len = tvb_get_guint8(tvb, offset+3); + uint8_t msg_disc = tvb_get_uint8(tvb, offset); + uint8_t len = tvb_get_uint8(tvb, offset+3); col_set_str(pinfo->cinfo, COL_PROTOCOL, "OML"); @@ -2026,7 +2027,7 @@ dissect_abis_oml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data /* Check whether the indicated length is correct */ if (msg_disc == ABIS_OM_MDISC_MANUF) /* TS 12.21 sec 8.1.4 NOTE 1 */ - remain_len = tvb_reported_length_remaining(tvb, offset + 1 + tvb_get_guint8(tvb, offset)); + remain_len = tvb_reported_length_remaining(tvb, offset + 1 + tvb_get_uint8(tvb, offset)); else remain_len = tvb_reported_length_remaining(tvb, offset); if (len != remain_len) { @@ -2256,7 +2257,7 @@ proto_register_abis_oml(void) }, { &hf_attr_rf_max_pwr_red, { "Max RF Power Reduction", "gsm_abis_oml.fom.attr.ari.max_rf_pwr_red", - FT_UINT8, BASE_DEC | BASE_UNIT_STRING, &units_decibels, 0, + FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_decibels), 0, NULL, HFILL } }, { &hf_attr_interf_bound0, @@ -2484,7 +2485,7 @@ proto_register_abis_oml(void) { &hf_attr_ipa_gprs_paging_rep_time, { "GPRS Paging Repeat Time", "gsm_abis_oml.fom.attr.ipa.gprs_paging_rep_time", - FT_UINT8, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0, + FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_milliseconds), 0, NULL, HFILL } }, { &hf_attr_ipa_gprs_paging_rep_count, @@ -2495,67 +2496,67 @@ proto_register_abis_oml(void) { &hf_attr_ipa_rlc_cfg_t3142, { "T3142", "gsm_abis_oml.fom.attr.ipa.rlc_cfg_t3142", - FT_UINT8, BASE_DEC | BASE_UNIT_STRING, &units_seconds, 0, + FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0, NULL, HFILL } }, { &hf_attr_ipa_rlc_cfg_t3169, { "T3169", "gsm_abis_oml.fom.attr.ipa.rlc_cfg_t3169", - FT_UINT8, BASE_DEC | BASE_UNIT_STRING, &units_seconds, 0, + FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0, NULL, HFILL } }, { &hf_attr_ipa_rlc_cfg_t3191, { "T3191", "gsm_abis_oml.fom.attr.ipa.rlc_cfg_t3191", - FT_UINT8, BASE_DEC | BASE_UNIT_STRING, &units_seconds, 0, + FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0, NULL, HFILL } }, { &hf_attr_ipa_rlc_cfg_t3193, { "3193", "gsm_abis_oml.fom.attr.ipa.rlc_cfg_t3193", - FT_UINT8, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0, + FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_milliseconds), 0, NULL, HFILL } }, { &hf_attr_ipa_rlc_cfg_t3195, { "T3195", "gsm_abis_oml.fom.attr.ipa.rlc_cfg_t3195", - FT_UINT8, BASE_DEC | BASE_UNIT_STRING, &units_seconds, 0, + FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0, NULL, HFILL } }, { &hf_attr_ipa_rlc_cfg_t3101, { "T3101", "gsm_abis_oml.fom.attr.ipa.rlc_cfg_t3101", - FT_UINT8, BASE_DEC | BASE_UNIT_STRING, &units_seconds, 0, + FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0, NULL, HFILL } }, { &hf_attr_ipa_rlc_cfg_t3103, { "T3103", "gsm_abis_oml.fom.attr.ipa.rlc_cfg_t3103", - FT_UINT8, BASE_DEC | BASE_UNIT_STRING, &units_seconds, 0, + FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0, NULL, HFILL } }, { &hf_attr_ipa_rlc_cfg_t3105, { "T3105", "gsm_abis_oml.fom.attr.ipa.rlc_cfg_t3105", - FT_UINT8, BASE_DEC | BASE_UNIT_STRING, &units_seconds, 0, + FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0, NULL, HFILL } }, { &hf_attr_ipa_rlc_cfg_countdown, { "Countdown", "gsm_abis_oml.fom.attr.ipa.rlc_cfg_countdown", - FT_UINT8, BASE_DEC | BASE_UNIT_STRING, &units_seconds, 0, + FT_UINT8, BASE_DEC | BASE_UNIT_STRING, UNS(&units_seconds), 0, NULL, HFILL } }, { &hf_attr_ipa_rlc_cfg2_t_dl_tbf_ext, { "Downlink TBF Extension", "gsm_abis_oml.fom.attr.ipa.rlc_cfg2_t_dl_tbf_ext", - FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0, + FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_milliseconds), 0, NULL, HFILL } }, { &hf_attr_ipa_rlc_cfg2_t_ul_tbf_ext, { "Uplink TBF Extension", "gsm_abis_oml.fom.attr.ipa.rlc_cfg2_t_ul_tbf_ext", - FT_UINT16, BASE_DEC | BASE_UNIT_STRING, &units_milliseconds, 0, + FT_UINT16, BASE_DEC | BASE_UNIT_STRING, UNS(&units_milliseconds), 0, NULL, HFILL } }, { &hf_attr_ipa_rlc_cfg2_init_cs, @@ -2623,7 +2624,7 @@ proto_register_abis_oml(void) FT_UINT16, BASE_DEC, NULL, (1 << 7), NULL, HFILL } }, }; - static gint *ett[] = { + static int *ett[] = { &ett_oml, &ett_oml_fom, &ett_oml_fom_att, @@ -2718,7 +2719,7 @@ proto_register_abis_oml(void) nm_att_tlvdev_bs11.def[_attr].type = _type; \ nm_att_tlvdev_bs11.def[_attr].fixed_len = _fixed_len; \ - /* different stndard IEs */ + /* different standard IEs */ NM_ATT_TLVDEV_BS11(NM_ATT_OUTST_ALARM, TLV_TYPE_TLV, 0); NM_ATT_TLVDEV_BS11(NM_ATT_HW_DESC, TLV_TYPE_TL16V, 0); NM_ATT_TLVDEV_BS11(NM_ATT_ARFCN_LIST, TLV_TYPE_TLV16, 0); @@ -2822,7 +2823,7 @@ proto_register_abis_oml(void) prefs_register_enum_preference(oml_module, "oml_dialect", "A-bis OML dialect to be used", "Use ipaccess nanoBTS specific definitions for OML", - &global_oml_dialect, oml_dialect_enumvals, TRUE); + &global_oml_dialect, oml_dialect_enumvals, true); } /* This function is called once at startup and every time the user hits |