Starting to change SPGW to handle release access bearers request. Changing MME GTPC entity to contain an IMSI to sgw_ctr_fteid and ctr_teid to IMSI maps.

master
Pedro Alvarez 7 years ago
parent 5488609096
commit e9213f807d

@ -68,7 +68,8 @@ private:
in_addr_t m_mme_gtpc_ip;
uint32_t m_next_ctrl_teid;
std::map<uint32_t,uint32_t> m_teid_to_mme_s1ap_id;
std::map<uint32_t,uint64_t> m_ctr_teid_to_imsi;
std::map<uint64_t,srslte::gtpc_f_teid_ie> m_imsi_to_ctr_fteid;
};

@ -127,7 +127,6 @@ typedef struct{
enum erab_state state;
uint8_t erab_id;
srslte::gtpc_f_teid_ie enb_fteid;
srslte::gtpc_f_teid_ie sgw_ctrl_fteid;
srslte::gtpc_f_teid_ie sgw_s1u_fteid;
srslte::gtpc_pdn_address_allocation_ie pdn_addr_alloc;
} erab_ctx_t;
@ -148,8 +147,9 @@ typedef struct{
uint32_t mme_ue_s1ap_id;
struct sctp_sndrcvinfo enb_sri;
ecm_state_t ecm_state;
srslte::gtpc_f_teid_ie sgw_ctrl_fteid;
erab_ctx_t erabs_ctx[MAX_ERABS_PER_UE];
bool eit;
erab_ctx_t erabs_ctx[MAX_ERABS_PER_UE];
} ue_ecm_ctx_t;

@ -298,4 +298,31 @@ mme_gtpc::send_delete_session_request(ue_ecm_ctx_t *ue_ecm_ctx)
//TODO Handle delete session response
return;
}
void
mme_gtpc::send_release_access_bearers_request(ue_ecm_ctx_t *ecm_ctx)
{
m_mme_gtpc_log->info("Sending GTP-C Delete Access Bearers Request\n");
srslte::gtpc_pdu rel_req_pdu;
if(ecm_ctx->state != ECM_ )
{
}
srslte::gtpc_f_teid_ie *sgw_ctrl_fteid = NULL;
srslte::gtpc_header *header = &rel_req_pdu.header;
header->teid_present = true;
header->teid = sgw_ctrl_fteid->teid;
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;
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 );
srslte::gtpc_pdu del_resp_pdu;
m_spgw->handle_delete_session_request(&del_req_pdu, &del_resp_pdu);
//TODO Handle delete session response
return;
}
} //namespace srsepc

@ -707,7 +707,7 @@ s1ap_nas_transport::handle_nas_service_request(uint32_t m_tmsi,
m_s1ap_log->info("Generating KeNB with UL NAS COUNT: %d\n",ue_emm_ctx->security_ctxt.ul_nas_count);
//FIXME Send Modify context request OR send ctx release command and wait for the reply.
m_mme_gtpc->send_create_session_request(ue_ecm_ctx.imsi, ue_ecm_ctx.mme_ue_s1ap_id,false);
m_s1ap_log->console("UE ESM Ctr TEID %d\n", ue_ecm_ctx.erabs_ctx[5].sgw_ctrl_fteid.teid);
m_s1ap_log->console("UE ESM Ctr TEID %d\n", ue_ecm_ctx.sgw_ctrl_fteid.teid);
// m_s1ap->m_s1ap_ctx_mngmt_proc->send_initial_context_setup_request(ue_);
}
}

Loading…
Cancel
Save