diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2018-10-07 16:56:14 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2018-10-07 16:12:09 +0000 |
commit | ce53b4c170e0b0b1c7bb521fe677db1eadc7792b (patch) | |
tree | 28350acd7b4bc6168cb7fa328e84426c76637704 /epan/dissectors/asn1 | |
parent | 0443cd2c952cd63be9b6eddfb871c335a1378881 (diff) |
NGAP: prettify a bit mode fields
Change-Id: Ifcc04d88a4476989eca0fc88ba70b6dc5aa326fd
Reviewed-on: https://code.wireshark.org/review/30050
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/asn1')
-rw-r--r-- | epan/dissectors/asn1/ngap/ngap.cnf | 17 | ||||
-rw-r--r-- | epan/dissectors/asn1/ngap/packet-ngap-template.c | 8 |
2 files changed, 20 insertions, 5 deletions
diff --git a/epan/dissectors/asn1/ngap/ngap.cnf b/epan/dissectors/asn1/ngap/ngap.cnf index b128bf71a0..20ead1e46b 100644 --- a/epan/dissectors/asn1/ngap/ngap.cnf +++ b/epan/dissectors/asn1/ngap/ngap.cnf @@ -396,6 +396,15 @@ EUTRA-CGI/eUTRACellIdentity ABBREV=EUTRACellIdentity TYPE=FT_UINT32 DISPLAY=BASE #.TYPE_ATTR PacketLossRate DISPLAY = BASE_CUSTOM STRINGS = CF_FUNC(ngap_PacketLossRate_fmt) +#.TYPE_ATTR +PacketDelayBudget DISPLAY = BASE_CUSTOM STRINGS = CF_FUNC(ngap_PacketDelayBudget_fmt) + +#.TYPE_ATTR +AveragingWindow DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_milliseconds + +#.TYPE_ATTR +MaximumDataBurstVolume DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_byte_bytes + #.FN_BODY InterfacesToTrace VAL_PTR = ¶meter_tvb tvbuff_t *parameter_tvb = NULL; %(DEFAULT_BODY)s @@ -594,10 +603,10 @@ PortNumber TYPE = FT_UINT16 DISPLAY = BASE_DEC tvbuff_t *parameter_tvb = NULL; proto_tree *subtree; %(DEFAULT_BODY)s - if (!parameter_tvb) - return offset; - subtree = proto_item_add_subtree(actx->created_item, ett_ngap_LastVisitedEUTRANCellInformation); - dissect_lte_rrc_VisitedCellInfo_r12_PDU(parameter_tvb, actx->pinfo, subtree, NULL); + if (parameter_tvb) { + subtree = proto_item_add_subtree(actx->created_item, ett_ngap_LastVisitedEUTRANCellInformation); + dissect_lte_rrc_VisitedCellInfo_r12_PDU(parameter_tvb, actx->pinfo, subtree, NULL); + } #.TYPE_ATTR ExpectedActivityPeriod DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_seconds diff --git a/epan/dissectors/asn1/ngap/packet-ngap-template.c b/epan/dissectors/asn1/ngap/packet-ngap-template.c index c53388a44e..d4b1ee7e04 100644 --- a/epan/dissectors/asn1/ngap/packet-ngap-template.c +++ b/epan/dissectors/asn1/ngap/packet-ngap-template.c @@ -235,7 +235,13 @@ dissect_ngap_warningMessageContents(tvbuff_t *warning_msg_tvb, proto_tree *tree, static void ngap_PacketLossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f %% (%u)", (float)v/10, v); + g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); +} + +static void +ngap_PacketDelayBudget_fmt(gchar *s, guint32 v) +{ + g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); } static void |