aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorJoakim Karlsson <oakimk@gmail.com>2019-12-30 19:27:21 +0100
committerAnders Broman <a.broman58@gmail.com>2020-01-04 13:42:28 +0000
commit9fd4555c6fc70022ed4f7eec6a47984ff03ef83d (patch)
treee1be1177efcb178e72f8fa984d8b7f47b61e4027 /epan/dissectors
parentae3b611fa07776ecc572510acebde3ea1bfe7998 (diff)
gtpv2: added IE Monitoring Event Information
Change-Id: Icf02c5715c2eda01fc86d5a71a209983b2f5df68 Reviewed-on: https://code.wireshark.org/review/35603 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-gtpv2.c76
1 files changed, 73 insertions, 3 deletions
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index 67a1d3ccd5..f026fbff0e 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -613,6 +613,12 @@ static int hf_gtpv2_node_name = -1;
static int hf_gtpv2_length_of_node_realm = -1;
static int hf_gtpv2_node_realm = -1;
static int hf_gtpv2_ms_ts = -1;
+static int hf_gtpv2_mon_event_inf_nsur = -1;
+static int hf_gtpv2_mon_event_inf_nsui = -1;
+static int hf_gtpv2_mon_event_inf_scef_reference_id = -1;
+static int hf_gtpv2_mon_event_inf_scef_id_length = -1;
+static int hf_gtpv2_mon_event_inf_scef_id = -1;
+static int hf_gtpv2_mon_event_inf_remaining_number_of_reports = -1;
static int hf_gtpv2_rohc_profiles_bit0 = -1;
static int hf_gtpv2_rohc_profiles_bit1 = -1;
static int hf_gtpv2_rohc_profiles_bit2 = -1;
@@ -1183,8 +1189,8 @@ static gint ett_gtpv2_ies[NUM_GTPV2_IES];
#define GTPV2_IE_PAGING_AND_SERVICE_INF 186
#define GTPV2_IE_INTEGER_NUMBER 187
#define GTPV2_IE_MILLISECOND_TS 188
+#define GTPV2_IE_MON_EVENT_INF 189
/*
-189 Monitoring Event Information
190 ECGI List
191 Remote UE Context
192 Remote User ID
@@ -7268,6 +7274,33 @@ dissect_gtpv2_ms_ts(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, pro
}
/*
+ * 8.120 Monitoring Event Information
+ */
+static void
+dissect_gtpv2_mon_event_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_)
+{
+ int offset = 0;
+ guint32 scef_id_len;
+
+ /* Octet 5 to 8 SCEF Reference ID */
+ proto_tree_add_item(tree, hf_gtpv2_mon_event_inf_scef_reference_id, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ /* Octet 9 Length of SCEF ID */
+ proto_tree_add_item_ret_uint(tree, hf_gtpv2_mon_event_inf_scef_id_length, tvb, offset, 1, ENC_BIG_ENDIAN, &scef_id_len);
+ offset++;
+ /* Octet 10 to k SCEF ID */
+ proto_tree_add_item(tree, hf_gtpv2_mon_event_inf_scef_id, tvb, offset, scef_id_len, ENC_UTF_8 | ENC_NA);
+ offset = offset + scef_id_len;
+ /* Octet (k+1) to (k+2) Remaining Number of Reports */
+ proto_tree_add_item(tree, hf_gtpv2_mon_event_inf_remaining_number_of_reports, tvb, offset, 2, ENC_BIG_ENDIAN );
+ offset += 2;
+
+ if(offset < length){
+ proto_tree_add_expert(tree, pinfo, &ei_gtpv2_ie_data_not_dissected, tvb, offset, length- offset);
+ }
+}
+
+/*
* 8.125 CIoT Optimizations Support Indication
*/
static void
@@ -8005,8 +8038,8 @@ static const gtpv2_ie_t gtpv2_ies[] = {
{GTPV2_IE_PAGING_AND_SERVICE_INF, dissect_gtpv2_paging_and_service_inf}, /* 186, 8.117 Paging and Service Information */
{GTPV2_IE_INTEGER_NUMBER, dissect_gtpv2_integer_number}, /* 187, 8.118 Integer Number */
- { GTPV2_IE_MILLISECOND_TS, dissect_gtpv2_ms_ts }, /* 188, 8.119 Millisecond Time Stamp */
- /* 189, 8.120 Monitoring Event Information */
+ {GTPV2_IE_MILLISECOND_TS, dissect_gtpv2_ms_ts}, /* 188, 8.119 Millisecond Time Stamp */
+ {GTPV2_IE_MON_EVENT_INF, dissect_gtpv2_mon_event_inf}, /* 189, 8.120 Monitoring Event Information */
/* 190, 8.121 ECGI List */
/* 191, 8.122 Remote UE Context */
/* 192, 8.123 Remote User ID */
@@ -8303,9 +8336,16 @@ dissect_gtpv2_ie_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
/*Octet 2 - 3 */
proto_tree_add_item(ie_tree, hf_gtpv2_ie_len, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
+
/* CR Spare Instance Octet 4*/
proto_tree_add_item(ie_tree, hf_gtpv2_cr, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* ch8.120 breaks the format described in ch8.2.1 */
+ if (type == GTPV2_IE_MON_EVENT_INF) {
+ proto_tree_add_item(ie_tree, hf_gtpv2_mon_event_inf_nsui, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ie_tree, hf_gtpv2_mon_event_inf_nsur, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+
instance = tvb_get_guint8(tvb, offset) & 0x0f;
proto_tree_add_item(ie_tree, hf_gtpv2_instance, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -10861,6 +10901,36 @@ void proto_register_gtpv2(void)
FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0,
NULL, HFILL }
},
+ { &hf_gtpv2_mon_event_inf_nsur,
+ { "NSUR (Notify SCEF when UE becomes Reachable)", "gtpv2.mon_event_inf.nsur",
+ FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x10,
+ NULL, HFILL }
+ },
+ { &hf_gtpv2_mon_event_inf_nsui,
+ { "NSUI (Notify SCEF when UE becomes Idle)", "gtpv2.mon_event_inf.nsui",
+ FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x20,
+ NULL, HFILL }
+ },
+ { &hf_gtpv2_mon_event_inf_scef_reference_id,
+ { "SCEF Reference ID", "gtpv2.mon_event_inf.scef_reference_id",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_gtpv2_mon_event_inf_scef_id_length,
+ { "SCEF ID length", "gtpv2.mon_event_inf.scef_id_length",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_gtpv2_mon_event_inf_scef_id,
+ { "SCEF ID", "gtpv2.mon_event_inf.scef_id",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_gtpv2_mon_event_inf_remaining_number_of_reports,
+ { "Remaining Number of Reports", "gtpv2.mon_event_inf.remaining_number_of_reports",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
{ &hf_gtpv2_rohc_profile_flags,
{ "ROHC Profiles flags", "gtpv2.rohc_profile_flags",
FT_UINT8, BASE_HEX, NULL, 0x0,