Delete Session Request/Response is added

This commit is contained in:
Sukchan Lee 2017-04-27 13:36:25 +09:00
parent 80af1f0413
commit b95e40a851
5 changed files with 158 additions and 2 deletions

View File

@ -26,7 +26,7 @@
/*******************************************************************************
* This file had been created by gtp_tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2017-04-14 00:35:06.495340 by acetcom
* Created on: 2017-04-27 13:33:02.826509 by acetcom
* from 29274-d80.docx
******************************************************************************/
@ -1386,6 +1386,17 @@ tlv_desc_t tlv_desc_twan_identifier_timestamp_0 =
{ NULL }
};
tlv_desc_t tlv_desc_twan_identifier_timestamp_1 =
{
TLV_VAR_STR,
"TWAN Identifier Timestamp",
TLV_TWAN_IDENTIFIER_TIMESTAMP_TYPE,
0,
1,
sizeof(tlv_twan_identifier_timestamp_t),
{ NULL }
};
tlv_desc_t tlv_desc_metric_0 =
{
TLV_VAR_STR,
@ -1977,6 +1988,53 @@ tlv_desc_t tlv_desc_modify_bearer_response =
NULL,
}};
tlv_desc_t tlv_desc_delete_session_request =
{
TLV_MESSAGE,
"Delete Session Request",
0, 0, 0, 0, {
&tlv_desc_cause_0,
&tlv_desc_ebi_0,
&tlv_desc_uli_0,
&tlv_desc_indication_0,
&tlv_desc_pco_0,
&tlv_desc_node_type_0,
&tlv_desc_f_teid_0,
&tlv_desc_ue_time_zone_0,
&tlv_desc_uli_timestamp_0,
&tlv_desc_ran_nas_cause_0,
&tlv_desc_twan_identifier_0,
&tlv_desc_twan_identifier_timestamp_0,
&tlv_desc_overload_control_information_0,
&tlv_desc_overload_control_information_1,
&tlv_desc_overload_control_information_2,
&tlv_desc_twan_identifier_1,
&tlv_desc_twan_identifier_timestamp_1,
&tlv_desc_ip_address_0,
&tlv_desc_port_number_0,
&tlv_desc_epco_0,
&tlv_desc_port_number_1,
NULL,
}};
tlv_desc_t tlv_desc_delete_session_response =
{
TLV_MESSAGE,
"Delete Session Response",
0, 0, 0, 0, {
&tlv_desc_cause_0,
&tlv_desc_recovery_0,
&tlv_desc_pco_0,
&tlv_desc_indication_0,
&tlv_desc_load_control_information_0,
&tlv_desc_load_control_information_1,
&tlv_desc_load_control_information_2,
&tlv_desc_overload_control_information_0,
&tlv_desc_overload_control_information_1,
&tlv_desc_epco_0,
NULL,
}};
status_t gtp_parse_msg(gtp_message_t *gtp_message, c_uint8_t type, pkbuf_t *pkbuf)
{
@ -2009,6 +2067,14 @@ status_t gtp_parse_msg(gtp_message_t *gtp_message, c_uint8_t type, pkbuf_t *pkbu
rv = tlv_parse_msg(&gtp_message->modify_bearer_response,
&tlv_desc_modify_bearer_response, pkbuf, TLV_MODE_T1_L2_I1);
break;
case GTP_DELETE_SESSION_REQUEST_TYPE:
rv = tlv_parse_msg(&gtp_message->delete_session_request,
&tlv_desc_delete_session_request, pkbuf, TLV_MODE_T1_L2_I1);
break;
case GTP_DELETE_SESSION_RESPONSE_TYPE:
rv = tlv_parse_msg(&gtp_message->delete_session_response,
&tlv_desc_delete_session_response, pkbuf, TLV_MODE_T1_L2_I1);
break;
default:
d_warn("Not implmeneted(type:%d)", type);
break;
@ -2047,6 +2113,14 @@ status_t gtp_build_msg(pkbuf_t **pkbuf, c_uint8_t type, gtp_message_t *gtp_messa
rv = tlv_build_msg(pkbuf, &tlv_desc_modify_bearer_response,
&gtp_message->modify_bearer_response, TLV_MODE_T1_L2_I1);
break;
case GTP_DELETE_SESSION_REQUEST_TYPE:
rv = tlv_build_msg(pkbuf, &tlv_desc_delete_session_request,
&gtp_message->delete_session_request, TLV_MODE_T1_L2_I1);
break;
case GTP_DELETE_SESSION_RESPONSE_TYPE:
rv = tlv_build_msg(pkbuf, &tlv_desc_delete_session_response,
&gtp_message->delete_session_response, TLV_MODE_T1_L2_I1);
break;
default:
d_warn("Not implmeneted(type:%d)", type);
break;

View File

@ -26,7 +26,7 @@
/*******************************************************************************
* This file had been created by gtp_tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2017-04-14 00:35:06.485537 by acetcom
* Created on: 2017-04-27 13:33:02.810283 by acetcom
* from 29274-d80.docx
******************************************************************************/
@ -340,6 +340,7 @@ extern tlv_desc_t tlv_desc_node_identifier_0;
extern tlv_desc_t tlv_desc_presence_reporting_area_action_0;
extern tlv_desc_t tlv_desc_presence_reporting_area_information_0;
extern tlv_desc_t tlv_desc_twan_identifier_timestamp_0;
extern tlv_desc_t tlv_desc_twan_identifier_timestamp_1;
extern tlv_desc_t tlv_desc_metric_0;
extern tlv_desc_t tlv_desc_sequence_number_0;
extern tlv_desc_t tlv_desc_apn_and_relative_capacity_0;
@ -772,6 +773,43 @@ typedef struct _gtp_modify_bearer_response_t {
tlv_charging_id_t pdn_connection_charging_id;
} gtp_modify_bearer_response_t;
typedef struct _gtp_delete_session_request_t {
tlv_cause_t cause;
tlv_ebi_t linked_eps_bearer_id;
tlv_uli_t user_location_information;
tlv_indication_t indication_flags;
tlv_pco_t protocol_configuration_options;
tlv_node_type_t originating_node;
tlv_f_teid_t sender_f_teid_for_control_plane;
tlv_ue_time_zone_t ue_time_zone;
tlv_uli_timestamp_t uli_timestamp;
tlv_ran_nas_cause_t ran_nas_release_cause;
tlv_twan_identifier_t twan_identifier;
tlv_twan_identifier_timestamp_t twan_identifier_timestamp;
tlv_overload_control_information_t mme_s4_sgsn_s_overload_control_information;
tlv_overload_control_information_t sgw_s_overload_control_information;
tlv_overload_control_information_t twan_epdg_s_overload_control_information;
tlv_twan_identifier_t wlan_location_information;
tlv_twan_identifier_timestamp_t wlan_location_timestamp;
tlv_ip_address_t ue_local_ip_address;
tlv_port_number_t ue_udp_port;
tlv_epco_t extended_protocol_configuration_options;
tlv_port_number_t ue_tcp_port;
} gtp_delete_session_request_t;
typedef struct _gtp_delete_session_response_t {
tlv_cause_t cause;
tlv_recovery_t recovery;
tlv_pco_t protocol_configuration_options;
tlv_indication_t indication_flags;
tlv_load_control_information_t pgw_s_node_level_load_control_information;
tlv_load_control_information_t pgw_s_apn_level_load_control_information;
tlv_load_control_information_t sgw_s_node_level_load_control_information;
tlv_overload_control_information_t pgw_s_overload_control_information;
tlv_overload_control_information_t sgw_s_overload_control_information;
tlv_epco_t extended_protocol_configuration_options;
} gtp_delete_session_response_t;
typedef struct _gtp_message_t {
union {
gtp_echo_request_t echo_request;
@ -780,6 +818,8 @@ typedef struct _gtp_message_t {
gtp_create_session_response_t create_session_response;
gtp_modify_bearer_request_t modify_bearer_request;
gtp_modify_bearer_response_t modify_bearer_response;
gtp_delete_session_request_t delete_session_request;
gtp_delete_session_response_t delete_session_response;
};
} gtp_message_t;

26
lib/gtp/support/cache/tlv_msg_36.py vendored Normal file
View File

@ -0,0 +1,26 @@
ies = []
ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "C", "instance" : "0", "comment" : "If ISR is being de-activated, the Cause IE shall be included on the S4/S11 interface with the value ISR deactivation, which indicates that the SGW shall delete the bearer resources by sending Delete Bearer Request to the MME/SGSN on which ISR was activated with the same Cause value ISR deactivation. See NOTE 3"})
ies.append({ "ie_type" : "EBI", "ie_value" : "Linked EPS Bearer ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11, S5/S8 and S2a/S2b interfaces to indicate the default bearer associated with the PDN being disconnected unless in the handover/TAU/RAU with SGW relocation procedures."})
ies.append({ "ie_type" : "ULI", "ie_value" : "User Location Information", "presence" : "C", "instance" : "0", "comment" : "The MME/SGSN shall include this IE on the S4/S11 interface for the Detach procedure. The MME shall include ECGI, SGSN shall include CGI/SAI. The SGW shall include this IE on S5/S8 if it receives the ULI from MME/SGSN. See NOTE 4."})
ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags:Operation Indication: This flag shall be set to 1 over S4/S11 interface, if the SGW needs to forward the Delete Session Request message to the PGW. This flag shall not be set if the ISR associated GTP entity sends this message to the SGW in the Detach procedure. This flag shall also not be set to 1 in the SRNS Relocation Cancel Using S4 (6.9.2.2.4a in 3GPP TS 23.060 [4]), Inter RAT handover Cancel procedure with SGW change TAU with Serving GW change, Gn/Gb based RAU (see 5.5.2.5, 5.3.3.1, D.3.5 in 3GPP TS 23.401 [3], respectively), S1 Based handover Cancel procedure with SGW change.This flag shall also not be set to 1 for, e.g., X2 based handover procedure with SGW change(see subclause 5.5.1.1.3 in 3GPP TS 23.401 [3]), or S1 based handover procedure with SGW change (see subclause 5.5.1.2.2 in 3GPP TS 23.401 [3]). See NOTE 1.Scope Indication: This flag shall be set to 1 on the S4/S11 interface, if the request corresponds to TAU/RAU/Handover with SGW change/SRNS Relocation Cancel Using S4 with SGW change, Inter RAT handover Cancel procedure with SGW change, S1 Based handover Cancel procedure with SGW change. See NOTE 1.Release Over Any Access Indication (ROAAI): This flag shall be set to 1 over the S4/S11 interface when an NB-IFOM capable MME/SGSN wishes to request release of the PDN connection over any applicable access, e.g.:during a basic P-CSCF restoration procedure; or when the MME/SGSN wishes that the PDN connection be reestablished via another PGW for SIPTO.See NOTE 9."})
ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "C", "instance" : "0", "comment" : "If the UE includes the PCO IE, then the MME/SGSN shall copy the content of this IE transparently from the PCO IE included by the UE.If SGW receives the PCO IE, SGW shall forward it to PGW."})
ies.append({ "ie_type" : "Node Type", "ie_value" : "Originating Node", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 interface if the ISR is active in MME/SGSN to denote the type of the node originating the message.The SGW shall release the corresponding Originating Node related EPS Bearer contexts information in the PDN Connection identified by the LBI."})
ies.append({ "ie_type" : "F-TEID", "ie_value" : "Sender F-TEID for Control Plane", "presence" : "O", "instance" : "0", "comment" : "This IE may be included on the S4/S11 interfaces except when the source MME/SGSN initiates the deletion of PDN connections not supported by the target MME/SGSN during a successful handover/TAU/RAU procedure with MME/SGSN change and without SGW change (see subclauses 5.3.3.2 and 5.5.1.2.1 of 3GPP TS 23.401 [3]), in which case this IE shall not be included. See NOTE 10.If the Sender F-TEID for Control Plane is received by the SGW, the SGW shall only accept the Delete Session Request message when the Sender F-TEID for Control Plane in this message is the same as the Sender F-TEID for Control Plane that was last received in either the Create Session Request message or the Modify Bearer Request message on the given interface. If the ISR is activated, two F-TEIDs exist: one for the MME and the other for the SGSN. See NOTE 2."})
ies.append({ "ie_type" : "UE Time Zone", "ie_value" : "UE Time Zone", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the MME on the S11 interface or by the SGSN on the S4 interface, for Detach and PDN Disconnection procedures, if the UE Time Zone has changed."})
ies.append({ "ie_type" : "ULI Timestamp", "ie_value" : "ULI Timestamp", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 interface if the ULI IE is present. It indicates the time when the User Location Information was acquired. The SGW shall include this IE on S5/S8 if the SGW receives it from the MME/SGSN. See NOTE 4."})
ies.append({ "ie_type" : "RAN/NAS Cause", "ie_value" : "RAN/NAS Release Cause", "presence" : "CO", "instance" : "0", "comment" : "The MME shall include this IE on the S11 interface to indicate the NAS release cause to release the PDN connection, if available and this information is permitted to be sent to the PGW operator according to MME operators policy. The SGW shall include this IE on the S5/S8 interface if it receives it from the MME and if the Operation Indication bit received from the MME is set to 1."})
ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "TWAN Identifier", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the TWAN on the S2a interface as specified in 3GPP TS 23.402 [45]. "})
ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "TWAN Identifier Timestamp", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the TWAN on the S2a if the TWAN Identifier IE is present. It shall indicate the time when the TWAN acquired the TWAN Identifier information. "})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SGSN's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the MME/S4-SGSN may include this IE on the S11/S4 interface if the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the MME/S4-SGSN shall provide only one instance of this IE, representing its overload information."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."})
type_list["Overload Control Information"]["max_instance"] = "2"
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "TWAN/ePDG's Overload Control Information", "presence" : "O", "instance" : "2", "comment" : "During an overload condition, the TWAN/ePDG may include this IE over the S2a/S2b interface if the overload control feature is supported by the TWAN/ePDG and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the TWAN/ePDG shall provide only one instance of this IE, representing its overload information."})
type_list["TWAN Identifier"]["max_instance"] = "1"
ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "WLAN Location Information", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface if the WLAN Location Information is available. "})
type_list["TWAN Identifier Timestamp"]["max_instance"] = "1"
ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "WLAN Location Timestamp", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface, if the WLAN Location Timestamp is available. "})
ies.append({ "ie_type" : "IP Address", "ie_value" : "UE Local IP Address", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface. "})
ies.append({ "ie_type" : "Port Number", "ie_value" : "UE UDP Port", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected and UDP encapsulation is used."})
ies.append({ "ie_type" : "ePCO", "ie_value" : "Extended Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "If the UE includes the ePCO IE, then the MME shall copy the content of this IE transparently from the ePCO IE included by the UE.If the SGW receives the ePCO IE, the SGW shall forward it to the PGW."})
ies.append({ "ie_type" : "Port Number", "ie_value" : "UE TCP Port", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected and the TCP encapsulation is used."})
msg_list[key]["ies"] = ies

14
lib/gtp/support/cache/tlv_msg_37.py vendored Normal file
View File

@ -0,0 +1,14 @@
ies = []
ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""})
ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S5/S8, S4/S11 and S2a/S2b interfaces if contacting the peer for the first time "})
ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "C", "instance" : "0", "comment" : "The PGW shall include Protocol Configuration Options (PCO) IE on the S5/S8 interface, if available and if the UE or the network does not support ePCO.If SGW receives this IE, SGW shall forward it to SGSN/MME on the S4/S11 interface."})
ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Associate OCI with PGW nodes identity: The PGW shall set this flag to 1 on the S5/S8 interface or S2a/S2b interface if it has included the PGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the HSS or DNS during the PGW selection) of the serving PGW. The SGW shall set this flag on the S11/S4 interface if it supports the overload control feature and if the flag is set on the S5/S8 interface.Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW."})
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's node level Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing its node level load information, if the load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access network, belongs (see clause 12.2.6)."})
type_list["Load Control Information"]["max_instance"] = "1"
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's APN level Load Control Information", "presence" : "O", "instance" : "1", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing APN level load information, if the APN level load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.2.6).When present, the PGW shall provide one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the load information for a list of APN(s).See NOTE 1, NOTE 3."})
type_list["Load Control Information"]["max_instance"] = "2"
ies.append({ "ie_type" : "Load Control Information", "ie_value" : "SGW's node level Load Control Information", "presence" : "O", "instance" : "2", "comment" : "The SGW may include this IE, over the S11/S4 interface if the load control feature is supported by the SGW and is activated in the network (see clause 12.2.6).When present, the SGW shall provide only one instance of this IE, representing its node level load information."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "PGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the PGW may include this IE on the S5/S8 or S2a/S2b interface, if the overload control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access based network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.3.11).When present, the PGW shall provide at least one instance of this IE, representing its overload information. Additionally, the PGW may indicate APN level overload control by providing, one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the overload information for a list of APN(s).See NOTE 2, NOTE 4."})
ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."})
ies.append({ "ie_type" : "ePCO", "ie_value" : "Extended Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "The PGW shall include Extended Protocol Configuration Options (ePCO) IE on the S5/S8 interface, if available and if the UE and the network support ePCO.If the SGW receives this IE, the SGW shall forward it to the MME on the S11 interface."})
msg_list[key]["ies"] = ies

View File

@ -318,6 +318,8 @@ msg_list["Create Session Request"]["table"] = 8
msg_list["Create Session Response"]["table"] = 13
msg_list["Modify Bearer Request"]["table"] = 29
msg_list["Modify Bearer Response"]["table"] = 33
msg_list["Delete Session Request"]["table"] = 38
msg_list["Delete Session Response"]["table"] = 44
for key in msg_list.keys():
if "table" in msg_list[key].keys():