aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2015-07-08 14:47:45 +0100
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2015-07-08 14:27:45 +0000
commitbd64be6444f6910d10711770db821aadfdc902eb (patch)
treebc29ddf0c6308f3de593ece9a645c5609f2e6af7 /asn1
parent0997129e0f07cc8beca9d922a86334e7aff247b3 (diff)
RANAP: if bindingid looks like port number, extract and show
Change-Id: Ibfb98bf72ebbd620f21a13e5a4435144a8ef9f6a Reviewed-on: https://code.wireshark.org/review/9560 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Diffstat (limited to 'asn1')
-rw-r--r--asn1/ranap/ranap.cnf12
1 files changed, 12 insertions, 0 deletions
diff --git a/asn1/ranap/ranap.cnf b/asn1/ranap/ranap.cnf
index 16886b8afb..25e6756939 100644
--- a/asn1/ranap/ranap.cnf
+++ b/asn1/ranap/ranap.cnf
@@ -369,6 +369,18 @@ dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvb , offset, actx ,tre
dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU );
+
+#.FN_BODY BindingID VAL_PTR=&value_tvb
+ tvbuff_t *value_tvb = NULL;
+%(DEFAULT_BODY)s
+ /* N.B. value_tvb is 4 bytes of OCTET STRING */
+ if (tvb_get_ntohs(value_tvb, 2) == 0) {
+ /* Will show first 2 bytes as an integer, as very likely to be a UDP port number */
+ guint16 port_number = tvb_get_ntohs(value_tvb, 0);
+ proto_item_append_text(actx->created_item, " (%%u)", port_number);
+ }
+
+
#.TYPE_ATTR
ProtocolExtensionID TYPE = FT_UINT8 DISPLAY = BASE_DEC|BASE_EXT_STRING STRINGS = &ranap_ProtocolIE_ID_vals_ext
GTP-TEI TYPE = FT_UINT32 DISPLAY = BASE_HEX_DEC STRINGS = NULL