Merge branch 'master' into feature-21-TM7
Conflicts: openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c openair1/SCHED/phy_procedures_lte_ue.c openair1/SIMULATION/LTE_PHY/dlsim.c openair1/SIMULATION/LTE_PHY/mbmssim.c targets/RT/USER/Makefile
This commit is contained in:
+607
-373
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenAirInterface.The full GNU General Public License is
|
||||
# included in this distribution in the file called "COPYING". If not,
|
||||
# see <http://www.gnu.org/licenses/>.
|
||||
# see <http:/www.gnu.org/licenses/>.
|
||||
#
|
||||
# Contact Information
|
||||
# OpenAirInterface Admin: openair_admin@eurecom.fr
|
||||
@@ -51,7 +51,7 @@ set(OPENAIRCN_DIR ${OPENAIR_DIR}/openair-cn)
|
||||
set(OPENAIR_TARGETS ${OPENAIR_DIR}/targets)
|
||||
set(OPENAIR_CMAKE_SCRIPTS ${OPENAIR_DIR}/cmake_targets/tools)
|
||||
set(OPENAIR_BIN_DIR ${OPENAIR_DIR}/targets/bin)
|
||||
set(OPENAIR_NAS_DIR ${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS)
|
||||
set(OPENAIR_NAS_DIR ${OPENAIR_DIR}/openair-cn/NAS)
|
||||
|
||||
|
||||
set(CMAKE_MODULE_PATH "${OPENAIR_DIR}/cmake_targets/tools/MODULES" "${CMAKE_MODULE_PATH}")
|
||||
@@ -151,229 +151,229 @@ target_include_directories(secu_cn PRIVATE
|
||||
# UTIL LIB
|
||||
################################################################################
|
||||
set(util_SRC
|
||||
${OPENAIR_NAS_DIR}/src/util/device.c
|
||||
${OPENAIR_NAS_DIR}/src/util/memory.c
|
||||
${OPENAIR_NAS_DIR}/src/util/nas_log.c
|
||||
${OPENAIR_NAS_DIR}/src/util/nas_timer.c
|
||||
${OPENAIR_NAS_DIR}/src/util/OctetString.c
|
||||
${OPENAIR_NAS_DIR}/src/util/parser.c
|
||||
${OPENAIR_NAS_DIR}/src/util/TLVDecoder.c
|
||||
${OPENAIR_NAS_DIR}/src/util/TLVEncoder.c
|
||||
${OPENAIR_NAS_DIR}/src/util/socket.c
|
||||
${OPENAIR_NAS_DIR}/src/util/stty.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/device.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/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
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/parser.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/TLVDecoder.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/TLVEncoder.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/socket.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL/stty.c
|
||||
)
|
||||
set(util_HDR
|
||||
${OPENAIR_NAS_DIR}/src/util/device.h
|
||||
${OPENAIR_NAS_DIR}/src/util/memory.h
|
||||
${OPENAIR_NAS_DIR}/src/util/nas_log.h
|
||||
${OPENAIR_NAS_DIR}/src/util/nas_timer.h
|
||||
${OPENAIR_NAS_DIR}/src/util/OctetString.h
|
||||
${OPENAIR_NAS_DIR}/src/util/parser.h
|
||||
${OPENAIR_NAS_DIR}/src/util/TLVDecoder.h
|
||||
${OPENAIR_NAS_DIR}/src/util/TLVEncoder.h
|
||||
${OPENAIR_NAS_DIR}/src/util/socket.h
|
||||
${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})
|
||||
target_include_directories(util PRIVATE ${OPENAIR_NAS_DIR}/src/util)
|
||||
target_include_directories(util PRIVATE ${OPENAIR_NAS_DIR}/COMMON/UTIL
|
||||
${OPENAIR_NAS_DIR}/COMMON
|
||||
)
|
||||
|
||||
|
||||
################################################################################
|
||||
# api_user LIB
|
||||
################################################################################
|
||||
set(api_user_SRC
|
||||
${OPENAIR_NAS_DIR}/src/api/user/at_command.c
|
||||
${OPENAIR_NAS_DIR}/src/api/user/at_error.c
|
||||
${OPENAIR_NAS_DIR}/src/api/user/at_response.c
|
||||
${OPENAIR_NAS_DIR}/src/api/user/user_api.c
|
||||
${OPENAIR_NAS_DIR}/src/api/user/user_indication.c
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/at_command.c
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/at_error.c
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/at_response.c
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/user_api.c
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER/user_indication.c
|
||||
)
|
||||
|
||||
set(api_user_HDR
|
||||
${OPENAIR_NAS_DIR}/src/api/user/at_command.h
|
||||
${OPENAIR_NAS_DIR}/src/api/user/at_error.h
|
||||
${OPENAIR_NAS_DIR}/src/api/user/at_response.h
|
||||
${OPENAIR_NAS_DIR}/src/api/user/user_api.h
|
||||
${OPENAIR_NAS_DIR}/src/api/user/user_indication.h
|
||||
${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})
|
||||
target_include_directories(api_user PRIVATE ${OPENAIR_NAS_DIR}/src/api/user)
|
||||
target_include_directories(api_user PRIVATE ${OPENAIR_NAS_DIR}/UE/API/USER
|
||||
${OPENAIR_NAS_DIR}/UE
|
||||
${OPENAIR_NAS_DIR}/COMMON
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# api_usim LIB
|
||||
################################################################################
|
||||
set(api_usim_SRC
|
||||
${OPENAIR_NAS_DIR}/src/api/usim/aka_functions.c
|
||||
${OPENAIR_NAS_DIR}/src/api/usim/usim_api.c
|
||||
${OPENAIR_NAS_DIR}/UE/API/USIM/aka_functions.c
|
||||
${OPENAIR_NAS_DIR}/UE/API/USIM/usim_api.c
|
||||
)
|
||||
|
||||
set(api_usim_HDR
|
||||
${OPENAIR_NAS_DIR}/src/api/usim/aka_functions.h
|
||||
${OPENAIR_NAS_DIR}/src/api/usim/usim_api.h
|
||||
${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})
|
||||
target_include_directories(api_usim PRIVATE ${OPENAIR_NAS_DIR}/src/api/usim)
|
||||
target_include_directories(api_usim PRIVATE ${OPENAIR_NAS_DIR}/UE/API/USIM)
|
||||
|
||||
################################################################################
|
||||
# api_network LIB
|
||||
################################################################################
|
||||
set(api_network_SRC
|
||||
${OPENAIR_NAS_DIR}/src/api/network/as_message.c
|
||||
${OPENAIR_NAS_DIR}/src/api/network/nas_message.c
|
||||
${OPENAIR_NAS_DIR}/src/api/network/network_api.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/API/NETWORK/as_message.c
|
||||
${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}/src/api/network/as_message.h
|
||||
${OPENAIR_NAS_DIR}/src/api/network/nas_message.h
|
||||
${OPENAIR_NAS_DIR}/src/api/network/network_api.h
|
||||
${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})
|
||||
target_include_directories(api_network PRIVATE ${OPENAIR_NAS_DIR}/src/api/network)
|
||||
target_include_directories(api_network PRIVATE ${OPENAIR_NAS_DIR}/COMMON/API/NETWORK
|
||||
${OPENAIR_NAS_DIR}/COMMON
|
||||
)
|
||||
|
||||
|
||||
################################################################################
|
||||
# emm LIB
|
||||
################################################################################
|
||||
set(emm_SRC
|
||||
${OPENAIR_NAS_DIR}/src/emm//Attach.c
|
||||
${OPENAIR_NAS_DIR}/src/emm//Authentication.c
|
||||
${OPENAIR_NAS_DIR}/src/emm//Detach.c
|
||||
${OPENAIR_NAS_DIR}/src/emm//EmmCommon.c
|
||||
${OPENAIR_NAS_DIR}/src/emm//emm_data_ctx.c
|
||||
${OPENAIR_NAS_DIR}/src/emm//emm_main.c
|
||||
${OPENAIR_NAS_DIR}/src/emm//EmmStatusHdl.c
|
||||
${OPENAIR_NAS_DIR}/src/emm//Identification.c
|
||||
${OPENAIR_NAS_DIR}/src/emm//IdleMode.c
|
||||
${OPENAIR_NAS_DIR}/src/emm//LowerLayer.c
|
||||
${OPENAIR_NAS_DIR}/src/emm//SecurityModeControl.c
|
||||
${OPENAIR_NAS_DIR}/src/emm//ServiceRequestHdl.c
|
||||
${OPENAIR_NAS_DIR}/src/emm//TrackingAreaUpdate.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/Attach.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/Authentication.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/Detach.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/emm_main.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/EmmStatusHdl.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/Identification.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/IdleMode.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/LowerLayer.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SecurityModeControl.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/ServiceRequestHdl.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/TrackingAreaUpdate.c
|
||||
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/emm_msg.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AttachAccept.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AttachComplete.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AttachReject.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AttachAccept.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AttachComplete.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AttachReject.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AttachRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AuthenticationFailure.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AuthenticationReject.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AuthenticationRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AuthenticationResponse.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/CsServiceNotification.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/DetachAccept.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/DetachRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/DownlinkNasTransport.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/EmmInformation.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/emm_msg.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/EmmStatus.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/ExtendedServiceRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/GutiReallocationCommand.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/GutiReallocationComplete.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/IdentityRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/IdentityResponse.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/SecurityModeCommand.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/SecurityModeComplete.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/SecurityModeReject.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/ServiceReject.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/ServiceRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/TrackingAreaUpdateAccept.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/TrackingAreaUpdateComplete.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/TrackingAreaUpdateReject.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/TrackingAreaUpdateRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/UplinkNasTransport.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/emm_msg.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachAccept.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachComplete.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachAccept.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachComplete.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AttachRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AuthenticationFailure.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AuthenticationReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AuthenticationRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/AuthenticationResponse.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/CsServiceNotification.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/DetachAccept.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/DetachRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/DownlinkNasTransport.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/EmmInformation.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/emm_msg.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/EmmStatus.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/ExtendedServiceRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/GutiReallocationCommand.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/GutiReallocationComplete.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/IdentityRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/IdentityResponse.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/SecurityModeCommand.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/SecurityModeComplete.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/SecurityModeReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/ServiceReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/ServiceRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/TrackingAreaUpdateAccept.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/TrackingAreaUpdateComplete.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/TrackingAreaUpdateReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/TrackingAreaUpdateRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG/UplinkNasTransport.c
|
||||
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_as.c
|
||||
# ${OPENAIR_NAS_DIR}/src/emm/sap//emm_cn.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmCommonProcedureInitiated.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmDeregisteredAttachNeeded.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmDeregisteredAttemptingToAttach.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmDeregistered.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmDeregisteredInitiated.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmDeregisteredLimitedService.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmDeregisteredNoCellAvailable.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmDeregisteredNoImsi.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmDeregisteredNormalService.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmDeregisteredPlmnSearch.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_esm.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_fsm.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmNull.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_recv.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_reg.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmRegisteredAttemptingToUpdate.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmRegistered.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmRegisteredImsiDetachInitiated.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmRegisteredInitiated.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmRegisteredLimitedService.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmRegisteredNoCellAvailable.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmRegisteredNormalService.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmRegisteredPlmnSearch.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmRegisteredUpdateNeeded.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_sap.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_send.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmServiceRequestInitiated.c
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//EmmTrackingAreaUpdatingInitiated.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_as.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmDeregisteredAttachNeeded.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmDeregistered.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmDeregisteredInitiated.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmDeregisteredLimitedService.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmDeregisteredNoCellAvailable.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmDeregisteredNoImsi.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmDeregisteredNormalService.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmDeregisteredPlmnSearch.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_esm.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_fsm.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmNull.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_recv.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_reg.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmRegisteredAttemptingToUpdate.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmRegistered.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmRegisteredImsiDetachInitiated.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmRegisteredInitiated.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmRegisteredLimitedService.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmRegisteredNoCellAvailable.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmRegisteredNormalService.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmRegisteredPlmnSearch.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmRegisteredUpdateNeeded.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_sap.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/emm_send.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmServiceRequestInitiated.c
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c
|
||||
|
||||
)
|
||||
|
||||
set(emm_HDR
|
||||
${OPENAIR_NAS_DIR}/src/emm//EmmCommon.h
|
||||
${OPENAIR_NAS_DIR}/src/emm//emmData.h
|
||||
${OPENAIR_NAS_DIR}/src/emm//emm_main.h
|
||||
${OPENAIR_NAS_DIR}/src/emm//emm_proc.h
|
||||
${OPENAIR_NAS_DIR}/src/emm//IdleMode.h
|
||||
${OPENAIR_NAS_DIR}/src/emm//LowerLayer.h
|
||||
${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}/src/emm/msg/AttachAccept.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AttachComplete.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AttachReject.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AttachRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AuthenticationFailure.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AuthenticationReject.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AuthenticationRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/AuthenticationResponse.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/CsServiceNotification.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/DetachAccept.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/DetachRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/DownlinkNasTransport.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/emm_cause.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/EmmInformation.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/emm_msgDef.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/emm_msg.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/EmmStatus.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/ExtendedServiceRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/GutiReallocationCommand.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/GutiReallocationComplete.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/IdentityRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/IdentityResponse.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/NASSecurityModeCommand.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/NASSecurityModeComplete.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/SecurityModeReject.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/ServiceReject.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/ServiceRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/TrackingAreaUpdateAccept.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/TrackingAreaUpdateComplete.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/TrackingAreaUpdateReject.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/TrackingAreaUpdateRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg/UplinkNasTransport.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}/src/emm/sap//emm_asDef.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_as.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_cnDef.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_cn.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_esmDef.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_esm.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_fsm.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_recv.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_regDef.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_reg.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_sap.h
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap//emm_send.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
|
||||
|
||||
)
|
||||
|
||||
@@ -381,12 +381,13 @@ add_library(emm ${emm_SRC} ${emm_HDR})
|
||||
|
||||
target_include_directories(emm PRIVATE
|
||||
${OPENAIR_DIR}/common/utils/msc
|
||||
${OPENAIR_NAS_DIR}/src/api/usim
|
||||
${OPENAIR_NAS_DIR}/src/api/mme
|
||||
${OPENAIR_NAS_DIR}/src/emm
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap
|
||||
${OPENAIR_NAS_DIR}/src/ies
|
||||
${OPENAIR_DIR}/common/utils
|
||||
${OPENAIR_DIR}/openair2/COMMON
|
||||
${OPENAIR_NAS_DIR}/UE/API/USIM
|
||||
${OPENAIR_NAS_DIR}/UE/EMM
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES
|
||||
)
|
||||
|
||||
|
||||
@@ -394,258 +395,259 @@ target_include_directories(emm PRIVATE
|
||||
# esm LIB
|
||||
################################################################################
|
||||
set(esm_SRC
|
||||
${OPENAIR_NAS_DIR}/src/esm/esm_main.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/DedicatedEpsBearerContextActivation.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/DefaultEpsBearerContextActivation.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/EpsBearerContextDeactivation.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/esm_ebr.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/esm_ebr_context.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/esm_ip.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/esm_main.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/esm_pt.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/EsmStatusHdl.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/PdnConnectivity.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/PdnDisconnect.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/esm_main.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/DedicatedEpsBearerContextActivation.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/DefaultEpsBearerContextActivation.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/EpsBearerContextDeactivation.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/esm_ebr.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/esm_ebr_context.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/esm_ip.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/esm_main.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/esm_pt.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/EsmStatusHdl.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/PdnConnectivity.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/PdnDisconnect.c
|
||||
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ActivateDedicatedEpsBearerContextAccept.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ActivateDedicatedEpsBearerContextReject.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ActivateDedicatedEpsBearerContextRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ActivateDefaultEpsBearerContextAccept.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ActivateDefaultEpsBearerContextReject.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ActivateDefaultEpsBearerContextRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/BearerResourceAllocationReject.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/BearerResourceAllocationRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/BearerResourceModificationReject.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/BearerResourceModificationRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/DeactivateEpsBearerContextAccept.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/DeactivateEpsBearerContextRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/EsmInformationRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/EsmInformationResponse.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/esm_msg.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/EsmStatus.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ModifyEpsBearerContextAccept.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ModifyEpsBearerContextReject.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ModifyEpsBearerContextRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/PdnConnectivityReject.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/PdnConnectivityRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/PdnDisconnectReject.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/PdnDisconnectRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/BearerResourceAllocationReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/BearerResourceAllocationRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/BearerResourceModificationReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/BearerResourceModificationRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/EsmInformationRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/EsmInformationResponse.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/esm_msg.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/EsmStatus.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ModifyEpsBearerContextReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/PdnConnectivityReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/PdnConnectivityRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/PdnDisconnectReject.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/PdnDisconnectRequest.c
|
||||
|
||||
${OPENAIR_NAS_DIR}/src/esm/sap/esm_recv.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/sap/esm_sap.c
|
||||
${OPENAIR_NAS_DIR}/src/esm/sap/esm_send.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP/esm_recv.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP/esm_sap.c
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP/esm_send.c
|
||||
)
|
||||
|
||||
set(esm_HDR
|
||||
${OPENAIR_NAS_DIR}/src/esm/esm_main.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ActivateDedicatedEpsBearerContextAccept.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ActivateDedicatedEpsBearerContextReject.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ActivateDedicatedEpsBearerContextRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ActivateDefaultEpsBearerContextAccept.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ActivateDefaultEpsBearerContextReject.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ActivateDefaultEpsBearerContextRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/BearerResourceAllocationReject.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/BearerResourceAllocationRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/BearerResourceModificationReject.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/BearerResourceModificationRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/DeactivateEpsBearerContextAccept.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/DeactivateEpsBearerContextRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/esm_cause.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/EsmInformationRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/EsmInformationResponse.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/esm_msgDef.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/esm_msg.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/EsmStatus.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ModifyEpsBearerContextAccept.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ModifyEpsBearerContextReject.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/ModifyEpsBearerContextRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/PdnConnectivityReject.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/PdnConnectivityRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/PdnDisconnectReject.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg/PdnDisconnectRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/sap/esm_recv.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/sap/esm_sap.h
|
||||
${OPENAIR_NAS_DIR}/src/esm/sap/esm_send.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
|
||||
)
|
||||
|
||||
add_library(esm ${esm_SRC} ${esm_HDR})
|
||||
|
||||
target_include_directories(esm PRIVATE
|
||||
${OPENAIR_NAS_DIR}/src/api/user
|
||||
${OPENAIR_NAS_DIR}/src/api/mme
|
||||
${OPENAIR_NAS_DIR}/src/esm
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg
|
||||
${OPENAIR_NAS_DIR}/src/esm/sap
|
||||
${OPENAIR_NAS_DIR}/src/ies
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER
|
||||
${OPENAIR_NAS_DIR}/UE/ESM
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# ies LIB
|
||||
################################################################################
|
||||
set(ies_SRC
|
||||
${OPENAIR_NAS_DIR}/src/ies/AccessPointName.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/AdditionalUpdateResult.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/AdditionalUpdateType.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/ApnAggregateMaximumBitRate.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/AuthenticationFailureParameter.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/AuthenticationParameterAutn.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/AuthenticationParameterRand.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/AuthenticationResponseParameter.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/CipheringKeySequenceNumber.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/Cli.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/CsfbResponse.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/DaylightSavingTime.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/DetachType.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/DrxParameter.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EmergencyNumberList.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EmmCause.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsAttachResult.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsAttachType.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsBearerContextStatus.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsBearerIdentity.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsMobileIdentity.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsNetworkFeatureSupport.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsQualityOfService.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsUpdateResult.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsUpdateType.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EsmCause.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EsmInformationTransferFlag.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/EsmMessageContainer.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/GprsTimer.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/GutiType.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/IdentityType2.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/ImeisvRequest.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/KsiAndSequenceNumber.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/LcsClientIdentity.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/LcsIndicator.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/LinkedEpsBearerIdentity.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/LlcServiceAccessPointIdentifier.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/LocationAreaIdentification.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/MessageType.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/MobileIdentity.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/MobileStationClassmark2.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/MobileStationClassmark3.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/MsNetworkCapability.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/NasKeySetIdentifier.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/NasMessageContainer.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/NasRequestType.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/NasSecurityAlgorithms.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/NetworkName.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/Nonce.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/PacketFlowIdentifier.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/PagingIdentity.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/PdnAddress.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/PdnType.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/PlmnList.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/ProcedureTransactionIdentity.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/ProtocolConfigurationOptions.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/ProtocolDiscriminator.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/PTmsiSignature.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/QualityOfService.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/RadioPriority.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/SecurityHeaderType.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/ServiceType.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/ShortMac.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/SsCode.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/SupportedCodecList.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/TimeZoneAndTime.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/TimeZone.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/TmsiStatus.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/TrackingAreaIdentity.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/TrackingAreaIdentityList.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/TrafficFlowAggregateDescription.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/TrafficFlowTemplate.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/TransactionIdentifier.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/UeNetworkCapability.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/UeRadioCapabilityInformationUpdateNeeded.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/UeSecurityCapability.c
|
||||
${OPENAIR_NAS_DIR}/src/ies/VoiceDomainPreferenceAndUeUsageSetting.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AccessPointName.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AdditionalUpdateResult.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AdditionalUpdateType.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ApnAggregateMaximumBitRate.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AuthenticationFailureParameter.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AuthenticationParameterAutn.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AuthenticationParameterRand.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/AuthenticationResponseParameter.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/CipheringKeySequenceNumber.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/Cli.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/CsfbResponse.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/DaylightSavingTime.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/DetachType.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/DrxParameter.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EmergencyNumberList.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EmmCause.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsAttachResult.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsAttachType.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsBearerContextStatus.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsBearerIdentity.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsMobileIdentity.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsNetworkFeatureSupport.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsQualityOfService.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsUpdateResult.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EpsUpdateType.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EsmCause.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EsmInformationTransferFlag.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/EsmMessageContainer.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/GprsTimer.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/GutiType.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/IdentityType2.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ImeisvRequest.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/KsiAndSequenceNumber.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LcsClientIdentity.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LcsIndicator.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LinkedEpsBearerIdentity.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LlcServiceAccessPointIdentifier.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/LocationAreaIdentification.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MessageType.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MobileIdentity.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MobileStationClassmark2.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MobileStationClassmark3.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MsNetworkCapability.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/MsNetworkFeatureSupport.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NasKeySetIdentifier.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NasMessageContainer.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NasRequestType.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NasSecurityAlgorithms.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/NetworkName.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/Nonce.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PacketFlowIdentifier.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PagingIdentity.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PdnAddress.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PdnType.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PlmnList.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ProcedureTransactionIdentity.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ProtocolConfigurationOptions.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ProtocolDiscriminator.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/PTmsiSignature.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/QualityOfService.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/RadioPriority.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/SecurityHeaderType.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ServiceType.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/ShortMac.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/SsCode.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/SupportedCodecList.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TimeZoneAndTime.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TimeZone.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TmsiStatus.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TrackingAreaIdentity.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TrackingAreaIdentityList.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TrafficFlowAggregateDescription.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TrafficFlowTemplate.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/TransactionIdentifier.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/UeNetworkCapability.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/UeSecurityCapability.c
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.c
|
||||
)
|
||||
set(ies_HDR
|
||||
${OPENAIR_NAS_DIR}/src/ies/AccessPointName.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/AdditionalUpdateResult.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/AdditionalUpdateType.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/ApnAggregateMaximumBitRate.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/AuthenticationFailureParameter.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/AuthenticationParameterAutn.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/AuthenticationParameterRand.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/AuthenticationResponseParameter.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/CipheringKeySequenceNumber.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/Cli.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/CsfbResponse.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/DaylightSavingTime.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/DetachType.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/DrxParameter.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EmergencyNumberList.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EmmCause.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsAttachResult.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsAttachType.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsBearerContextStatus.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsBearerIdentity.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsMobileIdentity.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsNetworkFeatureSupport.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsQualityOfService.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsUpdateResult.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EpsUpdateType.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EsmCause.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EsmInformationTransferFlag.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/EsmMessageContainer.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/GprsTimer.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/GutiType.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/IdentityType2.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/ImeisvRequest.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/KsiAndSequenceNumber.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/LcsClientIdentity.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/LcsIndicator.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/LinkedEpsBearerIdentity.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/LlcServiceAccessPointIdentifier.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/LocationAreaIdentification.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/MessageType.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/MobileIdentity.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/MobileStationClassmark2.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/MobileStationClassmark3.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/MsNetworkCapability.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/NasKeySetIdentifier.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/NasMessageContainer.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/NasRequestType.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/NasSecurityAlgorithms.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/NetworkName.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/Nonce.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/PacketFlowIdentifier.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/PagingIdentity.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/PdnAddress.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/PdnType.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/PlmnList.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/ProcedureTransactionIdentity.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/ProtocolConfigurationOptions.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/ProtocolDiscriminator.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/PTmsiSignature.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/QualityOfService.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/RadioPriority.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/SecurityHeaderType.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/ServiceType.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/ShortMac.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/SsCode.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/SupportedCodecList.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/TimeZoneAndTime.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/TimeZone.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/TmsiStatus.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/TrackingAreaIdentity.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/TrackingAreaIdentityList.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/TrafficFlowAggregateDescription.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/TrafficFlowTemplate.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/TransactionIdentifier.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/UeNetworkCapability.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/UeRadioCapabilityInformationUpdateNeeded.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/UeSecurityCapability.h
|
||||
${OPENAIR_NAS_DIR}/src/ies/VoiceDomainPreferenceAndUeUsageSetting.h
|
||||
${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})
|
||||
|
||||
target_include_directories(ies PRIVATE
|
||||
${OPENAIR_NAS_DIR}/src/ies
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES
|
||||
)
|
||||
|
||||
|
||||
@@ -658,23 +660,23 @@ include_directories(
|
||||
${OPENAIRCN_DIR}/COMMON
|
||||
${OPENAIRCN_DIR}/SECU
|
||||
${OPENAIR_NAS_DIR}/src
|
||||
${OPENAIR_NAS_DIR}/src/api/network
|
||||
${OPENAIR_NAS_DIR}/src/api/user
|
||||
${OPENAIR_NAS_DIR}/src/emm
|
||||
${OPENAIR_NAS_DIR}/src/emm/msg
|
||||
${OPENAIR_NAS_DIR}/src/emm/sap
|
||||
${OPENAIR_NAS_DIR}/src/esm
|
||||
${OPENAIR_NAS_DIR}/src/esm/sap
|
||||
${OPENAIR_NAS_DIR}/src/esm/msg
|
||||
${OPENAIR_NAS_DIR}/src/ies
|
||||
${OPENAIR_NAS_DIR}/src/include
|
||||
${OPENAIR_NAS_DIR}/src/util )
|
||||
${OPENAIR_NAS_DIR}/COMMON
|
||||
${OPENAIR_NAS_DIR}/COMMON/API/NETWORK
|
||||
${OPENAIR_NAS_DIR}/UE/API/USER
|
||||
${OPENAIR_NAS_DIR}/UE/EMM
|
||||
${OPENAIR_NAS_DIR}/COMMON/EMM/MSG
|
||||
${OPENAIR_NAS_DIR}/UE/EMM/SAP
|
||||
${OPENAIR_NAS_DIR}/UE/ESM
|
||||
${OPENAIR_NAS_DIR}/UE/ESM/SAP
|
||||
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG
|
||||
${OPENAIR_NAS_DIR}/COMMON/IES
|
||||
${OPENAIR_NAS_DIR}/COMMON/UTIL )
|
||||
|
||||
ADD_EXECUTABLE(at_nas_ue ${OPENAIR_NAS_DIR}/src/UEprocess.c
|
||||
${OPENAIR_NAS_DIR}/src/nas_network.c
|
||||
${OPENAIR_NAS_DIR}/src/nas_parser.c
|
||||
${OPENAIR_NAS_DIR}/src/nas_proc.c
|
||||
${OPENAIR_NAS_DIR}/src/nas_user.c
|
||||
ADD_EXECUTABLE(at_nas_ue ${OPENAIR_NAS_DIR}/UE/UEprocess.c
|
||||
${OPENAIR_NAS_DIR}/UE/nas_network.c
|
||||
${OPENAIR_NAS_DIR}/UE/nas_parser.c
|
||||
${OPENAIR_NAS_DIR}/UE/nas_proc.c
|
||||
${OPENAIR_NAS_DIR}/UE/nas_user.c
|
||||
)
|
||||
|
||||
target_link_libraries (at_nas_ue
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||
set ( ADDR_CONF False )
|
||||
set ( DEBUG_OMG False )
|
||||
set ( DISABLE_XER_PRINT False )
|
||||
set ( DRIVER2013 True )
|
||||
set ( EMOS False )
|
||||
set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False)
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( ENB_MODE True )
|
||||
set ( EXMIMO_IOT True )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False)
|
||||
set ( LINUX_LIST False )
|
||||
set ( LINUX True )
|
||||
set ( LOCALIZATION False )
|
||||
set ( LOG_NO_THREAD 1 )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX True )
|
||||
set ( NAS_BUILT_IN_UE False)
|
||||
set ( NAS_MME False )
|
||||
set ( NAS_UE False )
|
||||
set ( NB_ANTENNAS_RX "2" )
|
||||
set ( NB_ANTENNAS_TX "2" )
|
||||
set ( NB_ANTENNAS_TXRX "2" )
|
||||
set ( NEW_FFT True )
|
||||
set ( NO_RRM True )
|
||||
set ( OAI_EMU True )
|
||||
set ( OAISIM True )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET True )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK True )
|
||||
set ( OPENAIR1 True )
|
||||
set ( OPENAIR2 True )
|
||||
set ( OPENAIR_EMU False )
|
||||
set ( OPENAIR_LTE True )
|
||||
set ( PACKAGE_NAME "oaisim" )
|
||||
set ( PBS_SIM False )
|
||||
set ( PDCP_USE_NETLINK True )
|
||||
set ( PC_DSP True )
|
||||
set ( PC_TARGET True )
|
||||
set ( PDCP_MSG_PRINT False )
|
||||
set ( PERFECT_CE False )
|
||||
set ( PHY_ABSTRACTION True )
|
||||
set ( PHY_CONTEXT False )
|
||||
set ( PHY_EMUL False )
|
||||
set ( PHYSIM True )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD "False" )
|
||||
set ( RRC_ASN1_VERSION "Rel10" )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
set ( SECU False )
|
||||
set ( SMBV False )
|
||||
set ( SPECTRA False )
|
||||
set ( TEST_OMG False )
|
||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME "R10" )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
@@ -0,0 +1,87 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||
set ( ADDR_CONF False )
|
||||
set ( DEBUG_OMG False )
|
||||
set ( DISABLE_XER_PRINT False )
|
||||
set ( DRIVER2013 True )
|
||||
set ( EMOS False )
|
||||
set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False)
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( ENB_MODE True )
|
||||
set ( EXMIMO_IOT True )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False)
|
||||
set ( LINUX_LIST False )
|
||||
set ( LINUX True )
|
||||
set ( LOCALIZATION False )
|
||||
set ( LOG_NO_THREAD 1 )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX True )
|
||||
set ( NAS_BUILT_IN_UE False)
|
||||
set ( NAS_MME False )
|
||||
set ( NAS_UE False )
|
||||
set ( NB_ANTENNAS_RX "2" )
|
||||
set ( NB_ANTENNAS_TX "2" )
|
||||
set ( NB_ANTENNAS_TXRX "2" )
|
||||
set ( NEW_FFT True )
|
||||
set ( NO_RRM True )
|
||||
set ( OAI_EMU True )
|
||||
set ( OAISIM True )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET True )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK True )
|
||||
set ( OPENAIR1 True )
|
||||
set ( OPENAIR2 True )
|
||||
set ( OPENAIR_EMU False )
|
||||
set ( OPENAIR_LTE True )
|
||||
set ( PACKAGE_NAME "oaisim" )
|
||||
set ( PBS_SIM False )
|
||||
set ( PDCP_USE_NETLINK True )
|
||||
set ( PC_DSP True )
|
||||
set ( PC_TARGET True )
|
||||
set ( PDCP_MSG_PRINT False )
|
||||
set ( PERFECT_CE False )
|
||||
set ( PHY_ABSTRACTION True )
|
||||
set ( PHY_CONTEXT False )
|
||||
set ( PHY_EMUL False )
|
||||
set ( PHYSIM True )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD "False" )
|
||||
set ( RRC_ASN1_VERSION "Rel10" )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
set ( SECU False )
|
||||
set ( SMBV False )
|
||||
set ( SPECTRA False )
|
||||
set ( TEST_OMG False )
|
||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME "R10" )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
set ( XFORMS False )
|
||||
set ( PRINT_STATS False )
|
||||
set ( RRC_ASN1_VERSION "Rel10")
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
|
||||
@@ -0,0 +1,82 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||
set ( ADDR_CONF False )
|
||||
set ( DEBUG_OMG False )
|
||||
set ( DISABLE_XER_PRINT False )
|
||||
set ( DRIVER2013 True )
|
||||
set ( EMOS False )
|
||||
set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False)
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( ENB_MODE True )
|
||||
set ( EXMIMO_IOT True )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False)
|
||||
set ( LINUX_LIST False )
|
||||
set ( LINUX True )
|
||||
set ( LOCALIZATION False )
|
||||
set ( LOG_NO_THREAD 1 )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX True )
|
||||
set ( NAS_BUILT_IN_UE False)
|
||||
set ( NAS_MME False )
|
||||
set ( NAS_UE False )
|
||||
set ( NB_ANTENNAS_RX "2" )
|
||||
set ( NB_ANTENNAS_TX "2" )
|
||||
set ( NB_ANTENNAS_TXRX "2" )
|
||||
set ( NEW_FFT True )
|
||||
set ( NO_RRM True )
|
||||
set ( OAI_EMU True )
|
||||
set ( OAISIM True )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET True )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK True )
|
||||
set ( OPENAIR1 True )
|
||||
set ( OPENAIR2 True )
|
||||
set ( OPENAIR_EMU False )
|
||||
set ( OPENAIR_LTE True )
|
||||
set ( PACKAGE_NAME "oaisim" )
|
||||
set ( PBS_SIM False )
|
||||
set ( PDCP_USE_NETLINK True )
|
||||
set ( PC_DSP True )
|
||||
set ( PC_TARGET True )
|
||||
set ( PDCP_MSG_PRINT False )
|
||||
set ( PERFECT_CE False )
|
||||
set ( PHY_ABSTRACTION True )
|
||||
set ( PHY_CONTEXT False )
|
||||
set ( PHY_EMUL False )
|
||||
set ( PHYSIM True )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD "False" )
|
||||
set ( RRC_ASN1_VERSION "Rel10" )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
set ( SECU False )
|
||||
set ( SMBV False )
|
||||
set ( SPECTRA False )
|
||||
set ( TEST_OMG False )
|
||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME "R10" )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
@@ -0,0 +1,87 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||
set ( ADDR_CONF False )
|
||||
set ( DEBUG_OMG False )
|
||||
set ( DISABLE_XER_PRINT False )
|
||||
set ( DRIVER2013 True )
|
||||
set ( EMOS False )
|
||||
set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False)
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( ENB_MODE True )
|
||||
set ( EXMIMO_IOT True )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False)
|
||||
set ( LINUX_LIST False )
|
||||
set ( LINUX True )
|
||||
set ( LOCALIZATION False )
|
||||
set ( LOG_NO_THREAD 1 )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX True )
|
||||
set ( NAS_BUILT_IN_UE False)
|
||||
set ( NAS_MME False )
|
||||
set ( NAS_UE False )
|
||||
set ( NB_ANTENNAS_RX "2" )
|
||||
set ( NB_ANTENNAS_TX "2" )
|
||||
set ( NB_ANTENNAS_TXRX "2" )
|
||||
set ( NEW_FFT True )
|
||||
set ( NO_RRM True )
|
||||
set ( OAI_EMU True )
|
||||
set ( OAISIM True )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET True )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK True )
|
||||
set ( OPENAIR1 True )
|
||||
set ( OPENAIR2 True )
|
||||
set ( OPENAIR_EMU False )
|
||||
set ( OPENAIR_LTE True )
|
||||
set ( PACKAGE_NAME "oaisim" )
|
||||
set ( PBS_SIM False )
|
||||
set ( PDCP_USE_NETLINK True )
|
||||
set ( PC_DSP True )
|
||||
set ( PC_TARGET True )
|
||||
set ( PDCP_MSG_PRINT False )
|
||||
set ( PERFECT_CE False )
|
||||
set ( PHY_ABSTRACTION True )
|
||||
set ( PHY_CONTEXT False )
|
||||
set ( PHY_EMUL False )
|
||||
set ( PHYSIM True )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD "False" )
|
||||
set ( RRC_ASN1_VERSION "Rel10" )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
set ( SECU False )
|
||||
set ( SMBV False )
|
||||
set ( SPECTRA False )
|
||||
set ( TEST_OMG False )
|
||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME "R10" )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
set ( XFORMS False )
|
||||
set ( PRINT_STATS False )
|
||||
set ( RRC_ASN1_VERSION "Rel10")
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
|
||||
@@ -7,81 +7,109 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tdir=$OPENAIR_DIR/cmake_targets/autotests
|
||||
|
||||
results_file=$tdir/log/compilation_autotests.xml
|
||||
|
||||
# include the jUnit-like logging functions
|
||||
source $OPENAIR_DIR/cmake_targets/tools/test_helper
|
||||
|
||||
test_compile() {
|
||||
xUnit_start
|
||||
test_name=$1
|
||||
compile_prog=$2
|
||||
exec_prog=$3
|
||||
build_dir=$tdir/$1/build
|
||||
log_file=$tdir/log/$1.txt
|
||||
target=$5
|
||||
echo "Compiling test case $test_name. Log file = $log_file"
|
||||
rm -fr $build_dir
|
||||
mkdir -p $tdir/$1/build
|
||||
cd $tdir/$1/build
|
||||
cd $build_dir
|
||||
{
|
||||
cmake ..
|
||||
rm -f $3
|
||||
make -j4 $2
|
||||
} > $tdir/log/$1.txt 2>&1
|
||||
if [ -s $3 ] ; then
|
||||
cp $3 $tdir/bin/`basename $3`.$1
|
||||
echo_success "$1 test compiled"
|
||||
xUnit_success "compilation" $1
|
||||
rm -f $exec_prog
|
||||
make -j`nproc` $compile_prog
|
||||
} > $log_file 2>&1
|
||||
if [ -s $exec_prog ] ; then
|
||||
cp $exec_prog $tdir/bin/`basename $exec_prog`.$target.$test_name
|
||||
echo_success "$test_name $exec_prog $target compiled"
|
||||
xUnit_success "compilation" $test_name "PASS" 1
|
||||
else
|
||||
echo_error "$1 test compilation failed"
|
||||
xUnit_fail "compilation" $1
|
||||
echo_error "$test_name $exec_prog $target compilation failed"
|
||||
xUnit_fail "compilation" $test_name "FAIL" 1
|
||||
fi
|
||||
}
|
||||
|
||||
tdir=$OPENAIR_DIR/cmake_targets/autotests
|
||||
mkdir -p $tdir/bin $tdir/log
|
||||
|
||||
updated=$(svn st -q $OPENAIR_DIR)
|
||||
if [ "$updated" != "" ] ; then
|
||||
echo_warning "some files are not in svn: $updated"
|
||||
echo_warning "some files are not in svn:\n $updated"
|
||||
fi
|
||||
|
||||
cd $tdir
|
||||
|
||||
test_compile \
|
||||
test.0101 oaisim \
|
||||
oaisim $tdir/bin/oaisim.r8
|
||||
test.0101 oaisim_nos1 \
|
||||
oaisim_nos1 $tdir/bin/oaisim.r8 rel8.nos1
|
||||
|
||||
test_compile \
|
||||
test.0102 oaisim \
|
||||
oaisim $tdir/bin/oaisim.r8.nas
|
||||
test.0102 oaisim_nos1 \
|
||||
oaisim_nos1 $tdir/bin/oaisim.r8.nas rel8.nos1.nas
|
||||
|
||||
cp $tdir/test.0103/CMakeLists.txt.Rel8 $tdir/test.0103/CMakeLists.txt
|
||||
test_compile \
|
||||
test.0103 lte-softmodem \
|
||||
lte-softmodem $tdir/bin/lte-softmodem.r8.rf
|
||||
lte-softmodem $tdir/bin/lte-softmodem.r8.rf Rel8.EXMIMO
|
||||
|
||||
cp $tdir/test.0103/CMakeLists.txt.Rel10 $tdir/test.0103/CMakeLists.txt
|
||||
test_compile \
|
||||
test.0103 lte-softmodem \
|
||||
lte-softmodem $tdir/bin/lte-softmodem.r10.rf Rel10.EXMIMO
|
||||
|
||||
cp $tdir/test.0103/CMakeLists.txt.USRP $tdir/test.0103/CMakeLists.txt
|
||||
test_compile \
|
||||
test.0103 lte-softmodem \
|
||||
lte-softmodem $tdir/bin/lte-softmodem.r10.rf Rel10.USRP
|
||||
|
||||
test_compile \
|
||||
test.0104 dlsim \
|
||||
dlsim $tdir/bin/dlsim
|
||||
dlsim $tdir/bin/dlsim dlsim.Rel8
|
||||
|
||||
test_compile \
|
||||
test.0104 ulsim \
|
||||
ulsim $tdir/bin/ulsim
|
||||
ulsim $tdir/bin/ulsim ulsim.Rel8
|
||||
|
||||
test_compile \
|
||||
test.0106 oaisim \
|
||||
oaisim $tdir/bin/oaisim.r8.itti
|
||||
oaisim $tdir/bin/oaisim.r8.itti Rel8.itti
|
||||
|
||||
test_compile \
|
||||
test.0107 oaisim \
|
||||
oaisim $tdir/bin/oaisim.r10
|
||||
test.0107 oaisim_nos1 \
|
||||
oaisim_nos1 $tdir/bin/oaisim.r10 Rel10.nos1
|
||||
|
||||
test_compile \
|
||||
test.0108 oaisim \
|
||||
oaisim $tdir/bin/oaisim.r10.itti
|
||||
oaisim $tdir/bin/oaisim.r10.itti rel10.itti
|
||||
|
||||
test_compile \
|
||||
test.0114 oaisim \
|
||||
oaisim $tdir/bin/oaisim.r8.itti.ral
|
||||
#test_compile \ LG: RAL REMOVED
|
||||
# test.0114 oaisim \
|
||||
# oaisim $tdir/bin/oaisim.r8.itti.ral rel8.itti.ral
|
||||
|
||||
test_compile \
|
||||
test.0115 oaisim \
|
||||
oaisim $tdir/bin/oaisim.r10.itti.ral
|
||||
#test_compile \ LG: RAL REMOVED
|
||||
# test.0115 oaisim \
|
||||
# oaisim $tdir/bin/oaisim.r10.itti.ral rel10.itti.ral
|
||||
|
||||
test_compile \
|
||||
test.0120 nasmesh \
|
||||
CMakeFiles/nasmesh/nasmesh.ko $tdir/bin/nasmesh.ko
|
||||
CMakeFiles/nasmesh/nasmesh.ko $tdir/bin/nasmesh.ko
|
||||
|
||||
test_compile \
|
||||
test.0130 rrh_gw \
|
||||
rrh_gw $tdir/bin/rrh_gw
|
||||
|
||||
# write the test results into a file
|
||||
xUnit_write "$tdir/log/compilation_autotests.xml"
|
||||
xUnit_write "$results_file"
|
||||
|
||||
echo "Test Results are written to $results_file"
|
||||
|
||||
@@ -1,12 +1,102 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -s $OPENAIR_DIR/cmake_targets/tools/build_helper ] ; then
|
||||
source $OPENAIR_DIR/cmake_targets/tools/build_helper
|
||||
if [ -s $OPENAIR_DIR/cmake_targets/tools/test_helper ] ; then
|
||||
source $OPENAIR_DIR/cmake_targets/tools/test_helper
|
||||
else
|
||||
echo "Error: no file in the file tree: is OPENAIR_DIR variable set?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
SUDO="sudo -E "
|
||||
tdir=$OPENAIR_DIR/cmake_targets/autotests
|
||||
mkdir -p $tdir/bin $tdir/log
|
||||
results_file="$tdir/log/execution_autotests.xml"
|
||||
|
||||
updated=$(svn st -q $OPENAIR_DIR)
|
||||
if [ "$updated" != "" ] ; then
|
||||
echo "some files are not in svn:\n $updated"
|
||||
fi
|
||||
|
||||
cd $tdir
|
||||
|
||||
|
||||
#\param $1 -> name of test case
|
||||
#\param $2 -> name of compilation program
|
||||
#\param $3 -> arguments for compilation program
|
||||
#\param $4 -> name of pre-executable to install kernel modules, etc
|
||||
#\param $5 -> arguments of pre-executable
|
||||
#\param $6 -> name of executable
|
||||
#\param $7 -> arguments for running the program
|
||||
#\param $8 -> search expression
|
||||
#\param $9 -> number of runs
|
||||
|
||||
test_compile_and_run() {
|
||||
xUnit_start
|
||||
test_case_name=$1
|
||||
log_dir=$tdir/log
|
||||
log_file=$tdir/log/test.$1.txt
|
||||
compile_prog=$2
|
||||
compile_args=$3
|
||||
pre_exec_file=$4
|
||||
pre_exec_args=$5
|
||||
exec_args=$7
|
||||
search_expr=$8
|
||||
nruns=$9
|
||||
build_dir=$tdir/$1/build
|
||||
exec_file=$build_dir/$6
|
||||
|
||||
#Temporary log file where execution log is stored.
|
||||
temp_exec_log=$log_dir/temp_log.txt
|
||||
|
||||
echo "Compiling test case $test_case_name. Log file = $log_file"
|
||||
|
||||
rm -fr $build_dir
|
||||
mkdir -p $build_dir
|
||||
|
||||
# echo "log_dir = $log_dir"
|
||||
# echo "log_file = $log_file"
|
||||
# echo "exec_file = $exec_file"
|
||||
# echo "args = $args"
|
||||
# echo "search_expr = $search_expr"
|
||||
# echo "pre_exec_file = $pre_exec_file"
|
||||
|
||||
echo "<COMPILATION LOG>" > $log_file
|
||||
cd $build_dir
|
||||
{
|
||||
cmake ..
|
||||
#rm -fv $exec_file
|
||||
make -j`nproc` $compile_prog
|
||||
}>> $log_file 2>&1
|
||||
echo "</COMPILATION LOG>" >> $log_file 2>&1
|
||||
|
||||
for (( run_index=1; run_index <= $nruns; run_index++ ))
|
||||
do
|
||||
|
||||
echo "Executing test case $test_case_name, Run Index = $run_index, Log file = $log_file"
|
||||
|
||||
echo "-----------------------------------------------------------------------------" >> $log_file 2>&1
|
||||
echo "<EXECUTION LOG Run = $run_index >" >> $log_file 2>&1
|
||||
|
||||
|
||||
source $pre_exec_file $pre_exec_args >> $log_file 2>&1
|
||||
$exec_file $exec_args > $temp_exec_log 2>&1
|
||||
cat $temp_exec_log >> $log_file 2>&1
|
||||
echo "</EXECUTION LOG Run = $run_index >" >> $log_file 2>&1
|
||||
|
||||
search_result=`grep "$search_expr" $temp_exec_log`
|
||||
|
||||
if [ -z "$search_result" ]; then
|
||||
xUnit_fail "execution" "$test_case_name" "FAIL" "$run_index"
|
||||
else
|
||||
xUnit_success "execution" "$test_case_name" "PASS" "$run_index"
|
||||
fi
|
||||
|
||||
# End of for loop
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
dbin=$OPENAIR_DIR/cmake_targets/autotests/bin
|
||||
dlog=$OPENAIR_DIR/cmake_targets/autotests/log
|
||||
|
||||
@@ -14,6 +104,9 @@ run_test() {
|
||||
case=case$1; shift
|
||||
cmd=$1; shift
|
||||
expected=$3; shift
|
||||
echo "expected = $expected"
|
||||
exit
|
||||
|
||||
$cmd > $dlog/$case.txt 2>&1
|
||||
if [ $expected = "true" ] ; then
|
||||
if $* $dlog/$case.txt; then
|
||||
@@ -30,7 +123,29 @@ else
|
||||
fi
|
||||
}
|
||||
|
||||
run_test 0200 "$dbin/oaisim.r8 -a -A AWGN -n 100" false grep -q '(Segmentation.fault)|(Exiting)|(FATAL)'
|
||||
#$1 -> name of test case
|
||||
#$2 -> name of compilation program
|
||||
#$3 -> arguments for compilation program
|
||||
#$4 -> name of pre-executable to install kernel modules, etc
|
||||
#$5 -> arguments of pre-executable
|
||||
#$6 -> name of executable
|
||||
#$7 -> arguments for running the program
|
||||
#$8 -> search expression
|
||||
#$9 -> number of runs
|
||||
|
||||
run_test 0201 "$dbin/oaisim.r8 -a -A AWGN -n 100" false fgrep -q '[E]'
|
||||
test_compile_and_run 0200 "oaisim_nos1" "" "$OPENAIR_DIR/cmake_targets/tools/init_nas_nos1" "" "oaisim_nos1" " -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -b1 -u1 -n1000" "RRC_CONN" 3
|
||||
|
||||
test_compile_and_run 0201 "oaisim_nos1" "" "$OPENAIR_DIR/cmake_targets/tools/init_nas_nos1" "" "oaisim_nos1" " -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -b1 -u1 -a -n1000" "RRC_CONN" 3
|
||||
|
||||
#test_compile_and_run 0200 "oaisim_nos1" "" "$OPENAIR_DIR/cmake_targets/tools/init_nas_nos1" "" "oaisim_nos1" " -O /home/calisson/rohit/oai_snav/taets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -b1 -u1 -a " "RRC_CONN" 3
|
||||
|
||||
#run_test 0200 "$dbin/oaisim.r8 -a -A AWGN -n 100" false grep -q '(Segmentation.fault)|(Exiting)|(FATAL)'
|
||||
|
||||
#run_test 0201 "$dbin/oaisim.r8 -a -A AWGN -n 100" false fgrep -q '[E]'
|
||||
|
||||
# write the test results into a file
|
||||
|
||||
xUnit_write "$results_file"
|
||||
|
||||
echo "Test Results are written to $results_file"
|
||||
|
||||
|
||||
@@ -10,26 +10,20 @@ set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI False )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False )
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_GTPU_IN_KERNEL False )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_USE_NETFILTER_FOR_SGI False )
|
||||
set ( ENABLE_USE_PCAP_FOR_SGI False )
|
||||
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False )
|
||||
set ( ENABLE_VCD_FIFO True )
|
||||
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( ENB_MODE True )
|
||||
set ( EPC_BUILD False )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False )
|
||||
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
|
||||
set ( LINK_PDCP_TO_GTPV1U False )
|
||||
set ( LINUX_LIST False )
|
||||
set ( LINUX True )
|
||||
set ( LOCALIZATION False )
|
||||
@@ -37,7 +31,10 @@ set ( LOG_NO_THREAD True )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
@@ -55,7 +52,7 @@ set ( OAI_EMU True )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK False )
|
||||
set ( OAISIM True )
|
||||
set ( OPENAIR1 False )
|
||||
set ( OPENAIR1 True )
|
||||
set ( OPENAIR2 True )
|
||||
set ( OPENAIR_EMU False )
|
||||
set ( OPENAIR_LTE True )
|
||||
@@ -72,7 +69,7 @@ set ( PHY_EMUL False )
|
||||
set ( PHYSIM False )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD False )
|
||||
set ( RF_BOARD "False" )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_ASN1_VERSION Rel8 )
|
||||
set ( RRC_DEFAULT_RAB_IS_AM False )
|
||||
@@ -102,8 +99,8 @@ set ( TRACE_RLC_UM_RX False )
|
||||
set ( TRACE_RLC_UM_SEGMENT False )
|
||||
set ( TRACE_RLC_UM_TX_STATUS False )
|
||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME False )
|
||||
set ( USE_MME "R8" )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT True )
|
||||
set ( XFORMS False )
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
|
||||
@@ -10,17 +10,12 @@ set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI False )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False )
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_GTPU_IN_KERNEL False )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_USE_NETFILTER_FOR_SGI False )
|
||||
set ( ENABLE_USE_PCAP_FOR_SGI False )
|
||||
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False )
|
||||
set ( ENABLE_VCD_FIFO True )
|
||||
set ( ENB_MODE True )
|
||||
set ( EPC_BUILD False )
|
||||
@@ -29,7 +24,6 @@ set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False )
|
||||
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
|
||||
set ( LINK_PDCP_TO_GTPV1U False )
|
||||
set ( LINUX_LIST False )
|
||||
set ( LINUX True )
|
||||
set ( LOCALIZATION False )
|
||||
@@ -37,7 +31,10 @@ set ( LOG_NO_THREAD True )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
|
||||
@@ -10,17 +10,12 @@ set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI False )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST False )
|
||||
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
||||
set ( ENABLE_PGM_TRANSPORT False )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False )
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_GTPU_IN_KERNEL False )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_USE_NETFILTER_FOR_SGI False )
|
||||
set ( ENABLE_USE_PCAP_FOR_SGI False )
|
||||
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False )
|
||||
set ( ENABLE_VCD_FIFO True )
|
||||
set ( ENB_MODE True )
|
||||
set ( EPC_BUILD False )
|
||||
@@ -29,7 +24,6 @@ set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False )
|
||||
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
|
||||
set ( LINK_PDCP_TO_GTPV1U False )
|
||||
set ( LINUX False )
|
||||
set ( LINUX_LIST False )
|
||||
set ( LOCALIZATION False )
|
||||
@@ -37,7 +31,10 @@ set ( LOG_NO_THREAD True )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
@@ -72,9 +69,9 @@ set ( PHY_EMUL False )
|
||||
set ( PHYSIM True )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD EXMIMO )
|
||||
set ( RF_BOARD OAI_USRP )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_ASN1_VERSION Rel8 )
|
||||
set ( RRC_ASN1_VERSION Rel10 )
|
||||
set ( RRC_DEFAULT_RAB_IS_AM False )
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
@@ -106,5 +103,5 @@ set ( USE_MME False )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
set ( XFORMS False )
|
||||
|
||||
set(PACKAGE_NAME "lte-softmodem")
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set ( ADDR_CONF False )
|
||||
set ( DEBUG_OMG False )
|
||||
set ( DISABLE_USE_NAS False )
|
||||
set ( DISABLE_XER_PRINT False )
|
||||
set ( DRIVER2013 True )
|
||||
set ( EMOS False )
|
||||
set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI False )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST False )
|
||||
set ( ENABLE_PGM_TRANSPORT False )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False )
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_VCD_FIFO True )
|
||||
set ( ENB_MODE True )
|
||||
set ( EPC_BUILD False )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False )
|
||||
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
|
||||
set ( LINUX False )
|
||||
set ( LINUX_LIST False )
|
||||
set ( LOCALIZATION False )
|
||||
set ( LOG_NO_THREAD True )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
set ( NAS_BUILT_IN_EPC False )
|
||||
set ( NAS_BUILT_IN_UE False )
|
||||
set ( NAS_MME False )
|
||||
set ( NAS_NETLINK False )
|
||||
set ( NAS_UE False )
|
||||
set ( NB_ANTENNAS_RX 2 )
|
||||
set ( NB_ANTENNAS_TX 2 )
|
||||
set ( NB_ANTENNAS_TXRX 2 )
|
||||
set ( NEW_FFT True )
|
||||
set ( NO_RRM True )
|
||||
set ( OAI_EMU False )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK False )
|
||||
set ( OAISIM False )
|
||||
set ( OPENAIR1 True )
|
||||
set ( OPENAIR2 True )
|
||||
set ( OPENAIR_EMU False )
|
||||
set ( OPENAIR_LTE True )
|
||||
set ( PBS_SIM False )
|
||||
set ( PC_DSP True )
|
||||
set ( PC_TARGET True )
|
||||
set ( PDCP_MSG_PRINT False )
|
||||
set ( PDCP_USE_NETLINK False )
|
||||
set ( PDCP_USE_NETLINK_QUEUES False )
|
||||
set ( PERFECT_CE False )
|
||||
set ( PHY_ABSTRACTION False )
|
||||
set ( PHY_CONTEXT 1 )
|
||||
set ( PHY_EMUL False )
|
||||
set ( PHYSIM True )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD EXMIMO )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_ASN1_VERSION Rel10 )
|
||||
set ( RRC_DEFAULT_RAB_IS_AM False )
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
set ( S1AP_LIMIT_STREAM_ID_TO_1 False )
|
||||
set ( S1AP_VERSION R10 )
|
||||
set ( SMBV False )
|
||||
set ( SPECTRA False )
|
||||
set ( STOP_ON_IP_TRAFFIC_OVERLOAD False )
|
||||
set ( TEST_OMG False )
|
||||
set ( TRACE_RLC_AM_BO False )
|
||||
set ( TRACE_RLC_AM_FREE_SDU False )
|
||||
set ( TRACE_RLC_AM_HOLE False )
|
||||
set ( TRACE_RLC_AM_PDU False )
|
||||
set ( TRACE_RLC_AM_RESEGMENT False )
|
||||
set ( TRACE_RLC_AM_RX_DECODE False )
|
||||
set ( TRACE_RLC_AM_RX False )
|
||||
set ( TRACE_RLC_AM_STATUS_CREATION False )
|
||||
set ( TRACE_RLC_AM_TX False )
|
||||
set ( TRACE_RLC_AM_TX_STATUS False )
|
||||
set ( TRACE_RLC_PAYLOAD False )
|
||||
set ( TRACE_RLC_UM_DAR False )
|
||||
set ( TRACE_RLC_UM_DISPLAY_ASCII_DATA False )
|
||||
set ( TRACE_RLC_UM_PDU False )
|
||||
set ( TRACE_RLC_UM_RX False )
|
||||
set ( TRACE_RLC_UM_SEGMENT False )
|
||||
set ( TRACE_RLC_UM_TX_STATUS False )
|
||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME False )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
set ( XFORMS False )
|
||||
set(PACKAGE_NAME "lte-softmodem")
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
|
||||
@@ -0,0 +1,107 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set ( ADDR_CONF False )
|
||||
set ( DEBUG_OMG False )
|
||||
set ( DISABLE_USE_NAS False )
|
||||
set ( DISABLE_XER_PRINT False )
|
||||
set ( DRIVER2013 True )
|
||||
set ( EMOS False )
|
||||
set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI False )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST False )
|
||||
set ( ENABLE_PGM_TRANSPORT False )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False )
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_VCD_FIFO True )
|
||||
set ( ENB_MODE True )
|
||||
set ( EPC_BUILD False )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False )
|
||||
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
|
||||
set ( LINUX False )
|
||||
set ( LINUX_LIST False )
|
||||
set ( LOCALIZATION False )
|
||||
set ( LOG_NO_THREAD True )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
set ( NAS_BUILT_IN_EPC False )
|
||||
set ( NAS_BUILT_IN_UE False )
|
||||
set ( NAS_MME False )
|
||||
set ( NAS_NETLINK False )
|
||||
set ( NAS_UE False )
|
||||
set ( NB_ANTENNAS_RX 2 )
|
||||
set ( NB_ANTENNAS_TX 2 )
|
||||
set ( NB_ANTENNAS_TXRX 2 )
|
||||
set ( NEW_FFT True )
|
||||
set ( NO_RRM True )
|
||||
set ( OAI_EMU False )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK False )
|
||||
set ( OAISIM False )
|
||||
set ( OPENAIR1 True )
|
||||
set ( OPENAIR2 True )
|
||||
set ( OPENAIR_EMU False )
|
||||
set ( OPENAIR_LTE True )
|
||||
set ( PBS_SIM False )
|
||||
set ( PC_DSP True )
|
||||
set ( PC_TARGET True )
|
||||
set ( PDCP_MSG_PRINT False )
|
||||
set ( PDCP_USE_NETLINK False )
|
||||
set ( PDCP_USE_NETLINK_QUEUES False )
|
||||
set ( PERFECT_CE False )
|
||||
set ( PHY_ABSTRACTION False )
|
||||
set ( PHY_CONTEXT 1 )
|
||||
set ( PHY_EMUL False )
|
||||
set ( PHYSIM True )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD EXMIMO )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_ASN1_VERSION Rel8 )
|
||||
set ( RRC_DEFAULT_RAB_IS_AM False )
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
set ( S1AP_LIMIT_STREAM_ID_TO_1 False )
|
||||
set ( S1AP_VERSION R10 )
|
||||
set ( SMBV False )
|
||||
set ( SPECTRA False )
|
||||
set ( STOP_ON_IP_TRAFFIC_OVERLOAD False )
|
||||
set ( TEST_OMG False )
|
||||
set ( TRACE_RLC_AM_BO False )
|
||||
set ( TRACE_RLC_AM_FREE_SDU False )
|
||||
set ( TRACE_RLC_AM_HOLE False )
|
||||
set ( TRACE_RLC_AM_PDU False )
|
||||
set ( TRACE_RLC_AM_RESEGMENT False )
|
||||
set ( TRACE_RLC_AM_RX_DECODE False )
|
||||
set ( TRACE_RLC_AM_RX False )
|
||||
set ( TRACE_RLC_AM_STATUS_CREATION False )
|
||||
set ( TRACE_RLC_AM_TX False )
|
||||
set ( TRACE_RLC_AM_TX_STATUS False )
|
||||
set ( TRACE_RLC_PAYLOAD False )
|
||||
set ( TRACE_RLC_UM_DAR False )
|
||||
set ( TRACE_RLC_UM_DISPLAY_ASCII_DATA False )
|
||||
set ( TRACE_RLC_UM_PDU False )
|
||||
set ( TRACE_RLC_UM_RX False )
|
||||
set ( TRACE_RLC_UM_SEGMENT False )
|
||||
set ( TRACE_RLC_UM_TX_STATUS False )
|
||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME False )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
set ( XFORMS False )
|
||||
set(PACKAGE_NAME "lte-softmodem")
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
|
||||
@@ -0,0 +1,107 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set ( ADDR_CONF False )
|
||||
set ( DEBUG_OMG False )
|
||||
set ( DISABLE_USE_NAS False )
|
||||
set ( DISABLE_XER_PRINT False )
|
||||
set ( DRIVER2013 True )
|
||||
set ( EMOS False )
|
||||
set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI False )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST False )
|
||||
set ( ENABLE_PGM_TRANSPORT False )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False )
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_VCD_FIFO True )
|
||||
set ( ENB_MODE True )
|
||||
set ( EPC_BUILD False )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False )
|
||||
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
|
||||
set ( LINUX False )
|
||||
set ( LINUX_LIST False )
|
||||
set ( LOCALIZATION False )
|
||||
set ( LOG_NO_THREAD True )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
set ( NAS_BUILT_IN_EPC False )
|
||||
set ( NAS_BUILT_IN_UE False )
|
||||
set ( NAS_MME False )
|
||||
set ( NAS_NETLINK False )
|
||||
set ( NAS_UE False )
|
||||
set ( NB_ANTENNAS_RX 2 )
|
||||
set ( NB_ANTENNAS_TX 2 )
|
||||
set ( NB_ANTENNAS_TXRX 2 )
|
||||
set ( NEW_FFT True )
|
||||
set ( NO_RRM True )
|
||||
set ( OAI_EMU False )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK False )
|
||||
set ( OAISIM False )
|
||||
set ( OPENAIR1 True )
|
||||
set ( OPENAIR2 True )
|
||||
set ( OPENAIR_EMU False )
|
||||
set ( OPENAIR_LTE True )
|
||||
set ( PBS_SIM False )
|
||||
set ( PC_DSP True )
|
||||
set ( PC_TARGET True )
|
||||
set ( PDCP_MSG_PRINT False )
|
||||
set ( PDCP_USE_NETLINK False )
|
||||
set ( PDCP_USE_NETLINK_QUEUES False )
|
||||
set ( PERFECT_CE False )
|
||||
set ( PHY_ABSTRACTION False )
|
||||
set ( PHY_CONTEXT 1 )
|
||||
set ( PHY_EMUL False )
|
||||
set ( PHYSIM True )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD OAI_USRP )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_ASN1_VERSION Rel10 )
|
||||
set ( RRC_DEFAULT_RAB_IS_AM False )
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
set ( S1AP_LIMIT_STREAM_ID_TO_1 False )
|
||||
set ( S1AP_VERSION R10 )
|
||||
set ( SMBV False )
|
||||
set ( SPECTRA False )
|
||||
set ( STOP_ON_IP_TRAFFIC_OVERLOAD False )
|
||||
set ( TEST_OMG False )
|
||||
set ( TRACE_RLC_AM_BO False )
|
||||
set ( TRACE_RLC_AM_FREE_SDU False )
|
||||
set ( TRACE_RLC_AM_HOLE False )
|
||||
set ( TRACE_RLC_AM_PDU False )
|
||||
set ( TRACE_RLC_AM_RESEGMENT False )
|
||||
set ( TRACE_RLC_AM_RX_DECODE False )
|
||||
set ( TRACE_RLC_AM_RX False )
|
||||
set ( TRACE_RLC_AM_STATUS_CREATION False )
|
||||
set ( TRACE_RLC_AM_TX False )
|
||||
set ( TRACE_RLC_AM_TX_STATUS False )
|
||||
set ( TRACE_RLC_PAYLOAD False )
|
||||
set ( TRACE_RLC_UM_DAR False )
|
||||
set ( TRACE_RLC_UM_DISPLAY_ASCII_DATA False )
|
||||
set ( TRACE_RLC_UM_PDU False )
|
||||
set ( TRACE_RLC_UM_RX False )
|
||||
set ( TRACE_RLC_UM_SEGMENT False )
|
||||
set ( TRACE_RLC_UM_TX_STATUS False )
|
||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME False )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
set ( XFORMS False )
|
||||
set(PACKAGE_NAME "lte-softmodem")
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
|
||||
@@ -10,4 +10,8 @@ set(RANDOM_BF False)
|
||||
set(PBS_SIM False)
|
||||
set(PERFECT_CE True)
|
||||
|
||||
set(MESSAGE_CHART_GENERATOR False)
|
||||
set(MESSAGE_CHART_GENERATOR_RLC_MAC False)
|
||||
set(MESSAGE_CHART_GENERATOR_PHY False)
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
|
||||
|
||||
@@ -8,7 +8,6 @@ set(ENABLE_FXP True)
|
||||
set(ENABLE_ITTI True)
|
||||
set(ENABLE_NAS_UE_LOGGING False)
|
||||
set(ENABLE_NEW_MULTICAST True)
|
||||
set(ENABLE_PDCP_NETLINK_FIFO False)
|
||||
set(ENABLE_PGM_TRANSPORT True)
|
||||
set(ENABLE_RAL False)
|
||||
set(ENABLE_SECURITY False)
|
||||
@@ -18,7 +17,7 @@ set(ENABLE_VCD_FIFO True)
|
||||
set(HARD_RT False)
|
||||
set(JUMBO_FRAME True)
|
||||
set(LARGE_SCALE False)
|
||||
set(LINK_PDCP_TO_GTPV1U False)
|
||||
set(LINK_ENB_PDCP_TO_GTPV1U False)
|
||||
set(LINUX_LIST False)
|
||||
set(LINUX True)
|
||||
set(LOCALIZATION False)
|
||||
@@ -26,7 +25,10 @@ set(LOG_NO_THREAD True)
|
||||
set(LOWLATENCY False)
|
||||
set(MAC_CONTEXT 1)
|
||||
set(MAX_NUM_CCs 1)
|
||||
set(MIH_C_MEDIEVAL_EXTENSIONS True)
|
||||
set(MESSAGE_CHART_GENERATOR False )
|
||||
set(MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set(MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set(MIH_C_MEDIEVAL_EXTENSIONS False)
|
||||
set(MSG_PRINT False)
|
||||
set(MU_RECEIVER False)
|
||||
set(NAS_ADDRESS_FIX true)
|
||||
|
||||
@@ -10,17 +10,12 @@ set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI False )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False )
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_GTPU_IN_KERNEL False )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_USE_NETFILTER_FOR_SGI False )
|
||||
set ( ENABLE_USE_PCAP_FOR_SGI False )
|
||||
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False )
|
||||
set ( ENABLE_VCD_FIFO True )
|
||||
set ( ENB_MODE True )
|
||||
set ( EPC_BUILD False )
|
||||
@@ -29,7 +24,6 @@ set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False )
|
||||
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
|
||||
set ( LINK_PDCP_TO_GTPV1U False )
|
||||
set ( LINUX_LIST False )
|
||||
set ( LINUX True )
|
||||
set ( LOCALIZATION False )
|
||||
@@ -37,7 +31,10 @@ set ( LOG_NO_THREAD True )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
|
||||
@@ -8,7 +8,6 @@ set(ENABLE_FXP True)
|
||||
set(ENABLE_ITTI True)
|
||||
set(ENABLE_NAS_UE_LOGGING False)
|
||||
set(ENABLE_NEW_MULTICAST True)
|
||||
set(ENABLE_PDCP_NETLINK_FIFO False)
|
||||
set(ENABLE_PGM_TRANSPORT True)
|
||||
set(ENABLE_RAL False)
|
||||
set(ENABLE_SECURITY False)
|
||||
@@ -18,7 +17,7 @@ set(ENABLE_VCD_FIFO True)
|
||||
set(HARD_RT False)
|
||||
set(JUMBO_FRAME True)
|
||||
set(LARGE_SCALE False)
|
||||
set(LINK_PDCP_TO_GTPV1U False)
|
||||
set(LINK_ENB_PDCP_TO_GTPV1U False)
|
||||
set(LINUX_LIST False)
|
||||
set(LINUX True)
|
||||
set(LOCALIZATION False)
|
||||
@@ -26,7 +25,10 @@ set(LOG_NO_THREAD True)
|
||||
set(LOWLATENCY False)
|
||||
set(MAC_CONTEXT 1)
|
||||
set(MAX_NUM_CCs 1)
|
||||
set(MIH_C_MEDIEVAL_EXTENSIONS True)
|
||||
set(MESSAGE_CHART_GENERATOR False)
|
||||
set(MESSAGE_CHART_GENERATOR_RLC_MAC False)
|
||||
set(MESSAGE_CHART_GENERATOR_PHY False)
|
||||
set(MIH_C_MEDIEVAL_EXTENSIONS False)
|
||||
set(MSG_PRINT False)
|
||||
set(MU_RECEIVER False)
|
||||
set(NAS_ADDRESS_FIX true)
|
||||
@@ -35,7 +37,6 @@ set(NAS_UE True)
|
||||
set(NEW_FFT True)
|
||||
set(NO_RRM True)
|
||||
set(OAI_EMU True)
|
||||
set(OAI_EMU True)
|
||||
set(OAI_NW_DRIVER_TYPE_ETHERNET False)
|
||||
set(OPENAIR1 False)
|
||||
set(OPENAIR2 True)
|
||||
|
||||
@@ -8,9 +8,8 @@ set(ENABLE_FXP True)
|
||||
set(ENABLE_ITTI True)
|
||||
set(ENABLE_NAS_UE_LOGGING False)
|
||||
set(ENABLE_NEW_MULTICAST True)
|
||||
set(ENABLE_PDCP_NETLINK_FIFO True)
|
||||
set(ENABLE_PGM_TRANSPORT True)
|
||||
set(ENABLE_RAL True)
|
||||
set(ENABLE_RAL False)
|
||||
set(ENABLE_SECURITY False)
|
||||
set(ENABLE_USE_CPU_EXECUTION_TIME True)
|
||||
set(ENABLE_USE_MME False)
|
||||
@@ -18,7 +17,7 @@ set(ENABLE_VCD_FIFO True)
|
||||
set(HARD_RT False)
|
||||
set(JUMBO_FRAME True)
|
||||
set(LARGE_SCALE False)
|
||||
set(LINK_PDCP_TO_GTPV1U False)
|
||||
set(LINK_ENB_PDCP_TO_GTPV1U False)
|
||||
set(LINUX_LIST False)
|
||||
set(LINUX True)
|
||||
set(LOCALIZATION False)
|
||||
@@ -26,7 +25,7 @@ set(LOG_NO_THREAD True)
|
||||
set(LOWLATENCY False)
|
||||
set(MAC_CONTEXT 1)
|
||||
set(MAX_NUM_CCs 1)
|
||||
set(MIH_C_MEDIEVAL_EXTENSIONS True)
|
||||
set(MIH_C_MEDIEVAL_EXTENSIONS False)
|
||||
set(MSG_PRINT False)
|
||||
set(MU_RECEIVER False)
|
||||
set(NAS_ADDRESS_FIX true)
|
||||
|
||||
@@ -10,17 +10,12 @@ set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False )
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_GTPU_IN_KERNEL False )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_USE_NETFILTER_FOR_SGI False )
|
||||
set ( ENABLE_USE_PCAP_FOR_SGI False )
|
||||
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False )
|
||||
set ( ENABLE_VCD_FIFO True )
|
||||
set ( ENB_MODE True )
|
||||
set ( EPC_BUILD False )
|
||||
@@ -29,7 +24,6 @@ set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False )
|
||||
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
|
||||
set ( LINK_PDCP_TO_GTPV1U False )
|
||||
set ( LINUX_LIST False )
|
||||
set ( LINUX True )
|
||||
set ( LOCALIZATION False )
|
||||
@@ -37,7 +31,10 @@ set ( LOG_NO_THREAD True )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
|
||||
@@ -10,17 +10,12 @@ set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI False )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False )
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
set ( ENABLE_USE_GTPU_IN_KERNEL False )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_USE_NETFILTER_FOR_SGI False )
|
||||
set ( ENABLE_USE_PCAP_FOR_SGI False )
|
||||
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False )
|
||||
set ( ENABLE_VCD_FIFO True )
|
||||
set ( ENB_MODE True )
|
||||
set ( EPC_BUILD False )
|
||||
@@ -29,7 +24,6 @@ set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False )
|
||||
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
|
||||
set ( LINK_PDCP_TO_GTPV1U False )
|
||||
set ( LINUX_LIST False )
|
||||
set ( LINUX True )
|
||||
set ( LOCALIZATION False )
|
||||
@@ -37,7 +31,10 @@ set ( LOG_NO_THREAD True )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
set(ENABLE_VCD_FIFO False )
|
||||
set(ENABLE_ITTI False )
|
||||
set(RF_BOARD "ETHERNET")
|
||||
set(PACKAGE_NAME "\"rrh_gw\"")
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
|
||||
+210
-125
@@ -41,10 +41,12 @@ source $THIS_SCRIPT_PATH/tools/build_helper
|
||||
|
||||
MSC_GEN="False"
|
||||
XFORMS="False"
|
||||
PRINT_STATS="False"
|
||||
VCD_TIMING="False"
|
||||
REL="Rel10"
|
||||
HW="EXMIMO"
|
||||
EPC=0
|
||||
VERBOSE_COMPILE=0
|
||||
|
||||
function print_help() {
|
||||
echo_info '
|
||||
@@ -74,14 +76,16 @@ Options
|
||||
Makes the UE specific parts (ue_ip, usim, nvram)
|
||||
--EPC
|
||||
Makes the EPC (MME-SPGW, HSS)
|
||||
--RRH
|
||||
Makes the RRH
|
||||
-r | --3gpp-release
|
||||
default is Rel10,
|
||||
Rel8 limits the implementation to 3GPP Release 8 version
|
||||
-w | --hardware
|
||||
EXMIMO (Default), USRP, BLADERF, None
|
||||
EXMIMO (Default), USRP, BLADERF, ETHERNET, None
|
||||
Adds this RF board support (in external packages installation and in compilation)
|
||||
--oaisim
|
||||
Makes the oaisim simulator
|
||||
Makes the oaisim simulator. Hardware will be defaulted to "NONE".
|
||||
--phy_simulators
|
||||
Makes the unitary tests Layer 1 simulators
|
||||
--core_simulators
|
||||
@@ -91,11 +95,22 @@ Options
|
||||
-V | --vcd
|
||||
Adds a debgging facility to the binary files: GUI with major internal synchronization events
|
||||
-x | --xforms
|
||||
Adds a software oscilloscope feature to the produced binaries
|
||||
Adds a software oscilloscope feature to the produced binaries. If oaisim, then enable PRINT_STATS.
|
||||
--install-system-files
|
||||
Install OpenArInterface required files in Linux system
|
||||
(will ask root password)
|
||||
Typical Options for a quick startup with a COTS UE and Eurecom RF board: build_oai -I -g -eNB -EPC -x --install-system-files'
|
||||
--noS1
|
||||
Compiles oaisim or lte-softmodem without S1 interface, using direct link to IP instead
|
||||
--verbose-compile
|
||||
Shows detailed compilation instructions in makefile
|
||||
Usage (first build):
|
||||
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
|
||||
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files
|
||||
NI/ETTUS B201 + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files -w USRP
|
||||
Usage (Regular):
|
||||
oaisim : ./build_oai --oaisim -x
|
||||
Eurecom EXMIMO + OAI ENB : ./build_oai --eNB -x
|
||||
NI/ETTUS B201 + OAI ENB : ./build_oai --eNB -x -w USRP'
|
||||
}
|
||||
|
||||
|
||||
@@ -137,6 +152,10 @@ function main() {
|
||||
EPC=1
|
||||
echo_info "Will compile EPC"
|
||||
shift;;
|
||||
--RRH)
|
||||
RRH=1
|
||||
echo_info "Will compile RRH"
|
||||
shift;;
|
||||
-r | --3gpp-release)
|
||||
REL=$2
|
||||
echo_info "setting release to: $REL"
|
||||
@@ -174,7 +193,7 @@ function main() {
|
||||
EXE_ARGUMENTS="$EXE_ARGUMENTS -V"
|
||||
shift;;
|
||||
-x | --xforms)
|
||||
XFORMS=1
|
||||
XFORMS="True"
|
||||
EXE_ARGUMENTS="$EXE_ARGUMENTS -d"
|
||||
echo_info "Will generate the software oscilloscope features"
|
||||
shift;;
|
||||
@@ -182,6 +201,14 @@ function main() {
|
||||
INSTALL_SYSTEM_FILES=1
|
||||
echo_info "Will copy OpenAirInterface files in Linux directories"
|
||||
shift;;
|
||||
--noS1)
|
||||
NOS1=1
|
||||
echo_info "Will compile without S1 interface"
|
||||
shift;;
|
||||
--verbose-compile)
|
||||
VERBOSE_COMPILE=1
|
||||
echo_info "Will compile with verbose instructions"
|
||||
shift;;
|
||||
-h | --help)
|
||||
print_help
|
||||
exit 1;;
|
||||
@@ -243,37 +270,70 @@ function main() {
|
||||
check_install_additional_tools
|
||||
fi
|
||||
|
||||
if [ "$oaisim" = "1" ] ; then
|
||||
if [ "$HW" != "ETHERNET" ] ; then
|
||||
HW="NONE"
|
||||
fi
|
||||
if [ "$XFORMS" == "True" ] ; then
|
||||
PRINT_STATS="True"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo_info "3. building the compilation directives ..."
|
||||
|
||||
DIR=$OPENAIR_DIR/cmake_targets
|
||||
if [ "$NOS1" = "1" ] ; then
|
||||
lte_build_dir=lte_noS1_build_oai
|
||||
lte_exec=lte-softmodem-nos1
|
||||
else
|
||||
lte_build_dir=lte_build_oai
|
||||
lte_exec=lte-softmodem
|
||||
fi
|
||||
|
||||
# first generate the CMakefile in the right directory
|
||||
if [ "$eNB" = "1" -o "$UE" = "1" -o "$HW" = "EXMIMO" ] ; then
|
||||
|
||||
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
|
||||
# LTE softmodem compilation
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/lte_build_oai/build
|
||||
mkdir -p $DIR/lte_build_oai/build
|
||||
cmake_file=$DIR/lte_build_oai/CMakeLists.txt
|
||||
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
|
||||
echo "set(XFORMS $XFORMS )" >> $cmake_file
|
||||
echo "set(RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set(RF_BOARD \"${HW}\")" >> $cmake_file
|
||||
echo 'set(PACKAGE_NAME "\"lte-softmodem\"")' >> $cmake_file
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/$lte_build_dir/build
|
||||
mkdir -p $DIR/$lte_build_dir/build
|
||||
cmake_file=$DIR/$lte_build_dir/CMakeLists.txt
|
||||
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
|
||||
if [ "$NOS1" = "1" ] ; then
|
||||
cat $DIR/$lte_build_dir/CMakeLists.template >> $cmake_file
|
||||
fi
|
||||
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
||||
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
|
||||
echo "set(PACKAGE_NAME \"${lte_exec}\")" >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
|
||||
cd $DIR/lte_build_oai/build
|
||||
cd $DIR/$lte_build_dir/build
|
||||
cmake ..
|
||||
echo_info "Compiling LTE softmodem"
|
||||
compilations \
|
||||
lte_build_oai lte-softmodem \
|
||||
lte-softmodem lte-softmodem.$REL
|
||||
fi
|
||||
|
||||
if [ "$eNB" = "1" ] ; then
|
||||
echo_info "Compiling $lte_exec"
|
||||
compilations \
|
||||
$lte_build_dir $lte_exec \
|
||||
$lte_exec $dbin/$lte_exec.$REL
|
||||
|
||||
if [ "$NOS1" = "1" ] ; then
|
||||
compilations \
|
||||
$lte_build_dir nasmesh \
|
||||
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
|
||||
compilations \
|
||||
$lte_build_dir rb_tool \
|
||||
rb_tool $dbin/rb_tool
|
||||
cp $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 $dbin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$UE" = 1 ] ; then
|
||||
# ue_ip driver compilation
|
||||
echo_info "Compiling UE specific part"
|
||||
compilations \
|
||||
lte_build_oai ue_ip \
|
||||
$lte_build_dir ue_ip \
|
||||
CMakeFiles/ue_ip/ue_ip.ko $dbin/ue_ip.ko
|
||||
|
||||
# mkdir -p $DIR/at_commands/build
|
||||
@@ -282,7 +342,7 @@ function main() {
|
||||
# compilations \
|
||||
# at_commands at_nas_ue \
|
||||
# at_nas_ue $dbin/at_nas_ue
|
||||
|
||||
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/nas_sim_tools/build
|
||||
mkdir -p $DIR/nas_sim_tools/build
|
||||
cd $DIR/nas_sim_tools/build
|
||||
@@ -341,140 +401,165 @@ function main() {
|
||||
if [ "$HW" = "EXMIMO" -a "$EPC" = "0" ] ; then
|
||||
|
||||
echo_info "Compiling Express MIMO 2 board drivers"
|
||||
mkdir -p $DIR/lte_noS1_build_oai/build
|
||||
cd $DIR/lte_noS1_build_oai/build
|
||||
cmake ..
|
||||
compilations \
|
||||
lte_noS1_build_oai openair_rf \
|
||||
$lte_build_dir openair_rf \
|
||||
CMakeFiles/openair_rf/openair_rf.ko $dbin/openair_rf.ko
|
||||
compilations \
|
||||
lte_noS1_build_oai updatefw \
|
||||
$lte_build_dir updatefw \
|
||||
updatefw $dbin/updatefw
|
||||
make -C $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build oarf > $dlog/oarf.txt 2>&1
|
||||
cp $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/*.oct $dbin
|
||||
echo_success "oarf tools compiled"
|
||||
make -C $OPENAIR_DIR/cmake_targets/$lte_build_dir/build oarf > $dlog/oarf.txt 2>&1
|
||||
cp $OPENAIR_DIR/cmake_targets/$lte_build_dir/build/*.oct $dbin
|
||||
if [ -s $dbin/oarf_config_exmimo.oct ] ; then
|
||||
echo_success "oarf tools compiled"
|
||||
else
|
||||
echo_error "oarf tools compilation failed"
|
||||
fi
|
||||
cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin
|
||||
fi
|
||||
|
||||
if [ "$oaisim" = "1" ] ; then
|
||||
dconf=$OPENAIR_DIR/targets/bin
|
||||
|
||||
echo_info "Compiling at_nas_ue"
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/at_commands/build
|
||||
mkdir -p $DIR/at_commands/build
|
||||
cd $DIR/at_commands/build
|
||||
cmake ..
|
||||
compilations \
|
||||
at_commands at_nas_ue \
|
||||
at_nas_ue $dbin/at_nas_ue
|
||||
|
||||
echo_info "Compiling oaisim"
|
||||
cmake_file=$DIR/oaisim_build_oai/CMakeLists.txt
|
||||
cp $DIR/oaisim_build_oai/CMakeLists.template $cmake_file
|
||||
echo "set(XFORMS $XFORMS )" >> $cmake_file
|
||||
echo "set(RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
if [ "$NOS1" = "1" ] ; then
|
||||
oaisim_build_dir=oaisim_noS1_build_oai
|
||||
oaisim_exec=oaisim_nos1
|
||||
else
|
||||
oaisim_build_dir=oaisim_build_oai
|
||||
oaisim_exec=oaisim
|
||||
fi
|
||||
|
||||
echo_info "Compiling $oaisim_exec ($oaisim_build_dir)"
|
||||
cmake_file=$DIR/$oaisim_build_dir/CMakeLists.txt
|
||||
cp $DIR/$oaisim_build_dir/CMakeLists.template $cmake_file
|
||||
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
||||
echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file
|
||||
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_build_oai/build
|
||||
mkdir -p $DIR/oaisim_build_oai/build
|
||||
cd $DIR/oaisim_build_oai/build
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/$oaisim_build_dir/build
|
||||
mkdir -p $DIR/$oaisim_build_dir/build
|
||||
cd $DIR/$oaisim_build_dir/build
|
||||
cmake ..
|
||||
compilations \
|
||||
oaisim_build_oai oaisim \
|
||||
oaisim $dbin/oaisim.$REL
|
||||
$oaisim_build_dir $oaisim_exec \
|
||||
$oaisim_exec $dbin/$oaisim_exec.$REL
|
||||
|
||||
# ue_ip driver compilation
|
||||
echo_info "Compiling UE specific part (ue_ip driver and usim tools)"
|
||||
compilations \
|
||||
oaisim_build_oai ue_ip \
|
||||
CMakeFiles/ue_ip/ue_ip.ko $dbin/ue_ip.ko
|
||||
if [ "$NOS1" != "1" ] ; then
|
||||
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/nas_sim_tools/build
|
||||
mkdir -p $DIR/nas_sim_tools/build
|
||||
cd $DIR/nas_sim_tools/build
|
||||
cmake ..
|
||||
compilations \
|
||||
nas_sim_tools usim \
|
||||
usim $dbin/usim
|
||||
compilations \
|
||||
nas_sim_tools nvram \
|
||||
nvram $dbin/nvram
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/at_commands/build
|
||||
echo_info "Compiling at_nas_ue"
|
||||
mkdir -p $DIR/at_commands/build
|
||||
cd $DIR/at_commands/build
|
||||
cmake ..
|
||||
compilations \
|
||||
at_commands at_nas_ue \
|
||||
at_nas_ue $dbin/at_nas_ue
|
||||
|
||||
# generate USIM data
|
||||
if [ -f $dbin/nvram ]; then
|
||||
install_nas_tools $dbin $dconf
|
||||
# ue_ip driver compilation
|
||||
echo_info "Compiling UE specific part (ue_ip driver and usim tools)"
|
||||
compilations \
|
||||
oaisim_build_oai ue_ip \
|
||||
CMakeFiles/ue_ip/ue_ip.ko $dbin/ue_ip.ko
|
||||
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/nas_sim_tools/build
|
||||
mkdir -p $DIR/nas_sim_tools/build
|
||||
cd $DIR/nas_sim_tools/build
|
||||
cmake ..
|
||||
compilations \
|
||||
nas_sim_tools usim \
|
||||
usim $dbin/usim
|
||||
compilations \
|
||||
nas_sim_tools nvram \
|
||||
nvram $dbin/nvram
|
||||
|
||||
# generate USIM data
|
||||
if [ -f $dbin/nvram ]; then
|
||||
install_nas_tools $dbin $dconf
|
||||
else
|
||||
echo_warning "not generated UE NAS files: binaries not found"
|
||||
fi
|
||||
else
|
||||
echo_warning "not generated UE NAS files: binaries not found"
|
||||
|
||||
compilations \
|
||||
$oaisim_build_dir rb_tool \
|
||||
rb_tool $dbin/rb_tool
|
||||
|
||||
# nasmesh driver compilation
|
||||
compilations \
|
||||
$oaisim_build_dir nasmesh \
|
||||
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
|
||||
|
||||
#oai_nw_drv
|
||||
compilations \
|
||||
$oaisim_build_dir oai_nw_drv \
|
||||
CMakeFiles/oai_nw_drv/oai_nw_drv.ko $dbin/oai_nw_drv.ko
|
||||
fi
|
||||
|
||||
echo_info "Compiling oaisim_nos1"
|
||||
cmake_file=$DIR/oaisim_noS1_build_oai/CMakeLists.txt
|
||||
cp $DIR/oaisim_noS1_build_oai/CMakeLists.template $cmake_file
|
||||
echo "set(XFORMS $XFORMS )" >> $cmake_file
|
||||
echo "set(RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_noS1_build_oai/build
|
||||
mkdir -p $DIR/oaisim_noS1_build_oai/build
|
||||
cd $DIR/oaisim_noS1_build_oai/build
|
||||
cmake ..
|
||||
compilations \
|
||||
oaisim_noS1_build_oai oaisim_nos1 \
|
||||
oaisim_nos1 $dbin/oaisim_nos1.$REL
|
||||
|
||||
compilations \
|
||||
oaisim_noS1_build_oai rb_tool \
|
||||
rb_tool $dbin/rb_tool
|
||||
|
||||
# nasmesh driver compilation
|
||||
compilations \
|
||||
oaisim_noS1_build_oai nasmesh \
|
||||
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
|
||||
#oai_nw_drv
|
||||
compilations \
|
||||
oaisim_noS1_build_oai oai_nw_drv \
|
||||
CMakeFiles/oai_nw_drv/oai_nw_drv.ko $dbin/oai_nw_drv.ko
|
||||
|
||||
cmake_file=$DIR/oaisim_mme_build_oai/CMakeLists.txt
|
||||
cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file
|
||||
echo "set(XFORMS $XFORMS )" >> $cmake_file
|
||||
echo "set(RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_mme_build_oai/build
|
||||
mkdir -p $DIR/oaisim_mme_build_oai/build
|
||||
cd $DIR/oaisim_mme_build_oai/build
|
||||
#[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_mme_build_oai/build
|
||||
#mkdir -p $DIR/oaisim_mme_build_oai/build
|
||||
#cd $DIR/oaisim_mme_build_oai/build
|
||||
#cmake ..
|
||||
#compilations \
|
||||
# oaisim_mme_build_oai oaisim_mme \
|
||||
# oaisim_mme $dbin/oaisim_mme.$REL
|
||||
fi
|
||||
|
||||
# RRH compilation
|
||||
##################
|
||||
if [ "$RRH" = "1" ] ; then
|
||||
echo_info "Compiling RRH"
|
||||
if [ $HW == "ETHERNET" ] ; then
|
||||
echo_info "RF frontend for RRH is not defined. This mode is used for testing (loopback)."
|
||||
elif [ $HW != "EXMIMO" -a $HW != "OAI_USRP" -a $HW != "OAI_BLADERF" ] ; then
|
||||
echo_fatal "Hardware not defined ($HW)"
|
||||
fi
|
||||
cmake_file=$DIR/rrh_gw/CMakeLists.txt
|
||||
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
|
||||
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set(ENABLE_ITTI False )" >> $cmake_file
|
||||
echo "set(RF_BOARD \"${HW}\")" >> $cmake_file
|
||||
echo 'set(PACKAGE_NAME "\"rrh_gw\"")' >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
|
||||
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/rrh_gw/build
|
||||
mkdir -p $DIR/rrh_gw/build
|
||||
cd $DIR/rrh_gw/build
|
||||
cmake ..
|
||||
compilations \
|
||||
oaisim_mme_build_oai oaisim_mme \
|
||||
oaisim_mme $dbin/oaisim_mme.$REL
|
||||
rrh_gw rrh_gw \
|
||||
rrh_gw $dbin/rrh_gw
|
||||
fi
|
||||
|
||||
# EPC compilation
|
||||
##################
|
||||
if [ "$EPC" = "1" ] ; then
|
||||
echo_info "Compiling EPC"
|
||||
# Example HSS and EPC run on the same host
|
||||
if [ "$CLEAN" = "1" ]; then
|
||||
$OPENAIR_DIR/cmake_targets/tools/build_epc --clean --debug --transport-tcp-only --transport-prefer-tcp --s6a-server
|
||||
$OPENAIR_DIR/cmake_targets/tools/build_hss --clean --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn`
|
||||
else
|
||||
$OPENAIR_DIR/cmake_targets/tools/build_epc --debug --transport-tcp-only --transport-prefer-tcp --s6a-server
|
||||
$OPENAIR_DIR/cmake_targets/tools/build_hss --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn`
|
||||
fi
|
||||
|
||||
# if [ "$INSTALL_SYSTEM_FILES" = "1" ] ;then
|
||||
# if [ -f $dbin/hss.conf ] ; then
|
||||
# sed -e 's/ *= */=/' $dbin/hss.conf > $dconf/hss.conf.nospace
|
||||
# source $dconf/hss.conf.nospace
|
||||
# rm -f $dconf/hss.conf.nospace
|
||||
# create_hss_database root linux "$MYSQL_user" "$MYSQL_pass" "$MYSQL_db"
|
||||
# else
|
||||
# echo_warning "not created HSS database: config not found"
|
||||
# fi
|
||||
# fi
|
||||
fi
|
||||
|
||||
echo_info "Compiling EPC"
|
||||
# Example HSS and EPC run on the same host
|
||||
if [ "$CLEAN" = "1" ]; then
|
||||
$OPENAIR_DIR/cmake_targets/tools/build_epc --clean --debug --transport-tcp-only --transport-prefer-tcp --s6a-server
|
||||
$OPENAIR_DIR/cmake_targets/tools/build_hss --clean --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn`
|
||||
else
|
||||
$OPENAIR_DIR/cmake_targets/tools/build_epc --debug --transport-tcp-only --transport-prefer-tcp --s6a-server
|
||||
$OPENAIR_DIR/cmake_targets/tools/build_hss --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn`
|
||||
fi
|
||||
|
||||
# if [ "$INSTALL_SYSTEM_FILES" = "1" ] ;then
|
||||
# if [ -f $dbin/hss.conf ] ; then
|
||||
# sed -e 's/ *= */=/' $dbin/hss.conf > $dconf/hss.conf.nospace
|
||||
# source $dconf/hss.conf.nospace
|
||||
# rm -f $dconf/hss.conf.nospace
|
||||
# create_hss_database root linux "$MYSQL_user" "$MYSQL_pass" "$MYSQL_db"
|
||||
# else
|
||||
# echo_warning "not created HSS database: config not found"
|
||||
# fi
|
||||
# fi
|
||||
fi
|
||||
|
||||
# Auto-tests
|
||||
#####################
|
||||
if [ "$OAI_TEST" = "1" ]; then
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
configure_file(${OPENAIR_TARGETS}/DOCS/Doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||
add_custom_target(doc
|
||||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
||||
)
|
||||
endif(DOXYGEN_FOUND)
|
||||
@@ -12,13 +12,11 @@ set ( ENABLE_FXP False )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST False )
|
||||
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
||||
set ( ENABLE_PGM_TRANSPORT False )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC True )
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME False )
|
||||
set ( ENABLE_USE_GTPU_IN_KERNEL True )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( ENB_MODE False )
|
||||
@@ -28,7 +26,7 @@ set ( FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT False)
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME False )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_PDCP_TO_GTPV1U False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False )
|
||||
set ( LINUX_LIST False )
|
||||
set ( LINUX False )
|
||||
set ( LOCALIZATION False )
|
||||
|
||||
@@ -10,5 +10,6 @@ set(RANDOM_BF False)
|
||||
set(PBS_SIM False)
|
||||
set(PERFECT_CE False)
|
||||
set(NAS_UE False)
|
||||
set(MESSAGE_CHART_GENERATOR False)
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
set(ENABLE_ITTI True)
|
||||
set(ENABLE_USE_MME False)
|
||||
set(PDCP_USE_NETLINK True)
|
||||
set(LINK_ENB_PDCP_TO_IP_DRIVER True)
|
||||
set(LINK_ENB_PDCP_TO_GTPV1U False)
|
||||
set(PDCP_USE_NETLINK_QUEUES False)
|
||||
set(LINUX True)
|
||||
set(SECU False)
|
||||
set(NAS_UE False)
|
||||
@@ -1,13 +0,0 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
set(XFORMS 1 )
|
||||
set(RRC_ASN1_VERSION "Rel10")
|
||||
set(ENABLE_VCD_FIFO False )
|
||||
set(RF_BOARD "EXMIMO")
|
||||
set(NAS 1)
|
||||
set(ENABLE_ITTI False)
|
||||
set(ENABLE_USE_MME False)
|
||||
set(LINK_ENB_PDCP_TO_GTPV1U False)
|
||||
set(SECU False)
|
||||
set(NAS_UE False)
|
||||
set(PACKAGE_NAME "\"lte-softmodem\"")
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
|
||||
@@ -20,30 +20,30 @@ set(OPENAIR_TARGETS $ENV{OPENAIR_DIR}/targets)
|
||||
|
||||
# Add .h files for dependancies
|
||||
set(usim_SRC
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/tools/usim_data.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/usim_api.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/aka_functions.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/OctetString.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/TLVEncoder.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/TOOLS/usim_data.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/usim_api.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/aka_functions.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/OctetString.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/TLVEncoder.c
|
||||
)
|
||||
set(usim_HDR
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/tools/network.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/usim_api.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/aka_functions.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/OctetString.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/TLVEncoder.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/TOOLS/network.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/usim_api.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/aka_functions.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/OctetString.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/TLVEncoder.h
|
||||
)
|
||||
include_directories(
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/include
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/emm/
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/esm/
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/ies/
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON
|
||||
${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM
|
||||
${OPENAIR_DIR}/openair-cn/NAS/UE/EMM/
|
||||
${OPENAIR_DIR}/openair-cn/NAS/UE/ESM/
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/IES/
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL
|
||||
)
|
||||
ADD_EXECUTABLE(usim ${usim_SRC} ${usim_HDR})
|
||||
|
||||
@@ -51,15 +51,15 @@ ADD_EXECUTABLE(usim ${usim_SRC} ${usim_HDR})
|
||||
|
||||
|
||||
set(nvram_SRC
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/tools/ue_data.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/TOOLS/ue_data.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.c
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.c
|
||||
)
|
||||
|
||||
set(nvram_HDR
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/emm/emmData.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/include/userDef.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/UE/EMM/emmData.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.h
|
||||
${OPENAIR_DIR}/openair-cn/NAS/COMMON/userDef.h
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(nvram ${nvram_SRC} ${nvram_HDR})
|
||||
|
||||
@@ -10,7 +10,6 @@ set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING True )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY True )
|
||||
@@ -79,4 +78,3 @@ set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME "R10" )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
set ( XFORMS False )
|
||||
|
||||
@@ -10,13 +10,11 @@ set ( ENABLE_FXP False )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST False )
|
||||
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
||||
set ( ENABLE_PGM_TRANSPORT False )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False )
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME False )
|
||||
set ( ENABLE_USE_GTPU_IN_KERNEL True )
|
||||
set ( ENABLE_USE_MME False )
|
||||
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
|
||||
@@ -10,7 +10,6 @@ set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
@@ -32,9 +31,9 @@ set ( LOG_NO_THREAD 1 )
|
||||
set ( LOWLATENCY False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MESSAGE_CHART_GENERATOR True )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC True )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY True )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
@@ -81,4 +80,6 @@ set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME "R10" )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
set ( XFORMS False )
|
||||
set ( DEBUG_PHY False )
|
||||
set ( DEBUG_PHY_PROC False)
|
||||
set ( DEBUG_DLSCH False)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
set(ENABLE_VCD_FIFO False )
|
||||
set(ENABLE_ITTI False )
|
||||
set(RF_BOARD "ETHERNET")
|
||||
set(PACKAGE_NAME "\"rrh_gw\"")
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
|
||||
@@ -0,0 +1,706 @@
|
||||
import re, os, sys, string
|
||||
import datetime
|
||||
import getopt
|
||||
import getpass
|
||||
|
||||
version = "1.0.2"
|
||||
|
||||
lines = ""
|
||||
iesDefs = {}
|
||||
ieofielist = {}
|
||||
outdir = './'
|
||||
|
||||
filenames = []
|
||||
verbosity = 0
|
||||
prefix = ""
|
||||
|
||||
FAIL = '\033[91m'
|
||||
WARN = '\033[93m'
|
||||
ENDC = '\033[0m'
|
||||
|
||||
fileprefix = ""
|
||||
fileprefix_first_upper = ""
|
||||
|
||||
def printFail(string):
|
||||
sys.stderr.write(FAIL + string + ENDC + "\n")
|
||||
|
||||
def printWarning(string):
|
||||
print WARN + string + ENDC
|
||||
|
||||
def printDebug(string):
|
||||
if verbosity > 0:
|
||||
print string
|
||||
|
||||
def outputHeaderToFile(f, filename):
|
||||
now = datetime.datetime.now()
|
||||
f.write("""/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2013 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fr/openairinterface
|
||||
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes
|
||||
06410 Biot FRANCE
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
""")
|
||||
f.write("/*******************************************************************************\n")
|
||||
f.write(" * This file had been created by asn1tostruct.py script v%s\n" % (version))
|
||||
f.write(" * Please do not modify this file but regenerate it via script.\n")
|
||||
f.write(" * Created on: %s by %s\n * from %s\n" % (str(now), getpass.getuser(), filenames))
|
||||
f.write(" ******************************************************************************/\n")
|
||||
|
||||
def lowerFirstCamelWord(word):
|
||||
""" puts the first word in a CamelCase Word in lowercase.
|
||||
|
||||
I.e. CustomerID becomes customerID, XMLInfoTest becomes xmlInfoTest
|
||||
"""
|
||||
newstr = ''
|
||||
swapped = word.swapcase()
|
||||
idx = 0
|
||||
|
||||
# if it's all-caps, return an all-lowered version
|
||||
lowered = word.lower()
|
||||
|
||||
if swapped == lowered:
|
||||
return lowered
|
||||
|
||||
for c in swapped:
|
||||
if c in string.lowercase:
|
||||
newstr += c
|
||||
idx += 1
|
||||
else:
|
||||
break
|
||||
if idx < 2:
|
||||
newstr += word[idx:]
|
||||
else:
|
||||
newstr = newstr[:-1]+ word[idx-1:]
|
||||
|
||||
return newstr
|
||||
|
||||
def usage():
|
||||
print "Python parser for asn1 v%s" % (version)
|
||||
print "Usage: python asn1tostruct.py [options]"
|
||||
print "Available options:"
|
||||
print "-d Enable script debug"
|
||||
print "-f [file] Input file to parse"
|
||||
print "-o [dir] Output files to given directory"
|
||||
print "-h Print this help and return"
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "df:ho:", ["debug", "file", "help", "outdir"])
|
||||
except getopt.GetoptError as err:
|
||||
# print help information and exit:
|
||||
usage()
|
||||
sys.exit(2)
|
||||
|
||||
for o, a in opts:
|
||||
if o in ("-f", "--file"):
|
||||
filenames.append(a)
|
||||
if o in ("-d", "--debug"):
|
||||
verbosity = 1
|
||||
if o in ("-o", "--outdir"):
|
||||
outdir = a
|
||||
if outdir.rfind('/') != len(outdir):
|
||||
outdir += '/'
|
||||
if o in ("-h", "--help"):
|
||||
usage()
|
||||
sys.exit(2)
|
||||
|
||||
for filename in filenames:
|
||||
file = open(filename, 'r')
|
||||
for line in file:
|
||||
# Removing any comment
|
||||
if line.find('--') >= 0:
|
||||
line = line[:line.find('--')]
|
||||
# Removing any carriage return
|
||||
lines += re.sub('\r', '', line)
|
||||
|
||||
for m in re.findall(r'([a-zA-Z0-9-]+)\s*::=\s+SEQUENCE\s+\(\s*SIZE\s*\(\s*\d+\s*\.\.\s*[0-9a-zA-Z-]+\s*\)\s*\)\s*OF\s+[a-zA-Z-]+\s*\{\s*\{\s*([0-9a-zA-Z-]+)\s*\}\s*\}', lines, re.MULTILINE):
|
||||
ieofielist[m[0]] = m[1]
|
||||
for m in re.findall(r'([a-zA-Z0-9-]+)\s*::=\s+E-RAB-IE-ContainerList\s*\{\s*\{\s*([a-zA-Z0-9-]+)\s*\}\s*\}', lines, re.MULTILINE):
|
||||
ieofielist[m[0]] = m[1]
|
||||
|
||||
for i in re.findall(r'([a-zA-Z0-9-]+)\s+([A-Z0-9-]+)\s*::=\s*\{\s+([\,\|\{\}\t\n\.{3}\ \-a-zA-Z0-9]+)\s+}\n', lines, re.MULTILINE):
|
||||
ies = []
|
||||
maxLength = 0
|
||||
# TODO: handle extensions
|
||||
if i[1].find('EXTENSION') >= 0:
|
||||
continue
|
||||
if fileprefix == "":
|
||||
fileprefix = i[1][:i[1].find('-')].lower()
|
||||
for j in re.findall(r'\s*\{\s*([a-zA-Z0-9-\ \t]+)\s*\}\s*[\|,]*', i[2], re.MULTILINE):
|
||||
for k in re.findall(r'ID\s*([a-zA-Z0-9\-]+)\s*CRITICALITY\s*([a-zA-Z0-9\-]+)\s+[A-Z]+\s+([a-zA-Z0-9\-]+)\s*PRESENCE\s*([a-zA-Z0-9\-]+)', j, re.MULTILINE):
|
||||
printDebug("Got new ie for message " + i[0] + ": " + str(k))
|
||||
if len(k[2]) > maxLength:
|
||||
maxLength = len(k[2])
|
||||
ies.append(k)
|
||||
|
||||
if len(ies) > 0:
|
||||
iesDefs[i[0]] = { "length": maxLength, "ies": ies }
|
||||
else:
|
||||
printWarning("Didn't find any information element for message: " + i[0])
|
||||
|
||||
if len(iesDefs) == 0:
|
||||
printFail("No Information Element parsed, exiting")
|
||||
sys.exit(0)
|
||||
|
||||
fileprefix_first_upper = fileprefix[0].upper() + fileprefix[1:]
|
||||
|
||||
f = open(outdir + fileprefix + '_ies_defs.h', 'w')
|
||||
outputHeaderToFile(f, filename)
|
||||
f.write("#include \"%s_common.h\"\n\n" % (fileprefix))
|
||||
f.write("#ifndef %s_IES_DEFS_H_\n#define %s_IES_DEFS_H_\n\n" % (fileprefix.upper(), fileprefix.upper()))
|
||||
f.write("/* Define the version of script used to generate this file */\n")
|
||||
f.write("#define %s_SCRIPT_VERSION (%s)\n\n" % (fileprefix.upper(), re.sub('\.', '', version)))
|
||||
|
||||
for key in iesDefs:
|
||||
|
||||
if key not in ieofielist.values():
|
||||
continue
|
||||
|
||||
for (i, j) in ieofielist.items():
|
||||
if j == key:
|
||||
break
|
||||
|
||||
f.write("typedef struct %sIEs_s {\n" % (re.sub('-', '_', i)))
|
||||
f.write(" A_SEQUENCE_OF(struct %s_s) %s;\n" % (re.sub('IEs', '', re.sub('-', '_', ieofielist[i])), lowerFirstCamelWord(re.sub('IEs', '', re.sub('-', '_', ieofielist[i])))))
|
||||
f.write("} %sIEs_t;\n\n" % (re.sub('-', '_', i)))
|
||||
|
||||
for key in iesDefs:
|
||||
keyupperunderscore = re.sub('-', '_', key.upper())
|
||||
keylowerunderscore = re.sub('-', '_', key.lower())
|
||||
shift = 0
|
||||
|
||||
if len(iesDefs[key]["ies"]) == 0:
|
||||
continue
|
||||
|
||||
# Presence mask
|
||||
for ie in iesDefs[key]["ies"]:
|
||||
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
|
||||
|
||||
if ie[3] == "optional" or ie[3] == "conditional":
|
||||
f.write("#define {0:<{pad}} {1}\n".format("%s_%s_PRESENT" % (keyupperunderscore, ieupperunderscore), "(1 << %d)" % shift,
|
||||
pad=iesDefs[key]["length"] + len(keyupperunderscore) + 9))
|
||||
shift += 1
|
||||
if (shift > 0):
|
||||
f.write("\n")
|
||||
|
||||
f.write("typedef struct %s_s {\n" % (re.sub('-', '_', key)))
|
||||
if (shift > 0):
|
||||
f.write(" {0:<{pad}} {1};\n".format("uint16_t", "presenceMask", pad=iesDefs[key]["length"] + 2))
|
||||
for ie in iesDefs[key]["ies"]:
|
||||
ieunderscore = re.sub('-', '_', ie[2])
|
||||
iename = re.sub('id-', '', ie[0])
|
||||
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
|
||||
if ie[2] in ieofielist:
|
||||
f.write(" %sIEs_t %s;" % (re.sub('-', '_', ie[2]), ienameunderscore))
|
||||
else:
|
||||
f.write(" {0:<{pad}} {1};".format("%s_t" % ieunderscore, ienameunderscore, pad=iesDefs[key]["length"] + 2))
|
||||
if ie[3] == "optional":
|
||||
f.write(" ///< Optional field")
|
||||
elif ie[3] == "conditional":
|
||||
f.write(" ///< Conditional field")
|
||||
f.write("\n")
|
||||
|
||||
f.write("} %s_t;\n\n" % (re.sub('-', '_', key)))
|
||||
|
||||
f.write("typedef struct %s_message_s {\n" % (fileprefix))
|
||||
f.write(" %s_ProcedureCode_t procedureCode;\n" % (fileprefix_first_upper))
|
||||
f.write(" %s_Criticality_t criticality;\n" % (fileprefix_first_upper))
|
||||
f.write(" uint8_t direction;\n")
|
||||
f.write(" union {\n")
|
||||
|
||||
messageList = iesDefs.keys()
|
||||
messageList.sort()
|
||||
for message in messageList:
|
||||
if message in ieofielist.values():
|
||||
continue
|
||||
if len(iesDefs[message]["ies"]) == 0:
|
||||
continue
|
||||
f.write(" %s_t %s;\n" % (re.sub('-', '_', message), lowerFirstCamelWord(re.sub('-', '_', message))))
|
||||
f.write(" } msg;\n")
|
||||
f.write("} %s_message;\n\n" % (fileprefix))
|
||||
|
||||
for key in iesDefs:
|
||||
if key in ieofielist.values():
|
||||
continue
|
||||
structName = re.sub('ies', '', key)
|
||||
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key)))
|
||||
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
|
||||
keylowerunderscore = re.sub('-', '_', key.lower())
|
||||
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
|
||||
f.write("/** \\brief Decode function for %s ies.\n" % (key))
|
||||
if len(iesDefs[key]["ies"]) != 0:
|
||||
f.write(" * \\param %s Pointer to ASN1 structure in which data will be stored\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
f.write(" * \\param any_p Pointer to the ANY value to decode.\n")
|
||||
f.write(" **/\n")
|
||||
f.write("int %s_decode_%s(\n" % (fileprefix, keylowerunderscore))
|
||||
|
||||
if len(iesDefs[key]["ies"]) != 0:
|
||||
f.write(" %s_t *%s,\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
f.write(" ANY_t *any_p);\n\n")
|
||||
|
||||
if len(iesDefs[key]["ies"]) == 0:
|
||||
continue
|
||||
|
||||
f.write("/** \\brief Encode function for %s ies.\n" % (key))
|
||||
f.write(" * \\param %s Pointer to the ASN1 structure.\n" % (firstlower))
|
||||
f.write(" * \\param %s Pointer to the IES structure.\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
f.write(" **/\n")
|
||||
f.write("int %s_encode_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
|
||||
f.write(" %s_t *%s,\n" % (asn1cStruct, firstlower))
|
||||
f.write(" %s_t *%s);\n\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
|
||||
for key in iesDefs:
|
||||
if key not in ieofielist.values():
|
||||
continue
|
||||
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
|
||||
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
|
||||
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
|
||||
f.write("/** \\brief Encode function for %s ies.\n" % (key))
|
||||
f.write(" * \\param %s Pointer to the ASN1 structure.\n" % (firstlower))
|
||||
f.write(" * \\param %s Pointer to the IES structure.\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
f.write(" **/\n")
|
||||
f.write("int %s_encode_%s(\n" % (fileprefix, firstlower.lower()))
|
||||
f.write(" %s_t *%s,\n" % (asn1cStruct, firstlower))
|
||||
f.write(" %sIEs_t *%sIEs);\n\n" % (asn1cStruct, firstlower))
|
||||
f.write("/** \\brief Decode function for %s ies.\n" % (key))
|
||||
f.write(" * \\param any_p Pointer to the ANY value to decode.\n")
|
||||
f.write(" * \\param callback Callback function called when any_p is successfully decoded.\n")
|
||||
f.write(" **/\n")
|
||||
f.write("int %s_decode_%s(\n" % (fileprefix, firstlower.lower()))
|
||||
f.write(" %sIEs_t *%sIEs,\n" % (asn1cStruct, firstlower))
|
||||
f.write(" %s_t *%s);\n\n" % (asn1cStruct, lowerFirstCamelWord(asn1cStruct)))
|
||||
|
||||
for key in iesDefs:
|
||||
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
|
||||
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
|
||||
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
|
||||
|
||||
if key in ieofielist.values():
|
||||
f.write("/** \\brief Display %s encapsulated IE using XER encoding.\n" % (asn1cStruct))
|
||||
f.write(" * \\param %s Pointer to the IES structure.\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
f.write(" * \\param file File descriptor to write output.\n")
|
||||
f.write(" **/\n")
|
||||
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, re.sub('item', 'list', firstlower.lower())))
|
||||
f.write(" asn_app_consume_bytes_f *cb,\n")
|
||||
f.write(" void *app_key,\n")
|
||||
f.write(" %sIEs_t *%sIEs);\n\n" % (re.sub('item', 'list', asn1cStruct), firstlower))
|
||||
else:
|
||||
f.write("/** \\brief Display %s message using XER encoding.\n" % (asn1cStruct))
|
||||
f.write(" * \\param message_p Pointer to root message.\n")
|
||||
f.write(" * \\param file File descriptor to write output.\n")
|
||||
f.write(" **/\n")
|
||||
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, firstlower.lower()))
|
||||
f.write(" asn_app_consume_bytes_f *cb,\n")
|
||||
f.write(" void *app_key,\n")
|
||||
f.write(" %s_message *message_p);\n\n" % (fileprefix))
|
||||
|
||||
f.write("int %s_xer__print2sp(const void *buffer, size_t size, void *app_key);\n\n" % (fileprefix.lower()))
|
||||
f.write("int %s_xer__print2fp(const void *buffer, size_t size, void *app_key);\n\n" % (fileprefix.lower()))
|
||||
f.write("extern size_t %s_string_total_size;\n\n" % (fileprefix.lower()))
|
||||
f.write("#endif /* %s_IES_DEFS_H_ */\n\n" % (fileprefix.upper()))
|
||||
|
||||
#Generate Decode functions
|
||||
f = open(outdir + fileprefix + '_decoder.c', 'w')
|
||||
outputHeaderToFile(f, filename)
|
||||
f.write("#include \"%s_common.h\"\n#include \"%s_ies_defs.h\"\n\n" % (fileprefix, fileprefix))
|
||||
for key in iesDefs:
|
||||
if key in ieofielist.values():
|
||||
continue
|
||||
structName = re.sub('ies', '', key)
|
||||
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
|
||||
if asn1cStruct.rfind('_') == len(asn1cStruct) - 1:
|
||||
asn1cStruct = asn1cStruct[:-1]
|
||||
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
|
||||
ielistname = re.sub('UE', 'ue', asn1cStruct)
|
||||
ielistnamefirstlower = ielistname[:1].lower() + ielistname[1:]
|
||||
asn1cStructfirstlower = asn1cStruct[:1].lower() + asn1cStruct[1:]
|
||||
keyName = re.sub('-', '_', key)
|
||||
keyupperunderscore = keyName.upper()
|
||||
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
|
||||
|
||||
iesaccess = ""
|
||||
if key not in ieofielist.values():
|
||||
iesaccess = "%s_ies." % (firstlower)
|
||||
|
||||
f.write("int %s_decode_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
|
||||
if len(iesDefs[key]["ies"]) != 0:
|
||||
f.write(" %s_t *%s,\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
f.write(" ANY_t *any_p) {\n\n")
|
||||
|
||||
f.write(" %s_t %s;\n %s_t *%s_p = &%s;\n" % (asn1cStruct, asn1cStructfirstlower, asn1cStruct, asn1cStructfirstlower, asn1cStructfirstlower))
|
||||
f.write(" int i, decoded = 0;\n")
|
||||
if len(iesDefs[key]["ies"]) != 0:
|
||||
f.write(" int tempDecoded = 0;\n")
|
||||
|
||||
f.write(" assert(any_p != NULL);\n")
|
||||
if len(iesDefs[key]["ies"]) != 0:
|
||||
f.write(" assert(%s != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
|
||||
f.write(" %s_DEBUG(\"Decoding message %s (%%s:%%d)\\n\", __FILE__, __LINE__);\n\n" % (fileprefix.upper(), re.sub('-', '_', keyName)))
|
||||
f.write(" ANY_to_type_aper(any_p, &asn_DEF_%s, (void**)&%s_p);\n\n" % (asn1cStruct, asn1cStructfirstlower))
|
||||
f.write(" for (i = 0; i < %s_p->%slist.count; i++) {\n" % (asn1cStructfirstlower, iesaccess))
|
||||
f.write(" %s_IE_t *ie_p;\n" % (fileprefix[0].upper() + fileprefix[1:]))
|
||||
f.write(" ie_p = %s_p->%slist.array[i];\n" % (asn1cStructfirstlower, iesaccess))
|
||||
f.write(" switch(ie_p->id) {\n")
|
||||
for ie in iesDefs[key]["ies"]:
|
||||
iename = re.sub('id-', '', ie[0])
|
||||
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
|
||||
ienameunderscorefirstlower = lowerFirstCamelWord(ienameunderscore)
|
||||
ietypesubst = re.sub('-', '', ie[2])
|
||||
ietypeunderscore = re.sub('-', '_', ie[2])
|
||||
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
|
||||
|
||||
if ie[3] == "optional":
|
||||
f.write(" /* Optional field */\n")
|
||||
elif ie[3] == "conditional":
|
||||
f.write(" /* Conditional field */\n")
|
||||
f.write(" case %s_ProtocolIE_ID_%s:\n" % (fileprefix_first_upper, re.sub('-', '_', ie[0])))
|
||||
f.write(" {\n")
|
||||
f.write(" %s_t *%s_p = NULL;\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
if ie[3] != "mandatory":
|
||||
f.write(" %s->presenceMask |= %s_%s_PRESENT;\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), keyupperunderscore, ieupperunderscore))
|
||||
f.write(" tempDecoded = ANY_to_type_aper(&ie_p->value, &asn_DEF_%s, (void**)&%s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" if (tempDecoded < 0 || %s_p == NULL) {\n" % (lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" %s_ERROR(\"Decoding of IE %s failed\\n\");\n" % (fileprefix.upper(), ienameunderscore))
|
||||
f.write(" if (%s_p)\n" % (lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" decoded += tempDecoded;\n")
|
||||
f.write(" if (asn1_xer_print)\n")
|
||||
f.write(" xer_fprint(stdout, &asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
if ie[2] in ieofielist.keys():
|
||||
f.write(" if (%s_decode_%s(&%s->%s, %s_p) < 0) {\n" % (fileprefix, ietypeunderscore.lower(), lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" %s_ERROR(\"Decoding of encapsulated IE %s failed\\n\");\n" % (fileprefix.upper(), lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" }\n")
|
||||
else:
|
||||
f.write(" memcpy(&%s->%s, %s_p, sizeof(%s_t));\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore, lowerFirstCamelWord(ietypesubst), ietypeunderscore))
|
||||
#f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
|
||||
f.write(" } break;\n")
|
||||
f.write(" default:\n")
|
||||
f.write(" %s_ERROR(\"Unknown protocol IE id (%%d) for message %s\\n\", (int)ie_p->id);\n" % (fileprefix.upper(), re.sub('-', '_', structName.lower())))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" }\n")
|
||||
f.write(" return decoded;\n")
|
||||
f.write("}\n\n")
|
||||
|
||||
for key in iesDefs:
|
||||
if key not in ieofielist.values():
|
||||
continue
|
||||
|
||||
keyname = re.sub('IEs', '', re.sub('Item', 'List', key))
|
||||
|
||||
f.write("int %s_decode_%s(\n" % (fileprefix, re.sub('-', '_', keyname).lower()))
|
||||
f.write(" %sIEs_t *%sIEs,\n" % (re.sub('-', '_', keyname), lowerFirstCamelWord(re.sub('-', '_', keyname))))
|
||||
f.write(" %s_t *%s) {\n\n" % (re.sub('-', '_', keyname), lowerFirstCamelWord(re.sub('-', '_', keyname))))
|
||||
f.write(" int i, decoded = 0;\n")
|
||||
f.write(" int tempDecoded = 0;\n\n")
|
||||
|
||||
f.write(" assert(%s != NULL);\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))));
|
||||
f.write(" assert(%sIEs != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))));
|
||||
|
||||
f.write(" for (i = 0; i < %s->list.count; i++) {\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))))
|
||||
f.write(" %s_IE_t *ie_p = %s->list.array[i];\n" % (fileprefix[0].upper() + fileprefix[1:], lowerFirstCamelWord(re.sub('-', '_', keyname))))
|
||||
f.write(" switch (ie_p->id) {\n")
|
||||
for ie in iesDefs[key]["ies"]:
|
||||
iename = re.sub('id-', '', ie[0])
|
||||
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
|
||||
f.write(" case %s_ProtocolIE_ID_%s:\n" % (fileprefix_first_upper, re.sub('-', '_', ie[0])))
|
||||
f.write(" {\n")
|
||||
f.write(" %s_t *%s_p = NULL;\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" tempDecoded = ANY_to_type_aper(&ie_p->value, &asn_DEF_%s, (void**)&%s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" if (tempDecoded < 0 || %s_p == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" %s_ERROR(\"Decoding of IE %s for message %s failed\\n\");\n" % (fileprefix.upper(), ienameunderscore, re.sub('-', '_', keyname)))
|
||||
f.write(" if (%s_p)\n" % (lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
#f.write(" free(%s_p);\n" % (lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" decoded += tempDecoded;\n")
|
||||
f.write(" if (asn1_xer_print)\n")
|
||||
f.write(" xer_fprint(stdout, &asn_DEF_%s, %s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" ASN_SEQUENCE_ADD(&%sIEs->%s, %s_p);\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname)),
|
||||
re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key))), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
|
||||
f.write(" } break;\n")
|
||||
f.write(" default:\n")
|
||||
f.write(" %s_ERROR(\"Unknown protocol IE id (%%d) for message %s\\n\", (int)ie_p->id);\n" % (fileprefix.upper(), re.sub('-', '_', structName.lower())))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" }\n")
|
||||
f.write(" return decoded;\n")
|
||||
f.write("}\n\n")
|
||||
|
||||
|
||||
#Generate IES Encode functions
|
||||
f = open(outdir + fileprefix + '_encoder.c', 'w')
|
||||
outputHeaderToFile(f,filename)
|
||||
f.write("#include \"%s_common.h\"\n" % (fileprefix))
|
||||
f.write("#include \"%s_ies_defs.h\"\n\n" % (fileprefix))
|
||||
for key in iesDefs:
|
||||
if key in ieofielist.values():
|
||||
continue
|
||||
|
||||
structName = re.sub('ies', '', key)
|
||||
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
|
||||
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
|
||||
if asn1cStruct.rfind('_') == len(asn1cStruct) - 1:
|
||||
asn1cStruct = asn1cStruct[:-1]
|
||||
asn1cStructfirstlower = asn1cStruct[:1].lower() + asn1cStruct[1:]
|
||||
firstwordlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
|
||||
|
||||
iesaccess = ""
|
||||
if key not in ieofielist.values():
|
||||
iesaccess = "%s_ies." % (firstwordlower)
|
||||
|
||||
keyName = re.sub('-', '_', key)
|
||||
keyupperunderscore = keyName.upper()
|
||||
# No IE to encode...
|
||||
if len(iesDefs[key]["ies"]) == 0:
|
||||
continue
|
||||
|
||||
f.write("int %s_encode_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
|
||||
f.write(" %s_t *%s,\n" % (asn1cStruct, firstwordlower))
|
||||
f.write(" %s_t *%s) {\n\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
|
||||
|
||||
f.write(" %s_IE_t *ie;\n\n" % (fileprefix_first_upper))
|
||||
|
||||
f.write(" assert(%s != NULL);\n" % (firstwordlower));
|
||||
f.write(" assert(%s != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', key))));
|
||||
|
||||
for ie in iesDefs[key]["ies"]:
|
||||
iename = re.sub('-', '_', re.sub('id-', '', ie[0]))
|
||||
ienameunderscore = re.sub('-', '_', iename)
|
||||
ienamefirstwordlower = lowerFirstCamelWord(iename)
|
||||
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
|
||||
ietypeunderscore = re.sub('-', '_', ie[2])
|
||||
|
||||
if ie[3] != "mandatory":
|
||||
if ie[3] == "optional":
|
||||
f.write(" /* Optional field */\n")
|
||||
elif ie[3] == "conditional":
|
||||
f.write(" /* Conditional field */\n")
|
||||
f.write(" if (%s->presenceMask & %s_%s_PRESENT) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), keyupperunderscore, ieupperunderscore))
|
||||
#f.write(" == %s_%s_PRESENT) {\n" % (keyupperunderscore, ieupperunderscore))
|
||||
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
|
||||
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
|
||||
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
|
||||
f.write(" &%s->%s)) == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" ASN_SEQUENCE_ADD(&%s->%slist, ie);\n" % (firstwordlower, iesaccess))
|
||||
f.write(" }\n\n")
|
||||
else:
|
||||
if ie[2] in ieofielist.keys():
|
||||
f.write(" %s_t %s;\n\n" % (ietypeunderscore, ienamefirstwordlower))
|
||||
f.write(" memset(&%s, 0, sizeof(%s_t));\n" % (ienamefirstwordlower, ietypeunderscore))
|
||||
f.write("\n")
|
||||
f.write(" if (%s_encode_%s(&%s, &%s->%s) < 0) return -1;\n" % (fileprefix, ietypeunderscore.lower(), ienamefirstwordlower, lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
|
||||
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
|
||||
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
|
||||
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
|
||||
if ie[2] in ieofielist.keys():
|
||||
f.write(" &%s)) == NULL) {\n" % (ienamefirstwordlower))
|
||||
else:
|
||||
f.write(" &%s->%s)) == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" ASN_SEQUENCE_ADD(&%s->%slist, ie);\n\n" % (firstwordlower, iesaccess))
|
||||
if ie[2] in ieofielist.keys():
|
||||
f.write(" /* Free any dynamic allocation that is no more used */\n")
|
||||
f.write(" ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_%s, &%s);\n\n" % (ietypeunderscore, ienamefirstwordlower))
|
||||
|
||||
f.write(" return 0;\n")
|
||||
f.write("}\n\n")
|
||||
|
||||
for (key, value) in iesDefs.items():
|
||||
if key not in ieofielist.values():
|
||||
continue
|
||||
|
||||
ie = value["ies"][0]
|
||||
ietypeunderscore = re.sub('-', '_', ie[2])
|
||||
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key)))
|
||||
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
|
||||
firstwordlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
|
||||
|
||||
for (i, j) in ieofielist.items():
|
||||
if j == key:
|
||||
break
|
||||
f.write("int %s_encode_%s(\n" % (fileprefix, re.sub('-', '_', i).lower()))
|
||||
f.write(" %s_t *%s,\n" % (asn1cStruct, firstwordlower))
|
||||
f.write(" %sIEs_t *%sIEs) {\n\n" % (re.sub('-', '_', i), lowerFirstCamelWord(re.sub('-', '_', i))))
|
||||
f.write(" int i;\n")
|
||||
|
||||
f.write(" %s_IE_t *ie;\n\n" % (fileprefix_first_upper))
|
||||
|
||||
f.write(" assert(%s != NULL);\n" % (firstwordlower));
|
||||
f.write(" assert(%sIEs != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', i))));
|
||||
|
||||
f.write(" for (i = 0; i < %sIEs->%s.count; i++) {\n" % (firstwordlower, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
|
||||
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
|
||||
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
|
||||
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
|
||||
f.write(" %sIEs->%s.array[i])) == NULL) {\n" % (firstwordlower, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
|
||||
f.write(" return -1;\n")
|
||||
f.write(" }\n")
|
||||
f.write(" ASN_SEQUENCE_ADD(&%s->list, ie);\n" % (firstwordlower))
|
||||
f.write(" }\n")
|
||||
f.write(" return 0;\n")
|
||||
f.write("}\n\n")
|
||||
|
||||
#Generate xer print functions
|
||||
f = open(outdir + fileprefix + '_xer_print.c', 'w')
|
||||
outputHeaderToFile(f, filename)
|
||||
f.write("#include <stdlib.h>\n")
|
||||
f.write("#include <stdio.h>\n\n")
|
||||
f.write("#include <asn_application.h>\n#include <asn_internal.h>\n\n")
|
||||
f.write("#include \"%s_common.h\"\n#include \"%s_ies_defs.h\"\n\n" % (fileprefix, fileprefix))
|
||||
|
||||
f.write("size_t %s_string_total_size = 0;\n\n" % (fileprefix.lower()))
|
||||
f.write("""int
|
||||
%s_xer__print2fp(const void *buffer, size_t size, void *app_key) {
|
||||
FILE *stream = (FILE *)app_key;
|
||||
|
||||
if(fwrite(buffer, 1, size, stream) != size)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
""" % (fileprefix.lower()))
|
||||
|
||||
f.write("""int %s_xer__print2sp(const void *buffer, size_t size, void *app_key) {
|
||||
char *string = (char *)app_key;
|
||||
|
||||
/* Copy buffer to the formatted string */
|
||||
memcpy(&string[%s_string_total_size], buffer, size);
|
||||
|
||||
%s_string_total_size += size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
""" % (fileprefix.lower(), fileprefix.lower(), fileprefix.lower()))
|
||||
|
||||
f.write("""static asn_enc_rval_t
|
||||
xer_encode_local(asn_TYPE_descriptor_t *td, void *sptr,
|
||||
asn_app_consume_bytes_f *cb, void *app_key, int indent) {
|
||||
asn_enc_rval_t er, tmper;
|
||||
const char *mname;
|
||||
size_t mlen;
|
||||
int xcan = 2;
|
||||
|
||||
if(!td || !sptr) goto cb_failed;
|
||||
|
||||
mname = td->xml_tag;
|
||||
mlen = strlen(mname);
|
||||
|
||||
_i_ASN_TEXT_INDENT(0, indent);
|
||||
_ASN_CALLBACK3("<", 1, mname, mlen, ">", 1);
|
||||
|
||||
tmper = td->xer_encoder(td, sptr, indent + 1, XER_F_BASIC, cb, app_key);
|
||||
if(tmper.encoded == -1) return tmper;
|
||||
|
||||
_ASN_CALLBACK3("</", 2, mname, mlen, ">\\n", xcan);
|
||||
|
||||
er.encoded = 4 + xcan + (2 * mlen) + tmper.encoded;
|
||||
|
||||
_ASN_ENCODED_OK(er);
|
||||
cb_failed:
|
||||
_ASN_ENCODE_FAILED;
|
||||
}
|
||||
""")
|
||||
|
||||
for (key, value) in iesDefs.items():
|
||||
keyName = re.sub('-', '_', key)
|
||||
keyupperunderscore = keyName.upper()
|
||||
iesStructName = lowerFirstCamelWord(re.sub('-', '_', key))
|
||||
|
||||
ie = value["ies"][0]
|
||||
ietypeunderscore = re.sub('-', '_', ie[2])
|
||||
|
||||
if key in ieofielist.values():
|
||||
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, re.sub('ies', '', re.sub('item', 'list', re.sub('-', '_', key).lower()))))
|
||||
else:
|
||||
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, re.sub('ies', '', re.sub('-', '_', key).lower())))
|
||||
#f.write(" FILE *file,\n")
|
||||
f.write(" asn_app_consume_bytes_f *cb,\n")
|
||||
f.write(" void *app_key,\n")
|
||||
if key in ieofielist.values():
|
||||
iesStructName = lowerFirstCamelWord(re.sub('Item', 'List', re.sub('-', '_', key)))
|
||||
f.write(" %sIEs_t *%s) {\n\n" % (re.sub('IEs', '', re.sub('Item', 'List', re.sub('-', '_', key))), iesStructName))
|
||||
f.write(" int i;\n")
|
||||
f.write(" asn_enc_rval_t er;\n")
|
||||
else:
|
||||
f.write(" %s_message *message_p)\n{\n" % (fileprefix))
|
||||
f.write(" %s_t *%s;\n" % (re.sub('-', '_', key), iesStructName))
|
||||
f.write(" asn_enc_rval_t er;\n")
|
||||
#f.write(" void *app_key = (void *)file;\n")
|
||||
#f.write(" asn_app_consume_bytes_f *cb = %s_xer__print2fp;\n\n" % (fileprefix.lower()))
|
||||
|
||||
f.write(" %s = &message_p->msg.%s;\n\n" % (iesStructName, iesStructName))
|
||||
|
||||
if key in ieofielist.values():
|
||||
# Increase indentation level
|
||||
f.write(" for (i = 0; i < %s->%s.count; i++) {\n" % (iesStructName, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
|
||||
#f.write(" xer_fprint(file, &asn_DEF_%s, %s->%s.array[i]);\n" % (ietypeunderscore, iesStructName, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
|
||||
f.write(" er = xer_encode(&asn_DEF_%s, %s->%s.array[i], XER_F_BASIC, cb, app_key);\n" % (ietypeunderscore, iesStructName, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
|
||||
f.write(" }\n")
|
||||
else:
|
||||
f.write(" cb(\"<%s-PDU>\\n\", %d, app_key);\n" % (key, len("<%s-PDU>\n" % (key))))
|
||||
f.write(" xer_encode_local(&asn_DEF_%s_Criticality, &message_p->criticality, cb, app_key, 1);\n" % fileprefix_first_upper)
|
||||
f.write(" xer_encode_local(&asn_DEF_%s_ProcedureCode, &message_p->procedureCode, cb, app_key, 1);\n" % fileprefix_first_upper)
|
||||
|
||||
f.write(" cb(\" <%s>\\n\", %d, app_key);\n" % (key, len(" <%s>\n" % (key))))
|
||||
|
||||
for ie in iesDefs[key]["ies"]:
|
||||
iename = re.sub('-', '_', re.sub('id-', '', ie[0]))
|
||||
ienameunderscore = re.sub('-', '_', iename)
|
||||
ienamefirstwordlower = lowerFirstCamelWord(iename)
|
||||
ietypeunderscore = re.sub('-', '_', ie[2])
|
||||
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
|
||||
|
||||
if ie[3] != "mandatory":
|
||||
if ie[3] == "optional":
|
||||
f.write(" /* Optional field */\n")
|
||||
elif ie[3] == "conditional":
|
||||
f.write(" /* Conditional field */\n")
|
||||
f.write(" if (%s->presenceMask & %s_%s_PRESENT)\n " % (iesStructName, keyupperunderscore, ieupperunderscore))
|
||||
|
||||
# Is it an encapsulated IE ?
|
||||
if ie[2] in ieofielist.keys():
|
||||
f.write(" %s_xer_print_%s(cb, app_key, &%s->%s);\n" % (fileprefix, re.sub('ies', '', re.sub('-', '_', ie[2]).lower()), iesStructName, ienamefirstwordlower))
|
||||
else:
|
||||
f.write(" xer_encode_local(&asn_DEF_%s, &%s->%s, cb, app_key, 2);\n" % (ietypeunderscore, iesStructName, ienamefirstwordlower))
|
||||
f.write(" cb(\" </%s>\\n\", %d, app_key);\n" % (key, len(" </%s>\n" % (key))))
|
||||
f.write(" cb(\"</%s-PDU>\\n\", %d, app_key);\n" % (key, len("</%s-PDU>\n" % (key))))
|
||||
|
||||
f.write(" _ASN_ENCODED_OK(er);\n")
|
||||
#if key not in ieofielist.values():
|
||||
#f.write("cb_failed:\n")
|
||||
#f.write(" return er;\n")
|
||||
f.write("}\n\n")
|
||||
@@ -233,12 +233,12 @@ function main()
|
||||
##############################################################################
|
||||
# Compile userspace executable
|
||||
##############################################################################
|
||||
rm -f $OPENAIR_DIR/targets/bin/mme_gw
|
||||
cd $OPENAIR_DIR/cmake_targets/epc_build_oai
|
||||
if [ $clean -ne 0 ]; then
|
||||
if [[ $verbose -eq 1 ]]; then
|
||||
echo "Cleaning EPC"
|
||||
echo "Cleaning EPC: certificates, generated configuration files, obj files, mme_gw executable, GTP kernel module"
|
||||
fi
|
||||
rm -f $OPENAIR_DIR/targets/bin/mme_gw
|
||||
rm -Rf build 2>&1
|
||||
$SUDO rm -Rf $OPENAIR_TARGETS/CMAKE/EPC/MME_GW/build 2>&1
|
||||
$SUDO rm -f /usr/local/etc/freeDiameter/mme* 2>&1
|
||||
@@ -246,8 +246,8 @@ function main()
|
||||
$SUDO rm -f /usr/etc/freeDiameter/mme* 2>&1
|
||||
$SUDO rm -f /usr/etc/freeDiameter/epc* 2>&1
|
||||
$SUDO rm -f $OPENAIR_DIR/targets/bin/xt_GTPU*.ko 2>&1
|
||||
(cd $OPENAIRCN_DIR/GTPV1-U/GTPUAH && $SUDO make clean)
|
||||
$SUDO rm -f $OPENAIRCN_DIR/GTPV1-U/GTPUAH/Bin/* 2>&1
|
||||
(cd $OPENAIRCN_DIR/GTPV1-U/GTPU_SP && $SUDO make clean)
|
||||
$SUDO rm -f $OPENAIRCN_DIR/GTPV1-U/GTPU_SP/Bin/* 2>&1
|
||||
$SUDO rm -f /lib/xtables/libxt_GTPU*.so 2>&1
|
||||
mkdir -m 777 -p -v build
|
||||
fi
|
||||
@@ -273,20 +273,17 @@ function main()
|
||||
epc_build_oai mme_gw \
|
||||
mme_gw $dbin/mme_gw.$REL
|
||||
# Only integrated mme+sgw+pgw is operational today
|
||||
# compilations \
|
||||
# epc_build_oai oai_sgw \
|
||||
# oai_sgw $dbin/oai_sgw.$REL
|
||||
compilations \
|
||||
epc_build_oai xt_GTPUAH_lib \
|
||||
libxt_GTPUAH_lib.so $dbin
|
||||
epc_build_oai xt_GTPUSP_lib \
|
||||
libxt_GTPUSP_lib.so $dbin
|
||||
compilations \
|
||||
epc_build_oai xt_GTPUAH \
|
||||
CMakeFiles/xt_GTPUAH/xt_GTPUAH.ko $dbin
|
||||
epc_build_oai xt_GTPUSP \
|
||||
CMakeFiles/xt_GTPUSP/xt_GTPUSP.ko $dbin
|
||||
|
||||
echo_info "Copying iptables libraries into system directory: /lib/xtables"
|
||||
if [ -f $dbin/libxt_GTPUAH_lib.so ] ; then
|
||||
$SUDO rm -f /lib/xtables/libxt_GTPUAH.so
|
||||
$SUDO ln -s $dbin/libxt_GTPUAH_lib.so /lib/xtables/libxt_GTPUAH.so
|
||||
if [ -f $dbin/libxt_GTPUSP_lib.so ] ; then
|
||||
$SUDO rm -f /lib/xtables/libxt_GTPUSP.so
|
||||
$SUDO ln -s $dbin/libxt_GTPUSP_lib.so /lib/xtables/libxt_GTPUSP.so
|
||||
else
|
||||
echo_fatal "not installed GTP-U iptables: binaries not found"
|
||||
fi
|
||||
@@ -298,9 +295,6 @@ function main()
|
||||
else
|
||||
echo_fatal "not installed EPC config files: not found"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
# author Laurent Thomas
|
||||
#
|
||||
#######################################
|
||||
SUDO=sudo
|
||||
SUDO='sudo -E'
|
||||
|
||||
###############################
|
||||
## echo and family
|
||||
@@ -40,7 +40,7 @@ black='\E[30m'
|
||||
red='\E[31m'
|
||||
green='\E[32m'
|
||||
yellow='\E[33m'
|
||||
blue='\E[34m'
|
||||
blue='\E[1;34m'
|
||||
magenta='\E[35m'
|
||||
cyan='\E[36m'
|
||||
white='\E[37m'
|
||||
@@ -112,10 +112,11 @@ compilations() {
|
||||
cd $OPENAIR_DIR/cmake_targets/$1/build
|
||||
{
|
||||
rm -f $3
|
||||
make -j4 $2
|
||||
make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE
|
||||
} > $dlog/$2.$REL.txt 2>&1
|
||||
echo_info "Log file for compilation has been written to: $dlog/$2.$REL.txt"
|
||||
if [ -s $3 ] ; then
|
||||
cp $3 $dbin
|
||||
cp $3 $4
|
||||
echo_success "$2 compiled"
|
||||
else
|
||||
echo_error "$2 compilation failed"
|
||||
@@ -179,7 +180,7 @@ install_nettle_from_source() {
|
||||
cd nettle-2.5/
|
||||
./configure --disable-openssl --enable-shared --prefix=/usr
|
||||
echo "Compiling nettle"
|
||||
make -j4
|
||||
make -j`nproc`
|
||||
make check
|
||||
$SUDO make install
|
||||
rm -rf /tmp/nettle-2.5.tar.gz /tmp/nettle-2.5
|
||||
@@ -194,14 +195,14 @@ install_gnutls_from_source(){
|
||||
cd gnutls-3.1.23/
|
||||
./configure --prefix=/usr
|
||||
echo "Compiling gnutls"
|
||||
make -j4
|
||||
make -j`nproc`
|
||||
$SUDO make install
|
||||
rm -rf /tmp/gnutls-3.1.23.tar.xz /tmp/gnutls-3.1.23
|
||||
}
|
||||
|
||||
install_1.1.5_freediameter_from_source() {
|
||||
cd /tmp
|
||||
echo "Downloading 1.1.5 freeDiameter archive"
|
||||
echo "Downloading 1.1.5 freeDiameter archive"
|
||||
rm -rf /tmp/1.1.5.tar.gz* /tmp/freeDiameter-1.1.5
|
||||
wget http://www.freediameter.net/hg/freeDiameter/archive/1.1.5.tar.gz
|
||||
tar xzf 1.1.5.tar.gz
|
||||
@@ -211,7 +212,7 @@ install_1.1.5_freediameter_from_source() {
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../
|
||||
echo "Compiling freeDiameter"
|
||||
make -j4
|
||||
make -j`nproc`
|
||||
#make test
|
||||
$SUDO make install
|
||||
rm -rf /tmp/1.1.5.tar.gz /tmp/freeDiameter-1.1.5
|
||||
@@ -229,12 +230,30 @@ install_freediameter_from_source() {
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../
|
||||
echo "Compiling freeDiameter"
|
||||
make -j4
|
||||
make -j`nproc`
|
||||
#make test
|
||||
$SUDO make install
|
||||
rm -rf /tmp/1.2.0.tar.gz /tmp/freeDiameter-1.2.0
|
||||
}
|
||||
|
||||
install_latest_freediameter_from_source() {
|
||||
cd /tmp
|
||||
rm -rf /tmp/freeDiameter
|
||||
echo "Downloading latest freeDiameter trunk (may be unstable)"
|
||||
git clone https://github.com/Metaswitch/freeDiameter.git
|
||||
cd freeDiameter
|
||||
patch -p1 < $OPENAIR_DIR/openair-cn/S6A/freediameter/freediameter-1.2.0.patch
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../
|
||||
echo "Compiling freeDiameter"
|
||||
make -j`nproc`
|
||||
#make test
|
||||
$SUDO make install
|
||||
rm -rf /tmp/freeDiameter
|
||||
}
|
||||
|
||||
|
||||
check_install_usrp_uhd_driver(){
|
||||
v=$(lsb_release -cs)
|
||||
$SUDO apt-add-repository "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
|
||||
@@ -279,17 +298,20 @@ check_install_oai_software() {
|
||||
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install -y \
|
||||
autoconf \
|
||||
autoconf \
|
||||
automake \
|
||||
bison \
|
||||
build-essential \
|
||||
cmake \
|
||||
cmake-curses-gui \
|
||||
doxygen \
|
||||
doxygen-gui\
|
||||
texlive-latex-base\
|
||||
ethtool \
|
||||
flex \
|
||||
gccxml \
|
||||
gdb \
|
||||
gccxml \
|
||||
gdb \
|
||||
git \
|
||||
graphviz \
|
||||
gtkwave \
|
||||
guile-2.0-dev \
|
||||
@@ -308,7 +330,7 @@ check_install_oai_software() {
|
||||
libgmp-dev \
|
||||
libgtk-3-dev \
|
||||
libidn2-0-dev \
|
||||
libidn11-dev \
|
||||
libidn11-dev \
|
||||
libmysqlclient-dev \
|
||||
liboctave-dev \
|
||||
libpgm-5.1 \
|
||||
@@ -350,6 +372,7 @@ install_asn1c_from_source(){
|
||||
svn co https://github.com/vlm/asn1c/trunk /tmp/asn1c-r1516 -r 1516 > /tmp/log_compile_asn1c
|
||||
patch -p0 < $OPENAIR_DIR/openair-cn/S1AP/MESSAGES/ASN1/asn1cpatch.p0 >> /tmp/log_compile_asn1c
|
||||
patch -p0 < $OPENAIR_DIR/openair-cn/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0 >> /tmp/log_compile_asn1c
|
||||
patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0 >> /tmp/log_compile_asn1c
|
||||
./configure
|
||||
make > /tmp/log_compile_asn1c 2>&1
|
||||
$SUDO make install
|
||||
|
||||
@@ -86,7 +86,11 @@ function main() {
|
||||
else
|
||||
echo_error "Bad mme fqdn found in cert file: $full_hostname fqdn is $fqdn"
|
||||
fi
|
||||
else
|
||||
echo_error "File $freediameter_path/etc/freeDiameter/mme.cert.pem not found"
|
||||
fi
|
||||
else
|
||||
echo_error "Directory $freediameter_path/etc/freeDiameter not found"
|
||||
fi
|
||||
echo_error "MME S6A: Did not find valid certificate in $freediameter_path/etc/freeDiameter"
|
||||
echo_warning "MME S6A: generating new certificate in $freediameter_path/etc/freeDiameter..."
|
||||
|
||||
@@ -1,3 +1,36 @@
|
||||
# Internet
|
||||
# |
|
||||
# PGW_IPV4_ADDRESS_FOR_SGI |
|
||||
# +-----------+-------+------------+---------------+--------------------------+
|
||||
# |host y | | PGW_INTERFACE_NAME_FOR_SGI | |
|
||||
# +-----------+ +------------+---------------+ |
|
||||
# | | |
|
||||
# | +----+----+ (HSS may run on this host |
|
||||
# | | mme_gw | or on another one) |
|
||||
# | +----+----+ |
|
||||
# | | |
|
||||
# | +-----------------+--------------------+ |
|
||||
# | | SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP | |
|
||||
# | | MME_INTERFACE_NAME_FOR_S1_MME | |
|
||||
# +----------------------------+---+--+---------------------------------------+
|
||||
# MME_IPV4_ADDRESS_FOR_S1_MME | (S1-C and S1-U addresses/interfaces may be the same)
|
||||
# SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP
|
||||
# |
|
||||
# |
|
||||
# a.b.c.d |
|
||||
# +---------------+------------+---+--+---------------------------------------+
|
||||
# |eNBx | | ethx | |
|
||||
# +---------------+ +---+--+ |
|
||||
# | | |
|
||||
# | +------+---------+ |
|
||||
# | | lte-softmodem | |
|
||||
# | | or | |
|
||||
# | | oaisim (1)eNB (x UEs) |
|
||||
# | +-------+--------+ |
|
||||
# +---------------------------------+-----------------------------------------+
|
||||
# |
|
||||
# O (RF antenna)
|
||||
|
||||
MME :
|
||||
{
|
||||
|
||||
@@ -34,8 +67,8 @@ MME :
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 32;
|
||||
SCTP_OUTSTREAMS = 32;
|
||||
SCTP_INSTREAMS = 8;
|
||||
SCTP_OUTSTREAMS = 8;
|
||||
};
|
||||
|
||||
# ------- S1AP definitions
|
||||
@@ -61,7 +94,7 @@ MME :
|
||||
# TA (mcc.mnc:tracking area code) DEFAULT = 208.34:0
|
||||
# max values = 999.999:65535
|
||||
# maximum of 32 values, comma separated
|
||||
PLMN = (
|
||||
TAI_LIST = (
|
||||
{MCC="208" ; MNC="95"; TAC = "1"; } # YOUR PLMN CONFIG HERE
|
||||
);
|
||||
};
|
||||
@@ -123,9 +156,8 @@ P-GW =
|
||||
);
|
||||
};
|
||||
|
||||
#WARNING DNS ARE HARDCODED IN openair-cn/NAS/EURECOM-NAS/src/esm/msg/ActivateDefaultEpsBearerContextRequest.c:305
|
||||
DEFAULT_DNS_1_IPV4_ADDRESS = "192.168.12.100"; # YOUR NETWORK CONFIG HERE
|
||||
DEFAULT_DNS_2_IPV4_ADDRESS = "192.168.106.12"; # YOUR NETWORK CONFIG HERE
|
||||
DEFAULT_DNS_IPV4_ADDRESS = "192.168.106.12"; # YOUR NETWORK CONFIG HERE
|
||||
DEFAULT_DNS_SEC_IPV4_ADDRESS = "192.168.12.100"; # YOUR NETWORK CONFIG HERE
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ MME :
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 32;
|
||||
SCTP_OUTSTREAMS = 32;
|
||||
SCTP_INSTREAMS = 8;
|
||||
SCTP_OUTSTREAMS = 8;
|
||||
};
|
||||
|
||||
# ------- S1AP definitions
|
||||
@@ -61,9 +61,8 @@ MME :
|
||||
# TA (mcc.mnc:tracking area code) DEFAULT = 208.34:0
|
||||
# max values = 999.999:65535
|
||||
# maximum of 32 values, comma separated
|
||||
PLMN = (
|
||||
{MCC="208" ; MNC="95"; TAC = "1"; }, # YOUR PLMN CONFIG HERE
|
||||
{MCC="208" ; MNC="10"; TAC = "1"; } # YOUR PLMN CONFIG HERE
|
||||
TAI_LIST = (
|
||||
{MCC="208" ; MNC="95"; TAC = "1"; } # YOUR PLMN CONFIG HERE
|
||||
);
|
||||
};
|
||||
|
||||
@@ -124,9 +123,8 @@ P-GW =
|
||||
);
|
||||
};
|
||||
|
||||
#WARNING DNS ARE HARDCODED IN openair-cn/NAS/EURECOM-NAS/src/esm/msg/ActivateDefaultEpsBearerContextRequest.c:305
|
||||
DEFAULT_DNS_1_IPV4_ADDRESS = "192.168.12.100"; # YOUR NETWORK CONFIG HERE
|
||||
DEFAULT_DNS_2_IPV4_ADDRESS = "192.168.106.12"; # YOUR NETWORK CONFIG HERE
|
||||
DEFAULT_DNS_IPV4_ADDRESS = "192.168.106.12"; # YOUR NETWORK CONFIG HERE
|
||||
DEFAULT_DNS_SEC_IPV4_ADDRESS = "192.168.12.100"; # YOUR NETWORK CONFIG HERE
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,110 @@ mkdir -p $1
|
||||
cd $1
|
||||
shift
|
||||
|
||||
asn1c -gen-PER -fcompound-names $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
||||
#if this script is called with only 2 arguments (so 1 here after the shift), it's for RRC
|
||||
#(there may be a better way...)
|
||||
if [ $# -eq 1 ]; then
|
||||
|
||||
#asn1c does not work well with extension groups, we need the following fix:
|
||||
# replace [[ by '<name> SEQUENCE {'
|
||||
# and ]] by '} OPTIONAL'
|
||||
#<name> is ext<N> with N starting from 1 and incremented at each new [[ ]] just
|
||||
#following another [[ ]]
|
||||
#
|
||||
#this is what the following C program does
|
||||
|
||||
echo generate asnfix.c
|
||||
|
||||
cat << EOF > asnfix.c
|
||||
/* transforms:
|
||||
* '[[' to 'name SEQUENCE {'
|
||||
* ']]' to '} OPTIONAL'
|
||||
* name is ext1, ext2, ..., for each [[ at the same level
|
||||
* levels are delimited by { and }
|
||||
* -- to end of line is a comment and unprocessed
|
||||
* nested [[ ]] not handled
|
||||
* { and } must be balanced
|
||||
* [[ and ]] can be whatever, every combination is valid
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void level(int toplevel)
|
||||
{
|
||||
int c;
|
||||
int next_name = 1;
|
||||
|
||||
while (1) {
|
||||
c = getchar();
|
||||
next:
|
||||
if (c == EOF) { if (toplevel) break; abort(); }
|
||||
|
||||
if (c == '-') {
|
||||
c = getchar();
|
||||
if (c != '-') { putchar('-'); goto next; }
|
||||
putchar(c); putchar(c);
|
||||
while (1) {
|
||||
c = getchar(); if (c == EOF) abort();
|
||||
putchar(c);
|
||||
if (c == '\n') break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c == '[') {
|
||||
c = getchar();
|
||||
if (c != '[') { putchar('['); goto next; }
|
||||
printf("ext%d SEQUENCE {", next_name);
|
||||
next_name++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c == ']') {
|
||||
c = getchar();
|
||||
if (c != ']') { putchar(']'); goto next; }
|
||||
printf("} OPTIONAL");
|
||||
continue;
|
||||
}
|
||||
|
||||
putchar(c);
|
||||
if (c == '}') { if (toplevel) abort(); break; }
|
||||
if (c == '{') level(0);
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
level(1);
|
||||
fflush(stdout);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
|
||||
echo compile asnfix.c
|
||||
|
||||
gcc -Wall -o asnfix asnfix.c
|
||||
|
||||
echo run asnfix on $1
|
||||
|
||||
./asnfix < $1 > fixed_grammar.asn
|
||||
|
||||
rm -f asnfix asnfix.c
|
||||
|
||||
echo done with asnfix
|
||||
|
||||
echo running asn1c
|
||||
|
||||
asn1c -gen-PER -fcompound-names fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
||||
|
||||
rm -f fixed_grammar.asn
|
||||
|
||||
echo asn1c done
|
||||
|
||||
else
|
||||
|
||||
asn1c -gen-PER -fcompound-names $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
|
||||
|
||||
fi
|
||||
|
||||
awk '
|
||||
BEGIN {
|
||||
|
||||
@@ -1,5 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# OpenAirInterface
|
||||
# Copyright(c) 1999 - 2015 Eurecom
|
||||
#
|
||||
# OpenAirInterface is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
#
|
||||
# OpenAirInterface is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenAirInterface.The full GNU General Public License is
|
||||
# included in this distribution in the file called "COPYING". If not,
|
||||
# see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Contact Information
|
||||
# OpenAirInterface Admin: openair_admin@eurecom.fr
|
||||
# OpenAirInterface Tech : openair_tech@eurecom.fr
|
||||
# OpenAirInterface Dev : openair4g-devel@eurecom.fr
|
||||
#
|
||||
# Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||
#
|
||||
################################################################################
|
||||
# file init_nas_nos1
|
||||
# brief loads the nasmesh module and sets up the radio bearers (used to provide ip interface without S1 interface)
|
||||
# author Florian Kaltenberger
|
||||
#
|
||||
#######################################
|
||||
|
||||
load_module()
|
||||
{
|
||||
mod_name=${1##*/}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
# OpenAirInterface
|
||||
# Copyright(c) 1999 - 2015 Eurecom
|
||||
#
|
||||
# OpenAirInterface is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
#
|
||||
# OpenAirInterface is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenAirInterface.The full GNU General Public License is
|
||||
# included in this distribution in the file called "COPYING". If not,
|
||||
# see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Contact Information
|
||||
# OpenAirInterface Admin: openair_admin@eurecom.fr
|
||||
# OpenAirInterface Tech : openair_tech@eurecom.fr
|
||||
# OpenAirInterface Dev : openair4g-devel@eurecom.fr
|
||||
#
|
||||
# Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||
#
|
||||
################################################################################
|
||||
# file init_nas_nos1
|
||||
# brief loads the nasmesh module and sets up the radio bearers (used to provide ip interface without S1 interface)
|
||||
# author Florian Kaltenberger
|
||||
#
|
||||
#######################################
|
||||
|
||||
load_module() {
|
||||
mod_name=${1##*/}
|
||||
mod_name=${mod_name%.*}
|
||||
if awk "/$mod_name/ {found=1 ;exit} END {if (found!=1) exit 1}" /proc/modules
|
||||
then
|
||||
echo "module $mod_name already loaded: I remove it first"
|
||||
sudo rmmod $mod_name
|
||||
fi
|
||||
echo loading $mod_name
|
||||
sudo insmod $1
|
||||
}
|
||||
|
||||
load_module $OPENAIR_DIR/targets/bin/nasmesh.ko
|
||||
|
||||
if [ "$1" = "eNB" ]; then
|
||||
echo "bring up oai0 interface for enb"
|
||||
sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
$OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.9 -r 1
|
||||
else
|
||||
if [ "$1" = "UE" ]; then
|
||||
echo "bring up oai0 interface for UE"
|
||||
sudo ifconfig oai0 10.0.1.9 netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
$OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.9 -t 10.0.1.1 -r 1
|
||||
fi
|
||||
fi
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
pid=$1
|
||||
sleep_sec=0.5
|
||||
|
||||
if [ "$2" != "" ] ; then
|
||||
sleep_sec=$2
|
||||
fi
|
||||
#declare -r cnt=$sleep_sec
|
||||
OUTPUT_FILE="/tmp/mem_usage_${pid}_${sleep_sec}.csv"
|
||||
echo "RSS(KB);PSS(KB);SHARED_CLEAN(KB);SHARED_DIRTY(KB);PRIVATE)KB)" >> $OUTPUT_FILE
|
||||
echo "Mem usage for PID $pid with observation period of ${sleep_sec}"
|
||||
|
||||
while ps $pid >/dev/null
|
||||
do
|
||||
if [ -f /proc/$pid/smaps ]; then
|
||||
rss=$(awk '/^Rss/ {i = i + $2} END {print i}' /proc/$pid/smaps)
|
||||
pss=$(awk '/^Pss/ {i = i + $2 + 0.5} END {print i}' /proc/$pid/smaps)
|
||||
sc=$(awk '/^Shared_Clean/ {i = i + $2} END {print i}' /proc/$pid/smaps)
|
||||
sd=$(awk '/^Shared_Dirty/ {i = i + $2} END {print i}' /proc/$pid/smaps)
|
||||
pc=$(awk '/^Private_Clean/ {i = i + $2} END {print i}' /proc/$pid/smaps)
|
||||
pd=$(awk '/^Private_Dirty/ {i = i + $2} END {print i}' /proc/$pid/smaps)
|
||||
echo "$cnt;$rss;$pss;$sc;$pc;$pd;" >> $OUTPUT_FILE
|
||||
fi
|
||||
|
||||
sleep $sleep_sec
|
||||
done
|
||||
@@ -39,6 +39,8 @@
|
||||
################################
|
||||
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
|
||||
source $THIS_SCRIPT_PATH/build_helper
|
||||
declare -i g_run_msc_gen=0
|
||||
declare g_msc_dir="/tmp"
|
||||
|
||||
|
||||
function help()
|
||||
@@ -57,6 +59,7 @@ function help()
|
||||
echo_error " -K, --itti-dump-file filename ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
|
||||
echo_error " -M, --target-dl-mcs mcs Downlink target MCS."
|
||||
echo_error " -m, --mscgen directory Generate mscgen output files in a directory"
|
||||
echo_error " -s, --show-stdout Do not redirect stdout and stderr to file /tmp/lte_softmodem.stdout.txt."
|
||||
echo_error " -S, --enable-missed-slot Continue execution in case of missed slot."
|
||||
echo_error " -T, --target-ul-mcs mcs Uplink target MCS."
|
||||
echo_error " -V, --vcd Dump timings of processing in a GTKWave compliant file format."
|
||||
@@ -68,13 +71,40 @@ function help()
|
||||
}
|
||||
|
||||
|
||||
function do_msc_gen()
|
||||
{
|
||||
cd $g_msc_dir
|
||||
last_created_file=`ls -t mscgen* | head -1 | tr -d ':'`
|
||||
$OPENAIR_DIR/targets/SCRIPTS/msc_gen.py
|
||||
sync
|
||||
last_created_file2=`ls -t mscgen* | head -1 | tr -d ':'`
|
||||
|
||||
if [ x"$last_created_file" != x"$last_created_file2" ]; then
|
||||
if [ -f ./$last_created_file2/oai_mscgen_page_0.png ]; then
|
||||
command -v eog 2>/dev/null && eog ./$last_created_file2/oai_mscgen_page_0.png
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
function control_c()
|
||||
# run if user hits control-c
|
||||
{
|
||||
echo_warning "\nExiting by ctrl+c\n"
|
||||
if [ $g_run_msc_gen -eq 1 ]; then
|
||||
do_msc_gen
|
||||
fi
|
||||
exit $?
|
||||
}
|
||||
|
||||
|
||||
function main()
|
||||
{
|
||||
local -i run_gdb=0
|
||||
local -i run_mscgen=0
|
||||
local -i show_stdout=0
|
||||
local exe_arguments=""
|
||||
local MSC_DIR="/tmp"
|
||||
local itti_dump_file=""
|
||||
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
@@ -99,7 +129,7 @@ function main()
|
||||
;;
|
||||
-g | --gdb)
|
||||
run_gdb=1
|
||||
echo "setting GDB flag to: $GDB"
|
||||
echo "setting GDB flag to: $run_gdb"
|
||||
shift;
|
||||
;;
|
||||
-h | --help)
|
||||
@@ -108,23 +138,23 @@ function main()
|
||||
exit 0
|
||||
;;
|
||||
-K | --itti-dump-file)
|
||||
ITTI_DUMP_FILE=$2
|
||||
itti_dump_file=$2
|
||||
# can omit file name if last arg on the line
|
||||
if [ "x$ITTI_DUMP_FILE" = "x" ]; then
|
||||
ITTI_DUMP_FILE="/tmp/enb_s1_usrp_itti.log"
|
||||
if [ "x$itti_dump_file" = "x" ]; then
|
||||
itti_dump_file="/tmp/enb_s1_usrp_itti.log"
|
||||
shift 1;
|
||||
else
|
||||
shift 2;
|
||||
fi
|
||||
echo "setting ITTI dump file to: $ITTI_DUMP_FILE"
|
||||
exe_arguments="$exe_arguments -K $ITTI_DUMP_FILE"
|
||||
echo "setting ITTI dump file to: $itti_dump_file"
|
||||
exe_arguments="$exe_arguments -K $itti_dump_file"
|
||||
;;
|
||||
-m | --mscgen)
|
||||
MSC_DIR=$2
|
||||
g_msc_dir=$2
|
||||
# can omit file name if last arg on the line
|
||||
if [ -d "$MSC_DIR" ]; then
|
||||
echo "setting mscgen log files to dir: $MSC_DIR"
|
||||
run_mscgen=1
|
||||
if [ -d "$g_msc_dir" ]; then
|
||||
echo "setting mscgen log files to dir: $g_msc_dir"
|
||||
g_run_msc_gen=1
|
||||
shift 2;
|
||||
else
|
||||
echo_error "Mscgen log dir does not exist"
|
||||
@@ -141,6 +171,11 @@ function main()
|
||||
exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
|
||||
shift ;
|
||||
;;
|
||||
-s | --show-stdout)
|
||||
echo "setting show stdout"
|
||||
show_stdout=1
|
||||
shift ;
|
||||
;;
|
||||
-S | --enable-missed-slot)
|
||||
echo "setting continue even if missed slot"
|
||||
exe_arguments="$exe_arguments -S"
|
||||
@@ -151,14 +186,14 @@ function main()
|
||||
exe_arguments="$exe_arguments -t $2"
|
||||
shift 2;
|
||||
;;
|
||||
-W | ----wireshark-l2)
|
||||
-W | --wireshark-l2)
|
||||
echo "setting l2 pcap dump output"
|
||||
exe_arguments="$exe_arguments -W"
|
||||
shift ;
|
||||
;;
|
||||
-x | --xforms)
|
||||
exe_arguments="$exe_arguments -d"
|
||||
echo "setting xforms to: $XFORMS"
|
||||
echo "setting xforms"
|
||||
shift;
|
||||
;;
|
||||
*)
|
||||
@@ -174,37 +209,38 @@ function main()
|
||||
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
|
||||
|
||||
|
||||
if [ ! -e $OPENAIR_DIR/targets/bin/lte-softmodem ]; then
|
||||
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/lte-softmodem executable"
|
||||
if [ ! -e $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 ]; then
|
||||
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 executable"
|
||||
fi
|
||||
|
||||
|
||||
if [ $run_gdb -eq 0 ]; then
|
||||
exec $OPENAIR_DIR/targets/bin/lte-softmodem `echo $exe_arguments` 2>&1 > /tmp/lte_softmodem.stdout.txt
|
||||
# trap keyboard interrupt (control-c)
|
||||
trap control_c SIGINT
|
||||
if [ $show_stdout -eq 0 ]; then
|
||||
echo_warning "stdout/sderr of lte-softmodem executable redirected to /tmp/lte_softmodem.stdout.txt"
|
||||
exec $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 `echo $exe_arguments` 2>&1 > /tmp/lte_softmodem.stdout.txt
|
||||
else
|
||||
exec $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 `echo $exe_arguments`
|
||||
fi
|
||||
else
|
||||
# trap keyboard interrupt (control-c) is done by gdb
|
||||
touch ~/.gdb_lte_softmodem
|
||||
chmod 777 ~/.gdb_lte_softmodem
|
||||
echo "file $OPENAIR_DIR/targets/bin/lte-softmodem" > ~/.gdb_lte_softmodem
|
||||
echo "file $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10" > ~/.gdb_lte_softmodem
|
||||
echo "set args $exe_arguments" >> ~/.gdb_lte_softmodem
|
||||
echo "run" >> ~/.gdb_lte_softmodem
|
||||
cat ~/.gdb_lte_softmodem
|
||||
gdb -n -x ~/.gdb_lte_softmodem 2>&1 > /tmp/gdb_lte_softmodem.stdout.txt
|
||||
if [ $show_stdout -eq 0 ]; then
|
||||
echo_warning "stdout/sderr of lte-softmodem executable redirected to /tmp/gdb_lte_softmodem.stdout.txt"
|
||||
gdb -n -x ~/.gdb_lte_softmodem 2>&1 > /tmp/gdb_lte_softmodem.stdout.txt
|
||||
else
|
||||
gdb -n -x ~/.gdb_lte_softmodem
|
||||
fi
|
||||
if [ $g_run_msc_gen -eq 1 ]; then
|
||||
do_msc_gen
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $run_mscgen -eq 1 ]; then
|
||||
cd $MSC_DIR
|
||||
last_created_file=`ls -t mscgen* | head -1 | tr -d ':'`
|
||||
$OPENAIR_DIR/targets/SCRIPTS/msc_gen.py --profile E_UTRAN
|
||||
sync
|
||||
last_created_file2=`ls -t mscgen* | head -1 | tr -d ':'`
|
||||
|
||||
if [ x"$last_created_file" != x"$last_created_file2" ]; then
|
||||
if [ -f ./$last_created_file2/oai_mscgen_page_0.png ]; then
|
||||
command -v eog 2>/dev/null && eog ./$last_created_file2/oai_mscgen_page_0.png
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -57,9 +57,11 @@ function help()
|
||||
echo_error " "
|
||||
echo_error "Options:"
|
||||
echo_error "Mandatory arguments to long options are mandatory for short options too."
|
||||
echo_error " -a, --abstraction enable phy abstraction mode"
|
||||
echo_error " -c, -C, --config-file eNB_config_file eNB config file, (see $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF)"
|
||||
echo_error " Default eNB config file if not set is $1"
|
||||
echo_error " -g, --gdb Run with GDB."
|
||||
echo_error " -l, --log-level set the global log level (8:trace, 7:debug, 6:info, 4:warn, 3:error). Note that the log configuration is eNB config file is ignored for oaisim."
|
||||
echo_error " -h, --help Print this help."
|
||||
echo_error " -K, --itti-dump-file filename ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
|
||||
echo_error " -m, --mscgen directory Generate mscgen output files in a directory"
|
||||
@@ -84,17 +86,24 @@ function main()
|
||||
local DEFAULT_CONFIG_FILE_ENB=$OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf
|
||||
local CONFIG_FILE_ENB=$DEFAULT_CONFIG_FILE_ENB
|
||||
local MSC_DIR="/tmp"
|
||||
|
||||
local abstraction_flag=0
|
||||
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
case "$1" in
|
||||
-c | -C | --config-file)
|
||||
-a | --abstraction )
|
||||
abstraction_flag=1
|
||||
echo "enabling abstraction mode"
|
||||
exe_arguments="$exe_arguments -a"
|
||||
shift;
|
||||
;;
|
||||
-c | -C | --config-file)
|
||||
CONFIG_FILE_ENB=$2
|
||||
# may be relative path
|
||||
if [ -f $(dirname $(readlink -f $0))/$CONFIG_FILE ]; then
|
||||
CONFIG_FILE_ENB=$(dirname $(readlink -f $0))/$CONFIG_FILE
|
||||
echo "setting config file to: $CONFIG_FILE"
|
||||
CONFIG_FILE_ACCESS_OK=1
|
||||
config_FILE_ACCESS_OK=1
|
||||
else
|
||||
# may be absolute path
|
||||
if [ -f $CONFIG_FILE_ENB ]; then
|
||||
@@ -110,6 +119,11 @@ function main()
|
||||
echo "setting GDB flag to: $GDB"
|
||||
shift;
|
||||
;;
|
||||
-l | --log-level)
|
||||
echo "setting the log level to $2"
|
||||
exe_arguments="$exe_arguments -l $2"
|
||||
shift 2;
|
||||
;;
|
||||
-h | --help)
|
||||
help $DEFAULT_CONFIG_FILE_ENB
|
||||
shift;
|
||||
@@ -130,7 +144,6 @@ function main()
|
||||
|
||||
-m | --mscgen)
|
||||
MSC_DIR=$2
|
||||
# can omit file name if last arg on the line
|
||||
if [ -d "$MSC_DIR" ]; then
|
||||
echo "setting mscgen log files to dir: $MSC_DIR"
|
||||
run_mscgen=1
|
||||
@@ -140,16 +153,17 @@ function main()
|
||||
exit -1
|
||||
fi
|
||||
;;
|
||||
|
||||
# -u | --num-ue )
|
||||
|
||||
-V | --vcd)
|
||||
"setting gtk-wave output"
|
||||
exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
|
||||
shift ;
|
||||
;;
|
||||
-W | ----wireshark-l2)
|
||||
-W | --wireshark-l2)
|
||||
echo "setting l2 pcap dump output"
|
||||
exe_arguments="$exe_arguments -P wireshark"
|
||||
shift 2;
|
||||
shift 1;
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option $1"
|
||||
@@ -185,8 +199,11 @@ function main()
|
||||
# ue1 -> enb
|
||||
$OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i1 -z0 -s 10.0.2.2 -t 10.0.2.1 -r 1
|
||||
|
||||
|
||||
exe_arguments="$exe_arguments -s15 -AAWGN -b1 -u1"
|
||||
if [ "$abstraction_flag" -eq "0" ] ; then
|
||||
exe_arguments="$exe_arguments -s15 -AAWGN -b1 -u1"
|
||||
else
|
||||
exe_arguments="$exe_arguments -b1 -u1"
|
||||
fi
|
||||
|
||||
cd $OPENAIR_DIR/targets/bin
|
||||
|
||||
@@ -194,13 +211,13 @@ function main()
|
||||
if [ $run_mscgen -eq 1 ]; then
|
||||
$SUDO rm -f /tmp/openair.msc.*
|
||||
fi
|
||||
|
||||
|
||||
if [ $run_gdb -eq 0 ]; then
|
||||
exec $SUDO $OPENAIR_DIR/targets/bin/oaisim_nos1 $exe_arguments | tee /tmp/enb_ue_nos1.log.txt
|
||||
exec $SUDO $OPENAIR_DIR/targets/bin/oaisim_nos1.Rel10 $exe_arguments | tee /tmp/enb_ue_nos1.log.txt
|
||||
else
|
||||
touch ~/.gdb_enb_ue_nos1
|
||||
chmod 777 ~/.gdb_enb_ue_nos1
|
||||
echo "file $OPENAIR_DIR/targets/bin/oaisim_nos1" > ~/.gdb_enb_ue_nos1
|
||||
echo "file $OPENAIR_DIR/targets/bin/oaisim_nos1.Rel10" > ~/.gdb_enb_ue_nos1
|
||||
echo "set args $exe_arguments" >> ~/.gdb_enb_ue_nos1
|
||||
echo "run" >> ~/.gdb_enb_ue_nos1
|
||||
cat ~/.gdb_enb_ue_nos1
|
||||
|
||||
@@ -214,12 +214,12 @@ function main()
|
||||
|
||||
is_tun=`is_tun_interface $ENB_INTERFACE_NAME_FOR_S1_MME $ENB_INTERFACE_NAME_FOR_S1U`
|
||||
# if [ $is_tun = "1" ]; then
|
||||
# $SUDO openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1U;sync
|
||||
# $SUDO openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
|
||||
# $SUDO ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1U/$ENB_IPV4_NETMASK_FOR_S1U dev $ENB_INTERFACE_NAME_FOR_S1U;sync
|
||||
# $SUDO ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1_MME/$ENB_IPV4_NETMASK_FOR_S1_MME dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
|
||||
# $SUDO ifconfig $ENB_INTERFACE_NAME_FOR_S1U up;sync
|
||||
# $SUDO ifconfig $ENB_INTERFACE_NAME_FOR_S1_MME up;sync
|
||||
# openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1U;sync
|
||||
# openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
|
||||
# ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1U/$ENB_IPV4_NETMASK_FOR_S1U dev $ENB_INTERFACE_NAME_FOR_S1U;sync
|
||||
# ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1_MME/$ENB_IPV4_NETMASK_FOR_S1_MME dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
|
||||
# ifconfig $ENB_INTERFACE_NAME_FOR_S1U up;sync
|
||||
# ifconfig $ENB_INTERFACE_NAME_FOR_S1_MME up;sync
|
||||
# echo_success "Configured local eNB S1 tun interfaces"
|
||||
# else
|
||||
# echo_success "eNB S1 tun interfaces should be ethernet interfaces (no tunnels configured)"
|
||||
@@ -228,21 +228,21 @@ function main()
|
||||
##################################################
|
||||
# LAUNCH eNB + UE executable
|
||||
##################################################
|
||||
$SUDO pkill oaisim
|
||||
$SUDO rmmod ue_ip > /dev/null 2>&1
|
||||
pkill oaisim
|
||||
rmmod ue_ip > /dev/null 2>&1
|
||||
|
||||
echo_success "Bringup UE interface..."
|
||||
$SUDO insmod $OPENAIR_DIR/targets/bin/ue_ip.ko
|
||||
insmod $OPENAIR_DIR/targets/bin/ue_ip.ko
|
||||
|
||||
$SUDO ip route flush cache
|
||||
ip route flush cache
|
||||
|
||||
# Check table 200 lte in /etc/iproute2/rt_tables
|
||||
fgrep lte /etc/iproute2/rt_tables > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
$SUDO echo "200 lte " >> /etc/iproute2/rt_tables
|
||||
bash -c echo "200 lte " >> /etc/iproute2/rt_tables
|
||||
fi
|
||||
$SUDO ip rule add fwmark 1 table lte
|
||||
$SUDO ip route add default dev oip1 table lte
|
||||
ip rule add fwmark 1 table lte
|
||||
ip route add default dev oip1 table lte
|
||||
|
||||
exe_arguments="$exe_arguments -s15 -AAWGN -y1 -b1 -u1 -Q0"
|
||||
|
||||
@@ -250,19 +250,19 @@ function main()
|
||||
|
||||
|
||||
if [ $run_mscgen -eq 1 ]; then
|
||||
$SUDO rm -f /tmp/openair.msc.*
|
||||
rm -f /tmp/openair.msc.*
|
||||
fi
|
||||
|
||||
if [ $run_gdb -eq 0 ]; then
|
||||
exec $SUDO $OPENAIR_DIR/targets/bin/oaisim $exe_arguments | tee /tmp/enb_ue_s1.log.txt
|
||||
exec $OPENAIR_DIR/targets/bin/oaisim.Rel10 $exe_arguments | tee /tmp/enb_ue_s1.log.txt
|
||||
else
|
||||
touch ~/.gdb_enb_ue_s1
|
||||
chmod 777 ~/.gdb_enb_ue_s1
|
||||
echo "file $OPENAIR_DIR/targets/bin/oaisim" > ~/.gdb_enb_ue_s1
|
||||
echo "file $OPENAIR_DIR/targets/bin/oaisim.Rel10" > ~/.gdb_enb_ue_s1
|
||||
echo "set args $exe_arguments" >> ~/.gdb_enb_ue_s1
|
||||
echo "run" >> ~/.gdb_enb_ue_s1
|
||||
cat ~/.gdb_enb_ue_s1
|
||||
$SUDO gdb -n -x ~/.gdb_enb_ue_s1
|
||||
gdb -n -x ~/.gdb_enb_ue_s1
|
||||
fi
|
||||
|
||||
if [ $run_mscgen -eq 1 ]; then
|
||||
@@ -281,4 +281,12 @@ function main()
|
||||
|
||||
}
|
||||
|
||||
sudo echo
|
||||
is_sudo=$?
|
||||
if [[ "$is_sudo" -ne 0 ]]; then
|
||||
echo_error "This script must be run by root or a sudo'er"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
main "$@"
|
||||
|
||||
+49
-29
@@ -39,6 +39,8 @@
|
||||
################################
|
||||
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
|
||||
source $THIS_SCRIPT_PATH/build_helper
|
||||
declare -i g_run_msc_gen=0
|
||||
declare g_msc_dir="/tmp"
|
||||
|
||||
set_openair_env
|
||||
|
||||
@@ -62,17 +64,39 @@ function help()
|
||||
echo_error " 2 -> ASN1 XER printf on and ASN1 debug on"
|
||||
}
|
||||
|
||||
function do_msc_gen()
|
||||
{
|
||||
cd $g_msc_dir
|
||||
last_created_file=`ls -t mscgen* | head -1 | tr -d ':'`
|
||||
$OPENAIR_DIR/targets/SCRIPTS/msc_gen.py
|
||||
sync
|
||||
last_created_file2=`ls -t mscgen* | head -1 | tr -d ':'`
|
||||
|
||||
if [ x"$last_created_file" != x"$last_created_file2" ]; then
|
||||
if [ -f ./$last_created_file2/oai_mscgen_page_0.png ]; then
|
||||
command -v eog 2>/dev/null && eog ./$last_created_file2/oai_mscgen_page_0.png
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function control_c()
|
||||
# run if user hits control-c
|
||||
{
|
||||
echo_warning "\nExiting by ctrl+c\n"
|
||||
if [ $g_run_msc_gen -eq 1 ]; then
|
||||
do_msc_gen
|
||||
fi
|
||||
exit $?
|
||||
}
|
||||
|
||||
function main()
|
||||
{
|
||||
local -i run_gdb=0
|
||||
local -i run_mscgen=0
|
||||
local exe_arguments=" "
|
||||
local -i epc_local=0
|
||||
local -r epc_default_config_file="$OPENAIR_TARGETS/bin/epc.conf"
|
||||
local epc_config_file=$epc_default_config_file
|
||||
local MSC_DIR="/tmp"
|
||||
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
@@ -103,12 +127,10 @@ function main()
|
||||
shift;
|
||||
;;
|
||||
-m | --mscgen)
|
||||
MSC_DIR=$2
|
||||
# can omit file name if last arg on the line
|
||||
if [ -d "$MSC_DIR" ]; then
|
||||
echo "setting mscgen log files to dir: $MSC_DIR"
|
||||
run_mscgen=1
|
||||
exe_arguments="-m $exe_arguments"
|
||||
g_msc_dir=$2
|
||||
if [ -d "$g_msc_dir" ]; then
|
||||
echo "setting mscgen log files to dir: $g_msc_dir"
|
||||
g_run_msc_gen=1
|
||||
shift 2;
|
||||
else
|
||||
echo_error "Mscgen log dir does not exist"
|
||||
@@ -133,47 +155,45 @@ function main()
|
||||
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
|
||||
|
||||
|
||||
if [ ! -e $OPENAIR_DIR/targets/bin/mme_gw ]; then
|
||||
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/mme_gw executable, have a look at the output of build_epc executable"
|
||||
if [ ! -e $OPENAIR_DIR/targets/bin/mme_gw.Rel10 ]; then
|
||||
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/mme_gw.Rel10 executable, have a look at the output of build_epc executable"
|
||||
fi
|
||||
|
||||
if [ $epc_local -eq 1 ]; then
|
||||
epc_config_file="$OPENAIR_DIR/targets/bin/epc.local.enb.conf"
|
||||
fi
|
||||
|
||||
if [ $run_mscgen -eq 1 ]; then
|
||||
if [ $g_run_msc_gen -eq 1 ]; then
|
||||
rm -f /tmp/openair.msc.*
|
||||
fi
|
||||
|
||||
exe_arguments="-O $epc_config_file $exe_arguments"
|
||||
|
||||
if [ $run_gdb -eq 0 ]; then
|
||||
$OPENAIR_DIR/targets/bin/mme_gw `echo $exe_arguments` 2>&1
|
||||
# trap keyboard interrupt (control-c)
|
||||
trap control_c SIGINT
|
||||
$OPENAIR_DIR/targets/bin/mme_gw.Rel10 `echo $exe_arguments` 2>&1
|
||||
else
|
||||
# trap keyboard interrupt (control-c) is done by gdb
|
||||
touch ~/.gdb_mme_gw
|
||||
chmod 777 ~/.gdb_mme_gw
|
||||
echo "file $OPENAIR_DIR/targets/bin/mme_gw" > ~/.gdb_mme_gw
|
||||
echo "file $OPENAIR_DIR/targets/bin/mme_gw.Rel10" > ~/.gdb_mme_gw
|
||||
echo "set args $exe_arguments " >> ~/.gdb_mme_gw
|
||||
echo "run" >> ~/.gdb_mme_gw
|
||||
cat ~/.gdb_mme_gw
|
||||
gdb -n -x ~/.gdb_mme_gw
|
||||
gdb -n -x ~/.gdb_mme_gw
|
||||
if [ $g_run_msc_gen -eq 1 ]; then
|
||||
do_msc_gen
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $run_mscgen -eq 1 ]; then
|
||||
cd $MSC_DIR
|
||||
last_created_file=`ls -t mscgen* | head -1 | tr -d ':'`
|
||||
$OPENAIR_DIR/targets/SCRIPTS/msc_gen.py
|
||||
sync
|
||||
last_created_file2=`ls -t mscgen* | head -1 | tr -d ':'`
|
||||
|
||||
if [ x"$last_created_file" != x"$last_created_file2" ]; then
|
||||
if [ -f ./$last_created_file2/oai_mscgen_page_0.png ]; then
|
||||
command -v eog 2>/dev/null && eog ./$last_created_file2/oai_mscgen_page_0.png
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
sudo echo
|
||||
is_sudo=$?
|
||||
if [[ "$is_sudo" -ne 0 ]]; then
|
||||
echo_error "This script must be run by root or a sudo'er"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
main "$@"
|
||||
|
||||
@@ -23,11 +23,17 @@ xUnit_start() {
|
||||
# \pre xUnit_start() must have been called before
|
||||
# \param $1 classname
|
||||
# \param $2 testcase name
|
||||
# \param $3 testcase result
|
||||
# \param $4 run index
|
||||
xUnit_fail() {
|
||||
class=$1
|
||||
test_case=$2
|
||||
result=$3
|
||||
run_index=$4
|
||||
currtime=$(date +%s.%N)
|
||||
time=$(echo "$currtime - $XUNIT_START" | bc -l)
|
||||
xml="<testcase classname='$1' name='$2' time='$time'><failure message='failed'/></testcase>"
|
||||
XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML $xml"
|
||||
xml="<testcase classname='$class' name='$test_case' run='$run_index' time='$time' RESULT='$result'></testcase>"
|
||||
XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml"
|
||||
XUNIT_FAILED=$((XUNIT_FAILED+1))
|
||||
}
|
||||
|
||||
@@ -36,11 +42,17 @@ xUnit_fail() {
|
||||
# \pre xUnit_start() must have been called before
|
||||
# \param $1 classname
|
||||
# \param $2 testcase name
|
||||
# \param $3 testcase result
|
||||
# \param $4 run index
|
||||
xUnit_success() {
|
||||
class=$1
|
||||
test_case=$2
|
||||
result=$3
|
||||
run_index=$4
|
||||
currtime=$(date +%s.%N)
|
||||
time=$(echo "$currtime - $XUNIT_START" | bc -l)
|
||||
xml="<testcase classname='$1' name='$2' time='$time' />"
|
||||
XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML $xml"
|
||||
xml="<testcase classname='$class' name='$test_case' run='$run_index' time='$time' RESULT='$result'></testcase>"
|
||||
XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml"
|
||||
XUNIT_SUCCESS=$((XUNIT_SUCCESS+1))
|
||||
}
|
||||
|
||||
@@ -48,17 +60,18 @@ xUnit_success() {
|
||||
# This functions writes out the test report.
|
||||
# \param $1 filename
|
||||
xUnit_write() {
|
||||
filename=$1
|
||||
tests=$((XUNIT_FAILED+XUNIT_SUCCESS))
|
||||
timestamp=$(date --iso-8601=seconds)
|
||||
time=$(echo "$currtime - $XUNIT_TESTSUITE_START" | bc -l)
|
||||
xml_header="<testsuites><testsuite errors='0' failures='$XUNIT_FAILED' hostname='$(hostname)' name='OAI' skipped='0' tests='$tests' time='$time' timestamp='$timestamp'>"
|
||||
echo $xml_header > $1
|
||||
echo $XUNIT_TESTCASES_XML >> $1
|
||||
echo "</testsuite></testsuites>" >> $1
|
||||
echo $xml_header > $filename
|
||||
echo -e $XUNIT_TESTCASES_XML >> $filename
|
||||
echo "</testsuite></testsuites>" >> $filename
|
||||
XUNIT_TESTSUITE_START=0
|
||||
XUNIT_START=0
|
||||
XUNIT_TOTAL=0
|
||||
XUNIT_FAILED=0
|
||||
XUNIT_SUCCESS=0
|
||||
XUNIT_TESTCASES_XML=""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,7 +457,9 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me
|
||||
new->message_priority = priority;
|
||||
|
||||
/* Enqueue message in destination task queue */
|
||||
lfds611_queue_enqueue(itti_desc.tasks[destination_task_id].message_queue, new);
|
||||
if (lfds611_queue_enqueue(itti_desc.tasks[destination_task_id].message_queue, new) == 0) {
|
||||
AssertFatal(0, "Error: lfds611_queue_enqueue returns 0, queue is full, exiting\n");
|
||||
}
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_ENQUEUE_MESSAGE, VCD_FUNCTION_OUT);
|
||||
@@ -880,7 +882,7 @@ int itti_init(task_id_t task_max, thread_id_t thread_max, MessagesIds messages_i
|
||||
|
||||
ret = lfds611_queue_new(&itti_desc.tasks[task_id].message_queue, itti_desc.tasks_info[task_id].queue_size);
|
||||
|
||||
if (ret < 0) {
|
||||
if (0 == ret) {
|
||||
AssertFatal (0, "lfds611_queue_new failed for task %s!\n", itti_get_task_name(task_id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#define INTERTASK_INTERFACE_TYPES_H_
|
||||
|
||||
#include "itti_types.h"
|
||||
#include "platform_types.h"
|
||||
|
||||
/* Defines to handle bit fields on unsigned long values */
|
||||
#define UL_BIT_MASK(lENGTH) ((1UL << (lENGTH)) - 1UL)
|
||||
|
||||
@@ -112,7 +112,7 @@ int signal_handle(int *end)
|
||||
return ret;
|
||||
}
|
||||
|
||||
printf("Received signal %d\n", info.si_signo);
|
||||
//printf("Received signal %d\n", info.si_signo);
|
||||
|
||||
/* Real-time signals are non constant and are therefore not suitable for
|
||||
* use in switch.
|
||||
|
||||
@@ -93,7 +93,8 @@ int timer_handle_signal(siginfo_t *info)
|
||||
/* Get back pointer to timer list element */
|
||||
timer_p = (struct timer_elm_s *)info->si_ptr;
|
||||
|
||||
TMR_DEBUG("Timer with id 0x%lx has expired\n", (long)timer_p->timer);
|
||||
// LG: To many traces for msc timer:
|
||||
// TMR_DEBUG("Timer with id 0x%lx has expired\n", (long)timer_p->timer);
|
||||
|
||||
task_id = timer_p->task_id;
|
||||
instance = timer_p->instance;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
@@ -12,8 +12,8 @@ without warranty of any kind.
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
Briefly, the shell command `./configure && make && make install'
|
||||
should configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
@@ -309,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||
this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
@@ -367,4 +368,3 @@ operates.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
|
||||
@@ -1,95 +1,111 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<filters>
|
||||
<messages>
|
||||
<INITIALIZE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<ACTIVATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<DEACTIVATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<TERMINATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<MESSAGE_TEST enabled="0" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<ERROR_LOG enabled="1" foreground_color="#000000" background_color="#ff8080"/>
|
||||
<WARNING_LOG enabled="1" foreground_color="#303030" background_color="#fff050"/>
|
||||
<NOTICE_LOG enabled="0" foreground_color="#585858" background_color="#ffffa0"/>
|
||||
<INFO_LOG enabled="0" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<DEBUG_LOG enabled="0" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<ERROR_LOG enabled="1" foreground_color="#000000" background_color="#ff8080"/>
|
||||
<GENERIC_LOG enabled="1" foreground_color="#246b24" background_color="#ffffff"/>
|
||||
<TIMER_HAS_EXPIRED enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<GTPV1U_CREATE_TUNNEL_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<GTPV1U_CREATE_TUNNEL_RESP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<GTPV1U_UPDATE_TUNNEL_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<GTPV1U_UPDATE_TUNNEL_RESP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<GTPV1U_DELETE_TUNNEL_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<GTPV1U_DELETE_TUNNEL_RESP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<GTPV1U_TUNNEL_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<GTPV1U_TUNNEL_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGI_CREATE_ENDPOINT_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGI_CREATE_ENDPOINT_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGI_UPDATE_ENDPOINT_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGI_UPDATE_ENDPOINT_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGI_DELETE_ENDPOINT_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGI_DELETE_ENDPOINT_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_DL_EMM_RAW_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
|
||||
<NAS_UL_EMM_RAW_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
|
||||
<NAS_DL_EMM_PLAIN_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
|
||||
<NAS_UL_EMM_PLAIN_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
|
||||
<NAS_DL_EMM_PROTECTED_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
|
||||
<NAS_UL_EMM_PROTECTED_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
|
||||
<NAS_DL_ESM_RAW_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
|
||||
<NAS_UL_ESM_RAW_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
|
||||
<NAS_DL_ESM_PLAIN_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
|
||||
<NAS_UL_ESM_PLAIN_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
|
||||
<NAS_DL_ESM_PROTECTED_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
|
||||
<NAS_UL_ESM_PROTECTED_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
|
||||
<NAS_PAGING_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
|
||||
<NAS_CONNECTION_ESTABLISHMENT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<GTPV1U_UPDATE_TUNNEL_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<GTPV1U_UPDATE_TUNNEL_RESP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<INFO_LOG enabled="0" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<INITIALIZE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<MESSAGE_TEST enabled="0" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<MME_APP_CONNECTION_ESTABLISHMENT_IND enabled="1" foreground_color="#90ff40" background_color="#805000"/>
|
||||
<MME_APP_INITIAL_CONTEXT_SETUP_RSP enabled="1" foreground_color="#90ff40" background_color="#805000"/>
|
||||
<NAS_AUTHENTICATION_PARAM_FAIL enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_AUTHENTICATION_PARAM_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_AUTHENTICATION_PARAM_RSP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_BEARER_PARAM enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_CONNECTION_ESTABLISHMENT_CNF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_CONNECTION_ESTABLISHMENT_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_CONNECTION_RELEASE_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_UPLINK_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_DOWNLINK_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_CONN_ESTABLI_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_DL_EMM_PLAIN_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
|
||||
<NAS_DL_EMM_PROTECTED_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
|
||||
<NAS_DL_EMM_RAW_MSG enabled="1" foreground_color="#90ff40" background_color="#805000"/>
|
||||
<NAS_DL_ESM_PLAIN_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
|
||||
<NAS_DL_ESM_PROTECTED_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
|
||||
<NAS_DL_ESM_RAW_MSG enabled="1" foreground_color="#90ff40" background_color="#906010"/>
|
||||
<NAS_DOWNLINK_DATA_CNF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_DOWNLINK_DATA_REJ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_DOWNLINK_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_NON_DELIVERY_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_PAGING_IND enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
|
||||
<NAS_PDN_CONNECTIVITY_REQ enabled="1" foreground_color="#e0e0e0" background_color="#2d315c"/>
|
||||
<NAS_RAB_ESTABLI_RSP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_RAB_ESTABLISHMENT_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_RAB_ESTABLISHMENT_RESP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_RAB_RELEASE_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_AUTHENTICATION_PARAM_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_BEARER_PARAM enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_AUTHENTICATION_PARAM_RSP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_AUTHENTICATION_PARAM_FAIL enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_UPLINK_NAS_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_UE_CAPABILITY_IND_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_INITIAL_CONTEXT_SETUP_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_NAS_NON_DELIVERY_IND_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_DOWNLINK_NAS_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_S1_SETUP_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_INITIAL_UE_MESSAGE_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_UE_CONTEXT_RELEASE_REQ_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_UE_CONTEXT_RELEASE_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_UE_CAPABILITIES_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
|
||||
<S1AP_ENB_DEREGISTERED_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_UL_EMM_PLAIN_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
|
||||
<NAS_UL_EMM_PROTECTED_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
|
||||
<NAS_UL_EMM_RAW_MSG enabled="1" foreground_color="#ff8080" background_color="#805000"/>
|
||||
<NAS_UL_ESM_PLAIN_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
|
||||
<NAS_UL_ESM_PROTECTED_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
|
||||
<NAS_UL_ESM_RAW_MSG enabled="1" foreground_color="#ff8080" background_color="#906010"/>
|
||||
<NAS_UPLINK_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NAS_UPLINK_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<NOTICE_LOG enabled="0" foreground_color="#585858" background_color="#ffffa0"/>
|
||||
<S1AP_DEREGISTERED_ENB_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_DEREGISTER_UE_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S6A_UPDATE_LOCATION_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S6A_UPDATE_LOCATION_ANS enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S6A_AUTH_INFO_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_DOWNLINK_NAS_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_ENB_DEREGISTERED_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_INITIAL_CONTEXT_SETUP_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_INITIAL_CONTEXT_SETUP_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_INITIAL_UE_MESSAGE_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_NAS_NON_DELIVERY_IND_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_REGISTER_ENB_CNF enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_S1_SETUP_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_UE_CAPABILITIES_IND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
|
||||
<S1AP_UE_CAPABILITY_IND_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_UE_CONTEXT_RELEASE_COMMAND enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
|
||||
<S1AP_UE_CONTEXT_RELEASE_COMPLETE enabled="1" foreground_color="#585858" background_color="#cbffb1"/>
|
||||
<S1AP_UE_CONTEXT_RELEASE_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_UE_CONTEXT_RELEASE_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_UE_CONTEXT_RELEASE_REQ_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S1AP_UPLINK_NAS_LOG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S6A_AUTH_INFO_ANS enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SCTP_INIT_MSG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SCTP_DATA_REQ enabled="1" foreground_color="#000000" background_color="#aefeff"/>
|
||||
<SCTP_DATA_IND enabled="1" foreground_color="#585858" background_color="#aefeff"/>
|
||||
<SCTP_NEW_ASSOCIATION enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S6A_AUTH_INFO_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S6A_UPDATE_LOCATION_ANS enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<S6A_UPDATE_LOCATION_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SCTP_CLOSE_ASSOCIATION enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SCTP_DATA_IND enabled="1" foreground_color="#585858" background_color="#aefeff"/>
|
||||
<SCTP_DATA_REQ enabled="1" foreground_color="#000000" background_color="#aefeff"/>
|
||||
<SCTP_INIT_MSG enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SCTP_NEW_ASSOCIATION enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SCTP_NEW_ASSOCIATION_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SCTP_NEW_ASSOCIATION_REQ enabled="1" foreground_color="#000000" background_color="#aefeff"/>
|
||||
<SCTP_NEW_ASSOCIATION_RESP enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGI_CREATE_ENDPOINT_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGI_CREATE_ENDPOINT_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGI_DELETE_ENDPOINT_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGI_DELETE_ENDPOINT_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGI_UPDATE_ENDPOINT_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGI_UPDATE_ENDPOINT_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGW_CREATE_SESSION_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGW_CREATE_SESSION_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGW_MODIFY_BEARER_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGW_MODIFY_BEARER_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGW_DELETE_SESSION_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGW_DELETE_SESSION_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<UDP_INIT enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<UDP_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGW_MODIFY_BEARER_REQUEST enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGW_MODIFY_BEARER_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<SGW_RELEASE_ACCESS_BEARERS_RESPONSE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<TERMINATE_MESSAGE enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<TIMER_HAS_EXPIRED enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<UDP_DATA_IND enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<UDP_DATA_REQ enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<UDP_INIT enabled="1" foreground_color="#585858" background_color="#ffffff"/>
|
||||
<WARNING_LOG enabled="1" foreground_color="#303030" background_color="#fff050"/>
|
||||
</messages>
|
||||
<origin_tasks>
|
||||
<TASK_UNKNOWN enabled="1"/>
|
||||
<TASK_TIMER enabled="1"/>
|
||||
<TASK_TIMER enabled="0"/>
|
||||
<TASK_GTPV1_U enabled="1"/>
|
||||
<TASK_FW_IP enabled="1"/>
|
||||
<TASK_MME_APP enabled="1"/>
|
||||
<TASK_NAS_MME enabled="1"/>
|
||||
<TASK_S11 enabled="1"/>
|
||||
@@ -101,9 +117,8 @@
|
||||
</origin_tasks>
|
||||
<destination_tasks>
|
||||
<TASK_UNKNOWN enabled="1"/>
|
||||
<TASK_TIMER enabled="1"/>
|
||||
<TASK_TIMER enabled="0"/>
|
||||
<TASK_GTPV1_U enabled="1"/>
|
||||
<TASK_FW_IP enabled="1"/>
|
||||
<TASK_MME_APP enabled="1"/>
|
||||
<TASK_NAS_MME enabled="1"/>
|
||||
<TASK_S11 enabled="1"/>
|
||||
|
||||
+457
-437
@@ -27,7 +27,7 @@
|
||||
|
||||
*******************************************************************************/
|
||||
/*! \file msc.c
|
||||
* \brief Message chart generator logging utility (generated files to processed by a scrip to produce a mscgen input file for generating a sequence diagram document)
|
||||
* \brief Message chart generator logging utility (generated files to processed by a script to produce a mscgen input file for generating a sequence diagram document)
|
||||
* \author Lionel GAUTHIER
|
||||
* \date 2015
|
||||
* \email: lionel.gauthier@eurecom.fr
|
||||
@@ -38,296 +38,358 @@
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "liblfds611.h"
|
||||
#include "intertask_interface.h"
|
||||
#include "timer.h"
|
||||
|
||||
#include "msc.h"
|
||||
#include "assertions.h"
|
||||
|
||||
//-------------------------------
|
||||
#define MSC_MAX_QUEUE_ELEMENTS 1024
|
||||
#define MSC_MAX_PROTO_NAME_LENGTH 16
|
||||
#define MSC_MAX_MESSAGE_LENGTH 512
|
||||
|
||||
//-------------------------------
|
||||
|
||||
FILE* msc_fd[MAX_MSC_PROTOS]; // may need to split in more files to avoid overwrites (want to avoid mutexes)
|
||||
char msc_proto2str[MAX_MSC_PROTOS][MSC_MAX_PROTO_NAME_LENGTH];
|
||||
uint64_t msc_event_counter = 0;
|
||||
FILE* g_msc_fd;
|
||||
char g_msc_proto2str[MAX_MSC_PROTOS][MSC_MAX_PROTO_NAME_LENGTH];
|
||||
|
||||
|
||||
typedef unsigned long msc_message_number_t;
|
||||
typedef struct msc_queue_item_s {
|
||||
char *message_str;
|
||||
uint32_t message_str_size;
|
||||
uint8_t *message_bin;
|
||||
uint32_t message_bin_size;
|
||||
} msc_queue_item_t;
|
||||
|
||||
msc_message_number_t g_message_number = 0;
|
||||
struct lfds611_queue_state *g_msc_message_queue_p = NULL;
|
||||
struct lfds611_stack_state *g_msc_memory_stack_p = NULL;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
int msc_init(msc_env_t envP)
|
||||
void *msc_task(void *args_p)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
int i;
|
||||
int rv;
|
||||
MessageDef *received_message_p = NULL;
|
||||
const char *msg_name = NULL;
|
||||
instance_t instance = 0;
|
||||
long timer_id;
|
||||
|
||||
itti_mark_task_ready(TASK_MSC);
|
||||
|
||||
msc_start_use();
|
||||
|
||||
|
||||
timer_setup(0, // seconds
|
||||
50000, // usec
|
||||
TASK_MSC,
|
||||
INSTANCE_DEFAULT,
|
||||
TIMER_PERIODIC,
|
||||
NULL,
|
||||
&timer_id);
|
||||
|
||||
while(1) {
|
||||
itti_receive_msg(TASK_MSC, &received_message_p);
|
||||
|
||||
if (received_message_p != NULL) {
|
||||
msg_name = ITTI_MSG_NAME (received_message_p);
|
||||
instance = ITTI_MSG_INSTANCE (received_message_p);
|
||||
|
||||
switch (ITTI_MSG_ID(received_message_p)) {
|
||||
|
||||
case TIMER_HAS_EXPIRED: {
|
||||
msc_flush_messages();
|
||||
}
|
||||
break;
|
||||
|
||||
case TERMINATE_MESSAGE: {
|
||||
timer_remove(timer_id);
|
||||
msc_end();
|
||||
itti_exit_task();
|
||||
}
|
||||
break;
|
||||
|
||||
case MESSAGE_TEST: {
|
||||
}
|
||||
break;
|
||||
|
||||
default: {
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "Task MSC exiting\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
int msc_init(const msc_env_t envP, const int max_threadsP)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
int i;
|
||||
int rv;
|
||||
void *pointer_p;
|
||||
char msc_filename[256];
|
||||
fprintf(stderr, "Initializing MSC logs\n");
|
||||
|
||||
rv = snprintf(msc_filename, 256, "/tmp/openair.msc.%u.log", envP); // TODO NAME
|
||||
if ((0 >= rv) || (256 < rv)){
|
||||
fprintf(stderr, "Error in MSC log file name");
|
||||
}
|
||||
g_msc_fd = fopen(msc_filename,"w");
|
||||
AssertFatal(g_msc_fd != NULL, "Could not open MSC log file %s : %s", msc_filename, strerror(errno));
|
||||
|
||||
rv = lfds611_stack_new(&g_msc_memory_stack_p, (lfds611_atom_t)max_threadsP + 2);
|
||||
if (0 >= rv) {
|
||||
AssertFatal (0, "lfds611_stack_new failed!\n");
|
||||
}
|
||||
|
||||
rv = lfds611_queue_new(&g_msc_message_queue_p, (lfds611_atom_t)MSC_MAX_QUEUE_ELEMENTS);
|
||||
AssertFatal (rv, "lfds611_queue_new failed!\n");
|
||||
AssertFatal (g_msc_message_queue_p != NULL, "g_msc_message_queue_p is NULL!\n");
|
||||
msc_start_use();
|
||||
|
||||
for (i=0; i < max_threadsP * 30; i++) {
|
||||
pointer_p = malloc(MSC_MAX_MESSAGE_LENGTH);
|
||||
AssertFatal (pointer_p, "malloc failed!\n");
|
||||
rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, pointer_p );
|
||||
AssertFatal (rv, "lfds611_stack_guaranteed_push failed for item %u\n", i);
|
||||
}
|
||||
|
||||
for (i = MIN_MSC_PROTOS; i < MAX_MSC_PROTOS; i++) {
|
||||
msc_fd[i] = NULL;
|
||||
switch (i) {
|
||||
switch (i) {
|
||||
case MSC_IP_UE:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "IP_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "IP_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.ip_ue.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.ip_ue.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_IP_ENB:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "IP_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "IP_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if (envP == MSC_E_UTRAN_LIPA) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.ip_enb.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.ip_enb.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_NAS_UE:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.nas_ue.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.nas_ue.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_RRC_UE:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "RRC_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.rrc_ue.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.rrc_ue.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_PDCP_UE:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "PDCP_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.pdcp_ue.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.pdcp_ue.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_RLC_UE:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "RLC_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.rlc_ue.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.rlc_ue.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_MAC_UE:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "MAC_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.mac_ue.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.mac_ue.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_PHY_UE:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "PHY_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.phy_ue.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.phy_ue.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_PHY_ENB:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "PHY_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.phy_enb.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.phy_enb.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_MAC_ENB:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "MAC_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.mac_enb.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.mac_enb.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_RLC_ENB:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "RLC_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.rlc_enb.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.rlc_enb.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_PDCP_ENB:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "PDCP_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.pdcp_enb.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.pdcp_enb.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_RRC_ENB:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "RRC_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.rrc_enb.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.rrc_enb.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_S1AP_ENB:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "S1AP_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_EPC) || (envP == MSC_MME)) {
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.s1ap_enb.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.s1ap_enb.log : %s", strerror(errno));
|
||||
} else {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.s1ap_enb.epc.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.s1ap_enb.epc.log : %s", strerror(errno));
|
||||
}
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_GTPU_ENB:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "GTPU_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.gtpu_enb.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.gtpu_enb.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_GTPU_SGW:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "GTPU_SGW");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_EPC) || (envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.gtpu_sgw.utran.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.gtpu_sgw.utran.log : %s", strerror(errno));
|
||||
} else {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.gtpu_sgw.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.gtpu_sgw.log : %s", strerror(errno));
|
||||
}
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_S1AP_MME:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "S1AP_MME");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_EPC) || (envP == MSC_MME) || (envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.s1ap_mme.utran.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.s1ap_mme.utran.log : %s", strerror(errno));
|
||||
} else {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.s1ap_mme.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.s1ap_mme.log : %s", strerror(errno));
|
||||
}
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_MMEAPP_MME:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "MME_APP");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_EPC) || (envP == MSC_MME)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.mme_app.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.mme_app.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_NAS_MME:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_MME");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.nas_mme.utran.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.nas_mme.utran.log : %s", strerror(errno));
|
||||
} else {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.nas_mme.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.nas_mme.log : %s", strerror(errno));
|
||||
}
|
||||
case MSC_RRC_UE:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "RRC_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
break;
|
||||
case MSC_NAS_EMM_MME:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_EMM");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_EPC) || (envP == MSC_MME)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.nas_emm_mme.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.nas_emm_mme.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_NAS_ESM_MME:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_ESM");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_EPC) || (envP == MSC_MME)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.nas_esm_mme.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.nas_esm_mme.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_SP_GWAPP_MME:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "SP_GW_MME");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if (envP == MSC_EPC) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.spgwapp_mme.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.spgwapp_mme.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_S11_MME:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "S11_MME");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if (envP == MSC_MME) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.s11_mme.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.s11_mme.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_S6A_MME:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "S6A");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_EPC) || (envP == MSC_MME)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.s6a_mme.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.s6a_mme.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_HSS:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "HSS");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_EPC) || (envP == MSC_MME)) {
|
||||
msc_fd[i] = fopen("/tmp/openair.msc.hss.log","w");
|
||||
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.hss.log : %s", strerror(errno));
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "UNKNOWN");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
msc_fd[i] = NULL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MSC_PDCP_UE:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "PDCP_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_RLC_UE:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "RLC_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_MAC_UE:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "MAC_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_PHY_UE:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "PHY_UE");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_PHY_ENB:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "PHY_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_MAC_ENB:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "MAC_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_RLC_ENB:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "RLC_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_PDCP_ENB:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "PDCP_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_RRC_ENB:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "RRC_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_S1AP_ENB:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "S1AP_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_MME_GW) || (envP == MSC_MME)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_GTPU_ENB:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "GTPU_ENB");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_GTPU_SGW:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "GTPU_SGW");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_MME_GW) || (envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_S1AP_MME:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "S1AP_MME");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_MME_GW) || (envP == MSC_MME) || (envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_MMEAPP_MME:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "MME_APP");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_MME_GW) || (envP == MSC_MME)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_NAS_MME:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_MME");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
msc_log_declare_proto(i);
|
||||
break;
|
||||
case MSC_NAS_EMM_MME:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_EMM");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_MME_GW) || (envP == MSC_MME)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_NAS_ESM_MME:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_ESM");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_MME_GW) || (envP == MSC_MME)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_SP_GWAPP_MME:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "SP_GW_MME");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if (envP == MSC_MME_GW) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_S11_MME:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "S11_MME");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if (envP == MSC_MME) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_S6A_MME:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "S6A");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_MME_GW) || (envP == MSC_MME)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
case MSC_HSS:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "HSS");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
if ((envP == MSC_MME_GW) || (envP == MSC_MME)) {
|
||||
msc_log_declare_proto(i);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "UNKNOWN");
|
||||
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
|
||||
}
|
||||
}
|
||||
rv = itti_create_task (TASK_MSC, msc_task, NULL);
|
||||
AssertFatal (rv == 0, "Create task for MSC failed!\n");
|
||||
fprintf(stderr, "Initializing MSC logs Done\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void msc_start_use(void)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
lfds611_queue_use(g_msc_message_queue_p);
|
||||
lfds611_stack_use(g_msc_memory_stack_p);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void msc_flush_messages(void)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
int rv;
|
||||
msc_queue_item_t *item_p = NULL;
|
||||
|
||||
while ((rv = lfds611_queue_dequeue( g_msc_message_queue_p, (void**)&item_p )) == 1) {
|
||||
if (NULL != item_p->message_str) {
|
||||
fputs(item_p->message_str, g_msc_fd);
|
||||
// TODO BIN DATA
|
||||
rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, item_p->message_str );
|
||||
}
|
||||
// TODO FREE BIN DATA
|
||||
free(item_p);
|
||||
}
|
||||
fflush(g_msc_fd);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void msc_end(void)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
int rv;
|
||||
int i;
|
||||
for (i = MIN_MSC_PROTOS; i < MAX_MSC_PROTOS; i++) {
|
||||
if (msc_fd[i] != NULL) {
|
||||
rv = fflush(msc_fd[i]);
|
||||
if (rv != 0) {
|
||||
fprintf(stderr, "Error while flushing stream of MSC log file: %s", strerror(errno));
|
||||
}
|
||||
rv = fclose(msc_fd[i]);
|
||||
if (rv != 0) {
|
||||
fprintf(stderr, "Error while closing MSC log file: %s", strerror(errno));
|
||||
}
|
||||
}
|
||||
if (NULL != g_msc_fd ) {
|
||||
msc_flush_messages();
|
||||
rv = fflush(g_msc_fd);
|
||||
if (rv != 0) {
|
||||
fprintf(stderr, "Error while flushing stream of MSC log file: %s", strerror(errno));
|
||||
}
|
||||
rv = fclose(g_msc_fd);
|
||||
if (rv != 0) {
|
||||
fprintf(stderr, "Error while closing MSC log file: %s", strerror(errno));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,20 +399,46 @@ void msc_log_declare_proto(
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
int rv;
|
||||
uint64_t local_msc_event_counter = msc_event_counter;
|
||||
msc_event_counter++;
|
||||
if ((protoP >= MIN_MSC_PROTOS) && (protoP < MAX_MSC_PROTOS)) {
|
||||
if (msc_fd[protoP] != NULL) {
|
||||
rv = fprintf(msc_fd[protoP], "%"PRIu64" [PROTO] %d %s\n", local_msc_event_counter, protoP, &msc_proto2str[protoP][0]);
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while declaring new protocol in MSC log file: %s", strerror(errno));
|
||||
}
|
||||
rv = fflush(msc_fd[protoP]);
|
||||
if (rv != 0) {
|
||||
fprintf(stderr, "Error while flushing stream of MSC log file: %s", strerror(errno));
|
||||
}
|
||||
}
|
||||
int rv = 0;
|
||||
msc_queue_item_t *new_item_p = NULL;
|
||||
char *char_message_p = NULL;
|
||||
|
||||
if ((MIN_MSC_PROTOS <= protoP) && (MAX_MSC_PROTOS > protoP)) {
|
||||
// may be build a memory pool for that also ?
|
||||
new_item_p = malloc(sizeof(msc_queue_item_t));
|
||||
if (NULL != new_item_p) {
|
||||
|
||||
rv = lfds611_stack_pop(g_msc_memory_stack_p, (void**)&char_message_p);
|
||||
if (0 == rv) {
|
||||
msc_flush_messages();
|
||||
rv = lfds611_stack_pop(g_msc_memory_stack_p, (void**)&char_message_p);
|
||||
}
|
||||
if (1 == rv) {
|
||||
rv = snprintf(char_message_p, MSC_MAX_MESSAGE_LENGTH, "%"PRIu64" [PROTO] %d %s\n", __sync_fetch_and_add (&g_message_number, 1), protoP, &g_msc_proto2str[protoP][0]);
|
||||
if (0 > rv) {
|
||||
fprintf(stderr, "Error while declaring new protocol in MSC: %s", strerror(errno));
|
||||
}
|
||||
new_item_p->message_str = char_message_p;
|
||||
new_item_p->message_str_size = rv;
|
||||
new_item_p->message_bin = NULL;
|
||||
new_item_p->message_bin_size = 0;
|
||||
rv = lfds611_queue_enqueue( g_msc_message_queue_p, new_item_p );
|
||||
if (0 == rv) {
|
||||
rv = lfds611_queue_guaranteed_enqueue(g_msc_message_queue_p, new_item_p );
|
||||
if (0 == rv) {
|
||||
fprintf(stderr, "Error while lfds611_queue_guaranteed_enqueue message %s in MSC", char_message_p);
|
||||
rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, char_message_p );
|
||||
free(new_item_p);
|
||||
}
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
fprintf(stderr, "Error while lfds611_stack_pop()\n");
|
||||
}
|
||||
free(new_item_p);
|
||||
} else {
|
||||
fprintf(stderr, "Error while malloc in MSC");
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -359,202 +447,134 @@ void msc_log_event(
|
||||
char *format, ...)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
va_list args;
|
||||
int rv;
|
||||
uint64_t local_msc_event_counter = msc_event_counter;
|
||||
va_list args;
|
||||
int rv;
|
||||
int rv2;
|
||||
msc_queue_item_t *new_item_p = NULL;
|
||||
char *char_message_p = NULL;
|
||||
|
||||
msc_event_counter++;
|
||||
|
||||
if ((protoP < MIN_MSC_PROTOS) || (protoP >= MAX_MSC_PROTOS)) {
|
||||
if ((MIN_MSC_PROTOS > protoP) || (MAX_MSC_PROTOS <= protoP)) {
|
||||
return;
|
||||
}
|
||||
if (msc_fd[protoP] != NULL) {
|
||||
rv = fprintf(msc_fd[protoP], "%"PRIu64" [EVENT] %d ", local_msc_event_counter, protoP);
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC event : %s", &msc_proto2str[protoP][0]);
|
||||
new_item_p = malloc(sizeof(msc_queue_item_t));
|
||||
if (NULL != new_item_p) {
|
||||
|
||||
rv = lfds611_stack_pop(g_msc_memory_stack_p, (void**)&char_message_p);
|
||||
if (0 == rv) {
|
||||
msc_flush_messages();
|
||||
rv = lfds611_stack_pop(g_msc_memory_stack_p, (void**)&char_message_p);
|
||||
}
|
||||
if (1 == rv) {
|
||||
rv = snprintf(char_message_p, MSC_MAX_MESSAGE_LENGTH, "%"PRIu64" [EVENT] %d ", __sync_fetch_and_add (&g_message_number, 1), protoP);
|
||||
if ((0 > rv) || (MSC_MAX_MESSAGE_LENGTH < rv)) {
|
||||
fprintf(stderr, "Error while logging MSC event : %s", &g_msc_proto2str[protoP][0]);
|
||||
goto error_event;
|
||||
}
|
||||
va_start(args, format);
|
||||
rv = vfprintf(msc_fd[protoP], format, args);
|
||||
rv2 = vsnprintf(&char_message_p[rv],MSC_MAX_MESSAGE_LENGTH - rv, format, args);
|
||||
va_end(args);
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC event : %s", &msc_proto2str[protoP][0]);
|
||||
if ((0 > rv2) || ((MSC_MAX_MESSAGE_LENGTH - rv) < rv2)) {
|
||||
fprintf(stderr, "Error while logging MSC event : %s", &g_msc_proto2str[protoP][0]);
|
||||
goto error_event;
|
||||
}
|
||||
rv = fprintf(msc_fd[protoP], "\n");
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC event : %s", &msc_proto2str[protoP][0]);
|
||||
rv += rv2;
|
||||
rv2 = snprintf(&char_message_p[rv],MSC_MAX_MESSAGE_LENGTH - rv, "\n");
|
||||
if ((0 > rv2) || ((MSC_MAX_MESSAGE_LENGTH - rv) < rv2)) {
|
||||
fprintf(stderr, "Error while logging MSC event : %s", &g_msc_proto2str[protoP][0]);
|
||||
goto error_event;
|
||||
}
|
||||
#if 1
|
||||
rv = fflush(msc_fd[protoP]);
|
||||
if (rv != 0) {
|
||||
fprintf(stderr, "Error while flushing stream of MSC log file: %s", strerror(errno));
|
||||
rv += rv2;
|
||||
new_item_p->message_str = char_message_p;
|
||||
new_item_p->message_str_size = rv;
|
||||
new_item_p->message_bin = NULL;
|
||||
new_item_p->message_bin_size = 0;
|
||||
rv = lfds611_queue_enqueue( g_msc_message_queue_p, new_item_p );
|
||||
if (0 == rv) {
|
||||
fprintf(stderr, "Error while lfds611_queue_guaranteed_enqueue message %s in MSC", char_message_p);
|
||||
rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, char_message_p );
|
||||
free(new_item_p);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
fprintf(stderr, "Error while lfds611_stack_pop()\n");
|
||||
}
|
||||
}
|
||||
return;
|
||||
error_event:
|
||||
rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, char_message_p );
|
||||
free(new_item_p);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
void msc_log_rx_message(
|
||||
const msc_proto_t receiverP,
|
||||
const msc_proto_t senderP,
|
||||
const char* bytesP,
|
||||
void msc_log_message(
|
||||
const char * const message_operationP,
|
||||
const msc_proto_t proto1P,
|
||||
const msc_proto_t proto2P,
|
||||
const uint8_t * const bytesP,
|
||||
const unsigned int num_bytes,
|
||||
char *format, ...)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
va_list args;
|
||||
int rv;
|
||||
uint64_t mac = 0;
|
||||
uint64_t local_msc_event_counter = msc_event_counter;
|
||||
va_list args;
|
||||
uint64_t mac = 0; // TO DO mac on bytesP param
|
||||
int rv;
|
||||
int rv2;
|
||||
msc_queue_item_t *new_item_p = NULL;
|
||||
char *char_message_p = NULL;
|
||||
|
||||
msc_event_counter++;
|
||||
|
||||
if ((receiverP < MIN_MSC_PROTOS) || (receiverP >= MAX_MSC_PROTOS) ||
|
||||
(senderP < MIN_MSC_PROTOS) || (senderP >= MAX_MSC_PROTOS)) {
|
||||
return;
|
||||
if ((MIN_MSC_PROTOS > proto1P) || (MAX_MSC_PROTOS <= proto1P) ||
|
||||
(MIN_MSC_PROTOS > proto2P) || (MAX_MSC_PROTOS <= proto2P) ) {
|
||||
return;
|
||||
}
|
||||
if (msc_fd[receiverP] != NULL) {
|
||||
rv = fprintf(msc_fd[receiverP], "%"PRIu64" [MESSAGE] %d <- %d %"PRIu64" ",
|
||||
local_msc_event_counter, receiverP, senderP, mac);
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC RX message : %s", &msc_proto2str[receiverP][0]);
|
||||
|
||||
new_item_p = malloc(sizeof(msc_queue_item_t));
|
||||
if (NULL != new_item_p) {
|
||||
|
||||
rv = lfds611_stack_pop(g_msc_memory_stack_p, (void**)&char_message_p);
|
||||
if (0 == rv) {
|
||||
msc_flush_messages();
|
||||
rv = lfds611_stack_pop(g_msc_memory_stack_p, (void**)&char_message_p);
|
||||
}
|
||||
if (1 == rv) {
|
||||
rv = snprintf(char_message_p, MSC_MAX_MESSAGE_LENGTH, "%"PRIu64" [MESSAGE] %d %s %d %"PRIu64" ",
|
||||
__sync_fetch_and_add (&g_message_number, 1), proto1P, message_operationP, proto2P, mac);
|
||||
if ((0 > rv) || (MSC_MAX_MESSAGE_LENGTH < rv)) {
|
||||
fprintf(stderr, "Error while logging MSC message : %s/%s", &g_msc_proto2str[proto1P][0], &g_msc_proto2str[proto2P][0]);
|
||||
goto error_event;
|
||||
}
|
||||
va_start(args, format);
|
||||
rv = vfprintf(msc_fd[receiverP], format, args);
|
||||
rv2 = vsnprintf(&char_message_p[rv],MSC_MAX_MESSAGE_LENGTH - rv, format, args);
|
||||
va_end(args);
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC RX message : %s", &msc_proto2str[receiverP][0]);
|
||||
if ((0 > rv2) || ((MSC_MAX_MESSAGE_LENGTH - rv) < rv2)) {
|
||||
fprintf(stderr, "Error while logging MSC message : %s/%s", &g_msc_proto2str[proto1P][0], &g_msc_proto2str[proto2P][0]);
|
||||
goto error_event;
|
||||
}
|
||||
rv = fprintf(msc_fd[receiverP], "\n");
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC RX message : %s", &msc_proto2str[receiverP][0]);
|
||||
}
|
||||
if ((msc_event_counter & 0x000000000000000F) == 0x000000000000000F) {
|
||||
fflush(msc_fd[receiverP]);
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
void msc_log_rx_discarded_message(
|
||||
const msc_proto_t receiverP,
|
||||
const msc_proto_t senderP,
|
||||
const char* bytesP,
|
||||
const unsigned int num_bytes,
|
||||
char *format, ...)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
va_list args;
|
||||
int rv;
|
||||
uint64_t mac = 0;
|
||||
uint64_t local_msc_event_counter = msc_event_counter;
|
||||
|
||||
msc_event_counter++;
|
||||
|
||||
if ((receiverP < MIN_MSC_PROTOS) || (receiverP >= MAX_MSC_PROTOS) ||
|
||||
(senderP < MIN_MSC_PROTOS) || (senderP >= MAX_MSC_PROTOS)) {
|
||||
return;
|
||||
}
|
||||
if (msc_fd[receiverP] != NULL) {
|
||||
rv = fprintf(msc_fd[receiverP], "%"PRIu64" [MESSAGE] %d x- %d %"PRIu64" ",
|
||||
local_msc_event_counter, receiverP, senderP, mac);
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC RX message : %s", &msc_proto2str[receiverP][0]);
|
||||
}
|
||||
va_start(args, format);
|
||||
rv = vfprintf(msc_fd[receiverP], format, args);
|
||||
va_end(args);
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC RX message : %s", &msc_proto2str[receiverP][0]);
|
||||
}
|
||||
rv = fprintf(msc_fd[receiverP], "\n");
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC RX message : %s", &msc_proto2str[receiverP][0]);
|
||||
}
|
||||
if ((msc_event_counter & 0x000000000000000F) == 0x000000000000000F) {
|
||||
fflush(msc_fd[receiverP]);
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
void msc_log_tx_message(
|
||||
const msc_proto_t senderP,
|
||||
const msc_proto_t receiverP,
|
||||
const char* bytesP,
|
||||
const unsigned int num_bytes,
|
||||
char *format, ...)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
va_list args;
|
||||
int rv;
|
||||
uint64_t mac = 0;
|
||||
uint64_t local_msc_event_counter = msc_event_counter;
|
||||
|
||||
msc_event_counter++;
|
||||
|
||||
if ((receiverP < MIN_MSC_PROTOS) || (receiverP >= MAX_MSC_PROTOS) ||
|
||||
(senderP < MIN_MSC_PROTOS) || (senderP >= MAX_MSC_PROTOS)) {
|
||||
return;
|
||||
}
|
||||
if (msc_fd[senderP] != NULL) {
|
||||
rv = fprintf(msc_fd[senderP], "%"PRIu64" [MESSAGE] %d -> %d %"PRIu64" ",
|
||||
local_msc_event_counter, senderP, receiverP, mac);
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC TX message : %s", &msc_proto2str[senderP][0]);
|
||||
}
|
||||
va_start(args, format);
|
||||
rv = vfprintf(msc_fd[senderP], format, args);
|
||||
va_end(args);
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC TX message : %s", &msc_proto2str[senderP][0]);
|
||||
}
|
||||
rv = fprintf(msc_fd[senderP], "\n");
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC TX message : %s", &msc_proto2str[senderP][0]);
|
||||
}
|
||||
if ((msc_event_counter & 0x000000000000000F) == 0x000000000000000F) {
|
||||
fflush(msc_fd[senderP]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void msc_log_tx_message_failed(
|
||||
const msc_proto_t senderP,
|
||||
const msc_proto_t receiverP,
|
||||
const char* bytesP,
|
||||
const unsigned int num_bytes,
|
||||
char *format, ...)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
va_list args;
|
||||
int rv;
|
||||
uint64_t mac = 0;
|
||||
uint64_t local_msc_event_counter = msc_event_counter;
|
||||
|
||||
msc_event_counter++;
|
||||
|
||||
if ((receiverP < MIN_MSC_PROTOS) || (receiverP >= MAX_MSC_PROTOS) ||
|
||||
(senderP < MIN_MSC_PROTOS) || (senderP >= MAX_MSC_PROTOS)) {
|
||||
return;
|
||||
}
|
||||
if (msc_fd[senderP] != NULL) {
|
||||
rv = fprintf(msc_fd[senderP], "%"PRIu64" [MESSAGE] %d -x %d %"PRIu64" ",
|
||||
local_msc_event_counter, senderP, receiverP, mac);
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC TX message : %s", &msc_proto2str[senderP][0]);
|
||||
}
|
||||
va_start(args, format);
|
||||
rv = vfprintf(msc_fd[senderP], format, args);
|
||||
va_end(args);
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC TX message : %s", &msc_proto2str[senderP][0]);
|
||||
}
|
||||
rv = fprintf(msc_fd[senderP], "\n");
|
||||
if (rv < 0) {
|
||||
fprintf(stderr, "Error while logging MSC TX message : %s", &msc_proto2str[senderP][0]);
|
||||
}
|
||||
if ((msc_event_counter & 0x000000000000000F) == 0x000000000000000F) {
|
||||
fflush(msc_fd[senderP]);
|
||||
rv += rv2;
|
||||
rv2 = snprintf(&char_message_p[rv],MSC_MAX_MESSAGE_LENGTH - rv, "\n");
|
||||
if ((0 > rv2) || ((MSC_MAX_MESSAGE_LENGTH - rv) < rv2)) {
|
||||
fprintf(stderr, "Error while logging MSC message : %s/%s", &g_msc_proto2str[proto1P][0], &g_msc_proto2str[proto2P][0]);
|
||||
goto error_event;
|
||||
}
|
||||
rv += rv2;
|
||||
new_item_p->message_str = char_message_p;
|
||||
new_item_p->message_str_size = rv;
|
||||
new_item_p->message_bin = NULL; // TO DO
|
||||
new_item_p->message_bin_size = 0; // TO DO
|
||||
rv = lfds611_queue_enqueue( g_msc_message_queue_p, new_item_p );
|
||||
if (0 == rv) {
|
||||
fprintf(stderr, "Error while lfds611_queue_guaranteed_enqueue message %s in MSC", char_message_p);
|
||||
rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, char_message_p );
|
||||
free(new_item_p);
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "Error while lfds611_stack_pop()\n");
|
||||
msc_flush_messages();
|
||||
}
|
||||
}
|
||||
return;
|
||||
error_event:
|
||||
rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, char_message_p );
|
||||
free(new_item_p);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+18
-29
@@ -30,12 +30,13 @@
|
||||
#ifndef MSC_H_
|
||||
#define MSC_H_
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum {
|
||||
MIN_MSC_ENV = 0,
|
||||
MSC_E_UTRAN = MIN_MSC_ENV,
|
||||
MSC_E_UTRAN_LIPA,
|
||||
MSC_EPC,
|
||||
MSC_MME_GW,
|
||||
MSC_MME,
|
||||
MSC_SP_GW,
|
||||
MAX_MSC_ENV
|
||||
@@ -81,44 +82,32 @@ typedef enum {
|
||||
(CTXT_Pp)->frame, \
|
||||
(CTXT_Pp)->subframe
|
||||
#if defined(MESSAGE_CHART_GENERATOR)
|
||||
int msc_init(msc_env_t envP);
|
||||
int msc_init(const msc_env_t envP, const int max_threadsP);
|
||||
void msc_start_use(void);
|
||||
void msc_flush_messages(void);
|
||||
void msc_end(void);
|
||||
void msc_log_declare_proto(const msc_proto_t protoP);
|
||||
void msc_log_event(const msc_proto_t protoP,char *format, ...);
|
||||
void msc_log_rx_message(
|
||||
void msc_log_message(
|
||||
const char * const message_operationP,
|
||||
const msc_proto_t receiverP,
|
||||
const msc_proto_t senderP,
|
||||
const char* bytesP,
|
||||
const uint8_t* const bytesP,
|
||||
const unsigned int num_bytes,
|
||||
char *format, ...);
|
||||
void msc_log_rx_discarded_message(
|
||||
const msc_proto_t receiverP,
|
||||
const msc_proto_t senderP,
|
||||
const char* bytesP,
|
||||
const unsigned int num_bytes,
|
||||
char *format, ...);
|
||||
void msc_log_tx_message(
|
||||
const msc_proto_t senderP,
|
||||
const msc_proto_t receiverP,
|
||||
const char* bytesP,
|
||||
const unsigned int num_bytes,
|
||||
char *format, ...);
|
||||
void msc_log_tx_message_failed(
|
||||
const msc_proto_t senderP,
|
||||
const msc_proto_t receiverP,
|
||||
const char* bytesP,
|
||||
const unsigned int num_bytes,
|
||||
char *format, ...);
|
||||
#define MSC_INIT(mScPaRaMs) msc_init(mScPaRaMs)
|
||||
|
||||
#define MSC_INIT(arg1,arg2) msc_init(arg1,arg2)
|
||||
#define MSC_START_USE msc_start_use
|
||||
#define MSC_END msc_end
|
||||
#define MSC_LOG_EVENT(mScPaRaMs, fORMAT, aRGS...) msc_log_event(mScPaRaMs, fORMAT, ##aRGS)
|
||||
#define MSC_LOG_RX_MESSAGE(mScPaRaMs, fORMAT, aRGS...) msc_log_rx_message(mScPaRaMs, fORMAT, ##aRGS)
|
||||
#define MSC_LOG_RX_DISCARDED_MESSAGE(mScPaRaMs, fORMAT, aRGS...) msc_log_rx_discarded_message(mScPaRaMs, fORMAT, ##aRGS)
|
||||
#define MSC_LOG_TX_MESSAGE(mScPaRaMs, fORMAT, aRGS...) msc_log_tx_message(mScPaRaMs, fORMAT, ##aRGS)
|
||||
#define MSC_LOG_TX_MESSAGE_FAILED(mScPaRaMs, fORMAT, aRGS...) msc_log_tx_message_failed(mScPaRaMs, fORMAT, ##aRGS)
|
||||
#define MSC_LOG_RX_MESSAGE(rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, aRGS...) msc_log_message("<-",rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, ##aRGS)
|
||||
#define MSC_LOG_RX_DISCARDED_MESSAGE(rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, aRGS...) msc_log_message("x-",rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, ##aRGS)
|
||||
#define MSC_LOG_TX_MESSAGE(sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, aRGS...) msc_log_message("->",sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, ##aRGS)
|
||||
#define MSC_LOG_TX_MESSAGE_FAILED(sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, aRGS...) msc_log_message("-x",sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, ##aRGS)
|
||||
#else
|
||||
#define MSC_INIT(mScPaRaMs)
|
||||
#define MSC_END
|
||||
#define MSC_INIT(arg1,arg2)
|
||||
#define MSC_START_USE(mScPaRaMs)
|
||||
#define MSC_END(mScPaRaMs)
|
||||
#define MSC_LOG_EVENT(mScPaRaMs, fORMAT, aRGS...)
|
||||
#define MSC_LOG_RX_MESSAGE(mScPaRaMs, fORMAT, aRGS...)
|
||||
#define MSC_LOG_RX_DISCARDED_MESSAGE(mScPaRaMs, fORMAT, aRGS...)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo "building ctags for openair1 and openair2 ..."
|
||||
ctags -e -R --exclude=openair3/ --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair2/RRC/CELLULAR/ --exclude=openair2/NAS/DRIVER/CELLULAR/ --exclude=openair2/SIMULATION/ --exclude=openairITS/ --exclude=openair1/SIMULATION/
|
||||
ctags -e -R --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair2/RRC/CELLULAR/ --exclude=openair2/NAS/DRIVER/CELLULAR/ --exclude=openair2/SIMULATION/ --exclude=targets/DOCS/ --exclude=targets/PROJECTS/ openair1 openair2 targets
|
||||
|
||||
@@ -57,6 +57,7 @@ typedef struct {
|
||||
ebi_t eps_bearer_id; ///< EPS bearer identifier
|
||||
pdn_type_t pdn_type; ///< PDN Type
|
||||
PAA_t paa; ///< PDN Address Allocation
|
||||
pco_flat_t pco; ///< Protocol configuration options
|
||||
} SGICreateEndpointResp;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -177,6 +177,7 @@ typedef struct nas_pdn_connectivity_req_s {
|
||||
char imsi[16];
|
||||
uint8_t imsi_length;
|
||||
network_qos_t qos;
|
||||
pco_flat_t pco;
|
||||
OctetString apn;
|
||||
OctetString pdn_addr;
|
||||
int pdn_type;
|
||||
@@ -189,6 +190,7 @@ typedef struct nas_pdn_connectivity_rsp_s {
|
||||
int pti; // nas ref Identity of the procedure transaction executed to activate the PDN connection entry
|
||||
unsigned ue_id; // nas ref
|
||||
network_qos_t qos;
|
||||
pco_flat_t pco;
|
||||
OctetString apn;
|
||||
OctetString pdn_addr;
|
||||
int pdn_type;
|
||||
|
||||
@@ -55,6 +55,10 @@
|
||||
/** @struct SgwCreateSessionRequest
|
||||
* @brief Create Session Request
|
||||
*
|
||||
* Spec 3GPP TS 29.274, Universal Mobile Telecommunications System (UMTS);
|
||||
* LTE; 3GPP Evolved Packet System (EPS);
|
||||
* Evolved General Packet Radio Service (GPRS);
|
||||
* Tunnelling Protocol for Control plane (GTPv2-C); Stage 3
|
||||
* The Create Session Request will be sent on S11 interface as
|
||||
* part of these procedures:
|
||||
* - E-UTRAN Initial Attach
|
||||
@@ -250,7 +254,8 @@ typedef struct SgwCreateSessionRequest_s {
|
||||
///< RAU/TAU/HO procedures with SGW change to identify the
|
||||
///< default bearer of the PDN Connection
|
||||
|
||||
// PCO protocol_configuration_options ///< This IE is not applicable to TAU/RAU/Handover. If
|
||||
pco_flat_t pco; /// PCO protocol_configuration_options
|
||||
///< This IE is not applicable to TAU/RAU/Handover. If
|
||||
///< MME/SGSN receives PCO from UE (during the attach
|
||||
///< procedures), the MME/SGSN shall forward the PCO IE to
|
||||
///< SGW. The SGW shall also forward it to PGW.
|
||||
@@ -413,7 +418,9 @@ typedef struct SgwCreateSessionResponse_s {
|
||||
///< Gn/Gp SGSN to S4-SGSN/MME RAU/TAU procedure to
|
||||
///< identify the default bearer the PGW selects for the PDN
|
||||
///< Connection.
|
||||
// PCO protocol_configuration_options ///< This IE is not applicable for TAU/RAU/Handover. If PGW
|
||||
|
||||
pco_flat_t pco;// PCO protocol_configuration_options
|
||||
///< This IE is not applicable for TAU/RAU/Handover. If PGW
|
||||
///< decides to return PCO to the UE, PGW shall send PCO to
|
||||
///< SGW. If SGW receives the PCO IE, SGW shall forward it
|
||||
///< MME/SGSN.
|
||||
|
||||
@@ -51,3 +51,5 @@ TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200)
|
||||
TASK_DEF(TASK_SPGW_APP, TASK_PRIORITY_MED, 200)
|
||||
/// UDP task
|
||||
TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 200)
|
||||
//MESSAGE GENERATOR TASK
|
||||
TASK_DEF(TASK_MSC, TASK_PRIORITY_MED, 200)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,18 +0,0 @@
|
||||
# Clear the iptables mangle table
|
||||
iptables -t mangle -F
|
||||
|
||||
# Remove GTPU KLM
|
||||
rmmod xt_GTPUAH
|
||||
|
||||
# Insert the GTPUAH KLM
|
||||
insmod ./Bin/xt_GTPUAH.ko
|
||||
|
||||
# Copy the userland iptables extenstion library
|
||||
if [ -d /lib/xtables ]; then
|
||||
/bin/cp -f ./Bin/libxt_GTPUAH.so /lib/xtables/
|
||||
fi
|
||||
|
||||
if [ -d /lib/iptables ]; then
|
||||
/bin/cp -f ./Bin/libxt_GTPUAH.so /lib/iptables/libipt_GTPUAH.so
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
####################################################################################
|
||||
# Makefile for iptables extension for the GTPUAH target and GTPUAH klm
|
||||
# Makefile for iptables extension for the GTPUSP target and GTPUSP klm
|
||||
#
|
||||
# Copyright (c) 2010-2011 Polaris Networks
|
||||
# Author: Pradip Biswas <pradip_biswas@polarisnetworks.net>
|
||||
@@ -14,20 +14,20 @@ export BIN_DIR ?= $(shell pwd)/Bin
|
||||
KVERSION = $(shell uname -r)
|
||||
KVERSION_LAST_DIGIT = $(shell echo ${KVERSION} | cut -d "." -f 3 | cut -d "-" -f 1)
|
||||
|
||||
obj-m = xt_GTPUAH.o
|
||||
obj-m = xt_GTPUSP.o
|
||||
EXTRA_CFLAGS += -DKVERSION=$(KVERSION_LAST_DIGIT)
|
||||
|
||||
all: xtlib
|
||||
echo "Building for Kernel Version: $(KVERSION_LAST_DIGIT)"
|
||||
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
|
||||
chmod 777 xt_GTPUAH.ko
|
||||
mv xt_GTPUAH.ko $(BIN_DIR)/
|
||||
chmod 777 xt_GTPUSP.ko
|
||||
mv xt_GTPUSP.ko $(BIN_DIR)/
|
||||
|
||||
clean: libclean
|
||||
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
|
||||
|
||||
################################################################################
|
||||
# The next section is used by libxt_GTPUAH
|
||||
# The next section is used by libxt_GTPUSP
|
||||
################################################################################
|
||||
|
||||
XT_IPTABLES_VERSION = $(shell /sbin/iptables -V | cut -d " " -f 2 | cut -b 2-)
|
||||
@@ -47,11 +47,11 @@ endif
|
||||
|
||||
LIB_CFLAGS := -fPIC -Wall -MMD -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
|
||||
-D_REENTRANT -pipe -DXTABLES_LIBDIR=\"/usr/local/libexec/xtables\" -DXTABLES_INTERNAL \
|
||||
-D_INIT=libxt_GTPUAH_init -DPIC -fPIC -O2 \
|
||||
-D_INIT=libxt_GTPUSP_init -DPIC -fPIC -O2 \
|
||||
-DIPTVERSION=$(IPTVERSION) \
|
||||
-DIPTABLES_VERSION_STRING=$(IPTABLES_VERSION_STRING)
|
||||
|
||||
XT_TARGET := xt_GTPUAH
|
||||
XT_TARGET := xt_GTPUSP
|
||||
XT_LIBNAME := lib$(XT_TARGET).so
|
||||
XT_BUILD_DIR = $(BIN_DIR)/$(XT_TARGET)
|
||||
|
||||
@@ -70,7 +70,7 @@ INCLUDE_DIR = -I. \
|
||||
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \
|
||||
-I/usr/lib64/glib-2.0/include
|
||||
|
||||
XT_SOURCES = libxt_GTPUAH.c
|
||||
XT_SOURCES = libxt_GTPUSP.c
|
||||
|
||||
XT_OBJECTS := $(addprefix $(XT_BUILD_DIR)/, $(notdir $(XT_SOURCES:.c=.o)))
|
||||
|
||||
@@ -91,7 +91,7 @@ $(BIN_DIR)/$(XT_LIBNAME): $(XT_OBJECTS)
|
||||
@$(LIB_LD) -shared $(XT_OBJECTS) -o $@
|
||||
|
||||
$(XT_BUILD_DIR)/%.o : %.c
|
||||
@echo "Building GTPUAH ext for version $(IPTVERSION) $(IPTABLES_VERSION_STRING)"
|
||||
@echo "Building GTPUSP ext for version $(IPTVERSION) $(IPTABLES_VERSION_STRING)"
|
||||
@echo Compiling $<
|
||||
@$(LIB_CC) $(LIB_CFLAGS) -MF $(DF).d $(INCLUDE_DIR) -o $@ -c $<
|
||||
@cp $(DF).d $(DF).P; \
|
||||
@@ -3,5 +3,4 @@ Known issues in GTPU v1.0
|
||||
-------------------------
|
||||
|
||||
1. Does not implement the "Transport" action.
|
||||
2. Does not handle segmented GTPu packets.
|
||||
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
# Clear the iptables mangle table
|
||||
iptables -t mangle -F
|
||||
|
||||
# Remove GTPU KLM
|
||||
rmmod xt_GTPUSP
|
||||
|
||||
# Insert the GTPUSP KLM
|
||||
insmod ./Bin/xt_GTPUSP.ko
|
||||
|
||||
# Copy the userland iptables extenstion library
|
||||
if [ -d /lib/xtables ]; then
|
||||
/bin/cp -f ./Bin/libxt_GTPUSP.so /lib/xtables/
|
||||
fi
|
||||
|
||||
if [ -d /lib/iptables ]; then
|
||||
/bin/cp -f ./Bin/libxt_GTPUSP.so /lib/iptables/libipt_GTPUSP.so
|
||||
fi
|
||||
|
||||
+74
-74
@@ -1,4 +1,4 @@
|
||||
/* Shared library add-on to iptables for the GTPUAH target
|
||||
/* Shared library add-on to iptables for the GTPUSP target
|
||||
*
|
||||
* Copyright (c) 2010-2011 Polaris Networks
|
||||
* Author: Pradip Biswas <pradip_biswas@polarisnetworks.net>
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <linux/netfilter.h>
|
||||
|
||||
#include "xt_GTPUAH.h"
|
||||
#include "xt_GTPUSP.h"
|
||||
|
||||
#if (IPTVERSION <= 135)
|
||||
#include <iptables.h>
|
||||
@@ -28,25 +28,25 @@
|
||||
#endif
|
||||
|
||||
#if (IPTVERSION <= 135)
|
||||
#define GTPUAH_PARAM_BAD_VALUE 0
|
||||
#define GTPUAH_PARAM_ONLY_ONCE 1
|
||||
#define XT_GTPUAH_VERSION IPTABLES_VERSION_STRING
|
||||
#define gtpuah_strtoui(s,v,m,M) !string_to_number(s,m,M,v)
|
||||
#define gtpuah_exit_error exit_error
|
||||
#define GTPUSP_PARAM_BAD_VALUE 0
|
||||
#define GTPUSP_PARAM_ONLY_ONCE 1
|
||||
#define XT_GTPUSP_VERSION IPTABLES_VERSION_STRING
|
||||
#define gtpusp_strtoui(s,v,m,M) !string_to_number(s,m,M,v)
|
||||
#define gtpusp_exit_error exit_error
|
||||
#elif (IPTVERSION > 135) && (IPTVERSION <= 141)
|
||||
#define GTPUAH_PARAM_BAD_VALUE P_BAD_VALUE
|
||||
#define GTPUAH_PARAM_ONLY_ONCE P_ONLY_ONCE
|
||||
#define XT_GTPUAH_VERSION XTABLES_VERSION
|
||||
#define gtpuah_param_act param_act
|
||||
#define gtpuah_strtoui(s,v,m,M) !string_to_number(s,m,M,v)
|
||||
#define gtpuah_exit_error exit_error
|
||||
#define GTPUSP_PARAM_BAD_VALUE P_BAD_VALUE
|
||||
#define GTPUSP_PARAM_ONLY_ONCE P_ONLY_ONCE
|
||||
#define XT_GTPUSP_VERSION XTABLES_VERSION
|
||||
#define gtpusp_param_act param_act
|
||||
#define gtpusp_strtoui(s,v,m,M) !string_to_number(s,m,M,v)
|
||||
#define gtpusp_exit_error exit_error
|
||||
#elif (IPTVERSION > 141)
|
||||
#define GTPUAH_PARAM_BAD_VALUE XTF_BAD_VALUE
|
||||
#define GTPUAH_PARAM_ONLY_ONCE XTF_ONLY_ONCE
|
||||
#define XT_GTPUAH_VERSION XTABLES_VERSION
|
||||
#define gtpuah_param_act xtables_param_act
|
||||
#define gtpuah_strtoui(s,v,m,M) xtables_strtoui(s,NULL,v,m,M)
|
||||
#define gtpuah_exit_error xtables_error
|
||||
#define GTPUSP_PARAM_BAD_VALUE XTF_BAD_VALUE
|
||||
#define GTPUSP_PARAM_ONLY_ONCE XTF_ONLY_ONCE
|
||||
#define XT_GTPUSP_VERSION XTABLES_VERSION
|
||||
#define gtpusp_param_act xtables_param_act
|
||||
#define gtpusp_strtoui(s,v,m,M) xtables_strtoui(s,NULL,v,m,M)
|
||||
#define gtpusp_exit_error xtables_error
|
||||
#endif
|
||||
|
||||
enum {
|
||||
@@ -57,10 +57,10 @@ enum {
|
||||
PARAM_ACTION = 1 << 4,
|
||||
};
|
||||
|
||||
static void GTPUAH_help(void)
|
||||
static void GTPUSP_help(void)
|
||||
{
|
||||
printf(
|
||||
"GTPUAH target options\n"
|
||||
"GTPUSP target options\n"
|
||||
" --action value Set action <value: add>\n"
|
||||
" --own-ip value Set own IP address\n"
|
||||
" --own-tun value Set own tunnel id <value: 1-2^31>\n"
|
||||
@@ -70,7 +70,7 @@ static void GTPUAH_help(void)
|
||||
|
||||
#if (IPTVERSION <= 135)
|
||||
/* Stolen from iptables v1.4.7 code */
|
||||
void gtpuah_param_act(unsigned int status, const char *p1, ...)
|
||||
void gtpusp_param_act(unsigned int status, const char *p1, ...)
|
||||
{
|
||||
const char *p2, *p3;
|
||||
va_list args;
|
||||
@@ -79,7 +79,7 @@ void gtpuah_param_act(unsigned int status, const char *p1, ...)
|
||||
va_start(args, p1);
|
||||
|
||||
switch (status) {
|
||||
case GTPUAH_PARAM_ONLY_ONCE:
|
||||
case GTPUSP_PARAM_ONLY_ONCE:
|
||||
p2 = va_arg(args, const char *);
|
||||
b = va_arg(args, unsigned int);
|
||||
|
||||
@@ -91,7 +91,7 @@ void gtpuah_param_act(unsigned int status, const char *p1, ...)
|
||||
p1, p2);
|
||||
break;
|
||||
|
||||
case GTPUAH_PARAM_BAD_VALUE:
|
||||
case GTPUSP_PARAM_BAD_VALUE:
|
||||
p2 = va_arg(args, const char *);
|
||||
p3 = va_arg(args, const char *);
|
||||
exit_error(PARAMETER_PROBLEM,
|
||||
@@ -109,18 +109,18 @@ void gtpuah_param_act(unsigned int status, const char *p1, ...)
|
||||
|
||||
#endif
|
||||
|
||||
static void parse_gtpuah_addr(const char *s, struct xt_gtpuah_target_info *info, int flag)
|
||||
static void parse_gtpusp_addr(const char *s, struct xt_gtpusp_target_info *info, int flag)
|
||||
{
|
||||
in_addr_t addr;
|
||||
|
||||
if ((addr = inet_addr(s)) == -1) {
|
||||
switch (flag) {
|
||||
case PARAM_LADDR:
|
||||
gtpuah_param_act(GTPUAH_PARAM_BAD_VALUE, "GTPUAH", "--own-ip", s);
|
||||
gtpusp_param_act(GTPUSP_PARAM_BAD_VALUE, "GTPUSP", "--own-ip", s);
|
||||
break;
|
||||
|
||||
case PARAM_RADDR:
|
||||
gtpuah_param_act(GTPUAH_PARAM_BAD_VALUE, "GTPUAH", "--peer-ip", s);
|
||||
gtpusp_param_act(GTPUSP_PARAM_BAD_VALUE, "GTPUSP", "--peer-ip", s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -136,18 +136,18 @@ static void parse_gtpuah_addr(const char *s, struct xt_gtpuah_target_info *info,
|
||||
}
|
||||
}
|
||||
|
||||
static void parse_gtpuah_tunid(char *s, struct xt_gtpuah_target_info *info, int flag)
|
||||
static void parse_gtpusp_tunid(char *s, struct xt_gtpusp_target_info *info, int flag)
|
||||
{
|
||||
unsigned int value;
|
||||
|
||||
if (!gtpuah_strtoui(s, &value, 0, UINT32_MAX)) {
|
||||
if (!gtpusp_strtoui(s, &value, 0, UINT32_MAX)) {
|
||||
switch (flag) {
|
||||
case PARAM_LTUN:
|
||||
gtpuah_param_act(GTPUAH_PARAM_BAD_VALUE, "GTPUAH", "--own-tun", s);
|
||||
gtpusp_param_act(GTPUSP_PARAM_BAD_VALUE, "GTPUSP", "--own-tun", s);
|
||||
break;
|
||||
|
||||
case PARAM_RTUN:
|
||||
gtpuah_param_act(GTPUAH_PARAM_BAD_VALUE, "GTPUAH", "--peer-tun", s);
|
||||
gtpusp_param_act(GTPUSP_PARAM_BAD_VALUE, "GTPUSP", "--peer-tun", s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -163,57 +163,57 @@ static void parse_gtpuah_tunid(char *s, struct xt_gtpuah_target_info *info, int
|
||||
}
|
||||
}
|
||||
|
||||
static void parse_gtpuah_action(char *s, struct xt_gtpuah_target_info *info, unsigned int *flags)
|
||||
static void parse_gtpusp_action(char *s, struct xt_gtpusp_target_info *info, unsigned int *flags)
|
||||
{
|
||||
if (!strcmp(s, "add")) {
|
||||
info->action = PARAM_GTPUAH_ACTION_ADD;
|
||||
*flags |= PARAM_GTPUAH_ACTION_ADD;
|
||||
info->action = PARAM_GTPUSP_ACTION_ADD;
|
||||
*flags |= PARAM_GTPUSP_ACTION_ADD;
|
||||
} else {
|
||||
gtpuah_param_act(GTPUAH_PARAM_BAD_VALUE, "GTPUAH", "--action", s);
|
||||
gtpusp_param_act(GTPUSP_PARAM_BAD_VALUE, "GTPUSP", "--action", s);
|
||||
}
|
||||
}
|
||||
|
||||
#if (IPTVERSION <= 135)
|
||||
static int
|
||||
GTPUAH_parse(int c, char **argv, int invert, unsigned int *flags,
|
||||
GTPUSP_parse(int c, char **argv, int invert, unsigned int *flags,
|
||||
const struct ipt_entry *entry,
|
||||
struct ipt_entry_target **target)
|
||||
#else
|
||||
static int
|
||||
GTPUAH_parse(int c, char **argv, int invert, unsigned int *flags,
|
||||
GTPUSP_parse(int c, char **argv, int invert, unsigned int *flags,
|
||||
const void *entry, struct xt_entry_target **target)
|
||||
#endif
|
||||
{
|
||||
struct xt_gtpuah_target_info *info = (struct xt_gtpuah_target_info *) (*target)->data;
|
||||
struct xt_gtpusp_target_info *info = (struct xt_gtpusp_target_info *) (*target)->data;
|
||||
|
||||
switch (c) {
|
||||
case '1':
|
||||
gtpuah_param_act(GTPUAH_PARAM_ONLY_ONCE, "GTPUAH", "--own-ip", *flags & PARAM_LADDR);
|
||||
parse_gtpuah_addr(optarg, info, PARAM_LADDR);
|
||||
gtpusp_param_act(GTPUSP_PARAM_ONLY_ONCE, "GTPUSP", "--own-ip", *flags & PARAM_LADDR);
|
||||
parse_gtpusp_addr(optarg, info, PARAM_LADDR);
|
||||
*flags |= PARAM_LADDR;
|
||||
return 1;
|
||||
|
||||
case '2':
|
||||
gtpuah_param_act(GTPUAH_PARAM_ONLY_ONCE, "GTPUAH", "--own-tun", *flags & PARAM_LTUN);
|
||||
parse_gtpuah_tunid(optarg, info, PARAM_LTUN);
|
||||
gtpusp_param_act(GTPUSP_PARAM_ONLY_ONCE, "GTPUSP", "--own-tun", *flags & PARAM_LTUN);
|
||||
parse_gtpusp_tunid(optarg, info, PARAM_LTUN);
|
||||
*flags |= PARAM_LTUN;
|
||||
return 1;
|
||||
|
||||
case '3':
|
||||
gtpuah_param_act(GTPUAH_PARAM_ONLY_ONCE, "GTPUAH", "--peer-ip", *flags & PARAM_RADDR);
|
||||
parse_gtpuah_addr(optarg, info, PARAM_RADDR);
|
||||
gtpusp_param_act(GTPUSP_PARAM_ONLY_ONCE, "GTPUSP", "--peer-ip", *flags & PARAM_RADDR);
|
||||
parse_gtpusp_addr(optarg, info, PARAM_RADDR);
|
||||
*flags |= PARAM_RADDR;
|
||||
return 1;
|
||||
|
||||
case '4':
|
||||
gtpuah_param_act(GTPUAH_PARAM_ONLY_ONCE, "GTPUAH", "--peer-tun", *flags & PARAM_RTUN);
|
||||
parse_gtpuah_tunid(optarg, info, PARAM_RTUN);
|
||||
gtpusp_param_act(GTPUSP_PARAM_ONLY_ONCE, "GTPUSP", "--peer-tun", *flags & PARAM_RTUN);
|
||||
parse_gtpusp_tunid(optarg, info, PARAM_RTUN);
|
||||
*flags |= PARAM_RTUN;
|
||||
return 1;
|
||||
|
||||
case '5':
|
||||
gtpuah_param_act(GTPUAH_PARAM_ONLY_ONCE, "GTPUAH", "--action", *flags & PARAM_ACTION);
|
||||
parse_gtpuah_action(optarg, info, flags);
|
||||
gtpusp_param_act(GTPUSP_PARAM_ONLY_ONCE, "GTPUSP", "--action", *flags & PARAM_ACTION);
|
||||
parse_gtpusp_action(optarg, info, flags);
|
||||
*flags |= PARAM_ACTION;
|
||||
return 1;
|
||||
}
|
||||
@@ -221,33 +221,33 @@ GTPUAH_parse(int c, char **argv, int invert, unsigned int *flags,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void GTPUAH_check(unsigned int flags)
|
||||
static void GTPUSP_check(unsigned int flags)
|
||||
{
|
||||
if (!(flags & PARAM_ACTION)) {
|
||||
gtpuah_exit_error(PARAMETER_PROBLEM, "GTPUAH: You must specify action");
|
||||
gtpusp_exit_error(PARAMETER_PROBLEM, "GTPUSP: You must specify action");
|
||||
}
|
||||
|
||||
if (!(flags & PARAM_LADDR)) {
|
||||
gtpuah_exit_error(PARAMETER_PROBLEM, "GTPUAH: You must specify local addr");
|
||||
gtpusp_exit_error(PARAMETER_PROBLEM, "GTPUSP: You must specify local addr");
|
||||
}
|
||||
|
||||
if (!(flags & PARAM_LTUN)) {
|
||||
gtpuah_exit_error(PARAMETER_PROBLEM, "GTPUAH: You must specify local tunnel id");
|
||||
gtpusp_exit_error(PARAMETER_PROBLEM, "GTPUSP: You must specify local tunnel id");
|
||||
}
|
||||
|
||||
if (!(flags & PARAM_RADDR)) {
|
||||
gtpuah_exit_error(PARAMETER_PROBLEM, "GTPUAH: You must specify remote addr");
|
||||
gtpusp_exit_error(PARAMETER_PROBLEM, "GTPUSP: You must specify remote addr");
|
||||
}
|
||||
|
||||
if (!(flags & PARAM_RTUN)) {
|
||||
gtpuah_exit_error(PARAMETER_PROBLEM, "GTPUAH: You must specify remote tunnel id");
|
||||
gtpusp_exit_error(PARAMETER_PROBLEM, "GTPUSP: You must specify remote tunnel id");
|
||||
}
|
||||
}
|
||||
|
||||
static void convert_action_to_string(int action, char *actionstr)
|
||||
{
|
||||
switch(action) {
|
||||
case PARAM_GTPUAH_ACTION_ADD:
|
||||
case PARAM_GTPUSP_ACTION_ADD:
|
||||
sprintf (actionstr, "add");
|
||||
break;
|
||||
|
||||
@@ -259,19 +259,19 @@ static void convert_action_to_string(int action, char *actionstr)
|
||||
|
||||
#if (IPTVERSION <= 135)
|
||||
static void
|
||||
GTPUAH_print(const struct ipt_ip *ip,
|
||||
GTPUSP_print(const struct ipt_ip *ip,
|
||||
const struct ipt_entry_target *target,
|
||||
int numeric)
|
||||
|
||||
#else
|
||||
static void
|
||||
GTPUAH_print(const void *ip,
|
||||
GTPUSP_print(const void *ip,
|
||||
const struct xt_entry_target *target,
|
||||
int numeric)
|
||||
#endif
|
||||
{
|
||||
const struct xt_gtpuah_target_info *info =
|
||||
(struct xt_gtpuah_target_info *) target->data;
|
||||
const struct xt_gtpusp_target_info *info =
|
||||
(struct xt_gtpusp_target_info *) target->data;
|
||||
|
||||
char laddr[64], raddr[64], actionstr[32];
|
||||
|
||||
@@ -279,11 +279,11 @@ GTPUAH_print(const void *ip,
|
||||
|
||||
sprintf (laddr, "%s", inet_ntoa(*(struct in_addr*)&info->laddr));
|
||||
sprintf (raddr, "%s", inet_ntoa(*(struct in_addr*)&info->raddr));
|
||||
printf("GTPUAH self: %s tunnel: 0x%x / peer: %s tunnel: 0x%x / action: %s",
|
||||
printf("GTPUSP self: %s tunnel: 0x%x / peer: %s tunnel: 0x%x / action: %s",
|
||||
laddr, info->ltun, raddr, info->rtun, actionstr);
|
||||
}
|
||||
|
||||
static struct option GTPUAH_opts[] = {
|
||||
static struct option GTPUSP_opts[] = {
|
||||
{ "own-ip", 1, NULL, '1' },
|
||||
{ "own-tun", 1, NULL, '2' },
|
||||
{ "peer-ip", 1, NULL, '3' },
|
||||
@@ -293,30 +293,30 @@ static struct option GTPUAH_opts[] = {
|
||||
};
|
||||
|
||||
#if (IPTVERSION <= 135)
|
||||
static struct iptables_target gtpuah_tg_reg = {
|
||||
static struct iptables_target gtpusp_tg_reg = {
|
||||
#else
|
||||
static struct xtables_target gtpuah_tg_reg = {
|
||||
static struct xtables_target gtpusp_tg_reg = {
|
||||
#endif
|
||||
.name = "GTPUAH",
|
||||
.version = XT_GTPUAH_VERSION,
|
||||
.name = "GTPUSP",
|
||||
.version = XT_GTPUSP_VERSION,
|
||||
#if (IPTVERSION > 135)
|
||||
.family = NFPROTO_IPV4,
|
||||
#endif
|
||||
.size = XT_ALIGN(sizeof(struct xt_gtpuah_target_info)),
|
||||
.userspacesize = XT_ALIGN(sizeof(struct xt_gtpuah_target_info)),
|
||||
.help = GTPUAH_help,
|
||||
.parse = GTPUAH_parse,
|
||||
.final_check = GTPUAH_check,
|
||||
.print = GTPUAH_print,
|
||||
.extra_opts = GTPUAH_opts,
|
||||
.size = XT_ALIGN(sizeof(struct xt_gtpusp_target_info)),
|
||||
.userspacesize = XT_ALIGN(sizeof(struct xt_gtpusp_target_info)),
|
||||
.help = GTPUSP_help,
|
||||
.parse = GTPUSP_parse,
|
||||
.final_check = GTPUSP_check,
|
||||
.print = GTPUSP_print,
|
||||
.extra_opts = GTPUSP_opts,
|
||||
};
|
||||
|
||||
void _init(void)
|
||||
{
|
||||
#if (IPTVERSION <= 135)
|
||||
register_target(>puah_tg_reg);
|
||||
register_target(>pusp_tg_reg);
|
||||
#else
|
||||
xtables_register_target(>puah_tg_reg);
|
||||
xtables_register_target(>pusp_tg_reg);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -47,14 +47,14 @@
|
||||
#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
|
||||
# define WITH_IPV6 1
|
||||
#endif
|
||||
#include "xt_GTPUAH.h"
|
||||
#include "xt_GTPUSP.h"
|
||||
#if !(defined KVERSION)
|
||||
# error "Kernel version is not defined!!!! Exiting."
|
||||
#endif
|
||||
|
||||
#define TRACE_IN_KERN_LOG 1
|
||||
#define GTPU_TRACE_IN_KERN_LOG 0
|
||||
|
||||
#if defined(TRACE_IN_KERN_LOG)
|
||||
#if defined(GTPU_TRACE_IN_KERN_LOG)
|
||||
#define PR_INFO(fORMAT, aRGS...) pr_info(fORMAT, ##aRGS)
|
||||
#else
|
||||
#define PR_INFO(fORMAT, aRGS...)
|
||||
@@ -62,27 +62,27 @@
|
||||
#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0444)
|
||||
#define STRING_MODULE_PARM(s, v) static char* s = v; module_param(s, charp, 0000);
|
||||
//-----------------------------------------------------------------------------
|
||||
static char* _gtpuah_nf_inet_hook_2_string(int nf_inet_hookP);
|
||||
static void _gtpuah_print_hex_octets(unsigned char* data_pP, unsigned short sizeP);
|
||||
static void _gtpuah_tg4_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP);
|
||||
static char* _gtpusp_nf_inet_hook_2_string(int nf_inet_hookP);
|
||||
static void _gtpusp_print_hex_octets(unsigned char* data_pP, unsigned short sizeP);
|
||||
static void _gtpusp_tg4_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP);
|
||||
#ifdef WITH_IPV6
|
||||
static void _gtpuah_tg6_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP);
|
||||
static unsigned int _gtpuah_tg6(struct sk_buff *skb_pP, const struct xt_action_param *par_pP);
|
||||
static void _gtpusp_tg6_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP);
|
||||
static unsigned int _gtpusp_tg6(struct sk_buff *skb_pP, const struct xt_action_param *par_pP);
|
||||
#endif
|
||||
static unsigned int _gtpuah_tg4(struct sk_buff *skb_pP, const struct xt_action_param *par_pP);
|
||||
static int __init gtpuah_tg_init(void);
|
||||
static void __exit gtpuah_tg_exit(void);
|
||||
static unsigned int _gtpusp_tg4(struct sk_buff *skb_pP, const struct xt_action_param *par_pP);
|
||||
static int __init gtpusp_tg_init(void);
|
||||
static void __exit gtpusp_tg_exit(void);
|
||||
static int _udp_thread(void *data);
|
||||
static int _gtpuah_ksocket_send(struct socket *sock_pP, struct sockaddr_in *addr_pP, unsigned char *gtpuh_pP, int len_gtpP, unsigned char *buf_ip_pP, int len_ipP);
|
||||
static int _gtpuah_ksocket_receive(struct socket* sock_pP, struct sockaddr_in* addr_pP, unsigned char* buf_pP, int lenP);
|
||||
static int _gtpuah_ksocket_process_gtp(const unsigned char * const rx_buf_pP, const int lenP, unsigned char* tx_buf_pP);
|
||||
static int _gtpusp_ksocket_send(struct socket *sock_pP, struct sockaddr_in *addr_pP, unsigned char *gtpuh_pP, int len_gtpP, unsigned char *buf_ip_pP, int len_ipP);
|
||||
static int _gtpusp_ksocket_receive(struct socket* sock_pP, struct sockaddr_in* addr_pP, unsigned char* buf_pP, int lenP);
|
||||
static int _gtpusp_ksocket_process_gtp(const unsigned char * const rx_buf_pP, const int lenP, unsigned char* tx_buf_pP);
|
||||
//-----------------------------------------------------------------------------
|
||||
#define MODULE_NAME "GTPUAH"
|
||||
#define MODULE_NAME "GTPUSP"
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Pradip Biswas <pradip_biswas@polarisnetworks.net>");
|
||||
MODULE_DESCRIPTION("GTPu Data Path extension on netfilter");
|
||||
//-----------------------------------------------------------------------------
|
||||
static struct xt_target gtpuah_tg_reg[] __read_mostly = {
|
||||
static struct xt_target gtpusp_tg_reg[] __read_mostly = {
|
||||
{
|
||||
.name = MODULE_NAME,
|
||||
.revision = 0,
|
||||
@@ -91,8 +91,8 @@ static struct xt_target gtpuah_tg_reg[] __read_mostly = {
|
||||
(1 << NF_INET_LOCAL_IN) |
|
||||
(1 << NF_INET_FORWARD),
|
||||
.table = "mangle",
|
||||
.target = _gtpuah_tg4,
|
||||
.targetsize = sizeof(struct xt_gtpuah_target_info),
|
||||
.target = _gtpusp_tg4,
|
||||
.targetsize = sizeof(struct xt_gtpusp_target_info),
|
||||
.me = THIS_MODULE,
|
||||
},
|
||||
#ifdef WITH_IPV6
|
||||
@@ -104,8 +104,8 @@ static struct xt_target gtpuah_tg_reg[] __read_mostly = {
|
||||
(1 << NF_INET_LOCAL_IN) |
|
||||
(1 << NF_INET_FORWARD),
|
||||
.table = "mangle",
|
||||
.target = _gtpuah_tg6,
|
||||
.targetsize = sizeof(struct xt_gtpuah_target_info),
|
||||
.target = _gtpusp_tg6,
|
||||
.targetsize = sizeof(struct xt_gtpusp_target_info),
|
||||
.me = THIS_MODULE,
|
||||
},
|
||||
#endif
|
||||
@@ -138,14 +138,14 @@ struct gtpuhdr {
|
||||
u_int16_t length;
|
||||
u_int32_t tunid;
|
||||
};
|
||||
typedef struct gtpuah_sock_s {
|
||||
typedef struct gtpusp_sock_s {
|
||||
struct task_struct *thread;
|
||||
struct sockaddr_in addr;
|
||||
struct socket *sock;
|
||||
struct sockaddr_in addr_send;
|
||||
int running;
|
||||
int thread_stop_requested;
|
||||
} gtpuah_sock_t;
|
||||
} gtpusp_sock_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
#define GTPU_HDR_PNBIT 1
|
||||
@@ -155,7 +155,7 @@ typedef struct gtpuah_sock_s {
|
||||
|
||||
#define GTPU_FAILURE 1
|
||||
#define GTPU_SUCCESS !GTPU_FAILURE
|
||||
#define GTPUAH_2_PRINT_BUFFER_LEN 8192
|
||||
#define GTPUSP_2_PRINT_BUFFER_LEN 8192
|
||||
|
||||
#define IP_MORE_FRAGMENTS 0x2000
|
||||
#define NIPADDR(addr) \
|
||||
@@ -164,8 +164,8 @@ typedef struct gtpuah_sock_s {
|
||||
(uint8_t)((addr & 0x00FF0000) >> 16), \
|
||||
(uint8_t)((addr & 0xFF000000) >> 24)
|
||||
//-----------------------------------------------------------------------------
|
||||
static char _gtpuah_print_buffer[GTPUAH_2_PRINT_BUFFER_LEN];
|
||||
gtpuah_sock_t _gtpuah_sock;
|
||||
static char _gtpusp_print_buffer[GTPUSP_2_PRINT_BUFFER_LEN];
|
||||
gtpusp_sock_t _gtpusp_sock;
|
||||
|
||||
INT_MODULE_PARM(gtpu_sgw_port, 2152);
|
||||
MODULE_PARM_DESC(gtpu_sgw_port, "UDP port number for S1U interface (s-GW side)");
|
||||
@@ -178,7 +178,7 @@ MODULE_PARM_DESC(sgw_addr, "IPv4 address of the S1U IP interface");
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static char*
|
||||
_gtpuah_icmph_type_2_string(uint8_t typeP)
|
||||
_gtpusp_icmph_type_2_string(uint8_t typeP)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
switch (typeP) {
|
||||
@@ -200,7 +200,7 @@ _gtpuah_icmph_type_2_string(uint8_t typeP)
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
static char*
|
||||
_gtpuah_nf_inet_hook_2_string(int nf_inet_hookP)
|
||||
_gtpusp_nf_inet_hook_2_string(int nf_inet_hookP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
switch (nf_inet_hookP) {
|
||||
@@ -230,7 +230,7 @@ _gtpuah_nf_inet_hook_2_string(int nf_inet_hookP)
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
_gtpuah_print_hex_octets(unsigned char* data_pP, unsigned short sizeP)
|
||||
_gtpusp_print_hex_octets(unsigned char* data_pP, unsigned short sizeP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -255,27 +255,27 @@ _gtpuah_print_hex_octets(unsigned char* data_pP, unsigned short sizeP)
|
||||
s = tv.tv_sec % 60;
|
||||
snprintf(timeofday, 64, "%02d:%02d:%02d.%06ld", h,m,s,tv.tv_usec);
|
||||
|
||||
buffer_marker+=snprintf(&_gtpuah_print_buffer[buffer_marker], GTPUAH_2_PRINT_BUFFER_LEN - buffer_marker,"%s------+-------------------------------------------------+\n",timeofday);
|
||||
buffer_marker+=snprintf(&_gtpuah_print_buffer[buffer_marker], GTPUAH_2_PRINT_BUFFER_LEN - buffer_marker,"%s | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\n",timeofday);
|
||||
buffer_marker+=snprintf(&_gtpuah_print_buffer[buffer_marker], GTPUAH_2_PRINT_BUFFER_LEN - buffer_marker,"%s------+-------------------------------------------------+\n",timeofday);
|
||||
pr_info("%s",_gtpuah_print_buffer);
|
||||
buffer_marker+=snprintf(&_gtpusp_print_buffer[buffer_marker], GTPUSP_2_PRINT_BUFFER_LEN - buffer_marker,"%s------+-------------------------------------------------+\n",timeofday);
|
||||
buffer_marker+=snprintf(&_gtpusp_print_buffer[buffer_marker], GTPUSP_2_PRINT_BUFFER_LEN - buffer_marker,"%s | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\n",timeofday);
|
||||
buffer_marker+=snprintf(&_gtpusp_print_buffer[buffer_marker], GTPUSP_2_PRINT_BUFFER_LEN - buffer_marker,"%s------+-------------------------------------------------+\n",timeofday);
|
||||
pr_info("%s",_gtpusp_print_buffer);
|
||||
buffer_marker = 0;
|
||||
|
||||
for (octet_index = 0; octet_index < sizeP; octet_index++) {
|
||||
if ((octet_index % 16) == 0) {
|
||||
if (octet_index != 0) {
|
||||
buffer_marker+=snprintf(&_gtpuah_print_buffer[buffer_marker], GTPUAH_2_PRINT_BUFFER_LEN - buffer_marker, " |\n");
|
||||
pr_info("%s",_gtpuah_print_buffer);
|
||||
buffer_marker+=snprintf(&_gtpusp_print_buffer[buffer_marker], GTPUSP_2_PRINT_BUFFER_LEN - buffer_marker, " |\n");
|
||||
pr_info("%s",_gtpusp_print_buffer);
|
||||
buffer_marker = 0;
|
||||
}
|
||||
|
||||
buffer_marker+=snprintf(&_gtpuah_print_buffer[buffer_marker], GTPUAH_2_PRINT_BUFFER_LEN - buffer_marker, "%s %04ld |",timeofday, octet_index);
|
||||
buffer_marker+=snprintf(&_gtpusp_print_buffer[buffer_marker], GTPUSP_2_PRINT_BUFFER_LEN - buffer_marker, "%s %04ld |",timeofday, octet_index);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print every single octet in hexadecimal form
|
||||
*/
|
||||
buffer_marker+=snprintf(&_gtpuah_print_buffer[buffer_marker], GTPUAH_2_PRINT_BUFFER_LEN - buffer_marker, " %02x", data_pP[octet_index]);
|
||||
buffer_marker+=snprintf(&_gtpusp_print_buffer[buffer_marker], GTPUSP_2_PRINT_BUFFER_LEN - buffer_marker, " %02x", data_pP[octet_index]);
|
||||
/*
|
||||
* Align newline and pipes according to the octets in groups of 2
|
||||
*/
|
||||
@@ -285,11 +285,11 @@ _gtpuah_print_hex_octets(unsigned char* data_pP, unsigned short sizeP)
|
||||
* Append enough spaces and put final pipe
|
||||
*/
|
||||
for (aindex = octet_index; aindex < 16; ++aindex)
|
||||
buffer_marker+=snprintf(&_gtpuah_print_buffer[buffer_marker], GTPUAH_2_PRINT_BUFFER_LEN - buffer_marker, " ");
|
||||
buffer_marker+=snprintf(&_gtpusp_print_buffer[buffer_marker], GTPUSP_2_PRINT_BUFFER_LEN - buffer_marker, " ");
|
||||
|
||||
//SGI_IF_DEBUG(" ");
|
||||
buffer_marker+=snprintf(&_gtpuah_print_buffer[buffer_marker], GTPUAH_2_PRINT_BUFFER_LEN - buffer_marker, " |\n");
|
||||
pr_info("%s",_gtpuah_print_buffer);
|
||||
buffer_marker+=snprintf(&_gtpusp_print_buffer[buffer_marker], GTPUSP_2_PRINT_BUFFER_LEN - buffer_marker, " |\n");
|
||||
pr_info("%s",_gtpusp_print_buffer);
|
||||
}
|
||||
|
||||
// for uplink GTPU traffic on S-GW
|
||||
@@ -307,18 +307,18 @@ static int _udp_thread(void *data)
|
||||
unsigned char gtp_resp[1024];
|
||||
|
||||
/* kernel thread initialization */
|
||||
_gtpuah_sock.running = 1;
|
||||
_gtpusp_sock.running = 1;
|
||||
|
||||
PR_INFO(MODULE_NAME": listening on port %d\n", gtpu_sgw_port);
|
||||
|
||||
/* main loop */
|
||||
while(_gtpuah_sock.thread_stop_requested == 0){
|
||||
while(_gtpusp_sock.thread_stop_requested == 0){
|
||||
if (kthread_should_stop()) {
|
||||
_gtpuah_sock.running = 0;
|
||||
_gtpusp_sock.running = 0;
|
||||
PR_INFO(MODULE_NAME": kthread_stop initiated exit at %lu \n", jiffies);
|
||||
return -1; //Exit from the thread. Return value will be passed to kthread_stop()
|
||||
}
|
||||
size = _gtpuah_ksocket_receive(_gtpuah_sock.sock, &_gtpuah_sock.addr, buf, bufsize);
|
||||
size = _gtpusp_ksocket_receive(_gtpusp_sock.sock, &_gtpusp_sock.addr, buf, bufsize);
|
||||
|
||||
if (size <= 0) {
|
||||
if (size != -EAGAIN) {
|
||||
@@ -337,12 +337,12 @@ static int _udp_thread(void *data)
|
||||
#endif
|
||||
PR_INFO(MODULE_NAME": received %d bytes\n", size);
|
||||
|
||||
if ((tx_size = _gtpuah_ksocket_process_gtp(buf, size, gtp_resp)) > 0) {
|
||||
//ksocket_send(_gtpuah_sock.sock, &_gtpuah_sock.addr_send, buf, gtp_resp, tx_size, NULL, 0));
|
||||
if ((tx_size = _gtpusp_ksocket_process_gtp(buf, size, gtp_resp)) > 0) {
|
||||
//ksocket_send(_gtpusp_sock.sock, &_gtpusp_sock.addr_send, buf, gtp_resp, tx_size, NULL, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
_gtpuah_sock.running = 0;
|
||||
_gtpusp_sock.running = 0;
|
||||
if (kthread_should_stop()) {
|
||||
PR_INFO(MODULE_NAME": kthread_stop initiated exit at %lu \n", jiffies);
|
||||
return -1; //Exit from the thread. Return value will be passed to kthread_stop()
|
||||
@@ -352,7 +352,7 @@ static int _udp_thread(void *data)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static int _gtpuah_ksocket_process_gtp(const unsigned char * const rx_buf_pP, const int lenP, unsigned char* tx_buf_pP)
|
||||
static int _gtpusp_ksocket_process_gtp(const unsigned char * const rx_buf_pP, const int lenP, unsigned char* tx_buf_pP)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
gtpv1u_msg_t gtpv1u_msg;
|
||||
@@ -482,7 +482,7 @@ free_skb:
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static int _gtpuah_ksocket_receive(struct socket* sock_pP, struct sockaddr_in* addr_pP, unsigned char* buf_pP, int lenP)
|
||||
static int _gtpusp_ksocket_receive(struct socket* sock_pP, struct sockaddr_in* addr_pP, unsigned char* buf_pP, int lenP)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
struct msghdr msg;
|
||||
@@ -517,7 +517,7 @@ static int _gtpuah_ksocket_receive(struct socket* sock_pP, struct sockaddr_in* a
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static int _gtpuah_ksocket_send(struct socket *sock_pP, struct sockaddr_in *addr_pP, unsigned char *gtpuh_pP, int len_gtpP, unsigned char *buf_ip_pP, int len_ipP)
|
||||
static int _gtpusp_ksocket_send(struct socket *sock_pP, struct sockaddr_in *addr_pP, unsigned char *gtpuh_pP, int len_gtpP, unsigned char *buf_ip_pP, int len_ipP)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
struct msghdr msg;
|
||||
@@ -566,7 +566,7 @@ static int _gtpuah_ksocket_send(struct socket *sock_pP, struct sockaddr_in *addr
|
||||
#ifdef WITH_IPV6
|
||||
//-----------------------------------------------------------------------------
|
||||
static void
|
||||
_gtpuah_tg6_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP)
|
||||
_gtpusp_tg6_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
}
|
||||
@@ -574,7 +574,7 @@ _gtpuah_tg6_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static void
|
||||
_gtpuah_tg4_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP)
|
||||
_gtpusp_tg4_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
struct iphdr *old_iph_p = ip_hdr(old_skb_pP);
|
||||
@@ -596,21 +596,21 @@ _gtpuah_tg4_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP
|
||||
//----------------------------------------------------------------------------
|
||||
ct = nf_ct_get(old_skb_pP, &ctinfo);
|
||||
if (ct == NULL) {
|
||||
PR_INFO(MODULE_NAME": _gtpuah_target_add force targinfo ltun %u to skb_pP mark %u\n",
|
||||
((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->ltun,
|
||||
PR_INFO(MODULE_NAME": _gtpusp_target_add force targinfo ltun %u to skb_pP mark %u\n",
|
||||
((const struct xt_gtpusp_target_info *)(par_pP->targinfo))->ltun,
|
||||
old_skb_pP->mark);
|
||||
newmark = ((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->ltun;
|
||||
newmark = ((const struct xt_gtpusp_target_info *)(par_pP->targinfo))->ltun;
|
||||
} else {
|
||||
//XT_CONNMARK_RESTORE:
|
||||
newmark = old_skb_pP->mark ^ ct->mark;
|
||||
|
||||
PR_INFO(MODULE_NAME": _gtpuah_target_add restore mark %u (skb mark %u ct mark %u) len %u sgw addr %x\n",
|
||||
PR_INFO(MODULE_NAME": _gtpusp_target_add restore mark %u (skb mark %u ct mark %u) len %u sgw addr %x\n",
|
||||
newmark, old_skb_pP->mark, ct->mark, orig_iplen,
|
||||
((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->raddr);
|
||||
if (newmark != ((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->ltun) {
|
||||
pr_warn(MODULE_NAME": _gtpuah_target_add restore mark 0x%x mismatch ltun 0x%x (rtun 0x%x)",
|
||||
newmark, ((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->ltun,
|
||||
((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->rtun);
|
||||
((const struct xt_gtpusp_target_info *)(par_pP->targinfo))->raddr);
|
||||
if (newmark != ((const struct xt_gtpusp_target_info *)(par_pP->targinfo))->ltun) {
|
||||
pr_warn(MODULE_NAME": _gtpusp_target_add restore mark 0x%x mismatch ltun 0x%x (rtun 0x%x)",
|
||||
newmark, ((const struct xt_gtpusp_target_info *)(par_pP->targinfo))->ltun,
|
||||
((const struct xt_gtpusp_target_info *)(par_pP->targinfo))->rtun);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -619,28 +619,28 @@ _gtpuah_tg4_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP
|
||||
gtpuh.flags = 0x30; /* v1 and Protocol-type=GTP */
|
||||
gtpuh.msgtype = 0xff; /* T-PDU */
|
||||
gtpuh.length = htons(orig_iplen);
|
||||
gtpuh.tunid = htonl(((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->rtun);
|
||||
gtpuh.tunid = htonl(((const struct xt_gtpusp_target_info *)(par_pP->targinfo))->rtun);
|
||||
|
||||
_gtpuah_sock.addr_send.sin_addr.s_addr = ((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->raddr;
|
||||
_gtpuah_ksocket_send(_gtpuah_sock.sock, &_gtpuah_sock.addr_send, (unsigned char*)>puh, sizeof(gtpuh), (unsigned char*)old_iph_p, orig_iplen);
|
||||
_gtpusp_sock.addr_send.sin_addr.s_addr = ((const struct xt_gtpusp_target_info *)(par_pP->targinfo))->raddr;
|
||||
_gtpusp_ksocket_send(_gtpusp_sock.sock, &_gtpusp_sock.addr_send, (unsigned char*)>puh, sizeof(gtpuh), (unsigned char*)old_iph_p, orig_iplen);
|
||||
return ;
|
||||
}
|
||||
|
||||
#ifdef WITH_IPV6
|
||||
//-----------------------------------------------------------------------------
|
||||
static unsigned int
|
||||
_gtpuah_tg6(struct sk_buff *skb_pP, const struct xt_action_param *par_pP)
|
||||
_gtpusp_tg6(struct sk_buff *skb_pP, const struct xt_action_param *par_pP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
const struct xt_gtpuah_target_info *tgi_p = par_pP->targinfo;
|
||||
const struct xt_gtpusp_target_info *tgi_p = par_pP->targinfo;
|
||||
|
||||
if (tgi_p == NULL) {
|
||||
return NF_ACCEPT;
|
||||
}
|
||||
|
||||
if (tgi_p->action == PARAM_GTPUAH_ACTION_ADD) {
|
||||
_gtpuah_tg6_add(skb_pP, par_pP);
|
||||
if (tgi_p->action == PARAM_GTPUSP_ACTION_ADD) {
|
||||
_gtpusp_tg6_add(skb_pP, par_pP);
|
||||
return NF_DROP; // TODO
|
||||
}
|
||||
|
||||
@@ -650,17 +650,17 @@ _gtpuah_tg6(struct sk_buff *skb_pP, const struct xt_action_param *par_pP)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static unsigned int
|
||||
_gtpuah_tg4(struct sk_buff *skb_pP, const struct xt_action_param *par_pP)
|
||||
_gtpusp_tg4(struct sk_buff *skb_pP, const struct xt_action_param *par_pP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
const struct xt_gtpuah_target_info *tgi_p = par_pP->targinfo;
|
||||
const struct xt_gtpusp_target_info *tgi_p = par_pP->targinfo;
|
||||
|
||||
if (tgi_p == NULL) {
|
||||
return NF_ACCEPT;
|
||||
}
|
||||
|
||||
if (tgi_p->action == PARAM_GTPUAH_ACTION_ADD) {
|
||||
_gtpuah_tg4_add(skb_pP, par_pP);
|
||||
if (tgi_p->action == PARAM_GTPUSP_ACTION_ADD) {
|
||||
_gtpusp_tg4_add(skb_pP, par_pP);
|
||||
return NF_DROP;
|
||||
}
|
||||
|
||||
@@ -669,7 +669,7 @@ _gtpuah_tg4(struct sk_buff *skb_pP, const struct xt_action_param *par_pP)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static int
|
||||
__init gtpuah_tg_init(void)
|
||||
__init gtpusp_tg_init(void)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
int err;
|
||||
@@ -689,69 +689,69 @@ __init gtpuah_tg_init(void)
|
||||
gtpu_enb_port, gtpu_sgw_port, sgw_addr);
|
||||
|
||||
// UDP socket socket
|
||||
memset(&_gtpuah_sock, 0, sizeof(gtpuah_sock_t));
|
||||
memset(&_gtpusp_sock, 0, sizeof(gtpusp_sock_t));
|
||||
|
||||
/* create a socket */
|
||||
if ((err = sock_create(AF_INET, SOCK_DGRAM, IPPROTO_UDP, &_gtpuah_sock.sock)) < 0 ) {
|
||||
if ((err = sock_create(AF_INET, SOCK_DGRAM, IPPROTO_UDP, &_gtpusp_sock.sock)) < 0 ) {
|
||||
PR_INFO(": Could not create a datagram socket, error = %d\n", -ENXIO);
|
||||
return err;
|
||||
}
|
||||
|
||||
_gtpuah_sock.addr.sin_family = AF_INET;
|
||||
_gtpuah_sock.addr.sin_port = htons(gtpu_sgw_port);
|
||||
_gtpuah_sock.addr.sin_addr.s_addr = in_aton(sgw_addr);
|
||||
_gtpusp_sock.addr.sin_family = AF_INET;
|
||||
_gtpusp_sock.addr.sin_port = htons(gtpu_sgw_port);
|
||||
_gtpusp_sock.addr.sin_addr.s_addr = in_aton(sgw_addr);
|
||||
|
||||
_gtpuah_sock.addr_send.sin_family = AF_INET;
|
||||
_gtpuah_sock.addr_send.sin_port = htons(gtpu_enb_port);
|
||||
_gtpuah_sock.addr_send.sin_addr.s_addr = in_aton(sgw_addr);
|
||||
_gtpusp_sock.addr_send.sin_family = AF_INET;
|
||||
_gtpusp_sock.addr_send.sin_port = htons(gtpu_enb_port);
|
||||
_gtpusp_sock.addr_send.sin_addr.s_addr = in_aton(sgw_addr);
|
||||
|
||||
_gtpuah_sock.thread_stop_requested = 0;
|
||||
_gtpusp_sock.thread_stop_requested = 0;
|
||||
|
||||
if ( (err = _gtpuah_sock.sock->ops->bind(_gtpuah_sock.sock, (struct sockaddr *)&_gtpuah_sock.addr, sizeof(struct sockaddr) ) ) < 0) {
|
||||
if ( (err = _gtpusp_sock.sock->ops->bind(_gtpusp_sock.sock, (struct sockaddr *)&_gtpusp_sock.addr, sizeof(struct sockaddr) ) ) < 0) {
|
||||
pr_info(MODULE_NAME": Could not bind socket, error = %d\n", -err);
|
||||
goto close_and_out;
|
||||
}
|
||||
|
||||
// start kernel thread
|
||||
_gtpuah_sock.thread = kthread_run((void *)_udp_thread, NULL, MODULE_NAME);
|
||||
if (IS_ERR(_gtpuah_sock.thread)) {
|
||||
_gtpusp_sock.thread = kthread_run((void *)_udp_thread, NULL, MODULE_NAME);
|
||||
if (IS_ERR(_gtpusp_sock.thread)) {
|
||||
pr_info(MODULE_NAME": unable to start kernel thread\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
if((_gtpuah_sock.thread)) {
|
||||
wake_up_process(_gtpuah_sock.thread);
|
||||
if((_gtpusp_sock.thread)) {
|
||||
wake_up_process(_gtpusp_sock.thread);
|
||||
}
|
||||
return xt_register_targets(gtpuah_tg_reg, ARRAY_SIZE(gtpuah_tg_reg));
|
||||
return xt_register_targets(gtpusp_tg_reg, ARRAY_SIZE(gtpusp_tg_reg));
|
||||
close_and_out:
|
||||
sock_release(_gtpuah_sock.sock);
|
||||
_gtpuah_sock.sock = NULL;
|
||||
sock_release(_gtpusp_sock.sock);
|
||||
_gtpusp_sock.sock = NULL;
|
||||
return err;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static void
|
||||
__exit gtpuah_tg_exit(void)
|
||||
__exit gtpusp_tg_exit(void)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
int err;
|
||||
int loop = 0;
|
||||
|
||||
|
||||
if (_gtpuah_sock.thread==NULL) {
|
||||
if (_gtpusp_sock.thread==NULL) {
|
||||
pr_info(MODULE_NAME": no kernel thread to kill\n");
|
||||
} else {
|
||||
if (_gtpuah_sock.running > 0) {
|
||||
_gtpuah_sock.thread_stop_requested = 1;
|
||||
if (_gtpusp_sock.running > 0) {
|
||||
_gtpusp_sock.thread_stop_requested = 1;
|
||||
pr_info(MODULE_NAME": exit kernel thread requested\n");
|
||||
do {
|
||||
pr_info(MODULE_NAME": waking up thread with datagram\n");
|
||||
msleep(5);
|
||||
pr_info(MODULE_NAME": waiting for thread...\n");
|
||||
loop++;
|
||||
} while ((_gtpuah_sock.running > 0) && (loop < 20));
|
||||
if (_gtpuah_sock.running > 0) {
|
||||
} while ((_gtpusp_sock.running > 0) && (loop < 20));
|
||||
if (_gtpusp_sock.running > 0) {
|
||||
pr_info(MODULE_NAME": stopping kernel thread\n");
|
||||
err = kthread_stop(_gtpuah_sock.thread);
|
||||
err = kthread_stop(_gtpusp_sock.thread);
|
||||
if(!err) {
|
||||
pr_info(MODULE_NAME": Successfully killed kernel thread!\n");
|
||||
} else {
|
||||
@@ -764,17 +764,17 @@ __exit gtpuah_tg_exit(void)
|
||||
}
|
||||
|
||||
/* free allocated resources before exit */
|
||||
if (_gtpuah_sock.sock != NULL) {
|
||||
sock_release(_gtpuah_sock.sock);
|
||||
_gtpuah_sock.sock = NULL;
|
||||
if (_gtpusp_sock.sock != NULL) {
|
||||
sock_release(_gtpusp_sock.sock);
|
||||
_gtpusp_sock.sock = NULL;
|
||||
}
|
||||
xt_unregister_targets(gtpuah_tg_reg, ARRAY_SIZE(gtpuah_tg_reg));
|
||||
xt_unregister_targets(gtpusp_tg_reg, ARRAY_SIZE(gtpusp_tg_reg));
|
||||
pr_info(MODULE_NAME": Unloading module\n");
|
||||
}
|
||||
|
||||
|
||||
module_init(gtpuah_tg_init);
|
||||
module_exit(gtpuah_tg_exit);
|
||||
MODULE_ALIAS("ipt6_GTPUAH");
|
||||
MODULE_ALIAS("ipt_GTPUAH");
|
||||
module_init(gtpusp_tg_init);
|
||||
module_exit(gtpusp_tg_exit);
|
||||
MODULE_ALIAS("ipt6_GTPUSP");
|
||||
MODULE_ALIAS("ipt_GTPUSP");
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
enum xt_gtpuah_mode_ {
|
||||
PARAM_GTPUAH_ACTION_ADD = 1 << 8,
|
||||
enum xt_gtpusp_mode_ {
|
||||
PARAM_GTPUSP_ACTION_ADD = 1 << 8,
|
||||
};
|
||||
|
||||
struct xt_gtpuah_target_info {
|
||||
struct xt_gtpusp_target_info {
|
||||
u_int32_t laddr __attribute__((aligned(8)));
|
||||
u_int32_t raddr __attribute__((aligned(8)));
|
||||
u_int32_t ltun __attribute__((aligned(8)));
|
||||
@@ -78,19 +78,19 @@ gtpv1u_eNB_send_init_udp(
|
||||
NwGtpv1uRcT
|
||||
gtpv1u_eNB_log_request(
|
||||
NwGtpv1uLogMgrHandleT hLogMgr,
|
||||
NwU32T logLevel,
|
||||
uint32_t logLevel,
|
||||
NwCharT *file,
|
||||
NwU32T line,
|
||||
uint32_t line,
|
||||
NwCharT *logStr);
|
||||
|
||||
NwGtpv1uRcT
|
||||
gtpv1u_eNB_send_udp_msg(
|
||||
NwGtpv1uUdpHandleT udpHandle,
|
||||
NwU8T *buffer,
|
||||
NwU32T buffer_len,
|
||||
NwU32T buffer_offset,
|
||||
NwU32T peerIpAddr,
|
||||
NwU16T peerPort);
|
||||
uint8_t *buffer,
|
||||
uint32_t buffer_len,
|
||||
uint32_t buffer_offset,
|
||||
uint32_t peerIpAddr,
|
||||
uint16_t peerPort);
|
||||
|
||||
NwGtpv1uRcT
|
||||
gtpv1u_eNB_process_stack_req(
|
||||
@@ -114,9 +114,9 @@ data_recv_callback(
|
||||
static NwGtpv1uRcT
|
||||
gtpv1u_start_timer_wrapper(
|
||||
NwGtpv1uTimerMgrHandleT tmrMgrHandle,
|
||||
NwU32T timeoutSec,
|
||||
NwU32T timeoutUsec,
|
||||
NwU32T tmrType,
|
||||
uint32_t timeoutSec,
|
||||
uint32_t timeoutUsec,
|
||||
uint32_t tmrType,
|
||||
void *timeoutArg,
|
||||
NwGtpv1uTimerHandleT *hTmr);
|
||||
|
||||
@@ -142,10 +142,11 @@ gtpv1u_new_data_req(
|
||||
uint32_t buf_offsetP
|
||||
);
|
||||
|
||||
static int
|
||||
int
|
||||
gtpv1u_create_s1u_tunnel(
|
||||
const instance_t instanceP,
|
||||
const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP);
|
||||
const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP,
|
||||
gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP);
|
||||
|
||||
static int
|
||||
gtpv1u_delete_s1u_tunnel(
|
||||
@@ -241,9 +242,9 @@ static int gtpv1u_eNB_send_init_udp(uint16_t port_number)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
NwGtpv1uRcT gtpv1u_eNB_log_request(NwGtpv1uLogMgrHandleT hLogMgr,
|
||||
NwU32T logLevel,
|
||||
uint32_t logLevel,
|
||||
NwCharT *file,
|
||||
NwU32T line,
|
||||
uint32_t line,
|
||||
NwCharT *logStr)
|
||||
{
|
||||
LOG_D(GTPU, "%s\n", logStr);
|
||||
@@ -253,11 +254,11 @@ NwGtpv1uRcT gtpv1u_eNB_log_request(NwGtpv1uLogMgrHandleT hLogMgr,
|
||||
//-----------------------------------------------------------------------------
|
||||
NwGtpv1uRcT gtpv1u_eNB_send_udp_msg(
|
||||
NwGtpv1uUdpHandleT udpHandle,
|
||||
NwU8T *buffer,
|
||||
NwU32T buffer_len,
|
||||
NwU32T buffer_offset,
|
||||
NwU32T peerIpAddr,
|
||||
NwU16T peerPort)
|
||||
uint8_t *buffer,
|
||||
uint32_t buffer_len,
|
||||
uint32_t buffer_offset,
|
||||
uint32_t peerIpAddr,
|
||||
uint16_t peerPort)
|
||||
{
|
||||
// Create and alloc new message
|
||||
MessageDef *message_p = NULL;
|
||||
@@ -491,9 +492,9 @@ int data_recv_callback(uint16_t portP,
|
||||
//-----------------------------------------------------------------------------
|
||||
static NwGtpv1uRcT gtpv1u_start_timer_wrapper(
|
||||
NwGtpv1uTimerMgrHandleT tmrMgrHandle,
|
||||
NwU32T timeoutSec,
|
||||
NwU32T timeoutUsec,
|
||||
NwU32T tmrType,
|
||||
uint32_t timeoutSec,
|
||||
uint32_t timeoutUsec,
|
||||
uint32_t tmrType,
|
||||
void *timeoutArg,
|
||||
NwGtpv1uTimerHandleT *hTmr)
|
||||
{
|
||||
@@ -658,10 +659,12 @@ gtpv1u_new_data_req(
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static int
|
||||
int
|
||||
gtpv1u_create_s1u_tunnel(
|
||||
const instance_t instanceP,
|
||||
const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP)
|
||||
const instance_t instanceP,
|
||||
const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP,
|
||||
gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP
|
||||
)
|
||||
{
|
||||
/* Create a new nw-gtpv1-u stack req using API */
|
||||
NwGtpv1uUlpApiT stack_req;
|
||||
@@ -689,10 +692,9 @@ gtpv1u_create_s1u_tunnel(
|
||||
create_tunnel_req_pP->num_tunnels, create_tunnel_req_pP->eps_bearer_id[0],
|
||||
create_tunnel_req_pP->sgw_S1u_teid[0]);
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_ENB_CREATE_TUNNEL_RESP);
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).rnti = create_tunnel_req_pP->rnti;
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).status = 0;
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).num_tunnels = 0;
|
||||
create_tunnel_resp_pP->rnti = create_tunnel_req_pP->rnti;
|
||||
create_tunnel_resp_pP->status = 0;
|
||||
create_tunnel_resp_pP->num_tunnels = 0;
|
||||
|
||||
for (i = 0; i < create_tunnel_req_pP->num_tunnels; i++) {
|
||||
ip_offset = 0;
|
||||
@@ -729,10 +731,10 @@ gtpv1u_create_s1u_tunnel(
|
||||
|
||||
gtpv1u_ue_data_p->ue_id = create_tunnel_req_pP->rnti;
|
||||
gtpv1u_ue_data_p->instance_id = 0; // TO DO
|
||||
memcpy(>PV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_addr.buffer,
|
||||
memcpy(&create_tunnel_resp_pP->enb_addr.buffer,
|
||||
>pv1u_data_g.enb_ip_address_for_S1u_S12_S4_up,
|
||||
sizeof (in_addr_t));
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_addr.length = sizeof (in_addr_t);
|
||||
create_tunnel_resp_pP->enb_addr.length = sizeof (in_addr_t);
|
||||
|
||||
addrs_length_in_bytes = create_tunnel_req_pP->sgw_addr[i].length / 8;
|
||||
AssertFatal((addrs_length_in_bytes == 4) ||
|
||||
@@ -755,18 +757,19 @@ gtpv1u_create_s1u_tunnel(
|
||||
16);
|
||||
}
|
||||
|
||||
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].state = BEARER_IN_CONFIG;
|
||||
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_eNB = s1u_teid;
|
||||
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_sgw = create_tunnel_req_pP->sgw_S1u_teid[i];
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = s1u_teid;
|
||||
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].state = BEARER_IN_CONFIG;
|
||||
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_eNB = s1u_teid;
|
||||
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_eNB_stack_session = stack_req.apiInfo.createTunnelEndPointInfo.hStackSession;
|
||||
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_sgw = create_tunnel_req_pP->sgw_S1u_teid[i];
|
||||
create_tunnel_resp_pP->enb_S1u_teid[i] = s1u_teid;
|
||||
|
||||
} else {
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = 0;
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).status = 0xFF;
|
||||
create_tunnel_resp_pP->enb_S1u_teid[i] = 0;
|
||||
create_tunnel_resp_pP->status = 0xFF;
|
||||
}
|
||||
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).eps_bearer_id[i] = eps_bearer_id;
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).num_tunnels += 1;
|
||||
create_tunnel_resp_pP->eps_bearer_id[i] = eps_bearer_id;
|
||||
create_tunnel_resp_pP->num_tunnels += 1;
|
||||
|
||||
//-----------------------
|
||||
// GTPV1U->PDCP mapping
|
||||
@@ -781,8 +784,8 @@ gtpv1u_create_s1u_tunnel(
|
||||
hash_rc = hashtable_insert(gtpv1u_data_g.teid_mapping, s1u_teid, gtpv1u_teid_data_p);
|
||||
AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting teid mapping in GTPV1U hashtable");
|
||||
} else {
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = 0;
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).status = 0xFF;
|
||||
create_tunnel_resp_pP->enb_S1u_teid[i] = 0;
|
||||
create_tunnel_resp_pP->status = 0xFF;
|
||||
}
|
||||
}
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
@@ -790,13 +793,13 @@ gtpv1u_create_s1u_tunnel(
|
||||
MSC_RRC_ENB,
|
||||
NULL,0,
|
||||
"0 GTPV1U_ENB_CREATE_TUNNEL_RESP rnti %x teid %x",
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).rnti,
|
||||
create_tunnel_resp_pP->rnti,
|
||||
s1u_teid);
|
||||
|
||||
LOG_D(GTPU, "Tx GTPV1U_ENB_CREATE_TUNNEL_RESP ue rnti %x status %d\n",
|
||||
create_tunnel_req_pP->rnti,
|
||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).status);
|
||||
return itti_send_msg_to_task(TASK_RRC_ENB, instanceP, message_p);
|
||||
create_tunnel_resp_pP->status);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -835,9 +838,7 @@ static int gtpv1u_delete_s1u_tunnel(
|
||||
LOG_D(GTPU, "gtpv1u_delete_s1u_tunnel erab %u %u\n",
|
||||
req_pP->eps_bearer_id[erab_index],
|
||||
teid_eNB);
|
||||
stack_req.apiInfo.createTunnelEndPointInfo.teid = teid_eNB;
|
||||
stack_req.apiInfo.createTunnelEndPointInfo.hUlpSession = 0;
|
||||
stack_req.apiInfo.createTunnelEndPointInfo.hStackSession = 0;
|
||||
stack_req.apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle = gtpv1u_ue_data_p->bearers[req_pP->eps_bearer_id[erab_index] - GTPV1U_BEARER_OFFSET].teid_eNB_stack_session;
|
||||
|
||||
rc = nwGtpv1uProcessUlpReq(gtpv1u_data_g.gtpv1u_stack, &stack_req);
|
||||
LOG_D(GTPU, ".\n");
|
||||
@@ -1000,6 +1001,7 @@ void *gtpv1u_eNB_task(void *args)
|
||||
rc = gtpv1u_eNB_init();
|
||||
AssertFatal(rc == 0, "gtpv1u_eNB_init Failed");
|
||||
itti_mark_task_ready(TASK_GTPV1_U);
|
||||
MSC_START_USE();
|
||||
|
||||
while(1) {
|
||||
/* Trying to fetch a message from the message queue.
|
||||
@@ -1015,10 +1017,6 @@ void *gtpv1u_eNB_task(void *args)
|
||||
msg_name_p = ITTI_MSG_NAME(received_message_p);
|
||||
|
||||
switch (ITTI_MSG_ID(received_message_p)) {
|
||||
case GTPV1U_ENB_CREATE_TUNNEL_REQ: {
|
||||
gtpv1u_create_s1u_tunnel(instance, &received_message_p->ittiMsg.Gtpv1uCreateTunnelReq);
|
||||
}
|
||||
break;
|
||||
|
||||
case GTPV1U_ENB_DELETE_TUNNEL_REQ: {
|
||||
gtpv1u_delete_s1u_tunnel(instance, &received_message_p->ittiMsg.Gtpv1uDeleteTunnelReq);
|
||||
@@ -1081,14 +1079,14 @@ void *gtpv1u_eNB_task(void *args)
|
||||
|
||||
if (rc != NW_GTPV1U_OK) {
|
||||
LOG_E(GTPU, "nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
|
||||
MSC_LOG_EVENT(MSC_GTPU_ENB,"Failed send G-PDU ltid %u rtid %u size %u",
|
||||
MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
|
||||
enb_s1u_teid,sgw_s1u_teid,data_req_p->length);
|
||||
} else {
|
||||
rc = nwGtpv1uProcessUlpReq(gtpv1u_data_g.gtpv1u_stack, &stack_req);
|
||||
|
||||
if (rc != NW_GTPV1U_OK) {
|
||||
LOG_E(GTPU, "nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
|
||||
MSC_LOG_EVENT(MSC_GTPU_ENB,"Failed send G-PDU ltid %u rtid %u size %u",
|
||||
MSC_LOG_EVENT(MSC_GTPU_ENB,"0 Failed send G-PDU ltid %u rtid %u size %u",
|
||||
enb_s1u_teid,sgw_s1u_teid,data_req_p->length);
|
||||
} else {
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include "hashtable.h"
|
||||
|
||||
#include "asn1_constants.h"
|
||||
|
||||
#ifndef GTPV1U_ENB_DEFS_H_
|
||||
#define GTPV1U_ENB_DEFS_H_
|
||||
@@ -65,8 +65,9 @@ typedef struct gtpv1u_teid_data_s {
|
||||
|
||||
typedef struct gtpv1u_bearer_s {
|
||||
/* TEID used in dl and ul */
|
||||
teid_t teid_eNB; ///< eNB TEID
|
||||
teid_t teid_sgw; ///< Remote TEID
|
||||
teid_t teid_eNB; ///< eNB TEID
|
||||
uintptr_t teid_eNB_stack_session; ///< eNB TEID
|
||||
teid_t teid_sgw; ///< Remote TEID
|
||||
in_addr_t sgw_ip_addr;
|
||||
struct in6_addr sgw_ip6_addr;
|
||||
tcp_udp_port_t port;
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#ifndef GTPV1U_ENB_TASK_H_
|
||||
#define GTPV1U_ENB_TASK_H_
|
||||
|
||||
#include "messages_types.h"
|
||||
|
||||
int
|
||||
gtpv1u_new_data_req(
|
||||
uint8_t enb_id,
|
||||
@@ -45,4 +47,11 @@ gtpv1u_new_data_req(
|
||||
uint32_t buf_len);
|
||||
void *gtpv1u_eNB_task(void *args);
|
||||
|
||||
int
|
||||
gtpv1u_create_s1u_tunnel(
|
||||
const instance_t instanceP,
|
||||
const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP,
|
||||
gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP);
|
||||
|
||||
|
||||
#endif /* GTPV1U_ENB_TASK_H_ */
|
||||
|
||||
@@ -48,12 +48,12 @@ typedef enum {
|
||||
BEARER_MAX,
|
||||
} bearer_state_t;
|
||||
|
||||
#define BUFFER_TO_NwU32T(buf, x) \
|
||||
#define BUFFER_TO_uint32_t(buf, x) \
|
||||
do { \
|
||||
x = ((NwU32T)((buf)[0]) ) | \
|
||||
((NwU32T)((buf)[1]) << 8) | \
|
||||
((NwU32T)((buf)[2]) << 16) | \
|
||||
((NwU32T)((buf)[3]) << 24); \
|
||||
x = ((uint32_t)((buf)[0]) ) | \
|
||||
((uint32_t)((buf)[1]) << 8) | \
|
||||
((uint32_t)((buf)[2]) << 16) | \
|
||||
((uint32_t)((buf)[3]) << 24); \
|
||||
} while(0)
|
||||
|
||||
|
||||
|
||||
@@ -50,13 +50,12 @@
|
||||
#include "NwLog.h"
|
||||
#include "gtpv1u_sgw_defs.h"
|
||||
#include "NwGtpv1uPrivate.h"
|
||||
#include "msc.h"
|
||||
|
||||
//static NwGtpv1uStackHandleT gtpv1u_stack = 0;
|
||||
static gtpv1u_data_t gtpv1u_sgw_data;
|
||||
|
||||
#if !defined(ENABLE_USE_GTPU_IN_KERNEL)
|
||||
static int gtpv1u_send_init_udp(uint16_t port_number);
|
||||
#endif
|
||||
|
||||
static int gtpv1u_create_s1u_tunnel(Gtpv1uCreateTunnelReq *create_tunnel_reqP);
|
||||
static int gtpv1u_delete_s1u_tunnel(Teid_t context_teidP, Teid_t S1U_teidP);
|
||||
static int gtpv1u_update_s1u_tunnel(Gtpv1uUpdateTunnelReq *reqP);
|
||||
@@ -64,17 +63,17 @@ static void *gtpv1u_thread(void *args);
|
||||
|
||||
NwGtpv1uRcT gtpv1u_send_udp_msg(
|
||||
NwGtpv1uUdpHandleT udpHandle,
|
||||
NwU8T *buffer,
|
||||
NwU32T buffer_len,
|
||||
NwU32T buffer_offset,
|
||||
NwU32T peerIpAddr,
|
||||
NwU32T peerPort);
|
||||
uint8_t *buffer,
|
||||
uint32_t buffer_len,
|
||||
uint32_t buffer_offset,
|
||||
uint32_t peerIpAddr,
|
||||
uint32_t peerPort);
|
||||
|
||||
NwGtpv1uRcT gtpv1u_log_request(
|
||||
NwGtpv1uLogMgrHandleT hLogMgr,
|
||||
NwU32T logLevel,
|
||||
uint32_t logLevel,
|
||||
NwCharT *file,
|
||||
NwU32T line,
|
||||
uint32_t line,
|
||||
NwCharT *logStr);
|
||||
|
||||
NwGtpv1uRcT gtpv1u_process_stack_req(
|
||||
@@ -149,48 +148,23 @@ void gtpu_print_hex_octets(unsigned char* dataP, unsigned long sizeP)
|
||||
}
|
||||
|
||||
|
||||
#if !defined(ENABLE_USE_GTPU_IN_KERNEL)
|
||||
static int gtpv1u_send_init_udp(uint16_t port_number)
|
||||
{
|
||||
// Create and alloc new message
|
||||
MessageDef *message_p;
|
||||
struct in_addr addr;
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_GTPV1_U, UDP_INIT);
|
||||
|
||||
if (message_p == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
UDP_INIT(message_p).port = port_number;
|
||||
//LG UDP_INIT(message_p).address = "0.0.0.0"; //ANY address
|
||||
|
||||
addr.s_addr = gtpv1u_sgw_data.sgw_ip_address_for_S1u_S12_S4_up;
|
||||
UDP_INIT(message_p).address = inet_ntoa(addr);
|
||||
GTPU_DEBUG("Tx UDP_INIT IP addr %s\n", UDP_INIT(message_p).address);
|
||||
|
||||
return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p);
|
||||
}
|
||||
#endif
|
||||
|
||||
NwGtpv1uRcT gtpv1u_log_request(NwGtpv1uLogMgrHandleT hLogMgr,
|
||||
NwU32T logLevel,
|
||||
uint32_t logLevel,
|
||||
NwCharT *file,
|
||||
NwU32T line,
|
||||
uint32_t line,
|
||||
NwCharT *logStr)
|
||||
{
|
||||
GTPU_DEBUG("%s\n", logStr);
|
||||
return NW_GTPV1U_OK;
|
||||
}
|
||||
|
||||
#if !defined(ENABLE_USE_GTPU_IN_KERNEL)
|
||||
NwGtpv1uRcT gtpv1u_send_udp_msg(
|
||||
NwGtpv1uUdpHandleT udpHandle,
|
||||
NwU8T *buffer,
|
||||
NwU32T buffer_len,
|
||||
NwU32T buffer_offset,
|
||||
NwU32T peerIpAddr,
|
||||
NwU32T peerPort)
|
||||
uint8_t *buffer,
|
||||
uint32_t buffer_len,
|
||||
uint32_t buffer_offset,
|
||||
uint32_t peerIpAddr,
|
||||
uint32_t peerPort)
|
||||
{
|
||||
// Create and alloc new message
|
||||
MessageDef *message_p;
|
||||
@@ -208,7 +182,7 @@ NwGtpv1uRcT gtpv1u_send_udp_msg(
|
||||
|
||||
return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Callback called when a gtpv1u message arrived on UDP interface */
|
||||
NwGtpv1uRcT gtpv1u_process_stack_req(
|
||||
NwGtpv1uUlpHandleT hUlp,
|
||||
@@ -229,7 +203,7 @@ NwGtpv1uRcT gtpv1u_process_stack_req(
|
||||
* task for transmission.
|
||||
*/
|
||||
/*if (NW_GTPV1U_OK != nwGtpv1uMsgGetTpdu(pUlpApi->apiInfo.recvMsgInfo.hMsg,
|
||||
buffer, (NwU32T *)&buffer_len)) {
|
||||
buffer, (uint32_t *)&buffer_len)) {
|
||||
GTPU_ERROR("Error while retrieving T-PDU\n");
|
||||
}*/
|
||||
GTPU_DEBUG("Received TPDU from gtpv1u stack %u with size %d\n",
|
||||
@@ -397,9 +371,9 @@ static int gtpv1u_update_s1u_tunnel(Gtpv1uUpdateTunnelReq *reqP)
|
||||
|
||||
static NwGtpv1uRcT gtpv1u_start_timer_wrapper(
|
||||
NwGtpv1uTimerMgrHandleT tmrMgrHandle,
|
||||
NwU32T timeoutSec,
|
||||
NwU32T timeoutUsec,
|
||||
NwU32T tmrType,
|
||||
uint32_t timeoutSec,
|
||||
uint32_t timeoutUsec,
|
||||
uint32_t tmrType,
|
||||
void *timeoutArg,
|
||||
NwGtpv1uTimerHandleT *hTmr)
|
||||
{
|
||||
@@ -441,6 +415,7 @@ static NwGtpv1uRcT gtpv1u_stop_timer_wrapper(
|
||||
static void *gtpv1u_thread(void *args)
|
||||
{
|
||||
itti_mark_task_ready(TASK_GTPV1_U);
|
||||
MSC_START_USE();
|
||||
|
||||
while(1) {
|
||||
/* Trying to fetch a message from the message queue.
|
||||
@@ -451,21 +426,11 @@ static void *gtpv1u_thread(void *args)
|
||||
itti_receive_msg(TASK_GTPV1_U, &received_message_p);
|
||||
DevAssert(received_message_p != NULL);
|
||||
|
||||
#if !defined(ENABLE_USE_GTPU_IN_KERNEL)
|
||||
|
||||
switch (ITTI_MSG_ID(received_message_p)) {
|
||||
case GTPV1U_CREATE_TUNNEL_REQ: {
|
||||
gtpv1u_create_s1u_tunnel(&received_message_p->ittiMsg.gtpv1uCreateTunnelReq);
|
||||
}
|
||||
break;
|
||||
|
||||
case GTPV1U_DELETE_TUNNEL_REQ: {
|
||||
gtpv1u_delete_s1u_tunnel(received_message_p->ittiMsg.gtpv1uDeleteTunnelReq.context_teid, received_message_p->ittiMsg.gtpv1uDeleteTunnelReq.S1u_teid);
|
||||
}
|
||||
break;
|
||||
|
||||
case GTPV1U_UPDATE_TUNNEL_REQ: {
|
||||
gtpv1u_update_s1u_tunnel(&received_message_p->ittiMsg.gtpv1uUpdateTunnelReq);
|
||||
case TERMINATE_MESSAGE: {
|
||||
itti_exit_task();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -474,85 +439,11 @@ static void *gtpv1u_thread(void *args)
|
||||
udp_data_ind_t *udp_data_ind_p;
|
||||
udp_data_ind_p = &received_message_p->ittiMsg.udp_data_ind;
|
||||
nwGtpv1uProcessUdpReq(gtpv1u_sgw_data.gtpv1u_stack,
|
||||
udp_data_ind_p->buffer,
|
||||
udp_data_ind_p->buffer_length,
|
||||
udp_data_ind_p->peer_port,
|
||||
udp_data_ind_p->peer_address);
|
||||
//itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), udp_data_ind_p->buffer);
|
||||
}
|
||||
break;
|
||||
|
||||
// DATA TO BE SENT TO UDP
|
||||
case GTPV1U_TUNNEL_DATA_REQ: {
|
||||
Gtpv1uTunnelDataReq *data_req_p = NULL;
|
||||
NwGtpv1uUlpApiT stack_req;
|
||||
NwGtpv1uRcT rc;
|
||||
hashtable_rc_t hash_rc;
|
||||
gtpv1u_teid2enb_info_t *gtpv1u_teid2enb_info = NULL;
|
||||
|
||||
data_req_p = &received_message_p->ittiMsg.gtpv1uTunnelDataReq;
|
||||
|
||||
//GTPU_DEBUG("-- GTPV1U_TUNNEL_DATA_REQ -----------------------------------------------------\n%s :\n",
|
||||
// __FUNCTION__);
|
||||
//gtpu_print_hex_octets(data_req_p->buffer, data_req_p->length);
|
||||
|
||||
|
||||
memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
|
||||
|
||||
hash_rc = hashtable_get(gtpv1u_sgw_data.S1U_mapping, (uint64_t)data_req_p->local_S1u_teid, (void**)>pv1u_teid2enb_info);
|
||||
|
||||
if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
|
||||
GTPU_ERROR("nwGtpv1uProcessUlpReq failed: while getting teid %u in hashtable S1U_mapping\n", data_req_p->local_S1u_teid);
|
||||
} else {
|
||||
stack_req.apiType = NW_GTPV1U_ULP_API_SEND_TPDU;
|
||||
//stack_req.apiInfo.sendtoInfo.teid = data_req_p->local_S1u_teid;
|
||||
stack_req.apiInfo.sendtoInfo.teid = gtpv1u_teid2enb_info->teid_enb;
|
||||
BUFFER_TO_NwU32T(gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address, stack_req.apiInfo.sendtoInfo.ipAddr);
|
||||
|
||||
/*nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
NW_IN NwU32T teid,
|
||||
NW_IN NwU8T seqNumFlag,
|
||||
NW_IN NwU16T seqNum,
|
||||
NW_IN NwU8T *tpdu,
|
||||
NW_IN NwU16T tpduLength,
|
||||
NW_OUT NwGtpv1uMsgHandleT *phMsg)*/
|
||||
GTPU_DEBUG("GTPV1U_TUNNEL_DATA_REQ seq num %d %d bytes\n",
|
||||
gtpv1u_sgw_data.seq_num,
|
||||
data_req_p->length);
|
||||
rc = nwGtpv1uGpduMsgNew(gtpv1u_sgw_data.gtpv1u_stack,
|
||||
00,// TO DO bearer_p->port, but not needed when looking at processing
|
||||
NW_FALSE,
|
||||
gtpv1u_sgw_data.seq_num++,
|
||||
data_req_p->buffer,
|
||||
data_req_p->length,
|
||||
data_req_p->offset,
|
||||
&(stack_req.apiInfo.sendtoInfo.hMsg));
|
||||
|
||||
if (rc != NW_GTPV1U_OK) {
|
||||
GTPU_ERROR("nwGtpv1uGpduMsgNew failed: 0x%x\n", rc);
|
||||
} else {
|
||||
rc = nwGtpv1uProcessUlpReq(gtpv1u_sgw_data.gtpv1u_stack, &stack_req);
|
||||
|
||||
if (rc != NW_GTPV1U_OK) {
|
||||
GTPU_ERROR("nwGtpv1uProcessUlpReq failed: 0x%x\n", rc);
|
||||
}
|
||||
|
||||
rc = nwGtpv1uMsgDelete(gtpv1u_sgw_data.gtpv1u_stack,
|
||||
stack_req.apiInfo.sendtoInfo.hMsg);
|
||||
|
||||
if (rc != NW_GTPV1U_OK) {
|
||||
GTPU_ERROR("nwGtpv1uMsgDelete failed: 0x%x\n", rc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Buffer is still needed, do not free it */
|
||||
//itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), data_req_p->buffer);
|
||||
}
|
||||
break;
|
||||
|
||||
case TERMINATE_MESSAGE: {
|
||||
itti_exit_task();
|
||||
udp_data_ind_p->buffer,
|
||||
udp_data_ind_p->buffer_length,
|
||||
udp_data_ind_p->peer_port,
|
||||
udp_data_ind_p->peer_address);
|
||||
//itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), udp_data_ind_p->buffer);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -568,7 +459,6 @@ static void *gtpv1u_thread(void *args)
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p);
|
||||
received_message_p = NULL;
|
||||
}
|
||||
@@ -591,82 +481,11 @@ int gtpv1u_init(const mme_config_t *mme_config_p)
|
||||
|
||||
gtpv1u_sgw_data.sgw_ip_address_for_S1u_S12_S4_up = mme_config_p->ipv4.sgw_ip_address_for_S1u_S12_S4_up;
|
||||
|
||||
#if !defined(ENABLE_USE_GTPU_IN_KERNEL)
|
||||
gtpv1u_sgw_data.S1U_mapping = hashtable_create (8192, NULL, NULL);
|
||||
|
||||
if (gtpv1u_sgw_data.S1U_mapping == NULL) {
|
||||
perror("hashtable_create");
|
||||
GTPU_ERROR("Initializing TASK_GTPV1_U task interface: ERROR\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Initializing GTPv1-U stack */
|
||||
if ((rc = nwGtpv1uInitialize(>pv1u_sgw_data.gtpv1u_stack, GTPU_STACK_SGW)) != NW_GTPV1U_OK) {
|
||||
GTPU_ERROR("Failed to setup nwGtpv1u stack %x\n", rc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((rc = nwGtpv1uSetLogLevel(gtpv1u_sgw_data.gtpv1u_stack,
|
||||
NW_LOG_LEVEL_DEBG)) != NW_GTPV1U_OK) {
|
||||
GTPU_ERROR("Failed to setup loglevel for stack %x\n", rc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Set the ULP API callback. Called once message have been processed by the
|
||||
* nw-gtpv1u stack.
|
||||
*/
|
||||
ulp.ulpReqCallback = gtpv1u_process_stack_req;
|
||||
|
||||
if ((rc = nwGtpv1uSetUlpEntity(gtpv1u_sgw_data.gtpv1u_stack, &ulp)) != NW_GTPV1U_OK) {
|
||||
GTPU_ERROR("nwGtpv1uSetUlpEntity: %x", rc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* nw-gtpv1u stack requires an udp callback to send data over UDP.
|
||||
* We provide a wrapper to UDP task.
|
||||
*/
|
||||
udp.udpDataReqCallback = gtpv1u_send_udp_msg;
|
||||
|
||||
if ((rc = nwGtpv1uSetUdpEntity(gtpv1u_sgw_data.gtpv1u_stack, &udp)) != NW_GTPV1U_OK) {
|
||||
GTPU_ERROR("nwGtpv1uSetUdpEntity: %x", rc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
log.logReqCallback = gtpv1u_log_request;
|
||||
|
||||
if ((rc = nwGtpv1uSetLogMgrEntity(gtpv1u_sgw_data.gtpv1u_stack, &log)) != NW_GTPV1U_OK) {
|
||||
GTPU_ERROR("nwGtpv1uSetLogMgrEntity: %x", rc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Timer interface is more complicated as both wrappers doesn't send a message
|
||||
* to the timer task but call the timer API functions start/stop timer.
|
||||
*/
|
||||
tmr.tmrMgrHandle = 0;
|
||||
tmr.tmrStartCallback = gtpv1u_start_timer_wrapper;
|
||||
tmr.tmrStopCallback = gtpv1u_stop_timer_wrapper;
|
||||
|
||||
if ((rc = nwGtpv1uSetTimerMgrEntity(gtpv1u_sgw_data.gtpv1u_stack, &tmr)) != NW_GTPV1U_OK) {
|
||||
GTPU_ERROR("nwGtpv1uSetTimerMgrEntity: %x", rc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (itti_create_task(TASK_GTPV1_U, >pv1u_thread, NULL) < 0) {
|
||||
GTPU_ERROR("gtpv1u phtread_create: %s", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if !defined(ENABLE_USE_GTPU_IN_KERNEL)
|
||||
|
||||
ret = gtpv1u_send_init_udp(mme_config_p->gtpv1u_config.port_number);
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
GTPU_DEBUG("Initializing GTPV1U interface: DONE\n");
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "gtpv1u.h"
|
||||
|
||||
#define GTPV1U_LINEAR_TEID_ALLOCATION 1
|
||||
//#define GTPV1U_LINEAR_TEID_ALLOCATION 1
|
||||
|
||||
#ifdef GTPV1U_LINEAR_TEID_ALLOCATION
|
||||
static uint32_t g_gtpv1u_teid = 0;
|
||||
|
||||
@@ -79,15 +79,15 @@ extern "C" {
|
||||
*/
|
||||
|
||||
typedef struct NwGtpv1uStack {
|
||||
NwU32T stackType;/**< GTPU_STACK_ENB or GTPU_STACK_SGW */
|
||||
uint32_t stackType;/**< GTPU_STACK_ENB or GTPU_STACK_SGW */
|
||||
NwPtrT id;
|
||||
NwU32T seq;
|
||||
uint32_t seq;
|
||||
NwGtpv1uUlpEntityT ulp;
|
||||
NwGtpv1uUdpEntityT udp;
|
||||
NwGtpv1uMemMgrEntityT memMgr;
|
||||
NwGtpv1uTimerMgrEntityT tmrMgr;
|
||||
NwGtpv1uLogMgrEntityT logMgr;
|
||||
NwU32T logLevel;
|
||||
uint32_t logLevel;
|
||||
RB_HEAD( NwGtpv1uOutstandingTxSeqNumTrxnMap, NwGtpv1uTrxn) outstandingTxSeqNumMap;
|
||||
RB_HEAD( NwGtpv1uOutstandingRxSeqNumTrxnMap, NwGtpv1uTrxn) outstandingRxSeqNumMap;
|
||||
RB_HEAD(NwGtpv1uTunnelEndPointTMap, NwGtpv1uTunnelEndPoint) sessionMap;
|
||||
@@ -99,8 +99,8 @@ typedef struct NwGtpv1uStack {
|
||||
*/
|
||||
|
||||
typedef struct NwGtpv1uTunnelEndPoint {
|
||||
NwU32T teid; /**< Gtpu Tunnel End Point Identifier */
|
||||
NwU32T peerAddr; /**< Peer IP address for the session */
|
||||
uint32_t teid; /**< Gtpu Tunnel End Point Identifier */
|
||||
uint32_t peerAddr; /**< Peer IP address for the session */
|
||||
NwGtpv1uStackT* pStack; /**< Pointer to the parent stack */
|
||||
NwGtpv1uUlpSessionHandleT hUlpSession; /**< ULP session handle for the session */
|
||||
RB_ENTRY (NwGtpv1uTunnelEndPoint) sessionMapRbtNode; /**< RB Tree Data Structure Node */
|
||||
@@ -152,20 +152,20 @@ nwGtpStopTrxnPeerRspTimer(NwGtpv1uStackT* thiz, NwGtpv1uTimerHandleT* phTmr);
|
||||
* NwGtpv1uMsgT holds gtpv1u messages to/from the peer.
|
||||
*/
|
||||
typedef struct NwGtpv1uMsg {
|
||||
NwU8T version;
|
||||
NwU8T protocolType;
|
||||
NwU8T extHdrFlag;
|
||||
NwU8T seqNumFlag;
|
||||
NwU16T npduNumFlag;
|
||||
NwU32T msgType;
|
||||
NwU16T msgLen;
|
||||
NwU32T teid;
|
||||
NwU16T seqNum;
|
||||
NwU8T npduNum;
|
||||
NwU8T nextExtHdrType;
|
||||
NwU8T* msgBuf;
|
||||
NwU32T msgBufLen;
|
||||
NwU32T msgBufOffset;
|
||||
uint8_t version;
|
||||
uint8_t protocolType;
|
||||
uint8_t extHdrFlag;
|
||||
uint8_t seqNumFlag;
|
||||
uint16_t npduNumFlag;
|
||||
uint32_t msgType;
|
||||
uint16_t msgLen;
|
||||
uint32_t teid;
|
||||
uint16_t seqNum;
|
||||
uint8_t npduNum;
|
||||
uint8_t nextExtHdrType;
|
||||
uint8_t* msgBuf;
|
||||
uint32_t msgBufLen;
|
||||
uint32_t msgBufOffset;
|
||||
struct NwGtpv1uMsg* next;
|
||||
} NwGtpv1uMsgT;
|
||||
|
||||
@@ -179,16 +179,16 @@ typedef struct NwGtpv1uMsg {
|
||||
*/
|
||||
|
||||
typedef struct NwGtpv1uTrxn {
|
||||
NwU32T seqNum;
|
||||
NwU32T peerIp;
|
||||
NwU32T peerPort;
|
||||
NwU8T maxRetries;
|
||||
NwU8T t3Timer;
|
||||
uint32_t seqNum;
|
||||
uint32_t peerIp;
|
||||
uint32_t peerPort;
|
||||
uint8_t maxRetries;
|
||||
uint8_t t3Timer;
|
||||
NwGtpv1uTimerHandleT hRspTmr;
|
||||
NwGtpv1uTimeoutInfoT peerRspTimeoutInfo;
|
||||
NwGtpv1uStackT* pStack;
|
||||
NwGtpv1uTunnelEndPointT* pSession;
|
||||
NwU32T hUlpTrxn;
|
||||
uint32_t hUlpTrxn;
|
||||
NwGtpv1uMsgT* pMsg;
|
||||
RB_ENTRY (NwGtpv1uTrxn) outstandingTxSeqNumMapRbtNode; /**< RB Tree Data Structure Node */
|
||||
RB_ENTRY (NwGtpv1uTrxn) outstandingRxSeqNumMapRbtNode; /**< RB Tree Data Structure Node */
|
||||
@@ -203,15 +203,15 @@ typedef struct NwGtpv1uTrxn {
|
||||
#pragma pack(1)
|
||||
|
||||
typedef struct NwGtpv1uMsgHeader {
|
||||
NwU8T PN:1;
|
||||
NwU8T S:1;
|
||||
NwU8T E:1;
|
||||
NwU8T spare:1;
|
||||
NwU8T PT:1;
|
||||
NwU8T version:3;
|
||||
NwU8T msgType;
|
||||
NwU16T msgLength;
|
||||
NwU32T teid;
|
||||
uint8_t PN:1;
|
||||
uint8_t S:1;
|
||||
uint8_t E:1;
|
||||
uint8_t spare:1;
|
||||
uint8_t PT:1;
|
||||
uint8_t version:3;
|
||||
uint8_t msgType;
|
||||
uint16_t msgLength;
|
||||
uint32_t teid;
|
||||
} NwGtpv1uMsgHeaderT;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
@@ -56,7 +56,7 @@ nwGtpv1uTrxnNew( NW_IN NwGtpv1uStackT* thiz,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uTrxnWithSeqNew( NW_IN NwGtpv1uStackT* thiz,
|
||||
NW_IN NwU32T seqNum,
|
||||
NW_IN uint32_t seqNum,
|
||||
NW_OUT NwGtpv1uTrxnT **ppTrxn);
|
||||
|
||||
NwGtpv1uRcT
|
||||
@@ -72,8 +72,8 @@ nwGtpv1uTrxnDelete( NW_INOUT NwGtpv1uTrxnT **pthiz);
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uTrxnCreateAndSendMsg( NW_IN NwGtpv1uStackT* thiz,
|
||||
NW_IN NwGtpv1uTrxnT *pTrxn,
|
||||
NW_IN NwU32T peerIp,
|
||||
NW_IN NwU32T peerPort,
|
||||
NW_IN uint32_t peerIp,
|
||||
NW_IN uint32_t peerPort,
|
||||
NW_IN NwGtpv1uMsgT *pMsg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -80,7 +80,7 @@ typedef NwPtrT NwGtpv1uTimerHandleT; /**< Gtpv2 Stack Timer
|
||||
typedef NwPtrT NwGtpv1uMsgHandleT; /**< Gtpv2 Msg Handle */
|
||||
|
||||
typedef struct NwGtpv1uStackConfig {
|
||||
NwU16T udpSrcPort;
|
||||
uint16_t udpSrcPort;
|
||||
} NwGtpv1uStackConfigT;
|
||||
|
||||
/*--------------------------------------------------------------------------*
|
||||
@@ -121,7 +121,7 @@ typedef enum {
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
typedef NwPtrT NwGtpv1uStackSessionHandleT;/**< Gtpv2 Stack session Handle */
|
||||
typedef NwU8T NwGtpv1uMsgTypeT; /**< Gtpv2 Msg Type */
|
||||
typedef uint8_t NwGtpv1uMsgTypeT; /**< Gtpv2 Msg Type */
|
||||
typedef NwPtrT NwGtpv1uTrxnHandleT; /**< Gtpv2 Transaction Handle */
|
||||
typedef NwPtrT NwGtpv1uUlpTrxnHandleT; /**< Gtpv2 Ulp Transaction Handle */
|
||||
typedef NwPtrT NwGtpv1uUlpSessionHandleT; /**< Gtpv2 Ulp session Handle */
|
||||
@@ -132,7 +132,7 @@ typedef NwPtrT NwGtpv1uUlpSessionHandleT; /**< Gtpv2 Ulp session Handle */
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
NW_IN NwU32T teid;
|
||||
NW_IN uint32_t teid;
|
||||
NW_IN NwGtpv1uUlpSessionHandleT hUlpSession;
|
||||
NW_OUT NwGtpv1uStackSessionHandleT hStackSession;
|
||||
} NwGtpv1uCreateTunnelEndPointT;
|
||||
@@ -153,10 +153,10 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn;
|
||||
NW_IN NwU32T peerIp;
|
||||
NW_IN NwU32T peerPort;
|
||||
NW_IN NwU8T flags;
|
||||
NW_IN NwU32T teid;
|
||||
NW_IN uint32_t peerIp;
|
||||
NW_IN uint32_t peerPort;
|
||||
NW_IN uint8_t flags;
|
||||
NW_IN uint32_t teid;
|
||||
} NwGtpv1uInitialReqInfoT;
|
||||
|
||||
/**
|
||||
@@ -166,11 +166,11 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn;
|
||||
NW_IN NwU32T peerIp;
|
||||
NW_IN NwU32T peerPort;
|
||||
NW_IN NwU8T flags;
|
||||
NW_IN NwU32T teid;
|
||||
NW_IN NwU32T seqNum;
|
||||
NW_IN uint32_t peerIp;
|
||||
NW_IN uint32_t peerPort;
|
||||
NW_IN uint8_t flags;
|
||||
NW_IN uint32_t teid;
|
||||
NW_IN uint32_t seqNum;
|
||||
NW_IN NwGtpv1uMsgHandleT hMsg;
|
||||
} NwGtpv1uTriggeredRspInfoT;
|
||||
|
||||
@@ -181,11 +181,11 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn;
|
||||
NW_IN NwU32T peerIp;
|
||||
NW_IN NwU32T peerPort;
|
||||
NW_IN NwU8T flags;
|
||||
NW_IN NwU32T teid;
|
||||
NW_IN NwU32T seqNum;
|
||||
NW_IN uint32_t peerIp;
|
||||
NW_IN uint32_t peerPort;
|
||||
NW_IN uint8_t flags;
|
||||
NW_IN uint32_t teid;
|
||||
NW_IN uint32_t seqNum;
|
||||
NW_IN NwGtpv1uMsgHandleT hMsg;
|
||||
} NwGtpv1uTriggeredReqInfoT;
|
||||
|
||||
@@ -196,9 +196,9 @@ typedef struct {
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
NW_IN NwU32T teid;
|
||||
NW_IN NwU32T ipAddr;
|
||||
NW_IN NwU8T flags;
|
||||
NW_IN uint32_t teid;
|
||||
NW_IN uint32_t ipAddr;
|
||||
NW_IN uint8_t flags;
|
||||
NW_IN NwGtpv1uMsgHandleT hMsg;
|
||||
} NwGtpv1uSendtoInfoT;
|
||||
|
||||
@@ -213,7 +213,7 @@ typedef struct {
|
||||
NW_INOUT NwGtpv1uTrxnHandleT hTrxn;
|
||||
NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn;
|
||||
NW_IN NwGtpv1uMsgTypeT msgType;
|
||||
NW_IN NwU8T flags;
|
||||
NW_IN uint8_t flags;
|
||||
NW_IN NwGtpv1uMsgHandleT hMsg;
|
||||
} NwGtpv1uSendMsgInfoT;
|
||||
|
||||
@@ -225,10 +225,10 @@ typedef struct {
|
||||
typedef struct {
|
||||
NW_IN NwGtpv1uUlpSessionHandleT hUlpSession;
|
||||
NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn;
|
||||
NW_IN NwU32T teid;
|
||||
NW_IN NwU32T peerIp;
|
||||
NW_IN NwU32T peerPort;
|
||||
NW_IN NwU32T msgType; /**< Message type */
|
||||
NW_IN uint32_t teid;
|
||||
NW_IN uint32_t peerIp;
|
||||
NW_IN uint32_t peerPort;
|
||||
NW_IN uint32_t msgType; /**< Message type */
|
||||
NW_IN NwGtpv1uMsgHandleT hMsg; /**< Gtp Message handle */
|
||||
} NwGtpv1uRecvMsgInfoT;
|
||||
|
||||
@@ -297,11 +297,11 @@ typedef struct {
|
||||
typedef struct {
|
||||
NwGtpv1uUdpHandleT hUdp;
|
||||
NwGtpv1uRcT (*udpDataReqCallback) ( NW_IN NwGtpv1uUdpHandleT udpHandle,
|
||||
NW_IN NwU8T* dataBuf,
|
||||
NW_IN NwU32T dataSize,
|
||||
NW_IN NwU32T dataOffset,
|
||||
NW_IN NwU32T peerIP,
|
||||
NW_IN NwU16T peerPort);
|
||||
NW_IN uint8_t* dataBuf,
|
||||
NW_IN uint32_t dataSize,
|
||||
NW_IN uint32_t dataOffset,
|
||||
NW_IN uint32_t peerIP,
|
||||
NW_IN uint16_t peerPort);
|
||||
} NwGtpv1uUdpEntityT;
|
||||
|
||||
/**
|
||||
@@ -311,14 +311,14 @@ typedef struct {
|
||||
typedef struct {
|
||||
NwGtpv1uMemMgrHandleT hMemMgr;
|
||||
void* (*memAlloc)( NW_IN NwGtpv1uMemMgrHandleT hMemMgr,
|
||||
NW_IN NwU32T memSize,
|
||||
NW_IN uint32_t memSize,
|
||||
NW_IN NwCharT* fileName,
|
||||
NW_IN NwU32T lineNumber);
|
||||
NW_IN uint32_t lineNumber);
|
||||
|
||||
void (*memFree) ( NW_IN NwGtpv1uMemMgrHandleT hMemMgr,
|
||||
NW_IN void* hMem,
|
||||
NW_IN NwCharT* fileName,
|
||||
NW_IN NwU32T lineNumber);
|
||||
NW_IN uint32_t lineNumber);
|
||||
} NwGtpv1uMemMgrEntityT;
|
||||
|
||||
|
||||
@@ -336,9 +336,9 @@ typedef struct {
|
||||
typedef struct {
|
||||
NwGtpv1uTimerMgrHandleT tmrMgrHandle;
|
||||
NwGtpv1uRcT (*tmrStartCallback)( NW_IN NwGtpv1uTimerMgrHandleT tmrMgrHandle,
|
||||
NW_IN NwU32T timeoutSecs,
|
||||
NW_IN NwU32T timeoutUsec,
|
||||
NW_IN NwU32T tmrType,
|
||||
NW_IN uint32_t timeoutSecs,
|
||||
NW_IN uint32_t timeoutUsec,
|
||||
NW_IN uint32_t tmrType,
|
||||
NW_IN void* tmrArg,
|
||||
NW_OUT NwGtpv1uTimerHandleT* tmrHandle);
|
||||
|
||||
@@ -358,9 +358,9 @@ typedef struct {
|
||||
typedef struct {
|
||||
NwGtpv1uLogMgrHandleT logMgrHandle;
|
||||
NwGtpv1uRcT (*logReqCallback) (NW_IN NwGtpv1uLogMgrHandleT logMgrHandle,
|
||||
NW_IN NwU32T logLevel,
|
||||
NW_IN uint32_t logLevel,
|
||||
NW_IN NwCharT* file,
|
||||
NW_IN NwU32T line,
|
||||
NW_IN uint32_t line,
|
||||
NW_IN NwCharT* logStr);
|
||||
} NwGtpv1uLogMgrEntityT;
|
||||
|
||||
@@ -385,7 +385,7 @@ extern "C" {
|
||||
*/
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT* phGtpv1uStackHandle, NwU32T stackType);
|
||||
nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT* phGtpv1uStackHandle, uint32_t stackType);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Destructor
|
||||
@@ -493,7 +493,7 @@ nwGtpv1uSetLogMgrEntity( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
NW_IN NwU32T logLevel);
|
||||
NW_IN uint32_t logLevel);
|
||||
/*---------------------------------------------------------------------------
|
||||
* Process Request from Udp Layer
|
||||
*--------------------------------------------------------------------------*/
|
||||
@@ -511,10 +511,10 @@ nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle,
|
||||
NW_IN NwU8T* udpData,
|
||||
NW_IN NwU32T udpDataLen,
|
||||
NW_IN NwU16T peerPort,
|
||||
NW_IN NwU32T peerIP);
|
||||
NW_IN uint8_t* udpData,
|
||||
NW_IN uint32_t udpDataLen,
|
||||
NW_IN uint16_t peerPort,
|
||||
NW_IN uint32_t peerIP);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Process Request from Upper Layer
|
||||
|
||||
@@ -53,23 +53,23 @@ extern "C" {
|
||||
#pragma pack(1)
|
||||
|
||||
typedef struct NwGtpv1uIeTv1 {
|
||||
NwU8T t;
|
||||
NwU8T v;
|
||||
uint8_t t;
|
||||
uint8_t v;
|
||||
} NwGtpv1uIeTv1T;
|
||||
|
||||
typedef struct NwGtpv1uIeTv2 {
|
||||
NwU8T t;
|
||||
NwU8T v;
|
||||
uint8_t t;
|
||||
uint8_t v;
|
||||
} NwGtpv1uIeTv2T;
|
||||
|
||||
typedef struct NwGtpv1uIeTv4 {
|
||||
NwU8T t;
|
||||
NwU32T v;
|
||||
uint8_t t;
|
||||
uint32_t v;
|
||||
} NwGtpv1uIeTv4T;
|
||||
|
||||
typedef struct NwGtpv1uIeTlv {
|
||||
NwU8T t;
|
||||
NwU16T l;
|
||||
uint8_t t;
|
||||
uint16_t l;
|
||||
} NwGtpv1uIeTlvT;
|
||||
|
||||
#pragma pack()
|
||||
@@ -87,14 +87,14 @@ typedef struct NwGtpv1uIeTlv {
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
NW_IN NwU8T seqNumFlag,
|
||||
NW_IN NwU8T npduNumFlag,
|
||||
NW_IN NwU8T extHdrFlag,
|
||||
NW_IN NwU8T msgType,
|
||||
NW_IN NwU8T teid,
|
||||
NW_IN NwU16T seqNum,
|
||||
NW_IN NwU8T npduNum,
|
||||
NW_IN NwU8T nextExtHeader,
|
||||
NW_IN uint8_t seqNumFlag,
|
||||
NW_IN uint8_t npduNumFlag,
|
||||
NW_IN uint8_t extHdrFlag,
|
||||
NW_IN uint8_t msgType,
|
||||
NW_IN uint8_t teid,
|
||||
NW_IN uint16_t seqNum,
|
||||
NW_IN uint8_t npduNum,
|
||||
NW_IN uint8_t nextExtHeader,
|
||||
NW_OUT NwGtpv1uMsgHandleT *phMsg);
|
||||
|
||||
|
||||
@@ -112,12 +112,12 @@ nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
NW_IN NwU32T teid,
|
||||
NW_IN NwU8T seqNumFlag,
|
||||
NW_IN NwU16T seqNum,
|
||||
NW_IN NwU8T* tpdu,
|
||||
NW_IN NwU16T tpduLength,
|
||||
NW_IN NwU32T tpduOffset,
|
||||
NW_IN uint32_t teid,
|
||||
NW_IN uint8_t seqNumFlag,
|
||||
NW_IN uint16_t seqNum,
|
||||
NW_IN uint8_t* tpdu,
|
||||
NW_IN uint16_t tpduLength,
|
||||
NW_IN uint32_t tpduOffset,
|
||||
NW_OUT NwGtpv1uMsgHandleT *phMsg);
|
||||
|
||||
/**
|
||||
@@ -143,8 +143,8 @@ nwGtpv1uMsgFromMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
NW_IN NwU8T* pBuf,
|
||||
NW_IN NwU32T bufLen,
|
||||
NW_IN uint8_t* pBuf,
|
||||
NW_IN uint32_t bufLen,
|
||||
NW_OUT NwGtpv1uMsgHandleT *phMsg);
|
||||
|
||||
/**
|
||||
@@ -166,7 +166,7 @@ nwGtpv1uMsgDelete( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
*/
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T teid);
|
||||
nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, uint32_t teid);
|
||||
|
||||
/**
|
||||
* Set TEID present flag for gtpv1u message.
|
||||
@@ -186,7 +186,7 @@ nwGtpv1uMsgSetTeidPresent(NW_IN NwGtpv1uMsgHandleT hMsg, NwBoolT teidPresent);
|
||||
*/
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T seqNum);
|
||||
nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, uint32_t seqNum);
|
||||
|
||||
/**
|
||||
* Get TEID present for gtpv1u message.
|
||||
@@ -194,7 +194,7 @@ nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T seqNum);
|
||||
* @param[in] hMsg : Message handle.
|
||||
*/
|
||||
|
||||
NwU32T
|
||||
uint32_t
|
||||
nwGtpv1uMsgGetTeid(NW_IN NwGtpv1uMsgHandleT hMsg);
|
||||
|
||||
/**
|
||||
@@ -212,7 +212,7 @@ nwGtpv1uMsgGetTeidPresent(NW_IN NwGtpv1uMsgHandleT hMsg);
|
||||
* @param[in] hMsg : Message handle.
|
||||
*/
|
||||
|
||||
NwU32T
|
||||
uint32_t
|
||||
nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg);
|
||||
|
||||
/**
|
||||
@@ -223,13 +223,13 @@ nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg);
|
||||
* @param[out] hMsg : T-PDU length.
|
||||
*/
|
||||
|
||||
NwU32T
|
||||
nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, NwU8T* pTpduBuf, NwU32T* pTpduLength);
|
||||
uint32_t
|
||||
nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, uint8_t* pTpduBuf, uint32_t* pTpduLength);
|
||||
|
||||
NwU8T*
|
||||
uint8_t*
|
||||
nwGtpv1uMsgGetTpduHandle(NW_IN NwGtpv1uMsgHandleT hMsg);
|
||||
|
||||
NwU32T
|
||||
uint32_t
|
||||
nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg);
|
||||
|
||||
/**
|
||||
@@ -242,8 +242,8 @@ nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg);
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
NW_IN NwU8T type,
|
||||
NW_IN NwU8T value);
|
||||
NW_IN uint8_t type,
|
||||
NW_IN uint8_t value);
|
||||
|
||||
|
||||
/**
|
||||
@@ -256,9 +256,9 @@ nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
NW_IN NwU8T type,
|
||||
NW_IN NwU16T length,
|
||||
NW_IN NwU16T value);
|
||||
NW_IN uint8_t type,
|
||||
NW_IN uint16_t length,
|
||||
NW_IN uint16_t value);
|
||||
|
||||
|
||||
/**
|
||||
@@ -271,9 +271,9 @@ nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
NW_IN NwU8T type,
|
||||
NW_IN NwU16T length,
|
||||
NW_IN NwU32T value);
|
||||
NW_IN uint8_t type,
|
||||
NW_IN uint16_t length,
|
||||
NW_IN uint32_t value);
|
||||
|
||||
|
||||
/**
|
||||
@@ -287,9 +287,9 @@ nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgAddIe(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
NW_IN NwU8T type,
|
||||
NW_IN NwU16T length,
|
||||
NW_IN NwU8T* pVal);
|
||||
NW_IN uint8_t type,
|
||||
NW_IN uint16_t length,
|
||||
NW_IN uint8_t* pVal);
|
||||
|
||||
/**
|
||||
* Dump the contents of gtpv1u mesasge.
|
||||
@@ -301,7 +301,7 @@ nwGtpv1uMsgAddIe(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgHexDump(NwGtpv1uMsgHandleT hMsg, FILE* fp);
|
||||
|
||||
NwU32T
|
||||
uint32_t
|
||||
nwGtpv1uMsgGetMsgType(NW_IN NwGtpv1uMsgHandleT hMsg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -68,15 +68,15 @@ extern "C" {
|
||||
* IPv4 logging macros
|
||||
*--------------------------------------------------------------------------*/
|
||||
#define NW_IPV4_ADDR "%u.%u.%u.%u"
|
||||
#define NW_IPV4_ADDR_FORMAT(__addr) (NwU8T)((__addr) & 0x000000ff), \
|
||||
(NwU8T)(((__addr) & 0x0000ff00) >> 8 ), \
|
||||
(NwU8T)(((__addr) & 0x00ff0000) >> 16), \
|
||||
(NwU8T)(((__addr) & 0xff000000) >> 24)
|
||||
#define NW_IPV4_ADDR_FORMAT(__addr) (uint8_t)((__addr) & 0x000000ff), \
|
||||
(uint8_t)(((__addr) & 0x0000ff00) >> 8 ), \
|
||||
(uint8_t)(((__addr) & 0x00ff0000) >> 16), \
|
||||
(uint8_t)(((__addr) & 0xff000000) >> 24)
|
||||
|
||||
#define NW_IPV4_ADDR_FORMATP(__paddr) (NwU8T)(*((NwU8T*)(__paddr)) & 0x000000ff), \
|
||||
(NwU8T)(*((NwU8T*)(__paddr + 1)) & 0x000000ff), \
|
||||
(NwU8T)(*((NwU8T*)(__paddr + 2)) & 0x000000ff), \
|
||||
(NwU8T)(*((NwU8T*)(__paddr + 3)) & 0x000000ff)
|
||||
#define NW_IPV4_ADDR_FORMATP(__paddr) (uint8_t)(*((uint8_t*)(__paddr)) & 0x000000ff), \
|
||||
(uint8_t)(*((uint8_t*)(__paddr + 1)) & 0x000000ff), \
|
||||
(uint8_t)(*((uint8_t*)(__paddr + 2)) & 0x000000ff), \
|
||||
(uint8_t)(*((uint8_t*)(__paddr + 3)) & 0x000000ff)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -54,11 +54,6 @@ extern "C" {
|
||||
#define NW_TRUE (1) /**< Truth value */
|
||||
#define NW_FALSE (0) /**< False value */
|
||||
|
||||
typedef unsigned char NwU8T; /**< Unsigned 1 byte */
|
||||
typedef unsigned short NwU16T; /**< Unsigned 2 byte */
|
||||
typedef unsigned int NwU32T; /**< Unsigned 4 byte */
|
||||
typedef unsigned long long NwU64T; /**< Unsigned 8 byte */
|
||||
|
||||
typedef signed char NwS8T; /**< Signed 1 byte */
|
||||
typedef signed short NwS16T; /**< Signed 2 byte */
|
||||
typedef signed int NwS32T; /**< Signed 4 byte */
|
||||
|
||||
@@ -52,10 +52,10 @@
|
||||
( ( (x) & 0x0000ff00 ) << 8 ) | ( ( (x) & 0x000000ff) << 24 ) )
|
||||
|
||||
#define NW_HTONLL(x) ( \
|
||||
( ( ((NwU64T)x) & 0xff00000000000000ULL ) >> 56 ) | ( ( ((NwU64T)x) & 0x00ff000000000000ULL ) >> 40 ) | \
|
||||
( ( ((NwU64T)x) & 0x0000ff0000000000ULL ) >> 24 ) | ( ( ((NwU64T)x) & 0x000000ff00000000ULL ) >> 8 ) | \
|
||||
( ( ((NwU64T)x) & 0x000000000000ff00ULL ) << 40 ) | ( ( ((NwU64T)x) & 0x00000000000000ffULL ) << 56 ) | \
|
||||
( ( ((NwU64T)x) & 0x0000000000ff0000ULL ) << 24 ) | ( ( ((NwU64T)x) & 0x00000000ff000000ULL ) << 8 ) \
|
||||
( ( ((uint64_t)x) & 0xff00000000000000ULL ) >> 56 ) | ( ( ((uint64_t)x) & 0x00ff000000000000ULL ) >> 40 ) | \
|
||||
( ( ((uint64_t)x) & 0x0000ff0000000000ULL ) >> 24 ) | ( ( ((uint64_t)x) & 0x000000ff00000000ULL ) >> 8 ) | \
|
||||
( ( ((uint64_t)x) & 0x000000000000ff00ULL ) << 40 ) | ( ( ((uint64_t)x) & 0x00000000000000ffULL ) << 56 ) | \
|
||||
( ( ((uint64_t)x) & 0x0000000000ff0000ULL ) << 24 ) | ( ( ((uint64_t)x) & 0x00000000ff000000ULL ) << 8 ) \
|
||||
)
|
||||
|
||||
#define NW_NTOHS NW_HTONS
|
||||
|
||||
@@ -196,11 +196,11 @@ nwGtpv1uCompareSeqNum(struct NwGtpv1uTrxn *a, struct NwGtpv1uTrxn *b)
|
||||
*/
|
||||
|
||||
static NwGtpv1uRcT
|
||||
nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort,
|
||||
nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, uint32_t peerIp, uint16_t peerPort,
|
||||
NwGtpv1uMsgT *pMsg)
|
||||
{
|
||||
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
|
||||
NwU8T *msgHdr;
|
||||
uint8_t *msgHdr;
|
||||
|
||||
NW_ASSERT(thiz);
|
||||
NW_ASSERT(pMsg);
|
||||
@@ -219,10 +219,10 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort,
|
||||
(pMsg->npduNumFlag);
|
||||
|
||||
*(msgHdr++) = (pMsg->msgType);
|
||||
*((NwU16T *) msgHdr) = htons(pMsg->msgLen);
|
||||
*((uint16_t *) msgHdr) = htons(pMsg->msgLen);
|
||||
msgHdr += 2;
|
||||
|
||||
*((NwU32T *) msgHdr) = htonl(pMsg->teid);
|
||||
*((uint32_t *) msgHdr) = htonl(pMsg->teid);
|
||||
msgHdr += 4;
|
||||
#if defined(LOG_GTPU) && LOG_GTPU > 0
|
||||
GTPU_DEBUG("nwGtpv1uCreateAndSendMsg to teid %u length %d offset %d\n",
|
||||
@@ -232,13 +232,13 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort,
|
||||
#endif
|
||||
|
||||
if(pMsg->seqNumFlag || pMsg->extHdrFlag || pMsg->npduNumFlag) {
|
||||
*((NwU16T *) msgHdr) = (pMsg->seqNumFlag ? htons(pMsg->seqNum) : 0x0000);
|
||||
*((uint16_t *) msgHdr) = (pMsg->seqNumFlag ? htons(pMsg->seqNum) : 0x0000);
|
||||
msgHdr += 2;
|
||||
|
||||
*((NwU8T *) msgHdr) = (pMsg->npduNumFlag ? htons(pMsg->npduNum) : 0x00);
|
||||
*((uint8_t *) msgHdr) = (pMsg->npduNumFlag ? htons(pMsg->npduNum) : 0x00);
|
||||
msgHdr++;
|
||||
|
||||
*((NwU8T *) msgHdr) = (pMsg->extHdrFlag ? htons(pMsg->nextExtHdrType) : 0x00);
|
||||
*((uint8_t *) msgHdr) = (pMsg->extHdrFlag ? htons(pMsg->nextExtHdrType) : 0x00);
|
||||
msgHdr++;
|
||||
}
|
||||
|
||||
@@ -264,13 +264,13 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort,
|
||||
|
||||
static NwGtpv1uRcT
|
||||
nwGtpv1uSendUlpMessageIndication( NW_IN NwGtpv1uStackT *thiz,
|
||||
NW_IN NwU32T hUlpTrxn,
|
||||
NW_IN NwU32T apiType,
|
||||
NW_IN NwU32T msgType,
|
||||
NW_IN NwU32T peerIp,
|
||||
NW_IN NwU16T peerPort,
|
||||
NW_IN NwU8T *pMsgBuf,
|
||||
NW_IN NwU16T msgLength)
|
||||
NW_IN uint32_t hUlpTrxn,
|
||||
NW_IN uint32_t apiType,
|
||||
NW_IN uint32_t msgType,
|
||||
NW_IN uint32_t peerIp,
|
||||
NW_IN uint16_t peerPort,
|
||||
NW_IN uint8_t *pMsgBuf,
|
||||
NW_IN uint16_t msgLength)
|
||||
{
|
||||
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
|
||||
NwGtpv1uUlpApiT ulpApi;
|
||||
@@ -344,7 +344,7 @@ nwGtpv1uPeerRspTimeout(void *arg)
|
||||
|
||||
static NwGtpv1uRcT
|
||||
NwGtpv1uCreateTunnelEndPoint( NW_IN NwGtpv1uStackT *thiz,
|
||||
NW_IN NwU32T teid,
|
||||
NW_IN uint32_t teid,
|
||||
NW_IN NwGtpv1uUlpSessionHandleT hUlpSession,
|
||||
NW_OUT NwGtpv1uStackSessionHandleT *phStackSession )
|
||||
{
|
||||
@@ -515,16 +515,16 @@ nwGtpv1uSendto( NwGtpv1uStackT *thiz, NW_IN NwGtpv1uUlpApiT *pUlpReq)
|
||||
|
||||
static NwGtpv1uRcT
|
||||
nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
|
||||
NW_IN NwU8T *gpdu,
|
||||
NW_IN NwU32T gpduLen,
|
||||
NW_IN NwU32T peerIp)
|
||||
NW_IN uint8_t *gpdu,
|
||||
NW_IN uint32_t gpduLen,
|
||||
NW_IN uint32_t peerIp)
|
||||
|
||||
{
|
||||
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
|
||||
NwGtpv1uMsgHeaderT *msgHdr = NULL;
|
||||
NwGtpv1uTunnelEndPointT *pTunnelEndPoint = NULL;
|
||||
NwGtpv1uTunnelEndPointT tunnelEndPointKey;
|
||||
// NwU16T hdr_len = 0;
|
||||
// uint16_t hdr_len = 0;
|
||||
|
||||
#if defined(LOG_GTPU) && LOG_GTPU > 0
|
||||
NW_ENTER(thiz);
|
||||
@@ -542,14 +542,14 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
|
||||
NwGtpv1uMsgHandleT hMsg;
|
||||
|
||||
rc = nwGtpv1uMsgFromBufferNew( (NwGtpv1uStackHandleT)thiz,
|
||||
(NwU8T *)gpdu,
|
||||
(uint8_t *)gpdu,
|
||||
gpduLen,
|
||||
&hMsg);
|
||||
|
||||
/*
|
||||
NwU8T* msgBuf;
|
||||
NwU32T msgBufLen;
|
||||
NwU32T msgBufOffset;
|
||||
uint8_t* msgBuf;
|
||||
uint32_t msgBufLen;
|
||||
uint32_t msgBufOffset;
|
||||
*/
|
||||
if(NW_GTPV1U_OK == rc) {
|
||||
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
|
||||
@@ -596,17 +596,17 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
|
||||
|
||||
static NwGtpv1uRcT
|
||||
nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
|
||||
NW_IN NwU8T *msgBuf,
|
||||
NW_IN NwU32T msgBufLen,
|
||||
NW_IN NwU16T peerPort,
|
||||
NW_IN NwU32T peerIp)
|
||||
NW_IN uint8_t *msgBuf,
|
||||
NW_IN uint32_t msgBufLen,
|
||||
NW_IN uint16_t peerPort,
|
||||
NW_IN uint32_t peerIp)
|
||||
{
|
||||
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
|
||||
NwU16T seqNum = 0;
|
||||
uint16_t seqNum = 0;
|
||||
NwGtpv1uMsgHandleT hMsg = 0;
|
||||
int bufLen = 0;
|
||||
|
||||
seqNum = ntohs(*(NwU16T *) (msgBuf + (((*msgBuf) & 0x02) ? 8 : 4)));
|
||||
seqNum = ntohs(*(uint16_t *) (msgBuf + (((*msgBuf) & 0x02) ? 8 : 4)));
|
||||
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
|
||||
@@ -630,10 +630,15 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
|
||||
|
||||
bufLen = sizeof(NwGtpv1uIeTv1T)+ ((NwGtpv1uMsgT*)hMsg)->msgLen;
|
||||
|
||||
#warning CROUX DIRTY +16, TO BE FIXED!!!
|
||||
/* the +16 is there because by analyzing memory allocation with some external
|
||||
* tool, I saw that there were 6 bytes accessed after bufLen in nwGtpv1uCreateAndSendMsg
|
||||
* the value "16" has been chosen arbitrarily, just bigger than 6
|
||||
*/
|
||||
((NwGtpv1uMsgT*)hMsg)->msgBuf = itti_malloc(
|
||||
TASK_GTPV1_U,
|
||||
TASK_UDP,
|
||||
bufLen);
|
||||
bufLen + 16 /* CROUX - dirty +16, to be fixed! */);
|
||||
((NwGtpv1uMsgT*)hMsg)->msgBufLen = bufLen;
|
||||
NW_ASSERT(NW_GTPV1U_OK == rc);
|
||||
|
||||
@@ -678,7 +683,7 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, NwU32T stackType)
|
||||
nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, uint32_t stackType)
|
||||
{
|
||||
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
|
||||
NwGtpv1uStackT *thiz;
|
||||
@@ -689,7 +694,7 @@ nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, NwU32T stac
|
||||
if(thiz) {
|
||||
thiz->id = (NwPtrT)thiz;
|
||||
thiz->stackType = stackType;
|
||||
thiz->seq = (NwU16T) ((NwU32T)thiz) ; // FIXME interesting casts... don't know what this is good for...
|
||||
thiz->seq = (uint16_t) ((uint32_t)thiz) ; // FIXME interesting casts... don't know what this is good for...
|
||||
RB_INIT(&(thiz->outstandingTxSeqNumMap));
|
||||
RB_INIT(&(thiz->outstandingRxSeqNumMap));
|
||||
RB_INIT(&(thiz->sessionMap));
|
||||
@@ -824,7 +829,7 @@ nwGtpv1uSetLogMgrEntity( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
NW_IN NwU32T logLevel)
|
||||
NW_IN uint32_t logLevel)
|
||||
{
|
||||
NwGtpv1uStackT *thiz = (NwGtpv1uStackT *) hGtpuStackHandle;
|
||||
thiz->logLevel = logLevel;
|
||||
@@ -837,14 +842,14 @@ nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
NW_IN NwU8T *udpData,
|
||||
NW_IN NwU32T udpDataLen,
|
||||
NW_IN NwU16T peerPort,
|
||||
NW_IN NwU32T peerIp)
|
||||
NW_IN uint8_t *udpData,
|
||||
NW_IN uint32_t udpDataLen,
|
||||
NW_IN uint16_t peerPort,
|
||||
NW_IN uint32_t peerIp)
|
||||
{
|
||||
NwGtpv1uRcT ret = NW_GTPV1U_FAILURE;
|
||||
NwGtpv1uStackT *thiz;
|
||||
NwU16T msgType;
|
||||
uint16_t msgType;
|
||||
|
||||
#if defined(ENB_MODE)
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_UDP_REQ, VCD_FUNCTION_IN);
|
||||
@@ -853,7 +858,7 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
|
||||
NW_ASSERT(thiz);
|
||||
|
||||
msgType = *((NwU8T *)(udpData + 1));
|
||||
msgType = *((uint8_t *)(udpData + 1));
|
||||
|
||||
switch(msgType) {
|
||||
case NW_GTP_ECHO_REQ:
|
||||
|
||||
@@ -60,14 +60,14 @@ static NwGtpv1uMsgT *gpGtpv1uMsgPool = NULL;
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
NW_IN NwU8T seqNumFlag,
|
||||
NW_IN NwU8T npduNumFlag,
|
||||
NW_IN NwU8T extHdrFlag,
|
||||
NW_IN NwU8T msgType,
|
||||
NW_IN NwU8T teid,
|
||||
NW_IN NwU16T seqNum,
|
||||
NW_IN NwU8T npduNum,
|
||||
NW_IN NwU8T nextExtHeader,
|
||||
NW_IN uint8_t seqNumFlag,
|
||||
NW_IN uint8_t npduNumFlag,
|
||||
NW_IN uint8_t extHdrFlag,
|
||||
NW_IN uint8_t msgType,
|
||||
NW_IN uint8_t teid,
|
||||
NW_IN uint16_t seqNum,
|
||||
NW_IN uint8_t npduNum,
|
||||
NW_IN uint8_t nextExtHeader,
|
||||
NW_OUT NwGtpv1uMsgHandleT *phMsg)
|
||||
{
|
||||
NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle;
|
||||
@@ -118,18 +118,18 @@ nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
NW_IN NwU32T teid,
|
||||
NW_IN NwU8T seqNumFlag,
|
||||
NW_IN NwU16T seqNum,
|
||||
NW_IN NwU8T *tpdu,
|
||||
NW_IN NwU16T tpduLength,
|
||||
NW_IN NwU32T tpduOffset,
|
||||
NW_IN uint32_t teid,
|
||||
NW_IN uint8_t seqNumFlag,
|
||||
NW_IN uint16_t seqNum,
|
||||
NW_IN uint8_t *tpdu,
|
||||
NW_IN uint16_t tpduLength,
|
||||
NW_IN uint32_t tpduOffset,
|
||||
NW_OUT NwGtpv1uMsgHandleT *phMsg)
|
||||
{
|
||||
NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle;
|
||||
NwGtpv1uMsgT *pMsg;
|
||||
//NwU32T header_len = 0;
|
||||
NwU32T msgExtraLen = 0;
|
||||
//uint32_t header_len = 0;
|
||||
uint32_t msgExtraLen = 0;
|
||||
|
||||
if(gpGtpv1uMsgPool) {
|
||||
pMsg = gpGtpv1uMsgPool;
|
||||
@@ -237,8 +237,8 @@ nwGtpv1uMsgFromMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
NW_IN NwU8T *pBuf,
|
||||
NW_IN NwU32T bufLen,
|
||||
NW_IN uint8_t *pBuf,
|
||||
NW_IN uint32_t bufLen,
|
||||
NW_OUT NwGtpv1uMsgHandleT *phMsg)
|
||||
{
|
||||
NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle;
|
||||
@@ -267,17 +267,17 @@ nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
|
||||
pBuf += 2;
|
||||
|
||||
pMsg->teid = ntohl(*((NwU32T *)pBuf));
|
||||
pMsg->teid = ntohl(*((uint32_t *)pBuf));
|
||||
pBuf += 4;
|
||||
|
||||
if(pMsg->extHdrFlag || pMsg->seqNumFlag || pMsg->npduNumFlag) {
|
||||
pMsg->seqNum = ntohs(*(((NwU16T *)pBuf)));
|
||||
pMsg->seqNum = ntohs(*(((uint16_t *)pBuf)));
|
||||
pBuf += 2;
|
||||
pMsg->npduNum = *(pBuf++);
|
||||
pMsg->nextExtHdrType = *(pBuf++);
|
||||
}
|
||||
|
||||
pMsg->msgBufOffset = (NwU32T)(pBuf - pMsg->msgBuf);
|
||||
pMsg->msgBufOffset = (uint32_t)(pBuf - pMsg->msgBuf);
|
||||
pMsg->msgBufLen = bufLen - pMsg->msgBufOffset;
|
||||
pMsg->msgLen = bufLen;
|
||||
#if defined(LOG_GTPU) && LOG_GTPU > 0
|
||||
@@ -308,7 +308,7 @@ nwGtpv1uMsgDelete( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
*/
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T teid)
|
||||
nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, uint32_t teid)
|
||||
{
|
||||
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
|
||||
thiz->teid = teid;
|
||||
@@ -326,7 +326,7 @@ nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T teid)
|
||||
*/
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T seqNum)
|
||||
nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, uint32_t seqNum)
|
||||
{
|
||||
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
|
||||
thiz->seqNum = seqNum;
|
||||
@@ -339,7 +339,7 @@ nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T seqNum)
|
||||
* @param[in] hMsg : Message handle.
|
||||
*/
|
||||
|
||||
NwU32T
|
||||
uint32_t
|
||||
nwGtpv1uMsgGetTeid(NW_IN NwGtpv1uMsgHandleT hMsg)
|
||||
{
|
||||
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
|
||||
@@ -353,7 +353,7 @@ nwGtpv1uMsgGetTeid(NW_IN NwGtpv1uMsgHandleT hMsg)
|
||||
* @param[in] hMsg : Message handle.
|
||||
*/
|
||||
|
||||
NwU32T
|
||||
uint32_t
|
||||
nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg)
|
||||
{
|
||||
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
|
||||
@@ -366,7 +366,7 @@ nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg)
|
||||
* @param[in] hMsg : Message handle.
|
||||
*/
|
||||
|
||||
NwU32T
|
||||
uint32_t
|
||||
nwGtpv1uMsgGetMsgType(NW_IN NwGtpv1uMsgHandleT hMsg)
|
||||
{
|
||||
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
|
||||
@@ -380,11 +380,11 @@ nwGtpv1uMsgGetMsgType(NW_IN NwGtpv1uMsgHandleT hMsg)
|
||||
*/
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, NwU8T *pTpduBuf,
|
||||
NwU32T *pTpduLength)
|
||||
nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, uint8_t *pTpduBuf,
|
||||
uint32_t *pTpduLength)
|
||||
{
|
||||
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
|
||||
NwU8T headerLength = ((thiz->seqNumFlag || thiz->extHdrFlag
|
||||
uint8_t headerLength = ((thiz->seqNumFlag || thiz->extHdrFlag
|
||||
|| thiz->npduNumFlag) ? 12 : 8);
|
||||
|
||||
*pTpduLength = thiz->msgLen - headerLength;
|
||||
@@ -392,7 +392,7 @@ nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, NwU8T *pTpduBuf,
|
||||
return NW_GTPV1U_OK;
|
||||
}
|
||||
|
||||
NwU8T *
|
||||
uint8_t *
|
||||
nwGtpv1uMsgGetTpduHandle(NW_IN NwGtpv1uMsgHandleT hMsg)
|
||||
{
|
||||
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
|
||||
@@ -400,7 +400,7 @@ nwGtpv1uMsgGetTpduHandle(NW_IN NwGtpv1uMsgHandleT hMsg)
|
||||
|| thiz->npduNumFlag) ? 12 : 8));
|
||||
}
|
||||
|
||||
NwU32T
|
||||
uint32_t
|
||||
nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg)
|
||||
{
|
||||
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
|
||||
@@ -410,8 +410,8 @@ nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg)
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
NW_IN NwU8T type,
|
||||
NW_IN NwU8T value)
|
||||
NW_IN uint8_t type,
|
||||
NW_IN uint8_t value)
|
||||
{
|
||||
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
|
||||
NwGtpv1uIeTv1T *pIe;
|
||||
@@ -428,9 +428,9 @@ nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
NW_IN NwU8T type,
|
||||
NW_IN NwU16T length,
|
||||
NW_IN NwU16T value)
|
||||
NW_IN uint8_t type,
|
||||
NW_IN uint16_t length,
|
||||
NW_IN uint16_t value)
|
||||
{
|
||||
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
|
||||
NwGtpv1uIeTv2T *pIe;
|
||||
@@ -447,9 +447,9 @@ nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
NW_IN NwU8T type,
|
||||
NW_IN NwU16T length,
|
||||
NW_IN NwU32T value)
|
||||
NW_IN uint8_t type,
|
||||
NW_IN uint16_t length,
|
||||
NW_IN uint32_t value)
|
||||
{
|
||||
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
|
||||
NwGtpv1uIeTv4T *pIe;
|
||||
@@ -466,9 +466,9 @@ nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uMsgAddIe(NW_IN NwGtpv1uMsgHandleT hMsg,
|
||||
NW_IN NwU8T type,
|
||||
NW_IN NwU16T length,
|
||||
NW_IN NwU8T *pVal)
|
||||
NW_IN uint8_t type,
|
||||
NW_IN uint16_t length,
|
||||
NW_IN uint8_t *pVal)
|
||||
{
|
||||
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
|
||||
NwGtpv1uIeTlvT *pIe;
|
||||
@@ -489,8 +489,8 @@ nwGtpv1uMsgHexDump(NwGtpv1uMsgHandleT hMsg, FILE *fp)
|
||||
{
|
||||
|
||||
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
|
||||
NwU8T *data = pMsg->msgBuf;
|
||||
NwU32T size = pMsg->msgLen;
|
||||
uint8_t *data = pMsg->msgBuf;
|
||||
uint32_t size = pMsg->msgLen;
|
||||
|
||||
unsigned char *p = (unsigned char *)data;
|
||||
unsigned char c;
|
||||
|
||||
@@ -232,7 +232,7 @@ nwGtpv1uTrxnNew( NW_IN NwGtpv1uStackT *thiz,
|
||||
*/
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uTrxnWithSeqNew( NW_IN NwGtpv1uStackT *thiz,
|
||||
NW_IN NwU32T seqNum,
|
||||
NW_IN uint32_t seqNum,
|
||||
NW_OUT NwGtpv1uTrxnT **ppTrxn)
|
||||
{
|
||||
NwGtpv1uRcT rc = NW_GTPV1U_OK;
|
||||
@@ -313,12 +313,12 @@ nwGtpv1uTrxnDelete( NW_INOUT NwGtpv1uTrxnT **pthiz)
|
||||
NwGtpv1uRcT
|
||||
nwGtpv1uTrxnCreateAndSendMsg( NW_IN NwGtpv1uStackT *thiz,
|
||||
NW_IN NwGtpv1uTrxnT *pTrxn,
|
||||
NW_IN NwU32T peerIp,
|
||||
NW_IN NwU32T peerPort,
|
||||
NW_IN uint32_t peerIp,
|
||||
NW_IN uint32_t peerPort,
|
||||
NW_IN NwGtpv1uMsgT *pMsg)
|
||||
{
|
||||
NwGtpv1uRcT rc;
|
||||
NwU8T *msgHdr;
|
||||
uint8_t *msgHdr;
|
||||
|
||||
NW_ASSERT(thiz);
|
||||
NW_ASSERT(pMsg);
|
||||
@@ -334,33 +334,33 @@ nwGtpv1uTrxnCreateAndSendMsg( NW_IN NwGtpv1uStackT *thiz,
|
||||
(pMsg->npduNumFlag);
|
||||
|
||||
*(msgHdr++) = (pMsg->msgType);
|
||||
*((NwU16T *) msgHdr) = htons(pMsg->msgLen);
|
||||
*((uint16_t *) msgHdr) = htons(pMsg->msgLen);
|
||||
msgHdr += 2;
|
||||
|
||||
*((NwU32T *) msgHdr) = htonl(pMsg->teid);
|
||||
*((uint32_t *) msgHdr) = htonl(pMsg->teid);
|
||||
msgHdr += 4;
|
||||
|
||||
if(pMsg->seqNumFlag | pMsg->extHdrFlag | pMsg->npduNumFlag) {
|
||||
if(pMsg->seqNumFlag) {
|
||||
*((NwU16T *) msgHdr) = htons((pTrxn ? pTrxn->seqNum : pMsg->seqNum));
|
||||
*((uint16_t *) msgHdr) = htons((pTrxn ? pTrxn->seqNum : pMsg->seqNum));
|
||||
} else {
|
||||
*((NwU16T *) msgHdr) = 0x0000;
|
||||
*((uint16_t *) msgHdr) = 0x0000;
|
||||
}
|
||||
|
||||
msgHdr += 2;
|
||||
|
||||
if(pMsg->npduNumFlag) {
|
||||
*((NwU8T *) msgHdr) = pMsg->npduNumFlag;
|
||||
*((uint8_t *) msgHdr) = pMsg->npduNumFlag;
|
||||
} else {
|
||||
*((NwU8T *) msgHdr) = 0x00;
|
||||
*((uint8_t *) msgHdr) = 0x00;
|
||||
}
|
||||
|
||||
msgHdr++;
|
||||
|
||||
if(pMsg->extHdrFlag) {
|
||||
*((NwU8T *) msgHdr) = pMsg->extHdrFlag;
|
||||
*((uint8_t *) msgHdr) = pMsg->extHdrFlag;
|
||||
} else {
|
||||
*((NwU8T *) msgHdr) = 0x00;
|
||||
*((uint8_t *) msgHdr) = 0x00;
|
||||
}
|
||||
|
||||
msgHdr++;
|
||||
|
||||
@@ -23,27 +23,27 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
NwU32T g_log_level = NW_LOG_LEVEL_INFO;
|
||||
uint32_t g_log_level = NW_LOG_LEVEL_INFO;
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Public functions
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
NwGtpv1uRcT nwMiniLogMgrInit(NwMiniLogMgrT *thiz, NwU32T logLevel )
|
||||
NwGtpv1uRcT nwMiniLogMgrInit(NwMiniLogMgrT *thiz, uint32_t logLevel )
|
||||
{
|
||||
thiz->logLevel = logLevel;
|
||||
return NW_GTPV1U_OK;
|
||||
}
|
||||
|
||||
NwGtpv1uRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT *thiz, NwU32T logLevel)
|
||||
NwGtpv1uRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT *thiz, uint32_t logLevel)
|
||||
{
|
||||
thiz->logLevel = logLevel;
|
||||
}
|
||||
|
||||
NwGtpv1uRcT nwMiniLogMgrLogRequest (NwGtpv1uLogMgrHandleT hLogMgr,
|
||||
NwU32T logLevel,
|
||||
uint32_t logLevel,
|
||||
NwCharT *file,
|
||||
NwU32T line,
|
||||
uint32_t line,
|
||||
NwCharT *logStr)
|
||||
{
|
||||
NwMiniLogMgrT *thiz = (NwMiniLogMgrT *) hLogMgr;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifndef __NW_MINI_LOG_MGR_H__
|
||||
#define __NW_MINI_LOG_MGR_H__
|
||||
|
||||
extern NwU32T g_log_level;
|
||||
extern uint32_t g_log_level;
|
||||
|
||||
|
||||
#define NW_LOG( _logLevel, ...) \
|
||||
@@ -37,7 +37,7 @@ extern NwU32T g_log_level;
|
||||
} while(0)
|
||||
|
||||
typedef struct {
|
||||
NwU8T logLevel;
|
||||
uint8_t logLevel;
|
||||
} NwMiniLogMgrT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -45,9 +45,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
NwGtpv1uRcT nwMiniLogMgrLogRequest (NwGtpv1uLogMgrHandleT logMgrHandle,
|
||||
NwU32T logLevel,
|
||||
uint32_t logLevel,
|
||||
NwCharT* file,
|
||||
NwU32T line,
|
||||
uint32_t line,
|
||||
NwCharT* logStr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -53,9 +53,9 @@ NW_TMR_CALLBACK(nwMiniTmrMgrHandleTimeout)
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
NwGtpv1uRcT nwTimerStart( NwGtpv1uTimerMgrHandleT tmrMgrHandle,
|
||||
NwU32T timeoutSec,
|
||||
NwU32T timeoutUsec,
|
||||
NwU32T tmrType,
|
||||
uint32_t timeoutSec,
|
||||
uint32_t timeoutUsec,
|
||||
uint32_t tmrType,
|
||||
void *timeoutArg,
|
||||
NwGtpv1uTimerHandleT *hTmr)
|
||||
{
|
||||
|
||||
@@ -35,9 +35,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
NwGtpv1uRcT nwTimerStart( NwGtpv1uTimerMgrHandleT tmrMgrHandle,
|
||||
NwU32T timeoutSec,
|
||||
NwU32T timeoutUsec,
|
||||
NwU32T tmrType,
|
||||
uint32_t timeoutSec,
|
||||
uint32_t timeoutUsec,
|
||||
uint32_t tmrType,
|
||||
void* timeoutArg,
|
||||
NwGtpv1uTimerHandleT* hTmr);
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@ static
|
||||
void NW_TMR_CALLBACK(nwUdpDataIndicationCallbackData)
|
||||
{
|
||||
NwGtpv1uRcT rc;
|
||||
NwU8T udpBuf[MAX_UDP_PAYLOAD_LEN];
|
||||
uint8_t udpBuf[MAX_UDP_PAYLOAD_LEN];
|
||||
NwS32T bytesRead;
|
||||
NwU32T peerLen;
|
||||
uint32_t peerLen;
|
||||
struct sockaddr_in peer;
|
||||
NwMiniUdpEntityT *thiz = (NwMiniUdpEntityT *) arg;
|
||||
|
||||
@@ -71,7 +71,7 @@ void NW_TMR_CALLBACK(nwUdpDataIndicationCallbackData)
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
NwGtpv1uRcT nwMiniUdpInit(NwMiniUdpEntityT *thiz,
|
||||
NwGtpv1uStackHandleT hGtpv1uStack, NwU8T *ipAddr)
|
||||
NwGtpv1uStackHandleT hGtpv1uStack, uint8_t *ipAddr)
|
||||
{
|
||||
int sd;
|
||||
struct sockaddr_in addr;
|
||||
@@ -109,10 +109,10 @@ NwGtpv1uRcT nwMiniUdpDestroy(NwMiniUdpEntityT *thiz)
|
||||
}
|
||||
|
||||
NwGtpv1uRcT nwMiniUdpDataReq(NwGtpv1uUdpHandleT udpHandle,
|
||||
NwU8T *dataBuf,
|
||||
NwU32T dataSize,
|
||||
NwU32T peerIpAddr,
|
||||
NwU32T peerPort)
|
||||
uint8_t *dataBuf,
|
||||
uint32_t dataSize,
|
||||
uint32_t peerIpAddr,
|
||||
uint32_t peerPort)
|
||||
{
|
||||
struct sockaddr_in peerAddr;
|
||||
NwS32T bytesSent;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#define __NW_MINI_UDP_ENTITY_H__
|
||||
|
||||
typedef struct {
|
||||
NwU32T hSocket;
|
||||
uint32_t hSocket;
|
||||
NwEventT ev;
|
||||
NwGtpv1uStackHandleT hGtpv1uStack;
|
||||
} NwMiniUdpEntityT;
|
||||
@@ -34,15 +34,15 @@ typedef struct {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
NwGtpv1uRcT nwMiniUdpInit(NwMiniUdpEntityT* thiz, NwGtpv1uStackHandleT hGtpv1uStack, NwU8T* ipAddr);
|
||||
NwGtpv1uRcT nwMiniUdpInit(NwMiniUdpEntityT* thiz, NwGtpv1uStackHandleT hGtpv1uStack, uint8_t* ipAddr);
|
||||
|
||||
NwGtpv1uRcT nwMiniUdpDestroy(NwMiniUdpEntityT* thiz);
|
||||
|
||||
NwGtpv1uRcT nwMiniUdpDataReq(NwGtpv1uUdpHandleT udpHandle,
|
||||
NwU8T* dataBuf,
|
||||
NwU32T dataSize,
|
||||
NwU32T peerAddr,
|
||||
NwU32T peerPort);
|
||||
uint8_t* dataBuf,
|
||||
uint32_t dataSize,
|
||||
uint32_t peerAddr,
|
||||
uint32_t peerPort);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ extern "C" {
|
||||
#define MAX_UDP_PAYLOAD_LEN (4096)
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwMiniUlpSendEchoRequestToPeer(NwMiniUlpEntityT *thiz, NwU32T peerIp)
|
||||
nwMiniUlpSendEchoRequestToPeer(NwMiniUlpEntityT *thiz, uint32_t peerIp)
|
||||
{
|
||||
NwGtpv1uRcT rc;
|
||||
NwGtpv1uUlpApiT ulpReq;
|
||||
@@ -82,9 +82,9 @@ void NW_EVT_CALLBACK(nwMiniUlpDataIndicationCallbackData)
|
||||
{
|
||||
NwMiniUlpEntityT *thiz = (NwMiniUlpEntityT *) arg;
|
||||
NwGtpv1uRcT rc;
|
||||
NwU8T udpBuf[MAX_UDP_PAYLOAD_LEN];
|
||||
uint8_t udpBuf[MAX_UDP_PAYLOAD_LEN];
|
||||
NwS32T bytesRead;
|
||||
NwU32T peerLen;
|
||||
uint32_t peerLen;
|
||||
struct sockaddr_in peer;
|
||||
|
||||
peerLen = sizeof(peer);
|
||||
@@ -123,7 +123,7 @@ nwMiniUlpDestroy(NwMiniUlpEntityT *thiz)
|
||||
}
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwMiniUlpCreateConn(NwMiniUlpEntityT *thiz, char *localIpStr, NwU16T localport,
|
||||
nwMiniUlpCreateConn(NwMiniUlpEntityT *thiz, char *localIpStr, uint16_t localport,
|
||||
char *peerIpStr)
|
||||
{
|
||||
NwGtpv1uRcT rc;
|
||||
@@ -214,8 +214,8 @@ nwMiniUlpDestroyConn(NwMiniUlpEntityT *thiz)
|
||||
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwMiniUlpTpduSend(NwMiniUlpEntityT *thiz, NwU8T *tpduBuf, NwU32T tpduLen ,
|
||||
NwU16T fromPort)
|
||||
nwMiniUlpTpduSend(NwMiniUlpEntityT *thiz, uint8_t *tpduBuf, uint32_t tpduLen ,
|
||||
uint16_t fromPort)
|
||||
{
|
||||
NwGtpv1uRcT rc;
|
||||
NwGtpv1uUlpApiT ulpReq;
|
||||
@@ -260,9 +260,9 @@ nwMiniUlpProcessStackReqCallback (NwGtpv1uUlpHandleT hUlp,
|
||||
case NW_GTPV1U_ULP_API_RECV_TPDU: {
|
||||
struct sockaddr_in peerAddr;
|
||||
NwS32T bytesSent;
|
||||
NwU8T dataBuf[4096];
|
||||
NwU32T dataSize;
|
||||
NwU32T peerIpAddr = (inet_addr(thiz->peerIpStr));
|
||||
uint8_t dataBuf[4096];
|
||||
uint32_t dataSize;
|
||||
uint32_t peerIpAddr = (inet_addr(thiz->peerIpStr));
|
||||
|
||||
NW_ASSERT( NW_GTPV1U_OK == nwGtpv1uMsgGetTpdu(pUlpApi->apiInfo.recvMsgInfo.hMsg,
|
||||
dataBuf, &dataSize) );
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
|
||||
typedef struct {
|
||||
int hSocket;
|
||||
NwU16T seqNum;
|
||||
NwU8T restartCounter;
|
||||
NwU8T localIpStr[16];
|
||||
NwU8T peerIpStr[16];
|
||||
NwU32T localPort[1025];
|
||||
uint16_t seqNum;
|
||||
uint8_t restartCounter;
|
||||
uint8_t localIpStr[16];
|
||||
uint8_t peerIpStr[16];
|
||||
uint32_t localPort[1025];
|
||||
NwEventT ev[1025];
|
||||
NwGtpv1uStackHandleT hGtpv1uStack;
|
||||
NwGtpv1uStackSessionHandleT hGtpv1uConn;
|
||||
@@ -42,7 +42,7 @@ NwGtpv1uRcT
|
||||
nwMiniUlpDestroy(NwMiniUlpEntityT* thiz);
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwMiniUlpCreateConn(NwMiniUlpEntityT* thiz, char* localIpStr, NwU16T localPort, char* peerIpStr);
|
||||
nwMiniUlpCreateConn(NwMiniUlpEntityT* thiz, char* localIpStr, uint16_t localPort, char* peerIpStr);
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwMiniUlpDestroyConn(NwMiniUlpEntityT* thiz);
|
||||
@@ -51,7 +51,7 @@ NwGtpv1uRcT
|
||||
nwMiniUlpSendMsg(NwMiniUlpEntityT* thiz);
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwMiniUlpTpduSend(NwMiniUlpEntityT* thiz, NwU8T* tpduBuf, NwU32T tpduLen , NwU16T fromPort);
|
||||
nwMiniUlpTpduSend(NwMiniUlpEntityT* thiz, uint8_t* tpduBuf, uint32_t tpduLen , uint16_t fromPort);
|
||||
|
||||
NwGtpv1uRcT
|
||||
nwMiniUlpProcessStackReqCallback (NwGtpv1uUlpHandleT hUlp,
|
||||
|
||||
@@ -37,8 +37,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
NwGtpv1uRcT rc;
|
||||
char *logLevelStr;
|
||||
NwU32T logLevel;
|
||||
NwU32T num_of_connections;
|
||||
uint32_t logLevel;
|
||||
uint32_t num_of_connections;
|
||||
|
||||
NwGtpv1uStackHandleT hGtpv1uStack = 0;
|
||||
NwMiniUlpEntityT ulpObj;
|
||||
|
||||
@@ -43,25 +43,25 @@
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
NwU8T groupedIeType;
|
||||
NwU16T mandatoryIeCount;
|
||||
uint8_t groupedIeType;
|
||||
uint16_t mandatoryIeCount;
|
||||
NwGtpv2cStackHandleT hStack;
|
||||
|
||||
struct {
|
||||
NwU8T ieMinLength;
|
||||
NwU8T iePresence;
|
||||
uint8_t ieMinLength;
|
||||
uint8_t iePresence;
|
||||
} ieParseInfo[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM];
|
||||
|
||||
} NwGtpv2cGroupedIeParseInfoT;
|
||||
|
||||
typedef struct {
|
||||
NwU16T msgType;
|
||||
NwU16T mandatoryIeCount;
|
||||
uint16_t msgType;
|
||||
uint16_t mandatoryIeCount;
|
||||
NwGtpv2cStackHandleT hStack;
|
||||
|
||||
struct {
|
||||
NwU8T ieMinLength;
|
||||
NwU8T iePresence;
|
||||
uint8_t ieMinLength;
|
||||
uint8_t iePresence;
|
||||
NwGtpv2cGroupedIeParseInfoT* pGroupedIeInfo;
|
||||
} ieParseInfo[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM];
|
||||
|
||||
@@ -72,7 +72,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
NwGtpv2cMsgIeParseInfoT*
|
||||
nwGtpv2cMsgIeParseInfoNew(NwGtpv2cStackHandleT hStack, NwU8T msgType);
|
||||
nwGtpv2cMsgIeParseInfoNew(NwGtpv2cStackHandleT hStack, uint8_t msgType);
|
||||
|
||||
NwRcT
|
||||
nwGtpv2cMsgIeParseInfoDelete(NwGtpv2cMsgIeParseInfoT* thiz);
|
||||
|
||||
@@ -90,16 +90,16 @@ extern "C" {
|
||||
*/
|
||||
|
||||
typedef struct NwGtpv2cStack {
|
||||
NwU32T id;
|
||||
uint32_t id;
|
||||
NwGtpv2cUlpEntityT ulp;
|
||||
NwGtpv2cUdpEntityT udp;
|
||||
NwGtpv2cMemMgrEntityT memMgr;
|
||||
NwGtpv2cTimerMgrEntityT tmrMgr;
|
||||
NwGtpv2cLogMgrEntityT logMgr;
|
||||
|
||||
NwU32T seqNum;
|
||||
NwU32T logLevel;
|
||||
NwU32T restartCounter;
|
||||
uint32_t seqNum;
|
||||
uint32_t logLevel;
|
||||
uint32_t restartCounter;
|
||||
|
||||
NwGtpv2cMsgIeParseInfoT *pGtpv2cMsgIeParseInfo[NW_GTP_MSG_END];
|
||||
struct NwGtpv2cTimeoutInfo *activeTimerInfo;
|
||||
@@ -123,12 +123,12 @@ typedef struct NwGtpv2cStack {
|
||||
typedef struct NwGtpv2cTimeoutInfo {
|
||||
NwGtpv2cStackHandleT hStack;
|
||||
struct timeval tvTimeout;
|
||||
NwU32T tmrType;
|
||||
uint32_t tmrType;
|
||||
void* timeoutArg;
|
||||
NwRcT (*timeoutCallbackFunc)(void*);
|
||||
NwGtpv2cTimerHandleT hTimer;
|
||||
RB_ENTRY (NwGtpv2cTimeoutInfo) activeTimerListRbtNode; /**< RB Tree Data Structure Node */
|
||||
NwU32T timerMinHeapIndex;
|
||||
uint32_t timerMinHeapIndex;
|
||||
struct NwGtpv2cTimeoutInfo *next;
|
||||
} NwGtpv2cTimeoutInfoT;
|
||||
|
||||
@@ -143,23 +143,23 @@ typedef struct NwGtpv2cTimeoutInfo {
|
||||
* NwGtpv2cMsgT holds gtpv2c messages to/from the peer.
|
||||
*/
|
||||
typedef struct NwGtpv2cMsgS {
|
||||
NwU8T version;
|
||||
NwU8T teidPresent;
|
||||
NwU8T msgType;
|
||||
NwU16T msgLen;
|
||||
NwU32T teid;
|
||||
NwU32T seqNum;
|
||||
NwU8T* pMsgStart;
|
||||
uint8_t version;
|
||||
uint8_t teidPresent;
|
||||
uint8_t msgType;
|
||||
uint16_t msgLen;
|
||||
uint32_t teid;
|
||||
uint32_t seqNum;
|
||||
uint8_t* pMsgStart;
|
||||
|
||||
#define NW_GTPV2C_MAX_GROUPED_IE_DEPTH (2)
|
||||
struct {
|
||||
NwGtpv2cIeTlvT *pIe[NW_GTPV2C_MAX_GROUPED_IE_DEPTH];
|
||||
NwU8T top;
|
||||
uint8_t top;
|
||||
} groupedIeEncodeStack;
|
||||
|
||||
NwBoolT isIeValid[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM];
|
||||
NwU8T *pIe[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM];
|
||||
NwU8T msgBuf[NW_GTPV2C_MAX_MSG_LEN];
|
||||
uint8_t *pIe[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM];
|
||||
uint8_t msgBuf[NW_GTPV2C_MAX_MSG_LEN];
|
||||
NwGtpv2cStackHandleT hStack;
|
||||
struct NwGtpv2cMsgS* next;
|
||||
} NwGtpv2cMsgT;
|
||||
@@ -169,11 +169,11 @@ typedef struct NwGtpv2cMsgS {
|
||||
*/
|
||||
|
||||
typedef struct NwGtpv2cTrxn {
|
||||
NwU32T seqNum;
|
||||
NwU32T peerIp;
|
||||
NwU32T peerPort;
|
||||
NwU8T t3Timer;
|
||||
NwU8T maxRetries;
|
||||
uint32_t seqNum;
|
||||
uint32_t peerIp;
|
||||
uint32_t peerPort;
|
||||
uint8_t t3Timer;
|
||||
uint8_t maxRetries;
|
||||
NwGtpv2cMsgT* pMsg;
|
||||
NwGtpv2cStackT* pStack;
|
||||
NwGtpv2cTimerHandleT hRspTmr; /**< Handle to reponse timer */
|
||||
@@ -189,11 +189,11 @@ typedef struct NwGtpv2cTrxn {
|
||||
*/
|
||||
|
||||
typedef struct NwGtpv2cPathS {
|
||||
NwU32T hUlpPath; /**< Handle to ULP path contect */
|
||||
NwU32T ipv4Address;
|
||||
NwU32T restartCounter;
|
||||
NwU16T t3ResponseTimout;
|
||||
NwU16T n3RequestCount;
|
||||
uint32_t hUlpPath; /**< Handle to ULP path contect */
|
||||
uint32_t ipv4Address;
|
||||
uint32_t restartCounter;
|
||||
uint16_t t3ResponseTimout;
|
||||
uint16_t n3RequestCount;
|
||||
NwGtpv2cTimerHandleT hKeepAliveTmr; /**< Handle to path keep alive echo timer */
|
||||
RB_ENTRY (NwGtpv2cPathS) pathMapRbtNode;
|
||||
} NwGtpv2cPathT;
|
||||
@@ -210,9 +210,9 @@ RB_PROTOTYPE(NwGtpv2cActiveTimerList, NwGtpv2cTimeoutInfo, activeTimerListRbtNod
|
||||
|
||||
NwRcT
|
||||
nwGtpv2cStartTimer(NwGtpv2cStackT* thiz,
|
||||
NwU32T timeoutSec,
|
||||
NwU32T timeoutUsec,
|
||||
NwU32T tmrType,
|
||||
uint32_t timeoutSec,
|
||||
uint32_t timeoutUsec,
|
||||
uint32_t tmrType,
|
||||
NwRcT (*timeoutCallbackFunc)(void*),
|
||||
void* timeoutCallbackArg,
|
||||
NwGtpv2cTimerHandleT *phTimer);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user