aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2016-01-24 22:07:19 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-01-25 06:36:40 +0000
commit8ffa274729a3e0a81b795683dec6b5b679fa27f6 (patch)
treee149ddafc391854892be22297d31a0a6342dde77
parent099698445b5cd60b00777ae47f68fba620fa975e (diff)
MAC LTE: upgrade dissector to v13.0.0
Change-Id: I1a0e575acc83b88d595111809ca03e4bdf479619 Reviewed-on: https://code.wireshark.org/review/13516 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r--epan/dissectors/packet-mac-lte.c519
-rw-r--r--epan/dissectors/packet-mac-lte.h2
2 files changed, 424 insertions, 97 deletions
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index 870edd8c50..306daf76ec 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -35,7 +35,7 @@ void proto_reg_handoff_mac_lte(void);
/* Described in:
* 3GPP TS 36.321 Evolved Universal Terrestrial Radio Access (E-UTRA)
- * Medium Access Control (MAC) protocol specification v12.7.0
+ * Medium Access Control (MAC) protocol specification v13.0.0
*/
@@ -45,6 +45,13 @@ int proto_mac_lte = -1;
static int mac_lte_tap = -1;
static dissector_handle_t rlc_lte_handle;
+static dissector_handle_t lte_rrc_bcch_dl_sch_handle;
+static dissector_handle_t lte_rrc_bcch_bch_handle;
+static dissector_handle_t lte_rrc_pcch_handle;
+static dissector_handle_t lte_rrc_ul_ccch_handle;
+static dissector_handle_t lte_rrc_dl_ccch_handle;
+static dissector_handle_t lte_rrc_sbcch_sl_bch_handle;
+static dissector_handle_t lte_rrc_sc_mcch_handle;
/* Decoding context */
static int hf_mac_lte_context = -1;
@@ -113,12 +120,14 @@ static int hf_mac_lte_slsch_header = -1;
static int hf_mac_lte_slsch_subheader = -1;
static int hf_mac_lte_sch_reserved = -1;
+static int hf_mac_lte_sch_format2 = -1;
static int hf_mac_lte_dlsch_lcid = -1;
static int hf_mac_lte_ulsch_lcid = -1;
static int hf_mac_lte_sch_extended = -1;
static int hf_mac_lte_sch_format = -1;
static int hf_mac_lte_sch_length = -1;
static int hf_mac_lte_mch_reserved = -1;
+static int hf_mac_lte_mch_format2 = -1;
static int hf_mac_lte_mch_lcid = -1;
static int hf_mac_lte_mch_extended = -1;
static int hf_mac_lte_mch_format = -1;
@@ -235,14 +244,38 @@ static int hf_mac_lte_control_activation_deactivation_c3 = -1;
static int hf_mac_lte_control_activation_deactivation_c2 = -1;
static int hf_mac_lte_control_activation_deactivation_c1 = -1;
static int hf_mac_lte_control_activation_deactivation_reserved = -1;
+static int hf_mac_lte_control_activation_deactivation_c15 = -1;
+static int hf_mac_lte_control_activation_deactivation_c14 = -1;
+static int hf_mac_lte_control_activation_deactivation_c13 = -1;
+static int hf_mac_lte_control_activation_deactivation_c12 = -1;
+static int hf_mac_lte_control_activation_deactivation_c11 = -1;
+static int hf_mac_lte_control_activation_deactivation_c10 = -1;
+static int hf_mac_lte_control_activation_deactivation_c9 = -1;
+static int hf_mac_lte_control_activation_deactivation_c8 = -1;
+static int hf_mac_lte_control_activation_deactivation_c23 = -1;
+static int hf_mac_lte_control_activation_deactivation_c22 = -1;
+static int hf_mac_lte_control_activation_deactivation_c21 = -1;
+static int hf_mac_lte_control_activation_deactivation_c20 = -1;
+static int hf_mac_lte_control_activation_deactivation_c19 = -1;
+static int hf_mac_lte_control_activation_deactivation_c18 = -1;
+static int hf_mac_lte_control_activation_deactivation_c17 = -1;
+static int hf_mac_lte_control_activation_deactivation_c16 = -1;
+static int hf_mac_lte_control_activation_deactivation_c31 = -1;
+static int hf_mac_lte_control_activation_deactivation_c30 = -1;
+static int hf_mac_lte_control_activation_deactivation_c29 = -1;
+static int hf_mac_lte_control_activation_deactivation_c28 = -1;
+static int hf_mac_lte_control_activation_deactivation_c27 = -1;
+static int hf_mac_lte_control_activation_deactivation_c26 = -1;
+static int hf_mac_lte_control_activation_deactivation_c25 = -1;
+static int hf_mac_lte_control_activation_deactivation_c24 = -1;
static int hf_mac_lte_control_mch_scheduling_info = -1;
static int hf_mac_lte_control_mch_scheduling_info_lcid = -1;
static int hf_mac_lte_control_mch_scheduling_info_stop_mtch = -1;
static int hf_mac_lte_control_sidelink_bsr = -1;
-static int hf_mac_lte_control_sidelink_bsr_group_idx_odd = -1;
+static int hf_mac_lte_control_sidelink_bsr_destination_idx_odd = -1;
static int hf_mac_lte_control_sidelink_bsr_lcg_id_odd = -1;
static int hf_mac_lte_control_sidelink_bsr_buffer_size_odd = -1;
-static int hf_mac_lte_control_sidelink_bsr_group_idx_even = -1;
+static int hf_mac_lte_control_sidelink_bsr_destination_idx_even = -1;
static int hf_mac_lte_control_sidelink_bsr_lcg_id_even = -1;
static int hf_mac_lte_control_sidelink_bsr_buffer_size_even = -1;
static int hf_mac_lte_control_sidelink_reserved = -1;
@@ -355,6 +388,9 @@ static expert_field ei_mac_lte_dlsch_lcid = EI_INIT;
static expert_field ei_mac_lte_padding_data_before_control_subheader = EI_INIT;
static expert_field ei_mac_lte_rach_preamble_sent_warn = EI_INIT;
static expert_field ei_mac_lte_no_per_frame_data = EI_INIT;
+static expert_field ei_mac_lte_sch_invalid_length = EI_INIT;
+static expert_field ei_mac_lte_mch_invalid_length = EI_INIT;
+static expert_field ei_mac_lte_invalid_sc_mcch_sc_mtch_subheader_multiplexing = EI_INIT;
/* Constants and value strings */
@@ -386,6 +422,8 @@ static const value_string rnti_type_vals[] =
{ M_RNTI, "M-RNTI"},
{ SL_BCH_RNTI, "SL-BCH-RNTI"},
{ SL_RNTI, "SL-RNTI"},
+ { SC_RNTI, "SC-RNTI"},
+ { G_RNTI, "G-RNTI"},
{ 0, NULL }
};
@@ -468,6 +506,8 @@ static const true_false_string mac_lte_scell_status_vals = {
"Deactivated"
};
+#define ACTIVATION_DEACTIVATION_4_BYTES_LCID 0x18
+#define SC_MCCH_SC_MTCH_LCID 0x19
#define LONG_DRX_COMMAND_LCID 0x1a
#define ACTIVATION_DEACTIVATION_LCID 0x1b
#define UE_CONTENTION_RESOLUTION_IDENTITY_LCID 0x1c
@@ -488,6 +528,8 @@ static const value_string dlsch_lcid_vals[] =
{ 8, "8"},
{ 9, "9"},
{ 10, "10"},
+ { ACTIVATION_DEACTIVATION_4_BYTES_LCID , "Activation/Deactivation"},
+ { SC_MCCH_SC_MTCH_LCID , "SC-MCCH/SC-MTCH"},
{ LONG_DRX_COMMAND_LCID , "Long DRX Command"},
{ ACTIVATION_DEACTIVATION_LCID , "Activation/Deactivation"},
{ UE_CONTENTION_RESOLUTION_IDENTITY_LCID, "UE Contention Resolution Identity"},
@@ -585,17 +627,24 @@ static const value_string slsch_lcid_vals[] =
{ 8, "8"},
{ 9, "9"},
{ 10, "10"},
+ { 28, "PC5-S messages that are not protected"},
+ { 29, "PC5-S messages \"Direct Security Mode Command\" and \"Direct Security Mode Complete\""},
+ { 30, "Other PC5-S messages that are protected"},
{ PADDING_LCID, "Padding" },
{ 0, NULL }
};
-static const value_string format_vals[] =
+static const true_false_string format_vals =
{
- { 0, "Data length is < 128 bytes"},
- { 1, "Data length is >= 128 bytes"},
- { 0, NULL }
+ "Data length is >= 128 bytes",
+ "Data length is < 128 bytes"
};
+static const true_false_string format2_vals =
+{
+ "Data length is >= 32768 bytes",
+ "Data length is < 32768 bytes"
+};
static const value_string rar_type_vals[] =
{
@@ -2102,6 +2151,9 @@ gboolean dissect_mac_lte_context_fields(struct mac_lte_info *p_mac_lte_info, tv
/* Initialize RNTI with a default value in case optional field is not present */
switch (p_mac_lte_info->rntiType) {
+ case SC_RNTI:
+ p_mac_lte_info->rnti = 0xFFFB;
+ break;
case M_RNTI:
p_mac_lte_info->rnti = 0xFFFD;
break;
@@ -2115,6 +2167,7 @@ gboolean dissect_mac_lte_context_fields(struct mac_lte_info *p_mac_lte_info, tv
case C_RNTI:
case SPS_RNTI:
case SL_RNTI:
+ case G_RNTI:
p_mac_lte_info->rnti = 0x0001;
break;
default:
@@ -2823,10 +2876,10 @@ static void dissect_bch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Get appropriate dissector handle */
dissector_handle_t protocol_handle = 0;
if (p_mac_lte_info->rntiType == SI_RNTI) {
- protocol_handle = find_dissector("lte_rrc.bcch_dl_sch");
+ protocol_handle = lte_rrc_bcch_dl_sch_handle;
}
else {
- protocol_handle = find_dissector("lte_rrc.bcch_bch");
+ protocol_handle = lte_rrc_bcch_bch_handle;
}
/* Hide raw view of bytes */
@@ -2868,14 +2921,11 @@ static void dissect_pch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Attempt to decode payload using LTE RRC dissector */
tvbuff_t *rrc_tvb = tvb_new_subset_remaining(tvb, offset);
- /* Get appropriate dissector handle */
- dissector_handle_t protocol_handle = find_dissector("lte_rrc.pcch");
-
/* Hide raw view of bytes */
PROTO_ITEM_SET_HIDDEN(ti);
/* Call it (catch exceptions so that stats will be updated) */
- call_with_catch_all(protocol_handle, rrc_tvb, pinfo, tree);
+ call_with_catch_all(lte_rrc_pcch_handle, rrc_tvb, pinfo, tree);
}
/* Check that this *is* downlink! */
@@ -2905,6 +2955,7 @@ static int is_fixed_sized_control_element(guint8 lcid, guint8 direction)
else {
/* Assume Downlink */
switch (lcid) {
+ case ACTIVATION_DEACTIVATION_4_BYTES_LCID:
case ACTIVATION_DEACTIVATION_LCID:
case UE_CONTENTION_RESOLUTION_IDENTITY_LCID:
case TIMING_ADVANCE_LCID:
@@ -3719,7 +3770,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Keep track of LCIDs and lengths as we dissect the header */
guint16 number_of_headers = 0;
guint8 lcids[MAX_HEADERS_IN_PDU];
- gint16 pdu_lengths[MAX_HEADERS_IN_PDU];
+ gint32 pdu_lengths[MAX_HEADERS_IN_PDU];
proto_item *pdu_header_ti;
proto_tree *pdu_header_tree;
@@ -3727,6 +3778,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
gboolean have_seen_data_header = FALSE;
guint8 number_of_padding_subheaders = 0;
gboolean have_seen_non_padding_control = FALSE;
+ gboolean have_seen_sc_mcch_sc_mtch_header = FALSE;
gboolean have_seen_bsr = FALSE;
gboolean expecting_body_data = FALSE;
guint32 is_truncated = FALSE;
@@ -3810,7 +3862,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/************************************************************************/
/* Dissect each sub-header. */
do {
- guint8 reserved, initial_lcid;
+ guint8 reserved, format2, initial_lcid;
guint64 length = 0;
proto_item *pdu_subheader_ti;
proto_tree *pdu_subheader_tree;
@@ -3829,16 +3881,21 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
pdu_subheader_tree = proto_item_add_subtree(pdu_subheader_ti,
ett_mac_lte_sch_subheader);
- /* Check 1st 2 reserved bits */
- reserved = (first_byte & 0xc0) >> 6;
+ /* Check 1st reserved bit */
+ reserved = (first_byte & 0x80) >> 7;
ti = proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_sch_reserved,
tvb, offset, 1, ENC_BIG_ENDIAN);
if (reserved != 0) {
expert_add_info_format(pinfo, ti, &ei_mac_lte_reserved_not_zero,
- "%cL-SCH header Reserved bits not zero",
+ "%cL-SCH header Reserved bit not zero",
(p_mac_lte_info->direction == DIRECTION_UPLINK) ? 'U' : 'D');
}
+ /* Format2 bit */
+ format2 = (first_byte & 0x40) >> 6;
+ proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_sch_format2,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+
/* Extended bit */
extension = (first_byte & 0x20) >> 5;
proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_sch_extended,
@@ -3885,13 +3942,16 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
have_seen_data_header = TRUE;
expecting_body_data = TRUE;
}
+ if (lcids[number_of_headers] == SC_MCCH_SC_MTCH_LCID) {
+ have_seen_sc_mcch_sc_mtch_header = TRUE;
+ }
/* Show an expert item if a control subheader (except Padding) appears
*after* a data PDU */
- if (have_seen_data_header &&
- (lcids[number_of_headers] > 10) && (lcids[number_of_headers] != PADDING_LCID)) {
+ if (have_seen_data_header && (lcids[number_of_headers] > 10) &&
+ (lcids[number_of_headers] != PADDING_LCID) && (lcids[number_of_headers] != SC_MCCH_SC_MTCH_LCID)) {
expert_add_info_format(pinfo, lcid_ti, &ei_mac_lte_control_subheader_after_data_subheader,
- "%cL-SCH Control subheaders should not appear after data subheaders",
+ "%cL-SCH control subheaders should not appear after data subheaders",
(p_mac_lte_info->direction == DIRECTION_UPLINK) ? 'U' : 'D');
return;
}
@@ -3906,8 +3966,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
/* Should not see padding after non-padding control... */
- if ((lcids[number_of_headers] > 10) &&
- (lcids[number_of_headers] == PADDING_LCID) &&
+ if ((lcids[number_of_headers] == PADDING_LCID) &&
extension)
{
number_of_padding_subheaders++;
@@ -3929,10 +3988,16 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Remember that we've seen non-padding control */
if ((lcids[number_of_headers] > 10) &&
- (lcids[number_of_headers] != PADDING_LCID)) {
+ (lcids[number_of_headers] != PADDING_LCID) &&
+ (lcids[number_of_headers] != SC_MCCH_SC_MTCH_LCID)) {
have_seen_non_padding_control = TRUE;
}
+ /* Ensure that SC-MCCH or SC-MTCH header is not multiplexed with other LCID than Padding */
+ if (have_seen_sc_mcch_sc_mtch_header && (have_seen_data_header || have_seen_non_padding_control)) {
+ expert_add_info(pinfo, lcid_ti, &ei_mac_lte_invalid_sc_mcch_sc_mtch_subheader_multiplexing);
+ return;
+ }
/********************************************************************/
@@ -3952,28 +4017,39 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
if (!is_fixed_sized_control_element(lcids[number_of_headers], p_mac_lte_info->direction) &&
(lcids[number_of_headers] != PADDING_LCID)) {
- guint8 format;
+ if (format2) {
+ /* >= 32768 - use 16 bits */
+ ti = proto_tree_add_bits_ret_val(pdu_subheader_tree, hf_mac_lte_sch_length,
+ tvb, offset*8, 16, &length, ENC_BIG_ENDIAN);
+ if (length < 32768) {
+ expert_add_info(pinfo, ti, &ei_mac_lte_sch_invalid_length);
+ }
- /* F(ormat) bit tells us how long the length field is */
- format = (tvb_get_guint8(tvb, offset) & 0x80) >> 7;
- proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_sch_format,
- tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 2;
+ } else {
+ guint8 format;
- /* Now read length field itself */
- if (format) {
- /* >= 128 - use 15 bits */
- proto_tree_add_bits_ret_val(pdu_subheader_tree, hf_mac_lte_sch_length,
- tvb, offset*8 + 1, 15, &length, ENC_BIG_ENDIAN);
+ /* F(ormat) bit tells us how long the length field is */
+ format = (tvb_get_guint8(tvb, offset) & 0x80) >> 7;
+ proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_sch_format,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 2;
- }
- else {
- /* Less than 128 - only 7 bits */
- proto_tree_add_bits_ret_val(pdu_subheader_tree, hf_mac_lte_sch_length,
- tvb, offset*8 + 1, 7, &length, ENC_BIG_ENDIAN);
- offset++;
+ /* Now read length field itself */
+ if (format) {
+ /* >= 128 - use 15 bits */
+ proto_tree_add_bits_ret_val(pdu_subheader_tree, hf_mac_lte_sch_length,
+ tvb, offset*8 + 1, 15, &length, ENC_BIG_ENDIAN);
+
+ offset += 2;
+ }
+ else {
+ /* Less than 128 - only 7 bits */
+ proto_tree_add_bits_ret_val(pdu_subheader_tree, hf_mac_lte_sch_length,
+ tvb, offset*8 + 1, 7, &length, ENC_BIG_ENDIAN);
+ offset++;
+ }
}
- pdu_lengths[number_of_headers] = (gint16)length;
+ pdu_lengths[number_of_headers] = (gint32)length;
}
else {
pdu_lengths[number_of_headers] = 0;
@@ -4082,7 +4158,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
for (n=0; n < number_of_headers; n++) {
/* Get out of loop once see any data SDU subheaders */
- if (lcids[n] <= 10) {
+ if ((lcids[n] <= 10) || (lcids[n] == SC_MCCH_SC_MTCH_LCID)) {
break;
}
@@ -4093,6 +4169,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* DL-SCH Control PDUs */
switch (lcids[n]) {
case ACTIVATION_DEACTIVATION_LCID:
+ case ACTIVATION_DEACTIVATION_4_BYTES_LCID:
{
proto_item *ad_ti;
proto_tree *ad_tree;
@@ -4129,6 +4206,59 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
"Activation/Deactivation Reserved bit not zero");
}
offset++;
+ if (lcids[n] == ACTIVATION_DEACTIVATION_4_BYTES_LCID) {
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c15,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c14,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c13,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c12,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c11,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c10,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c9,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c8,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c23,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c22,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c21,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c20,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c19,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c18,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c17,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c16,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c31,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c30,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c29,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c28,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c27,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c26,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c25,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ad_tree, hf_mac_lte_control_activation_deactivation_c24,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+ }
}
break;
case UE_CONTENTION_RESOLUTION_IDENTITY_LCID:
@@ -4151,9 +4281,8 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
tvb, offset, 6, ENC_NA);
if (global_mac_lte_decode_cr_body) {
tvbuff_t *cr_body_tvb = tvb_new_subset_length(tvb, offset, 6);
- dissector_handle_t ul_ccch_handle = find_dissector("lte_rrc.ul_ccch");
- if (ul_ccch_handle != 0) {
- call_with_catch_all(ul_ccch_handle, cr_body_tvb, pinfo, cr_tree);
+ if (lte_rrc_ul_ccch_handle != 0) {
+ call_with_catch_all(lte_rrc_ul_ccch_handle, cr_body_tvb, pinfo, cr_tree);
}
}
@@ -4298,7 +4427,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
if (pdu_lengths[n] == -1) {
/* Control Element size is the remaining PDU */
- pdu_lengths[n] = (gint16)tvb_reported_length_remaining(tvb, curr_offset);
+ pdu_lengths[n] = (gint32)tvb_reported_length_remaining(tvb, curr_offset);
}
/* Create SLBSR root */
if (lcids[n] == SIDELINK_BSR) {
@@ -4316,16 +4445,16 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
slbsr_tree = proto_item_add_subtree(slbsr_ti, ett_mac_lte_sidelink_bsr);
- while ((gint16)(curr_offset - offset) < pdu_lengths[n]) {
- proto_tree_add_item(slbsr_tree, hf_mac_lte_control_sidelink_bsr_group_idx_odd,
+ while ((gint32)(curr_offset - offset) < pdu_lengths[n]) {
+ proto_tree_add_item(slbsr_tree, hf_mac_lte_control_sidelink_bsr_destination_idx_odd,
tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(slbsr_tree, hf_mac_lte_control_sidelink_bsr_lcg_id_odd,
tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(slbsr_tree, hf_mac_lte_control_sidelink_bsr_buffer_size_odd,
tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset++;
- if ((gint16)(curr_offset - offset) < (pdu_lengths[n] - 1)) {
- proto_tree_add_item(slbsr_tree, hf_mac_lte_control_sidelink_bsr_group_idx_even,
+ if ((gint32)(curr_offset - offset) < (pdu_lengths[n] - 1)) {
+ proto_tree_add_item(slbsr_tree, hf_mac_lte_control_sidelink_bsr_destination_idx_even,
tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
proto_tree_add_item(slbsr_tree, hf_mac_lte_control_sidelink_bsr_lcg_id_even,
@@ -4372,7 +4501,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
if (pdu_lengths[n] == -1) {
/* Control Element size is the remaining PDU */
- pdu_lengths[n] = (gint16)tvb_reported_length_remaining(tvb, curr_offset);
+ pdu_lengths[n] = (gint32)tvb_reported_length_remaining(tvb, curr_offset);
}
/* Create DCPHR root */
@@ -4383,6 +4512,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
"Dual Connectivity Power Headroom");
dcphr_tree = proto_item_add_subtree(dcphr_ti, ett_mac_lte_dual_conn_power_headroom);
+ /* TODO: add support for 4 bytes long SCell index */
scell_bitmap = tvb_get_guint8(tvb, curr_offset);
proto_tree_add_item(dcphr_tree, hf_mac_lte_control_dual_conn_power_headroom_c7,
tvb, curr_offset, 1, ENC_BIG_ENDIAN);
@@ -4533,7 +4663,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
}
}
- if ((gint16)(curr_offset - offset) != pdu_lengths[n]) {
+ if ((gint32)(curr_offset - offset) != pdu_lengths[n]) {
expert_add_info_format(pinfo, dcphr_ti, &ei_mac_lte_control_element_size_invalid,
"Control Element has an unexpected size (computed=%d, actual=%d)",
curr_offset - offset, pdu_lengths[n]);
@@ -4571,6 +4701,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
"Extended Power Headroom");
ephr_tree = proto_item_add_subtree(ephr_ti, ett_mac_lte_extended_power_headroom);
+ /* TODO: add support for extendedPHR2 */
scell_bitmap = tvb_get_guint8(tvb, curr_offset);
proto_tree_add_item(ephr_tree, hf_mac_lte_control_ext_power_headroom_c7,
tvb, curr_offset, 1, ENC_BIG_ENDIAN);
@@ -4611,14 +4742,14 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
computed_header_offset++;
}
- if (((gint16)(computed_header_offset + 1 - curr_offset) != pdu_lengths[n]) ||
+ if (((gint32)(computed_header_offset + 1 - curr_offset) != pdu_lengths[n]) ||
p_mac_lte_info->isSimultPUCCHPUSCHPCell) {
/* PH Type 2 might be present */
if ((tvb_get_guint8(tvb, computed_header_offset) & 0x40) == 0) {
computed_header_offset++;
}
computed_header_offset++;
- if ((gint16)(computed_header_offset + 1 - curr_offset) != pdu_lengths[n]) {
+ if ((gint32)(computed_header_offset + 1 - curr_offset) != pdu_lengths[n]) {
expert_add_info_format(pinfo, ephr_ti, &ei_mac_lte_control_element_size_invalid,
"Control Element has an unexpected size (computed=%d, actual=%d)",
computed_header_offset + 1 - curr_offset, pdu_lengths[n]);
@@ -5055,10 +5186,10 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Get appropriate dissector handle */
dissector_handle_t protocol_handle = 0;
if (p_mac_lte_info->direction == DIRECTION_UPLINK) {
- protocol_handle = find_dissector("lte_rrc.ul_ccch");
+ protocol_handle = lte_rrc_ul_ccch_handle;
}
else {
- protocol_handle = find_dissector("lte_rrc.dl_ccch");
+ protocol_handle = lte_rrc_dl_ccch_handle;
}
/* Hide raw view of bytes */
@@ -5140,6 +5271,17 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
+ else if ((lcids[n] == SC_MCCH_SC_MTCH_LCID) && (p_mac_lte_info->rntiType == SC_RNTI)
+ && global_mac_lte_attempt_rrc_decode) {
+ tvbuff_t *rrc_tvb = tvb_new_subset_length(tvb, offset, data_length);
+
+ /* Hide raw view of bytes */
+ PROTO_ITEM_SET_HIDDEN(sdu_ti);
+ rlc_called_for_sdu = TRUE;
+
+ call_with_catch_all(lte_rrc_sc_mcch_handle, rrc_tvb, pinfo, tree);
+ }
+
/* Show bytes too, if won't be hidden (slow). There must be a nicer way of doing this! */
if (!rlc_called_for_sdu) {
if (pdu_lengths[n] >= 30)
@@ -5226,7 +5368,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
/* Keep track of LCIDs and lengths as we dissect the header */
guint16 number_of_headers = 0;
guint8 lcids[MAX_HEADERS_IN_PDU];
- gint16 pdu_lengths[MAX_HEADERS_IN_PDU];
+ gint32 pdu_lengths[MAX_HEADERS_IN_PDU];
proto_item *pdu_header_ti, *sched_info_ti = NULL;
proto_tree *pdu_header_tree;
@@ -5255,7 +5397,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
/************************************************************************/
/* Dissect each sub-header. */
do {
- guint8 reserved;
+ guint8 reserved, format2;
guint64 length = 0;
proto_item *pdu_subheader_ti;
proto_tree *pdu_subheader_tree;
@@ -5274,8 +5416,8 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
pdu_subheader_tree = proto_item_add_subtree(pdu_subheader_ti,
ett_mac_lte_mch_subheader);
- /* Check 1st 2 reserved bits */
- reserved = (first_byte & 0xc0) >> 6;
+ /* Check 1st reserved bit */
+ reserved = (first_byte & 0x80) >> 7;
ti = proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_mch_reserved,
tvb, offset, 1, ENC_BIG_ENDIAN);
if (reserved != 0) {
@@ -5283,6 +5425,11 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
"MCH header Reserved bits not zero");
}
+ /* Format2 bit */
+ format2 = (first_byte & 0x40) >> 6;
+ proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_mch_format2,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+
/* Extended bit */
extension = (first_byte & 0x20) >> 5;
proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_mch_extended,
@@ -5350,28 +5497,39 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
/* Not the last one */
if (lcids[number_of_headers] != PADDING_LCID) {
- guint8 format;
-
- /* F(ormat) bit tells us how long the length field is */
- format = (tvb_get_guint8(tvb, offset) & 0x80) >> 7;
- proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_mch_format,
- tvb, offset, 1, ENC_BIG_ENDIAN);
-
- /* Now read length field itself */
- if (format) {
- /* >= 128 - use 15 bits */
+ if (format2) {
+ /* >= 32578 - use 16 bits */
proto_tree_add_bits_ret_val(pdu_subheader_tree, hf_mac_lte_mch_length,
- tvb, offset*8 + 1, 15, &length, ENC_BIG_ENDIAN);
+ tvb, offset*8, 16, &length, ENC_BIG_ENDIAN);
+ if (length < 32768) {
+ expert_add_info(pinfo, ti, &ei_mac_lte_mch_invalid_length);
+ }
offset += 2;
+ } else {
+ guint8 format;
+
+ /* F(ormat) bit tells us how long the length field is */
+ format = (tvb_get_guint8(tvb, offset) & 0x80) >> 7;
+ proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_mch_format,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+
+ /* Now read length field itself */
+ if (format) {
+ /* >= 128 - use 15 bits */
+ proto_tree_add_bits_ret_val(pdu_subheader_tree, hf_mac_lte_mch_length,
+ tvb, offset*8 + 1, 15, &length, ENC_BIG_ENDIAN);
+
+ offset += 2;
+ }
+ else {
+ /* Less than 128 - only 7 bits */
+ proto_tree_add_bits_ret_val(pdu_subheader_tree, hf_mac_lte_mch_length,
+ tvb, offset*8 + 1, 7, &length, ENC_BIG_ENDIAN);
+ offset++;
+ }
}
- else {
- /* Less than 128 - only 7 bits */
- proto_tree_add_bits_ret_val(pdu_subheader_tree, hf_mac_lte_mch_length,
- tvb, offset*8 + 1, 7, &length, ENC_BIG_ENDIAN);
- offset++;
- }
- pdu_lengths[number_of_headers] = (gint16)length;
+ pdu_lengths[number_of_headers] = (gint32)length;
}
else {
pdu_lengths[number_of_headers] = 0;
@@ -5639,13 +5797,10 @@ static void dissect_sl_bch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Attempt to decode payload using LTE RRC dissector */
tvbuff_t *rrc_tvb = tvb_new_subset_remaining(tvb, offset);
- /* Get appropriate dissector handle */
- dissector_handle_t protocol_handle = find_dissector("lte_rrc.sbcch_sl_bch");
-
/* Hide raw view of bytes */
PROTO_ITEM_SET_HIDDEN(ti);
- call_with_catch_all(protocol_handle, rrc_tvb, pinfo, tree);
+ call_with_catch_all(lte_rrc_sbcch_sl_bch_handle, rrc_tvb, pinfo, tree);
}
}
@@ -6233,6 +6388,7 @@ int dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
case C_RNTI:
case SPS_RNTI:
case SL_RNTI:
+ case G_RNTI:
if ((p_mac_lte_info->rnti < 0x0001) || (p_mac_lte_info->rnti > 0xFFF3)) {
expert_add_info_format(pinfo, ti, &ei_mac_lte_context_rnti_type,
"%s indicated, but given value %u (0x%x) is out of range",
@@ -6339,7 +6495,9 @@ int dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
/* Add hidden item to filter on */
if ((p_mac_lte_info->rntiType == C_RNTI) ||
- (p_mac_lte_info->rntiType == SPS_RNTI)) {
+ (p_mac_lte_info->rntiType == SPS_RNTI) ||
+ (p_mac_lte_info->rntiType == SC_RNTI) ||
+ (p_mac_lte_info->rntiType == G_RNTI)) {
hidden_root_ti = proto_tree_add_string_format(tree,
(p_mac_lte_info->direction == DIRECTION_UPLINK) ?
hf_mac_lte_ulsch :
@@ -6431,6 +6589,8 @@ int dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
case C_RNTI:
case SPS_RNTI:
+ case SC_RNTI:
+ case G_RNTI:
/* Can be UL-SCH or DL-SCH */
dissect_ulsch_or_dlsch(tvb, pinfo, mac_lte_tree, pdu_ti, offset,
p_mac_lte_info, tap_info, retx_ti,
@@ -7076,8 +7236,14 @@ void proto_register_mac_lte(void)
}
},
{ &hf_mac_lte_sch_reserved,
- { "SCH reserved bits",
- "mac-lte.sch.reserved", FT_UINT8, BASE_HEX, NULL, 0xc0,
+ { "SCH reserved bit",
+ "mac-lte.sch.reserved", FT_UINT8, BASE_HEX, NULL, 0x80,
+ NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_sch_format2,
+ { "Format2",
+ "mac-lte.sch.format2", FT_BOOLEAN, 8, TFS(&format2_vals), 0x40,
NULL, HFILL
}
},
@@ -7101,7 +7267,7 @@ void proto_register_mac_lte(void)
},
{ &hf_mac_lte_sch_format,
{ "Format",
- "mac-lte.sch.format", FT_UINT8, BASE_HEX, VALS(format_vals), 0x80,
+ "mac-lte.sch.format", FT_BOOLEAN, 8, TFS(&format_vals), 0x80,
NULL, HFILL
}
},
@@ -7113,7 +7279,13 @@ void proto_register_mac_lte(void)
},
{ &hf_mac_lte_mch_reserved,
{ "MCH reserved bits",
- "mac-lte.mch.reserved", FT_UINT8, BASE_HEX, NULL, 0xc0,
+ "mac-lte.mch.reserved", FT_UINT8, BASE_HEX, NULL, 0x80,
+ NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_mch_format2,
+ { "Format2",
+ "mac-lte.mch.format2", FT_BOOLEAN, 8, TFS(&format2_vals), 0x40,
NULL, HFILL
}
},
@@ -7131,7 +7303,7 @@ void proto_register_mac_lte(void)
},
{ &hf_mac_lte_mch_format,
{ "Format",
- "mac-lte.mch.format", FT_UINT8, BASE_HEX, VALS(format_vals), 0x80,
+ "mac-lte.mch.format", FT_BOOLEAN, 8, TFS(&format_vals), 0x80,
NULL, HFILL
}
},
@@ -7185,7 +7357,7 @@ void proto_register_mac_lte(void)
},
{ &hf_mac_lte_slsch_format,
{ "Format",
- "mac-lte.slsch.format", FT_UINT8, BASE_HEX, VALS(format_vals), 0x80,
+ "mac-lte.slsch.format", FT_BOOLEAN, 8, TFS(&format_vals), 0x80,
NULL, HFILL
}
},
@@ -7781,6 +7953,150 @@ void proto_register_mac_lte(void)
NULL, 0x01, "Reserved bit, should be 0", HFILL
}
},
+ { &hf_mac_lte_control_activation_deactivation_c15,
+ { "SCell Index 15 Status",
+ "mac-lte.control.activation-deactivation.c15", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x80, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c14,
+ { "SCell Index 14 Status",
+ "mac-lte.control.activation-deactivation.c14", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x40, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c13,
+ { "SCell Index 13 Status",
+ "mac-lte.control.activation-deactivation.c13", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x20, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c12,
+ { "SCell Index 12 Status",
+ "mac-lte.control.activation-deactivation.c12", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x10, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c11,
+ { "SCell Index 11 Status",
+ "mac-lte.control.activation-deactivation.c11", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x08, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c10,
+ { "SCell Index 10 Status",
+ "mac-lte.control.activation-deactivation.c10", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x04, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c9,
+ { "SCell Index 9 Status",
+ "mac-lte.control.activation-deactivation.c9", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x02, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c8,
+ { "SCell Index 8 Status",
+ "mac-lte.control.activation-deactivation.c8", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x01, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c23,
+ { "SCell Index 23 Status",
+ "mac-lte.control.activation-deactivation.c23", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x80, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c22,
+ { "SCell Index 22 Status",
+ "mac-lte.control.activation-deactivation.c22", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x40, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c21,
+ { "SCell Index 21 Status",
+ "mac-lte.control.activation-deactivation.c21", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x20, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c20,
+ { "SCell Index 20 Status",
+ "mac-lte.control.activation-deactivation.c20", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x10, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c19,
+ { "SCell Index 19 Status",
+ "mac-lte.control.activation-deactivation.c19", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x08, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c18,
+ { "SCell Index 18 Status",
+ "mac-lte.control.activation-deactivation.c18", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x04, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c17,
+ { "SCell Index 17 Status",
+ "mac-lte.control.activation-deactivation.c17", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x02, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c16,
+ { "SCell Index 16 Status",
+ "mac-lte.control.activation-deactivation.c16", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x01, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c31,
+ { "SCell Index 31 Status",
+ "mac-lte.control.activation-deactivation.c31", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x80, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c30,
+ { "SCell Index 30 Status",
+ "mac-lte.control.activation-deactivation.c30", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x40, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c29,
+ { "SCell Index 29 Status",
+ "mac-lte.control.activation-deactivation.c29", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x20, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c28,
+ { "SCell Index 28 Status",
+ "mac-lte.control.activation-deactivation.c28", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x10, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c27,
+ { "SCell Index 27 Status",
+ "mac-lte.control.activation-deactivation.c27", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x08, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c26,
+ { "SCell Index 26 Status",
+ "mac-lte.control.activation-deactivation.c26", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x04, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c25,
+ { "SCell Index 25 Status",
+ "mac-lte.control.activation-deactivation.c25", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x02, NULL, HFILL
+ }
+ },
+ { &hf_mac_lte_control_activation_deactivation_c24,
+ { "SCell Index 24 Status",
+ "mac-lte.control.activation-deactivation.c24", FT_BOOLEAN, 8,
+ TFS(&mac_lte_scell_status_vals), 0x01, NULL, HFILL
+ }
+ },
{ &hf_mac_lte_control_mch_scheduling_info,
{ "MCH Scheduling Information",
@@ -7807,9 +8123,9 @@ void proto_register_mac_lte(void)
NULL, HFILL
}
},
- { &hf_mac_lte_control_sidelink_bsr_group_idx_odd,
- { "Group Index",
- "mac-lte.control.sidelink-bsr.group-idx", FT_UINT8, BASE_DEC, NULL, 0xf0,
+ { &hf_mac_lte_control_sidelink_bsr_destination_idx_odd,
+ { "Destination Index",
+ "mac-lte.control.sidelink-bsr.destination-idx", FT_UINT8, BASE_DEC, NULL, 0xf0,
NULL, HFILL
}
},
@@ -7825,9 +8141,9 @@ void proto_register_mac_lte(void)
"Buffer Size available in all channels in group", HFILL
}
},
- { &hf_mac_lte_control_sidelink_bsr_group_idx_even,
- { "Group Index",
- "mac-lte.control.sidelink-bsr.group-idx", FT_UINT8, BASE_DEC, NULL, 0x0f,
+ { &hf_mac_lte_control_sidelink_bsr_destination_idx_even,
+ { "Destination Index",
+ "mac-lte.control.sidelink-bsr.destination-idx", FT_UINT8, BASE_DEC, NULL, 0x0f,
NULL, HFILL
}
},
@@ -8121,6 +8437,9 @@ void proto_register_mac_lte(void)
{ &ei_mac_lte_ul_mac_frame_retx, { "mac-lte.ul-mac-frame-retx", PI_SEQUENCE, PI_WARN, "UL MAC frame ReTX", EXPFILL }},
{ &ei_mac_lte_context_crc_status, { "mac-lte.crc-status.error", PI_MALFORMED, PI_ERROR, "Frame has CRC error problem", EXPFILL }},
{ &ei_mac_lte_no_per_frame_data, { "mac-lte.no_per_frame_data", PI_UNDECODED, PI_WARN, "Can't dissect LTE MAC frame because no per-frame info was attached!", EXPFILL }},
+ { &ei_mac_lte_sch_invalid_length, { "mac-lte.sch.invalid-length", PI_MALFORMED, PI_WARN, "Invalid PDU length (should be >= 32768)", EXPFILL }},
+ { &ei_mac_lte_mch_invalid_length, { "mac-lte.mch.invalid-length", PI_MALFORMED, PI_WARN, "Invalid PDU length (should be >= 32768)", EXPFILL }},
+ { &ei_mac_lte_invalid_sc_mcch_sc_mtch_subheader_multiplexing, { "mac-lte.mch.invalid-sc-mcch-sc-mtch-subheader-multiplexing", PI_MALFORMED, PI_ERROR, "SC-MCCH/SC-MTCH header multiplexed with non padding", EXPFILL }},
};
static const enum_val_t show_info_col_vals[] = {
@@ -8268,8 +8587,14 @@ void proto_reg_handoff_mac_lte(void)
/* Add as a heuristic UDP dissector */
heur_dissector_add("udp", dissect_mac_lte_heur, "MAC-LTE over UDP", "mac_lte_udp", proto_mac_lte, HEURISTIC_DISABLE);
- /* Look up RLC dissector handle once and for all */
rlc_lte_handle = find_dissector("rlc-lte");
+ lte_rrc_bcch_dl_sch_handle = find_dissector("lte_rrc.bcch_dl_sch");
+ lte_rrc_bcch_bch_handle = find_dissector("lte_rrc.bcch_bch");
+ lte_rrc_pcch_handle = find_dissector("lte_rrc.pcch");
+ lte_rrc_ul_ccch_handle = find_dissector("lte_rrc.ul_ccch");
+ lte_rrc_dl_ccch_handle = find_dissector("lte_rrc.dl_ccch");
+ lte_rrc_sbcch_sl_bch_handle = find_dissector("lte_rrc.sbcch_sl_bch");
+ lte_rrc_sc_mcch_handle = find_dissector("lte_rrc.sc_mcch");
}
/*
diff --git a/epan/dissectors/packet-mac-lte.h b/epan/dissectors/packet-mac-lte.h
index 70e0bac08c..f0428be5c0 100644
--- a/epan/dissectors/packet-mac-lte.h
+++ b/epan/dissectors/packet-mac-lte.h
@@ -67,6 +67,8 @@
#define M_RNTI 6
#define SL_BCH_RNTI 7
#define SL_RNTI 8
+#define SC_RNTI 9
+#define G_RNTI 10
typedef enum mac_lte_oob_event {
ltemac_send_preamble,