Commit bf614124 authored by Xue Song's avatar Xue Song

Add RRCReconfigurationComplete message

Modify compilation warning
parent 37ecf4b0
...@@ -639,7 +639,7 @@ uint8_t do_RRCReject(uint8_t Mod_id, ...@@ -639,7 +639,7 @@ uint8_t do_RRCReject(uint8_t Mod_id,
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
uint8_t do_RRCSetup(const protocol_ctxt_t *const ctxt_pP, uint8_t do_RRCSetup(const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP, rrc_gNB_ue_context_t *const ue_context_pP,
int CC_id, int CC_id,
uint8_t *const buffer, uint8_t *const buffer,
const uint8_t transaction_id, const uint8_t transaction_id,
......
...@@ -87,7 +87,7 @@ uint8_t do_RRCReject(uint8_t Mod_id, ...@@ -87,7 +87,7 @@ uint8_t do_RRCReject(uint8_t Mod_id,
uint8_t *const buffer); uint8_t *const buffer);
uint8_t do_RRCSetup(const protocol_ctxt_t *const ctxt_pP, uint8_t do_RRCSetup(const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP, rrc_gNB_ue_context_t *const ue_context_pP,
int CC_id, int CC_id,
uint8_t *const buffer, uint8_t *const buffer,
const uint8_t transaction_id, const uint8_t transaction_id,
......
...@@ -134,6 +134,8 @@ typedef enum UE_STATE_NR_e { ...@@ -134,6 +134,8 @@ typedef enum UE_STATE_NR_e {
/* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */ /* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */
#define NR_RRC_TRANSACTION_IDENTIFIER_NUMBER 3 #define NR_RRC_TRANSACTION_IDENTIFIER_NUMBER 3
#define ENABLE_SECURITY 1
typedef struct { typedef struct {
unsigned short transport_block_size; /*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */ unsigned short transport_block_size; /*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */
unsigned short max_transport_blocks; /*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */ unsigned short max_transport_blocks; /*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */
......
...@@ -102,6 +102,12 @@ rrc_gNB_get_next_transaction_identifier( ...@@ -102,6 +102,12 @@ rrc_gNB_get_next_transaction_identifier(
module_id_t gnb_mod_idP module_id_t gnb_mod_idP
); );
void
rrc_gNB_generate_UECapabilityEnquiry(
const protocol_ctxt_t *const ctxt_pP,
rrc_gNB_ue_context_t *const ue_context_pP
);
/**\brief RRC eNB task. /**\brief RRC eNB task.
\param void *args_p Pointer on arguments to start the task. */ \param void *args_p Pointer on arguments to start the task. */
void *rrc_gnb_task(void *args_p); void *rrc_gnb_task(void *args_p);
......
This diff is collapsed.
...@@ -19,6 +19,15 @@ ...@@ -19,6 +19,15 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file rrc_gNB_NGAP.h
* \brief rrc NGAP procedures for gNB
* \author Yoshio INOUE, Masayuki HARADA
* \date 2020
* \version 0.1
* \email: yoshio.inoue@fujitsu.com,masayuki.harada@fujitsu.com
* (yoshio.inoue%40fujitsu.com%2cmasayuki.harada%40fujitsu.com)
*/
#include "rrc_gNB_NGAP.h" #include "rrc_gNB_NGAP.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "rrc_eNB_S1AP.h" #include "rrc_eNB_S1AP.h"
...@@ -118,10 +127,10 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ( ...@@ -118,10 +127,10 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ(
) )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; // gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id];
MessageDef *message_p = NULL; MessageDef *message_p = NULL;
rrc_ue_ngap_ids_t *rrc_ue_ngap_ids_p = NULL; rrc_ue_ngap_ids_t *rrc_ue_ngap_ids_p = NULL;
hashtable_rc_t h_rc; // hashtable_rc_t h_rc;
message_p = itti_alloc_new_message(TASK_RRC_GNB, NGAP_NAS_FIRST_REQ); message_p = itti_alloc_new_message(TASK_RRC_GNB, NGAP_NAS_FIRST_REQ);
memset(&message_p->ittiMsg.ngap_nas_first_req, 0, sizeof(ngap_nas_first_req_t)); memset(&message_p->ittiMsg.ngap_nas_first_req, 0, sizeof(ngap_nas_first_req_t));
...@@ -267,32 +276,32 @@ rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ( ...@@ -267,32 +276,32 @@ rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(
} }
/* TODO security */ /* TODO security */
rrc_gNB_process_security(&ctxt, ue_context_p, &(NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p).security_capabilities));
uint8_t send_security_mode_command = TRUE; uint8_t send_security_mode_command = TRUE;
/* TODO rrc_pdcp_config_security */ rrc_pdcp_config_security(
// rrc_pdcp_config_security( &ctxt,
// &ctxt, ue_context_p,
// ue_context_p, send_security_mode_command);
// send_security_mode_command);
if (send_security_mode_command) { if (send_security_mode_command) {
rrc_gNB_generate_SecurityModeCommand (&ctxt, ue_context_p); rrc_gNB_generate_SecurityModeCommand (&ctxt, ue_context_p);
send_security_mode_command = FALSE; send_security_mode_command = FALSE;
/* TODO rrc_pdcp_config_security */ rrc_pdcp_config_security(
// rrc_pdcp_config_security( &ctxt,
// &ctxt, ue_context_p,
// ue_context_p, send_security_mode_command);
// send_security_mode_command);
} else { } else {
/* TODO rrc_gNB_generate_UECapabilityEnquiry */ /* rrc_gNB_generate_UECapabilityEnquiry */
// rrc_gNB_generate_UECapabilityEnquiry (&ctxt, ue_context_p); rrc_gNB_generate_UECapabilityEnquiry(&ctxt, ue_context_p);
} }
// in case, send the S1SP initial context response if it is not sent with the attach complete message // in case, send the S1SP initial context response if it is not sent with the attach complete message
if (ue_context_p->ue_context.Status == NR_RRC_RECONFIGURED) { if (ue_context_p->ue_context.Status == NR_RRC_RECONFIGURED) {
LOG_I(NR_RRC, "Sending rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", ue_context_p->ue_context.reestablishment_cause); LOG_I(NR_RRC, "Sending rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", ue_context_p->ue_context.reestablishment_cause);
// rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p); rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p);
} }
return 0; return 0;
......
...@@ -19,6 +19,15 @@ ...@@ -19,6 +19,15 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file rrc_gNB_NGAP.h
* \brief rrc NGAP procedures for gNB
* \author Yoshio INOUE, Masayuki HARADA
* \date 2020
* \version 0.1
* \email: yoshio.inoue@fujitsu.com,masayuki.harada@fujitsu.com
* (yoshio.inoue%40fujitsu.com%2cmasayuki.harada%40fujitsu.com)
*/
#ifndef RRC_GNB_NGAP_H_ #ifndef RRC_GNB_NGAP_H_
#define RRC_GNB_NGAP_H_ #define RRC_GNB_NGAP_H_
......
...@@ -248,7 +248,7 @@ rrc_gNB_ue_context_5g_s_tmsi_exist( ...@@ -248,7 +248,7 @@ rrc_gNB_ue_context_5g_s_tmsi_exist(
{ {
struct rrc_gNB_ue_context_s *ue_context_p = NULL; struct rrc_gNB_ue_context_s *ue_context_p = NULL;
RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head) { RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head) {
LOG_I(NR_RRC,"checking for UE 5G S-TMSI %x: rnti %x \n", LOG_I(NR_RRC,"checking for UE 5G S-TMSI %ld: rnti %d \n",
s_TMSI, ue_context_p->ue_context.rnti); s_TMSI, ue_context_p->ue_context.rnti);
if (ue_context_p->ue_context.ng_5G_S_TMSI_Part1 == s_TMSI) { if (ue_context_p->ue_context.ng_5G_S_TMSI_Part1 == s_TMSI) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment