diff options
author | Michael Mann <mmann78@netscape.net> | 2013-05-25 17:06:40 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-05-25 17:06:40 +0000 |
commit | 7e8e5b347e43359fcb36e32f9ce998c49b8d9fae (patch) | |
tree | 625973d8be777bdfa2d992ee473a77004180a742 /epan/dissectors/packet-e212.c | |
parent | 66c859e765a8e881cedc8f93af706683775e8b7e (diff) |
Batch of filterable expert_infos.
svn path=/trunk/; revision=49581
Diffstat (limited to 'epan/dissectors/packet-e212.c')
-rw-r--r-- | epan/dissectors/packet-e212.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/epan/dissectors/packet-e212.c b/epan/dissectors/packet-e212.c index 5967b8be89..f8da33f695 100644 --- a/epan/dissectors/packet-e212.c +++ b/epan/dissectors/packet-e212.c @@ -2440,6 +2440,11 @@ static value_string_ext mcc_mnc_codes_ext = VALUE_STRING_EXT_INIT(mcc_mnc_codes) static int proto_e212 = -1; static int hf_E212_mcc = -1; static int hf_E212_mnc = -1; + +static expert_field ei_E212_mcc_non_decimal = EI_INIT; +static expert_field ei_E212_mnc_non_decimal = EI_INIT; + + /* static int hf_E212_msin = -1; */ /* @@ -2536,7 +2541,7 @@ dissect_e212_mcc_mnc_ep_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } item = proto_tree_add_uint(tree, hf_E212_mcc , tvb, start_offset, 2, mcc ); if (((mcc1 > 9) || (mcc2 > 9) || (mcc3 > 9)) && (mcc_mnc != 0xffffff)) - expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "MCC contains non-decimal digits"); + expert_add_info(pinfo, item, &ei_E212_mcc_non_decimal); if (long_mnc) { item = proto_tree_add_uint_format(tree, hf_E212_mnc , tvb, start_offset + 1, 2, mnc, @@ -2567,7 +2572,7 @@ dissect_e212_mcc_mnc_ep_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } if (((mnc1 > 9) || (mnc2 > 9) || ((mnc3 > 9) && (mnc3 != 0x0f))) && (mcc_mnc != 0xffffff)) - expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "MNC contains non-decimal digits"); + expert_add_info(pinfo, item, &ei_E212_mnc_non_decimal); return mcc_mnc_str; } @@ -2659,7 +2664,7 @@ dissect_e212_mcc_mnc_in_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t item = proto_tree_add_uint(tree, hf_E212_mcc , tvb, start_offset, 2, mcc ); if (((mcc1 > 9) || (mcc2 > 9) || (mcc3 > 9)) & (mcc_mnc != 0xffffff)) - expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "MCC contains non-decimal digits"); + expert_add_info(pinfo, item, &ei_E212_mcc_non_decimal); if (long_mnc) item = proto_tree_add_uint_format(tree, hf_E212_mnc , tvb, start_offset + 1, 2, mnc, @@ -2673,7 +2678,7 @@ dissect_e212_mcc_mnc_in_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t mnc); if (((mnc1 > 9) || (mnc2 > 9) || (long_mnc && (mnc3 > 9))) && (mcc_mnc != 0xffffff)) - expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "MNC contains non-decimal digits"); + expert_add_info(pinfo, item, &ei_E212_mnc_non_decimal); if (long_mnc) return 6; @@ -2713,6 +2718,13 @@ proto_register_e212(void) #endif }; + static ei_register_info ei[] = { + { &ei_E212_mcc_non_decimal, { "e212.mcc.non_decimal", PI_MALFORMED, PI_WARN, "MCC contains non-decimal digits", EXPFILL }}, + { &ei_E212_mnc_non_decimal, { "e212.mnc.non_decimal", PI_MALFORMED, PI_WARN, "MNC contains non-decimal digits", EXPFILL }}, + }; + + expert_module_t* expert_e212; + /* * Register the protocol name and description */ @@ -2726,5 +2738,7 @@ proto_register_e212(void) * the header fields and subtrees used. */ proto_register_field_array(proto_e212, hf, array_length(hf)); + expert_e212 = expert_register_protocol(proto_e212); + expert_register_field_array(expert_e212, ei, array_length(ei)); } |