Merge remote-tracking branch 'origin/NR_SA_F1AP_5GRECORDS' into NR_F1C_F1U_extensions
This commit is contained in:
+21
-104
@@ -997,7 +997,6 @@ add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION w
|
||||
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE")
|
||||
add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE")
|
||||
add_boolean_option(ITTI_SIM False "enable itti simulator")
|
||||
add_boolean_option(RFSIM_NAS False "enable rfsim nas")
|
||||
########################
|
||||
# Include order
|
||||
##########################
|
||||
@@ -2443,108 +2442,6 @@ set (libnas_utils_OBJS
|
||||
${NAS_SRC}COMMON/UTIL/OctetString.c
|
||||
)
|
||||
|
||||
if(NAS_UE)
|
||||
set(libnas_ue_api_OBJS
|
||||
${NAS_SRC}UE/API/USER/at_command.c
|
||||
${NAS_SRC}UE/API/USER/at_error.c
|
||||
${NAS_SRC}UE/API/USER/at_response.c
|
||||
${NAS_SRC}UE/API/USER/user_api.c
|
||||
${NAS_SRC}UE/API/USER/user_indication.c
|
||||
${NAS_SRC}UE/API/USIM/aka_functions.c
|
||||
${NAS_SRC}UE/API/USIM/usim_api.c
|
||||
)
|
||||
set(libnas_ue_emm_OBJS
|
||||
${NAS_SRC}UE/EMM/Attach.c
|
||||
${NAS_SRC}UE/EMM/Authentication.c
|
||||
${NAS_SRC}UE/EMM/Detach.c
|
||||
${NAS_SRC}UE/EMM/emm_main.c
|
||||
${NAS_SRC}UE/EMM/EmmStatusHdl.c
|
||||
${NAS_SRC}UE/EMM/Identification.c
|
||||
${NAS_SRC}UE/EMM/IdleMode.c
|
||||
${NAS_SRC}UE/EMM/LowerLayer.c
|
||||
${NAS_SRC}UE/EMM/SecurityModeControl.c
|
||||
${NAS_SRC}UE/EMM/ServiceRequestHdl.c
|
||||
${NAS_SRC}UE/EMM/TrackingAreaUpdate.c
|
||||
)
|
||||
set(libnas_ue_emm_sap_OBJS
|
||||
${NAS_SRC}UE/EMM/SAP/emm_as.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredAttachNeeded.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregistered.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredInitiated.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredLimitedService.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredNoCellAvailable.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredNoImsi.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredNormalService.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmDeregisteredPlmnSearch.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_esm.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_fsm.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmNull.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_recv.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_reg.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredAttemptingToUpdate.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegistered.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredImsiDetachInitiated.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredInitiated.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredLimitedService.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredNoCellAvailable.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredNormalService.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredPlmnSearch.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmRegisteredUpdateNeeded.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_sap.c
|
||||
${NAS_SRC}UE/EMM/SAP/emm_send.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmServiceRequestInitiated.c
|
||||
${NAS_SRC}UE/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c
|
||||
)
|
||||
set (libnas_ue_esm_OBJS
|
||||
${NAS_SRC}UE/ESM/DedicatedEpsBearerContextActivation.c
|
||||
${NAS_SRC}UE/ESM/DefaultEpsBearerContextActivation.c
|
||||
${NAS_SRC}UE/ESM/EpsBearerContextDeactivation.c
|
||||
${NAS_SRC}UE/ESM/esm_ebr.c
|
||||
${NAS_SRC}UE/ESM/esm_ebr_context.c
|
||||
${NAS_SRC}UE/ESM/esm_ip.c
|
||||
${NAS_SRC}UE/ESM/esm_main.c
|
||||
${NAS_SRC}UE/ESM/esm_pt.c
|
||||
${NAS_SRC}UE/ESM/EsmStatusHdl.c
|
||||
${NAS_SRC}UE/ESM/PdnConnectivity.c
|
||||
${NAS_SRC}UE/ESM/PdnDisconnect.c
|
||||
)
|
||||
set(libnas_ue_esm_sap_OBJS
|
||||
${NAS_SRC}UE/ESM/SAP/esm_recv.c
|
||||
${NAS_SRC}UE/ESM/SAP/esm_send.c
|
||||
${NAS_SRC}UE/ESM/SAP/esm_sap.c
|
||||
)
|
||||
add_library(LIB_NAS_UE
|
||||
${NAS_SRC}UE/nas_itti_messaging.c
|
||||
${NAS_SRC}UE/nas_network.c
|
||||
${NAS_SRC}UE/nas_parser.c
|
||||
${NAS_SRC}UE/nas_proc.c
|
||||
${NAS_SRC}UE/nas_user.c
|
||||
${libnas_api_OBJS}
|
||||
${libnas_ue_api_OBJS}
|
||||
${libnas_emm_msg_OBJS}
|
||||
${libnas_esm_msg_OBJS}
|
||||
${libnas_ies_OBJS}
|
||||
${libnas_utils_OBJS}
|
||||
${libnas_ue_emm_OBJS}
|
||||
${libnas_ue_emm_sap_OBJS}
|
||||
${libnas_ue_esm_OBJS}
|
||||
${libnas_ue_esm_sap_OBJS}
|
||||
)
|
||||
add_dependencies(LIB_NAS_UE rrc_flag)
|
||||
set(NAS_UE_LIB LIB_NAS_UE)
|
||||
|
||||
include_directories(${NAS_SRC}UE)
|
||||
include_directories(${NAS_SRC}UE/API/USER)
|
||||
include_directories(${NAS_SRC}UE/API/USIM)
|
||||
include_directories(${NAS_SRC}UE/EMM)
|
||||
include_directories(${NAS_SRC}UE/EMM/SAP)
|
||||
include_directories(${NAS_SRC}UE/ESM)
|
||||
include_directories(${NAS_SRC}UE/ESM/SAP)
|
||||
endif()
|
||||
|
||||
|
||||
#if(ITTI_SIM OR RFSIM_NAS)
|
||||
set(libnas_ue_api_OBJS
|
||||
${NAS_SRC}UE/API/USER/at_command.c
|
||||
${NAS_SRC}UE/API/USER/at_error.c
|
||||
@@ -2662,6 +2559,27 @@ endif()
|
||||
add_dependencies(LIB_NAS_SIMUE rrc_flag)
|
||||
set(NAS_SIM_LIB LIB_NAS_SIMUE)
|
||||
|
||||
add_library(LIB_NAS_UE
|
||||
${NAS_SRC}UE/nas_itti_messaging.c
|
||||
${NAS_SRC}UE/nas_network.c
|
||||
${NAS_SRC}UE/nas_parser.c
|
||||
${NAS_SRC}UE/nas_proc.c
|
||||
${NAS_SRC}UE/nas_user.c
|
||||
${libnas_api_OBJS}
|
||||
${libnas_ue_api_OBJS}
|
||||
${libnas_emm_msg_OBJS}
|
||||
${libnas_esm_msg_OBJS}
|
||||
${libnas_ies_OBJS}
|
||||
${libnas_utils_OBJS}
|
||||
${libnas_ue_emm_OBJS}
|
||||
${libnas_ue_emm_sap_OBJS}
|
||||
${libnas_ue_esm_OBJS}
|
||||
${libnas_ue_esm_sap_OBJS}
|
||||
)
|
||||
add_dependencies(LIB_NAS_UE rrc_flag)
|
||||
set(NAS_UE_LIB LIB_NAS_UE)
|
||||
|
||||
|
||||
include_directories(${NAS_SRC}NR_UE)
|
||||
include_directories(${NAS_SRC}UE)
|
||||
include_directories(${NAS_SRC}UE/API/USER)
|
||||
@@ -2670,7 +2588,6 @@ endif()
|
||||
include_directories(${NAS_SRC}UE/EMM/SAP)
|
||||
include_directories(${NAS_SRC}UE/ESM)
|
||||
include_directories(${NAS_SRC}UE/ESM/SAP)
|
||||
#endif()
|
||||
|
||||
# nbiot
|
||||
add_definitions("-DNUMBER_OF_UE_MAX_NB_IoT=16")
|
||||
|
||||
@@ -68,7 +68,6 @@ USRP_REC_PLAY="False"
|
||||
BUILD_ECLIPSE=0
|
||||
NR="False"
|
||||
ITTI_SIM="False"
|
||||
RFSIM_NAS="False"
|
||||
SANITIZE_ADDRESS="False"
|
||||
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope msc"
|
||||
trap handle_ctrl_c INT
|
||||
@@ -264,7 +263,6 @@ function main() {
|
||||
nrUE=1
|
||||
NR="True"
|
||||
rfsimNas=1
|
||||
RFSIM_NAS="True"
|
||||
echo_info "Will compile NR UE"
|
||||
shift;;
|
||||
--mu)
|
||||
@@ -619,7 +617,6 @@ function main() {
|
||||
echo "set ( USRP_REC_PLAY $USRP_REC_PLAY )" >> $cmake_file
|
||||
echo "set ( SKIP_SHARED_LIB_FLAG $SKIP_SHARED_LIB_FLAG )" >> $cmake_file
|
||||
echo "set ( ITTI_SIM $ITTI_SIM )" >> $cmake_file
|
||||
echo "set ( RFSIM_NAS $RFSIM_NAS )" >> $cmake_file
|
||||
echo "set ( SANITIZE_ADDRESS $SANITIZE_ADDRESS )" >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
|
||||
cd $DIR/$build_dir/build
|
||||
|
||||
@@ -136,7 +136,7 @@ extern "C" {
|
||||
LOG_E(TMR,"Queue for %s task contains %ld messages\n", itti_get_task_name(destination_task_id), s );
|
||||
|
||||
if ( s > 50 )
|
||||
LOG_I(TMR,"Queue for %s task size: %ld\n",itti_get_task_name(destination_task_id), s+1);
|
||||
LOG_I(TMR,"Queue for %s task size: %ld (last message %s)\n",itti_get_task_name(destination_task_id), s+1,ITTI_MSG_NAME(message));
|
||||
|
||||
t->message_queue.insert(t->message_queue.begin(), message);
|
||||
eventfd_t sem_counter = 1;
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
#include "T.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
#include <nfapi/oai_integration/nfapi_pnf.h>
|
||||
#include <openair1/PHY/NR_TRANSPORT/nr_ulsch.h>
|
||||
//#define DEBUG_THREADS 1
|
||||
|
||||
//#define USRP_DEBUG 1
|
||||
|
||||
@@ -87,9 +87,7 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "executables/thread-common.h"
|
||||
|
||||
#if defined(ITTI_SIM) || defined(RFSIM_NAS)
|
||||
#include "nr_nas_msg_sim.h"
|
||||
#endif
|
||||
|
||||
extern const char *duplex_mode[];
|
||||
THREAD_STRUCT thread_struct;
|
||||
@@ -193,12 +191,10 @@ int create_tasks_nrue(uint32_t ue_nb) {
|
||||
LOG_E(NR_RRC, "Create task for RRC UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
#if defined(ITTI_SIM) || defined(RFSIM_NAS)
|
||||
if (itti_create_task (TASK_NAS_NRUE, nas_nrue_task, NULL) < 0) {
|
||||
LOG_E(NR_RRC, "Create task for NAS UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
itti_wait_ready(0);
|
||||
|
||||
@@ -65,22 +65,6 @@
|
||||
#define MAX_NUM_CHANNEL_BITS (14*1200*6) // 14 symbols, 1200 REs, 12 bits/RE
|
||||
#define MAX_NUM_RE (14*1200)
|
||||
|
||||
#if !defined(SI_RNTI)
|
||||
#define SI_RNTI (rnti_t)0xffff
|
||||
#define SI_RNTI_MBMS (rnti_t)0xfff9
|
||||
#endif
|
||||
#if !defined(M_RNTI)
|
||||
#define M_RNTI (rnti_t)0xfffd
|
||||
#endif
|
||||
#if !defined(P_RNTI)
|
||||
#define P_RNTI (rnti_t)0xfffe
|
||||
#endif
|
||||
#if !defined(CBA_RNTI)
|
||||
#define CBA_RNTI (rnti_t)0xfff4
|
||||
#endif
|
||||
#if !defined(C_RNTI)
|
||||
#define C_RNTI (rnti_t)0x1234
|
||||
#endif
|
||||
// These are the codebook indexes according to Table 6.3.4.2.3-1 of 36.211
|
||||
//1 layer
|
||||
#define PMI_2A_11 0
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include <syscall.h>
|
||||
#include <openair2/UTIL/OPT/opt.h>
|
||||
|
||||
//#define DEBUG_DLSCH_CODING
|
||||
//#define DEBUG_DLSCH_FREE 1
|
||||
@@ -266,6 +267,8 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
||||
|
||||
A = rel15->TBSize[0]<<3;
|
||||
if ( dlsch->rnti != SI_RNTI )
|
||||
trace_NRpdu(DIRECTION_DOWNLINK, a, rel15->TBSize[0], 0, WS_C_RNTI, dlsch->rnti, frame, slot,0, 0);
|
||||
|
||||
NR_gNB_SCH_STATS_t *stats=NULL;
|
||||
int first_free=-1;
|
||||
|
||||
@@ -91,6 +91,7 @@ int16_t find_nr_ulsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type);
|
||||
|
||||
void dump_pusch_stats(FILE *fd,PHY_VARS_gNB *gNB);
|
||||
|
||||
void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB);
|
||||
void clear_pusch_stats(PHY_VARS_gNB *gNB);
|
||||
|
||||
NR_gNB_SCH_STATS_t *get_ulsch_stats(PHY_VARS_gNB *gNB,NR_gNB_ULSCH_t *ulsch);
|
||||
|
||||
@@ -1218,7 +1218,6 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
rel15_ul);
|
||||
|
||||
nr_gnb_measurements(gNB, ulsch_id, harq_pid, symbol);
|
||||
int num_symb = rel15_ul->nr_of_symbols;
|
||||
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
|
||||
if (symbol == rel15_ul->start_symbol_index) {
|
||||
gNB->pusch_vars[ulsch_id]->ulsch_power[aarx]=0;
|
||||
|
||||
@@ -66,7 +66,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
|
||||
|
||||
uint8_t Mod_id, fd_occasion, preamble_index, restricted_set, not_found;
|
||||
uint16_t rootSequenceIndex, prach_fmt_id, NCS, *prach_root_sequence_map, preamble_offset = 0;
|
||||
uint16_t preamble_shift = 0, preamble_index0, n_shift_ra, n_shift_ra_bar, d_start, numshift, N_ZC, u, offset, offset2, first_nonzero_root_idx;
|
||||
uint16_t preamble_shift = 0, preamble_index0, n_shift_ra, n_shift_ra_bar, d_start=INT16_MAX, numshift, N_ZC, u, offset, offset2, first_nonzero_root_idx;
|
||||
int16_t prach_tmp[98304*2*4] __attribute__((aligned(32)));
|
||||
|
||||
int16_t Ncp = 0, amp, *prach, *prach2, *prachF, *Xu;
|
||||
|
||||
@@ -567,7 +567,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
|
||||
int occ_Index = 0;
|
||||
|
||||
NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid]->harq_ack;
|
||||
int BWPsize,BWPstart;
|
||||
int BWPsize,BWPstart=INT_MAX;
|
||||
if (select_pucch_resource(ue, mac, gNB_id, N_UCI, pucch_resource_indicator, &initial_pucch_id, &pucch_resource_set,
|
||||
&pucch_resource_id, harq_status) == TRUE) {
|
||||
/* use of initial pucch configuration provided by system information 1 */
|
||||
@@ -1290,8 +1290,8 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
|
||||
if (resource_set_found == TRUE) {
|
||||
if (pucch_resource_indicator < MAX_PUCCH_RESOURCE_INDICATOR) {
|
||||
// Verify that the value of pucch_resource_indicator is valid
|
||||
struct NR_PUCCH_Config__resourceSetToAddModList *resourceSetToAddModList;
|
||||
struct NR_PUCCH_Config__resourceToAddModList *resourceToAddModList;
|
||||
struct NR_PUCCH_Config__resourceSetToAddModList *resourceSetToAddModList=NULL;
|
||||
struct NR_PUCCH_Config__resourceToAddModList *resourceToAddModList=NULL;
|
||||
if (bwp_id > 0 && mac->ULbwp[bwp_id-1]) {
|
||||
AssertFatal(mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList!=NULL,"mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList is null\n");
|
||||
resourceSetToAddModList = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList;
|
||||
|
||||
@@ -299,7 +299,7 @@ typedef struct f1ap_initial_ul_rrc_message_s {
|
||||
uint16_t crnti;
|
||||
uint8_t *rrc_container;
|
||||
int rrc_container_length;
|
||||
uint8_t *du2cu_rrc_container;
|
||||
int8_t *du2cu_rrc_container;
|
||||
int du2cu_rrc_container_length;
|
||||
} f1ap_initial_ul_rrc_message_t;
|
||||
|
||||
|
||||
@@ -195,21 +195,13 @@ typedef uint8_t mme_code_t;
|
||||
typedef uint32_t m_tmsi_t;
|
||||
|
||||
//Random UE identity length = 40 bits
|
||||
#if ! defined(NOT_A_RANDOM_UE_IDENTITY)
|
||||
#define NOT_A_RANDOM_UE_IDENTITY (uint64_t)0xFFFFFFFF
|
||||
#endif
|
||||
#if ! defined(NOT_A_RNTI)
|
||||
#define NOT_A_RNTI (rnti_t)0
|
||||
#endif
|
||||
#if ! defined(M_RNTI)
|
||||
#define M_RNTI (rnti_t)0xFFFD
|
||||
#endif
|
||||
#if ! defined(P_RNTI)
|
||||
#define P_RNTI (rnti_t)0xFFFE
|
||||
#endif
|
||||
#if ! defined(SI_RNTI)
|
||||
#define SI_RNTI (rnti_t)0xFFFF
|
||||
#endif
|
||||
#define CBA_RNTI (rnti_t)0xfff4
|
||||
#define OAI_C_RNTI (rnti_t)0x1234
|
||||
typedef enum config_action_e {
|
||||
CONFIG_ACTION_NULL = 0,
|
||||
CONFIG_ACTION_ADD = 1,
|
||||
|
||||
@@ -38,13 +38,6 @@
|
||||
#include "common/ran_context.h"
|
||||
#include "openair3/UTILS/conversions.h"
|
||||
|
||||
// undefine C_RNTI from
|
||||
// openair1/PHY/LTE_TRANSPORT/transport_common.h which
|
||||
// replaces in ie->value.choice.C_RNTI, causing
|
||||
// a compile error
|
||||
#undef C_RNTI
|
||||
|
||||
|
||||
// Bing Kai: create CU and DU context, and put all the information there.
|
||||
uint64_t du_ue_f1ap_id = 0;
|
||||
uint32_t f1ap_assoc_id = 0;
|
||||
|
||||
@@ -56,13 +56,6 @@
|
||||
#include "intertask_interface.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
|
||||
// undefine C_RNTI from
|
||||
// openair1/PHY/LTE_TRANSPORT/transport_common.h which
|
||||
// replaces in ie->value.choice.C_RNTI, causing
|
||||
// a compile error
|
||||
|
||||
#undef C_RNTI
|
||||
|
||||
extern f1ap_setup_req_t *f1ap_du_data;
|
||||
extern RAN_CONTEXT_t RC;
|
||||
extern f1ap_cudu_inst_t f1ap_du_inst[MAX_eNB];
|
||||
@@ -799,7 +792,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
|
||||
rnti_t rntiP,
|
||||
const uint8_t *sduP,
|
||||
sdu_size_t sdu_lenP,
|
||||
const uint8_t *sdu2P,
|
||||
const int8_t *sdu2P,
|
||||
sdu_size_t sdu2_lenP) {
|
||||
F1AP_F1AP_PDU_t pdu;
|
||||
F1AP_InitialULRRCMessageTransfer_t *out;
|
||||
|
||||
@@ -50,7 +50,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
|
||||
rnti_t rntiP,
|
||||
const uint8_t *sduP,
|
||||
sdu_size_t sdu_lenP,
|
||||
const uint8_t *sdu2P,
|
||||
const int8_t *sdu2P,
|
||||
sdu_size_t sdu2_lenP);
|
||||
|
||||
#endif /* F1AP_DU_RRC_MESSAGE_TRANSFER_H_ */
|
||||
|
||||
@@ -190,7 +190,7 @@ void *F1AP_DU_task(void *arg) {
|
||||
DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(0,0,0,msg->crnti,
|
||||
msg->rrc_container,
|
||||
msg->rrc_container_length,
|
||||
msg->du2cu_rrc_container,
|
||||
(char*)msg->du2cu_rrc_container,
|
||||
msg->du2cu_rrc_container_length
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -41,13 +41,6 @@
|
||||
#include "openair2/RRC/NR/rrc_gNB_UE_context.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||
|
||||
// undefine C_RNTI from
|
||||
// openair1/PHY/LTE_TRANSPORT/transport_common.h which
|
||||
// replaces in ie->value.choice.C_RNTI, causing
|
||||
// a compile error
|
||||
|
||||
#undef C_RNTI
|
||||
|
||||
extern f1ap_setup_req_t *f1ap_du_data;
|
||||
extern f1ap_cudu_inst_t f1ap_du_inst[MAX_eNB];
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "f1ap_cu_task.h"
|
||||
#include "f1ap_du_task.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
#include <openair2/LAYER2/nr_pdcp/nr_pdcp.h>
|
||||
extern unsigned char NB_gNB_INST;
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -169,4 +169,9 @@ uint8_t get_transformPrecoding(const NR_BWP_UplinkCommon_t *initialUplinkBWP,
|
||||
int rnti_type,
|
||||
uint8_t configuredGrant);
|
||||
|
||||
void nr_mac_eNB_rrc_ul_failure(const module_id_t Mod_instP,
|
||||
const int CC_idP,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
const rnti_t rntiP) ;
|
||||
#endif
|
||||
|
||||
@@ -1012,7 +1012,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
|
||||
//Give the first byte a dummy value (a value not corresponding to any valid LCID based on 38.321, Table 6.2.1-2)
|
||||
//in order to distinguish the PHY random packets at the MAC layer of the gNB receiver from the normal packets that should
|
||||
//have a valid LCID (nr_process_mac_pdu function)
|
||||
ulsch_input_buffer[0] = 0x31;
|
||||
ulsch_input_buffer[0] = UL_SCH_LCID_PADDING;
|
||||
|
||||
for (int i = 1; i < TBS_bytes; i++) {
|
||||
ulsch_input_buffer[i] = (unsigned char) rand();
|
||||
@@ -1914,6 +1914,7 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
|
||||
} // if is_nr_UL_slot
|
||||
}
|
||||
|
||||
#define MAX_LCID 8 //Fixme: also defined in LCID table
|
||||
uint8_t
|
||||
nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
sub_frame_t subframe, uint8_t eNB_index,
|
||||
@@ -1921,16 +1922,15 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
uint8_t total_rlc_pdu_header_len = 0;
|
||||
int16_t buflen_remain = 0;
|
||||
uint8_t lcid = 0;
|
||||
uint16_t sdu_lengths[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
uint8_t sdu_lcids[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
uint16_t sdu_lengths[MAX_LCID] = { 0 };
|
||||
uint8_t sdu_lcids[MAX_LCID] = { 0 };
|
||||
uint16_t payload_offset = 0, num_sdus = 0;
|
||||
uint8_t ulsch_sdus[MAX_ULSCH_PAYLOAD_BYTES];
|
||||
uint16_t sdu_length_total = 0;
|
||||
//unsigned short post_padding = 0;
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_idP);
|
||||
|
||||
rlc_buffer_occupancy_t lcid_buffer_occupancy_old =
|
||||
0, lcid_buffer_occupancy_new = 0;
|
||||
rlc_buffer_occupancy_t lcid_buffer_occupancy_new = 0;
|
||||
LOG_D(NR_MAC,
|
||||
"[UE %d] MAC PROCESS UL TRANSPORT BLOCK at frame%d subframe %d TBS=%d\n",
|
||||
module_idP, frameP, subframe, buflen);
|
||||
@@ -1940,13 +1940,10 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
// Check for DCCH first
|
||||
// TO DO: Multiplex in the order defined by the logical channel prioritization
|
||||
for (lcid = UL_SCH_LCID_SRB1;
|
||||
lcid < NR_MAX_NUM_LCID; lcid++) {
|
||||
|
||||
lcid_buffer_occupancy_old = mac_rlc_get_buffer_occupancy_ind(module_idP, mac->crnti, eNB_index, frameP, subframe, ENB_FLAG_NO, lcid);
|
||||
lcid_buffer_occupancy_new = lcid_buffer_occupancy_old;
|
||||
|
||||
if(lcid_buffer_occupancy_new){
|
||||
lcid < MAX_LCID; lcid++) {
|
||||
lcid_buffer_occupancy_new = mac_rlc_get_buffer_occupancy_ind(module_idP, mac->crnti, eNB_index, frameP, subframe, ENB_FLAG_NO, lcid);
|
||||
|
||||
if(lcid_buffer_occupancy_new) {
|
||||
buflen_remain =
|
||||
buflen - (total_rlc_pdu_header_len + sdu_length_total + MAX_RLC_SDU_SUBHEADER_SIZE);
|
||||
LOG_I(NR_MAC,
|
||||
@@ -1956,7 +1953,7 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
buflen, sdu_length_total,
|
||||
total_rlc_pdu_header_len, buflen_remain); // ,nr_ue_mac_inst->scheduling_info.BSR_bytes[nr_ue_mac_inst->scheduling_info.LCGID[lcid]]
|
||||
|
||||
while(buflen_remain > 0 && lcid_buffer_occupancy_new){
|
||||
while(buflen_remain > 0 && lcid_buffer_occupancy_new){
|
||||
|
||||
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,
|
||||
mac->crnti,
|
||||
@@ -1984,20 +1981,13 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
}
|
||||
|
||||
/* Get updated BO after multiplexing this PDU */
|
||||
lcid_buffer_occupancy_new = mac_rlc_get_buffer_occupancy_ind(module_idP,
|
||||
mac->crnti,
|
||||
eNB_index,
|
||||
frameP,
|
||||
subframe,
|
||||
ENB_FLAG_NO,
|
||||
lcid);
|
||||
lcid_buffer_occupancy_new = mac_rlc_get_buffer_occupancy_ind(module_idP,mac->crnti,eNB_index,frameP, subframe, ENB_FLAG_NO, lcid);
|
||||
buflen_remain =
|
||||
buflen - (total_rlc_pdu_header_len + sdu_length_total + MAX_RLC_SDU_SUBHEADER_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Generate ULSCH PDU
|
||||
if (num_sdus>0) {
|
||||
payload_offset = nr_generate_ulsch_pdu(ulsch_sdus,
|
||||
@@ -2012,9 +2002,8 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
0, // long_bsr
|
||||
0, // post_padding
|
||||
buflen); // TBS in bytes
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
} else
|
||||
return 0;
|
||||
|
||||
// Padding: fill remainder of ULSCH with 0
|
||||
if (buflen - payload_offset > 0){
|
||||
|
||||
@@ -1138,7 +1138,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
|
||||
gNB_MAC_INST *nr_mac = RC.nrmac[module_idP];
|
||||
NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id];
|
||||
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||
|
||||
if (ra->Msg4_frame == frameP && ra->Msg4_slot == slotP ) {
|
||||
|
||||
@@ -1301,7 +1300,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
|
||||
// look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially
|
||||
// important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them
|
||||
const int bwpid = bwp ? bwp->bwp_Id : 0;
|
||||
const int coresetid = coreset->controlResourceSetId;
|
||||
nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = nr_mac->pdcch_pdu_idx[CC_id][ra->bwp_id][coresetid];
|
||||
if (!pdcch_pdu_rel15) {
|
||||
|
||||
@@ -1881,7 +1881,7 @@ void get_pdsch_to_harq_feedback(int Mod_idP,
|
||||
if (CellGroup && CellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList)
|
||||
ubwp = CellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[bwp_id-1];
|
||||
|
||||
NR_SearchSpace_t *ss;
|
||||
NR_SearchSpace_t *ss=NULL;
|
||||
|
||||
// common search type uses DCI format 1_0
|
||||
if (ss_type == NR_SearchSpace__searchSpaceType_PR_common) {
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include <openair2/UTIL/OPT/opt.h>
|
||||
|
||||
|
||||
//38.321 Table 6.1.3.1-1
|
||||
const uint32_t NR_SHORT_BSR_TABLE[32] = {
|
||||
@@ -83,6 +85,9 @@ void nr_process_mac_pdu(
|
||||
LOG_E(NR_MAC, "%s() UE_id == -1\n",__func__);
|
||||
return;
|
||||
}
|
||||
if ( pduP[0] != UL_SCH_LCID_PADDING )
|
||||
trace_NRpdu(DIRECTION_UPLINK, pduP, mac_pdu_len ,UE_id, WS_C_RNTI, rnti, frameP, 0,0, 0);
|
||||
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
// For both DL/UL-SCH
|
||||
// Except:
|
||||
|
||||
@@ -66,8 +66,9 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity,
|
||||
header_size = 3;
|
||||
}
|
||||
/* SRBs always have MAC-I, even if integrity is not active */
|
||||
if (entity->has_integrity
|
||||
|| entity->type == NR_PDCP_SRB) {
|
||||
if ( // FIXME: DRB creation is with integrity, but we don't receive it
|
||||
// entity->has_integrity ||
|
||||
entity->type == NR_PDCP_SRB) {
|
||||
integrity_size = 4;
|
||||
} else {
|
||||
integrity_size = 0;
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "common/ran_context.h"
|
||||
#include "NR_UL-CCCH-Message.h"
|
||||
|
||||
#undef C_RNTI // C_RNTI is used in F1AP generated code, prevent preprocessor replace
|
||||
#include "openair2/F1AP/f1ap_du_rrc_message_transfer.h"
|
||||
|
||||
#include "openair2/LAYER2/PROTO_AGENT/proto_agent.h"
|
||||
@@ -426,7 +425,7 @@ static void deliver_sdu(void *_ue, nr_rlc_entity_t *entity, char *buf, int size)
|
||||
int is_enb;
|
||||
|
||||
/* is it SRB? */
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (i = 0; i < sizeofArray(ue->srb); i++) {
|
||||
if (entity == ue->srb[i]) {
|
||||
is_srb = 1;
|
||||
rb_id = i+1;
|
||||
@@ -435,7 +434,7 @@ static void deliver_sdu(void *_ue, nr_rlc_entity_t *entity, char *buf, int size)
|
||||
}
|
||||
|
||||
/* maybe DRB? */
|
||||
for (i = 0; i < 5; i++) {
|
||||
for (i = 0; i < sizeofArray(ue->drb) ; i++) {
|
||||
if (entity == ue->drb[i]) {
|
||||
is_srb = 0;
|
||||
rb_id = i+1;
|
||||
|
||||
@@ -49,8 +49,6 @@
|
||||
#include "intertask_interface.h"
|
||||
|
||||
#include "flexran_agent_extern.h"
|
||||
#undef C_RNTI // C_RNTI is used in F1AP generated code, prevent preprocessor replace
|
||||
//#include "f1ap_du_rrc_message_transfer.h"
|
||||
#include "openair2/F1AP/f1ap_du_rrc_message_transfer.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -249,7 +249,7 @@ boolean_t gtpv_data_req_new (
|
||||
return result;
|
||||
} else { /* It is from from epc message */
|
||||
/* in the source enb, UE in RRC_HO_EXECUTION mode */
|
||||
MessageDef *msg;
|
||||
//MessageDef *msg;
|
||||
// ?????
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "NR_BCCH-BCH-Message.h"
|
||||
#include "rrc_gNB_UE_context.h"
|
||||
#include <openair2/RRC/NR/MESSAGES/asn1_msg.h>
|
||||
#include <openair2/UTIL/OPT/opt.h>
|
||||
#include <openair2/F1AP/f1ap_du_rrc_message_transfer.h>
|
||||
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
@@ -208,7 +208,6 @@ nr_rrc_data_req(
|
||||
message_p);
|
||||
LOG_I(NR_RRC,"send RRC_DCCH_DATA_REQ to PDCP\n");
|
||||
|
||||
//trace_NRpdu(DIRECTION_DOWNLINK, message_buffer, sdu_sizeP, 0, WS_M_RNTI, ctxt_pP->rnti, ctxt_pP->frame, ctxt_pP->subframe,0, 0);
|
||||
/* Hack: only trigger PDCP if in CU, otherwise it is triggered by RU threads
|
||||
* Ideally, PDCP would not neet to be triggered like this but react to ITTI
|
||||
* messages automatically */
|
||||
|
||||
@@ -1034,7 +1034,7 @@ void fill_initial_SpCellConfig(rnti_t rnti,
|
||||
AssertFatal(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing==NR_SubcarrierSpacing_kHz30,
|
||||
"SCS != 30kHz\n");
|
||||
AssertFatal(scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity==NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms5,
|
||||
"TDD period != 5ms : %d\n",scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity);
|
||||
"TDD period != 5ms : %ld\n",scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity);
|
||||
|
||||
schedulingRequestResourceConfig->periodicityAndOffset->choice.sl40 = 10*((rnti>>1)&3) + (rnti&2);
|
||||
schedulingRequestResourceConfig->resource = calloc(1,sizeof(*schedulingRequestResourceConfig->resource));
|
||||
|
||||
@@ -356,7 +356,7 @@ typedef struct gNB_RRC_UE_s {
|
||||
/* list of e_rab to be setup by RRC layers */
|
||||
/* list of pdu session to be setup by RRC layers */
|
||||
e_rab_param_t e_rab[NB_RB_MAX];//[S1AP_MAX_E_RAB];
|
||||
pdu_session_param_t pdusession[NR_NB_RB_MAX];//[NGAP_MAX_PDU_SESSION];
|
||||
pdu_session_param_t pduSession[NR_NB_RB_MAX];//[NGAP_MAX_PDU_SESSION];
|
||||
//release e_rabs
|
||||
uint8_t nb_release_of_e_rabs;
|
||||
e_rab_failed_t e_rabs_release_failed[S1AP_MAX_E_RAB];
|
||||
|
||||
+44
-44
@@ -805,18 +805,18 @@ rrc_gNB_generate_defaultRRCReconfiguration(
|
||||
|
||||
/* Add all NAS PDUs to the list */
|
||||
for (int i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
|
||||
if (ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer != NULL) {
|
||||
if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) {
|
||||
dedicatedNAS_Message = CALLOC(1, sizeof(NR_DedicatedNAS_Message_t));
|
||||
memset(dedicatedNAS_Message, 0, sizeof(OCTET_STRING_t));
|
||||
OCTET_STRING_fromBuf(dedicatedNAS_Message,
|
||||
(char *)ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer,
|
||||
ue_context_pP->ue_context.pdusession[i].param.nas_pdu.length);
|
||||
(char *)ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer,
|
||||
ue_context_pP->ue_context.pduSession[i].param.nas_pdu.length);
|
||||
ASN_SEQUENCE_ADD(&dedicatedNAS_MessageList->list, dedicatedNAS_Message);
|
||||
}
|
||||
|
||||
ue_context_pP->ue_context.pdusession[i].status = PDU_SESSION_STATUS_DONE;
|
||||
ue_context_pP->ue_context.pduSession[i].status = PDU_SESSION_STATUS_DONE;
|
||||
LOG_D(NR_RRC, "setting the status for the default DRB (index %d) to (%d,%s)\n",
|
||||
i, ue_context_pP->ue_context.pdusession[i].status, "PDU_SESSION_STATUS_DONE");
|
||||
i, ue_context_pP->ue_context.pduSession[i].status, "PDU_SESSION_STATUS_DONE");
|
||||
}
|
||||
|
||||
if (ue_context_pP->ue_context.nas_pdu_flag == 1) {
|
||||
@@ -853,9 +853,9 @@ rrc_gNB_generate_defaultRRCReconfiguration(
|
||||
|
||||
/* Free all NAS PDUs */
|
||||
for (int i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
|
||||
if (ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer != NULL) {
|
||||
free(ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer);
|
||||
ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer = NULL;
|
||||
if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) {
|
||||
free(ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer);
|
||||
ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -990,7 +990,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
|
||||
break;
|
||||
}
|
||||
|
||||
if (ue_context_pP->ue_context.pdusession[i].status >= PDU_SESSION_STATUS_DONE) {
|
||||
if (ue_context_pP->ue_context.pduSession[i].status >= PDU_SESSION_STATUS_DONE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1001,15 +1001,15 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
|
||||
// sdap_Config
|
||||
sdap_config = CALLOC(1, sizeof(NR_SDAP_Config_t));
|
||||
memset(sdap_config, 0, sizeof(NR_SDAP_Config_t));
|
||||
sdap_config->pdu_Session = ue_context_pP->ue_context.pdusession[i].param.pdusession_id;
|
||||
sdap_config->pdu_Session = ue_context_pP->ue_context.pduSession[i].param.pdusession_id;
|
||||
sdap_config->sdap_HeaderDL = NR_SDAP_Config__sdap_HeaderDL_absent;
|
||||
sdap_config->sdap_HeaderUL = NR_SDAP_Config__sdap_HeaderUL_absent;
|
||||
sdap_config->defaultDRB = TRUE;
|
||||
sdap_config->mappedQoS_FlowsToAdd = calloc(1, sizeof(struct NR_SDAP_Config__mappedQoS_FlowsToAdd));
|
||||
memset(sdap_config->mappedQoS_FlowsToAdd, 0, sizeof(struct NR_SDAP_Config__mappedQoS_FlowsToAdd));
|
||||
|
||||
for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.pdusession[i].param.nb_qos; qos_flow_index++) {
|
||||
qfi = ue_context_pP->ue_context.pdusession[i].param.qos[qos_flow_index].qfi;
|
||||
for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.pduSession[i].param.nb_qos; qos_flow_index++) {
|
||||
qfi = ue_context_pP->ue_context.pduSession[i].param.qos[qos_flow_index].qfi;
|
||||
ASN_SEQUENCE_ADD(&sdap_config->mappedQoS_FlowsToAdd->list, &qfi);
|
||||
}
|
||||
sdap_config->mappedQoS_FlowsToRelease = NULL;
|
||||
@@ -1039,8 +1039,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
|
||||
DRB_config->pdcp_Config->ext1 = NULL;
|
||||
|
||||
// Reference TS23501 Table 5.7.4-1: Standardized 5QI to QoS characteristics mapping
|
||||
for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.pdusession[i].param.nb_qos; qos_flow_index++) {
|
||||
switch (ue_context_pP->ue_context.pdusession[i].param.qos[qos_flow_index].fiveQI) {
|
||||
for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.pduSession[i].param.nb_qos; qos_flow_index++) {
|
||||
switch (ue_context_pP->ue_context.pduSession[i].param.qos[qos_flow_index].fiveQI) {
|
||||
case 1: //100ms
|
||||
case 2: //150ms
|
||||
case 3: //50ms
|
||||
@@ -1054,9 +1054,9 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(NR_RRC,"not supported 5qi %lu\n", ue_context_pP->ue_context.pdusession[i].param.qos[qos_flow_index].fiveQI);
|
||||
ue_context_pP->ue_context.pdusession[i].status = PDU_SESSION_STATUS_FAILED;
|
||||
ue_context_pP->ue_context.pdusession[i].xid = xid;
|
||||
LOG_E(NR_RRC,"not supported 5qi %lu\n", ue_context_pP->ue_context.pduSession[i].param.qos[qos_flow_index].fiveQI);
|
||||
ue_context_pP->ue_context.pduSession[i].status = PDU_SESSION_STATUS_FAILED;
|
||||
ue_context_pP->ue_context.pduSession[i].xid = xid;
|
||||
pdu_sessions_done++;
|
||||
free(DRB_config);
|
||||
continue;
|
||||
@@ -1066,18 +1066,18 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
|
||||
ASN_SEQUENCE_ADD(&(*DRB_configList)->list, DRB_config);
|
||||
ASN_SEQUENCE_ADD(&(*DRB_configList2)->list, DRB_config);
|
||||
|
||||
ue_context_pP->ue_context.pdusession[i].status = PDU_SESSION_STATUS_DONE;
|
||||
ue_context_pP->ue_context.pdusession[i].xid = xid;
|
||||
ue_context_pP->ue_context.pduSession[i].status = PDU_SESSION_STATUS_DONE;
|
||||
ue_context_pP->ue_context.pduSession[i].xid = xid;
|
||||
|
||||
if (ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer != NULL) {
|
||||
if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) {
|
||||
dedicatedNAS_Message = CALLOC(1, sizeof(NR_DedicatedNAS_Message_t));
|
||||
memset(dedicatedNAS_Message, 0, sizeof(OCTET_STRING_t));
|
||||
OCTET_STRING_fromBuf(dedicatedNAS_Message,
|
||||
(char *)ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer,
|
||||
ue_context_pP->ue_context.pdusession[i].param.nas_pdu.length);
|
||||
(char *)ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer,
|
||||
ue_context_pP->ue_context.pduSession[i].param.nas_pdu.length);
|
||||
ASN_SEQUENCE_ADD(&dedicatedNAS_MessageList->list, dedicatedNAS_Message);
|
||||
|
||||
LOG_I(NR_RRC,"add NAS info with size %d (pdusession id %d)\n",ue_context_pP->ue_context.pdusession[i].param.nas_pdu.length, i);
|
||||
LOG_I(NR_RRC,"add NAS info with size %d (pdusession id %d)\n",ue_context_pP->ue_context.pduSession[i].param.nas_pdu.length, i);
|
||||
} else {
|
||||
// TODO
|
||||
LOG_E(NR_RRC,"no NAS info (pdusession id %d)\n", i);
|
||||
@@ -1108,10 +1108,10 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
|
||||
|
||||
/* Free all NAS PDUs */
|
||||
for (i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
|
||||
if (ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer != NULL) {
|
||||
if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) {
|
||||
/* Free the NAS PDU buffer and invalidate it */
|
||||
free(ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer);
|
||||
ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer = NULL;
|
||||
free(ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer);
|
||||
ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1180,7 +1180,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
|
||||
|
||||
*DRB_Release_configList2 = CALLOC(1, sizeof(**DRB_Release_configList2));
|
||||
for(i = 0; i < NB_RB_MAX; i++) {
|
||||
if((ue_context_pP->ue_context.pdusession[i].status == PDU_SESSION_STATUS_TORELEASE) && ue_context_pP->ue_context.pdusession[i].xid == xid) {
|
||||
if((ue_context_pP->ue_context.pduSession[i].status == PDU_SESSION_STATUS_TORELEASE) && ue_context_pP->ue_context.pduSession[i].xid == xid) {
|
||||
DRB_release = CALLOC(1, sizeof(NR_DRB_Identity_t));
|
||||
*DRB_release = i+1;
|
||||
ASN_SEQUENCE_ADD(&(*DRB_Release_configList2)->list, DRB_release);
|
||||
@@ -1671,13 +1671,13 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
||||
memset(&create_tunnel_req, 0, sizeof(create_tunnel_req));
|
||||
|
||||
for ( j = 0, i = 0; i < NB_RB_MAX; i++) {
|
||||
if (ue_context_pP->ue_context.pdusession[i].status == PDU_SESSION_STATUS_ESTABLISHED || ue_context_pP->ue_context.pdusession[i].status == PDU_SESSION_STATUS_DONE) {
|
||||
create_tunnel_req.pdusession_id[j] = ue_context_pP->ue_context.pdusession[i].param.pdusession_id;
|
||||
create_tunnel_req.upf_NGu_teid[j] = ue_context_pP->ue_context.pdusession[i].param.gtp_teid;
|
||||
if (ue_context_pP->ue_context.pduSession[i].status == PDU_SESSION_STATUS_ESTABLISHED || ue_context_pP->ue_context.pduSession[i].status == PDU_SESSION_STATUS_DONE) {
|
||||
create_tunnel_req.pdusession_id[j] = ue_context_pP->ue_context.pduSession[i].param.pdusession_id;
|
||||
create_tunnel_req.upf_NGu_teid[j] = ue_context_pP->ue_context.pduSession[i].param.gtp_teid;
|
||||
memcpy(create_tunnel_req.upf_addr[j].buffer,
|
||||
ue_context_pP->ue_context.pdusession[i].param.upf_addr.buffer,
|
||||
ue_context_pP->ue_context.pduSession[i].param.upf_addr.buffer,
|
||||
sizeof(uint8_t)*20);
|
||||
create_tunnel_req.upf_addr[j].length = ue_context_pP->ue_context.pdusession[i].param.upf_addr.length;
|
||||
create_tunnel_req.upf_addr[j].length = ue_context_pP->ue_context.pduSession[i].param.upf_addr.length;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
@@ -1737,10 +1737,10 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
||||
|
||||
/* TODO parameters yet to process ... */
|
||||
/* TODO should test if pdu session are Ok before! */
|
||||
ue_context_pP->ue_context.pdusession[i].status = PDU_SESSION_STATUS_DONE;
|
||||
ue_context_pP->ue_context.pdusession[i].xid = xid;
|
||||
ue_context_pP->ue_context.pduSession[i].status = PDU_SESSION_STATUS_DONE;
|
||||
ue_context_pP->ue_context.pduSession[i].xid = xid;
|
||||
LOG_D(NR_RRC, "setting the status for the default DRB (index %d) to (%d,%s)\n",
|
||||
i, ue_context_pP->ue_context.pdusession[i].status, "PDU_SESSION_STATUS_DONE");
|
||||
i, ue_context_pP->ue_context.pduSession[i].status, "PDU_SESSION_STATUS_DONE");
|
||||
}
|
||||
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
@@ -1761,10 +1761,10 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
||||
|
||||
/* Free all NAS PDUs */
|
||||
for (i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
|
||||
if (ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer != NULL) {
|
||||
if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) {
|
||||
/* Free the NAS PDU buffer and invalidate it */
|
||||
free(ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer);
|
||||
ue_context_pP->ue_context.pdusession[i].param.nas_pdu.buffer = NULL;
|
||||
free(ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer);
|
||||
ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2097,10 +2097,10 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
||||
ue_context_p->ue_context.reestablishment_xid);
|
||||
|
||||
for (uint8_t pdusessionid = 0; pdusessionid < ue_context_p->ue_context.nb_of_pdusessions; pdusessionid++) {
|
||||
if (ue_context_p->ue_context.pdusession[pdusessionid].status == PDU_SESSION_STATUS_DONE) {
|
||||
ue_context_p->ue_context.pdusession[pdusessionid].status = PDU_SESSION_STATUS_ESTABLISHED;
|
||||
if (ue_context_p->ue_context.pduSession[pdusessionid].status == PDU_SESSION_STATUS_DONE) {
|
||||
ue_context_p->ue_context.pduSession[pdusessionid].status = PDU_SESSION_STATUS_ESTABLISHED;
|
||||
} else {
|
||||
ue_context_p->ue_context.pdusession[pdusessionid].status = PDU_SESSION_STATUS_FAILED;
|
||||
ue_context_p->ue_context.pduSession[pdusessionid].status = PDU_SESSION_STATUS_FAILED;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2341,7 +2341,7 @@ rrc_gNB_decode_dcch(
|
||||
GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).rnti = ue_context_p->ue_context.rnti;
|
||||
|
||||
for(i = 0; i < NB_RB_MAX; i++) {
|
||||
if(xid == ue_context_p->ue_context.pdusession[i].xid) {
|
||||
if(xid == ue_context_p->ue_context.pduSession[i].xid) {
|
||||
GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).pdusession_id[GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).num_pdusession++] =
|
||||
ue_context_p->ue_context.gnb_gtp_psi[i];
|
||||
ue_context_p->ue_context.gnb_gtp_teid[i] = 0;
|
||||
@@ -3058,7 +3058,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
||||
MessageDef *msg;
|
||||
int id;
|
||||
rrc_gNB_ue_context_t *ue_context_p = NULL;
|
||||
FILE *fd=fopen("nrRRCstats.log","w");
|
||||
FILE *fd=NULL;//fopen("nrRRCstats.log","w");
|
||||
RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &(RC.nrrrc[ctxt_pP->module_id]->rrc_ue_head)) {
|
||||
ctxt_pP->rnti = ue_context_p->ue_id_rnti;
|
||||
|
||||
@@ -3138,7 +3138,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fd);
|
||||
if (fd) fclose(fd);
|
||||
|
||||
/* send a tick to x2ap */
|
||||
if (is_x2ap_enabled()){
|
||||
|
||||
@@ -539,20 +539,20 @@ rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(
|
||||
if (nb_pdusessions_tosetup != 0) {
|
||||
memset(&create_tunnel_req, 0, sizeof(gtpv1u_gnb_create_tunnel_req_t));
|
||||
for (int i = 0; i < NR_NB_RB_MAX - 3; i++) {
|
||||
if(ue_context_p->ue_context.pdusession[i].status >= PDU_SESSION_STATUS_DONE)
|
||||
if(ue_context_p->ue_context.pduSession[i].status >= PDU_SESSION_STATUS_DONE)
|
||||
continue;
|
||||
ue_context_p->ue_context.pdusession[i].status = PDU_SESSION_STATUS_NEW;
|
||||
ue_context_p->ue_context.pdusession[i].param = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[pdu_sessions_done];
|
||||
ue_context_p->ue_context.pduSession[i].status = PDU_SESSION_STATUS_NEW;
|
||||
ue_context_p->ue_context.pduSession[i].param = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[pdu_sessions_done];
|
||||
create_tunnel_req.pdusession_id[pdu_sessions_done] = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[pdu_sessions_done].pdusession_id;
|
||||
create_tunnel_req.upf_NGu_teid[pdu_sessions_done] = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[pdu_sessions_done].gtp_teid;
|
||||
create_tunnel_req.upf_addr[pdu_sessions_done].length = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[i].upf_addr.length;
|
||||
create_tunnel_req.upf_addr[pdu_sessions_done].length = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[pdu_sessions_done].upf_addr.length;
|
||||
memcpy(create_tunnel_req.upf_addr[pdu_sessions_done].buffer,
|
||||
NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[i].upf_addr.buffer,
|
||||
NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[pdu_sessions_done].upf_addr.buffer,
|
||||
sizeof(uint8_t)*20);
|
||||
LOG_I(NR_RRC, "PDUSESSION SETUP: local index %d teid %u, pdusession id %d \n",
|
||||
i,
|
||||
create_tunnel_req.upf_NGu_teid[i],
|
||||
create_tunnel_req.pdusession_id[i]);
|
||||
create_tunnel_req.upf_NGu_teid[pdu_sessions_done],
|
||||
create_tunnel_req.pdusession_id[pdu_sessions_done]);
|
||||
inde_list[pdu_sessions_done] = i;
|
||||
pdu_sessions_done++;
|
||||
|
||||
@@ -649,24 +649,24 @@ rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).gNB_ue_ngap_id = ue_context_pP->ue_context.gNB_ue_ngap_id;
|
||||
|
||||
for (pdusession = 0; pdusession < ue_context_pP->ue_context.nb_of_pdusessions; pdusession++) {
|
||||
if (ue_context_pP->ue_context.pdusession[pdusession].status == PDU_SESSION_STATUS_DONE) {
|
||||
if (ue_context_pP->ue_context.pduSession[pdusession].status == PDU_SESSION_STATUS_DONE) {
|
||||
pdu_sessions_done++;
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].pdusession_id = ue_context_pP->ue_context.pdusession[pdusession].param.pdusession_id;
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].pdusession_id = ue_context_pP->ue_context.pduSession[pdusession].param.pdusession_id;
|
||||
// TODO add other information from S1-U when it will be integrated
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].gtp_teid = ue_context_pP->ue_context.gnb_gtp_teid[pdusession];
|
||||
memcpy(NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].gNB_addr.buffer , ue_context_pP->ue_context.gnb_gtp_addrs[pdusession].buffer, 20);
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].gNB_addr.length = 4;
|
||||
ue_context_pP->ue_context.pdusession[pdusession].status = PDU_SESSION_STATUS_ESTABLISHED;
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].nb_of_qos_flow = ue_context_pP->ue_context.pdusession[pdusession].param.nb_qos;
|
||||
for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.pdusession[pdusession].param.nb_qos; qos_flow_index++) {
|
||||
ue_context_pP->ue_context.pduSession[pdusession].status = PDU_SESSION_STATUS_ESTABLISHED;
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].nb_of_qos_flow = ue_context_pP->ue_context.pduSession[pdusession].param.nb_qos;
|
||||
for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.pduSession[pdusession].param.nb_qos; qos_flow_index++) {
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].associated_qos_flows[qos_flow_index].qfi =
|
||||
ue_context_pP->ue_context.pdusession[pdusession].param.qos[qos_flow_index].qfi;
|
||||
ue_context_pP->ue_context.pduSession[pdusession].param.qos[qos_flow_index].qfi;
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].associated_qos_flows[qos_flow_index].qos_flow_mapping_ind = QOSFLOW_MAPPING_INDICATION_DL;
|
||||
}
|
||||
} else {
|
||||
pdu_sessions_failed++;
|
||||
ue_context_pP->ue_context.pdusession[pdusession].status = PDU_SESSION_STATUS_FAILED;
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions_failed[pdusession].pdusession_id = ue_context_pP->ue_context.pdusession[pdusession].param.pdusession_id;
|
||||
ue_context_pP->ue_context.pduSession[pdusession].status = PDU_SESSION_STATUS_FAILED;
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions_failed[pdusession].pdusession_id = ue_context_pP->ue_context.pduSession[pdusession].param.pdusession_id;
|
||||
// TODO add cause when it will be integrated
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions_failed[pdusession].cause = NGAP_Cause_PR_radioNetwork;
|
||||
NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions_failed[pdusession].cause_value = NGAP_CauseRadioNetwork_unknown_PDU_session_ID;
|
||||
@@ -957,10 +957,10 @@ rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(
|
||||
|
||||
for (pdusession = 0; pdusession < ue_context_pP->ue_context.setup_pdu_sessions; pdusession++) {
|
||||
// if (xid == ue_context_pP->ue_context.pdusession[pdusession].xid) {
|
||||
if (ue_context_pP->ue_context.pdusession[pdusession].status == PDU_SESSION_STATUS_DONE) {
|
||||
NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdusession].pdusession_id = ue_context_pP->ue_context.pdusession[pdusession].param.pdusession_id;
|
||||
if (ue_context_pP->ue_context.pduSession[pdusession].status == PDU_SESSION_STATUS_DONE) {
|
||||
NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdusession].pdusession_id = ue_context_pP->ue_context.pduSession[pdusession].param.pdusession_id;
|
||||
// NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdusession].pdusession_id = 1;
|
||||
NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdusession].nb_of_qos_flow = ue_context_pP->ue_context.pdusession[pdusession].param.nb_qos;
|
||||
NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdusession].nb_of_qos_flow = ue_context_pP->ue_context.pduSession[pdusession].param.nb_qos;
|
||||
NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdusession].gtp_teid = ue_context_pP->ue_context.gnb_gtp_teid[pdusession];
|
||||
NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdusession].gNB_addr.pdu_session_type = PDUSessionType_ipv4;
|
||||
NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdusession].gNB_addr.length = ue_context_pP->ue_context.gnb_gtp_addrs[pdusession].length;
|
||||
@@ -968,13 +968,13 @@ rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(
|
||||
ue_context_pP->ue_context.gnb_gtp_addrs[pdusession].buffer, sizeof(uint8_t)*20);
|
||||
for (qos_flow_index = 0; qos_flow_index < NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdusession].nb_of_qos_flow; qos_flow_index++) {
|
||||
NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdusession].associated_qos_flows[qos_flow_index].qfi =
|
||||
ue_context_pP->ue_context.pdusession[pdusession].param.qos[qos_flow_index].qfi;
|
||||
ue_context_pP->ue_context.pduSession[pdusession].param.qos[qos_flow_index].qfi;
|
||||
NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdusession].associated_qos_flows[qos_flow_index].qos_flow_mapping_ind = QOSFLOW_MAPPING_INDICATION_DL;
|
||||
}
|
||||
|
||||
ue_context_pP->ue_context.pdusession[pdusession].status = PDU_SESSION_STATUS_ESTABLISHED;
|
||||
ue_context_pP->ue_context.pduSession[pdusession].status = PDU_SESSION_STATUS_ESTABLISHED;
|
||||
LOG_I (NR_RRC,"gnb_gtp_addr (msg index %d, pdu_sessions index %d, status %d, xid %d): nb_of_pdusessions %d, pdusession_id %d, teid: %u, addr: %d.%d.%d.%d \n ",
|
||||
pdu_sessions_done, pdusession, ue_context_pP->ue_context.pdusession[pdusession].status, xid,
|
||||
pdu_sessions_done, pdusession, ue_context_pP->ue_context.pduSession[pdusession].status, xid,
|
||||
ue_context_pP->ue_context.nb_of_pdusessions,
|
||||
NGAP_PDUSESSION_SETUP_RESP (msg_p).pdusessions[pdu_sessions_done].pdusession_id,
|
||||
NGAP_PDUSESSION_SETUP_RESP (msg_p).pdusessions[pdu_sessions_done].gtp_teid,
|
||||
@@ -983,12 +983,12 @@ rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(
|
||||
NGAP_PDUSESSION_SETUP_RESP (msg_p).pdusessions[pdu_sessions_done].gNB_addr.buffer[2],
|
||||
NGAP_PDUSESSION_SETUP_RESP (msg_p).pdusessions[pdu_sessions_done].gNB_addr.buffer[3]);
|
||||
pdu_sessions_done++;
|
||||
} else if ((ue_context_pP->ue_context.pdusession[pdusession].status == PDU_SESSION_STATUS_NEW) ||
|
||||
(ue_context_pP->ue_context.pdusession[pdusession].status == PDU_SESSION_STATUS_ESTABLISHED)) {
|
||||
} else if ((ue_context_pP->ue_context.pduSession[pdusession].status == PDU_SESSION_STATUS_NEW) ||
|
||||
(ue_context_pP->ue_context.pduSession[pdusession].status == PDU_SESSION_STATUS_ESTABLISHED)) {
|
||||
LOG_D (NR_RRC,"PDU-SESSION is NEW or already ESTABLISHED\n");
|
||||
} else { /* to be improved */
|
||||
ue_context_pP->ue_context.pdusession[pdusession].status = PDU_SESSION_STATUS_FAILED;
|
||||
NGAP_PDUSESSION_SETUP_RESP (msg_p).pdusessions_failed[pdu_sessions_failed].pdusession_id = ue_context_pP->ue_context.pdusession[pdusession].param.pdusession_id;
|
||||
ue_context_pP->ue_context.pduSession[pdusession].status = PDU_SESSION_STATUS_FAILED;
|
||||
NGAP_PDUSESSION_SETUP_RESP (msg_p).pdusessions_failed[pdu_sessions_failed].pdusession_id = ue_context_pP->ue_context.pduSession[pdusession].param.pdusession_id;
|
||||
pdu_sessions_failed++;
|
||||
// TODO add cause when it will be integrated
|
||||
}
|
||||
@@ -1017,7 +1017,7 @@ rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(
|
||||
}
|
||||
|
||||
for(int i = 0; i < NB_RB_MAX; i++) {
|
||||
ue_context_pP->ue_context.pdusession[i].xid = -1;
|
||||
ue_context_pP->ue_context.pduSession[i].xid = -1;
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -1063,20 +1063,20 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(
|
||||
|
||||
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0);
|
||||
for (int i = 0; i < NR_NB_RB_MAX - 3; i++) {
|
||||
if(ue_context_p->ue_context.pdusession[i].status >= PDU_SESSION_STATUS_DONE)
|
||||
if(ue_context_p->ue_context.pduSession[i].status >= PDU_SESSION_STATUS_DONE)
|
||||
continue;
|
||||
ue_context_p->ue_context.pdusession[i].status = PDU_SESSION_STATUS_NEW;
|
||||
ue_context_p->ue_context.pdusession[i].param = NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[pdu_sessions_done];
|
||||
ue_context_p->ue_context.pduSession[i].status = PDU_SESSION_STATUS_NEW;
|
||||
ue_context_p->ue_context.pduSession[i].param = NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[pdu_sessions_done];
|
||||
create_tunnel_req.pdusession_id[pdu_sessions_done] = NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[pdu_sessions_done].pdusession_id;
|
||||
create_tunnel_req.upf_NGu_teid[pdu_sessions_done] = NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[pdu_sessions_done].gtp_teid;
|
||||
memcpy(create_tunnel_req.upf_addr[pdu_sessions_done].buffer,
|
||||
NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[i].upf_addr.buffer,
|
||||
NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[pdu_sessions_done].upf_addr.buffer,
|
||||
sizeof(uint8_t)*20);
|
||||
create_tunnel_req.upf_addr[pdu_sessions_done].length = NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[i].upf_addr.length;
|
||||
create_tunnel_req.upf_addr[pdu_sessions_done].length = NGAP_PDUSESSION_SETUP_REQ(msg_p).pdusession_setup_params[pdu_sessions_done].upf_addr.length;
|
||||
LOG_I(NR_RRC,"NGAP PDUSESSION SETUP REQ: local index %d teid %u, pdusession id %d \n",
|
||||
i,
|
||||
create_tunnel_req.upf_NGu_teid[i],
|
||||
create_tunnel_req.pdusession_id[i]);
|
||||
create_tunnel_req.upf_NGu_teid[pdu_sessions_done],
|
||||
create_tunnel_req.pdusession_id[pdu_sessions_done]);
|
||||
inde_list[pdu_sessions_done] = i;
|
||||
pdu_sessions_done++;
|
||||
|
||||
@@ -1144,7 +1144,7 @@ rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_REQ(
|
||||
NGAP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).cause_value = cause_valueP;
|
||||
NGAP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).nb_of_pdusessions = ue_context_pP->ue_context.setup_pdu_sessions;
|
||||
for (int pdusession = 0; pdusession < ue_context_pP->ue_context.setup_pdu_sessions; pdusession++) {
|
||||
NGAP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).pdusessions[pdusession].pdusession_id = ue_context_pP->ue_context.pdusession[pdusession].param.pdusession_id;
|
||||
NGAP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).pdusessions[pdusession].pdusession_id = ue_context_pP->ue_context.pduSession[pdusession].param.pdusession_id;
|
||||
}
|
||||
itti_send_msg_to_task(TASK_NGAP, GNB_MODULE_ID_TO_INSTANCE(gnb_mod_idP), msg_context_release_req_p);
|
||||
}
|
||||
@@ -1357,12 +1357,12 @@ rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(
|
||||
NGAP_PDUSESSION_RELEASE_RESPONSE (msg_p).gNB_ue_ngap_id = ue_context_pP->ue_context.gNB_ue_ngap_id;
|
||||
|
||||
for (int i = 0; i < NB_RB_MAX; i++) {
|
||||
if (xid == ue_context_pP->ue_context.pdusession[i].xid) {
|
||||
if (xid == ue_context_pP->ue_context.pduSession[i].xid) {
|
||||
NGAP_PDUSESSION_RELEASE_RESPONSE (msg_p).pdusession_release[pdu_sessions_released].pdusession_id =
|
||||
ue_context_pP->ue_context.pdusession[i].param.pdusession_id;
|
||||
ue_context_pP->ue_context.pduSession[i].param.pdusession_id;
|
||||
pdu_sessions_released++;
|
||||
//clear
|
||||
memset(&ue_context_pP->ue_context.pdusession[i], 0, sizeof(pdu_session_param_t));
|
||||
memset(&ue_context_pP->ue_context.pduSession[i], 0, sizeof(pdu_session_param_t));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1378,7 +1378,7 @@ rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(
|
||||
|
||||
//clear xid
|
||||
for(int i = 0; i < NB_RB_MAX; i++) {
|
||||
ue_context_pP->ue_context.pdusession[i].xid = -1;
|
||||
ue_context_pP->ue_context.pduSession[i].xid = -1;
|
||||
}
|
||||
|
||||
//clear release pdusessions
|
||||
@@ -1439,7 +1439,7 @@ rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(
|
||||
}
|
||||
|
||||
for (i = 0; i < NR_NB_RB_MAX; i++) {
|
||||
if (pdusession_release_params[pdusession].pdusession_id == ue_context_p->ue_context.pdusession[i].param.pdusession_id) {
|
||||
if (pdusession_release_params[pdusession].pdusession_id == ue_context_p->ue_context.pduSession[i].param.pdusession_id) {
|
||||
b_existed = 1;
|
||||
break;
|
||||
}
|
||||
@@ -1453,13 +1453,13 @@ rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(
|
||||
ue_context_p->ue_context.pdusessions_release_failed[ue_context_p->ue_context.nb_release_of_pdusessions].cause_value = 30;
|
||||
ue_context_p->ue_context.nb_release_of_pdusessions++;
|
||||
} else {
|
||||
if(ue_context_p->ue_context.pdusession[i].status == PDU_SESSION_STATUS_FAILED) {
|
||||
ue_context_p->ue_context.pdusession[i].xid = xid;
|
||||
if(ue_context_p->ue_context.pduSession[i].status == PDU_SESSION_STATUS_FAILED) {
|
||||
ue_context_p->ue_context.pduSession[i].xid = xid;
|
||||
continue;
|
||||
} else if(ue_context_p->ue_context.pdusession[i].status == PDU_SESSION_STATUS_ESTABLISHED) {
|
||||
LOG_I(NR_RRC, "RELEASE pdusession %d \n", ue_context_p->ue_context.pdusession[i].param.pdusession_id);
|
||||
ue_context_p->ue_context.pdusession[i].status = PDU_SESSION_STATUS_TORELEASE;
|
||||
ue_context_p->ue_context.pdusession[i].xid = xid;
|
||||
} else if(ue_context_p->ue_context.pduSession[i].status == PDU_SESSION_STATUS_ESTABLISHED) {
|
||||
LOG_I(NR_RRC, "RELEASE pdusession %d \n", ue_context_p->ue_context.pduSession[i].param.pdusession_id);
|
||||
ue_context_p->ue_context.pduSession[i].status = PDU_SESSION_STATUS_TORELEASE;
|
||||
ue_context_p->ue_context.pduSession[i].xid = xid;
|
||||
pdusession_release_drb++;
|
||||
} else {
|
||||
// pdusession_id status NG
|
||||
@@ -1483,7 +1483,7 @@ rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(
|
||||
GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).rnti = ue_context_p->ue_context.rnti;
|
||||
|
||||
for(i = 0; i < NB_RB_MAX; i++) {
|
||||
if(xid == ue_context_p->ue_context.pdusession[i].xid) {
|
||||
if(xid == ue_context_p->ue_context.pduSession[i].xid) {
|
||||
GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).pdusession_id[GTPV1U_GNB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).num_pdusession++] = ue_context_p->ue_context.gnb_gtp_psi[i];
|
||||
ue_context_p->ue_context.gnb_gtp_teid[i] = 0;
|
||||
memset(&ue_context_p->ue_context.gnb_gtp_addrs[i], 0, sizeof(ue_context_p->ue_context.gnb_gtp_addrs[i]));
|
||||
|
||||
@@ -135,7 +135,7 @@ rrc_gNB_allocate_new_UE_context(
|
||||
|
||||
for(int i = 0; i < NB_RB_MAX; i++) {
|
||||
new_p->ue_context.e_rab[i].xid = -1;
|
||||
new_p->ue_context.pdusession[i].xid = -1;
|
||||
new_p->ue_context.pduSession[i].xid = -1;
|
||||
new_p->ue_context.modify_e_rab[i].xid = -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,9 +69,7 @@
|
||||
#include "SIMULATION/TOOLS/sim.h" // for taus
|
||||
#include <executables/softmodem-common.h>
|
||||
|
||||
#if defined(ITTI_SIM) || defined(RFSIM_NAS)
|
||||
#include "nr_nas_msg_sim.h"
|
||||
#endif
|
||||
|
||||
NR_UE_RRC_INST_t *NR_UE_rrc_inst;
|
||||
/* NAS Attach request with IMSI */
|
||||
@@ -1349,14 +1347,21 @@ static void rrc_ue_generate_RRCSetupComplete(
|
||||
AssertFatal(1==0,"2 > csi_MeasConfig is not null\n");
|
||||
|
||||
if (AMF_MODE_ENABLED) {
|
||||
#if defined(ITTI_SIM) || defined(RFSIM_NAS)
|
||||
#if defined(ITTI_SIM)
|
||||
as_nas_info_t initialNasMsg;
|
||||
generateRegistrationRequest(&initialNasMsg);
|
||||
generateRegistrationRequest(&initialNasMsg, ctxt_pP->module_id);
|
||||
nas_msg = (char*)initialNasMsg.data;
|
||||
nas_msg_length = initialNasMsg.length;
|
||||
#else
|
||||
nas_msg = (char *) NR_UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data;
|
||||
nas_msg_length = NR_UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.length;
|
||||
if (get_softmodem_params()->sa) {
|
||||
as_nas_info_t initialNasMsg;
|
||||
generateRegistrationRequest(&initialNasMsg, ctxt_pP->module_id);
|
||||
nas_msg = (char*)initialNasMsg.data;
|
||||
nas_msg_length = initialNasMsg.length;
|
||||
} else {
|
||||
nas_msg = (char *) NR_UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data;
|
||||
nas_msg_length = NR_UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.length;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
nas_msg = nr_nas_attach_req_imsi;
|
||||
@@ -2298,7 +2303,6 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB
|
||||
if (Srb_id != 1) {
|
||||
LOG_E(NR_RRC,"[UE %d] Frame %d: Received message on DL-DCCH (SRB%ld), should not have ...\n",
|
||||
ctxt_pP->module_id, ctxt_pP->frame, Srb_id);
|
||||
return -1;
|
||||
} else {
|
||||
LOG_D(NR_RRC, "Received message on SRB%ld\n", Srb_id);
|
||||
}
|
||||
|
||||
@@ -441,6 +441,10 @@ static void SendFrameNR(guint8 radioType, guint8 direction, guint8 rntiType,
|
||||
tmp16 = htons(subframe); // frame counter : this will give an expert info as wireshark expects SF and not F
|
||||
memcpy(frameBuffer+frameOffset, &tmp16, 2);
|
||||
frameOffset += 2;
|
||||
if (direction == 0 ) { //ulink
|
||||
frameBuffer[frameOffset++] = MAC_NR_PHR_TYPE2_OTHERCELL_TAG;
|
||||
frameBuffer[frameOffset++] = 0;
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
/* Now write the MAC PDU */
|
||||
|
||||
@@ -194,23 +194,23 @@ static int encode_guti_5gs_mobile_identity(Guti5GSMobileIdentity_t *guti, uint8_
|
||||
static int encode_suci_5gs_mobile_identity(Suci5GSMobileIdentity_t *suci, uint8_t *buffer)
|
||||
{
|
||||
uint32_t encoded = 0;
|
||||
*(buffer + encoded) = 0x00 | (suci->supiformat << 4) | (suci->typeofidentity);
|
||||
*(buffer + encoded) = (suci->supiformat << 4) | (suci->typeofidentity);
|
||||
encoded++;
|
||||
*(buffer + encoded) = 0x00 | ((suci->mccdigit2 & 0xf) << 4) |
|
||||
*(buffer + encoded) = ((suci->mccdigit2 & 0xf) << 4) |
|
||||
(suci->mccdigit1 & 0xf);
|
||||
encoded++;
|
||||
*(buffer + encoded) = 0x00 | ((suci->mncdigit3 & 0xf) << 4) |
|
||||
*(buffer + encoded) = ((suci->mncdigit3 & 0xf) << 4) |
|
||||
(suci->mccdigit3 & 0xf);
|
||||
encoded++;
|
||||
*(buffer + encoded) = 0x00 | ((suci->mncdigit2 & 0xf) << 4) |
|
||||
*(buffer + encoded) = ((suci->mncdigit2 & 0xf) << 4) |
|
||||
(suci->mncdigit1 & 0xf);
|
||||
encoded++;
|
||||
|
||||
*(buffer + encoded) = 0x00 | ((suci->routingindicatordigit2 & 0xf) << 4) |
|
||||
*(buffer + encoded) = ((suci->routingindicatordigit2 & 0xf) << 4) |
|
||||
(suci->routingindicatordigit1 & 0xf);
|
||||
encoded++;
|
||||
|
||||
*(buffer + encoded) = 0x00 | ((suci->routingindicatordigit4 & 0xf) << 4) |
|
||||
*(buffer + encoded) = ((suci->routingindicatordigit4 & 0xf) << 4) |
|
||||
(suci->routingindicatordigit3 & 0xf);
|
||||
encoded++;
|
||||
|
||||
@@ -220,8 +220,15 @@ static int encode_suci_5gs_mobile_identity(Suci5GSMobileIdentity_t *suci, uint8_
|
||||
*(buffer + encoded) = suci->homenetworkpki;
|
||||
encoded++;
|
||||
|
||||
IES_ENCODE_U32(buffer, encoded, suci->schemeoutput);
|
||||
char *ptr=suci->schemeoutput;
|
||||
while ( ptr < suci->schemeoutput+strlen(suci->schemeoutput) ) {
|
||||
buffer[encoded]=((*(ptr+1)-'0')<<4) | (*(ptr) -'0');
|
||||
encoded++;
|
||||
ptr+=2;
|
||||
}
|
||||
|
||||
if (strlen(suci->schemeoutput)%2 == 1)
|
||||
buffer[encoded++]=((*(ptr-1)-'0')) | 0xF0;
|
||||
return encoded;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ typedef struct {
|
||||
uint8_t spare6:1;
|
||||
uint8_t protectionschemeId:4;
|
||||
uint8_t homenetworkpki;
|
||||
uint32_t schemeoutput;
|
||||
char schemeoutput[32];
|
||||
} Suci5GSMobileIdentity_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -387,5 +387,6 @@ void processNAS(void *msg, NRUEcontext_t *UE);
|
||||
int identityRequest(void **msg, NRUEcontext_t *UE);
|
||||
int authenticationRequest(void **msg, NRUEcontext_t *UE);
|
||||
int securityModeCommand(void **msg, NRUEcontext_t *UE);
|
||||
void servingNetworkName(uint8_t *msg, char * imsiStr, int nmc_size);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,25 +40,13 @@
|
||||
#include "PduSessionEstablishRequest.h"
|
||||
#include "intertask_interface.h"
|
||||
#include "openair2/RRC/NAS/nas_config.h"
|
||||
|
||||
/*char netName[] = "5G:mnc093.mcc208.3gppnetwork.org";
|
||||
char imsi[] = "2089300007487";
|
||||
// USIM_API_K: 5122250214c33e723a5dd523fc145fc0
|
||||
uint8_t k[16] = {0x51, 0x22, 0x25, 0x02, 0x14,0xc3, 0x3e, 0x72, 0x3a, 0x5d, 0xd5, 0x23, 0xfc, 0x14, 0x5f, 0xc0};
|
||||
// OPC: 981d464c7c52eb6e5036234984ad0bcf
|
||||
const uint8_t opc[16] = {0x98, 0x1d, 0x46, 0x4c,0x7c,0x52,0xeb, 0x6e, 0x50, 0x36, 0x23, 0x49, 0x84, 0xad, 0x0b, 0xcf};*/
|
||||
|
||||
|
||||
char netName[] = "5G:mnc099.mcc208.3gppnetwork.org";
|
||||
char imsi[] = "2089900007487"; //"208990100001100";
|
||||
// USIM_API_K: fe c8 6b a6 eb 70 7e d0 89 05 75 7b 1b b4 4b 8f
|
||||
uint8_t k[16] = {0xfe, 0xc8, 0x6b, 0xa6, 0xeb, 0x70, 0x7e, 0xd0, 0x89, 0x05, 0x75, 0x7b, 0x1b, 0xb4, 0x4b, 0x8f};
|
||||
// OPC: c4 24 49 36 3b ba d0 2b 66 d1 6b c9 75 d7 7c c1
|
||||
const uint8_t opc[16] = {0xc4, 0x24, 0x49, 0x36, 0x3b, 0xba, 0xd0, 0x2b, 0x66, 0xd1, 0x6b, 0xc9, 0x75, 0xd7, 0x7c, 0xc1};
|
||||
#include <openair3/UICC/usim_interface.h>
|
||||
#include <openair3/NAS/COMMON/NR_NAS_defs.h>
|
||||
#include <openair1/PHY/phy_extern_nr_ue.h>
|
||||
|
||||
uint8_t *registration_request_buf;
|
||||
uint32_t registration_request_len;
|
||||
extern char *baseNetAddress;
|
||||
extern char *baseNetAddress;
|
||||
|
||||
static int nas_protected_security_header_encode(
|
||||
char *buffer,
|
||||
@@ -163,11 +151,11 @@ int mm_msg_encode(MM_msg *mm_msg, uint8_t *buffer, uint32_t len) {
|
||||
LOG_FUNC_RETURN (header_result + encode_result);
|
||||
}
|
||||
|
||||
void transferRES(uint8_t ck[16], uint8_t ik[16], uint8_t *input, uint8_t rand[16], uint8_t *output) {
|
||||
uint8_t S[100];
|
||||
void transferRES(uint8_t ck[16], uint8_t ik[16], uint8_t *input, uint8_t rand[16], uint8_t *output, uicc_t* uicc) {
|
||||
uint8_t S[100]={0};
|
||||
S[0] = 0x6B;
|
||||
int netNamesize = strlen(netName);
|
||||
memcpy(&S[1], netName, netNamesize);
|
||||
servingNetworkName (S+1, uicc->imsiStr, uicc->nmc_size);
|
||||
int netNamesize = strlen((char*)S+1);
|
||||
S[1 + netNamesize] = (netNamesize & 0xff00) >> 8;
|
||||
S[2 + netNamesize] = (netNamesize & 0x00ff);
|
||||
for (int i = 0; i < 16; i++)
|
||||
@@ -204,14 +192,15 @@ void transferRES(uint8_t ck[16], uint8_t ik[16], uint8_t *input, uint8_t rand[16
|
||||
output[i] = out[16 + i];
|
||||
}
|
||||
|
||||
void derive_kausf(uint8_t ck[16], uint8_t ik[16], uint8_t sqn[6], uint8_t kausf[32]) {
|
||||
uint8_t S[100];
|
||||
void derive_kausf(uint8_t ck[16], uint8_t ik[16], uint8_t sqn[6], uint8_t kausf[32], uicc_t *uicc) {
|
||||
uint8_t S[100]={0};
|
||||
uint8_t key[32];
|
||||
int netNamesize = strlen(netName);
|
||||
|
||||
memcpy(&key[0], ck, 16);
|
||||
memcpy(&key[16], ik, 16); //KEY
|
||||
S[0] = 0x6A;
|
||||
memcpy(&S[1], netName, netNamesize);
|
||||
servingNetworkName (S+1, uicc->imsiStr, uicc->nmc_size);
|
||||
int netNamesize = strlen((char*)S+1);
|
||||
S[1 + netNamesize] = (uint8_t)((netNamesize & 0xff00) >> 8);
|
||||
S[2 + netNamesize] = (uint8_t)(netNamesize & 0x00ff);
|
||||
for (int i = 0; i < 6; i++) {
|
||||
@@ -222,21 +211,21 @@ void derive_kausf(uint8_t ck[16], uint8_t ik[16], uint8_t sqn[6], uint8_t kausf[
|
||||
kdf(key, 32, S, 11 + netNamesize, kausf, 32);
|
||||
}
|
||||
|
||||
void derive_kseaf(uint8_t kausf[32], uint8_t kseaf[32]) {
|
||||
uint8_t S[100];
|
||||
int netNamesize = strlen(netName);
|
||||
void derive_kseaf(uint8_t kausf[32], uint8_t kseaf[32], uicc_t *uicc) {
|
||||
uint8_t S[100]={0};
|
||||
S[0] = 0x6C; //FC
|
||||
memcpy(&S[1], netName, netNamesize);
|
||||
servingNetworkName (S+1, uicc->imsiStr, uicc->nmc_size);
|
||||
int netNamesize = strlen((char*)S+1);
|
||||
S[1 + netNamesize] = (uint8_t)((netNamesize & 0xff00) >> 8);
|
||||
S[2 + netNamesize] = (uint8_t)(netNamesize & 0x00ff);
|
||||
kdf(kausf, 32, S, 3 + netNamesize, kseaf, 32);
|
||||
}
|
||||
|
||||
void derive_kamf(uint8_t *kseaf, uint8_t *kamf, uint16_t abba) {
|
||||
int imsiLen = strlen(imsi);
|
||||
void derive_kamf(uint8_t *kseaf, uint8_t *kamf, uint16_t abba, uicc_t* uicc) {
|
||||
int imsiLen = strlen(uicc->imsiStr);
|
||||
uint8_t S[100];
|
||||
S[0] = 0x6D; //FC = 0x6D
|
||||
memcpy(&S[1], imsi, imsiLen);
|
||||
memcpy(&S[1], uicc->imsiStr, imsiLen );
|
||||
S[1 + imsiLen] = (uint8_t)((imsiLen & 0xff00) >> 8);
|
||||
S[2 + imsiLen] = (uint8_t)(imsiLen & 0x00ff);
|
||||
S[3 + imsiLen] = abba & 0x00ff;
|
||||
@@ -262,11 +251,11 @@ void derive_knas(algorithm_type_dist_t nas_alg_type, uint8_t nas_alg_id, uint8_t
|
||||
knas_int[i] = out[16 + i];
|
||||
}
|
||||
|
||||
void generateRegistrationRequest(as_nas_info_t *initialNasMsg) {
|
||||
void generateRegistrationRequest(as_nas_info_t *initialNasMsg, int Mod_id) {
|
||||
int size = sizeof(mm_msg_header_t);
|
||||
fgs_nas_message_t nas_msg;
|
||||
memset(&nas_msg, 0, sizeof(fgs_nas_message_t));
|
||||
fgs_nas_message_t nas_msg={0};
|
||||
MM_msg *mm_msg;
|
||||
uicc_t * uicc=checkUicc(Mod_id);
|
||||
|
||||
mm_msg = &nas_msg.plain.mm_msg;
|
||||
// set header
|
||||
@@ -291,26 +280,31 @@ void generateRegistrationRequest(as_nas_info_t *initialNasMsg) {
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.amfpointer = 0;
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.amfsetid = 1016;
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.tmsi = 10;
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.mncdigit1 = 9;
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.mncdigit2 = 9;
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.mncdigit3 = 0xf;
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.mccdigit1 = 2;
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.mccdigit2 = 0;
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.mccdigit3 = 8;
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.mncdigit1 =
|
||||
uicc->nmc_size==2 ? uicc->imsiStr[3]-'0' : uicc->imsiStr[4]-'0';
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.mncdigit2 =
|
||||
uicc->nmc_size==2 ? uicc->imsiStr[4]-'0' : uicc->imsiStr[5]-'0';
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.mncdigit3 =
|
||||
uicc->nmc_size==2 ? 0xf : uicc->imsiStr[3]-'0';
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.mccdigit1 = uicc->imsiStr[0]-'0';
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.mccdigit2 = uicc->imsiStr[1]-'0';
|
||||
mm_msg->registration_request.fgsmobileidentity.guti.mccdigit3 = uicc->imsiStr[2]-'0';
|
||||
|
||||
size += 13;
|
||||
|
||||
} else {
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.typeofidentity = FGS_MOBILE_IDENTITY_SUCI;
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.mncdigit1 = 9;
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.mncdigit2 = 9;
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.mncdigit3 = 0xf;
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.mccdigit1 = 2;
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.mccdigit2 = 0;
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.mccdigit3 = 8;
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.schemeoutput = 0x4778;
|
||||
|
||||
size += 14;
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.mncdigit1 =
|
||||
uicc->nmc_size==2 ? uicc->imsiStr[3]-'0' : uicc->imsiStr[4]-'0';
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.mncdigit2 =
|
||||
uicc->nmc_size==2 ? uicc->imsiStr[4]-'0' : uicc->imsiStr[5]-'0';
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.mncdigit3 =
|
||||
uicc->nmc_size==2 ? 0xf : uicc->imsiStr[3]-'0';
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.mccdigit1 = uicc->imsiStr[0]-'0';
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.mccdigit2 = uicc->imsiStr[1]-'0';
|
||||
mm_msg->registration_request.fgsmobileidentity.suci.mccdigit3 = uicc->imsiStr[2]-'0';
|
||||
memcpy(mm_msg->registration_request.fgsmobileidentity.suci.schemeoutput, uicc->imsiStr+3+uicc->nmc_size, strlen(uicc->imsiStr) - (3+uicc->nmc_size));
|
||||
size += sizeof(Suci5GSMobileIdentity_t);
|
||||
}
|
||||
|
||||
mm_msg->registration_request.presencemask |= REGISTRATION_REQUEST_5GMM_CAPABILITY_PRESENT;
|
||||
@@ -337,7 +331,7 @@ void generateRegistrationRequest(as_nas_info_t *initialNasMsg) {
|
||||
|
||||
}
|
||||
|
||||
void generateIdentityResponse(as_nas_info_t *initialNasMsg, uint8_t identitytype) {
|
||||
void generateIdentityResponse(as_nas_info_t *initialNasMsg, uint8_t identitytype, uicc_t* uicc) {
|
||||
int size = sizeof(mm_msg_header_t);
|
||||
fgs_nas_message_t nas_msg;
|
||||
memset(&nas_msg, 0, sizeof(fgs_nas_message_t));
|
||||
@@ -359,15 +353,17 @@ void generateIdentityResponse(as_nas_info_t *initialNasMsg, uint8_t identitytype
|
||||
size += 1;
|
||||
if(identitytype == FGS_MOBILE_IDENTITY_SUCI){
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.typeofidentity = FGS_MOBILE_IDENTITY_SUCI;
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.mncdigit1 = 9;
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.mncdigit2 = 9;
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.mncdigit3 = 0xf;
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.mccdigit1 = 2;
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.mccdigit2 = 0;
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.mccdigit3 = 8;
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.schemeoutput = 0x4778;
|
||||
|
||||
size += 14;
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.mncdigit1 =
|
||||
uicc->nmc_size==2 ? uicc->imsiStr[3]-'0' : uicc->imsiStr[4]-'0';
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.mncdigit2 =
|
||||
uicc->nmc_size==2 ? uicc->imsiStr[4]-'0' : uicc->imsiStr[5]-'0';
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.mncdigit3 =
|
||||
uicc->nmc_size==2? 0xF : uicc->imsiStr[3]-'0';
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.mccdigit1 = uicc->imsiStr[0]-'0';
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.mccdigit2 = uicc->imsiStr[1]-'0';
|
||||
mm_msg->fgs_identity_response.fgsmobileidentity.suci.mccdigit3 = uicc->imsiStr[2]-'0';
|
||||
memcpy(mm_msg->registration_request.fgsmobileidentity.suci.schemeoutput, uicc->imsiStr+3+uicc->nmc_size, strlen(uicc->imsiStr) - (3+uicc->nmc_size));
|
||||
size += sizeof(Suci5GSMobileIdentity_t);
|
||||
}
|
||||
|
||||
// encode the message
|
||||
@@ -378,7 +374,7 @@ void generateIdentityResponse(as_nas_info_t *initialNasMsg, uint8_t identitytype
|
||||
}
|
||||
|
||||
OctetString knas_int;
|
||||
void generateAuthenticationResp(as_nas_info_t *initialNasMsg, uint8_t *buf){
|
||||
static void generateAuthenticationResp(as_nas_info_t *initialNasMsg, uint8_t *buf, uicc_t *uicc){
|
||||
|
||||
uint8_t ak[6];
|
||||
|
||||
@@ -396,9 +392,9 @@ void generateAuthenticationResp(as_nas_info_t *initialNasMsg, uint8_t *buf){
|
||||
|
||||
uint8_t resTemp[16];
|
||||
uint8_t ck[16], ik[16], output[16];
|
||||
f2345(k, rand, resTemp, ck, ik, ak, opc);
|
||||
f2345(uicc->key, rand, resTemp, ck, ik, ak, uicc->opc);
|
||||
|
||||
transferRES(ck, ik, resTemp, rand, output);
|
||||
transferRES(ck, ik, resTemp, rand, output, uicc);
|
||||
|
||||
// get knas_int
|
||||
knas_int.length = 16;
|
||||
@@ -407,9 +403,9 @@ void generateAuthenticationResp(as_nas_info_t *initialNasMsg, uint8_t *buf){
|
||||
sqn[index] = buf[26+index];
|
||||
}
|
||||
|
||||
derive_kausf(ck, ik, sqn, kausf);
|
||||
derive_kseaf(kausf, kseaf);
|
||||
derive_kamf(kseaf, kamf, 0x0000);
|
||||
derive_kausf(ck, ik, sqn, kausf, uicc);
|
||||
derive_kseaf(kausf, kseaf, uicc);
|
||||
derive_kamf(kseaf, kamf, 0x0000, uicc);
|
||||
derive_knas(0x02, 2, kamf, knas_int.value);
|
||||
|
||||
printf("kausf:");
|
||||
@@ -616,6 +612,19 @@ void generateRegistrationComplete(as_nas_info_t *initialNasMsg, SORTransparentCo
|
||||
}
|
||||
}
|
||||
|
||||
void decodeDownlinkNASTransport(as_nas_info_t *initialNasMsg, uint8_t * pdu_buffer){
|
||||
uint8_t msg_type = *(pdu_buffer + 16);
|
||||
if(msg_type == FGS_PDU_SESSION_ESTABLISHMENT_ACC){
|
||||
sprintf(baseNetAddress, "%d.%d", *(pdu_buffer + 39),*(pdu_buffer + 40));
|
||||
int third_octet = *(pdu_buffer + 41);
|
||||
int fourth_octet = *(pdu_buffer + 42);
|
||||
LOG_I(NAS, "Received PDU Session Establishment Accept\n");
|
||||
nas_config(1,third_octet,fourth_octet,"ue");
|
||||
} else {
|
||||
LOG_E(NAS, "Received unexpected message in DLinformationTransfer %d\n", msg_type);
|
||||
}
|
||||
}
|
||||
|
||||
void generatePduSessionEstablishRequest(as_nas_info_t *initialNasMsg){
|
||||
//wait send RegistrationComplete
|
||||
usleep(100*150);
|
||||
@@ -703,6 +712,7 @@ void generatePduSessionEstablishRequest(as_nas_info_t *initialNasMsg){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void *nas_nrue_task(void *args_p)
|
||||
{
|
||||
MessageDef *msg_p;
|
||||
@@ -722,6 +732,8 @@ void *nas_nrue_task(void *args_p)
|
||||
if (msg_p != NULL) {
|
||||
instance = msg_p->ittiMsgHeader.originInstance;
|
||||
Mod_id = instance ;
|
||||
uicc_t *uicc=checkUicc(Mod_id);
|
||||
|
||||
if (instance == INSTANCE_DEFAULT) {
|
||||
printf("%s:%d: FATAL: instance is INSTANCE_DEFAULT, should not happen.\n",
|
||||
__FILE__, __LINE__);
|
||||
@@ -851,8 +863,7 @@ void *nas_nrue_task(void *args_p)
|
||||
Mod_id,
|
||||
NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.length,
|
||||
NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.data);
|
||||
as_nas_info_t initialNasMsg;
|
||||
memset(&initialNasMsg, 0, sizeof(as_nas_info_t));
|
||||
as_nas_info_t initialNasMsg={0};
|
||||
|
||||
pdu_buffer = NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.data;
|
||||
if((pdu_buffer + 1) != NULL){
|
||||
@@ -869,14 +880,18 @@ void *nas_nrue_task(void *args_p)
|
||||
|
||||
switch(msg_type){
|
||||
case FGS_IDENTITY_REQUEST:
|
||||
generateIdentityResponse(&initialNasMsg,*(pdu_buffer+3));
|
||||
generateIdentityResponse(&initialNasMsg,*(pdu_buffer+3), uicc);
|
||||
break;
|
||||
case FGS_AUTHENTICATION_REQUEST:
|
||||
generateAuthenticationResp(&initialNasMsg, pdu_buffer);
|
||||
generateAuthenticationResp(&initialNasMsg, pdu_buffer, uicc);
|
||||
break;
|
||||
case FGS_SECURITY_MODE_COMMAND:
|
||||
generateSecurityModeComplete(&initialNasMsg);
|
||||
break;
|
||||
case FGS_DOWNLINK_NAS_TRANSPORT:
|
||||
decodeDownlinkNASTransport(&initialNasMsg, pdu_buffer);
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_W(NR_RRC,"unknow message type %d\n",msg_type);
|
||||
break;
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#define FGS_SECURITY_MODE_COMMAND 0b01011101 /* 93 = 0x5d */
|
||||
#define FGS_SECURITY_MODE_COMPLETE 0b01011110 /* 94 = 0x5e */
|
||||
#define FGS_UPLINK_NAS_TRANSPORT 0b01100111 /* 103= 0x67 */
|
||||
#define FGS_DOWNLINK_NAS_TRANSPORT 0b01101000 /* 104= 0x68 */
|
||||
|
||||
// message type for 5GS session management
|
||||
#define FGS_PDU_SESSION_ESTABLISHMENT_REQ 0b11000001 /* 193= 0xc1 */
|
||||
@@ -115,9 +116,7 @@ typedef union {
|
||||
fgs_nas_message_plain_t plain;
|
||||
} fgs_nas_message_t;
|
||||
|
||||
void generateRegistrationRequest(as_nas_info_t *initialNasMsg);
|
||||
void generateIdentityResponse(as_nas_info_t *initialNasMsg, uint8_t identitytype);
|
||||
void generateAuthenticationResp(as_nas_info_t *initialNasMsg, uint8_t *buf);
|
||||
void generateRegistrationRequest(as_nas_info_t *initialNasMsg, int Mod_id);
|
||||
void generateSecurityModeComplete(as_nas_info_t *initialNasMsg);
|
||||
void generateRegistrationComplete(as_nas_info_t *initialNasMsg, SORTransparentContainer *sortransparentcontainer);
|
||||
void generatePduSessionEstablishRequest(as_nas_info_t *initialNasMsg);
|
||||
|
||||
@@ -20,9 +20,11 @@
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
#include <ctype.h>
|
||||
|
||||
#include <openair3/UICC/usim_interface.h>
|
||||
#include <openair3/NAS/COMMON/milenage.h>
|
||||
extern uint16_t NB_UE_INST;
|
||||
|
||||
#define UICC_SECTION "uicc"
|
||||
#define UICC_CONFIG_HELP_OPTIONS " list of comma separated options to interface a simulated (real UICC to be developped). Available options: \n"\
|
||||
@@ -34,18 +36,20 @@
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define UICC_PARAMS_DESC {\
|
||||
{"imsi", "USIM IMSI\n", 0, strptr:&(uicc->imsiStr), defstrval:"", TYPE_STRING, 0 },\
|
||||
{"imsi", "USIM IMSI\n", 0, strptr:&(uicc->imsiStr), defstrval:"2089900007487", TYPE_STRING, 0 },\
|
||||
{"nmc_size" "number of digits in NMC", 0, iptr:&(uicc->nmc_size), defintval:2, TYPE_INT, 0 },\
|
||||
{"key", "USIM Ki\n", 0, strptr:&(uicc->keyStr), defstrval:"", TYPE_STRING, 0 },\
|
||||
{"opc", "USIM OPc\n", 0, strptr:&(uicc->opcStr), defstrval:"", TYPE_STRING, 0 },\
|
||||
{"key", "USIM Ki\n", 0, strptr:&(uicc->keyStr), defstrval:"fec86ba6eb707ed08905757b1bb44b8f", TYPE_STRING, 0 },\
|
||||
{"opc", "USIM OPc\n", 0, strptr:&(uicc->opcStr), defstrval:"c42449363bbad02b66d16bc975d77cc1", TYPE_STRING, 0 },\
|
||||
{"amf", "USIM amf\n", 0, strptr:&(uicc->amfStr), defstrval:"8000", TYPE_STRING, 0 },\
|
||||
{"sqn", "USIM sqn\n", 0, strptr:&(uicc->sqnStr), defstrval:"000000", TYPE_STRING, 0 },\
|
||||
};
|
||||
|
||||
static uicc_t** uiccArray=NULL;
|
||||
|
||||
const char *hexTable="0123456789abcdef";
|
||||
static inline uint8_t mkDigit(unsigned char in) {
|
||||
for (int i=0; i<16; i++)
|
||||
if (in==hexTable[i])
|
||||
if (tolower(in)==hexTable[i])
|
||||
return i;
|
||||
LOG_E(SIM,"Impossible hexa input: %c\n",in);
|
||||
return 0;
|
||||
@@ -65,7 +69,7 @@ uicc_t *init_uicc(char *sectionName) {
|
||||
// we can read the IMSI from the USIM
|
||||
// key, OPc, sqn, amf don't need to be read from the true USIM
|
||||
int ret = config_get( uicc_params,sizeof(uicc_params)/sizeof(paramdef_t),sectionName);
|
||||
AssertFatal(ret >= 0, "configuration couldn't be performed");
|
||||
AssertFatal(ret >= 0, "configuration couldn't be performed for uicc name: %s", sectionName);
|
||||
LOG_I(SIM, "UICC simulation: IMSI=%s, Ki=%s, OPc=%s\n", uicc->imsiStr, uicc->keyStr, uicc->opcStr);
|
||||
to_hex(uicc->keyStr,uicc->key, sizeof(uicc->key) );
|
||||
to_hex(uicc->opcStr,uicc->opc, sizeof(uicc->opc) );
|
||||
@@ -90,3 +94,15 @@ void uicc_milenage_generate(uint8_t *autn, uicc_t *uicc) {
|
||||
log_dump(SIM,autn,sizeof(autn), LOG_DUMP_CHAR,"milenage output autn:");
|
||||
}
|
||||
|
||||
uicc_t * checkUicc(int Mod_id) {
|
||||
AssertFatal(Mod_id < NB_UE_INST, "Mod_id must be less than NB_UE_INST. Mod_id:%d NB_UE_INST:%d", Mod_id,NB_UE_INST);
|
||||
if(uiccArray==NULL){
|
||||
uiccArray=(uicc_t **)calloc(1,sizeof(uicc_t*)*NB_UE_INST);
|
||||
}
|
||||
if (!uiccArray[Mod_id]) {
|
||||
char uiccName[64];
|
||||
sprintf(uiccName,"uicc%d", Mod_id);
|
||||
uiccArray[Mod_id]=(void*)init_uicc(uiccName);
|
||||
}
|
||||
return (uicc_t*) uiccArray[Mod_id];
|
||||
}
|
||||
|
||||
@@ -66,6 +66,8 @@ typedef struct {
|
||||
/*
|
||||
* Read the configuration file, section name variable to be able to manage several UICC
|
||||
*/
|
||||
uicc_t *checkUicc(int Mod_id);
|
||||
uicc_t *init_uicc(char *sectionName);
|
||||
void uicc_milenage_generate(uint8_t * autn, uicc_t *uicc);
|
||||
uicc_t * checkUicc(int Mod_id);
|
||||
#endif
|
||||
|
||||
@@ -409,7 +409,7 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int bearer_id, teid
|
||||
|
||||
inst->te2ue_mapping[incoming_teid].rnti=rnti;
|
||||
|
||||
inst->te2ue_mapping[incoming_teid].rb_id= outgoing_teid;
|
||||
inst->te2ue_mapping[incoming_teid].rb_id= bearer_id;
|
||||
|
||||
inst->te2ue_mapping[incoming_teid].callBack=callBack;
|
||||
|
||||
@@ -441,10 +441,15 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int bearer_id, teid
|
||||
tmp->outgoing_port=port;
|
||||
tmp->teid_outgoing= outgoing_teid;
|
||||
pthread_mutex_unlock(&globGtp.gtp_lock);
|
||||
LOG_I(GTPU, "Created tunnel for RNTI %x, teid for DL: %d, teid for UL %d\n",
|
||||
char ip4[INET_ADDRSTRLEN];
|
||||
char ip6[INET6_ADDRSTRLEN];
|
||||
|
||||
LOG_I(GTPU, "Created tunnel for RNTI %x, teid for DL: %d, teid for UL %d to remote IPv4: %s, IPv6 %s\n",
|
||||
rnti,
|
||||
tmp->teid_incoming,
|
||||
tmp->teid_outgoing);
|
||||
tmp->teid_outgoing,
|
||||
inet_ntop(AF_INET,(void*)&tmp->outgoing_ip_addr, ip4,INET_ADDRSTRLEN ),
|
||||
inet_ntop(AF_INET6,(void*)&tmp->outgoing_ip6_addr.s6_addr, ip6, INET6_ADDRSTRLEN));
|
||||
return incoming_teid;
|
||||
}
|
||||
|
||||
@@ -540,6 +545,7 @@ int gtpv1u_update_ngu_tunnel(
|
||||
const gtpv1u_gnb_create_tunnel_req_t *const create_tunnel_req_pP,
|
||||
const rnti_t prior_rnti
|
||||
) {
|
||||
AssertFatal( false, "to be developped\n");
|
||||
return GTPNOK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user