S1AP: fix filtering on cell-ID

Filter does not work due to same shared short name for cell-id being used for two different asn.1 defintions
  cell-ID OCTET STRING,
  cell-ID CellIdentity,

Change-Id: I5921bc82d46f38d43f9083e41d3a0558821042eb
Reviewed-on: https://code.wireshark.org/review/26545
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pavel Strnad <pavel_strnad@hotmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
Pavel Strnad 2018-03-19 09:13:35 +01:00 committed by Pascal Quantin
parent 4d3c8bc61e
commit 18cd454da9
2 changed files with 23 additions and 4 deletions

View File

@ -2120,6 +2120,17 @@ SecondaryRATReport N s1ap.proc.imsg id-SecondaryRATReport
#.END
#.FIELD_ATTR
EUTRAN-CGI/cell-ID ABBREV=CellIdentity TYPE=FT_UINT32 DISPLAY=BASE_HEX
#.FN_BODY CellIdentity VAL_PTR = &cell_id_tvb HF_INDEX=-1
tvbuff_t *cell_id_tvb = NULL;
%(DEFAULT_BODY)s
if (cell_id_tvb) {
guint32 cell_id = tvb_get_bits32(cell_id_tvb, 0, 28, ENC_BIG_ENDIAN);
actx->created_item = proto_tree_add_uint(tree, hf_index, cell_id_tvb, 0, 4, cell_id);
}
#.END
#
# Editor modelines - http://www.wireshark.org/tools/modelines.html
#

View File

@ -2600,8 +2600,16 @@ dissect_s1ap_Additional_GUTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
static int
dissect_s1ap_CellIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
28, 28, FALSE, NULL, NULL);
#line 2126 "./asn1/s1ap/s1ap.cnf"
tvbuff_t *cell_id_tvb = NULL;
offset = dissect_per_bit_string(tvb, offset, actx, tree, -1,
28, 28, FALSE, &cell_id_tvb, NULL);
if (cell_id_tvb) {
guint32 cell_id = tvb_get_bits32(cell_id_tvb, 0, 28, ENC_BIG_ENDIAN);
actx->created_item = proto_tree_add_uint(tree, hf_index, cell_id_tvb, 0, 4, cell_id);
}
return offset;
}
@ -17227,8 +17235,8 @@ void proto_register_s1ap(void) {
FT_INT32, BASE_DEC|BASE_UNIT_STRING, &units_octet_octets, 0,
"INTEGER", HFILL }},
{ &hf_s1ap_cell_ID,
{ "cell-ID", "s1ap.cell_ID",
FT_BYTES, BASE_NONE, NULL, 0,
{ "cell-ID", "s1ap.CellIdentity",
FT_UINT32, BASE_HEX, NULL, 0,
"CellIdentity", HFILL }},
{ &hf_s1ap_expectedActivity,
{ "expectedActivity", "s1ap.expectedActivity_element",