aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-gtpv2.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index fe7c1b3100..bbf04aad8b 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -2190,10 +2190,11 @@ dissect_gtpv2_ecgi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *off
guint32 octet4;
guint8 spare;
guint32 ECGI;
- guint32 enodebid;
- guint8 cellid;
- proto_tree *subtree;
- proto_item *item;
+ const int* ECGI_flags[] = {
+ &hf_gtpv2_enodebid,
+ &hf_gtpv2_cellid,
+ NULL
+ };
mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, *offset, E212_NONE, TRUE);
*offset += 3;
@@ -2206,17 +2207,11 @@ dissect_gtpv2_ecgi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *off
spare = octet & 0xF0;
octet4 = tvb_get_ntohl(tvb, *offset);
ECGI = octet4 & 0x0FFFFFFF;
- enodebid = ECGI >> 8;
- cellid = (guint8)ECGI & 0xFF;
proto_tree_add_uint(tree, hf_gtpv2_ecgi_eci_spare, tvb, *offset, 1, spare);
/* The coding of the E-UTRAN cell identifier is the responsibility of each administration.
* Coding using full hexadecimal representation shall be used.
*/
- item = proto_tree_add_uint(tree, hf_gtpv2_ecgi_eci, tvb, *offset, 4, ECGI);
- subtree = proto_item_add_subtree(item, ett_gtpv2_eci);
- proto_tree_add_uint(subtree, hf_gtpv2_enodebid, tvb, *offset, 3, enodebid);
- proto_tree_add_uint(subtree, hf_gtpv2_cellid, tvb, *offset + 3, 1, cellid);
- /*proto_tree_add_item(tree, hf_gtpv2_ecgi_eci, tvb, offset, 4, ENC_BIG_ENDIAN);*/
+ proto_tree_add_bitmask(tree, tvb, *offset, hf_gtpv2_ecgi_eci, ett_gtpv2_eci, ECGI_flags, ENC_BIG_ENDIAN);
*offset += 4;
str = wmem_strdup_printf(wmem_packet_scope(), "%s, ECGI 0x%x",
mcc_mnc_str,
@@ -8036,17 +8031,17 @@ void proto_register_gtpv2(void)
},
{&hf_gtpv2_macro_enodeb_id,
{"Macro eNodeB ID", "gtpv2.macro_enodeb_id",
- FT_UINT24, BASE_HEX, NULL, 0x0fffff,
+ FT_UINT32, BASE_HEX, NULL, 0x0fffff,
NULL, HFILL}
},
{&hf_gtpv2_cellid,
{"CellId", "gtpv2.cellid",
- FT_UINT8, BASE_DEC, NULL, 0,
+ FT_UINT32, BASE_DEC, NULL, 0xFF,
NULL, HFILL}
},
{ &hf_gtpv2_enodebid,
{ "eNodeB Id", "gtpv2.enodebid",
- FT_UINT32, BASE_DEC, NULL, 0,
+ FT_UINT32, BASE_DEC, NULL, 0x0FFFFF00,
NULL, HFILL }
},
{ &hf_gtpv2_CauseProtocol,