Adding release access bearers request.

master
Pedro Alvarez 7 years ago
parent 3b338067c9
commit 2cc4959667

@ -52,16 +52,15 @@ const uint8_t GTPC_V2 = 2;
* n+2 | Sequence | * n+2 | Sequence |
* n+3 | Spare | * n+3 | Spare |
***************************************************************************/ ***************************************************************************/
typedef struct gtpc_header
typedef struct gtpc_header {
{ uint8_t version;
uint8_t version; bool piggyback;
bool piggyback; bool teid_present;
bool teid_present; uint8_t type;
uint8_t type; uint64_t teid;
uint64_t teid; uint64_t sequence;
uint64_t sequence; }gtpc_header_t;
} gtpc_header_t;
/**************************************************************************** /****************************************************************************
* GTP-C v2 Payload * GTP-C v2 Payload
@ -69,16 +68,17 @@ const uint8_t GTPC_V2 = 2;
* *
* Union that hold the different structures for the possible message types. * Union that hold the different structures for the possible message types.
***************************************************************************/ ***************************************************************************/
typedef union gtpc_msg_choice typedef union gtpc_msg_choice
{ {
struct gtpc_create_session_request create_session_request; struct gtpc_create_session_request create_session_request;
struct gtpc_create_session_response create_session_response; struct gtpc_create_session_response create_session_response;
struct gtpc_modify_bearer_request modify_bearer_request; struct gtpc_modify_bearer_request modify_bearer_request;
struct gtpc_modify_bearer_response modify_bearer_response; struct gtpc_modify_bearer_response modify_bearer_response;
struct gtpc_release_access_bearers_request release_access_bearers_request;
struct gtpc_release_access_bearers_response release_access_bearers_response;
struct gtpc_delete_session_request delete_session_request; struct gtpc_delete_session_request delete_session_request;
struct gtpc_delete_session_response delete_session_response; struct gtpc_delete_session_response delete_session_response;
} gtpc_msg_choice_t; }gtpc_msg_choice_t;
/**************************************************************************** /****************************************************************************
* GTP-C v2 Message * GTP-C v2 Message
@ -88,15 +88,10 @@ typedef union gtpc_msg_choice
* of one GTP-C header and one union of structures, which can hold * of one GTP-C header and one union of structures, which can hold
* all the possible GTP-C messages * all the possible GTP-C messages
***************************************************************************/ ***************************************************************************/
typedef struct gtpc_pdu typedef struct gtpc_pdu
{ {
struct gtpc_header header; struct gtpc_header header;
union gtpc_msg_choice choice; union gtpc_msg_choice choice;
} gtpc_pdu_t; }gtpc_pdu_t;
}//namespace
};
#endif #endif

@ -410,5 +410,36 @@ struct gtpc_delete_session_response
//Private extension //Private extension
}; };
/****************************************************************************
*
* GTP-C v2 Release Access Bearers Request
* Ref: 3GPP TS 29.274 v10.14.0 Table 7.2.21.1-1
*
***************************************************************************/
struct gtpc_release_access_bearers_request
{
bool list_of_rabs_present;
//Linked EPS Bearer ID
bool originating_node_present;
//Indication Flags
//Private Extension
};
/****************************************************************************
*
* GTP-C v2 Delete Session Response
* Ref: 3GPP TS 29.274 v10.14.0 Table 7.2.22.1-1
*
***************************************************************************/
struct gtpc_release_access_bearers_response
{
struct gtpc_cause_ie cause;
//Recovery
//Private extension
};
} //namespace } //namespace
#endif //GTPC_V2_MSG_H #endif //GTPC_V2_MSG_H

@ -56,6 +56,7 @@ public:
void handle_create_session_response(srslte::gtpc_pdu *cs_resp_pdu, bool pack_attach); void handle_create_session_response(srslte::gtpc_pdu *cs_resp_pdu, bool pack_attach);
void send_modify_bearer_request(uint64_t imsi, erab_ctx_t *bearer_ctx); void send_modify_bearer_request(uint64_t imsi, erab_ctx_t *bearer_ctx);
void handle_modify_bearer_response(srslte::gtpc_pdu *mb_resp_pdu); void handle_modify_bearer_response(srslte::gtpc_pdu *mb_resp_pdu);
void send_release_access_bearers_request(uint64_t imsi);
void send_delete_session_request(uint64_t imsi); void send_delete_session_request(uint64_t imsi);
private: private:

@ -351,10 +351,6 @@ mme_gtpc::send_release_access_bearers_request(uint64_t imsi)
{ {
m_mme_gtpc_log->info("Sending GTP-C Delete Access Bearers Request\n"); m_mme_gtpc_log->info("Sending GTP-C Delete Access Bearers Request\n");
srslte::gtpc_pdu rel_req_pdu; srslte::gtpc_pdu rel_req_pdu;
if(ecm_ctx->state != ECM_STATE_CONNECTED )
{
m_mme_gtpc_log->error("ECM State is not connected. No valid SGW Ctr TEID present\n");
}
srslte::gtpc_f_teid_ie *sgw_ctrl_fteid = NULL; srslte::gtpc_f_teid_ie *sgw_ctrl_fteid = NULL;
srslte::gtpc_header *header = &rel_req_pdu.header; srslte::gtpc_header *header = &rel_req_pdu.header;
@ -363,13 +359,12 @@ mme_gtpc::send_release_access_bearers_request(uint64_t imsi)
header->type = srslte::GTPC_MSG_TYPE_RELEASE_ACCESS_BEARERS_REQUEST; header->type = srslte::GTPC_MSG_TYPE_RELEASE_ACCESS_BEARERS_REQUEST;
srslte::gtpc_release_access_bearers_request *rel_req = &rel_req_pdu.choice.release_access_bearers_request; srslte::gtpc_release_access_bearers_request *rel_req = &rel_req_pdu.choice.release_access_bearers_request;
del_req->cause.cause_value = srslte::GTPC_CAUSE_VALUE_ISR_DEACTIVATION;
m_mme_gtpc_log->info("GTP-C Release Access Berarers Request -- S-GW Control TEID %d\n", sgw_ctrl_fteid->teid ); m_mme_gtpc_log->info("GTP-C Release Access Berarers Request -- S-GW Control TEID %d\n", sgw_ctrl_fteid->teid );
srslte::gtpc_pdu del_resp_pdu; srslte::gtpc_pdu rel_resp_pdu;
m_spgw->handle_delete_session_request(&del_req_pdu, &del_resp_pdu); m_spgw->handle_release_access_bearers_response(&del_req_pdu, &rel_resp_pdu);
//TODO Handle delete session response //The GTP-C connection will not be torn down, just the user plane bearers.
return; return;
} }
} //namespace srsepc } //namespace srsepc

Loading…
Cancel
Save