diff options
author | Bill Meier <wmeier@newsguy.com> | 2015-01-30 13:49:59 -0500 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2015-01-30 19:04:32 +0000 |
commit | eda485ea53c7ac77470f47e886b6513f28f0c20b (patch) | |
tree | 6b5adad845db04d441bb5a177f0ce8fe6cb92346 /epan/dissectors/packet-rsl.c | |
parent | 7b929e2ff78c5196e5ab7c4413b0eae1b542e445 (diff) |
Cleanup:
Including:
tvb_length...() ==> tvb_reported_length...()
Remove some dead initializers;
Localize some variables;
Whitespace.
Change-Id: Ide9490f248d558bb7e3af96a1fc17d8f911de4ef
Reviewed-on: https://code.wireshark.org/review/6862
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'epan/dissectors/packet-rsl.c')
-rw-r--r-- | epan/dissectors/packet-rsl.c | 474 |
1 files changed, 236 insertions, 238 deletions
diff --git a/epan/dissectors/packet-rsl.c b/epan/dissectors/packet-rsl.c index 6cb6ab51a3..8ea6d7e1b9 100644 --- a/epan/dissectors/packet-rsl.c +++ b/epan/dissectors/packet-rsl.c @@ -674,7 +674,7 @@ dissect_rsl_ie_ch_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, in guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_CH_NO) return offset; } @@ -718,18 +718,18 @@ dissect_rsl_ie_link_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_LINK_ID) return offset; } - ie_tree = proto_tree_add_subtree(tree, tvb,offset,2, ett_ie_link_id, NULL, "Link Identifier IE "); + ie_tree = proto_tree_add_subtree(tree, tvb, offset, 2, ett_ie_link_id, NULL, "Link Identifier IE "); /* Element identifier */ proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - octet = tvb_get_guint8(tvb,offset); + octet = tvb_get_guint8(tvb, offset); if ((octet & 0x20) == 0x20) { /* Not applicable */ @@ -790,7 +790,7 @@ dissect_rsl_ie_act_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint octet; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_ACT_TYPE) return offset; } @@ -807,7 +807,7 @@ dissect_rsl_ie_act_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, /* The A-bits indicate the type of activation, which defines the access procedure * and the operation of the data link layer */ - octet = (tvb_get_guint8(tvb,offset) & 0x06) >> 1; + octet = (tvb_get_guint8(tvb, offset) & 0x06) >> 1; proto_tree_add_item(ie_tree, hf_rsl_a3a2, tvb, offset, 1, ENC_BIG_ENDIAN); switch (octet) { case 0: @@ -871,7 +871,7 @@ dissect_rsl_ie_bs_power(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_BS_POW) return offset; } @@ -910,7 +910,7 @@ dissect_rsl_ie_ch_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, in guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_CH_ID) return offset; } @@ -933,14 +933,14 @@ dissect_rsl_ie_ch_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, in * length should be included. * XXX Hmm a type 3 IE (TV). */ - proto_tree_add_text(ie_tree, tvb,offset, 1, "Channel Description Tag"); + proto_tree_add_text(ie_tree, tvb, offset, 1, "Channel Description Tag"); de_rr_ch_dsc(tvb, ie_tree, pinfo, offset+1, length, NULL, 0); offset += 4; /* * The 3GPP TS 24.008 "Mobile Allocation" shall for compatibility reasons be * included but empty, i.e. the length shall be zero. */ - proto_tree_add_text(ie_tree, tvb,offset,2,"Mobile Allocation Tag+Length(0)"); + proto_tree_add_text(ie_tree, tvb, offset, 2, "Mobile Allocation Tag+Length(0)"); return ie_offset + length; } /* @@ -1027,7 +1027,7 @@ dissect_rsl_ie_ch_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8 octet; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_CH_MODE) return offset; } @@ -1053,7 +1053,7 @@ dissect_rsl_ie_ch_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, offset++; /* The "Speech or data indicator" field (octet 4) */ proto_tree_add_item(ie_tree, hf_rsl_speech_or_data, tvb, offset, 1, ENC_BIG_ENDIAN); - octet = tvb_get_guint8(tvb,offset); + octet = tvb_get_guint8(tvb, offset); offset++; /* Channel rate and type */ proto_tree_add_item(ie_tree, hf_rsl_ch_rate_and_type, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -1068,7 +1068,7 @@ dissect_rsl_ie_ch_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, /* Data */ proto_tree_add_item(ie_tree, hf_rsl_extension_bit, tvb, offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(ie_tree, hf_rsl_t_nt_bit, tvb, offset, 1, ENC_BIG_ENDIAN); - octet = tvb_get_guint8(tvb,offset); + octet = tvb_get_guint8(tvb, offset); if ((octet & 0x40) == 0x40) { /* Non-transparent service */ /* For the non-transparent service, bits 6 to 1 indicate the radio interface data rate:*/ @@ -1083,11 +1083,11 @@ dissect_rsl_ie_ch_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, * If octet 4 indicates signalling then octet 6 is coded as follows: * 0000 0000 No resources required */ - proto_tree_add_text(ie_tree, tvb,offset,1,"0 No resources required(All other values are reserved)"); + proto_tree_add_text(ie_tree, tvb, offset, 1, "0 No resources required(All other values are reserved)"); break; default: /* Should not happen */ - proto_tree_add_text(ie_tree, tvb,offset,1,"Speech or data indicator != 1,2 or 3"); + proto_tree_add_text(ie_tree, tvb, offset, 1, "Speech or data indicator != 1,2 or 3"); break; } @@ -1123,7 +1123,7 @@ dissect_rsl_ie_enc_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_ENC_INF) return offset; } @@ -1158,7 +1158,7 @@ dissect_rsl_ie_frame_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_FRAME_NO) return offset; } @@ -1188,7 +1188,7 @@ dissect_rsl_ie_ho_ref(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, i guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_HO_REF) return offset; } @@ -1217,7 +1217,7 @@ dissect_rsl_ie_l1_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, i guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_L1_INF) return offset; } @@ -1266,7 +1266,7 @@ dissect_rsl_ie_L3_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_L3_INF) return offset; } @@ -1285,14 +1285,14 @@ dissect_rsl_ie_L3_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o if (type == L3_INF_CCCH) { /* L3 PDUs carried on CCCH have L2 PSEUDO LENGTH octet or are RR Short PD format */ - proto_tree_add_text(ie_tree, tvb,offset,length,"Link Layer Service Data Unit (L3 Message)(CCCH)"); + proto_tree_add_text(ie_tree, tvb, offset, length, "Link Layer Service Data Unit (L3 Message)(CCCH)"); next_tvb = tvb_new_subset_length(tvb, offset, length); call_dissector(gsm_a_ccch_handle, next_tvb, pinfo, top_tree); } else if (type == L3_INF_SACCH) { /* L3 PDUs carried on SACCH are normal format or are RR Short PD format */ - proto_tree_add_text(ie_tree, tvb,offset,length,"Link Layer Service Data Unit (L3 Message)(SACCH)"); + proto_tree_add_text(ie_tree, tvb, offset, length, "Link Layer Service Data Unit (L3 Message)(SACCH)"); next_tvb = tvb_new_subset_length(tvb, offset, length); call_dissector(gsm_a_sacch_handle, next_tvb, pinfo, top_tree); } @@ -1301,7 +1301,7 @@ dissect_rsl_ie_L3_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o /* Link Layer Service Data Unit (i.e. a layer 3 message * as defined in 3GPP TS 24.008 or 3GPP TS 44.018) */ - proto_tree_add_text(ie_tree, tvb,offset,length,"Link Layer Service Data Unit (L3 Message)"); + proto_tree_add_text(ie_tree, tvb, offset, length, "Link Layer Service Data Unit (L3 Message)"); next_tvb = tvb_new_subset_length(tvb, offset, length); call_dissector(gsm_a_dtap_handle, next_tvb, pinfo, top_tree); } @@ -1323,7 +1323,7 @@ dissect_rsl_ie_ms_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_MS_ID) return offset; } @@ -1333,7 +1333,7 @@ dissect_rsl_ie_ms_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; @@ -1359,7 +1359,7 @@ dissect_rsl_ie_ms_pow(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, i guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_MS_POW) return offset; } @@ -1390,7 +1390,7 @@ dissect_rsl_ie_paging_grp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_PAGING_GRP) return offset; } @@ -1420,7 +1420,7 @@ dissect_rsl_ie_paging_load(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_PAGING_LOAD) return offset; } @@ -1451,7 +1451,7 @@ dissect_rsl_ie_phy_ctx(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_PHY_CTX) return offset; } @@ -1462,7 +1462,7 @@ dissect_rsl_ie_phy_ctx(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; @@ -1488,7 +1488,7 @@ dissect_rsl_ie_access_delay(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_ACCESS_DELAY) return offset; } @@ -1517,7 +1517,7 @@ dissect_rsl_ie_rach_load(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree int ie_offset; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_RACH_LOAD) return offset; } @@ -1528,7 +1528,7 @@ dissect_rsl_ie_rach_load(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; @@ -1554,7 +1554,7 @@ dissect_rsl_ie_rach_load(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree /* Supplementary Information */ if ( length > 0) { - proto_tree_add_text(ie_tree, tvb, offset,length ,"Supplementary Information"); + proto_tree_add_text(ie_tree, tvb, offset, length , "Supplementary Information"); } offset = ie_offset + length; @@ -1571,7 +1571,7 @@ dissect_rsl_ie_req_ref(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_REQ_REF) return offset; } @@ -1607,7 +1607,7 @@ dissect_rsl_ie_rel_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_REL_MODE) return offset; } @@ -1661,7 +1661,7 @@ dissect_rsl_ie_resource_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t int ie_offset; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_RESOURCE_INF) return offset; } @@ -1673,7 +1673,7 @@ dissect_rsl_ie_resource_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -1714,7 +1714,7 @@ dissect_rsl_ie_rlm_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_RLM_CAUSE) return offset; } @@ -1725,7 +1725,7 @@ dissect_rsl_ie_rlm_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -1735,7 +1735,7 @@ dissect_rsl_ie_rlm_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree * If the extension bit is set to 1, the Cause Value is a two octet field. */ /* XXX: Code doesn't reflect the comment above ?? */ - /* octet = tvb_get_guint8(tvb,offset); */ + /* octet = tvb_get_guint8(tvb, offset); */ proto_tree_add_item(tree, hf_rsl_extension_bit, tvb, offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(ie_tree, hf_rsl_cause, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; @@ -1753,7 +1753,7 @@ dissect_rsl_ie_starting_time(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_STARTING_TIME) return offset; } @@ -1783,7 +1783,7 @@ dissect_rsl_ie_timing_adv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_TIMING_ADV) return offset; } @@ -1818,7 +1818,7 @@ dissect_rsl_ie_uplik_meas(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_UPLINK_MEAS) return offset; } @@ -1830,7 +1830,7 @@ dissect_rsl_ie_uplik_meas(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -1891,7 +1891,7 @@ dissect_rsl_ie_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, in guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_CAUSE) return offset; } @@ -1902,14 +1902,14 @@ dissect_rsl_ie_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, in proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; ie_offset = offset; /* Cause Value */ - octet = tvb_get_guint8(tvb,offset); + octet = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_rsl_extension_bit, tvb, offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_rsl_class, tvb, offset, 1, ENC_BIG_ENDIAN); if ((octet & 0x80) == 0x80) @@ -1930,7 +1930,7 @@ dissect_rsl_ie_meas_res_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_MEAS_RES_NO) return offset; } @@ -1957,7 +1957,7 @@ dissect_rsl_ie_message_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_MESSAGE_ID) return offset; } @@ -2012,7 +2012,7 @@ dissect_rsl_ie_sys_info_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_SYS_INFO_TYPE) { *sys_info_type = 0xff; return offset; @@ -2046,7 +2046,7 @@ dissect_rsl_ie_full_imm_ass_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_FULL_IMM_ASS_INF) return offset; } @@ -2057,7 +2057,7 @@ dissect_rsl_ie_full_imm_ass_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -2067,7 +2067,7 @@ dissect_rsl_ie_full_imm_ass_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t * IMMEDIATE ASSIGNMENT EXTENDED or IMMEDIATE ASSIGNMENT REJECT) * as defined in 3GPP TS 44.018. */ - proto_tree_add_text(ie_tree, tvb,offset,length,"Full Immediate Assign Info field"); + proto_tree_add_text(ie_tree, tvb, offset, length, "Full Immediate Assign Info field"); next_tvb = tvb_new_subset_length(tvb, offset, length); call_dissector(gsm_a_ccch_handle, next_tvb, pinfo, top_tree); @@ -2093,7 +2093,7 @@ dissect_rsl_ie_smscb_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_SMSCB_INF) return offset; } @@ -2104,7 +2104,7 @@ dissect_rsl_ie_smscb_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -2131,7 +2131,7 @@ dissect_rsl_ie_ms_timing_offset(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_FULL_MS_TIMING_OFFSET) return offset; } @@ -2167,7 +2167,7 @@ dissect_rsl_ie_err_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int guint length; guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_ERR_MSG) return offset; } @@ -2178,7 +2178,7 @@ dissect_rsl_ie_err_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -2203,7 +2203,7 @@ dissect_rsl_ie_full_bcch_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_FULL_BCCH_INF) return offset; } @@ -2223,7 +2223,7 @@ dissect_rsl_ie_full_bcch_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * * Octets 3-25 contain the complete L3 message as defined in 3GPP TS 44.018. */ - proto_tree_add_text(ie_tree, tvb,offset,length,"Layer 3 message"); + proto_tree_add_text(ie_tree, tvb, offset, length, "Layer 3 message"); next_tvb = tvb_new_subset_length(tvb, offset, length); call_dissector(gsm_a_ccch_handle, next_tvb, pinfo, top_tree); @@ -2250,7 +2250,7 @@ dissect_rsl_ie_ch_needed(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_CH_NEEDED) return offset; } @@ -2278,7 +2278,7 @@ dissect_rsl_ie_cb_cmd_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_CB_CMD_TYPE) return offset; } @@ -2310,7 +2310,7 @@ dissect_rsl_ie_smscb_mess(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre int ie_offset; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_SMSCB_MESS) return offset; } @@ -2320,7 +2320,7 @@ dissect_rsl_ie_smscb_mess(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; @@ -2356,7 +2356,7 @@ dissect_rsl_ie_cbch_load_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * guint8 octet; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_CBCH_LOAD_INF) return offset; } @@ -2367,16 +2367,16 @@ dissect_rsl_ie_cbch_load_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - octet = tvb_get_guint8(tvb,offset); + octet = tvb_get_guint8(tvb, offset); /* CBCH Load Type */ proto_tree_add_item(ie_tree, hf_rsl_cbch_load_type, tvb, offset, 1, ENC_BIG_ENDIAN); /* Message Slot Count */ item = proto_tree_add_item(ie_tree, hf_rsl_msg_slt_cnt, tvb, offset, 1, ENC_BIG_ENDIAN); if ((octet & 0x80) == 0x80) { - proto_item_append_text(item,"The amount of SMSCB messages (1 to 15) that are needed immediately by BTS"); + proto_item_append_text(item, "The amount of SMSCB messages (1 to 15) that are needed immediately by BTS"); }else{ - proto_item_append_text(item,"The amount of delay in message slots (1 to 15) that is needed immediately by BTS"); + proto_item_append_text(item, "The amount of delay in message slots (1 to 15) that is needed immediately by BTS"); } offset++; @@ -2400,7 +2400,7 @@ dissect_rsl_ie_smscb_ch_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_SMSCB_CH_IND) return offset; } @@ -2430,7 +2430,7 @@ dissect_rsl_ie_grp_call_ref(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_GRP_CALL_REF) return offset; } @@ -2440,12 +2440,12 @@ dissect_rsl_ie_grp_call_ref(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_text(ie_tree, tvb,offset,length,"Descriptive group or broadcast call reference"); + proto_tree_add_text(ie_tree, tvb, offset, length, "Descriptive group or broadcast call reference"); /* The octets 3 to 7 are coded in the same way as the octets 2 to 6 * in the Descriptive group or broadcast call reference @@ -2469,7 +2469,7 @@ dissect_rsl_ie_ch_desc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_CH_DESC) return offset; } @@ -2479,12 +2479,12 @@ dissect_rsl_ie_ch_desc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_text(ie_tree, tvb,offset,length,"Group Channel Description"); + proto_tree_add_text(ie_tree, tvb, offset, length, "Group Channel Description"); /* Octet j (j = 3, 4, ..., n) is the unchanged octet j-2 of a radio interface Group Channel description * information element as defined in 3GPP TS 44.018, n-2 is equal to the length of the radio interface @@ -2507,7 +2507,7 @@ dissect_rsl_ie_nch_drx(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_NCH_DRX_INF) return offset; } @@ -2543,7 +2543,7 @@ dissect_rsl_ie_cmd_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8 octet; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_CMD_IND) return offset; } @@ -2561,7 +2561,7 @@ dissect_rsl_ie_cmd_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, /* TODO this should probably be add_uint instead!!! */ - octet = tvb_get_guint8(tvb,offset); + octet = tvb_get_guint8(tvb, offset); if ((octet & 0x80) == 0x80) { /* extended */ /* Command Extension */ @@ -2597,7 +2597,7 @@ dissect_rsl_ie_emlpp_prio(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_EMLPP_PRIO) return offset; } @@ -2629,7 +2629,7 @@ dissect_rsl_ie_uic(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_UIC) return offset; } @@ -2643,7 +2643,7 @@ dissect_rsl_ie_uic(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int /* Octet 3 bits 1 to 6 contain the radio interface octet 2 bits 3 to 8 of the * UIC information element as defined in 3GPP TS 44.018. */ - proto_tree_add_text(ie_tree, tvb,offset,1,"UIC"); + proto_tree_add_text(ie_tree, tvb, offset, 1, "UIC"); offset++; return offset; @@ -2660,7 +2660,7 @@ dissect_rsl_ie_main_ch_ref(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_MAIN_CH_REF) return offset; } @@ -2692,7 +2692,7 @@ dissect_rsl_ie_multirate_conf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_MULTIRATE_CONF) return offset; } @@ -2702,7 +2702,7 @@ dissect_rsl_ie_multirate_conf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; @@ -2728,7 +2728,7 @@ dissect_rsl_ie_multirate_cntrl(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_MULTIRATE_CNTRL) return offset; } @@ -2762,7 +2762,7 @@ dissect_rsl_ie_sup_codec_types(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_SUP_CODEC_TYPES) return offset; } @@ -2772,12 +2772,12 @@ dissect_rsl_ie_sup_codec_types(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_text(tree, tvb,offset,length,"Codec List"); + proto_tree_add_text(tree, tvb, offset, length, "Codec List"); /* The Codec List field (octet 4) lists the codec types that are supported * by the BSS and Transcoder, and are therefore potential candidates for TFO @@ -2829,7 +2829,7 @@ dissect_rsl_ie_codec_conf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_CODEC_CONF) return offset; } @@ -2839,7 +2839,7 @@ dissect_rsl_ie_codec_conf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Length */ - length = tvb_get_guint8(tvb,offset); + length = tvb_get_guint8(tvb, offset); proto_item_set_len(ti, length+2); proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; @@ -2869,7 +2869,7 @@ dissect_rsl_ie_rtd(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int guint8 rtd; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_RTD) return offset; } @@ -2883,9 +2883,9 @@ dissect_rsl_ie_rtd(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int /* The RTD field is the binary representation of the value of the * round trip delay in 20 ms increments. */ - rtd = (tvb_get_guint8(tvb,offset)>>1)*20; - rtd_item = proto_tree_add_uint(tree, hf_rsl_rtd, tvb,offset,1,rtd); - proto_item_append_text(rtd_item," ms"); + rtd = (tvb_get_guint8(tvb, offset)>>1)*20; + rtd_item = proto_tree_add_uint(tree, hf_rsl_rtd, tvb, offset, 1, rtd); + proto_item_append_text(rtd_item, " ms"); /* The Delay IND field indicates if the delay corresponds to a BTS * to transcoder delay or to a BTS to remote BTS delay. @@ -2912,7 +2912,7 @@ dissect_rsl_ie_tfo_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_TFO_STATUS) return offset; } @@ -2941,7 +2941,7 @@ dissect_rsl_ie_llp_apdu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_LLP_APDU) return offset; } @@ -2965,7 +2965,7 @@ dissect_rsl_ie_llp_apdu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, * octets defined in 3GPP TS 44.071. */ /* TODO: Given traces with LLP data this IE could be further dissected */ - proto_tree_add_text(tree, tvb,offset,length, + proto_tree_add_text(tree, tvb, offset, length, "Facility Information Element as defined in 3GPP TS 44.071"); return ie_offset + length; } @@ -2986,7 +2986,7 @@ dissect_rsl_ie_tfo_transp_cont(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree guint8 ie_id; if (is_mandatory == FALSE) { - ie_id = tvb_get_guint8(tvb,offset); + ie_id = tvb_get_guint8(tvb, offset); if (ie_id != RSL_IE_TFO_TRANSP_CONT) return offset; } @@ -3009,7 +3009,7 @@ dissect_rsl_ie_tfo_transp_cont(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * 3GPP TS 44.071 excluding the Facility IEI and length of Facility IEI * octets defined in 3GPP TS 44.071. */ - proto_tree_add_text(tree, tvb,offset,length, + proto_tree_add_text(tree, tvb, offset, length, "Embedded message that contains the TFO configuration"); return ie_offset + length; } @@ -3158,7 +3158,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) guint8 msg_disc, msg_type, sys_info_type; msg_disc = tvb_get_guint8(tvb, offset++) >> 1; - msg_type = tvb_get_guint8(tvb,offset) & 0x7f; + msg_type = tvb_get_guint8(tvb, offset) & 0x7f; proto_tree_add_item(tree, hf_rsl_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN); if (msg_disc == RSL_MSGDISC_IPACCESS) { @@ -3217,7 +3217,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Link Identifier 9.3.2 M TV 2 */ offset = dissect_rsl_ie_link_id(tvb, pinfo, tree, offset, TRUE); /* L3 Information 9.3.11 O (note 1) TLV 3-23 */ - if (tvb_length_remaining(tvb,offset) >1) + if (tvb_reported_length_remaining(tvb, offset) >1) offset = dissect_rsl_ie_L3_inf(tvb, pinfo, tree, offset, FALSE, L3_INF_OTHER); break; /* 8.3.7 RELEASE REQUEST */ @@ -3250,7 +3250,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Link Identifier 9.3.2 M TV 2 */ offset = dissect_rsl_ie_link_id(tvb, pinfo, tree, offset, TRUE); /* L3 Information 9.3.11 O (note 1) TLV 3-23 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_L3_inf(tvb, pinfo, tree, offset, FALSE, L3_INF_OTHER); break; /* Common Channel Management/TRX Management messages */ @@ -3261,10 +3261,10 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* System Info Type 9.3.30 M TV 2 */ offset = dissect_rsl_ie_sys_info_type(tvb, pinfo, tree, offset, TRUE, &sys_info_type); /* Full BCCH Info (SYS INFO) 9.3.39 O 1) TLV 25 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_full_bcch_inf(tvb, pinfo, tree, offset, TRUE); /* Starting Time 9.3.23 O 2) TV 3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_starting_time(tvb, pinfo, tree, offset, FALSE); break; /* 8.5.2 CCCH LOAD INDICATION 18*/ @@ -3275,7 +3275,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* RACH Load 9.3.18 C 1) TLV >=8 */ offset = dissect_rsl_ie_rach_load(tvb, pinfo, tree, offset, FALSE); /* Paging Load 9.3.15 C 2) TV 3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_paging_load(tvb, pinfo, tree, offset, FALSE); break; /* 8.5.3 */ @@ -3287,7 +3287,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Access Delay 9.3.17 M TV 2 */ offset = dissect_rsl_ie_access_delay(tvb, pinfo, tree, offset, TRUE); /* Physical Context 9.3.16 O 1) TLV >=2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_phy_ctx(tvb, pinfo, tree, offset, FALSE); break; /* 8.5.4 DELETE INDICATION */ @@ -3305,10 +3305,10 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* MS Identity 9.3.12 M TLV 2-10 2 */ offset = dissect_rsl_ie_ms_id(tvb, pinfo, tree, offset, TRUE); /* Channel Needed 9.3.40 O 1) TV 2 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_ch_needed(tvb, pinfo, tree, offset, FALSE); /* eMLPP Priority 9.3.49 O 2) TV 2 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_emlpp_prio(tvb, pinfo, tree, offset, FALSE); break; /* 8.5.6 IMMEDIATE ASSIGN COMMAND */ @@ -3325,7 +3325,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* SMSCB Information 9.3.36 M TV 24 */ offset = dissect_rsl_ie_smscb_inf(tvb, pinfo, tree, offset, TRUE); /* SMSCB Channel Indicator 9.3.44 O 1) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_smscb_ch_ind(tvb, pinfo, tree, offset, FALSE); break; /* 8.6 TRX MANAGEMENT MESSAGES */ @@ -3339,11 +3339,11 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* System Info Type 9.3.30 M TV 2 */ offset = dissect_rsl_ie_sys_info_type(tvb, pinfo, tree, offset, TRUE, &sys_info_type); /* L3 Info (SYS INFO) 9.3.11 O 1) TLV 22 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_L3_inf(tvb, pinfo, tree, offset, FALSE, (sys_info_type == 0x48) ? L3_INF_SACCH : L3_INF_OTHER); /* Starting Time 9.3.23 O 2) TV 3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_starting_time(tvb, pinfo, tree, offset, FALSE); break; case RSL_MSG_OVERLOAD: /* 27 8.6.3 */ @@ -3354,16 +3354,16 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Cause 9.3.26 M TLV >=3 */ offset = dissect_rsl_ie_cause(tvb, pinfo, tree, offset, TRUE); /* Message Identifier 9.3.28 O 1) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_message_id(tvb, pinfo, tree, offset, FALSE); /* Channel Number 9.3.1 O 2) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); /* Link identifier 9.3.2 O 3) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_link_id(tvb, pinfo, tree, offset, TRUE); /* Erroneous Message 9.3.38 O 4) TLV >=3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_err_msg(tvb, pinfo, tree, offset, TRUE); break; /* 8.5.8 SMS BROADCAST COMMAND */ @@ -3375,7 +3375,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* SMSCB message 9.3.42 M TLV 2-90 */ offset = dissect_rsl_ie_smscb_mess(tvb, pinfo, tree, offset, TRUE); /* SMSCB Channel Indicator 9.3.44 O 1) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_smscb_ch_ind(tvb, pinfo, tree, offset, FALSE); break; case RSL_MSG_CBCH_LOAD_IND: /* 30 8.5.9 */ @@ -3384,7 +3384,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* CBCH Load Information 9.3.43 M TV 2 */ offset = dissect_rsl_ie_cbch_load_inf(tvb, pinfo, tree, offset, TRUE); /* SMSCB Channel Indicator 9.3.44 O 1) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_smscb_ch_ind(tvb, pinfo, tree, offset, FALSE); break; case RSL_MSG_NOT_CMD: /* 31 8.5.10 */ @@ -3393,13 +3393,13 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Command indicator 9.3.48 M 1) TLV 3-4 */ offset = dissect_rsl_ie_cmd_ind(tvb, pinfo, tree, offset, TRUE); /* Group call reference 9.3.45 O TLV 7 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_grp_call_ref(tvb, pinfo, tree, offset, FALSE); /* Channel Description 9.3.46 O TLV 3-n */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_ch_desc(tvb, pinfo, tree, offset, FALSE); /* NCH DRX information 9.3.47 O TLV 3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_nch_drx(tvb, pinfo, tree, offset, FALSE); break; @@ -3413,46 +3413,46 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Channel Mode 9.3.6 M TLV 8-9 */ offset = dissect_rsl_ie_ch_mode(tvb, pinfo, tree, offset, TRUE); /* Channel Identification 9.3.5 O 7) TLV 8 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_ch_id(tvb, pinfo, tree, offset, FALSE); /* Encryption information 9.3.7 O 1) TLV >=3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_enc_inf(tvb, pinfo, tree, offset, FALSE); /* Handover Reference 9.3.9 C 2) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_ho_ref(tvb, pinfo, tree, offset, FALSE); /* BS Power 9.3.4 O 3) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_bs_power(tvb, pinfo, tree, offset, FALSE); /* MS Power 9.3.13 O 3) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_ms_pow(tvb, pinfo, tree, offset, FALSE); /* Timing Advance 9.3.24 C 3) 4) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_timing_adv(tvb, pinfo, tree, offset, FALSE); /* BS Power Parameters 9.3.32 O 5) TLV >=2 */ /* MS Power Parameters 9.3.31 O 5) TLV >=2 */ /* Physical Context 9.3.16 O 6) TLV >=2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_phy_ctx(tvb, pinfo, tree, offset, FALSE); /* SACCH Information 9.3.29 O 8) TLV >=3 */ /* UIC 9.3.50 O 9) TLV 3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_uic(tvb, pinfo, tree, offset, FALSE); /* Main channel reference 9.3.51 O 10) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_main_ch_ref(tvb, pinfo, tree, offset, FALSE); /* MultiRate configuration 9.3.52 O 11) TLV >=4 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_multirate_conf(tvb, pinfo, tree, offset, FALSE); /* MultiRate Control 9.3.53 O 12) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_multirate_cntrl(tvb, pinfo, tree, offset, FALSE); /* Supported Codec Types 9.3.54 O 12) TLV >=5 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_sup_codec_types(tvb, pinfo, tree, offset, FALSE); /* TFO transparent container 9.3.59 O 12) TLV >=3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_tfo_transp_cont(tvb, pinfo, tree, offset, FALSE); break; @@ -3498,7 +3498,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Channel number 9.3.1 M TV 2 */ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); /* Access Delay 9.3.17 O 1) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_access_delay(tvb, pinfo, tree, offset, FALSE); break; /* 8.4.8 MEASUREMENT RESULT 40 */ @@ -3512,10 +3512,10 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* BS Power 9.3.4 M TV 2 */ offset = dissect_rsl_ie_bs_power(tvb, pinfo, tree, offset, TRUE); /* L1 Information 9.3.10 O 1) TV 3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_l1_inf(tvb, pinfo, tree, offset, FALSE); /* L3 Info (MEAS REP, EXT MEAS REP or ENH MEAS REP) 9.3.11 O 1) TLV 21 */ - if (tvb_length_remaining(tvb,offset) > 0){ + if (tvb_reported_length_remaining(tvb, offset) > 0){ /* Try to figure out of we have (MEAS REP, EXT MEAS REP or ENH MEAS REP) */ if ( ( tvb_get_guint8(tvb, offset+3) & 0xFE ) == 0x10 ) { /* ENH MEAS REP */ @@ -3525,7 +3525,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) } } /* MS Timing Offset 9.3.37 O 2) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_ms_timing_offset(tvb, pinfo, tree, offset, FALSE); break; /* 8.4.9 MODE MODIFY */ @@ -3535,22 +3535,22 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Channel Mode 9.3.6 M TLV 8-9 */ offset = dissect_rsl_ie_ch_mode(tvb, pinfo, tree, offset, TRUE); /* Encryption information 9.3.7 O 1) TLV >=3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_enc_inf(tvb, pinfo, tree, offset, FALSE); /* Main channel reference 9.3.45 O 2) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_main_ch_ref(tvb, pinfo, tree, offset, FALSE); /* MultiRate configuration 9.3.52 O 3) TLV >=3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_multirate_conf(tvb, pinfo, tree, offset, FALSE); /* Multirate Control 9.3.53 O 4) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_multirate_cntrl(tvb, pinfo, tree, offset, FALSE); /* Supported Codec Types 9.3.54 O 4) TLV >=5 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_sup_codec_types(tvb, pinfo, tree, offset, FALSE); /* TFO transparent container 9.3.59 O 4) TLV */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_tfo_transp_cont(tvb, pinfo, tree, offset, FALSE); break; /* 8.4.10 MODE MODIFY ACKNOWLEDGE */ @@ -3581,7 +3581,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Timing Advance 9.3.24 M TV 2 */ offset = dissect_rsl_ie_timing_adv(tvb, pinfo, tree, offset, TRUE); /* Physical Context 9.3.16 O 1) TLV */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_phy_ctx(tvb, pinfo, tree, offset, FALSE); break; /* 8.4.14 RF CHANNEL RELEASE */ @@ -3594,7 +3594,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Channel number 9.3.1 M TV 2 */ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); /* MS Power 9.3.13 M TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_ms_pow(tvb, pinfo, tree, offset, FALSE); /* MS Power Parameters 9.3.31 O 1) TLV >=2 */ break; @@ -3630,11 +3630,11 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* System Info Type 9.3.30 M TV 2 */ offset = dissect_rsl_ie_sys_info_type(tvb, pinfo, tree, offset, TRUE, &sys_info_type); /* L3 Info 9.3.11 O 1) TLV 22 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_L3_inf(tvb, pinfo, tree, offset, FALSE, (sys_info_type == 0x48) ? L3_INF_SACCH : L3_INF_OTHER); /* Starting Time 9.3.23 O 2) TV 3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_starting_time(tvb, pinfo, tree, offset, FALSE); break; /* 8.4.21 TALKER DETECTION */ @@ -3642,7 +3642,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Channel number 9.3.1 M TV 2 */ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); /* Access Delay 9.3.17 O 1) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); break; /* 8.4.22 LISTENER DETECTION */ @@ -3650,7 +3650,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Channel number 9.3.1 M TV 2 */ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); /* Access Delay 9.3.17 O 1) TV 2 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); break; /* 8.4.23 REMOTE CODEC CONFIGURATION REPORT */ @@ -3660,10 +3660,10 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Codec Configuration 9.3.55 M TLV >=3 */ offset = dissect_rsl_ie_codec_conf(tvb, pinfo, tree, offset, TRUE); /* Supported Codec Types 9.3.54 M TLV >=5 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_sup_codec_types(tvb, pinfo, tree, offset, FALSE); /* TFO transparent container 9.3.59 O 4) TLV >=3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_tfo_transp_cont(tvb, pinfo, tree, offset, FALSE); break; /* 8.4.24 ROUND TRIP DELAY REPORT */ @@ -3682,7 +3682,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Codec Configuration 9.3.55 M TLV >=3 */ offset = dissect_rsl_ie_codec_conf(tvb, pinfo, tree, offset, TRUE); /* TFO transparent container 9.3.59 O 4) TLV >=3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_tfo_transp_cont(tvb, pinfo, tree, offset, FALSE); break; /* 8.4.26 MULTIRATE CODEC MODIFICATION REQUEST */ @@ -3690,7 +3690,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Channel number 9.3.1 M TV 2 */ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); /* MultiRate Configuration 9.3.52 O 1) TLV >=4 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_multirate_conf(tvb, pinfo, tree, offset, FALSE); break; /* 8.4.27 MULTIRATE CODEC MODIFICATION ACKNOWLEDGE */ @@ -3698,7 +3698,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* Channel number 9.3.1 M TV 2 */ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); /* MultiRate Configuration 9.3.52 O 1) TLV >=4 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_multirate_conf(tvb, pinfo, tree, offset, FALSE); break; /* 8.4.28 MULTIRATE CODEC MODIFICATION NEGATIVE ACKNOWLEDGE */ @@ -3729,10 +3729,10 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) /* MultiRateControl 9.3.53 M TV 2 */ offset = dissect_rsl_ie_multirate_cntrl(tvb, pinfo, tree, offset, TRUE); /* Supported Codec Type 9.3.54 O 1) TLV >=5 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_sup_codec_types(tvb, pinfo, tree, offset, FALSE); /* TFO transparent container 9.3.59 O 4) TLV >=3 */ - if (tvb_length_remaining(tvb,offset) > 0) + if (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_rsl_ie_tfo_transp_cont(tvb, pinfo, tree, offset, FALSE); break; /* 0 1 - - - - - - Location Services messages: */ @@ -3808,30 +3808,28 @@ dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) col_set_str(pinfo->cinfo, COL_PROTOCOL, "RSL"); col_clear(pinfo->cinfo, COL_INFO); - msg_type = tvb_get_guint8(tvb,offset+1) & 0x7f; + msg_type = tvb_get_guint8(tvb, offset+1) & 0x7f; - col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",val_to_str_ext(msg_type, &rsl_msg_type_vals_ext,"unknown %u")); + col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str_ext(msg_type, &rsl_msg_type_vals_ext, "unknown %u")); top_tree = tree; - /* if (tree) */ { - ti = proto_tree_add_item(tree, proto_rsl, tvb, 0, -1, ENC_NA); + ti = proto_tree_add_item(tree, proto_rsl, tvb, 0, -1, ENC_NA); - /* if nanoBTS specific vendor messages are not enabled, skip */ - if (!global_rsl_use_nano_bts) { - guint8 msg_disc = tvb_get_guint8(tvb, offset) >> 1; + /* if nanoBTS specific vendor messages are not enabled, skip */ + if (!global_rsl_use_nano_bts) { + guint8 msg_disc = tvb_get_guint8(tvb, offset) >> 1; - if (msg_disc == RSL_MSGDISC_IPACCESS) - return 0; - } - rsl_tree = proto_item_add_subtree(ti, ett_rsl); + if (msg_disc == RSL_MSGDISC_IPACCESS) + return 0; + } + rsl_tree = proto_item_add_subtree(ti, ett_rsl); - /* 9.1 Message discriminator */ - proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, ENC_BIG_ENDIAN); + /* 9.1 Message discriminator */ + proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, ENC_BIG_ENDIAN); - offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset); + offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset); - } return offset; } @@ -4341,71 +4339,71 @@ void proto_register_rsl(void) * statement in dissct_rsl_ipaccess_msg() doesn't contain explicit code * to decode them (yet?). */ - RSL_ATT_TLVDEF(RSL_IE_CH_NO, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_LINK_ID, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_ACT_TYPE, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_BS_POW, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_CH_ID, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_CH_MODE, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_ENC_INF, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_FRAME_NO, TLV_TYPE_FIXED, 2); - RSL_ATT_TLVDEF(RSL_IE_HO_REF, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_L1_INF, TLV_TYPE_FIXED, 2); - RSL_ATT_TLVDEF(RSL_IE_L3_INF, TLV_TYPE_TL16V, 0); - RSL_ATT_TLVDEF(RSL_IE_MS_ID, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_MS_POW, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_PAGING_GRP, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_PAGING_LOAD, TLV_TYPE_FIXED, 2); - RSL_ATT_TLVDEF(RSL_IE_PHY_CTX, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_ACCESS_DELAY, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_RACH_LOAD, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_REQ_REF, TLV_TYPE_FIXED, 3); - RSL_ATT_TLVDEF(RSL_IE_REL_MODE, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_RESOURCE_INF, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_RLM_CAUSE, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_STARTING_TIME, TLV_TYPE_FIXED, 2); - RSL_ATT_TLVDEF(RSL_IE_TIMING_ADV, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_UPLINK_MEAS, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_CAUSE, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_MEAS_RES_NO, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_MESSAGE_ID, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_SYS_INFO_TYPE, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_MS_POWER_PARAM, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_BS_POWER_PARAM, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_PREPROC_PARAM, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_PREPROC_MEAS, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_ERR_MSG, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_FULL_BCCH_INF, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_CH_NEEDED, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_CB_CMD_TYPE, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_SMSCB_MESS, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_FULL_IMM_ASS_INF, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_CBCH_LOAD_INF, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_SMSCB_CH_IND, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_GRP_CALL_REF, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_CH_DESC, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_NCH_DRX_INF, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_CMD_IND, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_EMLPP_PRIO, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_UIC, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_MAIN_CH_REF, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_MULTIRATE_CONF, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_MULTIRATE_CNTRL, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_SUP_CODEC_TYPES, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_CODEC_CONF, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_RTD, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_TFO_STATUS, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_LLP_APDU, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_IPAC_REMOTE_IP, TLV_TYPE_FIXED, 4); - RSL_ATT_TLVDEF(RSL_IE_IPAC_REMOTE_PORT, TLV_TYPE_FIXED, 2); - RSL_ATT_TLVDEF(RSL_IE_IPAC_LOCAL_IP, TLV_TYPE_FIXED, 4); - RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_STAT, TLV_TYPE_TLV, 0); - RSL_ATT_TLVDEF(RSL_IE_IPAC_LOCAL_PORT, TLV_TYPE_FIXED, 2); - RSL_ATT_TLVDEF(RSL_IE_IPAC_SPEECH_MODE, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_ID, TLV_TYPE_FIXED, 2); - RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_PAYLOAD2,TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_PAYLOAD, TLV_TYPE_TV, 0); - RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_CSD_FMT, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_CH_NO, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_LINK_ID, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_ACT_TYPE, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_BS_POW, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_CH_ID, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_CH_MODE, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_ENC_INF, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_FRAME_NO, TLV_TYPE_FIXED, 2); + RSL_ATT_TLVDEF(RSL_IE_HO_REF, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_L1_INF, TLV_TYPE_FIXED, 2); + RSL_ATT_TLVDEF(RSL_IE_L3_INF, TLV_TYPE_TL16V, 0); + RSL_ATT_TLVDEF(RSL_IE_MS_ID, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_MS_POW, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_PAGING_GRP, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_PAGING_LOAD, TLV_TYPE_FIXED, 2); + RSL_ATT_TLVDEF(RSL_IE_PHY_CTX, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_ACCESS_DELAY, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_RACH_LOAD, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_REQ_REF, TLV_TYPE_FIXED, 3); + RSL_ATT_TLVDEF(RSL_IE_REL_MODE, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_RESOURCE_INF, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_RLM_CAUSE, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_STARTING_TIME, TLV_TYPE_FIXED, 2); + RSL_ATT_TLVDEF(RSL_IE_TIMING_ADV, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_UPLINK_MEAS, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_CAUSE, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_MEAS_RES_NO, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_MESSAGE_ID, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_SYS_INFO_TYPE, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_MS_POWER_PARAM, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_BS_POWER_PARAM, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_PREPROC_PARAM, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_PREPROC_MEAS, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_ERR_MSG, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_FULL_BCCH_INF, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_CH_NEEDED, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_CB_CMD_TYPE, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_SMSCB_MESS, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_FULL_IMM_ASS_INF, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_CBCH_LOAD_INF, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_SMSCB_CH_IND, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_GRP_CALL_REF, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_CH_DESC, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_NCH_DRX_INF, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_CMD_IND, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_EMLPP_PRIO, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_UIC, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_MAIN_CH_REF, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_MULTIRATE_CONF, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_MULTIRATE_CNTRL, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_SUP_CODEC_TYPES, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_CODEC_CONF, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_RTD, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_TFO_STATUS, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_LLP_APDU, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_IPAC_REMOTE_IP, TLV_TYPE_FIXED, 4); + RSL_ATT_TLVDEF(RSL_IE_IPAC_REMOTE_PORT, TLV_TYPE_FIXED, 2); + RSL_ATT_TLVDEF(RSL_IE_IPAC_LOCAL_IP, TLV_TYPE_FIXED, 4); + RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_STAT, TLV_TYPE_TLV, 0); + RSL_ATT_TLVDEF(RSL_IE_IPAC_LOCAL_PORT, TLV_TYPE_FIXED, 2); + RSL_ATT_TLVDEF(RSL_IE_IPAC_SPEECH_MODE, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_ID, TLV_TYPE_FIXED, 2); + RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_PAYLOAD2, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_PAYLOAD, TLV_TYPE_TV, 0); + RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_CSD_FMT, TLV_TYPE_TV, 0); /* Register the protocol name and description */ proto_rsl = proto_register_protocol("Radio Signalling Link (RSL)", "RSL", "gsm_abis_rsl"); |