aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mac-lte.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-09-05 01:05:16 +0000
committerMichael Mann <mmann78@netscape.net>2013-09-05 01:05:16 +0000
commite65df7f453b4a2c7fcab788777c89c03eb12ed42 (patch)
tree929d33a0ca9a29a8bf98e1750979852260af397e /epan/dissectors/packet-mac-lte.c
parent03fd39d7f0c409a45e422d9142b48536ec5c8647 (diff)
Batch of filterable expert info.
Some of the FT_NONE hf_ variables were removed in favor of proto_tree_add_expert. It may also be possible to remove some of the booleans surrounding the expert info. New expert display filters may need to be double-checked to make sure they make sense. svn path=/trunk/; revision=51760
Diffstat (limited to 'epan/dissectors/packet-mac-lte.c')
-rw-r--r--epan/dissectors/packet-mac-lte.c273
1 files changed, 146 insertions, 127 deletions
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index 7ab5da0ef3..96b93d7385 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -99,9 +99,7 @@ static int hf_mac_lte_context_phy_dl_tb = -1;
/* Out-of-band events */
static int hf_mac_lte_oob_send_preamble = -1;
-static int hf_mac_lte_oob_send_sr = -1;
static int hf_mac_lte_number_of_srs = -1;
-static int hf_mac_lte_oob_sr_failure = -1;
/* MAC SCH/MCH header fields */
static int hf_mac_lte_ulsch = -1;
@@ -227,7 +225,6 @@ static int hf_mac_lte_grant_answering_sr = -1;
static int hf_mac_lte_failure_answering_sr = -1;
static int hf_mac_lte_sr_leading_to_failure = -1;
static int hf_mac_lte_sr_leading_to_grant = -1;
-static int hf_mac_lte_sr_invalid_event = -1;
static int hf_mac_lte_sr_time_since_request = -1;
static int hf_mac_lte_sr_time_until_answer = -1;
@@ -273,6 +270,40 @@ static int ett_mac_lte_oob = -1;
static int ett_mac_lte_drx_config = -1;
static int ett_mac_lte_drx_state = -1;
+static expert_field ei_mac_lte_context_rnti_type = EI_INIT;
+static expert_field ei_mac_lte_lcid_unexpected = EI_INIT;
+static expert_field ei_mac_lte_ul_mac_frame_retx = EI_INIT;
+static expert_field ei_mac_lte_oob_sr_failure = EI_INIT;
+static expert_field ei_mac_lte_control_timing_advance_command_correction_needed = EI_INIT;
+static expert_field ei_mac_lte_sch_header_only = EI_INIT;
+static expert_field ei_mac_lte_control_timing_advance_command_no_correction = EI_INIT;
+static expert_field ei_mac_lte_rar_timing_advance_not_zero_note = EI_INIT;
+static expert_field ei_mac_lte_padding_data_start_and_end = EI_INIT;
+static expert_field ei_mac_lte_bch_pdu = EI_INIT;
+static expert_field ei_mac_lte_rach_preamble_sent_note = EI_INIT;
+static expert_field ei_mac_lte_pch_pdu = EI_INIT;
+static expert_field ei_mac_lte_ul_harq_resend_next_frame = EI_INIT;
+static expert_field ei_mac_lte_control_bsr_multiple = EI_INIT;
+static expert_field ei_mac_lte_padding_data_multiple = EI_INIT;
+static expert_field ei_mac_lte_context_sysframe_number = EI_INIT;
+static expert_field ei_mac_lte_rar_bi_present = EI_INIT;
+static expert_field ei_mac_lte_control_element_size_invalid = EI_INIT;
+static expert_field ei_mac_lte_bsr_warn_threshold_exceeded = EI_INIT;
+static expert_field ei_mac_lte_too_many_subheaders = EI_INIT;
+static expert_field ei_mac_lte_oob_send_sr = EI_INIT;
+static expert_field ei_mac_lte_orig_tx_ul_frame_not_found = EI_INIT;
+static expert_field ei_mac_lte_control_ue_contention_resolution_msg3_matched = EI_INIT;
+static expert_field ei_mac_lte_sr_results_not_grant_or_failure_indication = EI_INIT;
+static expert_field ei_mac_lte_context_crc_status = EI_INIT;
+static expert_field ei_mac_lte_sr_invalid_event = EI_INIT;
+static expert_field ei_mac_lte_control_subheader_after_data_subheader = EI_INIT;
+static expert_field ei_mac_lte_rar_bi_not_first_subheader = EI_INIT;
+static expert_field ei_mac_lte_context_length = EI_INIT;
+static expert_field ei_mac_lte_reserved_not_zero = EI_INIT;
+static expert_field ei_mac_lte_rar_timing_advance_not_zero_warn = EI_INIT;
+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;
/* Constants and value strings */
@@ -1751,16 +1782,20 @@ static gint dissect_rar_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
reserved = (tvb_get_guint8(tvb, offset) & 0x80) >> 7;
ti = proto_tree_add_item(rar_body_tree, hf_mac_lte_rar_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN);
if (reserved != 0) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
- "RAR body Reserved bit not zero (found 0x%x)", reserved);
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero, "RAR body Reserved bit not zero (found 0x%x)", reserved);
}
/* Timing Advance */
timing_advance = (tvb_get_ntohs(tvb, offset) & 0x7ff0) >> 4;
ti = proto_tree_add_item(rar_body_tree, hf_mac_lte_rar_ta, tvb, offset, 2, ENC_BIG_ENDIAN);
if (timing_advance != 0) {
- expert_add_info_format(pinfo, ti, PI_SEQUENCE, (timing_advance <= 31) ? PI_NOTE : PI_WARN,
+ if (timing_advance <= 31) {
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_rar_timing_advance_not_zero_note,
"RAR Timing advance not zero (%u)", timing_advance);
+ } else {
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_rar_timing_advance_not_zero_warn,
+ "RAR Timing advance not zero (%u)", timing_advance);
+ }
}
offset++;
@@ -1879,7 +1914,7 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
reserved = (tvb_get_guint8(tvb, offset) & 0x30) >> 4;
tii = proto_tree_add_item(rar_header_tree, hf_mac_lte_rar_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
if (reserved != 0) {
- expert_add_info_format(pinfo, tii, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, tii, &ei_mac_lte_reserved_not_zero,
"RAR header Reserved bits not zero (found 0x%x)", reserved);
}
@@ -1889,8 +1924,7 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
/* 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");
+ expert_add_info(pinfo, bi_ti, &ei_mac_lte_rar_bi_present);
}
backoff_indicator_seen = TRUE;
@@ -1900,8 +1934,7 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
/* If present, it must be the first subheader */
if (number_of_rars > 0) {
- expert_add_info_format(pinfo, bi_ti, PI_MALFORMED, PI_WARN,
- "Backoff Indicator must appear as first subheader");
+ expert_add_info(pinfo, bi_ti, &ei_mac_lte_rar_bi_not_first_subheader);
}
}
@@ -2010,8 +2043,7 @@ static void dissect_bch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Check that this *is* downlink! */
if (p_mac_lte_info->direction == DIRECTION_UPLINK) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
- "BCH data should not be received in Uplink!");
+ expert_add_info(pinfo, ti, &ei_mac_lte_bch_pdu);
}
}
@@ -2054,8 +2086,7 @@ static void dissect_pch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Check that this *is* downlink! */
if (direction == DIRECTION_UPLINK) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
- "PCH data should not be received in Uplink!");
+ expert_add_info(pinfo, ti, &ei_mac_lte_pch_pdu);
}
}
@@ -2419,7 +2450,7 @@ static void TrackReportedULHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatil
}
}
else {
- expert_add_info_format(pinfo, retx_ti, PI_SEQUENCE, PI_ERROR,
+ expert_add_info_format_text(pinfo, retx_ti, &ei_mac_lte_orig_tx_ul_frame_not_found,
"Original Tx of UL frame not found (UE %u) !!", p_mac_lte_info->ueid);
}
}
@@ -2430,7 +2461,7 @@ static void TrackReportedULHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatil
next_ti = proto_tree_add_uint(tree, hf_mac_lte_ul_harq_resend_next_frame,
tvb, 0, 0, result->nextFrameNum);
- expert_add_info_format(pinfo, next_ti, PI_SEQUENCE, PI_WARN,
+ expert_add_info_format_text(pinfo, next_ti, &ei_mac_lte_ul_harq_resend_next_frame,
"UL MAC PDU (UE %u) needed to be retransmitted", p_mac_lte_info->ueid);
PROTO_ITEM_SET_GENERATED(next_ti);
@@ -2617,7 +2648,7 @@ static void TrackSRInfo(SREvent event, packet_info *pinfo, proto_tree *tree,
/* For an SR frame, there should always be either a PDCCH grant or indication
that the SR has failed */
if (event == SR_Request) {
- expert_add_info_format(pinfo, event_ti, PI_SEQUENCE, PI_ERROR,
+ expert_add_info_format_text(pinfo, event_ti, &ei_mac_lte_sr_results_not_grant_or_failure_indication,
"UE %u: SR results in neither a grant nor a failure indication",
ueid);
}
@@ -2665,17 +2696,11 @@ static void TrackSRInfo(SREvent event, packet_info *pinfo, proto_tree *tree,
break;
case InvalidSREvent:
- ti = proto_tree_add_none_format(tree, hf_mac_lte_sr_invalid_event,
+ proto_tree_add_expert_format(tree, pinfo, &ei_mac_lte_sr_invalid_event,
tvb, 0, 0, "UE %u: Invalid SR event - state=%s, event=%s",
ueid,
val_to_str_const(result->status, sr_status_vals, "Unknown"),
val_to_str_const(result->event, sr_event_vals, "Unknown"));
- PROTO_ITEM_SET_GENERATED(ti);
- expert_add_info_format(pinfo, ti, PI_SEQUENCE, PI_ERROR,
- "Invalid SR event for UE %u (C-RNTI %u) - state=%s, event=%s",
- ueid, rnti,
- val_to_str_const(result->status, sr_status_vals, "Unknown"),
- val_to_str_const(result->event, sr_event_vals, "Unknown"));
break;
}
}
@@ -2967,7 +2992,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
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, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero,
"%cL-SCH header Reserved bits not zero",
(p_mac_lte_info->direction == DIRECTION_UPLINK) ? 'U' : 'D');
}
@@ -2998,7 +3023,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
dlsch_lcid_vals, "(Unknown LCID)"));
if (lcids[number_of_headers] == DRX_COMMAND_LCID) {
- expert_add_info_format(pinfo, lcid_ti, PI_SEQUENCE, PI_NOTE,
+ expert_add_info_format_text(pinfo, lcid_ti, &ei_mac_lte_dlsch_lcid,
"DRX command received for UE %u (RNTI %u)",
p_mac_lte_info->ueid, p_mac_lte_info->rnti);
}
@@ -3015,7 +3040,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
*after* a data PDU */
if (have_seen_data_header &&
(lcids[number_of_headers] > 10) && (lcids[number_of_headers] != PADDING_LCID)) {
- expert_add_info_format(pinfo, lcid_ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, lcid_ti, &ei_mac_lte_control_subheader_after_data_subheader,
"%cL-SCH Control subheaders should not appear after data subheaders",
(p_mac_lte_info->direction == DIRECTION_UPLINK) ? 'U' : 'D');
return;
@@ -3024,8 +3049,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Show an expert item if we're seeing more then one BSR in a frame */
if ((direction == DIRECTION_UPLINK) && is_bsr_lcid(lcids[number_of_headers])) {
if (have_seen_bsr) {
- expert_add_info_format(pinfo, lcid_ti, PI_MALFORMED, PI_ERROR,
- "There shouldn't be > 1 BSR in a frame");
+ expert_add_info(pinfo, lcid_ti, &ei_mac_lte_control_bsr_multiple);
return;
}
have_seen_bsr = TRUE;
@@ -3038,13 +3062,11 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
{
number_of_padding_subheaders++;
if (number_of_padding_subheaders > 2) {
- expert_add_info_format(pinfo, lcid_ti, PI_MALFORMED, PI_WARN,
- "Should not see more than 2 padding subheaders in one frame");
+ expert_add_info(pinfo, lcid_ti, &ei_mac_lte_padding_data_multiple);
}
if (have_seen_non_padding_control) {
- expert_add_info_format(pinfo, lcid_ti, PI_MALFORMED, PI_ERROR,
- "Padding should come before other control subheaders!");
+ expert_add_info(pinfo, lcid_ti, &ei_mac_lte_padding_data_before_control_subheader);
}
}
@@ -3052,8 +3074,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
at the start! */
if (!extension && (lcids[number_of_headers] == PADDING_LCID) &&
(number_of_padding_subheaders > 0)) {
- expert_add_info_format(pinfo, lcid_ti, PI_MALFORMED, PI_ERROR,
- "Padding subheaders at start and end!");
+ expert_add_info(pinfo, lcid_ti, &ei_mac_lte_padding_data_start_and_end);
}
/* Remember that we've seen non-padding control */
@@ -3162,7 +3183,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Flag unknown lcid values in expert info */
if (try_val_to_str(lcids[number_of_headers],
(direction == DIRECTION_UPLINK) ? ulsch_lcid_vals : dlsch_lcid_vals) == NULL) {
- expert_add_info_format(pinfo, pdu_subheader_ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, pdu_subheader_ti, &ei_mac_lte_lcid_unexpected,
"%cL-SCH: Unexpected LCID received (%u)",
(p_mac_lte_info->direction == DIRECTION_UPLINK) ? 'U' : 'D',
lcids[number_of_headers]);
@@ -3176,12 +3197,9 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Check that we didn't reach the end of the subheader array... */
if (number_of_headers >= MAX_HEADERS_IN_PDU) {
- proto_item *ti = proto_tree_add_text(tree, tvb, offset, 1,
+ proto_tree_add_expert_format(tree, pinfo, &ei_mac_lte_too_many_subheaders, tvb, offset, 1,
"Reached %u subheaders - frame obviously malformed",
MAX_HEADERS_IN_PDU);
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
- "Reached %u subheaders - frame obviously malformed",
- MAX_HEADERS_IN_PDU);
return;
}
@@ -3256,7 +3274,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
tvb, offset, 1, ENC_BIG_ENDIAN);
reserved = tvb_get_guint8(tvb, offset) & 0x01;
if (reserved != 0) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero,
"Activation/Deactivation Reserved bit not zero");
}
offset++;
@@ -3353,7 +3371,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
ti = proto_tree_add_boolean(cr_tree, hf_mac_lte_control_ue_contention_resolution_msg3_matched,
tvb, 0, 0, FALSE);
- expert_add_info_format(pinfo, ti, PI_SEQUENCE, PI_WARN,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_control_ue_contention_resolution_msg3_matched,
"CR body in Msg4 doesn't match Msg3 CCCH in frame %u",
crResult->msg3FrameNum);
PROTO_ITEM_SET_GENERATED(ti);
@@ -3390,13 +3408,10 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
tvb, offset, 1, ENC_BIG_ENDIAN);
if (ta_value == 31) {
- expert_add_info_format(pinfo, ta_value_ti, PI_SEQUENCE,
- PI_NOTE,
- "Timing Advance control element received (no correction needed)");
+ expert_add_info(pinfo, ta_value_ti, &ei_mac_lte_control_timing_advance_command_no_correction);
}
else {
- expert_add_info_format(pinfo, ta_value_ti, PI_SEQUENCE,
- PI_WARN,
+ expert_add_info_format_text(pinfo, ta_value_ti, &ei_mac_lte_control_timing_advance_command_correction_needed,
"Timing Advance control element received (%u) %s correction needed",
ta_value,
(ta_value < 31) ? "-ve" : "+ve");
@@ -3467,7 +3482,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
ti = proto_tree_add_item(ephr_tree, hf_mac_lte_control_ext_power_headroom_reserved,
tvb, curr_offset, 1, ENC_BIG_ENDIAN);
if (scell_bitmap & 0x01) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero,
"Extended Power Headroom Reserved bit not zero");
}
curr_offset++;
@@ -3495,7 +3510,7 @@ 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]) {
- expert_add_info_format(pinfo, ephr_ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(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]);
offset += pdu_lengths[n];
@@ -3520,7 +3535,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
ti = proto_tree_add_item(ephr_cell_tree, hf_mac_lte_control_ext_power_headroom_reserved2,
tvb, curr_offset, 1, ENC_BIG_ENDIAN);
if (byte & 0xc0) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero,
"Extended Power Headroom Reserved bits not zero (found 0x%x)",
(byte & 0xc0) >> 6);
}
@@ -3532,7 +3547,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
} else {
if ((gint16)(computed_header_offset + 1 - curr_offset) != pdu_lengths[n]) {
- expert_add_info_format(pinfo, ephr_ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(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]);
offset += pdu_lengths[n];
@@ -3560,7 +3575,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
ti = proto_tree_add_item(ephr_cell_tree, hf_mac_lte_control_ext_power_headroom_reserved2,
tvb, curr_offset, 1, ENC_BIG_ENDIAN);
if (byte & 0xc0) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero,
"Extended Power Headroom Reserved bits not zero (found 0x%x)",
(byte & 0xc0) >> 6);
}
@@ -3596,7 +3611,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
ti = proto_tree_add_item(phr_tree, hf_mac_lte_control_power_headroom_reserved,
tvb, offset, 1, ENC_BIG_ENDIAN);
if (reserved != 0) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero,
"Power Headroom Reserved bits not zero (found 0x%x)", reserved);
}
@@ -3654,7 +3669,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
if (buffer_size >= global_mac_lte_bsr_warn_threshold) {
- expert_add_info_format(pinfo, buffer_size_ti, PI_SEQUENCE, PI_WARN,
+ expert_add_info_format_text(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded,
"UE %u - BSR for LCG %u exceeds threshold: %u (%s)",
p_mac_lte_info->ueid,
lcgid,
@@ -3703,7 +3718,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
tvb, offset, 1, ENC_BIG_ENDIAN);
buffer_size[0] = (tvb_get_guint8(tvb, offset) & 0xfc) >> 2;
if (buffer_size[0] >= global_mac_lte_bsr_warn_threshold) {
- expert_add_info_format(pinfo, buffer_size_ti, PI_SEQUENCE, PI_WARN,
+ expert_add_info_format_text(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded,
"UE %u - BSR for LCG 0 exceeds threshold: %u (%s)",
p_mac_lte_info->ueid,
buffer_size[0],
@@ -3716,7 +3731,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
buffer_size[1] = ((tvb_get_guint8(tvb, offset) & 0x03) << 4) | ((tvb_get_guint8(tvb, offset+1) & 0xf0) >> 4);
offset++;
if (buffer_size[1] >= global_mac_lte_bsr_warn_threshold) {
- expert_add_info_format(pinfo, buffer_size_ti, PI_SEQUENCE, PI_WARN,
+ expert_add_info_format_text(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded,
"UE %u - BSR for LCG 1 exceeds threshold: %u (%s)",
p_mac_lte_info->ueid,
buffer_size[1],
@@ -3730,7 +3745,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
buffer_size[2] = ((tvb_get_guint8(tvb, offset) & 0x0f) << 2) | ((tvb_get_guint8(tvb, offset+1) & 0xc0) >> 6);
offset++;
if (buffer_size[2] >= global_mac_lte_bsr_warn_threshold) {
- expert_add_info_format(pinfo, buffer_size_ti, PI_SEQUENCE, PI_WARN,
+ expert_add_info_format_text(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded,
"UE %u - BSR for LCG 2 exceeds threshold: %u (%s)",
p_mac_lte_info->ueid,
buffer_size[2],
@@ -3743,7 +3758,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
buffer_size[3] = tvb_get_guint8(tvb, offset) & 0x3f;
offset++;
if (buffer_size[3] >= global_mac_lte_bsr_warn_threshold) {
- expert_add_info_format(pinfo, buffer_size_ti, PI_SEQUENCE, PI_WARN,
+ expert_add_info_format_text(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded,
"UE %u - BSR for LCG 3 exceeds threshold: %u (%s)",
p_mac_lte_info->ueid,
buffer_size[3],
@@ -3775,8 +3790,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
is_truncated);
if (is_truncated) {
PROTO_ITEM_SET_GENERATED(truncated_ti);
- expert_add_info_format(pinfo, truncated_ti, PI_SEQUENCE, PI_NOTE,
- "MAC PDU SDUs have been omitted");
+ expert_add_info(pinfo, truncated_ti, &ei_mac_lte_sch_header_only);
return;
}
else {
@@ -3962,7 +3976,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Make sure the PDU isn't bigger than reported! */
if (offset > p_mac_lte_info->length) {
- expert_add_info_format(pinfo, padding_length_ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, padding_length_ti, &ei_mac_lte_context_length,
"%s MAC PDU is longer than reported length (reported=%u, actual=%u)",
(direction == DIRECTION_UPLINK) ? "UL-SCH" : "DL-SCH",
p_mac_lte_info->length, offset);
@@ -3972,7 +3986,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* There is no padding at the end of the frame */
if (!is_truncated && (offset < p_mac_lte_info->length)) {
/* There is a problem if we haven't used all of the PDU */
- expert_add_info_format(pinfo, pdu_ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, pdu_ti, &ei_mac_lte_context_length,
"%s PDU for UE %u is shorter than reported length (reported=%u, actual=%u)",
(direction == DIRECTION_UPLINK) ? "UL-SCH" : "DL-SCH",
p_mac_lte_info->ueid, p_mac_lte_info->length, offset);
@@ -3980,7 +3994,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
if (!is_truncated && (offset > p_mac_lte_info->length)) {
/* There is a problem if the PDU is longer than rpeported */
- expert_add_info_format(pinfo, pdu_ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, pdu_ti, &ei_mac_lte_context_length,
"%s PDU for UE %u is longer than reported length (reported=%u, actual=%u)",
(direction == DIRECTION_UPLINK) ? "UL-SCH" : "DL-SCH",
p_mac_lte_info->ueid, p_mac_lte_info->length, offset);
@@ -4053,7 +4067,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
ti = proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_mch_reserved,
tvb, offset, 1, ENC_BIG_ENDIAN);
if (reserved != 0) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero,
"MCH header Reserved bits not zero");
}
@@ -4085,7 +4099,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
*after* a data PDU */
if (have_seen_data_header &&
(lcids[number_of_headers] > 28) && (lcids[number_of_headers] != PADDING_LCID)) {
- expert_add_info_format(pinfo, lcid_ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, lcid_ti, &ei_mac_lte_control_subheader_after_data_subheader,
"MCH Control subheaders should not appear after data subheaders");
return;
}
@@ -4097,13 +4111,11 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
{
number_of_padding_subheaders++;
if (number_of_padding_subheaders > 2) {
- expert_add_info_format(pinfo, lcid_ti, PI_MALFORMED, PI_WARN,
- "Should not see more than 2 padding subheaders in one frame");
+ expert_add_info(pinfo, lcid_ti, &ei_mac_lte_padding_data_multiple);
}
if (have_seen_non_padding_control) {
- expert_add_info_format(pinfo, lcid_ti, PI_MALFORMED, PI_ERROR,
- "Padding should come before other control subheaders!");
+ expert_add_info(pinfo, lcid_ti, &ei_mac_lte_padding_data_before_control_subheader);
}
}
@@ -4203,7 +4215,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
/* Flag unknown lcid values in expert info */
if (try_val_to_str(lcids[number_of_headers],mch_lcid_vals) == NULL) {
- expert_add_info_format(pinfo, pdu_subheader_ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, pdu_subheader_ti, &ei_mac_lte_lcid_unexpected,
"MCH: Unexpected LCID received (%u)",
lcids[number_of_headers]);
}
@@ -4216,12 +4228,9 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
/* Check that we didn't reach the end of the subheader array... */
if (number_of_headers >= MAX_HEADERS_IN_PDU) {
- proto_item *ti = proto_tree_add_text(tree, tvb, offset, 1,
+ proto_tree_add_expert_format(tree, pinfo, &ei_mac_lte_too_many_subheaders, tvb, offset, 1,
"Reached %u subheaders - frame obviously malformed",
MAX_HEADERS_IN_PDU);
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
- "Reached %u subheaders - frame obviously malformed",
- MAX_HEADERS_IN_PDU);
return;
}
@@ -4261,7 +4270,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
pdu_lengths[n] = (gint16)tvb_length_remaining(tvb, curr_offset);
}
if (pdu_lengths[n] & 0x01) {
- expert_add_info_format(pinfo, sched_info_ti, PI_MALFORMED, PI_WARN,
+ expert_add_info_format_text(pinfo, sched_info_ti, &ei_mac_lte_context_length,
"MCH Scheduling Information MAC Control Element should have an even size");
}
@@ -4306,8 +4315,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
is_truncated);
if (is_truncated) {
PROTO_ITEM_SET_GENERATED(truncated_ti);
- expert_add_info_format(pinfo, truncated_ti, PI_SEQUENCE, PI_NOTE,
- "MAC PDU SDUs have been omitted");
+ expert_add_info(pinfo, truncated_ti, &ei_mac_lte_sch_header_only);
return;
}
else {
@@ -4379,7 +4387,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
/* Make sure the PDU isn't bigger than reported! */
if (offset > p_mac_lte_info->length) {
- expert_add_info_format(pinfo, padding_length_ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, padding_length_ti, &ei_mac_lte_context_length,
"MAC PDU is longer than reported length (reported=%u, actual=%u)",
p_mac_lte_info->length, offset);
}
@@ -4388,14 +4396,14 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
/* There is no padding at the end of the frame */
if (!is_truncated && (offset < p_mac_lte_info->length)) {
/* There is a problem if we haven't used all of the PDU */
- expert_add_info_format(pinfo, pdu_ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, pdu_ti, &ei_mac_lte_context_length,
"PDU is shorter than reported length (reported=%u, actual=%u)",
p_mac_lte_info->length, offset);
}
if (!is_truncated && (offset > p_mac_lte_info->length)) {
/* There is a problem if the PDU is longer than rpeported */
- expert_add_info_format(pinfo, pdu_ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, pdu_ti, &ei_mac_lte_context_length,
"PDU is longer than reported length (reported=%u, actual=%u)",
p_mac_lte_info->length, offset);
}
@@ -4495,8 +4503,8 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
p_mac_lte_info->rach_attempt_number);
/* Add expert info (a note, unless attempt > 1) */
- expert_add_info_format(pinfo, ti, PI_SEQUENCE,
- (p_mac_lte_info->rach_attempt_number > 1) ? PI_WARN : PI_NOTE,
+ expert_add_info_format_text(pinfo, ti,
+ (p_mac_lte_info->rach_attempt_number > 1) ? &ei_mac_lte_rach_preamble_sent_warn : &ei_mac_lte_rach_preamble_sent_note,
"RACH Preamble sent for UE %u (RAPID=%u, attempt=%u)",
p_mac_lte_info->ueid, p_mac_lte_info->rapid,
p_mac_lte_info->rach_attempt_number);
@@ -4513,12 +4521,12 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *sr_tree;
/* SR event is subtree */
- sr_ti = proto_tree_add_item(mac_lte_tree, hf_mac_lte_oob_send_sr,
- tvb, 0, 0, ENC_NA);
+ sr_ti = proto_tree_add_expert_format(mac_lte_tree, pinfo, &ei_mac_lte_oob_send_sr,
+ tvb, 0, 0,
+ "Scheduling Request sent for UE %u (RNTI %u)", p_mac_lte_info->oob_ueid[n], p_mac_lte_info->oob_rnti[n]);
sr_tree = proto_item_add_subtree(sr_ti, ett_mac_lte_oob);
PROTO_ITEM_SET_GENERATED(sr_ti);
-
/* RNTI */
ti = proto_tree_add_uint(sr_tree, hf_mac_lte_context_rnti,
tvb, 0, 0, p_mac_lte_info->oob_rnti[n]);
@@ -4549,12 +4557,6 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
p_mac_lte_info->oob_rnti[n]);
}
- /* Add expert info (a note) */
- expert_add_info_format(pinfo, sr_ti, PI_SEQUENCE, PI_NOTE,
- "Scheduling Request sent for UE %u (RNTI %u)",
- p_mac_lte_info->oob_ueid[n],
- p_mac_lte_info->oob_rnti[n]);
-
/* Update SR status for this UE */
if (global_mac_lte_track_sr) {
TrackSRInfo(SR_Request, pinfo, mac_lte_tree, tvb, p_mac_lte_info, n, sr_ti);
@@ -4566,8 +4568,9 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb, 0, 0, p_mac_lte_info->rnti);
PROTO_ITEM_SET_GENERATED(ti);
- ti = proto_tree_add_item(mac_lte_tree, hf_mac_lte_oob_sr_failure,
- tvb, 0, 0, ENC_NA);
+ proto_tree_add_expert_format(mac_lte_tree, pinfo, &ei_mac_lte_oob_sr_failure,
+ tvb, 0, 0, "Scheduling Request failed for UE %u (RNTI %u)",
+ p_mac_lte_info->ueid, p_mac_lte_info->rnti);
PROTO_ITEM_SET_GENERATED(ti);
/* Info column */
@@ -4576,12 +4579,6 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
p_mac_lte_info->ueid,
p_mac_lte_info->rnti);
- /* Add expert info (an error) */
- expert_add_info_format(pinfo, ti, PI_SEQUENCE, PI_ERROR,
- "Scheduling Request failed for UE %u (RNTI %u)",
- p_mac_lte_info->ueid,
- p_mac_lte_info->rnti);
-
/* Update SR status */
if (global_mac_lte_track_sr) {
TrackSRInfo(SR_Failure, pinfo, mac_lte_tree, tvb, p_mac_lte_info, 0, ti);
@@ -4599,7 +4596,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb, 0, 0, p_mac_lte_info->sysframeNumber);
PROTO_ITEM_SET_GENERATED(ti);
if (p_mac_lte_info->sysframeNumber > 1023) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_sysframe_number,
"Sysframe number (%u) out of range - valid range is 0-1023",
p_mac_lte_info->sysframeNumber);
}
@@ -4610,7 +4607,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (p_mac_lte_info->subframeNumber > 9) {
/* N.B. if we set it to valid value, it won't trigger when we rescan
(at least with DCT2000 files where the context struct isn't re-read). */
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_sysframe_number,
"Subframe number (%u) out of range - valid range is 0-9",
p_mac_lte_info->subframeNumber);
}
@@ -4637,7 +4634,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (p_mac_lte_info->rntiType) {
case M_RNTI:
if (p_mac_lte_info->rnti != 0xFFFD) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_rnti_type,
"M-RNTI indicated, but value is %u (0x%x) (must be 0x%x)",
p_mac_lte_info->rnti, p_mac_lte_info->rnti, 0xFFFD);
return;
@@ -4645,7 +4642,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case P_RNTI:
if (p_mac_lte_info->rnti != 0xFFFE) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_rnti_type,
"P-RNTI indicated, but value is %u (0x%x) (must be 0x%x)",
p_mac_lte_info->rnti, p_mac_lte_info->rnti, 0xFFFE);
return;
@@ -4653,7 +4650,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case SI_RNTI:
if (p_mac_lte_info->rnti != 0xFFFF) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_rnti_type,
"SI-RNTI indicated, but value is %u (0x%x) (must be 0x%x)",
p_mac_lte_info->rnti, p_mac_lte_info->rnti, 0xFFFE);
return;
@@ -4661,7 +4658,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case RA_RNTI:
if ((p_mac_lte_info->rnti < 0x0001) || (p_mac_lte_info->rnti > 0x003C)) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_rnti_type,
"RA_RNTI indicated, but given value %u (0x%x)is out of range",
p_mac_lte_info->rnti, p_mac_lte_info->rnti);
return;
@@ -4670,7 +4667,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case C_RNTI:
case SPS_RNTI:
if ((p_mac_lte_info->rnti < 0x0001) || (p_mac_lte_info->rnti > 0xFFF3)) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_rnti_type,
"%s indicated, but given value %u (0x%x)is out of range",
val_to_str_const(p_mac_lte_info->rntiType, rnti_type_vals, "Unknown"),
p_mac_lte_info->rnti, p_mac_lte_info->rnti);
@@ -4709,7 +4706,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
PROTO_ITEM_SET_GENERATED(retx_ti);
if (p_mac_lte_info->reTxCount >= global_mac_lte_retx_counter_trigger) {
- expert_add_info_format(pinfo, retx_ti, PI_SEQUENCE, PI_WARN,
+ expert_add_info_format_text(pinfo, retx_ti, &ei_mac_lte_ul_mac_frame_retx,
"UE %u: UL MAC frame ReTX no. %u",
p_mac_lte_info->ueid, p_mac_lte_info->reTxCount);
}
@@ -4727,7 +4724,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Report non-success */
if (p_mac_lte_info->detailed_phy_info.dl_info.crc_status != crc_success) {
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_crc_status,
"%s Frame has CRC error problem (%s)",
(p_mac_lte_info->direction == DIRECTION_UPLINK) ? "UL" : "DL",
val_to_str_const(p_mac_lte_info->detailed_phy_info.dl_info.crc_status,
@@ -5343,24 +5340,12 @@ void proto_register_mac_lte(void)
NULL, HFILL
}
},
- { &hf_mac_lte_oob_send_sr,
- { "Scheduling Request sent",
- "mac-lte.sr-req", FT_NONE, BASE_NONE, NULL, 0x0,
- NULL, HFILL
- }
- },
{ &hf_mac_lte_number_of_srs,
{ "Number of SRs",
"mac-lte.sr-req.count", FT_UINT32, BASE_DEC, 0, 0x0,
"Number of UEs doing SR in this frame", HFILL
}
},
- { &hf_mac_lte_oob_sr_failure,
- { "Scheduling Request failure",
- "mac-lte.sr-failure", FT_NONE, BASE_NONE, NULL, 0x0,
- NULL, HFILL
- }
- },
/*******************************************/
/* MAC shared channel header fields */
@@ -6050,12 +6035,6 @@ void proto_register_mac_lte(void)
NULL, HFILL
}
},
- { &hf_mac_lte_sr_invalid_event,
- { "Invalid event",
- "mac-lte.ulsch.sr-invalid-event", FT_NONE, BASE_NONE, 0, 0x0,
- NULL, HFILL
- }
- },
{ &hf_mac_lte_sr_time_since_request,
{ "Time since SR (ms)",
"mac-lte.ulsch.time-since-sr", FT_UINT32, BASE_DEC, 0, 0x0,
@@ -6173,6 +6152,43 @@ void proto_register_mac_lte(void)
&ett_mac_lte_drx_state
};
+ static ei_register_info ei[] = {
+ { &ei_mac_lte_reserved_not_zero, { "mac_lte.reserved_not_zero", PI_MALFORMED, PI_ERROR, "Reserved bit not zero", EXPFILL }},
+ { &ei_mac_lte_rar_timing_advance_not_zero_note, { "mac_lte.mac-lte.rar.ta.not_zero", PI_SEQUENCE, PI_NOTE, "RAR Timing advance not zero", EXPFILL }},
+ { &ei_mac_lte_rar_timing_advance_not_zero_warn, { "mac_lte.mac-lte.rar.ta.not_zero", PI_SEQUENCE, PI_WARN, "RAR Timing advance not zero", EXPFILL }},
+ { &ei_mac_lte_rar_bi_present, { "mac-lte.rar.bi.present", PI_MALFORMED, PI_ERROR, "MAC RAR PDU has > 1 Backoff Indicator subheader present", EXPFILL }},
+ { &ei_mac_lte_rar_bi_not_first_subheader, { "mac-lte.rar.bi.not_first_subheader", PI_MALFORMED, PI_WARN, "Backoff Indicator must appear as first subheader", EXPFILL }},
+ { &ei_mac_lte_bch_pdu, { "mac-lte.bch.pdu.uplink", PI_MALFORMED, PI_ERROR, "BCH data should not be received in Uplink!", EXPFILL }},
+ { &ei_mac_lte_pch_pdu, { "mac_lte.pch.pdu.uplink", PI_MALFORMED, PI_ERROR, "PCH data should not be received in Uplink!", EXPFILL }},
+ { &ei_mac_lte_orig_tx_ul_frame_not_found, { "mac_lte.orig_tx_ul_frame_not_found", PI_SEQUENCE, PI_ERROR, "Original Tx of UL frame not found", EXPFILL }},
+ { &ei_mac_lte_ul_harq_resend_next_frame, { "mac-lte.ulsch.retx.next-frame.expert", PI_SEQUENCE, PI_WARN, "UL MAC PDU needed to be retransmitted", EXPFILL }},
+ { &ei_mac_lte_sr_results_not_grant_or_failure_indication, { "mac_lte.sr_results_not_grant_or_failure_indication", PI_SEQUENCE, PI_ERROR, "SR results in neither a grant nor a failure indication", EXPFILL }},
+ { &ei_mac_lte_sr_invalid_event, { "mac-lte.ulsch.sr-invalid-event", PI_SEQUENCE, PI_ERROR, "Invalid SR event for UE", EXPFILL }},
+ { &ei_mac_lte_dlsch_lcid, { "mac-lte.dlsch.lcid.DRX_received", PI_SEQUENCE, PI_NOTE, "DRX command received for UE", EXPFILL }},
+ { &ei_mac_lte_control_subheader_after_data_subheader, { "mac_lte.control_subheader_after_data_subheader", PI_MALFORMED, PI_ERROR, "?L-SCH Control subheaders should not appear after data subheaders", EXPFILL }},
+ { &ei_mac_lte_control_bsr_multiple, { "mac-lte.control.bsr.multiple", PI_MALFORMED, PI_ERROR, "There shouldn't be > 1 BSR in a frame", EXPFILL }},
+ { &ei_mac_lte_padding_data_multiple, { "mac-lte.padding-data.multiple", PI_MALFORMED, PI_WARN, "Should not see more than 2 padding subheaders in one frame", EXPFILL }},
+ { &ei_mac_lte_padding_data_before_control_subheader, { "mac-lte.padding-data.before_control_subheader", PI_MALFORMED, PI_ERROR, "Padding should come before other control subheaders!", EXPFILL }},
+ { &ei_mac_lte_padding_data_start_and_end, { "mac-lte.padding-data.start_and_end!", PI_MALFORMED, PI_ERROR, "Padding subheaders at start and end!", EXPFILL }},
+ { &ei_mac_lte_lcid_unexpected, { "mac_lte.lcid_unexpected", PI_MALFORMED, PI_ERROR, "?L-SCH: Unexpected LCID received", EXPFILL }},
+ { &ei_mac_lte_too_many_subheaders, { "mac_lte.too_many_subheaders", PI_MALFORMED, PI_ERROR, "Reached too many subheaders - frame obviously malformed", EXPFILL }},
+ { &ei_mac_lte_control_ue_contention_resolution_msg3_matched, { "mac-lte.control.ue-contention-resolution.matches-msg3.not", PI_SEQUENCE, PI_WARN, "CR body in Msg4 doesn't match Msg3 CCCH in frame X", EXPFILL }},
+ { &ei_mac_lte_control_timing_advance_command_no_correction, { "mac-lte.control.timing-advance.command.no_correction", PI_SEQUENCE, PI_NOTE, "Timing Advance control element received (no correction needed)", EXPFILL }},
+ { &ei_mac_lte_control_timing_advance_command_correction_needed, { "mac-lte.control.timing-advance.command.correction_needed", PI_SEQUENCE, PI_WARN, "Timing Advance control element received with correction needed", EXPFILL }},
+ { &ei_mac_lte_control_element_size_invalid, { "mac_lte.control_element.size_invalid", PI_MALFORMED, PI_ERROR, "Control Element has an unexpected size", EXPFILL }},
+ { &ei_mac_lte_bsr_warn_threshold_exceeded, { "mac_lte.bsr_warn_threshold_exceeded", PI_SEQUENCE, PI_WARN, "BSR for LCG X exceeds threshold", EXPFILL }},
+ { &ei_mac_lte_sch_header_only, { "mac-lte.sch.header-only.expert", PI_SEQUENCE, PI_NOTE, "MAC PDU SDUs have been omitted", EXPFILL }},
+ { &ei_mac_lte_context_length, { "mac-lte.length.invalid", PI_MALFORMED, PI_ERROR, "MAC PDU is longer than reported length", EXPFILL }},
+ { &ei_mac_lte_rach_preamble_sent_warn, { "mac_lte.rach_preamble_sent", PI_SEQUENCE, PI_WARN, "RACH Preamble sent", EXPFILL }},
+ { &ei_mac_lte_rach_preamble_sent_note, { "mac_lte.rach_preamble_sent", PI_SEQUENCE, PI_NOTE, "RACH Preamble sent", EXPFILL }},
+ { &ei_mac_lte_oob_send_sr, { "mac-lte.sr-req", PI_SEQUENCE, PI_NOTE, "Scheduling Request sent", EXPFILL }},
+ { &ei_mac_lte_oob_sr_failure, { "mac-lte.sr-failure", PI_SEQUENCE, PI_ERROR, "Scheduling Request failed", EXPFILL }},
+ { &ei_mac_lte_context_sysframe_number, { "mac-lte.sfn.out_of_range", PI_MALFORMED, PI_ERROR, "Sysframe number out of range", EXPFILL }},
+ { &ei_mac_lte_context_rnti_type, { "mac-lte.rnti-type.invalid", PI_MALFORMED, PI_ERROR, "RNTI indicated, but value is not correct", EXPFILL }},
+ { &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 }},
+ };
+
static const enum_val_t show_info_col_vals[] = {
{"show-phy", "PHY Info", ShowPHYLayer},
{"show-mac", "MAC Info", ShowMACLayer},
@@ -6188,6 +6204,7 @@ void proto_register_mac_lte(void)
module_t *mac_lte_module;
+ expert_module_t* expert_mac_lte;
static uat_field_t lcid_drb_mapping_flds[] = {
UAT_FLD_VS(lcid_drb_mappings, lcid, "lcid", drb_lcid_vals, "The MAC LCID"),
@@ -6200,6 +6217,8 @@ void proto_register_mac_lte(void)
proto_mac_lte = proto_register_protocol("MAC-LTE", "MAC-LTE", "mac-lte");
proto_register_field_array(proto_mac_lte, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ expert_mac_lte = expert_register_protocol(proto_mac_lte);
+ expert_register_field_array(expert_mac_lte, ei, array_length(ei));
/* Allow other dissectors to find this one by name. */
register_dissector("mac-lte", dissect_mac_lte, proto_mac_lte);