aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rlc-lte.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2011-12-01 13:53:09 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2011-12-01 13:53:09 +0000
commitee5bfb35a355b9db2b85d26e36b1d5171d305c0c (patch)
tree46edd9295d168dc7c54d10519f08f50f12bbc6e3 /epan/dissectors/packet-rlc-lte.c
parent819f2fd1ac7309d82a61895e67c76308cf685f2c (diff)
When have RLC PDUs that are truncated after headers:
- set extent of headers item properly - show in the info column what the data would look like, based upon reported length and segment offsets svn path=/trunk/; revision=40062
Diffstat (limited to 'epan/dissectors/packet-rlc-lte.c')
-rw-r--r--epan/dissectors/packet-rlc-lte.c31
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)) ||