aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gtpv2.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-14 19:00:40 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-14 19:00:40 +0000
commitffaf67b6158b6c9235a7fe96d345419c371f65ff (patch)
tree29d6204556280b95c1cc89f1b353ac217fbcc1b1 /epan/dissectors/packet-gtpv2.c
parentfe5848271f2124a42f40a921fb75068a2840e164 (diff)
from Katrina Zhang:
According to the latest TS29.274 -- adding 4 IE support: H(e)NB Information Reporting[165]; IPv4 Configuration Parameters (IP4CP)[166]; Change to Report Flags[167]; Action Indication[168] -- cause values of IE(Cause) svn path=/trunk/; revision=48301
Diffstat (limited to 'epan/dissectors/packet-gtpv2.c')
-rw-r--r--epan/dissectors/packet-gtpv2.c175
1 files changed, 148 insertions, 27 deletions
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index bea3862921..3aebbef5a3 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -373,6 +373,12 @@ static int hf_gtpv2_mbms_service_id = -1;
static int hf_gtpv2_add_flags_for_srvcc_ics = -1;
static int hf_gtpv2_vsrvcc_flag = -1;
static int hf_gtpv2_abs_time_mbms_data = -1;
+static int hf_gtpv2_henb_info_report_fti = -1;
+static int hf_gtpv2_ip4cp_subnet_prefix_len = -1;
+static int hf_gtpv2_ip4cp_ipv4 = -1;
+static int hf_gtpv2_change_report_flags_sncr = -1;
+static int hf_gtpv2_change_report_flags_tzcr = -1;
+static int hf_gtpv2_action_indication_val = -1;
static int hf_gtpv2_mbms_session_duration_days = -1;
static int hf_gtpv2_mbms_session_duration_secs = -1;
static int hf_gtpv2_time_to_data_xfer = -1;
@@ -681,7 +687,11 @@ static value_string_ext gtpv2_message_type_vals_ext = VALUE_STRING_EXT_INIT(gtpv
#define GTPV2_IE_MDT_CONFIG 162
#define GTPV2_IE_APCO 163
#define GTPV2_IE_ABS_MBMS_DATA_TF_TIME 164
-/* 164 to 254 reserved for future use */
+#define GTPV2_IE_HENB_INFO_REPORT 165
+#define GTPV2_IE_IP4CP 166
+#define GTPV2_IE_CHANGE_TO_REPORT_FLAGS 167
+#define GTPV2_IE_ACTION_INDICATION 168
+/* 169 to 254 reserved for future use */
#define GTPV2_IE_PRIVATE_EXT 255
#define SPARE 0X0
@@ -810,7 +820,11 @@ static const value_string gtpv2_element_type_vals[] = {
{162, "MDT Configuration"}, /* Extendable / 8.93 */
{163, "Additional Protocol Configuration Options (APCO)"}, /* Extendable / 8.94 */
{164, "Absolute Time of MBMS Data Transfer"}, /* Extendable / 8.95 */
- /* 165 to 254 Spare. For future use. */ /* For future use. FFS */
+ {165, "H(e)NB Information Reporting"}, /* Extendable / 8.96*/
+ {166, "IPv4 Configuration Parameters (IP4CP)"}, /* Extendable / 8.97*/
+ {167, "Change to Report Flags"}, /* Extendable / 8.98 */
+ {168, "Action Indication"}, /* Extendable / 8.99 */
+ /* 169 to 254 Spare. For future use. */ /* For future use. FFS */
{255, "Private Extension"}, /* Variable Length / 8.67 */
{0, NULL}
};
@@ -862,30 +876,29 @@ dissect_gtpv2_imsi(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, prot
/* Table 8.4-1: Cause values */
static const value_string gtpv2_cause_vals[] = {
{0, "Reserved"},
- /* Request */
- { 1, "Paging Cause"},
+ /* Request / Initial message */
+ { 1, "Reserved"},
{ 2, "Local Detach"},
{ 3, "Complete Detach"},
{ 4, "RAT changed from 3GPP to Non-3GPP"},
- { 5, "ISR is activated"},
- { 6, "Error Indication received from RNC/eNodeB"},
+ { 5, "ISR deactivation"},
+ { 6, "Error Indication received from RNC/eNodeB/S4-SGSN"},
{ 7, "IMSI Detach Only"},
{ 8, "Reactivation Requested"},
{ 9, "PDN reconnection to this APN disallowed"},
{ 10, "Access changed from Non-3GPP to 3GPP"},
- /* 11-15 Spare. This value range is reserved for Cause values in a request message */
- { 11, "Spare"},
- { 12, "Spare"},
- { 13, "Spare"},
- { 14, "Spare"},
+ { 11, "PDN connection inactivity timer expires"},
+ { 12, "PGW not responding"},
+ { 13, "Network Failure"},
+ { 14, "QoS parameter mismatch"},
+ /* 15 Spare. This value range is reserved for Cause values in a request message */
{ 15, "Spare"},
- /* Acceptance Response */
+ /* Acceptance in a Response / triggered message */
{ 16, "Request accepted"},
{ 17, "Request accepted partially"},
{ 18, "New PDN type due to network preference"},
{ 19, "New PDN type due to single address bearer only"},
- /* 20-63 Spare. This value range is reserved for Cause values in acceptance response message */
- /* Rejection Response */
+ /* 20-63 Spare. This value range shall be used by Cause values in an acceptance response/triggered message */
{ 20, "Spare"},
{ 21, "Spare"},
{ 22, "Spare"},
@@ -930,7 +943,7 @@ static const value_string gtpv2_cause_vals[] = {
{ 61, "Spare"},
{ 62, "Spare"},
{ 63, "Spare"},
-
+ /* Rejection in a Response / triggered message */
{ 64, "Context Not Found"},
{ 65, "Invalid Message Format"},
{ 66, "Version not supported by next peer"},
@@ -938,7 +951,7 @@ static const value_string gtpv2_cause_vals[] = {
{ 68, "Service not supported"},
{ 69, "Mandatory IE incorrect"},
{ 70, "Mandatory IE missing"},
- { 71, "Optional IE incorrect"},
+ { 71, "Shall not be used"},
{ 72, "System failure"},
{ 73, "No resources available"},
{ 74, "Semantic error in the TFT operation"},
@@ -946,9 +959,9 @@ static const value_string gtpv2_cause_vals[] = {
{ 76, "Semantic errors in packet filter(s)"},
{ 77, "Syntactic errors in packet filter(s)"},
{ 78, "Missing or unknown APN"},
- { 79, "Unexpected repeated IE"},
+ { 79, "Shall not be used"},
{ 80, "GRE key not found"},
- { 81, "Reallocation failure"},
+ { 81, "Relocation failure"},
{ 82, "Denied in RAT"},
{ 83, "Preferred PDN type not supported"},
{ 84, "All dynamic addresses are occupied"},
@@ -961,13 +974,13 @@ static const value_string gtpv2_cause_vals[] = {
{ 91, "No memory available"},
{ 92, "User authentication failed"},
{ 93, "APN access denied - no subscription"},
- { 94, "Request rejected"},
+ { 94, "Request rejected(reason not specified)"},
{ 95, "P-TMSI Signature mismatch"},
- { 96, "IMSI not known"},
+ { 96, "IMSI/IMEI not known"},
{ 97, "Semantic error in the TAD operation"},
{ 98, "Syntactic error in the TAD operation"},
- { 99, "Reserved Message Value Received"},
- {100, "PGW not responding"},
+ { 99, "Shall not be used"},
+ {100, "Remote peer not responding"},
{101, "Collision with network initiated request"},
{102, "Unable to page UE due to Suspension"},
{103, "Conditional IE missing"},
@@ -980,7 +993,11 @@ static const value_string gtpv2_cause_vals[] = {
{110, "Temporarily rejected due to handover procedure in progress"},
{111, "Modifications not limited to S1-U bearers"},
{112, "Request rejected for a PMIPv6 reason "},
- /* 113-239 Spare. For future use in a triggered/response message */
+ {113, "APN Congestion"},
+ {114, "Bearer handling not supported"},
+ {115, "UE already re-attached"},
+ {116, "Multiple PDN connections for a given APN not allowed"},
+ /* 117-239 Spare. For future use in a triggered/response message */
/* 240-255 Spare. For future use in an initial/request message */
{0, NULL}
};
@@ -4952,6 +4969,78 @@ dissect_gtpv2_abs_mbms_data_tf_time(tvbuff_t *tvb, packet_info *pinfo _U_, proto
proto_tree_add_text(tree, tvb, offset, length-offset, "Spare: %s", tvb_bytes_to_str(tvb, offset, length-offset));
}
+/* 8.96 H(e)NB Information Reporting */
+static const true_false_string gtpv2_henb_info_report_fti_vals = {
+ "Start reporting H(e)NB local IP address and UDP port number information change",
+ "Stop reporting H(e)NB local IP address and UDP port number information change",
+};
+
+static void
+dissect_gtpv2_henb_info_report(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+{
+ int offset = 0;
+
+ proto_tree_add_item(tree, hf_gtpv2_henb_info_report_fti, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ if (length > 1)
+ proto_tree_add_text(tree, tvb, offset, length-1, "Spare: %s", tvb_bytes_to_str(tvb, offset, length-1));
+}
+
+/* 8.97 IPv4 Configuration Parameters (IP4CP) */
+static void
+dissect_gtpv2_ip4cp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+{
+ int offset = 0;
+
+ proto_tree_add_item(tree, hf_gtpv2_ip4cp_subnet_prefix_len, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ proto_tree_add_item(tree, hf_gtpv2_ip4cp_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+
+ if (length > offset)
+ proto_tree_add_text(tree, tvb, offset, length-offset, "Spare: %s", tvb_bytes_to_str(tvb, offset, length-offset));
+}
+
+/* 8.98 Change to Report Flags */
+static void
+dissect_gtpv2_change_report_flags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+{
+ int offset = 0;
+
+ proto_tree_add_item(tree, hf_gtpv2_change_report_flags_sncr, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_gtpv2_change_report_flags_tzcr, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ if (length > 1)
+ proto_tree_add_text(tree, tvb, offset, length-1, "Spare: %s", tvb_bytes_to_str(tvb, offset, length-1));
+}
+
+/* 8.99 Action Indication */
+static const value_string gtpv2_action_indication_vals[] = {
+ { 0, "No Action"},
+ { 1, "Deactivation Indication"},
+ { 2, "Paging Indication"},
+ { 3, "Spare"},
+ { 4, "Spare"},
+ { 5, "Spare"},
+ { 6, "Spare"},
+ { 7, "Spare"},
+ { 0, NULL}
+};
+static value_string_ext gtpv2_action_indication_vals_ext = VALUE_STRING_EXT_INIT(gtpv2_action_indication_vals);
+
+static void
+dissect_gtpv2_action_indication(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 message_type _U_, guint8 instance _U_)
+{
+ int offset = 0;
+
+ proto_tree_add_item(tree, hf_gtpv2_action_indication_val, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ if (length > 1)
+ proto_tree_add_text(tree, tvb, offset, length-1, "Spare: %s", tvb_bytes_to_str(tvb, offset, length-1));
+}
typedef struct _gtpv2_ie {
int ie_type;
@@ -5070,15 +5159,17 @@ static const gtpv2_ie_t gtpv2_ies[] = {
{GTPV2_IE_MMBR, dissect_gtpv2_mmbr}, /* 161, 8.92 Max MBR/APN-AMBR (MMBR) */
{GTPV2_IE_MDT_CONFIG, dissect_gtpv2_mdt_config}, /* 162, 8.93 MDT Configuration */
{GTPV2_IE_APCO, dissect_gtpv2_apco}, /* 163, 8.94 Additional Protocol Configuration Options (APCO) */
- {GTPV2_IE_ABS_MBMS_DATA_TF_TIME, dissect_gtpv2_abs_mbms_data_tf_time}, /* 164, 9.95 Absolute Time of MBMS Data Transfer */
- /* 165-254 Spare. For future use. FFS */
+ {GTPV2_IE_ABS_MBMS_DATA_TF_TIME, dissect_gtpv2_abs_mbms_data_tf_time}, /* 164, 8.95 Absolute Time of MBMS Data Transfer */
+ {GTPV2_IE_HENB_INFO_REPORT, dissect_gtpv2_henb_info_report}, /* 165, 8.96 H(e)NB Information Reporting */
+ {GTPV2_IE_IP4CP, dissect_gtpv2_ip4cp}, /* 166, 8.97 IPv4 Configuration Parameters (IPv4CP) */
+ {GTPV2_IE_CHANGE_TO_REPORT_FLAGS, dissect_gtpv2_change_report_flags}, /* 167, 8.98 Change to Report Flags */
+ {GTPV2_IE_ACTION_INDICATION, dissect_gtpv2_action_indication}, /* 168, 8.99 Action Indication */
+ /* 169-254 Spare. For future use. FFS */
{GTPV2_IE_PRIVATE_EXT, dissect_gtpv2_private_ext},
{0, dissect_gtpv2_unknown}
};
-
-
static void
dissect_gtpv2_ie_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, gint offset, guint8 message_type)
{
@@ -6732,6 +6823,36 @@ void proto_register_gtpv2(void)
FT_BOOLEAN, 8, NULL, 0x02,
NULL, HFILL}
},
+ { &hf_gtpv2_henb_info_report_fti,
+ {"FTI", "gtpv2.henb_info_report_fti",
+ FT_BOOLEAN, 8, TFS(&gtpv2_henb_info_report_fti_vals), 0x01,
+ NULL, HFILL}
+ },
+ { &hf_gtpv2_ip4cp_subnet_prefix_len,
+ {"Subnet Prefix Length", "gtpv2.ip4cp_subnet_prefix_len",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}
+ },
+ { &hf_gtpv2_ip4cp_ipv4,
+ {"IPv4 Default Router Address", "gtpv2.ip4cp_ipv4",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}
+ },
+ { &hf_gtpv2_change_report_flags_sncr,
+ {"SNCR (Service Network Change to Report)", "gtpv2.change_report_flags_sncr",
+ FT_BOOLEAN, 8, NULL, 0x01,
+ NULL, HFILL}
+ },
+ { &hf_gtpv2_change_report_flags_tzcr,
+ {"TZCR (Time Zone Change to Report)", "gtpv2.change_report_flags_tzcr",
+ FT_BOOLEAN, 8, NULL, 0x02,
+ NULL, HFILL}
+ },
+ {&hf_gtpv2_action_indication_val,
+ {"Action Indication", "gtpv2.action_indication_val",
+ FT_UINT8, BASE_DEC|BASE_EXT_STRING, &gtpv2_action_indication_vals_ext, 0x07,
+ NULL , HFILL}
+ },
{ &hf_gtpv2_abs_time_mbms_data,
{"Absolute Time of MBMS Data Transfer", "gtpv2.abs_time_mbms_data",
FT_STRING, BASE_NONE, NULL, 0,