diff options
Diffstat (limited to 'epan/dissectors/packet-lte-rrc.c')
-rw-r--r-- | epan/dissectors/packet-lte-rrc.c | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c index c631d6a80b..3890e6d4d6 100644 --- a/epan/dissectors/packet-lte-rrc.c +++ b/epan/dissectors/packet-lte-rrc.c @@ -3513,6 +3513,14 @@ static gint ett_lte_rrc_warningType = -1; static gint ett_lte_rrc_dataCodingScheme = -1; static gint ett_lte_rrc_warningMessageSegment = -1; +static expert_field ei_lte_rrc_number_pages_le15 = EI_INIT; +static expert_field ei_lte_rrc_si_info_value_changed = EI_INIT; +static expert_field ei_lte_rrc_sibs_changing = EI_INIT; +static expert_field ei_lte_rrc_earthquake_warning_sys = EI_INIT; +static expert_field ei_lte_rrc_commercial_mobile_alert_sys = EI_INIT; +static expert_field ei_lte_rrc_unexpected_type_value = EI_INIT; +static expert_field ei_lte_rrc_unexpected_length_value = EI_INIT; + /* Forward declarations */ static int dissect_DL_DCCH_Message_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); static int dissect_UECapabilityInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); @@ -5113,7 +5121,7 @@ dissect_lte_rrc_warningMessageSegment(tvbuff_t *warning_msg_seg_tvb, proto_tree nb_of_pages = tvb_get_guint8(warning_msg_seg_tvb, 0); ti = proto_tree_add_uint(tree, hf_lte_rrc_warningMessageSegment_nb_pages, warning_msg_seg_tvb, 0, 1, nb_of_pages); if (nb_of_pages > 15) { - expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR, + expert_add_info_format_text(pinfo, ti, &ei_lte_rrc_number_pages_le15, "Number of pages should be <=15 (found %u)", nb_of_pages); nb_of_pages = 15; } @@ -10458,7 +10466,7 @@ dissect_lte_rrc_T_systemInfoValueTag(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx if (p_previous != NULL) { /* Subtract one from stored result to get previous value */ guint32 previous = GPOINTER_TO_UINT(p_previous) - 1; - expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_WARN, + expert_add_info_format_text(actx->pinfo, actx->created_item, &ei_lte_rrc_si_info_value_changed, "SI Info Value changed (now %u, was %u)", value, previous); } } @@ -11311,7 +11319,7 @@ dissect_lte_rrc_T_systemInfoModification(tvbuff_t *tvb _U_, int offset _U_, asn1 1, NULL, FALSE, 0, NULL); col_append_str(actx->pinfo->cinfo, COL_INFO, " (systemInfoModification)"); - expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_WARN, "SIBs changing in next BCCH modification period - signalled in Paging message"); + expert_add_info(actx->pinfo, actx->created_item, &ei_lte_rrc_sibs_changing); return offset; @@ -11330,7 +11338,7 @@ dissect_lte_rrc_T_etws_Indication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t 1, NULL, FALSE, 0, NULL); col_append_str(actx->pinfo->cinfo, COL_INFO, " (ETWS)"); - expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_WARN, "Earthquake and Tsunami Warning System Indication!"); + expert_add_info(actx->pinfo, actx->created_item, &ei_lte_rrc_earthquake_warning_sys); return offset; @@ -11349,7 +11357,7 @@ dissect_lte_rrc_T_cmas_Indication_r9(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx 1, NULL, FALSE, 0, NULL); col_append_str(actx->pinfo->cinfo, COL_INFO, " (CMAS)"); - expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_WARN, "Commercial Mobile Alert System Indication!"); + expert_add_info(actx->pinfo, actx->created_item, &ei_lte_rrc_commercial_mobile_alert_sys); return offset; } @@ -27180,12 +27188,12 @@ if(ue_cap_tvb){ subtree2 = proto_item_add_subtree(item, ett_lte_rrc_UE_CapabilityRAT_Container); byte = tvb_get_guint8(ue_cap_tvb, 0); if (byte != 0x33) { - expert_add_info_format(actx->pinfo, item, PI_MALFORMED, PI_ERROR, + expert_add_info_format_text(actx->pinfo, item, &ei_lte_rrc_unexpected_type_value, "Unexpected type value (found 0x%02X)", byte); } byte = tvb_get_guint8(ue_cap_tvb, 1); if (byte != 0x03) { - expert_add_info_format(actx->pinfo, item, PI_MALFORMED, PI_ERROR, + expert_add_info_format_text(actx->pinfo, item, &ei_lte_rrc_unexpected_length_value, "Unexpected length value (found %d)", byte); } de_ms_cm_2(ue_cap_tvb, subtree2, actx->pinfo, 2, 3, NULL, 0); @@ -33962,7 +33970,7 @@ static int dissect_UEAssistanceInformation_r11_PDU(tvbuff_t *tvb _U_, packet_inf /*--- End of included file: packet-lte-rrc-fn.c ---*/ -#line 1935 "../../asn1/lte-rrc/packet-lte-rrc-template.c" +#line 1943 "../../asn1/lte-rrc/packet-lte-rrc-template.c" static void dissect_lte_rrc_DL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) @@ -42610,7 +42618,7 @@ void proto_register_lte_rrc(void) { NULL, HFILL }}, /*--- End of included file: packet-lte-rrc-hfarr.c ---*/ -#line 2086 "../../asn1/lte-rrc/packet-lte-rrc-template.c" +#line 2094 "../../asn1/lte-rrc/packet-lte-rrc-template.c" { &hf_lte_rrc_eutra_cap_feat_group_ind_1, { "Indicator 1", "lte-rrc.eutra_cap_feat_group_ind_1", @@ -44118,7 +44126,7 @@ void proto_register_lte_rrc(void) { &ett_lte_rrc_CandidateCellInfo_r10, /*--- End of included file: packet-lte-rrc-ettarr.c ---*/ -#line 2509 "../../asn1/lte-rrc/packet-lte-rrc-template.c" +#line 2517 "../../asn1/lte-rrc/packet-lte-rrc-template.c" &ett_lte_rrc_featureGroupIndicators, &ett_lte_rrc_featureGroupIndRel9Add, @@ -44135,6 +44143,17 @@ void proto_register_lte_rrc(void) { &ett_lte_rrc_warningMessageSegment }; + static ei_register_info ei[] = { + { &ei_lte_rrc_number_pages_le15, { "lte_rrc.number_pages_le15", PI_MALFORMED, PI_ERROR, "Number of pages should be <=15", EXPFILL }}, + { &ei_lte_rrc_si_info_value_changed, { "lte_rrc.si_info_value_changed", PI_SEQUENCE, PI_WARN, "SI Info Value changed", EXPFILL }}, + { &ei_lte_rrc_sibs_changing, { "lte_rrc.sibs_changing", PI_SEQUENCE, PI_WARN, "SIBs changing in next BCCH modification period - signalled in Paging message", EXPFILL }}, + { &ei_lte_rrc_earthquake_warning_sys, { "lte_rrc.earthquake_warning_sys", PI_SEQUENCE, PI_WARN, "Earthquake and Tsunami Warning System Indication!", EXPFILL }}, + { &ei_lte_rrc_commercial_mobile_alert_sys, { "lte_rrc.commercial_mobile_alert_sys", PI_SEQUENCE, PI_WARN, "Commercial Mobile Alert System Indication!", EXPFILL }}, + { &ei_lte_rrc_unexpected_type_value, { "lte_rrc.unexpected_type_value", PI_MALFORMED, PI_ERROR, "Unexpected type value", EXPFILL }}, + { &ei_lte_rrc_unexpected_length_value, { "lte_rrc.unexpected_length_value", PI_MALFORMED, PI_ERROR, "Unexpected type length", EXPFILL }}, + }; + + expert_module_t* expert_lte_rrc; /* Register protocol */ proto_lte_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME); @@ -44152,6 +44171,8 @@ void proto_register_lte_rrc(void) { /* Register fields and subtrees */ proto_register_field_array(proto_lte_rrc, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); + expert_lte_rrc = expert_register_protocol(proto_lte_rrc); + expert_register_field_array(expert_lte_rrc, ei, array_length(ei)); /* Register the dissectors defined in lte-rrc.conf */ @@ -44170,7 +44191,7 @@ void proto_register_lte_rrc(void) { /*--- End of included file: packet-lte-rrc-dis-reg.c ---*/ -#line 2545 "../../asn1/lte-rrc/packet-lte-rrc-template.c" +#line 2566 "../../asn1/lte-rrc/packet-lte-rrc-template.c" register_init_routine(<e_rrc_init_protocol); } |