aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2018-07-25 22:50:18 +0100
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2018-07-26 10:09:40 +0000
commitb0315ff22222aba08efbe9764757bdc879a25071 (patch)
tree61eb47cb539f808f029287f61ca47a11f35d08d9
parent8a0cbd49ad03495670e5803cbad9d083779ba351 (diff)
MAC-LTE: Add framing/heuristic support for SR entries.
Change-Id: Ibd1df6d904b164aec74afa7d6b259bf202808c8c Reviewed-on: https://code.wireshark.org/review/28854 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
-rw-r--r--epan/dissectors/packet-mac-lte.c23
-rw-r--r--epan/dissectors/packet-mac-lte.h4
2 files changed, 27 insertions, 0 deletions
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index f57c2928d7..40eefb5f31 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -2616,6 +2616,29 @@ gboolean dissect_mac_lte_context_fields(struct mac_lte_info *p_mac_lte_info, tv
}
}
break;
+ case MAC_LTE_SR_TAG:
+ {
+ int n;
+ // Read number of entries.
+ guint16 no_entries = tvb_get_ntohs(tvb, offset);
+ offset += 2;
+ if ((no_entries == 0) || (no_entries > MAX_SRs)) {
+ return FALSE;
+ }
+ else {
+ p_mac_lte_info->oob_event = ltemac_send_sr;
+ p_mac_lte_info->number_of_srs = no_entries;
+ }
+
+ // Read each entry.
+ for (n=0; n < no_entries; n++) {
+ p_mac_lte_info->oob_ueid[n] = tvb_get_ntohs(tvb, offset);
+ offset += 2;
+ p_mac_lte_info->oob_rnti[n] = tvb_get_ntohs(tvb, offset);
+ offset += 2;
+ }
+ }
+ break;
case MAC_LTE_PAYLOAD_TAG:
/* Have reached data, so set payload length and get out of loop */
diff --git a/epan/dissectors/packet-mac-lte.h b/epan/dissectors/packet-mac-lte.h
index 8d43e2c10c..9d797a5e0c 100644
--- a/epan/dissectors/packet-mac-lte.h
+++ b/epan/dissectors/packet-mac-lte.h
@@ -295,6 +295,10 @@ int is_mac_lte_frame_retx(packet_info *pinfo, guint8 direction);
#define MAC_LTE_N_UL_RB_TAG 0x10
/* 1 byte containing the number of UL resource blocks: 6, 15, 25, 50, 75 or 100 */
+#define MAC_LTE_SR_TAG 0x11
+/* 2 bytes for the number of items, followed by that number of ueid, rnti (2 bytes each) */
+
+
/* MAC PDU. Following this tag comes the actual MAC PDU (there is no length, the PDU
continues until the end of the frame) */
#define MAC_LTE_PAYLOAD_TAG 0x01