|
|
|
@ -88,6 +88,10 @@ void s1ap::get_metrics(s1ap_metrics_t &m)
|
|
|
|
|
void s1ap::run_thread()
|
|
|
|
|
{
|
|
|
|
|
srslte::byte_buffer_t *pdu = pool_allocate;
|
|
|
|
|
if (!pdu) {
|
|
|
|
|
s1ap_log->error("Fatal Error: Couldn't allocate buffer in s1ap::run_thread().\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint32_t sz = SRSLTE_MAX_BUFFER_SIZE_BYTES - SRSLTE_BUFFER_HEADER_OFFSET;
|
|
|
|
|
running = true;
|
|
|
|
@ -514,10 +518,15 @@ bool s1ap::handle_dlnastransport(LIBLTE_S1AP_MESSAGE_DOWNLINKNASTRANSPORT_STRUCT
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
srslte::byte_buffer_t *pdu = pool_allocate;
|
|
|
|
|
memcpy(pdu->msg, msg->NAS_PDU.buffer, msg->NAS_PDU.n_octets);
|
|
|
|
|
pdu->N_bytes = msg->NAS_PDU.n_octets;
|
|
|
|
|
rrc->write_dl_info(rnti, pdu);
|
|
|
|
|
return true;
|
|
|
|
|
if (pdu) {
|
|
|
|
|
memcpy(pdu->msg, msg->NAS_PDU.buffer, msg->NAS_PDU.n_octets);
|
|
|
|
|
pdu->N_bytes = msg->NAS_PDU.n_octets;
|
|
|
|
|
rrc->write_dl_info(rnti, pdu);
|
|
|
|
|
return true;
|
|
|
|
|
} else {
|
|
|
|
|
s1ap_log->error("Fatal Error: Couldn't allocate buffer in s1ap::run_thread().\n");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool s1ap::handle_initialctxtsetuprequest(LIBLTE_S1AP_MESSAGE_INITIALCONTEXTSETUPREQUEST_STRUCT *msg)
|
|
|
|
@ -850,6 +859,11 @@ bool s1ap::send_initial_ctxt_setup_response(uint16_t rnti, LIBLTE_S1AP_MESSAGE_I
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
srslte::byte_buffer_t *buf = pool_allocate;
|
|
|
|
|
if (!buf) {
|
|
|
|
|
s1ap_log->error("Fatal Error: Couldn't allocate buffer in s1ap::send_initial_ctxt_setup_response().\n");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LIBLTE_S1AP_S1AP_PDU_STRUCT tx_pdu;
|
|
|
|
|
|
|
|
|
|
tx_pdu.ext = false;
|
|
|
|
@ -896,6 +910,11 @@ bool s1ap::send_erab_setup_response(uint16_t rnti, LIBLTE_S1AP_MESSAGE_E_RABSETU
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
srslte::byte_buffer_t *buf = pool_allocate;
|
|
|
|
|
if (!buf) {
|
|
|
|
|
s1ap_log->error("Fatal Error: Couldn't allocate buffer in s1ap::send_erab_setup_response().\n");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LIBLTE_S1AP_S1AP_PDU_STRUCT tx_pdu;
|
|
|
|
|
|
|
|
|
|
tx_pdu.ext = false;
|
|
|
|
@ -942,6 +961,11 @@ bool s1ap::send_initial_ctxt_setup_failure(uint16_t rnti)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
srslte::byte_buffer_t *buf = pool_allocate;
|
|
|
|
|
if (!buf) {
|
|
|
|
|
s1ap_log->error("Fatal Error: Couldn't allocate buffer in s1ap::send_initial_ctxt_setup_failure().\n");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LIBLTE_S1AP_S1AP_PDU_STRUCT tx_pdu;
|
|
|
|
|
tx_pdu.ext = false;
|
|
|
|
|
tx_pdu.choice_type = LIBLTE_S1AP_S1AP_PDU_CHOICE_UNSUCCESSFULOUTCOME;
|
|
|
|
|