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>
This commit is contained in:
parent
0997129e0f
commit
bd64be6444
|
@ -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
|
||||
|
|
|
@ -3155,8 +3155,20 @@ dissect_ranap_AuthorisedPLMNs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
|
|||
|
||||
static int
|
||||
dissect_ranap_BindingID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 374 "../../asn1/ranap/ranap.cnf"
|
||||
tvbuff_t *value_tvb = NULL;
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
4, 4, FALSE, NULL);
|
||||
4, 4, FALSE, &value_tvb);
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -7757,6 +7769,7 @@ dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer(tvb , offset, actx ,tre
|
|||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue