summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2016-12-17 22:55:59 +0100
committerMichael Mann <mmann78@netscape.net>2016-12-18 03:03:19 +0000
commit6292d14148e27bbf59a523b085cd2d447f1c6697 (patch)
tree208f70727f8ac964180c992f66a25dc79355e595
parent934f255c07623c8ed3da7933fe2465400dcf3452 (diff)
downloadwireshark-6292d14148e27bbf59a523b085cd2d447f1c6697.tar.gz
M3AP: use unit strings
Change-Id: I433b6357914063ba7dbbe119771770e98e019091 Reviewed-on: https://code.wireshark.org/review/19324 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/asn1/m3ap/m3ap.cnf10
-rw-r--r--epan/dissectors/packet-m3ap.c14
2 files changed, 10 insertions, 14 deletions
diff --git a/epan/dissectors/asn1/m3ap/m3ap.cnf b/epan/dissectors/asn1/m3ap/m3ap.cnf
index 4faf3ae394..aa26d0d38b 100644
--- a/epan/dissectors/asn1/m3ap/m3ap.cnf
+++ b/epan/dissectors/asn1/m3ap/m3ap.cnf
@@ -116,9 +116,9 @@ ProtocolIE-Field/value ie_field_value
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
3, 3, FALSE, &parameter_tvb);
- if (!parameter_tvb)
- return offset;
- dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
+ if (!parameter_tvb)
+ return offset;
+ dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
#.END
#.FN_BODY IPAddress VAL_PTR = &parameter_tvb
@@ -162,8 +162,8 @@ ProtocolIE-Field/value ie_field_value
proto_tree_add_string(tree, hf_m3ap_Absolute_Time_ofMBMS_Data_value, parameter_tvb, 0, tvb_len, time_str);
#.END
-#.FN_FTR BitRate
- proto_item_append_text(actx->created_item, "bit/s");
+#.TYPE_ATTR
+BitRate DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_bit_sec
#.FN_BODY MBMS-Service-Area VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb=NULL;
diff --git a/epan/dissectors/packet-m3ap.c b/epan/dissectors/packet-m3ap.c
index 28fd6f0a5d..6aa5380e59 100644
--- a/epan/dissectors/packet-m3ap.c
+++ b/epan/dissectors/packet-m3ap.c
@@ -681,10 +681,6 @@ dissect_m3ap_BitRate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr
offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index,
0U, G_GUINT64_CONSTANT(10000000000), NULL, FALSE);
-#line 166 "./asn1/m3ap/m3ap.cnf"
- proto_item_append_text(actx->created_item, "bit/s");
-
-
return offset;
}
@@ -885,9 +881,9 @@ dissect_m3ap_PLMN_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
3, 3, FALSE, &parameter_tvb);
- if (!parameter_tvb)
- return offset;
- dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
+ if (!parameter_tvb)
+ return offset;
+ dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
return offset;
@@ -2473,11 +2469,11 @@ void proto_register_m3ap(void) {
NULL, HFILL }},
{ &hf_m3ap_mBMS_E_RAB_MaximumBitrateDL,
{ "mBMS-E-RAB-MaximumBitrateDL", "m3ap.mBMS_E_RAB_MaximumBitrateDL",
- FT_UINT64, BASE_DEC, NULL, 0,
+ FT_UINT64, BASE_DEC|BASE_UNIT_STRING, &units_bit_sec, 0,
"BitRate", HFILL }},
{ &hf_m3ap_mBMS_E_RAB_GuaranteedBitrateDL,
{ "mBMS-E-RAB-GuaranteedBitrateDL", "m3ap.mBMS_E_RAB_GuaranteedBitrateDL",
- FT_UINT64, BASE_DEC, NULL, 0,
+ FT_UINT64, BASE_DEC|BASE_UNIT_STRING, &units_bit_sec, 0,
"BitRate", HFILL }},
{ &hf_m3ap_MBMS_Cell_List_item,
{ "ECGI", "m3ap.ECGI_element",