aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-e212.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-e212.c')
-rw-r--r--epan/dissectors/packet-e212.c22
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));
}