|
|
@ -298,10 +298,14 @@ void s1ap::build_tai_cgi()
|
|
|
|
/*******************************************************************************
|
|
|
|
/*******************************************************************************
|
|
|
|
/* RRC interface
|
|
|
|
/* RRC interface
|
|
|
|
********************************************************************************/
|
|
|
|
********************************************************************************/
|
|
|
|
void s1ap::initial_ue(uint16_t rnti, asn1::s1ap::rrc_establishment_cause_e cause, srslte::unique_byte_buffer_t pdu)
|
|
|
|
void s1ap::initial_ue(uint16_t rnti,
|
|
|
|
|
|
|
|
uint32_t enb_cc_idx,
|
|
|
|
|
|
|
|
asn1::s1ap::rrc_establishment_cause_e cause,
|
|
|
|
|
|
|
|
srslte::unique_byte_buffer_t pdu)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::unique_ptr<ue> ue_ptr{new ue{this}};
|
|
|
|
std::unique_ptr<ue> ue_ptr{new ue{this}};
|
|
|
|
ue_ptr->ctxt.rnti = rnti;
|
|
|
|
ue_ptr->ctxt.rnti = rnti;
|
|
|
|
|
|
|
|
ue_ptr->ctxt.enb_cc_idx = enb_cc_idx;
|
|
|
|
ue* u = users.add_user(std::move(ue_ptr));
|
|
|
|
ue* u = users.add_user(std::move(ue_ptr));
|
|
|
|
if (u == nullptr) {
|
|
|
|
if (u == nullptr) {
|
|
|
|
logger.error("Failed to add rnti=0x%x", rnti);
|
|
|
|
logger.error("Failed to add rnti=0x%x", rnti);
|
|
|
@ -311,6 +315,7 @@ void s1ap::initial_ue(uint16_t rnti, asn1::s1ap::rrc_establishment_cause_e cause
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void s1ap::initial_ue(uint16_t rnti,
|
|
|
|
void s1ap::initial_ue(uint16_t rnti,
|
|
|
|
|
|
|
|
uint32_t enb_cc_idx,
|
|
|
|
asn1::s1ap::rrc_establishment_cause_e cause,
|
|
|
|
asn1::s1ap::rrc_establishment_cause_e cause,
|
|
|
|
srslte::unique_byte_buffer_t pdu,
|
|
|
|
srslte::unique_byte_buffer_t pdu,
|
|
|
|
uint32_t m_tmsi,
|
|
|
|
uint32_t m_tmsi,
|
|
|
@ -318,6 +323,7 @@ void s1ap::initial_ue(uint16_t rnti,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::unique_ptr<ue> ue_ptr{new ue{this}};
|
|
|
|
std::unique_ptr<ue> ue_ptr{new ue{this}};
|
|
|
|
ue_ptr->ctxt.rnti = rnti;
|
|
|
|
ue_ptr->ctxt.rnti = rnti;
|
|
|
|
|
|
|
|
ue_ptr->ctxt.enb_cc_idx = enb_cc_idx;
|
|
|
|
ue* u = users.add_user(std::move(ue_ptr));
|
|
|
|
ue* u = users.add_user(std::move(ue_ptr));
|
|
|
|
if (u == nullptr) {
|
|
|
|
if (u == nullptr) {
|
|
|
|
logger.error("Failed to add rnti=0x%x", rnti);
|
|
|
|
logger.error("Failed to add rnti=0x%x", rnti);
|
|
|
@ -926,6 +932,7 @@ bool s1ap::send_ho_failure(uint32_t mme_ue_s1ap_id)
|
|
|
|
|
|
|
|
|
|
|
|
bool s1ap::send_ho_req_ack(const asn1::s1ap::ho_request_s& msg,
|
|
|
|
bool s1ap::send_ho_req_ack(const asn1::s1ap::ho_request_s& msg,
|
|
|
|
uint16_t rnti,
|
|
|
|
uint16_t rnti,
|
|
|
|
|
|
|
|
uint32_t enb_cc_idx,
|
|
|
|
srslte::unique_byte_buffer_t ho_cmd,
|
|
|
|
srslte::unique_byte_buffer_t ho_cmd,
|
|
|
|
srslte::span<asn1::s1ap::erab_admitted_item_s> admitted_bearers)
|
|
|
|
srslte::span<asn1::s1ap::erab_admitted_item_s> admitted_bearers)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -935,6 +942,7 @@ bool s1ap::send_ho_req_ack(const asn1::s1ap::ho_request_s& msg,
|
|
|
|
|
|
|
|
|
|
|
|
ue* ue_ptr = users.find_ue_mmeid(msg.protocol_ies.mme_ue_s1ap_id.value.value);
|
|
|
|
ue* ue_ptr = users.find_ue_mmeid(msg.protocol_ies.mme_ue_s1ap_id.value.value);
|
|
|
|
ue_ptr->ctxt.rnti = rnti;
|
|
|
|
ue_ptr->ctxt.rnti = rnti;
|
|
|
|
|
|
|
|
ue_ptr->ctxt.enb_cc_idx = enb_cc_idx;
|
|
|
|
|
|
|
|
|
|
|
|
container.mme_ue_s1ap_id.value = msg.protocol_ies.mme_ue_s1ap_id.value.value;
|
|
|
|
container.mme_ue_s1ap_id.value = msg.protocol_ies.mme_ue_s1ap_id.value.value;
|
|
|
|
container.enb_ue_s1ap_id.value = ue_ptr->ctxt.enb_ue_s1ap_id;
|
|
|
|
container.enb_ue_s1ap_id.value = ue_ptr->ctxt.enb_ue_s1ap_id;
|
|
|
@ -1185,8 +1193,7 @@ bool s1ap::ue::send_uectxtreleasecomplete()
|
|
|
|
container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id;
|
|
|
|
container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id;
|
|
|
|
|
|
|
|
|
|
|
|
// Log event.
|
|
|
|
// Log event.
|
|
|
|
//:TODO: cc_idx not available
|
|
|
|
event_logger::get().log_s1_ctx_delete(ctxt.enb_cc_idx, ctxt.mme_ue_s1ap_id, ctxt.enb_ue_s1ap_id, ctxt.rnti);
|
|
|
|
event_logger::get().log_s1_ctx_delete(0, ctxt.mme_ue_s1ap_id, ctxt.enb_ue_s1ap_id, ctxt.rnti);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "UEContextReleaseComplete");
|
|
|
|
return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "UEContextReleaseComplete");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1220,8 +1227,7 @@ bool s1ap::ue::send_initial_ctxt_setup_response(const asn1::s1ap::init_context_s
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Log event.
|
|
|
|
// Log event.
|
|
|
|
//:TODO: cc_idx not available
|
|
|
|
event_logger::get().log_s1_ctx_create(ctxt.enb_cc_idx, ctxt.mme_ue_s1ap_id, ctxt.enb_ue_s1ap_id, ctxt.rnti);
|
|
|
|
event_logger::get().log_s1_ctx_create(0, ctxt.mme_ue_s1ap_id, ctxt.enb_ue_s1ap_id, ctxt.rnti);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "InitialContextSetupResponse");
|
|
|
|
return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "InitialContextSetupResponse");
|
|
|
|
}
|
|
|
|
}
|
|
|
|