move common code file in common directory
remove several unused files remove mem_block_t that is never used in a different way than a simple heap buffer move up IP address type and remove duplications of the same struct declaration
This commit is contained in:
+1
-6
@@ -1687,7 +1687,7 @@ set(libnas_ies_OBJS
|
||||
|
||||
set (libnas_utils_OBJS
|
||||
${NAS_SRC}COMMON/UTIL/device.c
|
||||
${NAS_SRC}COMMON/UTIL/memory.c
|
||||
common/utils/mem/memory.c
|
||||
${NAS_SRC}COMMON/UTIL/nas_timer.c
|
||||
${NAS_SRC}COMMON/UTIL/socket.c
|
||||
${NAS_SRC}COMMON/UTIL/stty.c
|
||||
@@ -2052,7 +2052,6 @@ add_executable(nr-softmodem
|
||||
${rrc_h}
|
||||
${nr_rrc_h}
|
||||
${s1ap_h}
|
||||
# ${OPENAIR_BIN_DIR}/messages_xml.h
|
||||
${OPENAIR_DIR}/executables/nr-gnb.c
|
||||
${OPENAIR_DIR}/executables/nr-ru.c
|
||||
${OPENAIR_DIR}/executables/nr-softmodem.c
|
||||
@@ -2121,7 +2120,6 @@ target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
add_executable(nr-uesoftmodem
|
||||
${rrc_h}
|
||||
${s1ap_h}
|
||||
# ${OPENAIR_BIN_DIR}/messages_xml.h
|
||||
${OPENAIR_DIR}/executables/nr-uesoftmodem.c
|
||||
${OPENAIR_DIR}/executables/nr-ue.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
@@ -2439,9 +2437,6 @@ make_driver(nasmesh ${OPENAIR2_DIR}/NETWORK_DRIVER/MESH ${nasmesh_src})
|
||||
# user space tool for configuring MESH IP driver
|
||||
################
|
||||
add_executable(rb_tool
|
||||
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/constant.h
|
||||
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/ioctl.h
|
||||
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/rrc_nas_primitives.h
|
||||
${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/RB_TOOL/rb_tool.c
|
||||
)
|
||||
target_include_directories(rb_tool PRIVATE ${OPENAIR2_DIR}/NETWORK_DRIVER/MESH/)
|
||||
|
||||
@@ -139,7 +139,7 @@ target_include_directories(secu_cn PRIVATE
|
||||
################################################################################
|
||||
set(util_SRC
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/device.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/memory.c
|
||||
${OPENAIR_DIR}/common/utils/mem/memory.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/nas_log.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/nas_timer.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/OctetString.c
|
||||
@@ -149,19 +149,8 @@ set(util_SRC
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/socket.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/stty.c
|
||||
)
|
||||
set(util_HDR
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/device.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/memory.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/nas_log.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/nas_timer.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/OctetString.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/parser.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/TLVDecoder.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/TLVEncoder.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/socket.h
|
||||
)
|
||||
|
||||
add_library(util ${util_SRC} ${util_HDR})
|
||||
add_library(util ${util_SRC})
|
||||
target_include_directories(util PRIVATE ${OPENAIR_NAS_DIR}/COMMON/UTIL
|
||||
${OPENAIR_NAS_DIR}/COMMON
|
||||
)
|
||||
@@ -178,15 +167,7 @@ set(api_user_SRC
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/user_indication.c
|
||||
)
|
||||
|
||||
set(api_user_HDR
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/at_command.h
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/at_error.h
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/at_response.h
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/user_api.h
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/user_indication.h
|
||||
)
|
||||
|
||||
add_library(api_user ${api_user_SRC} ${api_user_HDR})
|
||||
add_library(api_user ${api_user_SRC})
|
||||
target_include_directories(api_user PRIVATE ${OPENAIR_NAS_DIR}/UE/API/USER
|
||||
${OPENAIR_NAS_DIR}/COMMON
|
||||
${OPENAIR_NAS_DIR}/UE
|
||||
@@ -200,13 +181,7 @@ set(api_usim_SRC
|
||||
${OPENAIR_NAS_DIR}/UE/API/USIM/usim_api.c
|
||||
)
|
||||
|
||||
set(api_usim_HDR
|
||||
${OPENAIR_NAS_DIR}/UE/API/USIM/aka_functions.h
|
||||
${OPENAIR_NAS_DIR}/UE/API/USIM/usim_api.h
|
||||
|
||||
)
|
||||
|
||||
add_library(api_usim ${api_usim_SRC} ${api_usim_HDR})
|
||||
add_library(api_usim ${api_usim_SRC})
|
||||
target_include_directories(api_usim PRIVATE ${OPENAIR_NAS_DIR}/UE/API/USIM)
|
||||
|
||||
################################################################################
|
||||
@@ -217,13 +192,8 @@ set(api_network_SRC
|
||||
${OPENAIR_NAS_DIR}/COMMON/API/NETWORK/nas_message.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/API/NETWORK/network_api.c
|
||||
)
|
||||
set(api_network_HDR
|
||||
${OPENAIR_NAS_DIR}/COMMON/API/NETWORK/as_message.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/API/NETWORK/nas_message.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/API/NETWORK/network_api.h
|
||||
)
|
||||
|
||||
add_library(api_network ${api_network_SRC} ${api_network_HDR})
|
||||
add_library(api_network ${api_network_SRC})
|
||||
target_include_directories(api_network PRIVATE ${OPENAIR_NAS_DIR}/COMMON/API/NETWORK
|
||||
${OPENAIR_NAS_DIR}/COMMON
|
||||
)
|
||||
@@ -311,60 +281,7 @@ set(emm_SRC
|
||||
|
||||
)
|
||||
|
||||
set(emm_HDR
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/emmData.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/emm_main.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/emm_proc.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/IdleMode.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/LowerLayer.h
|
||||
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachComplete.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AuthenticationFailure.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AuthenticationReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AuthenticationRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AuthenticationResponse.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/CsServiceNotification.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/DetachAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/DetachRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/DownlinkNasTransport.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/emm_cause.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/EmmInformation.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/emm_msgDef.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/emm_msg.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/EmmStatus.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/ExtendedServiceRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/GutiReallocationCommand.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/GutiReallocationComplete.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/IdentityRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/IdentityResponse.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/NASSecurityModeCommand.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/NASSecurityModeComplete.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/SecurityModeReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/ServiceReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/ServiceRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/TrackingAreaUpdateAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/TrackingAreaUpdateComplete.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/TrackingAreaUpdateReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/TrackingAreaUpdateRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/UplinkNasTransport.h
|
||||
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_asDef.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_as.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_esmDef.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_esm.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_fsm.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_recv.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_regDef.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_reg.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_sap.h
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_send.h
|
||||
|
||||
)
|
||||
|
||||
add_library(emm ${emm_SRC} ${emm_HDR})
|
||||
add_library(emm ${emm_SRC})
|
||||
|
||||
target_include_directories(emm PRIVATE
|
||||
${OPENAIR_DIR}/common/utils
|
||||
@@ -423,41 +340,7 @@ set(esm_SRC
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP/esm_send.c
|
||||
)
|
||||
|
||||
set(esm_HDR
|
||||
${OPENAIR_TARGETS}/COMMON/openairinterface5g_limits.h
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/esm_main.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/BearerResourceAllocationReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/BearerResourceAllocationRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/BearerResourceModificationReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/BearerResourceModificationRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/esm_cause.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/EsmInformationRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/EsmInformationResponse.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/esm_msgDef.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/esm_msg.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/EsmStatus.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ModifyEpsBearerContextReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/PdnConnectivityReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/PdnConnectivityRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/PdnDisconnectReject.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/PdnDisconnectRequest.h
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP/esm_recv.h
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP/esm_sap.h
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP/esm_send.h
|
||||
${OPENAIR_DIR}/common/utils/utils.h
|
||||
)
|
||||
|
||||
add_library(esm ${esm_SRC} ${esm_HDR})
|
||||
add_library(esm ${esm_SRC})
|
||||
|
||||
target_include_directories(esm PRIVATE
|
||||
${OPENAIR_DIR}/common/utils
|
||||
@@ -553,89 +436,8 @@ set(ies_SRC
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/UeSecurityCapability.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.c
|
||||
)
|
||||
set(ies_HDR
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AccessPointName.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AdditionalUpdateResult.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AdditionalUpdateType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ApnAggregateMaximumBitRate.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AuthenticationFailureParameter.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AuthenticationParameterAutn.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AuthenticationParameterRand.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AuthenticationResponseParameter.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/CipheringKeySequenceNumber.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/Cli.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/CsfbResponse.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/DaylightSavingTime.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/DetachType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/DrxParameter.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EmergencyNumberList.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EmmCause.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsAttachResult.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsAttachType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsBearerContextStatus.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsBearerIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsMobileIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsNetworkFeatureSupport.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsQualityOfService.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsUpdateResult.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsUpdateType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EsmCause.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EsmInformationTransferFlag.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EsmMessageContainer.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/GprsTimer.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/GutiType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/IdentityType2.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ImeisvRequest.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/KsiAndSequenceNumber.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LcsClientIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LcsIndicator.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LinkedEpsBearerIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LlcServiceAccessPointIdentifier.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LocationAreaIdentification.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MessageType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MobileIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MobileStationClassmark2.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MobileStationClassmark3.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MsNetworkCapability.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MsNetworkFeatureSupport.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NasKeySetIdentifier.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NasMessageContainer.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NasRequestType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NasSecurityAlgorithms.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NetworkName.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/Nonce.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PacketFlowIdentifier.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PagingIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PdnAddress.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PdnType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PlmnList.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ProcedureTransactionIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ProtocolConfigurationOptions.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ProtocolDiscriminator.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PTmsiSignature.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/QualityOfService.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/RadioPriority.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/SecurityHeaderType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ServiceType.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ShortMac.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/SsCode.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/SupportedCodecList.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TimeZoneAndTime.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TimeZone.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TmsiStatus.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TrackingAreaIdentity.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TrackingAreaIdentityList.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TrafficFlowAggregateDescription.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TrafficFlowTemplate.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TransactionIdentifier.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/UeNetworkCapability.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/UeSecurityCapability.h
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.h
|
||||
|
||||
)
|
||||
|
||||
add_library(ies ${ies_SRC} ${ies_HDR})
|
||||
add_library(ies ${ies_SRC})
|
||||
|
||||
target_include_directories(ies PRIVATE
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES
|
||||
|
||||
@@ -28,24 +28,12 @@ set(CONF2UEDATA_LIB_SRC
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/display.c
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.c
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.c
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.c
|
||||
${OPENAIR_DIR}/common/utils/mem/memory.c
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.c
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/TLVEncoder.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
)
|
||||
|
||||
set(conf2uedata_HDR
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf2uedata.h
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_emm.h
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.h
|
||||
${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.h
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.h
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/nas_log.h
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.h
|
||||
${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/TLVEncoder.h
|
||||
${OPENAIR_DIR}/common/utils/utils.h
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${OPENAIR_DIR}/common/utils
|
||||
${OPENAIR_DIR}/openair3/NAS/UE
|
||||
@@ -65,7 +53,7 @@ set(conf2uedata_SRC
|
||||
${CONF2UEDATA_LIB_SRC}
|
||||
)
|
||||
|
||||
add_executable(conf2uedata ${conf2uedata_SRC} ${conf2uedata_HDR} )
|
||||
add_executable(conf2uedata ${conf2uedata_SRC} )
|
||||
target_link_libraries(conf2uedata ${CONFIG_LIBRARIES})
|
||||
|
||||
# usim binary
|
||||
@@ -76,7 +64,7 @@ set(usim_SRC
|
||||
)
|
||||
|
||||
|
||||
add_executable(usim ${usim_SRC} ${conf2uedata_HDR} )
|
||||
add_executable(usim ${usim_SRC} )
|
||||
target_link_libraries(usim ${CONFIG_LIBRARIES})
|
||||
|
||||
# nvram binary
|
||||
@@ -87,5 +75,5 @@ set(nvram_SRC
|
||||
)
|
||||
|
||||
|
||||
add_executable(nvram ${nvram_SRC} ${conf2uedata_HDR} )
|
||||
add_executable(nvram ${nvram_SRC})
|
||||
target_link_libraries(nvram ${CONFIG_LIBRARIES})
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <platform_types.h>
|
||||
#include "common/platform_types.h"
|
||||
#include "config_userapi.h"
|
||||
#include "config_common.h"
|
||||
#include "../utils/LOG/log.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <errno.h>
|
||||
#include <dlfcn.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <platform_types.h>
|
||||
#include "common/platform_types.h"
|
||||
#include "config_common.h"
|
||||
#include "../utils/LOG/log.h"
|
||||
static int managed_ptr_sz(configmodule_interface_t *cfg, void *ptr)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <dlfcn.h>
|
||||
#include <platform_types.h>
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#define CONFIG_LOADCONFIG_MAIN
|
||||
#include "config_load_configmodule.h"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <errno.h>
|
||||
#include <dlfcn.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <platform_types.h>
|
||||
#include "common/platform_types.h"
|
||||
#include "config_userapi.h"
|
||||
#include "config_common.h"
|
||||
#include "../utils/LOG/log.h"
|
||||
|
||||
@@ -89,7 +89,9 @@
|
||||
#define NUM_MAX_CBA_GROUP 4
|
||||
|
||||
#define printk printf
|
||||
|
||||
#define RETURNok (0)
|
||||
#define RETURNerror (-1)
|
||||
#define DEFAULT_NAS_PATH "PWD"
|
||||
#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE)
|
||||
|
||||
#endif /* __PLATFORM_CONSTANTS_H__ */
|
||||
|
||||
@@ -36,152 +36,153 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// GENERIC ACCESS STRATUM TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef int32_t sdu_size_t;
|
||||
typedef uint32_t frame_t;
|
||||
typedef int32_t sframe_t;
|
||||
typedef uint32_t sub_frame_t;
|
||||
typedef uint32_t slot_t;
|
||||
typedef uint16_t module_id_t;
|
||||
typedef uint8_t slice_id_t;
|
||||
typedef uint8_t eNB_index_t;
|
||||
typedef uint64_t ue_id_t;
|
||||
typedef int16_t smodule_id_t;
|
||||
typedef long rb_id_t;
|
||||
typedef long srb_id_t;
|
||||
typedef int32_t sdu_size_t;
|
||||
typedef uint32_t frame_t;
|
||||
typedef int32_t sframe_t;
|
||||
typedef uint32_t sub_frame_t;
|
||||
typedef uint32_t slot_t;
|
||||
typedef uint16_t module_id_t;
|
||||
typedef uint8_t slice_id_t;
|
||||
typedef uint8_t eNB_index_t;
|
||||
typedef uint64_t ue_id_t;
|
||||
typedef int16_t smodule_id_t;
|
||||
typedef long rb_id_t;
|
||||
typedef long srb_id_t;
|
||||
|
||||
typedef bool MBMS_flag_t;
|
||||
#define MBMS_FLAG_NO false
|
||||
#define MBMS_FLAG_NO false
|
||||
#define MBMS_FLAG_YES true
|
||||
|
||||
typedef bool eNB_flag_t;
|
||||
#define ENB_FLAG_NO false
|
||||
#define ENB_FLAG_NO false
|
||||
#define ENB_FLAG_YES true
|
||||
|
||||
typedef bool gNB_flag_t;
|
||||
#define GNB_FLAG_NO false
|
||||
#define GNB_FLAG_NO false
|
||||
#define GNB_FLAG_YES true
|
||||
|
||||
typedef bool srb_flag_t;
|
||||
#define SRB_FLAG_NO false
|
||||
#define SRB_FLAG_NO false
|
||||
#define SRB_FLAG_YES true
|
||||
|
||||
typedef bool sl_discovery_flag_t;
|
||||
#define SL_DISCOVERY_FLAG_NO false
|
||||
#define SL_DISCOVERY_FLAG_NO false
|
||||
#define SL_DISCOVERY_FLAG_YES true
|
||||
|
||||
typedef enum link_direction_e {
|
||||
UNKNOWN_DIR = 0,
|
||||
DIR_UPLINK = 1,
|
||||
DIR_DOWNLINK = 2
|
||||
} link_direction_t;
|
||||
typedef enum link_direction_e { UNKNOWN_DIR = 0, DIR_UPLINK = 1, DIR_DOWNLINK = 2 } link_direction_t;
|
||||
|
||||
typedef enum rb_type_e {
|
||||
UNKNOWN_RADIO_BEARER = 0,
|
||||
SIGNALLING_RADIO_BEARER = 1,
|
||||
RADIO_ACCESS_BEARER = 2
|
||||
} rb_type_t;
|
||||
typedef enum rb_type_e { UNKNOWN_RADIO_BEARER = 0, SIGNALLING_RADIO_BEARER = 1, RADIO_ACCESS_BEARER = 2 } rb_type_t;
|
||||
|
||||
typedef enum {
|
||||
CR_ROUND = 0,
|
||||
CR_SRB12 = 1,
|
||||
CR_HOL = 2,
|
||||
CR_LC = 3,
|
||||
CR_CQI = 4,
|
||||
CR_LCP = 5,
|
||||
CR_NUM = 6
|
||||
} sorting_criterion_t;
|
||||
typedef enum { CR_ROUND = 0, CR_SRB12 = 1, CR_HOL = 2, CR_LC = 3, CR_CQI = 4, CR_LCP = 5, CR_NUM = 6 } sorting_criterion_t;
|
||||
|
||||
typedef enum {
|
||||
POL_FAIR = 0,
|
||||
POL_GREEDY = 1,
|
||||
POL_NUM = 2
|
||||
} accounting_policy_t;
|
||||
typedef enum { POL_FAIR = 0, POL_GREEDY = 1, POL_NUM = 2 } accounting_policy_t;
|
||||
//-----------------------------------------------------------------------------
|
||||
// PHY TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint8_t crc8_t;
|
||||
typedef uint16_t crc16_t;
|
||||
typedef uint32_t crc32_t;
|
||||
typedef unsigned int crc_t;
|
||||
typedef uint8_t crc8_t;
|
||||
typedef uint16_t crc16_t;
|
||||
typedef uint32_t crc32_t;
|
||||
typedef unsigned int crc_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// MAC TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef sdu_size_t tbs_size_t;
|
||||
typedef sdu_size_t tb_size_t;
|
||||
typedef unsigned int logical_chan_id_t;
|
||||
typedef unsigned int num_tb_t;
|
||||
typedef uint8_t mac_enb_index_t;
|
||||
typedef sdu_size_t tbs_size_t;
|
||||
typedef sdu_size_t tb_size_t;
|
||||
typedef unsigned int logical_chan_id_t;
|
||||
typedef unsigned int num_tb_t;
|
||||
typedef uint8_t mac_enb_index_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// RLC TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef unsigned int mui_t;
|
||||
typedef unsigned int confirm_t;
|
||||
typedef unsigned int rlc_tx_status_t;
|
||||
typedef int16_t rlc_sn_t;
|
||||
typedef uint16_t rlc_usn_t;
|
||||
typedef int32_t rlc_buffer_occupancy_t;
|
||||
typedef signed int rlc_op_status_t;
|
||||
typedef unsigned int mui_t;
|
||||
typedef unsigned int confirm_t;
|
||||
typedef unsigned int rlc_tx_status_t;
|
||||
typedef int16_t rlc_sn_t;
|
||||
typedef uint16_t rlc_usn_t;
|
||||
typedef int32_t rlc_buffer_occupancy_t;
|
||||
typedef signed int rlc_op_status_t;
|
||||
|
||||
#define SDU_CONFIRM_NO false
|
||||
#define SDU_CONFIRM_YES true
|
||||
typedef enum rlc_mode_e { RLC_MODE_NONE = 0, RLC_MODE_AM = 1, RLC_MODE_UM = 2, RLC_MODE_TM = 4 } rlc_mode_t;
|
||||
|
||||
/*! \struct mac_rlc_status_resp_t
|
||||
* \brief Primitive exchanged between RLC and MAC informing about the buffer occupancy of the RLC protocol instance.
|
||||
*/
|
||||
typedef struct {
|
||||
rlc_buffer_occupancy_t bytes_in_buffer; /*!< \brief Bytes buffered in RLC protocol instance. */
|
||||
rlc_buffer_occupancy_t pdus_in_buffer; /*!< \brief Number of PDUs buffered in RLC protocol instance (OBSOLETE). */
|
||||
frame_t head_sdu_creation_time; /*!< \brief Head SDU creation time. */
|
||||
sdu_size_t head_sdu_remaining_size_to_send; /*!< \brief remaining size of sdu: could be the total size or the remaining size of
|
||||
already segmented sdu */
|
||||
bool head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
|
||||
} mac_rlc_status_resp_t;
|
||||
|
||||
#define SDU_CONFIRM_NO false
|
||||
#define SDU_CONFIRM_YES true
|
||||
//-----------------------------------------------------------------------------
|
||||
// PDCP TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint16_t pdcp_sn_t;
|
||||
typedef uint32_t pdcp_hfn_t;
|
||||
typedef int16_t pdcp_hfn_offset_t;
|
||||
typedef uint16_t pdcp_sn_t;
|
||||
typedef uint32_t pdcp_hfn_t;
|
||||
typedef int16_t pdcp_hfn_offset_t;
|
||||
|
||||
typedef enum pdcp_transmission_mode_e {
|
||||
PDCP_TRANSMISSION_MODE_UNKNOWN = 0,
|
||||
PDCP_TRANSMISSION_MODE_CONTROL = 1,
|
||||
PDCP_TRANSMISSION_MODE_DATA = 2,
|
||||
PDCP_TRANSMISSION_MODE_UNKNOWN = 0,
|
||||
PDCP_TRANSMISSION_MODE_CONTROL = 1,
|
||||
PDCP_TRANSMISSION_MODE_DATA = 2,
|
||||
PDCP_TRANSMISSION_MODE_TRANSPARENT = 3
|
||||
} pdcp_transmission_mode_t;
|
||||
//-----------------------------------------------------------------------------
|
||||
// IP DRIVER / PDCP TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint16_t tcp_udp_port_t;
|
||||
typedef enum ip_traffic_type_e {
|
||||
TRAFFIC_IPVX_TYPE_UNKNOWN = 0,
|
||||
TRAFFIC_IPV6_TYPE_UNICAST = 1,
|
||||
TRAFFIC_IPV6_TYPE_MULTICAST = 2,
|
||||
TRAFFIC_IPV6_TYPE_UNKNOWN = 3,
|
||||
TRAFFIC_IPV4_TYPE_UNICAST = 5,
|
||||
TRAFFIC_IPV4_TYPE_MULTICAST = 6,
|
||||
TRAFFIC_IPV4_TYPE_BROADCAST = 7,
|
||||
TRAFFIC_IPV4_TYPE_UNKNOWN = 8,
|
||||
TRAFFIC_PC5S_SIGNALLING = 9,
|
||||
TRAFFIC_PC5S_SESSION_INIT = 10
|
||||
typedef uint16_t tcp_udp_port_t;
|
||||
typedef enum ip_traffic_type_e {
|
||||
TRAFFIC_IPVX_TYPE_UNKNOWN = 0,
|
||||
TRAFFIC_IPV6_TYPE_UNICAST = 1,
|
||||
TRAFFIC_IPV6_TYPE_MULTICAST = 2,
|
||||
TRAFFIC_IPV6_TYPE_UNKNOWN = 3,
|
||||
TRAFFIC_IPV4_TYPE_UNICAST = 5,
|
||||
TRAFFIC_IPV4_TYPE_MULTICAST = 6,
|
||||
TRAFFIC_IPV4_TYPE_BROADCAST = 7,
|
||||
TRAFFIC_IPV4_TYPE_UNKNOWN = 8,
|
||||
TRAFFIC_PC5S_SIGNALLING = 9,
|
||||
TRAFFIC_PC5S_SESSION_INIT = 10
|
||||
} ip_traffic_type_t;
|
||||
|
||||
typedef struct net_ip_address_s {
|
||||
unsigned ipv4: 1;
|
||||
unsigned ipv6: 1;
|
||||
char ipv4_address[16];
|
||||
char ipv6_address[46];
|
||||
} net_ip_address_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// RRC TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint32_t mbms_session_id_t;
|
||||
typedef uint16_t mbms_service_id_t;
|
||||
typedef uint16_t rnti_t;
|
||||
typedef uint8_t rrc_enb_index_t;
|
||||
typedef uint8_t mme_code_t;
|
||||
typedef uint32_t m_tmsi_t;
|
||||
typedef uint32_t mbms_session_id_t;
|
||||
typedef uint16_t mbms_service_id_t;
|
||||
typedef uint16_t rnti_t;
|
||||
typedef uint8_t rrc_enb_index_t;
|
||||
typedef uint8_t mme_code_t;
|
||||
typedef uint32_t m_tmsi_t;
|
||||
|
||||
//Random UE identity length = 40 bits
|
||||
#define NOT_A_RANDOM_UE_IDENTITY (uint64_t)0xFFFFFFFF
|
||||
#define NOT_A_RNTI (rnti_t)0
|
||||
#define M_RNTI (rnti_t)0xFFFD
|
||||
#define P_RNTI (rnti_t)0xFFFE
|
||||
#define SI_RNTI (rnti_t)0xFFFF
|
||||
#define CBA_RNTI (rnti_t)0xfff4
|
||||
// Random UE identity length = 40 bits
|
||||
#define NOT_A_RANDOM_UE_IDENTITY (uint64_t)0xFFFFFFFF
|
||||
#define NOT_A_RNTI (rnti_t)0
|
||||
#define M_RNTI (rnti_t)0xFFFD
|
||||
#define P_RNTI (rnti_t)0xFFFE
|
||||
#define SI_RNTI (rnti_t)0xFFFF
|
||||
#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,
|
||||
CONFIG_ACTION_REMOVE = 2,
|
||||
CONFIG_ACTION_MODIFY = 3,
|
||||
CONFIG_ACTION_NULL = 0,
|
||||
CONFIG_ACTION_ADD = 1,
|
||||
CONFIG_ACTION_REMOVE = 2,
|
||||
CONFIG_ACTION_MODIFY = 3,
|
||||
CONFIG_ACTION_SET_SECURITY_MODE = 4,
|
||||
CONFIG_ACTION_MBMS_ADD = 10,
|
||||
CONFIG_ACTION_MBMS_MODIFY = 11
|
||||
CONFIG_ACTION_MBMS_ADD = 10,
|
||||
CONFIG_ACTION_MBMS_MODIFY = 11
|
||||
} config_action_t;
|
||||
|
||||
/* Maximum size of any message we might send or receive (e.g., via a socket) */
|
||||
@@ -195,10 +196,9 @@ typedef struct nsa_msg_t {
|
||||
//-----------------------------------------------------------------------------
|
||||
// GTPV1U TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint32_t teid_t; // tunnel endpoint identifier
|
||||
typedef uint8_t ebi_t; // eps bearer id
|
||||
typedef uint8_t pdusessionid_t;
|
||||
|
||||
typedef uint32_t teid_t; // tunnel endpoint identifier
|
||||
typedef uint8_t ebi_t; // eps bearer id
|
||||
typedef uint8_t pdusessionid_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
@@ -207,42 +207,39 @@ typedef uint8_t pdusessionid_t;
|
||||
typedef intptr_t instance_t;
|
||||
|
||||
typedef struct protocol_ctxt_s {
|
||||
module_id_t module_id; /*!< \brief Virtualized module identifier */
|
||||
eNB_flag_t enb_flag; /*!< \brief Flag to indicate eNB (1) or UE (0) */
|
||||
instance_t instance; /*!< \brief ITTI or OTG module identifier */
|
||||
module_id_t module_id; /*!< \brief Virtualized module identifier */
|
||||
eNB_flag_t enb_flag; /*!< \brief Flag to indicate eNB (1) or UE (0) */
|
||||
instance_t instance; /*!< \brief ITTI or OTG module identifier */
|
||||
ue_id_t rntiMaybeUEid;
|
||||
frame_t frame; /*!< \brief LTE frame number.*/
|
||||
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
|
||||
eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */
|
||||
bool brOption;
|
||||
frame_t frame; /*!< \brief LTE frame number.*/
|
||||
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
|
||||
eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */
|
||||
bool brOption;
|
||||
} protocol_ctxt_t;
|
||||
// warning time hardcoded
|
||||
#define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe)
|
||||
#define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame * 10 + (CtXt_h)->subframe)
|
||||
|
||||
#define UE_MODULE_ID_TO_INSTANCE(mODULE_iD) mODULE_iD + RC.nb_inst
|
||||
#define ENB_MODULE_ID_TO_INSTANCE( mODULE_iD ) mODULE_iD
|
||||
#define ENB_MODULE_ID_TO_INSTANCE(mODULE_iD) mODULE_iD
|
||||
#define UE_INSTANCE_TO_MODULE_ID(iNSTANCE) iNSTANCE - RC.nb_inst
|
||||
#define ENB_INSTANCE_TO_MODULE_ID( iNSTANCE )iNSTANCE
|
||||
#define ENB_INSTANCE_TO_MODULE_ID(iNSTANCE) iNSTANCE
|
||||
|
||||
//NR
|
||||
// NR
|
||||
#define GNB_MODULE_ID_TO_INSTANCE(mODULE_iD) mODULE_iD
|
||||
|
||||
#define MODULE_ID_TO_INSTANCE(mODULE_iD, iNSTANCE, eNB_fLAG) \
|
||||
do { \
|
||||
#define MODULE_ID_TO_INSTANCE(mODULE_iD, iNSTANCE, eNB_fLAG) \
|
||||
do { \
|
||||
iNSTANCE = eNB_fLAG == ENB_FLAG_YES ? ENB_MODULE_ID_TO_INSTANCE(mODULE_iD) : UE_MODULE_ID_TO_INSTANCE(mODULE_iD); \
|
||||
} while (0)
|
||||
|
||||
#define INSTANCE_TO_MODULE_ID(iNSTANCE, mODULE_iD, eNB_fLAG) \
|
||||
do { \
|
||||
#define INSTANCE_TO_MODULE_ID(iNSTANCE, mODULE_iD, eNB_fLAG) \
|
||||
do { \
|
||||
mODULE_iD = eNB_fLAG == ENB_FLAG_YES ? ENB_INSTANCE_TO_MODULE_ID(iNSTANCE) : UE_INSTANCE_TO_MODULE_ID(iNSTANCE); \
|
||||
} while (0)
|
||||
|
||||
#define PROTOCOL_CTXT_COMPUTE_MODULE_ID(CtXt_h) \
|
||||
INSTANCE_TO_MODULE_ID( (CtXt_h)->instance , (CtXt_h)->module_id , (CtXt_h)->enb_flag )
|
||||
#define PROTOCOL_CTXT_COMPUTE_MODULE_ID(CtXt_h) INSTANCE_TO_MODULE_ID((CtXt_h)->instance, (CtXt_h)->module_id, (CtXt_h)->enb_flag)
|
||||
|
||||
|
||||
#define PROTOCOL_CTXT_COMPUTE_INSTANCE(CtXt_h) \
|
||||
MODULE_ID_TO_INSTANCE( (CtXt_h)->module_id , (CtXt_h)->instance , (CtXt_h)->enb_flag )
|
||||
#define PROTOCOL_CTXT_COMPUTE_INSTANCE(CtXt_h) MODULE_ID_TO_INSTANCE((CtXt_h)->module_id, (CtXt_h)->instance, (CtXt_h)->enb_flag)
|
||||
|
||||
#define PROTOCOL_CTXT_SET_BY_MODULE_ID(Ctxt_Pp, mODULE_iD, eNB_fLAG, rNTI, fRAME, sUBfRAME, eNB_iNDEX) \
|
||||
do { \
|
||||
@@ -252,7 +249,7 @@ typedef struct protocol_ctxt_s {
|
||||
(Ctxt_Pp)->frame = fRAME; \
|
||||
(Ctxt_Pp)->subframe = sUBfRAME; \
|
||||
(Ctxt_Pp)->eNB_index = eNB_iNDEX; \
|
||||
(Ctxt_Pp)->brOption = false; /* set a default value */ \
|
||||
(Ctxt_Pp)->brOption = false; /* set a default value */ \
|
||||
PROTOCOL_CTXT_COMPUTE_INSTANCE(Ctxt_Pp); \
|
||||
} while (0)
|
||||
|
||||
@@ -263,22 +260,23 @@ typedef struct protocol_ctxt_s {
|
||||
(Ctxt_Pp)->rntiMaybeUEid = rNTI; \
|
||||
(Ctxt_Pp)->frame = fRAME; \
|
||||
(Ctxt_Pp)->subframe = sUBfRAME; \
|
||||
(Ctxt_Pp)->eNB_index = 0; /* set a default value */ \
|
||||
(Ctxt_Pp)->brOption = false; /* set a default value */ \
|
||||
(Ctxt_Pp)->eNB_index = 0; /* set a default value */ \
|
||||
(Ctxt_Pp)->brOption = false; /* set a default value */ \
|
||||
PROTOCOL_CTXT_COMPUTE_MODULE_ID(Ctxt_Pp); \
|
||||
} while (0)
|
||||
|
||||
#define PROTOCOL_CTXT_FMT "[FRAME %05u][%s][MOD %02d][RNTI %" PRIx64 "]"
|
||||
#define PROTOCOL_CTXT_ARGS(CTXT_Pp) (CTXT_Pp)->frame, ((CTXT_Pp)->enb_flag == ENB_FLAG_YES) ? "eNB" : " UE", (CTXT_Pp)->module_id, (CTXT_Pp)->rntiMaybeUEid
|
||||
#define PROTOCOL_CTXT_ARGS(CTXT_Pp) \
|
||||
(CTXT_Pp)->frame, ((CTXT_Pp)->enb_flag == ENB_FLAG_YES) ? "eNB" : " UE", (CTXT_Pp)->module_id, (CTXT_Pp)->rntiMaybeUEid
|
||||
|
||||
#define PROTOCOL_NR_CTXT_ARGS(CTXT_Pp) (CTXT_Pp)->frame, ((CTXT_Pp)->enb_flag == GNB_FLAG_YES) ? "gNB" : " UE", (CTXT_Pp)->module_id, (CTXT_Pp)->rntiMaybeUEid
|
||||
#define PROTOCOL_NR_CTXT_ARGS(CTXT_Pp) \
|
||||
(CTXT_Pp)->frame, ((CTXT_Pp)->enb_flag == GNB_FLAG_YES) ? "gNB" : " UE", (CTXT_Pp)->module_id, (CTXT_Pp)->rntiMaybeUEid
|
||||
|
||||
#define CHECK_CTXT_ARGS(CTXT_Pp)
|
||||
|
||||
#define exit_fun(msg) exit_function(__FILE__, __FUNCTION__, __LINE__, "exit_fun", OAI_EXIT_NORMAL)
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#endif
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert);
|
||||
#ifdef __cplusplus
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <platform_types.h>
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#define OAI_EXIT_NORMAL 0
|
||||
#define OAI_EXIT_ASSERT 1
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
*
|
||||
* In code:
|
||||
* ```
|
||||
* set_log(ASN1, OAI_INFO); // enable logging
|
||||
* set_log(ASN1, OAILOG_INFO); // enable logging
|
||||
* // do your encoding here
|
||||
* set_log(ASN1, OAI_ERR); // disable logging
|
||||
* set_log(ASN1, OAILOG_ERR); // disable logging
|
||||
* ```
|
||||
*
|
||||
* in gdb:
|
||||
|
||||
@@ -19,42 +19,11 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
Source memory.c
|
||||
|
||||
Version 0.1
|
||||
|
||||
Date 2012/10/09
|
||||
|
||||
Product NAS stack
|
||||
|
||||
Subsystem Utilities
|
||||
|
||||
Author Frederic Maurel
|
||||
|
||||
Description Memory access utilities
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#include "memory.h"
|
||||
#include "commonDef.h"
|
||||
#include "nas_log.h"
|
||||
|
||||
#include <stdio.h> // fopen, fread, fclose
|
||||
#include <stdlib.h> // getenv, malloc, free
|
||||
#include <string.h> // strlen
|
||||
|
||||
/****************************************************************************/
|
||||
/**************** E X T E R N A L D E F I N I T I O N S ****************/
|
||||
/****************************************************************************/
|
||||
|
||||
/****************************************************************************/
|
||||
/******************* L O C A L D E F I N I T I O N S *******************/
|
||||
/****************************************************************************/
|
||||
|
||||
/****************************************************************************/
|
||||
/****************** E X P O R T E D F U N C T I O N S ******************/
|
||||
/****************************************************************************/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "common/utils/mem/oai_memory.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
/****************************************************************************
|
||||
** **
|
||||
@@ -85,13 +54,12 @@ char* memory_get_path(const char* dirname, const char* filename)
|
||||
}
|
||||
|
||||
if (path == NULL) {
|
||||
LOG_TRACE(WARNING, "MEMORY - %s and %s environment variables are not defined trying local directory", dirname, DEFAULT_NAS_PATH);
|
||||
path = ".";
|
||||
}
|
||||
|
||||
/* Append non-volatile data file name */
|
||||
size_t size = strlen(path) + strlen(filename) + 1;
|
||||
char* data_filename = (char*)malloc(size+1);
|
||||
char* data_filename = (char*)malloc(size + 1);
|
||||
|
||||
if (data_filename != NULL) {
|
||||
if (size != sprintf(data_filename, "%s/%s", path, filename)) {
|
||||
@@ -114,19 +82,17 @@ char* memory_get_path_from_ueid(const char* dirname, const char* filename, int u
|
||||
}
|
||||
|
||||
if (path == NULL) {
|
||||
LOG_TRACE(WARNING, "MEMORY - %s and %s environment variables are not defined trying local directory", dirname, DEFAULT_NAS_PATH);
|
||||
path = ".";
|
||||
}
|
||||
|
||||
/* Append non-volatile data file name */
|
||||
if ( snprintf(buffer, sizeof(buffer), "%s/%s%d", path, filename, ueid) < 0 ) {
|
||||
if (snprintf(buffer, sizeof(buffer), "%s/%s%d", path, filename, ueid) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return strdup(buffer);
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
** **
|
||||
** Name: memory_read() **
|
||||
@@ -201,8 +167,3 @@ int memory_write(const char* datafile, const void* data, size_t size)
|
||||
|
||||
return (rc);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/********************* L O C A L F U N C T I O N S *********************/
|
||||
/****************************************************************************/
|
||||
|
||||
@@ -19,42 +19,21 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
Source memory.h
|
||||
|
||||
Version 0.1
|
||||
|
||||
Date 2012/10/09
|
||||
|
||||
Product NAS stack
|
||||
|
||||
Subsystem Utilities
|
||||
|
||||
Author Frederic Maurel
|
||||
|
||||
Description Memory access utilities
|
||||
|
||||
*****************************************************************************/
|
||||
#ifndef __MEMORY_H__
|
||||
#define __MEMORY_H__
|
||||
|
||||
#include <stddef.h> // size_t
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "common/platform_constants.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/****************************************************************************/
|
||||
/********************* G L O B A L C O N S T A N T S *******************/
|
||||
/****************************************************************************/
|
||||
typedef unsigned char uint8_t;
|
||||
|
||||
/****************************************************************************/
|
||||
/************************ G L O B A L T Y P E S ************************/
|
||||
/****************************************************************************/
|
||||
|
||||
/****************************************************************************/
|
||||
/******************** G L O B A L V A R I A B L E S ********************/
|
||||
/****************************************************************************/
|
||||
|
||||
/****************************************************************************/
|
||||
/****************** E X P O R T E D F U N C T I O N S ******************/
|
||||
/****************************************************************************/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
char* memory_get_path(const char* dirname, const char* filename);
|
||||
|
||||
@@ -64,4 +43,7 @@ int memory_read(const char* datafile, void* data, size_t size);
|
||||
|
||||
int memory_write(const char* datafile, const void* data, size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MEMORY_H__*/
|
||||
@@ -59,29 +59,6 @@ typedef struct timer_elm_s {
|
||||
static int nb_queues=0;
|
||||
static pthread_mutex_t lock_nb_queues;
|
||||
|
||||
void *pool_buffer_init (void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *pool_buffer_clean (void *arg) {
|
||||
//-----------------------------------------------------------------------------
|
||||
return 0;
|
||||
}
|
||||
|
||||
void free_mem_block (mem_block_t *leP, const char *caller) {
|
||||
AssertFatal(leP!=NULL,"");
|
||||
free(leP);
|
||||
}
|
||||
|
||||
mem_block_t *get_free_mem_block (uint32_t sizeP, const char *caller) {
|
||||
mem_block_t *ptr=(mem_block_t *)malloc(sizeP+sizeof(mem_block_t));
|
||||
ptr->next = NULL;
|
||||
ptr->previous = NULL;
|
||||
ptr->data=((unsigned char *)ptr)+sizeof(mem_block_t);
|
||||
ptr->size=sizeP;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size) {
|
||||
void *ptr = NULL;
|
||||
AssertFatal ((ptr=calloc (size, 1)) != NULL, "Memory allocation of %zu bytes failed (%d -> %d)!\n",
|
||||
|
||||
@@ -26,9 +26,8 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/epoll.h>
|
||||
|
||||
#include <mem_block.h>
|
||||
#include <assertions.h>
|
||||
|
||||
#include "common/utils/mem/oai_memory.h"
|
||||
|
||||
typedef enum timer_type_s {
|
||||
TIMER_PERIODIC,
|
||||
@@ -62,7 +61,6 @@ typedef struct itti_lte_time_s {
|
||||
uint8_t slot;
|
||||
} itti_lte_time_t;
|
||||
|
||||
|
||||
typedef struct IttiMsgEmpty_s {
|
||||
// This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++
|
||||
// To be removed if the structure is filled
|
||||
@@ -552,7 +550,6 @@ void itti_set_task_real_time(task_id_t task_id);
|
||||
void itti_send_terminate_message(task_id_t task_id);
|
||||
|
||||
void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size);
|
||||
int memory_read(const char *datafile, void *data, size_t size);
|
||||
int itti_free(task_id_t task_id, void *ptr);
|
||||
|
||||
int itti_init(task_id_t task_max, const task_info_t *tasks_info);
|
||||
|
||||
+3
-4
@@ -1337,9 +1337,9 @@ INPUT = \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/nas_timer.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/TLVDecoder.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/nas_timer.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/memory.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../common/utils/mem/memory.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/OctetString.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/memory.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../common/utils/mem/oai_memory.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/TLVDecoder.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/nas_log.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/TLVEncoder.h \
|
||||
@@ -1771,7 +1771,6 @@ INPUT = \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OTG/otg_models.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OTG/otg_externs.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OTG/otg_config.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/MEM/mem_block.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/MATH/oml.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/MATH/oml.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_ue_context_management.c \
|
||||
@@ -1836,7 +1835,7 @@ INPUT = \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/udp_messages_def.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/nas_messages_types.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/sctp_messages_types.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/platform_types.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../common/platform_types.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/ngap_messages_types.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/gtpv1_u_messages_types.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/rlc_messages_types.h \
|
||||
|
||||
@@ -71,7 +71,7 @@ rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const pc,
|
||||
const mui_t mui,
|
||||
const confirm_t c,
|
||||
const sdu_size_t size,
|
||||
mem_block_t *const buf,
|
||||
uint8_t *const buf,
|
||||
const uint32_t *const a,
|
||||
const uint32_t *const b)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <pthread.h>
|
||||
|
||||
#include "stddef.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "fapi_nr_ue_constants.h"
|
||||
#include "PHY/impl_defs_top.h"
|
||||
#include "PHY/impl_defs_nr.h"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "pnf.h"
|
||||
|
||||
# if 1 // for hard-code (remove later)
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "common/ran_context.h"
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//#include "PHY/defs_nb_iot.h"
|
||||
#include "PHY/LTE_TRANSPORT/dci_NB_IoT.h"
|
||||
#include "PHY/impl_defs_lte_NB_IoT.h"
|
||||
#include "openair2/COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
//#include "dci.h"
|
||||
#include "PHY/LTE_TRANSPORT/uci_NB_IoT.h"
|
||||
//#include "dci.h"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
NB-IoT transport channel procedures for NB-IoT are here
|
||||
@@ -119,7 +119,7 @@ static inline void* malloc16_clear( size_t size )
|
||||
#include "PHY/CODING/defs_NB_IoT.h"
|
||||
#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
|
||||
//#include "PHY/TOOLS/defs.h"
|
||||
//#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
///#include "openair1/PHY/LTE_TRANSPORT/defs_nb_iot.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////#ifdef OPENAIR_LTE (check if this is required)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#include "time_meas.h"
|
||||
#include "PHY/CODING/coding_defs.h"
|
||||
#include "PHY/TOOLS/tools_defs.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "PHY/LTE_UE_TRANSPORT/transport_ue.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_eNB.h" // for SIC
|
||||
#include <pthread.h>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
//#include <complex.h>
|
||||
#include "time_meas.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#define MAX_NUM_RU_PER_eNB 64
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
#include "time_meas.h"
|
||||
//#include "PHY/CODING/coding_defs.h"
|
||||
#include "PHY/TOOLS/tools_defs.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_common.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_eNB.h"
|
||||
#include "openair2/PHY_INTERFACE/IF_Module.h"
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
#include "time_meas.h"
|
||||
#include "PHY/CODING/coding_defs.h"
|
||||
#include "PHY/TOOLS/tools_defs.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "NR_UE_TRANSPORT/nr_transport_ue.h"
|
||||
|
||||
#if defined(UPGRADE_RAT_NR)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
213 procedures for NB-IoT eNB
|
||||
@@ -1 +0,0 @@
|
||||
213/214 procedures for NR gNB
|
||||
@@ -1 +0,0 @@
|
||||
213/214 procedures for NR UE
|
||||
@@ -1,12 +0,0 @@
|
||||
SIMULATION_OBJS = $(TOP_DIR)/SIMULATION/TOOLS/gauss.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/random_channel.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/rangen_double.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/taus.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/multipath_channel.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/multipath_tv_channel.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/abstraction.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/rf.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/adc.o
|
||||
SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/dac.o
|
||||
#SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/LTE_PHY/openair_hw.o
|
||||
|
||||
@@ -42,36 +42,9 @@ Description Contains global common definitions
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define NAS_UE_ID_FMT "0x%06x"
|
||||
|
||||
/****************************************************************************/
|
||||
/********************* G L O B A L C O N S T A N T S *******************/
|
||||
/****************************************************************************/
|
||||
|
||||
#define RETURNok (0)
|
||||
#define RETURNerror (-1)
|
||||
|
||||
/*
|
||||
* Name of the environment variable which defines the default directory
|
||||
* where the NAS application is executed and where are located files
|
||||
* where non-volatile data are stored
|
||||
*/
|
||||
#define DEFAULT_NAS_PATH "PWD"
|
||||
|
||||
/****************************************************************************/
|
||||
/************************ G L O B A L T Y P E S ************************/
|
||||
/****************************************************************************/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Standard data type definitions
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
typedef int8_t SByte_t; /* 8 bit signed integer */
|
||||
#include "common/platform_constants.h"
|
||||
typedef uint8_t Byte_t; /* 8 bit unsigned integer */
|
||||
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Common NAS data type definitions
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#define E1AP_BEARER_CONTEXT_RELEASE_CMD(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_release_cmd
|
||||
#define E1AP_BEARER_CONTEXT_RELEASE_CPLT(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_release_cplt
|
||||
|
||||
typedef f1ap_net_ip_address_t e1ap_net_ip_address_t;
|
||||
typedef net_ip_address_t e1ap_net_ip_address_t;
|
||||
|
||||
typedef struct PLMN_ID_s {
|
||||
int mcc;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "openair2/COMMON/f1ap_messages_types.h"
|
||||
/* To setup F1 at DU */
|
||||
MESSAGE_DEF(F1AP_DU_REGISTER_REQ, MESSAGE_PRIORITY_MED, f1ap_du_register_req_t, f1ap_du_register_req)
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "rlc.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
#include "ngap_messages_types.h"
|
||||
|
||||
@@ -75,12 +74,7 @@
|
||||
#define F1AP_MAX_NO_OF_TNL_ASSOCIATIONS 32
|
||||
#define F1AP_MAX_NO_UE_ID 1024
|
||||
|
||||
typedef struct f1ap_net_ip_address_s {
|
||||
unsigned ipv4:1;
|
||||
unsigned ipv6:1;
|
||||
char ipv4_address[16];
|
||||
char ipv6_address[46];
|
||||
} f1ap_net_ip_address_t;
|
||||
typedef net_ip_address_t f1ap_net_ip_address_t;
|
||||
|
||||
typedef struct f1ap_net_config_t {
|
||||
f1ap_net_ip_address_t CU_f1_ip_address;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#define __MAC_RRC_PRIMITIVES_H__
|
||||
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "openair2/RRC/LTE/rrc_defs.h"
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#ifndef NGAP_MESSAGES_TYPES_H_
|
||||
#define NGAP_MESSAGES_TYPES_H_
|
||||
#include "common/platform_constants.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/ngran_types.h"
|
||||
#include "LTE_asn_constant.h"
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef RAL_MESSAGES_TYPES_H_
|
||||
#define RAL_MESSAGES_TYPES_H_
|
||||
#include "asn_constant.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "commonDef.h"
|
||||
/* 802.21 mappings with the RRC protocol :
|
||||
(Research Report RR-12-265 Mapping of IEEE 802.21 MIH primitives to EPS/LTE protocols March 13 th, 2012, Michelle WETTERWALD, Prof. Christian BONNET )
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#ifndef RRC_MESSAGES_TYPES_H_
|
||||
#define RRC_MESSAGES_TYPES_H_
|
||||
|
||||
#include "common/utils/mem/oai_memory.h"
|
||||
#include "as_message.h"
|
||||
#include "rrc_types.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "NR_RACH-ConfigCommon.h"
|
||||
#include "NR_ServingCellConfigCommon.h"
|
||||
#include "NR_ServingCellConfig.h"
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Messages for RRC logging
|
||||
#if defined(DISABLE_ITTI_XER_PRINT)
|
||||
@@ -417,7 +418,7 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
|
||||
typedef struct NRDuDlReq_s {
|
||||
rnti_t rnti;
|
||||
mem_block_t * buf;
|
||||
uint8_t *buf;
|
||||
uint64_t srb_id;
|
||||
} NRDuDlReq_t;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "common/platform_types.h"
|
||||
#include "LTE_asn_constant.h"
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Defines to access message fields.
|
||||
@@ -113,13 +114,6 @@ typedef enum cn_domain_s {
|
||||
CN_DOMAIN_CS = 2
|
||||
} cn_domain_t;
|
||||
|
||||
typedef struct net_ip_address_s {
|
||||
unsigned ipv4:1;
|
||||
unsigned ipv6:1;
|
||||
char ipv4_address[16];
|
||||
char ipv6_address[46];
|
||||
} net_ip_address_t;
|
||||
|
||||
typedef uint64_t bitrate_t;
|
||||
|
||||
typedef struct ambr_s {
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
#define ENB_APP_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "platform_types.h"
|
||||
|
||||
#include "common/platform_types.h"
|
||||
|
||||
void *eNB_app_task(void *args_p);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <libconfig.h>
|
||||
|
||||
#include "commonDef.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
#include "f1ap_default_values.h"
|
||||
|
||||
#include "conversions.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "intertask_interface.h"
|
||||
#include "sctp_messages_types.h"
|
||||
|
||||
@@ -270,8 +270,8 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, sctp_assoc_t assoc_id
|
||||
ctxt.rntiMaybeUEid = cu_ue_f1ap_id;
|
||||
ctxt.enb_flag = 1;
|
||||
ctxt.eNB_index = 0;
|
||||
mem_block_t *mb = get_free_mem_block(ie->value.choice.RRCContainer.size,__func__);
|
||||
memcpy((void *)mb->data,(void *)ie->value.choice.RRCContainer.buf,ie->value.choice.RRCContainer.size);
|
||||
uint8_t *mb = malloc16(ie->value.choice.RRCContainer.size);
|
||||
memcpy(mb, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
|
||||
LOG_D(F1AP, "Calling pdcp_data_ind for UE RNTI %lx srb_id %lu with size %ld (DCCH) \n", ctxt.rntiMaybeUEid, srb_id, ie->value.choice.RRCContainer.size);
|
||||
//for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
|
||||
// printf("%02x ", mb->data[i]);
|
||||
|
||||
@@ -123,7 +123,6 @@ void *F1AP_CU_task(void *arg) {
|
||||
int result;
|
||||
LOG_I(F1AP, "Starting F1AP at CU\n");
|
||||
// no RLC in CU, initialize mem pool for PDCP
|
||||
pool_buffer_init();
|
||||
itti_mark_task_ready(TASK_CU_F1);
|
||||
eth_params_t *IPaddrs;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||
#include <openair3/ocp-gtpu/gtp_itf.h>
|
||||
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
|
||||
|
||||
bool DURecvCb(protocol_ctxt_t *ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
@@ -51,8 +52,8 @@ bool DURecvCb(protocol_ctxt_t *ctxt_pP,
|
||||
const uint32_t *destinationL2Id)
|
||||
{
|
||||
// The buffer comes from the stack in gtp-u thread, we have a make a separate buffer to enqueue in a inter-thread message queue
|
||||
mem_block_t *sdu=get_free_mem_block(sdu_buffer_sizeP, __func__);
|
||||
memcpy(sdu->data, sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
uint8_t *sdu = malloc16(sdu_buffer_sizeP);
|
||||
memcpy(sdu, sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
du_rlc_data_req(ctxt_pP, srb_flagP, false, rb_idP, muiP, confirmP, sdu_buffer_sizeP, sdu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <libconfig.h>
|
||||
|
||||
#include "commonDef.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* @ingroup _mac
|
||||
*/
|
||||
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
//#include "RadioResourceConfigCommonSIB.h"
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
#include "SCHED_UE/sched_UE.h"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
#include "assertions.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h"
|
||||
#include "LAYER2/MAC/defs_NB_IoT.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "openair2/RRC/LTE/defs_NB_IoT.h"
|
||||
/** \addtogroup _mac
|
||||
* @{
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
/* IF */
|
||||
#include "NR_IF_Module.h"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "nr_rlc/nr_rlc_oai_api.h"
|
||||
#include "RRC/NR_UE/rrc_proto.h"
|
||||
#include <pthread.h>
|
||||
|
||||
#include "openair2/LAYER2/RLC/rlc.h"
|
||||
static NR_UE_MAC_INST_t *nr_ue_mac_inst;
|
||||
|
||||
void send_srb0_rrc(int rnti, const uint8_t *sdu, sdu_size_t sdu_len, void *data)
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
|
||||
#include <executables/softmodem-common.h>
|
||||
#include "openair2/LAYER2/RLC/rlc.h"
|
||||
|
||||
int16_t get_prach_tx_power(module_id_t mod_id) {
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* \version
|
||||
*/
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "uper_decoder.h"
|
||||
|
||||
/* MAC */
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
/* rlc */
|
||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h"
|
||||
#include "openair2/LAYER2/RLC/rlc.h"
|
||||
|
||||
#include <executables/softmodem-common.h>
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "NR_MAC_gNB/nr_mac_gNB.h"
|
||||
#include "NR_MAC_COMMON/nr_mac_extern.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
|
||||
/*NFAPI*/
|
||||
#include "nfapi_nr_interface.h"
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
|
||||
#include "executables/nr-softmodem.h"
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <openair2/UTIL/OPT/opt.h>
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
|
||||
#include "LAYER2/nr_rlc/nr_rlc_oai_api.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
|
||||
//#define SRS_IND_DEBUG
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef MAC_RRC_DL_HANDLER_H
|
||||
#define MAC_RRC_DL_HANDLER_H
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "f1ap_messages_types.h"
|
||||
|
||||
void f1_setup_response(const f1ap_setup_resp_t *resp);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef MAC_RRC_UL_H
|
||||
#define MAC_RRC_UL_H
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "f1ap_messages_types.h"
|
||||
|
||||
typedef void (*f1_setup_request_func_t)(const f1ap_setup_req_t* req);
|
||||
|
||||
@@ -208,7 +208,7 @@ uint64_t get_pdcp_optmask(void) {
|
||||
* If PDCP_UNIT_TEST is set here then data flow between PDCP and RLC is broken
|
||||
* and PDCP has no longer anything to do with RLC. In this case, after it's handed
|
||||
* an SDU it appends PDCP header and returns (by filling in incoming pointer parameters)
|
||||
* this mem_block_t to be dissected for testing purposes. For further details see test
|
||||
* this uint8_t to be dissected for testing purposes. For further details see test
|
||||
* code at targets/TEST/PDCP/test_pdcp.c:test_pdcp_data_req()
|
||||
*/
|
||||
bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
@@ -229,7 +229,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
uint8_t pdcp_tailer_len = 0;
|
||||
uint16_t pdcp_pdu_size = 0;
|
||||
uint16_t current_sn = 0;
|
||||
mem_block_t *pdcp_pdu_p = NULL;
|
||||
uint8_t *pdcp_pdu_p = NULL;
|
||||
rlc_op_status_t rlc_status;
|
||||
bool ret = true;
|
||||
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
@@ -288,16 +288,14 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
|
||||
if (modeP == PDCP_TRANSMISSION_MODE_TRANSPARENT) {
|
||||
LOG_D(PDCP, " [TM] Asking for a new mem_block of size %d\n",sdu_buffer_sizeP);
|
||||
pdcp_pdu_p = get_free_mem_block(sdu_buffer_sizeP, __func__);
|
||||
pdcp_pdu_p = malloc16(sdu_buffer_sizeP);
|
||||
|
||||
if (pdcp_pdu_p != NULL) {
|
||||
memcpy(&pdcp_pdu_p->data[0], sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
memcpy(pdcp_pdu_p, sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
|
||||
if( LOG_DEBUGFLAG(DEBUG_PDCP) ) {
|
||||
rlc_util_print_hex_octets(PDCP,
|
||||
(unsigned char *)&pdcp_pdu_p->data[0],
|
||||
sdu_buffer_sizeP);
|
||||
LOG_UI(PDCP, "Before rlc_data_req 1, srb_flagP: %d, rb_idP: %ld \n", srb_flagP, rb_idP);
|
||||
rlc_util_print_hex_octets(PDCP, pdcp_pdu_p, sdu_buffer_sizeP);
|
||||
LOG_UI(PDCP, "Before rlc_data_req 1, srb_flagP: %d, rb_idP: %ld \n", srb_flagP, rb_idP);
|
||||
}
|
||||
|
||||
rlc_status = pdcp_params.send_rlc_data_req_func(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP,
|
||||
@@ -326,7 +324,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
/*
|
||||
* Allocate a new block for the new PDU (i.e. PDU header and SDU payload)
|
||||
*/
|
||||
pdcp_pdu_p = get_free_mem_block(pdcp_pdu_size, __func__);
|
||||
pdcp_pdu_p = malloc16(pdcp_pdu_size);
|
||||
|
||||
if (pdcp_pdu_p != NULL) {
|
||||
/*
|
||||
@@ -339,9 +337,9 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
pdu_header.sn = pdcp_get_next_tx_seq_number(pdcp_p);
|
||||
current_sn = pdu_header.sn;
|
||||
memset(&pdu_header.mac_i[0],0,PDCP_CONTROL_PLANE_DATA_PDU_MAC_I_SIZE);
|
||||
memset(&pdcp_pdu_p->data[sdu_buffer_sizeP + pdcp_header_len],0,PDCP_CONTROL_PLANE_DATA_PDU_MAC_I_SIZE);
|
||||
memset(&pdcp_pdu_p[sdu_buffer_sizeP + pdcp_header_len], 0, PDCP_CONTROL_PLANE_DATA_PDU_MAC_I_SIZE);
|
||||
|
||||
if (pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer((unsigned char *)pdcp_pdu_p->data, &pdu_header) == false) {
|
||||
if (pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(pdcp_pdu_p, &pdu_header) == false) {
|
||||
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" Cannot fill PDU buffer with relevant header fields!\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p));
|
||||
|
||||
@@ -360,7 +358,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
pdu_header.sn = pdcp_get_next_tx_seq_number(pdcp_p);
|
||||
current_sn = pdu_header.sn ;
|
||||
|
||||
if (pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer((unsigned char *)pdcp_pdu_p->data, &pdu_header) == false) {
|
||||
if (pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(pdcp_pdu_p, &pdu_header) == false) {
|
||||
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" Cannot fill PDU buffer with relevant header fields!\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p));
|
||||
|
||||
@@ -383,7 +381,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
"There must be a problem with PDCP initialization, ignoring this PDU...\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p),
|
||||
current_sn);
|
||||
free_mem_block(pdcp_pdu_p, __func__);
|
||||
free(pdcp_pdu_p);
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_YES) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_req);
|
||||
@@ -397,13 +395,13 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
|
||||
LOG_D(PDCP, "Sequence number %d is assigned to current PDU\n", current_sn);
|
||||
/* Then append data... */
|
||||
memcpy(&pdcp_pdu_p->data[pdcp_header_len], sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
memcpy(&pdcp_pdu_p[pdcp_header_len], sdu_buffer_pP, sdu_buffer_sizeP);
|
||||
|
||||
//For control plane data that are not integrity protected,
|
||||
// the MAC-I field is still present and should be padded with padding bits set to 0.
|
||||
// NOTE: user-plane data are never integrity protected
|
||||
for (i=0; i<pdcp_tailer_len; i++) {
|
||||
pdcp_pdu_p->data[pdcp_header_len + sdu_buffer_sizeP + i] = 0x00;// pdu_header.mac_i[i];
|
||||
pdcp_pdu_p[pdcp_header_len + sdu_buffer_sizeP + i] = 0x00; // pdu_header.mac_i[i];
|
||||
}
|
||||
|
||||
if ((pdcp_p->security_activated != 0) &&
|
||||
@@ -421,7 +419,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
rb_idP % LTE_maxDRB,
|
||||
pdcp_header_len,
|
||||
current_sn,
|
||||
pdcp_pdu_p->data,
|
||||
pdcp_pdu_p,
|
||||
sdu_buffer_sizeP);
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
@@ -434,8 +432,8 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
/* Print octets of outgoing data in hexadecimal form */
|
||||
LOG_D(PDCP, "Following content with size %d will be sent over RLC (PDCP PDU header is the first two bytes)\n",
|
||||
pdcp_pdu_size);
|
||||
//util_print_hex_octets(PDCP, (unsigned char*)pdcp_pdu_p->data, pdcp_pdu_size);
|
||||
//util_flush_hex_octets(PDCP, (unsigned char*)pdcp_pdu->data, pdcp_pdu_size);
|
||||
// util_print_hex_octets(PDCP, (unsigned char*)pdcp_pdu_p, pdcp_pdu_size);
|
||||
// util_flush_hex_octets(PDCP, (unsigned char*)pdcp_pdu, pdcp_pdu_size);
|
||||
} else {
|
||||
LOG_E(PDCP, "Cannot create a mem_block for a PDU!\n");
|
||||
|
||||
@@ -458,8 +456,13 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
* Ask sublayer to transmit data and check return value
|
||||
* to see if RLC succeeded
|
||||
*/
|
||||
LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)pdcp_pdu_p->data,pdcp_pdu_size,
|
||||
"[MSG] PDCP DL %s PDU on rb_id %ld\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||
LOG_DUMPMSG(PDCP,
|
||||
DEBUG_PDCP,
|
||||
(char *)pdcp_pdu_p,
|
||||
pdcp_pdu_size,
|
||||
"[MSG] PDCP DL %s PDU on rb_id %ld\n",
|
||||
(srb_flagP) ? "CONTROL" : "DATA",
|
||||
rb_idP);
|
||||
|
||||
if ((pdcp_pdu_p!=NULL) && (srb_flagP == 0) && (ctxt_pP->enb_flag == 1)) {
|
||||
LOG_D(PDCP, "pdcp data req on drb %ld, size %d, rnti %lx\n", rb_idP, pdcp_pdu_size, ctxt_pP->rntiMaybeUEid);
|
||||
@@ -563,17 +566,14 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
pdcp_data_ind(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const sdu_size_t sdu_buffer_sizeP,
|
||||
mem_block_t *const sdu_buffer_pP,
|
||||
const uint32_t *const srcID,
|
||||
const uint32_t *const dstID
|
||||
)
|
||||
bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const sdu_size_t sdu_buffer_sizeP,
|
||||
uint8_t *const sdu_buffer_pP,
|
||||
const uint32_t *const srcID,
|
||||
const uint32_t *const dstID)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
pdcp_t *pdcp_p = NULL;
|
||||
@@ -593,8 +593,13 @@ pdcp_data_ind(
|
||||
int pdcp_sn_for_count;
|
||||
int security_ok;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_IN);
|
||||
LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)sdu_buffer_pP->data,sdu_buffer_sizeP,
|
||||
"[MSG] PDCP UL %s PDU on rb_id %ld\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||
LOG_DUMPMSG(PDCP,
|
||||
DEBUG_PDCP,
|
||||
(char *)sdu_buffer_pP,
|
||||
sdu_buffer_sizeP,
|
||||
"[MSG] PDCP UL %s PDU on rb_id %ld\n",
|
||||
(srb_flagP) ? "CONTROL" : "DATA",
|
||||
rb_idP);
|
||||
|
||||
if (MBMS_flagP) {
|
||||
AssertError(rb_idP < NB_RB_MBMS_MAX, return false, "RB id is too high (%ld/%d) %u rnti %lx!\n", rb_idP, NB_RB_MBMS_MAX, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||
@@ -630,7 +635,7 @@ pdcp_data_ind(
|
||||
PROTOCOL_CTXT_FMT"Could not get PDCP instance key 0x%"PRIx64"\n",
|
||||
PROTOCOL_CTXT_ARGS(ctxt_pP),
|
||||
key);
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
|
||||
return false;
|
||||
}
|
||||
@@ -657,16 +662,16 @@ pdcp_data_ind(
|
||||
if (srb_flagP) { //SRB1/2
|
||||
pdcp_header_len = PDCP_CONTROL_PLANE_DATA_PDU_SN_SIZE;
|
||||
pdcp_tailer_len = PDCP_CONTROL_PLANE_DATA_PDU_MAC_I_SIZE;
|
||||
sequence_number = pdcp_get_sequence_number_of_pdu_with_SRB_sn((unsigned char *)sdu_buffer_pP->data);
|
||||
sequence_number = pdcp_get_sequence_number_of_pdu_with_SRB_sn((unsigned char *)sdu_buffer_pP);
|
||||
} else { // DRB
|
||||
pdcp_tailer_len = 0;
|
||||
|
||||
if (pdcp_p->seq_num_size == 7) {
|
||||
pdcp_header_len = PDCP_USER_PLANE_DATA_PDU_SHORT_SN_HEADER_SIZE;
|
||||
sequence_number = pdcp_get_sequence_number_of_pdu_with_short_sn((unsigned char *)sdu_buffer_pP->data);
|
||||
sequence_number = pdcp_get_sequence_number_of_pdu_with_short_sn((unsigned char *)sdu_buffer_pP);
|
||||
} else if (pdcp_p->seq_num_size == 12) {
|
||||
pdcp_header_len = PDCP_USER_PLANE_DATA_PDU_LONG_SN_HEADER_SIZE;
|
||||
sequence_number = pdcp_get_sequence_number_of_pdu_with_long_sn((unsigned char *)sdu_buffer_pP->data);
|
||||
sequence_number = pdcp_get_sequence_number_of_pdu_with_long_sn((unsigned char *)sdu_buffer_pP);
|
||||
} else {
|
||||
//sequence_number = 4095;
|
||||
LOG_E(PDCP,
|
||||
@@ -686,7 +691,7 @@ pdcp_data_ind(
|
||||
PROTOCOL_PDCP_CTXT_FMT"Incoming (from RLC) SDU is short of size (size:%d)! Ignoring...\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
|
||||
sdu_buffer_sizeP);
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
|
||||
if (ctxt_pP->enb_flag) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);
|
||||
@@ -718,7 +723,7 @@ pdcp_data_ind(
|
||||
* mechanism all out-of-order packets will be delivered to RRC/IP
|
||||
*/
|
||||
LOG_W(PDCP, "Ignoring PDU...\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -749,8 +754,9 @@ pdcp_data_ind(
|
||||
pdcp_header_len,
|
||||
rx_hfn_for_count,
|
||||
pdcp_sn_for_count,
|
||||
sdu_buffer_pP->data,
|
||||
sdu_buffer_sizeP - pdcp_tailer_len) == 0;
|
||||
sdu_buffer_pP,
|
||||
sdu_buffer_sizeP - pdcp_tailer_len)
|
||||
== 0;
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].validate_security);
|
||||
@@ -766,7 +772,7 @@ pdcp_data_ind(
|
||||
PROTOCOL_PDCP_CTXT_FMT"security not validated for incoming PDCP SRB PDU\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
|
||||
LOG_W(PDCP, "Ignoring PDU...\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
/* TODO: indicate integrity verification failure to upper layer */
|
||||
return false;
|
||||
}
|
||||
@@ -784,10 +790,9 @@ pdcp_data_ind(
|
||||
rrc_data_ind(ctxt_pP,
|
||||
rb_id,
|
||||
sdu_buffer_sizeP - pdcp_header_len - pdcp_tailer_len,
|
||||
(uint8_t *)&sdu_buffer_pP->data[pdcp_header_len]);
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
(uint8_t *)&sdu_buffer_pP[pdcp_header_len]);
|
||||
free(sdu_buffer_pP);
|
||||
|
||||
// free_mem_block(new_sdu, __func__);
|
||||
if (ctxt_pP->enb_flag) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);
|
||||
} else {
|
||||
@@ -821,7 +826,7 @@ pdcp_data_ind(
|
||||
PROTOCOL_PDCP_CTXT_FMT"discard PDU, out of\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
|
||||
LOG_W(PDCP, "Ignoring PDU...\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
/* TODO: indicate integrity verification failure to upper layer */
|
||||
return false;
|
||||
} else if (pdcp_p->next_pdcp_rx_sn - sequence_number > reordering_window) {
|
||||
@@ -860,8 +865,9 @@ pdcp_data_ind(
|
||||
pdcp_header_len,
|
||||
rx_hfn_for_count,
|
||||
pdcp_sn_for_count,
|
||||
sdu_buffer_pP->data,
|
||||
sdu_buffer_sizeP - pdcp_tailer_len) == 0;
|
||||
sdu_buffer_pP,
|
||||
sdu_buffer_sizeP - pdcp_tailer_len)
|
||||
== 0;
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].validate_security);
|
||||
@@ -877,7 +883,7 @@ pdcp_data_ind(
|
||||
PROTOCOL_PDCP_CTXT_FMT"security not validated for incoming PDPC DRB RLC/AM PDU\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
|
||||
LOG_W(PDCP, "Ignoring PDU...\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
/* TODO: indicate integrity verification failure to upper layer */
|
||||
return false;
|
||||
}
|
||||
@@ -927,8 +933,9 @@ pdcp_data_ind(
|
||||
pdcp_header_len,
|
||||
rx_hfn_for_count,
|
||||
pdcp_sn_for_count,
|
||||
sdu_buffer_pP->data,
|
||||
sdu_buffer_sizeP - pdcp_tailer_len) == 0;
|
||||
sdu_buffer_pP,
|
||||
sdu_buffer_sizeP - pdcp_tailer_len)
|
||||
== 0;
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].validate_security);
|
||||
@@ -944,7 +951,7 @@ pdcp_data_ind(
|
||||
PROTOCOL_PDCP_CTXT_FMT"security not validated for incoming PDPC DRB RLC/UM PDU\n",
|
||||
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
|
||||
LOG_W(PDCP, "Ignoring PDU...\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
/* TODO: indicate integrity verification failure to upper layer */
|
||||
return false;
|
||||
}
|
||||
@@ -961,7 +968,7 @@ pdcp_data_ind(
|
||||
|
||||
if (otg_enabled==1) {
|
||||
LOG_D(OTG,"Discarding received packed\n");
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
|
||||
if (ctxt_pP->enb_flag) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);
|
||||
@@ -990,7 +997,7 @@ pdcp_data_ind(
|
||||
AssertFatal(message_p != NULL, "OUT OF MEMORY");
|
||||
gtpv1u_tunnel_data_req_t *req=>PV1U_TUNNEL_DATA_REQ(message_p);
|
||||
req->buffer = (uint8_t*)(req+1);
|
||||
memcpy(req->buffer + GTPU_HEADER_OVERHEAD_MAX, sdu_buffer_pP->data + payload_offset, sdu_buffer_sizeP - payload_offset);
|
||||
memcpy(req->buffer + GTPU_HEADER_OVERHEAD_MAX, sdu_buffer_pP + payload_offset, sdu_buffer_sizeP - payload_offset);
|
||||
req->length = sdu_buffer_sizeP - payload_offset;
|
||||
req->offset = GTPU_HEADER_OVERHEAD_MAX;
|
||||
req->ue_id = ctxt_pP->rntiMaybeUEid;
|
||||
@@ -1005,16 +1012,16 @@ pdcp_data_ind(
|
||||
#ifdef MBMS_MULTICAST_OUT
|
||||
|
||||
if ((MBMS_flagP != 0) && (mbms_socket != -1)) {
|
||||
// struct iphdr *ip_header = (struct iphdr *)&sdu_buffer_pP->data[payload_offset];
|
||||
// struct udphdr *udp_header = (struct udphdr *)&sdu_buffer_pP->data[payload_offset + sizeof(struct iphdr)];
|
||||
// struct sockaddr_in dest_addr;
|
||||
// dest_addr.sin_family = AF_INET;
|
||||
// dest_addr.sin_port = udp_header->dest;
|
||||
// dest_addr.sin_addr.s_addr = ip_header->daddr;
|
||||
|
||||
// sendto(mbms_socket, &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset, MSG_DONTWAIT, (struct sockaddr*)&dest_addr, sizeof(dest_addr));
|
||||
// //packet_forwarded = true;
|
||||
// struct iphdr *ip_header = (struct iphdr *)&sdu_buffer_pP[payload_offset];
|
||||
// struct udphdr *udp_header = (struct udphdr *)&sdu_buffer_pP[payload_offset + sizeof(struct iphdr)];
|
||||
// struct sockaddr_in dest_addr;
|
||||
// dest_addr.sin_family = AF_INET;
|
||||
// dest_addr.sin_port = udp_header->dest;
|
||||
// dest_addr.sin_addr.s_addr = ip_header->daddr;
|
||||
|
||||
// sendto(mbms_socket, &sdu_buffer_pP[payload_offset], sdu_buffer_sizeP - payload_offset, MSG_DONTWAIT, (struct
|
||||
// sockaddr*)&dest_addr, sizeof(dest_addr));
|
||||
// //packet_forwarded = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1035,7 +1042,7 @@ pdcp_data_ind(
|
||||
AssertFatal((sdu_buffer_sizeP - payload_offset >= 0), "invalid PDCP SDU size!");
|
||||
|
||||
// Here there is no virtualization possible
|
||||
// set ((pdcp_data_ind_header_t *) new_sdu_p->data)->inst for IP layer here
|
||||
// set ((pdcp_data_ind_header_t *) new_sdu_p)->inst for IP layer here
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
pdcpHead->rb_id = rb_id;
|
||||
|
||||
@@ -1071,9 +1078,7 @@ pdcp_data_ind(
|
||||
LOG_D(PDCP, "inst=%d size=%d\n", pdcpHead->inst, pdcpHead->data_size);
|
||||
}
|
||||
|
||||
memcpy(pdcpHead+1,
|
||||
&sdu_buffer_pP->data[payload_offset],
|
||||
sdu_buffer_sizeP - payload_offset);
|
||||
memcpy(pdcpHead + 1, &sdu_buffer_pP[payload_offset], sdu_buffer_sizeP - payload_offset);
|
||||
if( LOG_DEBUGFLAG(DEBUG_PDCP) )
|
||||
log_dump(PDCP, pdcpHead+1, min(sdu_buffer_sizeP - payload_offset,30) , LOG_DUMP_CHAR,
|
||||
"Printing first bytes of PDCP SDU before adding it to the list: \n");
|
||||
@@ -1083,8 +1088,8 @@ pdcp_data_ind(
|
||||
LOG_D(PDCP, "Following content has been received from RLC (%d,%d)(PDCP header has already been removed):\n",
|
||||
sdu_buffer_sizeP - payload_offset + (int)sizeof(pdcp_data_ind_header_t),
|
||||
sdu_buffer_sizeP - payload_offset);
|
||||
//util_print_hex_octets(PDCP, &new_sdu_p->data[sizeof (pdcp_data_ind_header_t)], sdu_buffer_sizeP - payload_offset);
|
||||
//util_flush_hex_octets(PDCP, &new_sdu_p->data[sizeof (pdcp_data_ind_header_t)], sdu_buffer_sizeP - payload_offset);
|
||||
// util_print_hex_octets(PDCP, &new_sdu_p[sizeof (pdcp_data_ind_header_t)], sdu_buffer_sizeP - payload_offset);
|
||||
// util_flush_hex_octets(PDCP, &new_sdu_p[sizeof (pdcp_data_ind_header_t)], sdu_buffer_sizeP - payload_offset);
|
||||
}
|
||||
|
||||
/* Update PDCP statistics */
|
||||
@@ -1103,7 +1108,7 @@ pdcp_data_ind(
|
||||
Pdcp_stats_rx_aiat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+= (pdcp_enb[ctxt_pP->module_id].sfn - Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]);
|
||||
Pdcp_stats_rx_aiat_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=(pdcp_enb[ctxt_pP->module_id].sfn - Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]);
|
||||
Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]=pdcp_enb[ctxt_pP->module_id].sfn;
|
||||
free_mem_block(sdu_buffer_pP, __func__);
|
||||
free(sdu_buffer_pP);
|
||||
|
||||
if (ctxt_pP->enb_flag) {
|
||||
stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].data_ind);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "LTE_DRB-ToAddMod.h"
|
||||
#include "LTE_DRB-ToAddModList.h"
|
||||
#include "LTE_SRB-ToAddMod.h"
|
||||
@@ -47,14 +47,25 @@
|
||||
|
||||
#include "openair3/SECU/secu_defs.h"
|
||||
|
||||
typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *const,
|
||||
const srb_flag_t, const MBMS_flag_t,
|
||||
const rb_id_t, const mui_t,
|
||||
confirm_t, sdu_size_t, mem_block_t *,const uint32_t *const, const uint32_t *const);
|
||||
typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const mui_t,
|
||||
confirm_t,
|
||||
sdu_size_t,
|
||||
uint8_t *,
|
||||
const uint32_t *const,
|
||||
const uint32_t *const);
|
||||
|
||||
typedef bool (pdcp_data_ind_t)( const protocol_ctxt_t *, const srb_flag_t,
|
||||
const MBMS_flag_t, const rb_id_t, const sdu_size_t,
|
||||
mem_block_t *,const uint32_t *const, const uint32_t *const);
|
||||
typedef bool(pdcp_data_ind_t)(const protocol_ctxt_t *,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const sdu_size_t,
|
||||
uint8_t *,
|
||||
const uint32_t *const,
|
||||
const uint32_t *const);
|
||||
typedef pdcp_data_ind_t* pdcp_data_ind_func_t;
|
||||
|
||||
#define MAX_NUMBER_NETIF 1 //16
|
||||
@@ -265,19 +276,19 @@ bool cu_f1u_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id);
|
||||
|
||||
/*! \fn bool pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, bool)
|
||||
* \brief This functions handles data transfer indications coming from RLC
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] Shows if rb is SRB
|
||||
* \param[in] Tells if MBMS traffic
|
||||
* \param[in] rab_id Radio Bearer ID
|
||||
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
|
||||
* \param[in] sdu_buffer Buffer carrying SDU
|
||||
* \param[in] is_data_plane flag to indicate whether the userplane data belong to the control plane or data plane
|
||||
* \return TRUE on success, false otherwise
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
/*! \fn bool pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, uint8_t*, bool)
|
||||
* \brief This functions handles data transfer indications coming from RLC
|
||||
* \param[in] ctxt_pP Running context.
|
||||
* \param[in] Shows if rb is SRB
|
||||
* \param[in] Tells if MBMS traffic
|
||||
* \param[in] rab_id Radio Bearer ID
|
||||
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
|
||||
* \param[in] sdu_buffer Buffer carrying SDU
|
||||
* \param[in] is_data_plane flag to indicate whether the userplane data belong to the control plane or data plane
|
||||
* \return TRUE on success, false otherwise
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
pdcp_data_ind_t pdcp_data_ind;
|
||||
|
||||
/*! \fn void rrc_pdcp_config_req(const protocol_ctxt_t* const ,uint32_t,rb_id_t,uint8_t)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "pdcp.h"
|
||||
#include "pdcp_primitives.h"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#define PDCP_UTIL_H
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "../../COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "pdcp.h"
|
||||
|
||||
/*
|
||||
|
||||
+27
-60
@@ -35,12 +35,12 @@
|
||||
#ifndef __RLC_H__
|
||||
# define __RLC_H__
|
||||
|
||||
# include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
# include "hashtable.h"
|
||||
# include "LTE_asn_constant.h"
|
||||
# include "common/utils/LOG/log.h"
|
||||
# include "mem_block.h"
|
||||
#include "intertask_interface.h"
|
||||
//# include "PHY/defs.h"
|
||||
# include "LTE_RLC-Config.h"
|
||||
# include "LTE_DRB-ToAddMod.h"
|
||||
@@ -71,26 +71,6 @@ typedef enum rlc_confirm_e {
|
||||
RLC_SDU_CONFIRM_YES = 1,
|
||||
} rlc_confirm_t;
|
||||
|
||||
typedef enum rlc_mode_e {
|
||||
RLC_MODE_NONE = 0,
|
||||
RLC_MODE_AM = 1,
|
||||
RLC_MODE_UM = 2,
|
||||
RLC_MODE_TM = 4
|
||||
} rlc_mode_t;
|
||||
|
||||
/*! \struct mac_rlc_status_resp_t
|
||||
* \brief Primitive exchanged between RLC and MAC informing about the buffer occupancy of the RLC protocol instance.
|
||||
*/
|
||||
typedef struct {
|
||||
rlc_buffer_occupancy_t bytes_in_buffer; /*!< \brief Bytes buffered in RLC protocol instance. */
|
||||
rlc_buffer_occupancy_t pdus_in_buffer; /*!< \brief Number of PDUs buffered in RLC protocol instance (OBSOLETE). */
|
||||
frame_t head_sdu_creation_time; /*!< \brief Head SDU creation time. */
|
||||
sdu_size_t head_sdu_remaining_size_to_send; /*!< \brief remaining size of sdu: could be the total size or the remaining size of already segmented sdu */
|
||||
bool head_sdu_is_segmented; /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
|
||||
} mac_rlc_status_resp_t;
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// PRIVATE INTERNALS OF RLC
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -284,39 +264,35 @@ void rlc_util_print_hex_octets(
|
||||
* \param[in] muiP Message Unit identifier.
|
||||
* \param[in] confirmP Boolean, is confirmation requested.
|
||||
* \param[in] sdu_sizeP Size of SDU in bytes.
|
||||
* \param[in] sduP SDU.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_op_status_t rlc_data_req (
|
||||
const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const mui_t,
|
||||
const confirm_t,
|
||||
const sdu_size_t,
|
||||
mem_block_t *const,
|
||||
const uint32_t *const,
|
||||
const uint32_t *const
|
||||
);
|
||||
* \param[in] sduP SDU.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const mui_t,
|
||||
const confirm_t,
|
||||
const sdu_size_t,
|
||||
uint8_t *const,
|
||||
const uint32_t *const,
|
||||
const uint32_t *const);
|
||||
|
||||
/*! \fn void rlc_data_ind (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, const sdu_size_t sdu_sizeP, mem_block_t* sduP) {
|
||||
* \brief Interface with higher layers, route SDUs coming from RLC protocol instances to upper layer instance.
|
||||
* \param[in] ctxtP Running context.
|
||||
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
|
||||
* \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
|
||||
* \param[in] rb_idP Radio bearer identifier.
|
||||
* \param[in] sdu_sizeP Size of SDU in bytes.
|
||||
* \param[in] sduP SDU.
|
||||
*/
|
||||
void rlc_data_ind(
|
||||
const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const sdu_size_t,
|
||||
mem_block_t *const);
|
||||
|
||||
* \param[in] rb_idP Radio bearer identifier.
|
||||
* \param[in] sdu_sizeP Size of SDU in bytes.
|
||||
* \param[in] sduP SDU.
|
||||
*/
|
||||
void rlc_data_ind(const protocol_ctxt_t *const,
|
||||
const srb_flag_t,
|
||||
const MBMS_flag_t,
|
||||
const rb_id_t,
|
||||
const sdu_size_t,
|
||||
uint8_t *const);
|
||||
|
||||
/*! \fn void rlc_data_conf (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const rb_id_t rb_idP, const mui_t muiP, const rlc_tx_status_t statusP)
|
||||
* \brief Interface with higher layers, confirm to upper layer the transmission status for a SDU stamped with a MUI, scheduled for transmission.
|
||||
@@ -435,18 +411,9 @@ rlc_op_status_t rlc_stat_req (
|
||||
unsigned int *const stat_timer_status_prohibit_timed_out);
|
||||
|
||||
/*! \fn int rlc_module_init(int enb_flag)
|
||||
* \brief RAZ the memory of the RLC layer, initialize the memory pool manager (mem_block_t structures mainly used in RLC module).
|
||||
*/
|
||||
* \brief RAZ the memory of the RLC layer, initialize the memory pool manager (uint8_t structures mainly used in RLC module).
|
||||
*/
|
||||
int rlc_module_init(int enb_flag);
|
||||
|
||||
void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP);
|
||||
/** @} */
|
||||
|
||||
#define RLC_FG_COLOR_BLACK "\e[0;30m"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "NR_DRB-ToAddModList.h"
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "intertask_interface.h"
|
||||
#include "openair2/COMMON/e1ap_messages_types.h"
|
||||
#include "openair3/ocp-gtpu/gtp_itf.h"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "openair2/COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#ifndef _NR_PDCP_H_
|
||||
#define _NR_PDCP_H_
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "openair2/COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#include "nr_pdcp_sdu.h"
|
||||
#include "openair2/RRC/NR/rrc_gNB_radio_bearers.h"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "NR_RLC-Config.h"
|
||||
#include "NR_CellGroupConfig.h"
|
||||
#include "openair2/RRC/NR/nr_rrc_proto.h"
|
||||
#include "common/utils/mem/oai_memory.h"
|
||||
#include <stdint.h>
|
||||
|
||||
/* from OAI */
|
||||
@@ -111,7 +112,7 @@ typedef struct {
|
||||
mui_t muiP;
|
||||
confirm_t confirmP;
|
||||
sdu_size_t sdu_sizeP;
|
||||
mem_block_t *sdu_pP;
|
||||
uint8_t *sdu_pP;
|
||||
} rlc_data_req_queue_item;
|
||||
|
||||
#define RLC_DATA_REQ_QUEUE_SIZE 10000
|
||||
@@ -173,13 +174,13 @@ static void init_nr_rlc_data_req_queue(void)
|
||||
}
|
||||
|
||||
static void enqueue_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP)
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
uint8_t *sdu_pP)
|
||||
{
|
||||
int i;
|
||||
int logged = 0;
|
||||
@@ -210,13 +211,13 @@ static void enqueue_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
}
|
||||
|
||||
void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP)
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
uint8_t *sdu_pP)
|
||||
{
|
||||
enqueue_rlc_data_req(ctxt_pP,
|
||||
srb_flagP,
|
||||
@@ -241,7 +242,7 @@ typedef struct {
|
||||
MBMS_flag_t MBMS_flagP;
|
||||
rb_id_t rb_id;
|
||||
sdu_size_t sdu_buffer_size;
|
||||
mem_block_t *sdu_buffer;
|
||||
uint8_t *sdu_buffer;
|
||||
} pdcp_data_ind_queue_item;
|
||||
|
||||
#define PDCP_DATA_IND_QUEUE_SIZE 10000
|
||||
@@ -256,13 +257,12 @@ typedef struct {
|
||||
|
||||
static pdcp_data_ind_queue pq;
|
||||
|
||||
static void do_pdcp_data_ind(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
mem_block_t *const sdu_buffer)
|
||||
static void do_pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
uint8_t *const sdu_buffer)
|
||||
{
|
||||
nr_pdcp_ue_t *ue;
|
||||
nr_pdcp_entity_t *rb;
|
||||
@@ -285,14 +285,14 @@ static void do_pdcp_data_ind(
|
||||
rb = nr_pdcp_get_rb(ue, rb_id, srb_flagP);
|
||||
|
||||
if (rb != NULL) {
|
||||
rb->recv_pdu(rb, (char *)sdu_buffer->data, sdu_buffer_size);
|
||||
rb->recv_pdu(rb, (char *)sdu_buffer, sdu_buffer_size);
|
||||
} else {
|
||||
LOG_E(PDCP, "pdcp_data_ind: no RB found (rb_id %ld, srb_flag %d)\n", rb_id, srb_flagP);
|
||||
}
|
||||
|
||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||
|
||||
free_mem_block(sdu_buffer, __FUNCTION__);
|
||||
free(sdu_buffer);
|
||||
}
|
||||
|
||||
static void *pdcp_data_ind_thread(void *_)
|
||||
@@ -337,13 +337,12 @@ static void init_nr_pdcp_data_ind_queue(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void enqueue_pdcp_data_ind(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
mem_block_t *const sdu_buffer)
|
||||
static void enqueue_pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
uint8_t *const sdu_buffer)
|
||||
{
|
||||
int i;
|
||||
int logged = 0;
|
||||
@@ -371,12 +370,12 @@ static void enqueue_pdcp_data_ind(
|
||||
if (pthread_mutex_unlock(&pq.m) != 0) abort();
|
||||
}
|
||||
|
||||
bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
mem_block_t *const sdu_buffer,
|
||||
uint8_t *const sdu_buffer,
|
||||
const uint32_t *const srcID,
|
||||
const uint32_t *const dstID)
|
||||
{
|
||||
@@ -670,8 +669,8 @@ static void deliver_pdu_drb_ue(void *deliver_pdu_data, ue_id_t ue_id, int rb_id,
|
||||
DevAssert(deliver_pdu_data == NULL);
|
||||
protocol_ctxt_t ctxt = { .enb_flag = 0, .rntiMaybeUEid = ue_id };
|
||||
|
||||
mem_block_t *memblock = get_free_mem_block(size, __FUNCTION__);
|
||||
memcpy(memblock->data, buf, size);
|
||||
uint8_t *memblock = malloc16(size);
|
||||
memcpy(memblock, buf, size);
|
||||
LOG_D(PDCP, "%s(): (drb %d) calling rlc_data_req size %d UE %ld/%04lx\n", __func__, rb_id, size, ctxt.rntiMaybeUEid, ctxt.rntiMaybeUEid);
|
||||
enqueue_rlc_data_req(&ctxt, 0, MBMS_FLAG_NO, rb_id, sdu_id, 0, size, memblock);
|
||||
}
|
||||
@@ -702,8 +701,8 @@ static void deliver_pdu_drb_gnb(void *deliver_pdu_data, ue_id_t ue_id, int rb_id
|
||||
extern instance_t CUuniqInstance;
|
||||
itti_send_msg_to_task(TASK_GTPV1_U, CUuniqInstance, message_p);
|
||||
} else {
|
||||
mem_block_t *memblock = get_free_mem_block(size, __FUNCTION__);
|
||||
memcpy(memblock->data, buf, size);
|
||||
uint8_t *memblock = malloc16(size);
|
||||
memcpy(memblock, buf, size);
|
||||
LOG_D(PDCP, "%s(): (drb %d) calling rlc_data_req size %d\n", __func__, rb_id, size);
|
||||
enqueue_rlc_data_req(&ctxt, 0, MBMS_FLAG_NO, rb_id, sdu_id, 0, size, memblock);
|
||||
}
|
||||
@@ -760,8 +759,8 @@ void deliver_pdu_srb_rlc(void *deliver_pdu_data, ue_id_t ue_id, int srb_id,
|
||||
char *buf, int size, int sdu_id)
|
||||
{
|
||||
protocol_ctxt_t ctxt = { .enb_flag = 1, .rntiMaybeUEid = ue_id };
|
||||
mem_block_t *memblock = get_free_mem_block(size, __FUNCTION__);
|
||||
memcpy(memblock->data, buf, size);
|
||||
uint8_t *memblock = malloc16(size);
|
||||
memcpy(memblock, buf, size);
|
||||
enqueue_rlc_data_req(&ctxt, 1, MBMS_FLAG_NO, srb_id, sdu_id, 0, size, memblock);
|
||||
}
|
||||
|
||||
@@ -1246,12 +1245,12 @@ bool cu_f1u_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
const uint32_t *const destinationL2Id) {
|
||||
//Force instance id to 0, OAI incoherent instance management
|
||||
ctxt_pP->instance=0;
|
||||
mem_block_t *memblock = get_free_mem_block(sdu_buffer_size, __func__);
|
||||
uint8_t *memblock = malloc16(sdu_buffer_size);
|
||||
if (memblock == NULL) {
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: get_free_mem_block failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: malloc16 failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
memcpy(memblock->data,sdu_buffer, sdu_buffer_size);
|
||||
memcpy(memblock, sdu_buffer, sdu_buffer_size);
|
||||
int ret=pdcp_data_ind(ctxt_pP,srb_flagP, false, rb_id, sdu_buffer_size, memblock, NULL, NULL);
|
||||
if (!ret) {
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: pdcp_data_ind failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
@@ -29,20 +29,20 @@ void nr_pdcp_layer_init(bool uses_e1);
|
||||
uint64_t nr_pdcp_module_init(uint64_t _pdcp_optmask, int id);
|
||||
|
||||
void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP);
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
uint8_t *sdu_pP);
|
||||
|
||||
bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_id,
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
mem_block_t *const sdu_buffer,
|
||||
uint8_t *const sdu_buffer,
|
||||
const uint32_t *const srcID,
|
||||
const uint32_t *const dstID);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "nr_pdcp_entity.h"
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
typedef void nr_pdcp_ue_manager_t;
|
||||
|
||||
|
||||
@@ -293,7 +293,6 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(const module_id_t module
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
@@ -301,7 +300,7 @@ rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP,
|
||||
uint8_t *sdu_pP,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id)
|
||||
{
|
||||
@@ -331,14 +330,14 @@ rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
|
||||
if (rb != NULL) {
|
||||
rb->set_time(rb, nr_rlc_current_time);
|
||||
rb->recv_sdu(rb, (char *)sdu_pP->data, sdu_sizeP, muiP);
|
||||
rb->recv_sdu(rb, (char *)sdu_pP, sdu_sizeP, muiP);
|
||||
} else {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal: SDU sent to unknown RB\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
}
|
||||
|
||||
nr_rlc_manager_unlock(nr_rlc_ue_manager);
|
||||
|
||||
free_mem_block(sdu_pP, __func__);
|
||||
free(sdu_pP);
|
||||
|
||||
return RLC_OP_STATUS_OK;
|
||||
}
|
||||
@@ -402,7 +401,7 @@ static void deliver_sdu(void *_ue, nr_rlc_entity_t *entity, char *buf, int size)
|
||||
int is_srb;
|
||||
int rb_id;
|
||||
protocol_ctxt_t ctx;
|
||||
mem_block_t *memblock;
|
||||
uint8_t *memblock;
|
||||
int i;
|
||||
int is_enb;
|
||||
|
||||
@@ -500,12 +499,12 @@ rb_found:
|
||||
}
|
||||
|
||||
/* UE or monolithic gNB */
|
||||
memblock = get_free_mem_block(size, __func__);
|
||||
memblock = malloc16(size);
|
||||
if (memblock == NULL) {
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: get_free_mem_block failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: malloc16 failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
memcpy(memblock->data, buf, size);
|
||||
memcpy(memblock, buf, size);
|
||||
LOG_D(PDCP, "Calling PDCP layer from RLC in %s\n", __FUNCTION__);
|
||||
if (!pdcp_data_ind(&ctx, is_srb, 0, rb_id, size, memblock, NULL, NULL)) {
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: pdcp_data_ind failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#ifndef _NR_RLC_UE_MANAGER_H_
|
||||
#define _NR_RLC_UE_MANAGER_H_
|
||||
#include "openair2/COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "nr_rlc_entity.h"
|
||||
#include "common/platform_constants.h"
|
||||
|
||||
|
||||
@@ -265,18 +265,16 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id
|
||||
)
|
||||
rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
uint8_t *sdu_pP,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id)
|
||||
{
|
||||
int rnti = ctxt_pP->rntiMaybeUEid;
|
||||
rlc_ue_t *ue;
|
||||
@@ -312,7 +310,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
|
||||
if (rb != NULL) {
|
||||
rb->set_time(rb, rlc_current_time);
|
||||
rb->recv_sdu(rb, (char *)sdu_pP->data, sdu_sizeP, muiP);
|
||||
rb->recv_sdu(rb, (char *)sdu_pP, sdu_sizeP, muiP);
|
||||
} else {
|
||||
LOG_E(RLC, "%s:%d:%s: fatal: SDU sent to unknown RB\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
@@ -320,7 +318,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
|
||||
rlc_manager_unlock(rlc_ue_manager);
|
||||
|
||||
free_mem_block(sdu_pP, __func__);
|
||||
free(sdu_pP);
|
||||
|
||||
return RLC_OP_STATUS_OK;
|
||||
}
|
||||
@@ -359,7 +357,7 @@ static void deliver_sdu(void *_ue, rlc_entity_t *entity, char *buf, int size)
|
||||
int is_srb;
|
||||
int rb_id;
|
||||
protocol_ctxt_t ctx;
|
||||
mem_block_t *memblock;
|
||||
uint8_t *memblock;
|
||||
int i;
|
||||
int is_enb;
|
||||
int is_mbms;
|
||||
@@ -413,13 +411,13 @@ rb_found:
|
||||
T_INT(0 /*ctxt_pP->module_id*/),
|
||||
T_INT(ue->rnti), T_INT(rb_id), T_INT(size));
|
||||
}
|
||||
|
||||
memblock = get_free_mem_block(size, __func__);
|
||||
|
||||
memblock = malloc16(size);
|
||||
if (memblock == NULL) {
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: get_free_mem_block failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: malloc16 failed\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
exit(1);
|
||||
}
|
||||
memcpy(memblock->data, buf, size);
|
||||
memcpy(memblock, buf, size);
|
||||
if (!get_pdcp_data_ind_func()(&ctx, is_srb, is_mbms, rb_id, size, memblock, NULL, NULL)) {
|
||||
LOG_E(RLC, "%s:%d:%s: ERROR: pdcp_data_ind failed (is_srb %d rb_id %d rnti %d)\n",
|
||||
__FILE__, __LINE__, __FUNCTION__,
|
||||
@@ -1010,24 +1008,6 @@ void rlc_tick(int frame, int subframe)
|
||||
}
|
||||
}
|
||||
|
||||
void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const rb_id_t rb_idP,
|
||||
const mui_t muiP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP){
|
||||
rlc_data_req (ctxt_pP,
|
||||
srb_flagP,
|
||||
MBMS_flagP,
|
||||
rb_idP,
|
||||
muiP,
|
||||
confirmP,
|
||||
sdu_sizeP,
|
||||
sdu_pP, NULL, NULL);
|
||||
}
|
||||
|
||||
/* HACK to be removed: nr_rlc_get_available_tx_space is needed by
|
||||
* openair3/ocp-gtpu/gtp_itf.cpp which is compiled in lte-softmodem
|
||||
* so let's put a dummy nr_rlc_get_available_tx_space here
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#define M2AP_TIMERS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
typedef struct {
|
||||
/* incremented every TTI (every millisecond when in realtime).
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
#define MCE_APP_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "platform_types.h"
|
||||
|
||||
#include "common/platform_types.h"
|
||||
|
||||
void *MCE_app_task(void *args_p);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <libconfig.h>
|
||||
|
||||
#include "commonDef.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "PHY/impl_defs_top.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#define IP2PDCP_FIFO 22
|
||||
|
||||
#include "constant.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "sap.h"
|
||||
|
||||
struct cx_entity {
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#include "constant.h"
|
||||
#include "sap.h"
|
||||
#include "rrc_nas_primitives.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
struct rb_entity {
|
||||
nasRadioBearerId_t rab_id;
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include <net/ndisc.h>
|
||||
|
||||
#include "constant.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "sap.h"
|
||||
|
||||
typedef struct ue_ip_priv_s {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "nfapi_nr_interface.h"
|
||||
#include "nfapi_nr_interface_scf.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#define MAX_NUM_DL_PDU 100
|
||||
#define MAX_NUM_UL_PDU 100
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#ifndef __NR_IF_MODULE_H__
|
||||
#define __NR_IF_MODULE_H__
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include <semaphore.h>
|
||||
#include "fapi_nr_ue_interface.h"
|
||||
#include "openair2/PHY_INTERFACE/queue_t.h"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef __NR_CHAN_MODEL_H__
|
||||
#define __NR_CHAN_MODEL_H__
|
||||
|
||||
#include <platform_types.h>
|
||||
#include "common/platform_types.h"
|
||||
#include <nfapi_nr_interface_scf.h>
|
||||
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
|
||||
|
||||
|
||||
@@ -36,11 +36,10 @@
|
||||
#include <sched.h>
|
||||
//#include "openair1/PHY/LTE_TRANSPORT/transport_eNB.h"
|
||||
#include "nfapi_interface.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include <common/utils/threadPool/thread-pool.h>
|
||||
#include <radio/COMMON/common_lib.h>
|
||||
|
||||
|
||||
#define MAX_NUM_DL_PDU 100
|
||||
#define MAX_NUM_UL_PDU 100
|
||||
#define MAX_NUM_HI_DCI0_PDU 100
|
||||
@@ -53,37 +52,37 @@
|
||||
#define MAX_NUM_RACH_IND 100
|
||||
#define MAX_NUM_SRS_IND 100
|
||||
|
||||
typedef struct {
|
||||
/// Module ID
|
||||
module_id_t module_id;
|
||||
/// CC ID
|
||||
int CC_id;
|
||||
/// frame
|
||||
frame_t frame;
|
||||
/// subframe
|
||||
sub_frame_t subframe;
|
||||
typedef struct {
|
||||
/// Module ID
|
||||
module_id_t module_id;
|
||||
/// CC ID
|
||||
int CC_id;
|
||||
/// frame
|
||||
frame_t frame;
|
||||
/// subframe
|
||||
sub_frame_t subframe;
|
||||
|
||||
/// harq indication list
|
||||
nfapi_harq_indication_t harq_ind;
|
||||
/// harq indication list
|
||||
nfapi_harq_indication_t harq_ind;
|
||||
|
||||
/// crc indication list
|
||||
nfapi_crc_indication_t crc_ind;
|
||||
/// crc indication list
|
||||
nfapi_crc_indication_t crc_ind;
|
||||
|
||||
/// SR indication list
|
||||
nfapi_sr_indication_t sr_ind;
|
||||
/// SR indication list
|
||||
nfapi_sr_indication_t sr_ind;
|
||||
|
||||
/// CQI indication list
|
||||
nfapi_cqi_indication_t cqi_ind;
|
||||
/// CQI indication list
|
||||
nfapi_cqi_indication_t cqi_ind;
|
||||
|
||||
/// RACH indication list
|
||||
nfapi_rach_indication_t rach_ind;
|
||||
/// RACH indication list for BR UEs
|
||||
nfapi_rach_indication_t rach_ind_br;
|
||||
/// SRS indication list
|
||||
nfapi_srs_indication_body_t srs_ind;
|
||||
/// RACH indication list
|
||||
nfapi_rach_indication_t rach_ind;
|
||||
/// RACH indication list for BR UEs
|
||||
nfapi_rach_indication_t rach_ind_br;
|
||||
/// SRS indication list
|
||||
nfapi_srs_indication_body_t srs_ind;
|
||||
|
||||
/// RX indication
|
||||
nfapi_rx_indication_t rx_ind;
|
||||
/// RX indication
|
||||
nfapi_rx_indication_t rx_ind;
|
||||
|
||||
} UL_IND_t;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
//#include "openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h"
|
||||
#include "LTE_PhysicalConfigDedicated-NB-r13.h"
|
||||
//#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
|
||||
#include "openair2/COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
//#include "openair1/SCHED/IF_Module_L1_primitives_NB_IoT.h"
|
||||
|
||||
//#define SCH_PAYLOAD_SIZE_MAX 4096
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define __OPENAIR_RRC_L2_INTERFACE_H__
|
||||
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
int8_t
|
||||
mac_rrc_data_req(
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
* \email: javier.morgade@ieee.org
|
||||
*/
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_extern.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* \email: raymond.knopp@eurecom.fr
|
||||
*/
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_extern.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
* \email: javier.morgade@ieee.org
|
||||
*/
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_extern.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "collection/tree.h"
|
||||
#include "rrc_types_NB_IoT.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/openairinterface5g_limits.h"
|
||||
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "rrc_extern.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "COMMON/openair_defs.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "NR_UE-NR-Capability.h"
|
||||
|
||||
#include "common/platform_constants.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "openair2/RRC/common.h"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "LTE_HandoverCommand.h"
|
||||
#include "rlc.h"
|
||||
#include "rrc_eNB_UE_context.h"
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "LTE_SL-CommConfig-r12.h"
|
||||
#include "LTE_PeriodicBSR-Timer-r12.h"
|
||||
#include "LTE_RetxBSR-Timer-r12.h"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define __RRC_ENB_UE_CONTEXT_H__
|
||||
|
||||
#include "collection/tree.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "rrc_defs.h"
|
||||
|
||||
int rrc_eNB_compare_ue_rnti_id(
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
|
||||
struct e1ap_bearer_setup_req_s;
|
||||
struct e1ap_bearer_setup_resp_s;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef MAC_RRC_DL_H
|
||||
#define MAC_RRC_DL_H
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "f1ap_messages_types.h"
|
||||
|
||||
typedef void (*f1_setup_response_func_t)(sctp_assoc_t assoc_id, const f1ap_setup_resp_t *resp);
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "nr_rrc_extern.h"
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
|
||||
#include "COMMON/openair_defs.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include "common/ngran_types.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "mac_rrc_dl.h"
|
||||
#include "cucp_cuup_if.h"
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#include "uper_encoder.h"
|
||||
#include "uper_decoder.h"
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include "T.h"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define __RRC_GNB_UE_CONTEXT_H__
|
||||
|
||||
#include "collection/tree.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "common/platform_types.h"
|
||||
#include "nr_rrc_defs.h"
|
||||
|
||||
int rrc_gNB_compare_ue_rnti_id(rrc_gNB_ue_context_t* c1_pP, rrc_gNB_ue_context_t* c2_pP);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user