diff options
-rw-r--r-- | epan/dissectors/packet-rlc-lte.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c index 5231979340..2392ed70de 100644 --- a/epan/dissectors/packet-rlc-lte.c +++ b/epan/dissectors/packet-rlc-lte.c @@ -2179,15 +2179,38 @@ static void dissect_rlc_lte_am(tvbuff_t *tvb, packet_info *pinfo, offset = dissect_rlc_lte_extension_header(tvb, pinfo, tree, offset); } + /* Header is now complete */ + proto_item_set_len(am_header_ti, offset-start_offset); + + /* Extract these 2 flags from framing_info */ + first_includes_start = (framing_info & 0x02) == 0; + last_includes_end = (framing_info & 0x01) == 0; + /* There might not be any data, if only headers (plus control data) were logged */ if (global_rlc_lte_headers_expected) { is_truncated = (tvb_length_remaining(tvb, offset) == 0); truncated_ti = proto_tree_add_uint(tree, hf_rlc_lte_header_only, tvb, 0, 0, is_truncated); if (is_truncated) { + int n; PROTO_ITEM_SET_GENERATED(truncated_ti); expert_add_info_format(pinfo, truncated_ti, PI_SEQUENCE, PI_NOTE, "RLC PDU SDUs have been omitted"); + /* Show in the info column how long the data would be */ + for (n=0; n < s_number_of_extensions; n++) { + show_PDU_in_info(pinfo, top_ti, s_lengths[n], + (n==0) ? first_includes_start : TRUE, + TRUE); + offset += s_lengths[n]; + } + /* Last one */ + if (p_rlc_lte_info->pduLength > offset) { + show_PDU_in_info(pinfo, top_ti, p_rlc_lte_info->pduLength - offset, + (s_number_of_extensions == 0) ? first_includes_start : TRUE, + last_includes_end); + } + + /* Just return now */ return; } else { @@ -2195,14 +2218,6 @@ static void dissect_rlc_lte_am(tvbuff_t *tvb, packet_info *pinfo, } } - /* Head is now complete */ - proto_item_set_len(am_header_ti, offset-start_offset); - - /* Extract these 2 flags from framing_info */ - first_includes_start = (framing_info & 0x02) == 0; - last_includes_end = (framing_info & 0x01) == 0; - - /* Call sequence analysis function now */ if (((global_rlc_lte_am_sequence_analysis == SEQUENCE_ANALYSIS_MAC_ONLY) && (p_get_proto_data(pinfo->fd, proto_mac_lte) != NULL)) || |