aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mac-lte.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2009-05-14 17:12:37 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2009-05-14 17:12:37 +0000
commit4a16f077ce47dd19914526416ec3259a21850524 (patch)
treecbbf542278c70aa52510345bf219fedde20ea730 /epan/dissectors/packet-mac-lte.c
parente5aead71d1fa5dc93c832c0daac055839eae46eb (diff)
Backoff Indicator must now (March 09) be the first subheader in an RAR PDU.
svn path=/trunk/; revision=28360
Diffstat (limited to 'epan/dissectors/packet-mac-lte.c')
-rw-r--r--epan/dissectors/packet-mac-lte.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index 5a861aa186..272b018299 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -513,6 +513,8 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_item(rar_header_tree, hf_mac_lte_rar_t, tvb, offset, 1, FALSE);
if (type_value == 0) {
+ /* Backoff Indicator (BI) case */
+
guint8 reserved;
guint8 backoff_indicator;
proto_item *ti;
@@ -529,6 +531,8 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Backoff Indicator */
backoff_indicator = tvb_get_guint8(tvb, offset) & 0x0f;
bi_ti = proto_tree_add_item(rar_header_tree, hf_mac_lte_rar_bi, tvb, offset, 1, FALSE);
+
+ /* As of March 2009 spec, it must be first, and may only appear once */
if (backoff_indicator_seen) {
expert_add_info_format(pinfo, bi_ti, PI_MALFORMED, PI_ERROR,
"MAC RAR PDU has > 1 Backoff Indicator subheader present");
@@ -541,6 +545,11 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
col_append_fstr(pinfo->cinfo, COL_INFO, " (Backoff Indicator=%sms)",
val_to_str(backoff_indicator, rar_bi_vals, "Illegal value"));
}
+ if (number_of_rars > 0) {
+ expert_add_info_format(pinfo, bi_ti, PI_MALFORMED, PI_WARN,
+ "Backoff Indicator should only appear as first subheader");
+ }
+
}
else {
/* RAPID case */